From e8b4a7eb26eadc0a8092a1b7c47f4c34150b487e Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 13 May 2023 22:10:14 +0300 Subject: [PATCH] added backup apis and tests --- apis/backup.go | 67 +- apis/backup_test.go | 571 ++++++++++++++++++ apis/base.go | 2 +- apis/health.go | 18 +- apis/health_test.go | 2 + apis/settings.go | 31 +- apis/settings_test.go | 39 +- core/base.go | 4 + core/base_backup.go | 133 +++- core/base_backup_test.go | 153 +++++ forms/backup_create.go | 3 + forms/backup_create_test.go | 102 ++++ forms/test_email_send_test.go | 84 +-- forms/test_s3_filesystem.go | 88 +++ forms/test_s3_filesystem_test.go | 103 ++++ models/backup_file_info.go | 9 + models/settings/settings.go | 58 +- models/settings/settings_test.go | 70 +++ tests/app.go | 1 + tools/cron/cron.go | 8 + tools/cron/schedule_test.go | 4 +- tools/filesystem/filesystem.go | 1 - tools/hook/hook.go | 2 + ui/.env | 2 +- ...1c3715f.js => AuthMethodsDocs-9cb92810.js} | 8 +- ...c9e307a.js => AuthRefreshDocs-7e8df999.js} | 12 +- ...a81b.js => AuthWithOAuth2Docs-6ac303d9.js} | 10 +- ...4b.js => AuthWithPasswordDocs-fe5fd2fa.js} | 18 +- ui/dist/assets/CodeEditor-761096ff.js | 14 + ui/dist/assets/CodeEditor-f746b79b.js | 14 - ....js => ConfirmEmailChangeDocs-12e0a458.js} | 8 +- ...s => ConfirmPasswordResetDocs-1d1931c0.js} | 8 +- ...js => ConfirmVerificationDocs-9803d138.js} | 8 +- ...-b5573f81.js => CreateApiDocs-3cd84573.js} | 26 +- ...-e76eaa1f.js => DeleteApiDocs-07a7af86.js} | 8 +- ...js => FilterAutocompleteInput-e9273c93.js} | 2 +- ...cs-4c95c3ad.js => ListApiDocs-f0f237f6.js} | 26 +- ...5.js => ListExternalAuthsDocs-92bdae8f.js} | 10 +- ...PageAdminConfirmPasswordReset-283a47f4.js} | 4 +- .../PageAdminRequestPasswordReset-0320e30a.js | 2 + .../PageAdminRequestPasswordReset-40671a2b.js | 2 - ...1fc5.js => PageOAuth2Redirect-455a84f6.js} | 2 +- .../PageRecordConfirmEmailChange-18d5209b.js | 4 + .../PageRecordConfirmEmailChange-51c5d98d.js | 4 - ...PageRecordConfirmPasswordReset-5ecff2bc.js | 4 - ...PageRecordConfirmPasswordReset-c981e373.js | 4 + ...PageRecordConfirmVerification-63d735a5.js} | 4 +- ...5487622.js => RealtimeApiDocs-e134c079.js} | 2 +- ....js => RequestEmailChangeDocs-ab29fae1.js} | 10 +- ...s => RequestPasswordResetDocs-85cec4fc.js} | 10 +- ...js => RequestVerificationDocs-4c733f64.js} | 10 +- ...dkTabs-9d46fa03.js => SdkTabs-9bbe3355.js} | 2 +- ....js => UnlinkExternalAuthDocs-0e4f3037.js} | 10 +- ...-c1fc576c.js => UpdateApiDocs-67bd0657.js} | 18 +- ...cs-7c4555f7.js => ViewApiDocs-9b9dc672.js} | 12 +- .../{index-be8a2174.js => index-03b6b7de.js} | 22 +- ui/dist/assets/index-077c413f.js | 226 +++++++ ...{index-6fa20e53.css => index-2420ec1a.css} | 2 +- ui/dist/assets/index-38223559.js | 211 ------- ui/dist/index.html | 4 +- ui/package-lock.json | 462 +++++++------- ui/package.json | 2 +- .../components/admins/AdminUpsertPanel.svelte | 7 +- .../PageAdminConfirmPasswordReset.svelte | 2 +- .../PageAdminRequestPasswordReset.svelte | 2 +- ui/src/components/admins/PageAdmins.svelte | 2 +- ui/src/components/base/Installer.svelte | 2 +- ui/src/components/base/RefreshButton.svelte | 5 +- ui/src/components/base/Select.svelte | 3 + .../collections/CollectionUpsertPanel.svelte | 10 +- ui/src/components/logs/LogsChart.svelte | 2 +- ui/src/components/logs/LogsList.svelte | 2 +- .../records/ExternalAuthsList.svelte | 4 +- .../PageRecordConfirmEmailChange.svelte | 2 +- .../PageRecordConfirmPasswordReset.svelte | 2 +- .../records/RecordUpsertPanel.svelte | 8 +- ui/src/components/records/RecordsList.svelte | 4 +- .../components/records/RecordsPicker.svelte | 4 +- .../records/fields/RelationField.svelte | 2 +- .../settings/AuthProviderPanel.svelte | 2 +- .../settings/BackupCreatePanel.svelte | 138 +++++ .../settings/BackupRestorePanel.svelte | 114 ++++ ui/src/components/settings/BackupsList.svelte | 224 +++++++ .../components/settings/EmailTestPopup.svelte | 2 +- ui/src/components/settings/ImportPopup.svelte | 9 +- .../settings/PageApplication.svelte | 4 +- .../settings/PageAuthProviders.svelte | 2 +- ui/src/components/settings/PageBackups.svelte | 293 +++++++++ .../settings/PageExportCollections.svelte | 2 +- .../settings/PageImportCollections.svelte | 2 +- ui/src/components/settings/PageMail.svelte | 4 +- ui/src/components/settings/PageStorage.svelte | 227 ++----- .../settings/PageTokenOptions.svelte | 4 +- ui/src/components/settings/S3Fields.svelte | 143 +++++ .../settings/SettingsSidebar.svelte | 9 + .../providers/AppleSecretPopup.svelte | 2 +- ui/src/routes.js | 7 + ui/src/scss/_alert.scss | 15 +- ui/src/scss/_base.scss | 27 +- ui/src/scss/_form.scss | 8 + ui/src/scss/_vars.scss | 2 +- ui/src/stores/collections.js | 2 +- ui/src/utils/ApiClient.js | 4 +- ui/src/utils/CommonHelper.js | 136 +++-- 104 files changed, 3190 insertions(+), 1015 deletions(-) create mode 100644 apis/backup_test.go create mode 100644 core/base_backup_test.go create mode 100644 forms/backup_create_test.go create mode 100644 forms/test_s3_filesystem.go create mode 100644 forms/test_s3_filesystem_test.go create mode 100644 models/backup_file_info.go rename ui/dist/assets/{AuthMethodsDocs-21c3715f.js => AuthMethodsDocs-9cb92810.js} (73%) rename ui/dist/assets/{AuthRefreshDocs-1c9e307a.js => AuthRefreshDocs-7e8df999.js} (77%) rename ui/dist/assets/{AuthWithOAuth2Docs-c632a81b.js => AuthWithOAuth2Docs-6ac303d9.js} (91%) rename ui/dist/assets/{AuthWithPasswordDocs-23b7bd4b.js => AuthWithPasswordDocs-fe5fd2fa.js} (75%) create mode 100644 ui/dist/assets/CodeEditor-761096ff.js delete mode 100644 ui/dist/assets/CodeEditor-f746b79b.js rename ui/dist/assets/{ConfirmEmailChangeDocs-c1ebdd85.js => ConfirmEmailChangeDocs-12e0a458.js} (88%) rename ui/dist/assets/{ConfirmPasswordResetDocs-e9329477.js => ConfirmPasswordResetDocs-1d1931c0.js} (80%) rename ui/dist/assets/{ConfirmVerificationDocs-e77b8d5b.js => ConfirmVerificationDocs-9803d138.js} (66%) rename ui/dist/assets/{CreateApiDocs-b5573f81.js => CreateApiDocs-3cd84573.js} (87%) rename ui/dist/assets/{DeleteApiDocs-e76eaa1f.js => DeleteApiDocs-07a7af86.js} (81%) rename ui/dist/assets/{FilterAutocompleteInput-141a3c4e.js => FilterAutocompleteInput-e9273c93.js} (98%) rename ui/dist/assets/{ListApiDocs-4c95c3ad.js => ListApiDocs-f0f237f6.js} (87%) rename ui/dist/assets/{ListExternalAuthsDocs-72ff2f65.js => ListExternalAuthsDocs-92bdae8f.js} (82%) rename ui/dist/assets/{PageAdminConfirmPasswordReset-bc30579b.js => PageAdminConfirmPasswordReset-283a47f4.js} (57%) create mode 100644 ui/dist/assets/PageAdminRequestPasswordReset-0320e30a.js delete mode 100644 ui/dist/assets/PageAdminRequestPasswordReset-40671a2b.js rename ui/dist/assets/{PageOAuth2Redirect-c20f1fc5.js => PageOAuth2Redirect-455a84f6.js} (87%) create mode 100644 ui/dist/assets/PageRecordConfirmEmailChange-18d5209b.js delete mode 100644 ui/dist/assets/PageRecordConfirmEmailChange-51c5d98d.js delete mode 100644 ui/dist/assets/PageRecordConfirmPasswordReset-5ecff2bc.js create mode 100644 ui/dist/assets/PageRecordConfirmPasswordReset-c981e373.js rename ui/dist/assets/{PageRecordConfirmVerification-5529d20b.js => PageRecordConfirmVerification-63d735a5.js} (76%) rename ui/dist/assets/{RealtimeApiDocs-95487622.js => RealtimeApiDocs-e134c079.js} (98%) rename ui/dist/assets/{RequestEmailChangeDocs-fdf64daa.js => RequestEmailChangeDocs-ab29fae1.js} (71%) rename ui/dist/assets/{RequestPasswordResetDocs-48ff72aa.js => RequestPasswordResetDocs-85cec4fc.js} (70%) rename ui/dist/assets/{RequestVerificationDocs-e3bde5f0.js => RequestVerificationDocs-4c733f64.js} (70%) rename ui/dist/assets/{SdkTabs-9d46fa03.js => SdkTabs-9bbe3355.js} (90%) rename ui/dist/assets/{UnlinkExternalAuthDocs-e00bf869.js => UnlinkExternalAuthDocs-0e4f3037.js} (79%) rename ui/dist/assets/{UpdateApiDocs-c1fc576c.js => UpdateApiDocs-67bd0657.js} (88%) rename ui/dist/assets/{ViewApiDocs-7c4555f7.js => ViewApiDocs-9b9dc672.js} (73%) rename ui/dist/assets/{index-be8a2174.js => index-03b6b7de.js} (54%) create mode 100644 ui/dist/assets/index-077c413f.js rename ui/dist/assets/{index-6fa20e53.css => index-2420ec1a.css} (50%) delete mode 100644 ui/dist/assets/index-38223559.js create mode 100644 ui/src/components/settings/BackupCreatePanel.svelte create mode 100644 ui/src/components/settings/BackupRestorePanel.svelte create mode 100644 ui/src/components/settings/BackupsList.svelte create mode 100644 ui/src/components/settings/PageBackups.svelte create mode 100644 ui/src/components/settings/S3Fields.svelte diff --git a/apis/backup.go b/apis/backup.go index bee1d63c2..2e0401e0b 100644 --- a/apis/backup.go +++ b/apis/backup.go @@ -4,12 +4,14 @@ import ( "context" "log" "net/http" + "net/url" "path/filepath" "time" "github.com/labstack/echo/v5" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/forms" + "github.com/pocketbase/pocketbase/models" "github.com/pocketbase/pocketbase/tools/types" "github.com/spf13/cast" ) @@ -23,28 +25,22 @@ func bindBackupApi(app core.App, rg *echo.Group) { subGroup := rg.Group("/backups", ActivityLogger(app)) subGroup.GET("", api.list, RequireAdminAuth()) subGroup.POST("", api.create, RequireAdminAuth()) - subGroup.GET("/:name", api.download) - subGroup.DELETE("/:name", api.delete, RequireAdminAuth()) - subGroup.POST("/:name/restore", api.restore, RequireAdminAuth()) + subGroup.GET("/:key", api.download) + subGroup.DELETE("/:key", api.delete, RequireAdminAuth()) + subGroup.POST("/:key/restore", api.restore, RequireAdminAuth()) } type backupApi struct { app core.App } -type backupItem struct { - Name string `json:"name"` - Size int64 `json:"size"` - Modified types.DateTime `json:"modified"` -} - func (api *backupApi) list(c echo.Context) error { ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() fsys, err := api.app.NewBackupsFilesystem() if err != nil { - return NewBadRequestError("Failed to load backups filesystem", err) + return NewBadRequestError("Failed to load backups filesystem.", err) } defer fsys.Close() @@ -55,13 +51,13 @@ func (api *backupApi) list(c echo.Context) error { return NewBadRequestError("Failed to retrieve backup items. Raw error: \n"+err.Error(), nil) } - result := make([]backupItem, len(backups)) + result := make([]models.BackupFileInfo, len(backups)) for i, obj := range backups { modified, _ := types.ParseDateTime(obj.ModTime) - result[i] = backupItem{ - Name: obj.Key, + result[i] = models.BackupFileInfo{ + Key: obj.Key, Size: obj.Size, Modified: modified, } @@ -71,7 +67,7 @@ func (api *backupApi) list(c echo.Context) error { } func (api *backupApi) create(c echo.Context) error { - if cast.ToString(api.app.Cache().Get(core.CacheActiveBackupsKey)) != "" { + if api.app.Cache().Has(core.CacheKeyActiveBackup) { return NewBadRequestError("Try again later - another backup/restore process has already been started", nil) } @@ -83,9 +79,11 @@ func (api *backupApi) create(c echo.Context) error { return form.Submit(func(next forms.InterceptorNextFunc[string]) forms.InterceptorNextFunc[string] { return func(name string) error { if err := next(name); err != nil { - return NewBadRequestError("Failed to create backup", err) + return NewBadRequestError("Failed to create backup.", err) } + // we don't retrieve the generated backup file because it may not be + // available yet due to the eventually consistent nature of some S3 providers return c.NoContent(http.StatusNoContent) } }) @@ -107,15 +105,15 @@ func (api *backupApi) download(c echo.Context) error { fsys, err := api.app.NewBackupsFilesystem() if err != nil { - return NewBadRequestError("Failed to load backups filesystem", err) + return NewBadRequestError("Failed to load backups filesystem.", err) } defer fsys.Close() fsys.SetContext(ctx) - name := c.PathParam("name") + key := c.PathParam("key") - br, err := fsys.GetFile(name) + br, err := fsys.GetFile(key) if err != nil { return NewBadRequestError("Failed to retrieve backup item. Raw error: \n"+err.Error(), nil) } @@ -124,42 +122,43 @@ func (api *backupApi) download(c echo.Context) error { return fsys.Serve( c.Response(), c.Request(), - name, - filepath.Base(name), // without the path prefix (if any) + key, + filepath.Base(key), // without the path prefix (if any) ) } func (api *backupApi) restore(c echo.Context) error { - if cast.ToString(api.app.Cache().Get(core.CacheActiveBackupsKey)) != "" { - return NewBadRequestError("Try again later - another backup/restore process has already been started", nil) + if api.app.Cache().Has(core.CacheKeyActiveBackup) { + return NewBadRequestError("Try again later - another backup/restore process has already been started.", nil) } - name := c.PathParam("name") + // @todo remove the extra unescape after https://github.com/labstack/echo/issues/2447 + key, _ := url.PathUnescape(c.PathParam("key")) existsCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() fsys, err := api.app.NewBackupsFilesystem() if err != nil { - return NewBadRequestError("Failed to load backups filesystem", err) + return NewBadRequestError("Failed to load backups filesystem.", err) } defer fsys.Close() fsys.SetContext(existsCtx) - if exists, err := fsys.Exists(name); !exists { - return NewNotFoundError("Missing or invalid backup file", err) + if exists, err := fsys.Exists(key); !exists { + return NewBadRequestError("Missing or invalid backup file.", err) } go func() { - // wait max 10 minutes - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) + // wait max 15 minutes to fetch the backup + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute) defer cancel() // give some optimistic time to write the response time.Sleep(1 * time.Second) - if err := api.app.RestoreBackup(ctx, name); err != nil && api.app.IsDebug() { + if err := api.app.RestoreBackup(ctx, key); err != nil && api.app.IsDebug() { log.Println(err) } }() @@ -173,15 +172,19 @@ func (api *backupApi) delete(c echo.Context) error { fsys, err := api.app.NewBackupsFilesystem() if err != nil { - return NewBadRequestError("Failed to load backups filesystem", err) + return NewBadRequestError("Failed to load backups filesystem.", err) } defer fsys.Close() fsys.SetContext(ctx) - name := c.PathParam("name") + key := c.PathParam("key") + + if key != "" && cast.ToString(api.app.Cache().Get(core.CacheKeyActiveBackup)) == key { + return NewBadRequestError("The backup is currently being used and cannot be deleted.", nil) + } - if err := fsys.Delete(name); err != nil { + if err := fsys.Delete(key); err != nil { return NewBadRequestError("Invalid or already deleted backup file. Raw error: \n"+err.Error(), nil) } diff --git a/apis/backup_test.go b/apis/backup_test.go new file mode 100644 index 000000000..926547ab1 --- /dev/null +++ b/apis/backup_test.go @@ -0,0 +1,571 @@ +package apis_test + +import ( + "context" + "net/http" + "strings" + "testing" + + "github.com/labstack/echo/v5" + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tests" + "gocloud.dev/blob" +) + +func TestBackupsList(t *testing.T) { + scenarios := []tests.ApiScenario{ + { + Name: "unauthorized", + Method: http.MethodGet, + Url: "/api/backups", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as auth record", + Method: http.MethodGet, + Url: "/api/backups", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (empty list)", + Method: http.MethodGet, + Url: "/api/backups", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `[]`, + }, + }, + { + Name: "authorized as admin", + Method: http.MethodGet, + Url: "/api/backups", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `"test1.zip"`, + `"test2.zip"`, + `"test3.zip"`, + }, + }, + } + + for _, scenario := range scenarios { + scenario.Test(t) + } +} + +func TestBackupsCreate(t *testing.T) { + scenarios := []tests.ApiScenario{ + { + Name: "unauthorized", + Method: http.MethodPost, + Url: "/api/backups", + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + ensureNoBackups(t, app) + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as auth record", + Method: http.MethodPost, + Url: "/api/backups", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + ensureNoBackups(t, app) + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (pending backup)", + Method: http.MethodPost, + Url: "/api/backups", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + app.Cache().Set(core.CacheKeyActiveBackup, "") + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + ensureNoBackups(t, app) + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (autogenerated name)", + Method: http.MethodPost, + Url: "/api/backups", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + files, err := getBackupFiles(app) + if err != nil { + t.Fatal(err) + } + + if total := len(files); total != 1 { + t.Fatalf("Expected 1 backup file, got %d", total) + } + + expected := "pb_backup_" + if !strings.HasPrefix(files[0].Key, expected) { + t.Fatalf("Expected backup file with prefix %q, got %q", expected, files[0].Key) + } + }, + ExpectedStatus: 204, + }, + { + Name: "authorized as admin (invalid name)", + Method: http.MethodPost, + Url: "/api/backups", + Body: strings.NewReader(`{"name":"!test.zip"}`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + ensureNoBackups(t, app) + }, + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{`, + `"name":{"code":"validation_match_invalid"`, + }, + }, + { + Name: "authorized as admin (valid name)", + Method: http.MethodPost, + Url: "/api/backups", + Body: strings.NewReader(`{"name":"test.zip"}`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + files, err := getBackupFiles(app) + if err != nil { + t.Fatal(err) + } + + if total := len(files); total != 1 { + t.Fatalf("Expected 1 backup file, got %d", total) + } + + expected := "test.zip" + if files[0].Key != expected { + t.Fatalf("Expected backup file %q, got %q", expected, files[0].Key) + } + }, + ExpectedStatus: 204, + }, + } + + for _, scenario := range scenarios { + scenario.Test(t) + } +} + +func TestBackupsDownload(t *testing.T) { + scenarios := []tests.ApiScenario{ + { + Name: "unauthorized", + Method: http.MethodGet, + Url: "/api/backups/test1.zip", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with record auth header", + Method: http.MethodGet, + Url: "/api/backups/test1.zip", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with admin auth header", + Method: http.MethodGet, + Url: "/api/backups/test1.zip", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with empty or invalid token", + Method: http.MethodGet, + Url: "/api/backups/test1.zip?token=", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with valid record auth token", + Method: http.MethodGet, + Url: "/api/backups/test1.zip?token=eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with valid record file token", + Method: http.MethodGet, + Url: "/api/backups/test1.zip?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsImV4cCI6MTg5MzQ1MjQ2MSwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwidHlwZSI6ImF1dGhSZWNvcmQifQ.0d_0EO6kfn9ijZIQWAqgRi8Bo1z7MKcg1LQpXhQsEPk", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with valid admin auth token", + Method: http.MethodGet, + Url: "/api/backups/test1.zip?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with expired admin file token", + Method: http.MethodGet, + Url: "/api/backups/test1.zip?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsImV4cCI6MTY0MDk5MTY2MSwidHlwZSI6ImFkbWluIn0.g7Q_3UX6H--JWJ7yt1Hoe-1ugTX1KpbKzdt0zjGSe-E", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 403, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with valid admin file token but missing backup name", + Method: http.MethodGet, + Url: "/api/backups/mizzing?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsImV4cCI6MTg5MzQ1MjQ2MSwidHlwZSI6ImFkbWluIn0.LyAMpSfaHVsuUqIlqqEbhDQSdFzoPz_EIDcb2VJMBsU", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "with valid admin file token", + Method: http.MethodGet, + Url: "/api/backups/test1.zip?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsImV4cCI6MTg5MzQ1MjQ2MSwidHlwZSI6ImFkbWluIn0.LyAMpSfaHVsuUqIlqqEbhDQSdFzoPz_EIDcb2VJMBsU", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `storage/`, + `data.db`, + `logs.db`, + }, + }, + } + + for _, scenario := range scenarios { + scenario.Test(t) + } +} + +func TestBackupsDelete(t *testing.T) { + noTestBackupFilesChanges := func(t *testing.T, app *tests.TestApp) { + files, err := getBackupFiles(app) + if err != nil { + t.Fatal(err) + } + + expected := 3 + if total := len(files); total != expected { + t.Fatalf("Expected %d backup(s), got %d", expected, total) + } + } + + scenarios := []tests.ApiScenario{ + { + Name: "unauthorized", + Method: http.MethodDelete, + Url: "/api/backups/test1.zip", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + noTestBackupFilesChanges(t, app) + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as auth record", + Method: http.MethodDelete, + Url: "/api/backups/test1.zip", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + noTestBackupFilesChanges(t, app) + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (missing file)", + Method: http.MethodDelete, + Url: "/api/backups/missing.zip", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + noTestBackupFilesChanges(t, app) + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (existing file with matching active backup)", + Method: http.MethodDelete, + Url: "/api/backups/test1.zip", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + + // mock active backup with the same name to delete + app.Cache().Set(core.CacheKeyActiveBackup, "test1.zip") + + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + noTestBackupFilesChanges(t, app) + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (existing file and no matching active backup)", + Method: http.MethodDelete, + Url: "/api/backups/test1.zip", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + + // mock active backup with different name + app.Cache().Set(core.CacheKeyActiveBackup, "new.zip") + }, + AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + files, err := getBackupFiles(app) + if err != nil { + t.Fatal(err) + } + + if total := len(files); total != 2 { + t.Fatalf("Expected 2 backup files, got %d", total) + } + + deletedFile := "test1.zip" + + for _, f := range files { + if f.Key == deletedFile { + t.Fatalf("Expected backup %q to be deleted", deletedFile) + } + } + }, + ExpectedStatus: 204, + }, + } + + for _, scenario := range scenarios { + scenario.Test(t) + } +} + +func TestBackupsRestore(t *testing.T) { + scenarios := []tests.ApiScenario{ + { + Name: "unauthorized", + Method: http.MethodPost, + Url: "/api/backups/test1.zip/restore", + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as auth record", + Method: http.MethodPost, + Url: "/api/backups/test1.zip/restore", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 401, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (missing file)", + Method: http.MethodPost, + Url: "/api/backups/missing.zip/restore", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authorized as admin (active backup process)", + Method: http.MethodPost, + Url: "/api/backups/test1.zip/restore", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + BeforeTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { + if err := createTestBackups(app); err != nil { + t.Fatal(err) + } + + app.Cache().Set(core.CacheKeyActiveBackup, "") + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, + } + + for _, scenario := range scenarios { + scenario.Test(t) + } +} + +// ------------------------------------------------------------------- + +func createTestBackups(app core.App) error { + ctx := context.Background() + + if err := app.CreateBackup(ctx, "test1.zip"); err != nil { + return err + } + + if err := app.CreateBackup(ctx, "test2.zip"); err != nil { + return err + } + + if err := app.CreateBackup(ctx, "test3.zip"); err != nil { + return err + } + + return nil +} + +func getBackupFiles(app core.App) ([]*blob.ListObject, error) { + fsys, err := app.NewBackupsFilesystem() + if err != nil { + return nil, err + } + defer fsys.Close() + + return fsys.List("") +} + +func ensureNoBackups(t *testing.T, app *tests.TestApp) { + files, err := getBackupFiles(app) + if err != nil { + t.Fatal(err) + } + + if total := len(files); total != 0 { + t.Fatalf("Expected 0 backup files, got %d", total) + } +} diff --git a/apis/base.go b/apis/base.go index 4ee644452..c2b9a2253 100644 --- a/apis/base.go +++ b/apis/base.go @@ -113,8 +113,8 @@ func InitApi(app core.App) (*echo.Echo, error) { bindFileApi(app, api) bindRealtimeApi(app, api) bindLogsApi(app, api) - bindBackupApi(app, api) bindHealthApi(app, api) + bindBackupApi(app, api) // trigger the custom BeforeServe hook for the created api router // allowing users to further adjust its options or register new routes diff --git a/apis/health.go b/apis/health.go index ab1df6fd9..fef22c397 100644 --- a/apis/health.go +++ b/apis/health.go @@ -19,12 +19,20 @@ type healthApi struct { app core.App } +type healthCheckResponse struct { + Code int `json:"code"` + Message string `json:"message"` + Data struct { + CanBackup bool `json:"canBackup"` + } `json:"data"` +} + // healthCheck returns a 200 OK response if the server is healthy. func (api *healthApi) healthCheck(c echo.Context) error { - payload := map[string]any{ - "code": http.StatusOK, - "message": "API is healthy.", - } + resp := new(healthCheckResponse) + resp.Code = http.StatusOK + resp.Message = "API is healthy." + resp.Data.CanBackup = !api.app.Cache().Has(core.CacheKeyActiveBackup) - return c.JSON(http.StatusOK, payload) + return c.JSON(http.StatusOK, resp) } diff --git a/apis/health_test.go b/apis/health_test.go index 1f747d949..dc1c491dc 100644 --- a/apis/health_test.go +++ b/apis/health_test.go @@ -16,6 +16,8 @@ func TestHealthAPI(t *testing.T) { ExpectedStatus: 200, ExpectedContent: []string{ `"code":200`, + `"data":{`, + `"canBackup":true`, }, }, } diff --git a/apis/settings.go b/apis/settings.go index a3cf60cd6..b6efbd12b 100644 --- a/apis/settings.go +++ b/apis/settings.go @@ -1,7 +1,6 @@ package apis import ( - "fmt" "log" "net/http" @@ -10,7 +9,6 @@ import ( "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/forms" "github.com/pocketbase/pocketbase/models/settings" - "github.com/pocketbase/pocketbase/tools/security" ) // bindSettingsApi registers the settings api endpoints. @@ -86,27 +84,22 @@ func (api *settingsApi) set(c echo.Context) error { } func (api *settingsApi) testS3(c echo.Context) error { - if !api.app.Settings().S3.Enabled { - return NewBadRequestError("S3 storage is not enabled.", nil) - } + form := forms.NewTestS3Filesystem(api.app) - fs, err := api.app.NewFilesystem() - if err != nil { - return NewBadRequestError("Failed to initialize the S3 storage. Raw error: \n"+err.Error(), nil) + // load request + if err := c.Bind(form); err != nil { + return NewBadRequestError("An error occurred while loading the submitted data.", err) } - defer fs.Close() - - testPrefix := "pb_settings_test_" + security.PseudorandomString(5) - testFileKey := testPrefix + "/test.txt" - // try to upload a test file - if err := fs.Upload([]byte("test"), testFileKey); err != nil { - return NewBadRequestError("Failed to upload a test file. Raw error: \n"+err.Error(), nil) - } + // send + if err := form.Submit(); err != nil { + // form error + if fErr, ok := err.(validation.Errors); ok { + return NewBadRequestError("Failed to test the S3 filesystem.", fErr) + } - // test prefix deletion (ensures that both bucket list and delete works) - if errs := fs.DeletePrefix(testPrefix); len(errs) > 0 { - return NewBadRequestError(fmt.Sprintf("Failed to delete a test file. Raw error: %v", errs), nil) + // mailer error + return NewBadRequestError("Failed to test the S3 filesystem. Raw error: \n"+err.Error(), nil) } return c.NoContent(http.StatusNoContent) diff --git a/apis/settings_test.go b/apis/settings_test.go index 22b74644c..314e48d99 100644 --- a/apis/settings_test.go +++ b/apis/settings_test.go @@ -47,6 +47,7 @@ func TestSettingsList(t *testing.T) { `"logs":{`, `"smtp":{`, `"s3":{`, + `"backups":{`, `"adminAuthToken":{`, `"adminPasswordResetToken":{`, `"adminFileToken":{`, @@ -125,6 +126,7 @@ func TestSettingsSet(t *testing.T) { `"logs":{`, `"smtp":{`, `"s3":{`, + `"backups":{`, `"adminAuthToken":{`, `"adminPasswordResetToken":{`, `"adminFileToken":{`, @@ -190,6 +192,7 @@ func TestSettingsSet(t *testing.T) { `"logs":{`, `"smtp":{`, `"s3":{`, + `"backups":{`, `"adminAuthToken":{`, `"adminPasswordResetToken":{`, `"adminFileToken":{`, @@ -255,14 +258,44 @@ func TestSettingsTestS3(t *testing.T) { ExpectedContent: []string{`"data":{}`}, }, { - Name: "authorized as admin (no s3)", + Name: "authorized as admin (missing body + no s3)", Method: http.MethodPost, Url: "/api/settings/test/s3", RequestHeaders: map[string]string{ "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", }, - ExpectedStatus: 400, - ExpectedContent: []string{`"data":{}`}, + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{`, + `"filesystem":{`, + }, + }, + { + Name: "authorized as admin (invalid filesystem)", + Method: http.MethodPost, + Url: "/api/settings/test/s3", + Body: strings.NewReader(`{"filesystem":"invalid"}`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{`, + `"filesystem":{`, + }, + }, + { + Name: "authorized as admin (valid filesystem and no s3)", + Method: http.MethodPost, + Url: "/api/settings/test/s3", + Body: strings.NewReader(`{"filesystem":"storage"}`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{}`, + }, }, } diff --git a/core/base.go b/core/base.go index 24b5db5f2..69d8c782c 100644 --- a/core/base.go +++ b/core/base.go @@ -1152,4 +1152,8 @@ func (app *BaseApp) registerDefaultHooks() { app.ResetBootstrapState() return nil }) + + if err := app.initAutobackupHooks(); err != nil && app.IsDebug() { + log.Println(err) + } } diff --git a/core/base_backup.go b/core/base_backup.go index 01b810124..2fb0b50a0 100644 --- a/core/base_backup.go +++ b/core/base_backup.go @@ -9,16 +9,18 @@ import ( "os" "path/filepath" "runtime" + "sort" "time" "github.com/pocketbase/pocketbase/daos" + "github.com/pocketbase/pocketbase/models" "github.com/pocketbase/pocketbase/tools/archive" + "github.com/pocketbase/pocketbase/tools/cron" "github.com/pocketbase/pocketbase/tools/filesystem" "github.com/pocketbase/pocketbase/tools/security" - "github.com/spf13/cast" ) -const CacheActiveBackupsKey string = "@activeBackup" +const CacheKeyActiveBackup string = "@activeBackup" // CreateBackup creates a new backup of the current app pb_data directory. // @@ -36,9 +38,8 @@ const CacheActiveBackupsKey string = "@activeBackup" // // Backups can be stored on S3 if it is configured in app.Settings().Backups. func (app *BaseApp) CreateBackup(ctx context.Context, name string) error { - canBackup := cast.ToString(app.Cache().Get(CacheActiveBackupsKey)) != "" - if canBackup { - return errors.New("try again later - another backup/restore process has already been started") + if app.Cache().Has(CacheKeyActiveBackup) { + return errors.New("try again later - another backup/restore operation has already been started") } // auto generate backup name @@ -49,8 +50,8 @@ func (app *BaseApp) CreateBackup(ctx context.Context, name string) error { ) } - app.Cache().Set(CacheActiveBackupsKey, name) - defer app.Cache().Remove(CacheActiveBackupsKey) + app.Cache().Set(CacheKeyActiveBackup, name) + defer app.Cache().Remove(CacheKeyActiveBackup) // Archive pb_data in a temp directory, exluding the "backups" dir itself (if exist). // @@ -121,19 +122,18 @@ func (app *BaseApp) CreateBackup(ctx context.Context, name string) error { // 6. Restart the app (on successfull app bootstap it will also remove the old pb_data). // // If a failure occure during the restore process the dir changes are reverted. -// It for whatever reason the revert is not possible, it panics. +// If for whatever reason the revert is not possible, it panics. func (app *BaseApp) RestoreBackup(ctx context.Context, name string) error { if runtime.GOOS == "windows" { return errors.New("restore is not supported on windows") } - canBackup := cast.ToString(app.Cache().Get(CacheActiveBackupsKey)) != "" - if canBackup { - return errors.New("try again later - another backup/restore process has already been started") + if app.Cache().Has(CacheKeyActiveBackup) { + return errors.New("try again later - another backup/restore operation has already been started") } - app.Cache().Set(CacheActiveBackupsKey, name) - defer app.Cache().Remove(CacheActiveBackupsKey) + app.Cache().Set(CacheKeyActiveBackup, name) + defer app.Cache().Remove(CacheKeyActiveBackup) fsys, err := app.NewBackupsFilesystem() if err != nil { @@ -227,7 +227,7 @@ func (app *BaseApp) RestoreBackup(ctx context.Context, name string) error { // restore the local pb_data/backups dir (if any) if _, err := os.Stat(oldLocalBackupsDir); err == nil { if err := os.Rename(oldLocalBackupsDir, newLocalBackupsDir); err != nil { - if err := revertDataDirChanges(true); err != nil && app.IsDebug() { + if err := revertDataDirChanges(false); err != nil && app.IsDebug() { log.Println(err) } @@ -237,7 +237,7 @@ func (app *BaseApp) RestoreBackup(ctx context.Context, name string) error { // restart the app if err := app.Restart(); err != nil { - if err := revertDataDirChanges(false); err != nil { + if err := revertDataDirChanges(true); err != nil { panic(err) } @@ -246,3 +246,106 @@ func (app *BaseApp) RestoreBackup(ctx context.Context, name string) error { return nil } + +// initAutobackupHooks registers the autobackup app serve hooks. +// @todo add tests +func (app *BaseApp) initAutobackupHooks() error { + c := cron.New() + + loadJob := func() { + c.Stop() + + rawSchedule := app.Settings().Backups.Cron + if rawSchedule == "" || !app.IsBootstrapped() { + return + } + + c.Add("@autobackup", rawSchedule, func() { + autoPrefix := "@auto_pb_backup_" + + name := fmt.Sprintf( + "%s%s.zip", + autoPrefix, + time.Now().UTC().Format("20060102150405"), + ) + + if err := app.CreateBackup(context.Background(), name); err != nil && app.IsDebug() { + // @todo replace after logs generalization + log.Println(err) + } + + maxKeep := app.Settings().Backups.CronMaxKeep + + if maxKeep == 0 { + return // no explicit limit + } + + fsys, err := app.NewBackupsFilesystem() + if err != nil && app.IsDebug() { + // @todo replace after logs generalization + log.Println(err) + return + } + defer fsys.Close() + + files, err := fsys.List(autoPrefix) + if err != nil && app.IsDebug() { + // @todo replace after logs generalization + log.Println(err) + return + } + + if maxKeep >= len(files) { + return // nothing to remove + } + + // sort desc + sort.Slice(files, func(i, j int) bool { + return files[i].ModTime.After(files[j].ModTime) + }) + + // keep only the most recent n auto backup files + toRemove := files[maxKeep:] + + for _, f := range toRemove { + if err := fsys.Delete(f.Key); err != nil && app.IsDebug() { + // @todo replace after logs generalization + log.Println(err) + } + } + }) + + // restart the ticker + c.Start() + } + + // load on app serve + app.OnBeforeServe().Add(func(e *ServeEvent) error { + loadJob() + return nil + }) + + // stop the ticker on app termination + app.OnTerminate().Add(func(e *TerminateEvent) error { + c.Stop() + return nil + }) + + // reload on app settings change + app.OnModelAfterUpdate((&models.Param{}).TableName()).Add(func(e *ModelEvent) error { + if !c.HasStarted() { + return nil // no need to reload as it hasn't been started yet + } + + p := e.Model.(*models.Param) + if p == nil || p.Key != models.ParamAppSettings { + return nil + } + + loadJob() + + return nil + }) + + return nil +} diff --git a/core/base_backup_test.go b/core/base_backup_test.go new file mode 100644 index 000000000..073d652f7 --- /dev/null +++ b/core/base_backup_test.go @@ -0,0 +1,153 @@ +package core_test + +import ( + "context" + "fmt" + "io/fs" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tests" + "github.com/pocketbase/pocketbase/tools/archive" + "github.com/pocketbase/pocketbase/tools/list" +) + +func TestCreateBackup(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + // test pending error + app.Cache().Set(core.CacheKeyActiveBackup, "") + if err := app.CreateBackup(context.Background(), "test.zip"); err == nil { + t.Fatal("Expected pending error, got nil") + } + app.Cache().Remove(core.CacheKeyActiveBackup) + + // create with auto generated name + if err := app.CreateBackup(context.Background(), ""); err != nil { + t.Fatal("Failed to create a backup with autogenerated name") + } + + // create with custom name + if err := app.CreateBackup(context.Background(), "custom"); err != nil { + t.Fatal("Failed to create a backup with custom name") + } + + // create new with the same name (aka. replace) + if err := app.CreateBackup(context.Background(), "custom"); err != nil { + t.Fatal("Failed to create and replace a backup with the same name") + } + + backupsDir := filepath.Join(app.DataDir(), core.LocalBackupsDirName) + + entries, err := os.ReadDir(backupsDir) + if err != nil { + t.Fatal(err) + } + + expectedFiles := []string{ + `^pb_backup_\w+\.zip$`, + `^pb_backup_\w+\.zip.attrs$`, + "custom", + "custom.attrs", + } + + if len(entries) != len(expectedFiles) { + names := getEntryNames(entries) + t.Fatalf("Expected %d backup files, got %d: \n%v", len(expectedFiles), len(entries), names) + } + + for i, entry := range entries { + if !list.ExistInSliceWithRegex(entry.Name(), expectedFiles) { + t.Fatalf("[%d] Missing backup file %q", i, entry.Name()) + } + + if strings.HasSuffix(entry.Name(), ".attrs") { + continue + } + + path := filepath.Join(backupsDir, entry.Name()) + + if err := verifyBackupContent(app, path); err != nil { + t.Fatalf("[%d] Failed to verify backup content: %v", i, err) + } + } +} + +func TestRestoreBackup(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + // create test backup + if err := app.CreateBackup(context.Background(), "test"); err != nil { + t.Fatal("Failed to create test backup") + } + + // test pending error + app.Cache().Set(core.CacheKeyActiveBackup, "") + if err := app.RestoreBackup(context.Background(), "test"); err == nil { + t.Fatal("Expected pending error, got nil") + } + app.Cache().Remove(core.CacheKeyActiveBackup) + + // missing backup + if err := app.RestoreBackup(context.Background(), "missing"); err == nil { + t.Fatal("Expected missing error, got nil") + } +} + +// ------------------------------------------------------------------- + +func verifyBackupContent(app core.App, path string) error { + dir, err := os.MkdirTemp("", "backup_test") + if err != nil { + return err + } + defer os.RemoveAll(dir) + + if err := archive.Extract(path, dir); err != nil { + return err + } + + expectedRootEntries := []string{ + "storage", + "data.db", + "data.db-shm", + "data.db-wal", + "logs.db", + "logs.db-shm", + "logs.db-wal", + ".gitignore", + } + + entries, err := os.ReadDir(dir) + if err != nil { + return err + } + + if len(entries) != len(expectedRootEntries) { + names := getEntryNames(entries) + return fmt.Errorf("Expected %d backup files, got %d: \n%v", len(expectedRootEntries), len(entries), names) + } + + for _, entry := range entries { + if !list.ExistInSliceWithRegex(entry.Name(), expectedRootEntries) { + return fmt.Errorf("Didn't expect %q entry", entry.Name()) + } + } + + return nil +} + +func getEntryNames(entries []fs.DirEntry) []string { + names := make([]string, len(entries)) + + for i, entry := range entries { + names[i] = entry.Name() + } + + return names +} diff --git a/forms/backup_create.go b/forms/backup_create.go index 0cabaabb4..d77370275 100644 --- a/forms/backup_create.go +++ b/forms/backup_create.go @@ -45,6 +45,9 @@ func (form *BackupCreate) Validate() error { func (form *BackupCreate) checkUniqueName(value any) error { v, _ := value.(string) + if v == "" { + return nil // nothing to check + } fsys, err := form.app.NewBackupsFilesystem() if err != nil { diff --git a/forms/backup_create_test.go b/forms/backup_create_test.go new file mode 100644 index 000000000..c52f34170 --- /dev/null +++ b/forms/backup_create_test.go @@ -0,0 +1,102 @@ +package forms_test + +import ( + "strings" + "testing" + + validation "github.com/go-ozzo/ozzo-validation/v4" + "github.com/pocketbase/pocketbase/forms" + "github.com/pocketbase/pocketbase/tests" +) + +func TestBackupCreateValidateAndSubmit(t *testing.T) { + scenarios := []struct { + name string + backupName string + expectedErrors []string + }{ + { + "invalid length", + strings.Repeat("a", 97) + ".zip", + []string{"name"}, + }, + { + "valid length + invalid format", + strings.Repeat("a", 96), + []string{"name"}, + }, + { + "valid length + valid format", + strings.Repeat("a", 96) + ".zip", + []string{}, + }, + { + "auto generated name", + "", + []string{}, + }, + } + + for _, s := range scenarios { + func() { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + fsys, err := app.NewBackupsFilesystem() + if err != nil { + t.Fatal(err) + } + defer fsys.Close() + + form := forms.NewBackupCreate(app) + form.Name = s.backupName + + result := form.Submit() + + // parse errors + errs, ok := result.(validation.Errors) + if !ok && result != nil { + t.Errorf("[%s] Failed to parse errors %v", s.name, result) + return + } + + // check errors + if len(errs) > len(s.expectedErrors) { + t.Errorf("[%s] Expected error keys %v, got %v", s.name, s.expectedErrors, errs) + } + for _, k := range s.expectedErrors { + if _, ok := errs[k]; !ok { + t.Errorf("[%s] Missing expected error key %q in %v", s.name, k, errs) + } + } + + // retrieve all created backup files + files, err := fsys.List("") + if err != nil { + t.Errorf("[%s] Failed to retrieve backup files", s.name) + return + } + + if result != nil { + if total := len(files); total != 0 { + t.Errorf("[%s] Didn't expected backup files, found %d", s.name, total) + } + return + } + + if total := len(files); total != 1 { + t.Errorf("[%s] Expected 1 backup file, got %d", s.name, total) + return + } + + if s.backupName == "" { + prefix := "pb_backup_" + if !strings.HasPrefix(files[0].Key, prefix) { + t.Errorf("[%s] Expected the backup file, to have prefix %q: %q", s.name, prefix, files[0].Key) + } + } else if s.backupName != files[0].Key { + t.Errorf("[%s] Expected backup file %q, got %q", s.name, s.backupName, files[0].Key) + } + }() + } +} diff --git a/forms/test_email_send_test.go b/forms/test_email_send_test.go index 604060988..5d0b7bc2b 100644 --- a/forms/test_email_send_test.go +++ b/forms/test_email_send_test.go @@ -24,56 +24,58 @@ func TestEmailSendValidateAndSubmit(t *testing.T) { } for i, s := range scenarios { - app, _ := tests.NewTestApp() - defer app.Cleanup() + func() { + app, _ := tests.NewTestApp() + defer app.Cleanup() - form := forms.NewTestEmailSend(app) - form.Email = s.email - form.Template = s.template + form := forms.NewTestEmailSend(app) + form.Email = s.email + form.Template = s.template - result := form.Submit() + result := form.Submit() - // parse errors - errs, ok := result.(validation.Errors) - if !ok && result != nil { - t.Errorf("(%d) Failed to parse errors %v", i, result) - continue - } + // parse errors + errs, ok := result.(validation.Errors) + if !ok && result != nil { + t.Errorf("(%d) Failed to parse errors %v", i, result) + return + } - // check errors - if len(errs) > len(s.expectedErrors) { - t.Errorf("(%d) Expected error keys %v, got %v", i, s.expectedErrors, errs) - continue - } - for _, k := range s.expectedErrors { - if _, ok := errs[k]; !ok { - t.Errorf("(%d) Missing expected error key %q in %v", i, k, errs) - continue + // check errors + if len(errs) > len(s.expectedErrors) { + t.Errorf("(%d) Expected error keys %v, got %v", i, s.expectedErrors, errs) + return + } + for _, k := range s.expectedErrors { + if _, ok := errs[k]; !ok { + t.Errorf("(%d) Missing expected error key %q in %v", i, k, errs) + return + } } - } - expectedEmails := 1 - if len(s.expectedErrors) > 0 { - expectedEmails = 0 - } + expectedEmails := 1 + if len(s.expectedErrors) > 0 { + expectedEmails = 0 + } - if app.TestMailer.TotalSend != expectedEmails { - t.Errorf("(%d) Expected %d email(s) to be sent, got %d", i, expectedEmails, app.TestMailer.TotalSend) - } + if app.TestMailer.TotalSend != expectedEmails { + t.Errorf("(%d) Expected %d email(s) to be sent, got %d", i, expectedEmails, app.TestMailer.TotalSend) + } - if len(s.expectedErrors) > 0 { - continue - } + if len(s.expectedErrors) > 0 { + return + } - expectedContent := "Verify" - if s.template == "password-reset" { - expectedContent = "Reset password" - } else if s.template == "email-change" { - expectedContent = "Confirm new email" - } + expectedContent := "Verify" + if s.template == "password-reset" { + expectedContent = "Reset password" + } else if s.template == "email-change" { + expectedContent = "Confirm new email" + } - if !strings.Contains(app.TestMailer.LastMessage.HTML, expectedContent) { - t.Errorf("(%d) Expected the email to contains %s, got \n%v", i, expectedContent, app.TestMailer.LastMessage.HTML) - } + if !strings.Contains(app.TestMailer.LastMessage.HTML, expectedContent) { + t.Errorf("(%d) Expected the email to contains %s, got \n%v", i, expectedContent, app.TestMailer.LastMessage.HTML) + } + }() } } diff --git a/forms/test_s3_filesystem.go b/forms/test_s3_filesystem.go new file mode 100644 index 000000000..c2e26e59b --- /dev/null +++ b/forms/test_s3_filesystem.go @@ -0,0 +1,88 @@ +package forms + +import ( + "errors" + "fmt" + + validation "github.com/go-ozzo/ozzo-validation/v4" + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/models/settings" + "github.com/pocketbase/pocketbase/tools/filesystem" + "github.com/pocketbase/pocketbase/tools/security" +) + +const ( + s3FilesystemStorage = "storage" + s3FilesystemBackups = "backups" +) + +// TestS3Filesystem defines a S3 filesystem connection test. +type TestS3Filesystem struct { + app core.App + + // The name of the filesystem - storage or backups + Filesystem string `form:"filesystem" json:"filesystem"` +} + +// NewTestS3Filesystem creates and initializes new TestS3Filesystem form. +func NewTestS3Filesystem(app core.App) *TestS3Filesystem { + return &TestS3Filesystem{app: app} +} + +// Validate makes the form validatable by implementing [validation.Validatable] interface. +func (form *TestS3Filesystem) Validate() error { + return validation.ValidateStruct(form, + validation.Field( + &form.Filesystem, + validation.Required, + validation.In(s3FilesystemStorage, s3FilesystemBackups), + ), + ) +} + +// Submit validates and performs a S3 filesystem connection test. +func (form *TestS3Filesystem) Submit() error { + if err := form.Validate(); err != nil { + return err + } + + var s3Config settings.S3Config + + if form.Filesystem == s3FilesystemBackups { + s3Config = form.app.Settings().Backups.S3 + } else { + s3Config = form.app.Settings().S3 + } + + if !s3Config.Enabled { + return errors.New("S3 storage filesystem is not enabled") + } + + fsys, err := filesystem.NewS3( + s3Config.Bucket, + s3Config.Region, + s3Config.Endpoint, + s3Config.AccessKey, + s3Config.Secret, + s3Config.ForcePathStyle, + ) + if err != nil { + return fmt.Errorf("failed to initialize the S3 filesystem: %w", err) + } + defer fsys.Close() + + testPrefix := "pb_settings_test_" + security.PseudorandomString(5) + testFileKey := testPrefix + "/test.txt" + + // try to upload a test file + if err := fsys.Upload([]byte("test"), testFileKey); err != nil { + return fmt.Errorf("failed to upload a test file: %w", err) + } + + // test prefix deletion (ensures that both bucket list and delete works) + if errs := fsys.DeletePrefix(testPrefix); len(errs) > 0 { + return fmt.Errorf("failed to delete a test file: %w", errs[0]) + } + + return nil +} diff --git a/forms/test_s3_filesystem_test.go b/forms/test_s3_filesystem_test.go new file mode 100644 index 000000000..79091db43 --- /dev/null +++ b/forms/test_s3_filesystem_test.go @@ -0,0 +1,103 @@ +package forms_test + +import ( + "testing" + + validation "github.com/go-ozzo/ozzo-validation/v4" + "github.com/pocketbase/pocketbase/forms" + "github.com/pocketbase/pocketbase/tests" +) + +func TestS3FilesystemValidate(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + scenarios := []struct { + name string + filesystem string + expectedErrors []string + }{ + { + "empty filesystem", + "", + []string{"filesystem"}, + }, + { + "invalid filesystem", + "something", + []string{"filesystem"}, + }, + { + "backups filesystem", + "backups", + []string{}, + }, + { + "storage filesystem", + "storage", + []string{}, + }, + } + + for _, s := range scenarios { + form := forms.NewTestS3Filesystem(app) + form.Filesystem = s.filesystem + + result := form.Validate() + + // parse errors + errs, ok := result.(validation.Errors) + if !ok && result != nil { + t.Errorf("[%s] Failed to parse errors %v", s.name, result) + continue + } + + // check errors + if len(errs) > len(s.expectedErrors) { + t.Errorf("[%s] Expected error keys %v, got %v", s.name, s.expectedErrors, errs) + continue + } + for _, k := range s.expectedErrors { + if _, ok := errs[k]; !ok { + t.Errorf("[%s] Missing expected error key %q in %v", s.name, k, errs) + } + } + } +} + +func TestS3FilesystemSubmitFailure(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + // check if validate was called + { + form := forms.NewTestS3Filesystem(app) + form.Filesystem = "" + + result := form.Submit() + + if result == nil { + t.Fatal("Expected error, got nil") + } + + if _, ok := result.(validation.Errors); !ok { + t.Fatalf("Expected validation.Error, got %v", result) + } + } + + // check with valid storage and disabled s3 + { + form := forms.NewTestS3Filesystem(app) + form.Filesystem = "storage" + + result := form.Submit() + + if result == nil { + t.Fatal("Expected error, got nil") + } + + if _, ok := result.(validation.Error); ok { + t.Fatalf("Didn't expect validation.Error, got %v", result) + } + } +} diff --git a/models/backup_file_info.go b/models/backup_file_info.go new file mode 100644 index 000000000..794900f3a --- /dev/null +++ b/models/backup_file_info.go @@ -0,0 +1,9 @@ +package models + +import "github.com/pocketbase/pocketbase/tools/types" + +type BackupFileInfo struct { + Key string `json:"key"` + Size int64 `json:"size"` + Modified types.DateTime `json:"modified"` +} diff --git a/models/settings/settings.go b/models/settings/settings.go index c7bff499c..409824d7d 100644 --- a/models/settings/settings.go +++ b/models/settings/settings.go @@ -10,6 +10,7 @@ import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/pocketbase/pocketbase/tools/auth" + "github.com/pocketbase/pocketbase/tools/cron" "github.com/pocketbase/pocketbase/tools/mailer" "github.com/pocketbase/pocketbase/tools/rest" "github.com/pocketbase/pocketbase/tools/security" @@ -23,12 +24,10 @@ const SecretMask string = "******" type Settings struct { mux sync.RWMutex - Meta MetaConfig `form:"meta" json:"meta"` - Logs LogsConfig `form:"logs" json:"logs"` - Smtp SmtpConfig `form:"smtp" json:"smtp"` - S3 S3Config `form:"s3" json:"s3"` - - // @todo update tests + Meta MetaConfig `form:"meta" json:"meta"` + Logs LogsConfig `form:"logs" json:"logs"` + Smtp SmtpConfig `form:"smtp" json:"smtp"` + S3 S3Config `form:"s3" json:"s3"` Backups BackupsConfig `form:"backups" json:"backups"` AdminAuthToken TokenConfig `form:"adminAuthToken" json:"adminAuthToken"` @@ -87,6 +86,9 @@ func New() *Settings { Password: "", Tls: false, }, + Backups: BackupsConfig{ + CronMaxKeep: 3, + }, AdminAuthToken: TokenConfig{ Secret: security.RandomString(50), Duration: 1209600, // 14 days @@ -194,6 +196,7 @@ func (s *Settings) Validate() error { validation.Field(&s.RecordFileToken), validation.Field(&s.Smtp), validation.Field(&s.S3), + validation.Field(&s.Backups), validation.Field(&s.GoogleAuth), validation.Field(&s.FacebookAuth), validation.Field(&s.GithubAuth), @@ -248,6 +251,7 @@ func (s *Settings) RedactClone() (*Settings, error) { sensitiveFields := []*string{ &clone.Smtp.Password, &clone.S3.Secret, + &clone.Backups.S3.Secret, &clone.AdminAuthToken.Secret, &clone.AdminPasswordResetToken.Secret, &clone.AdminFileToken.Secret, @@ -397,28 +401,46 @@ func (c S3Config) Validate() error { // ------------------------------------------------------------------- type BackupsConfig struct { - AutoInterval BackupInterval `form:"autoInterval" json:"autoInterval"` - AutoMaxRetention int `form:"autoMaxRetention" json:"autoMaxRetention"` - S3 S3Config `form:"s3" json:"s3"` + // Cron is a cron expression to schedule auto backups, eg. "* * * * *". + // + // Leave it empty to disable the auto backups functionality. + Cron string `form:"cron" json:"cron"` + + // CronMaxKeep is the the max number of cron generated backups to + // keep before removing older entries. + // + // This field works only when the cron config has valid cron expression. + CronMaxKeep int `form:"cronMaxKeep" json:"cronMaxKeep"` + + // S3 is an optional S3 storage config specifying where to store the app backups. + S3 S3Config `form:"s3" json:"s3"` } // Validate makes BackupsConfig validatable by implementing [validation.Validatable] interface. func (c BackupsConfig) Validate() error { return validation.ValidateStruct(&c, validation.Field(&c.S3), + validation.Field(&c.Cron, validation.By(checkCronExpression)), + validation.Field( + &c.CronMaxKeep, + validation.When(c.Cron != "", validation.Required), + validation.Min(1), + ), ) } -// @todo -type BackupInterval struct { - Day int -} +func checkCronExpression(value any) error { + v, _ := value.(string) + if v == "" { + return nil // nothing to check + } -// Validate makes BackupInterval validatable by implementing [validation.Validatable] interface. -func (c BackupInterval) Validate() error { - return validation.ValidateStruct(&c, - validation.Field(&c.Day), - ) + _, err := cron.NewSchedule(v) + if err != nil { + return validation.NewError("validation_invalid_cron", err.Error()) + } + + return nil } // ------------------------------------------------------------------- diff --git a/models/settings/settings_test.go b/models/settings/settings_test.go index 738f07fa2..1e2680171 100644 --- a/models/settings/settings_test.go +++ b/models/settings/settings_test.go @@ -127,6 +127,7 @@ func TestSettingsMerge(t *testing.T) { s2.Smtp.Enabled = true s2.S3.Enabled = true s2.S3.Endpoint = "test" + s2.Backups.Cron = "* * * * *" s2.AdminAuthToken.Duration = 1 s2.AdminPasswordResetToken.Duration = 2 s2.AdminFileToken.Duration = 2 @@ -231,6 +232,7 @@ func TestSettingsRedactClone(t *testing.T) { // secrets s1.Smtp.Password = testSecret s1.S3.Secret = testSecret + s1.Backups.S3.Secret = testSecret s1.AdminAuthToken.Secret = testSecret s1.AdminPasswordResetToken.Secret = testSecret s1.AdminFileToken.Secret = testSecret @@ -610,6 +612,74 @@ func TestMetaConfigValidate(t *testing.T) { } } +func TestBackupsConfigValidate(t *testing.T) { + scenarios := []struct { + name string + config settings.BackupsConfig + expectedErrors []string + }{ + { + "zero value", + settings.BackupsConfig{}, + []string{}, + }, + { + "invalid cron", + settings.BackupsConfig{ + Cron: "invalid", + CronMaxKeep: 0, + }, + []string{"cron", "cronMaxKeep"}, + }, + { + "invalid enabled S3", + settings.BackupsConfig{ + S3: settings.S3Config{ + Enabled: true, + }, + }, + []string{"s3"}, + }, + { + "valid data", + settings.BackupsConfig{ + S3: settings.S3Config{ + Enabled: true, + Endpoint: "example.com", + Bucket: "test", + Region: "test", + AccessKey: "test", + Secret: "test", + }, + Cron: "*/10 * * * *", + CronMaxKeep: 1, + }, + []string{}, + }, + } + + for _, s := range scenarios { + result := s.config.Validate() + + // parse errors + errs, ok := result.(validation.Errors) + if !ok && result != nil { + t.Errorf("[%s] Failed to parse errors %v", s.name, result) + continue + } + + // check errors + if len(errs) > len(s.expectedErrors) { + t.Errorf("[%s] Expected error keys %v, got %v", s.name, s.expectedErrors, errs) + } + for _, k := range s.expectedErrors { + if _, ok := errs[k]; !ok { + t.Errorf("[%s] Missing expected error key %q in %v", s.name, k, errs) + } + } + } +} + func TestEmailTemplateValidate(t *testing.T) { scenarios := []struct { emailTemplate settings.EmailTemplate diff --git a/tests/app.go b/tests/app.go index e140857f5..62fe61f16 100644 --- a/tests/app.go +++ b/tests/app.go @@ -44,6 +44,7 @@ func (t *TestApp) Cleanup() { } } +// NewMailClient initializes test app mail client. func (t *TestApp) NewMailClient() mailer.Mailer { t.mux.Lock() defer t.mux.Unlock() diff --git a/tools/cron/cron.go b/tools/cron/cron.go index 1fe009f95..ef8cb9ab1 100644 --- a/tools/cron/cron.go +++ b/tools/cron/cron.go @@ -150,6 +150,14 @@ func (c *Cron) Start() { }() } +// HasStarted checks whether the current Cron ticker has been started. +func (c *Cron) HasStarted() bool { + c.RLock() + defer c.RUnlock() + + return c.ticker != nil +} + // runDue runs all registered jobs that are scheduled for the provided time. func (c *Cron) runDue(t time.Time) { c.RLock() diff --git a/tools/cron/schedule_test.go b/tools/cron/schedule_test.go index 4653307f9..14536f85c 100644 --- a/tools/cron/schedule_test.go +++ b/tools/cron/schedule_test.go @@ -101,7 +101,7 @@ func TestNewSchedule(t *testing.T) { `{"minutes":{"1":{},"2":{},"40":{},"42":{},"44":{},"46":{},"48":{},"5":{},"50":{},"7":{}},"hours":{"0":{},"1":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"2":{},"20":{},"21":{},"22":{},"23":{},"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{}},"days":{"1":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"2":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"3":{},"30":{},"31":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{}},"months":{"1":{},"10":{},"11":{},"12":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{}},"daysOfWeek":{"0":{},"1":{},"2":{},"3":{},"4":{},"5":{},"6":{}}}`, }, - // hour hour segment + // hour segment { "* -1 * * *", true, @@ -182,7 +182,7 @@ func TestNewSchedule(t *testing.T) { `{"minutes":{"0":{},"1":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"2":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"3":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{},"37":{},"38":{},"39":{},"4":{},"40":{},"41":{},"42":{},"43":{},"44":{},"45":{},"46":{},"47":{},"48":{},"49":{},"5":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{},"6":{},"7":{},"8":{},"9":{}},"hours":{"0":{},"1":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"2":{},"20":{},"21":{},"22":{},"23":{},"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{}},"days":{"1":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"2":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"3":{},"30":{},"31":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{}},"months":{"1":{},"4":{},"5":{},"7":{},"9":{}},"daysOfWeek":{"0":{},"1":{},"2":{},"3":{},"4":{},"5":{},"6":{}}}`, }, - // day of week + // day of week segment { "* * * * -1", true, diff --git a/tools/filesystem/filesystem.go b/tools/filesystem/filesystem.go index d39b638b9..59601efaa 100644 --- a/tools/filesystem/filesystem.go +++ b/tools/filesystem/filesystem.go @@ -82,7 +82,6 @@ func NewLocal(dirPath string) (*System, error) { return &System{ctx: ctx, bucket: bucket}, nil } -// @todo add test // SetContext assigns the specified context to the current filesystem. func (s *System) SetContext(ctx context.Context) { s.ctx = ctx diff --git a/tools/hook/hook.go b/tools/hook/hook.go index d2e039eb3..b93934238 100644 --- a/tools/hook/hook.go +++ b/tools/hook/hook.go @@ -37,6 +37,8 @@ func (h *Hook[T]) Add(fn Handler[T]) { } // Reset removes all registered handlers. +// +// @todo for consistency with other Go methods consider renaming it to Clear. func (h *Hook[T]) Reset() { h.mux.Lock() defer h.mux.Unlock() diff --git a/ui/.env b/ui/.env index f00a211dd..03dfa05fe 100644 --- a/ui/.env +++ b/ui/.env @@ -9,4 +9,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs/" PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk" PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk" PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases" -PB_VERSION = "v0.15.3" +PB_VERSION = "v0.16.0-WIP" diff --git a/ui/dist/assets/AuthMethodsDocs-21c3715f.js b/ui/dist/assets/AuthMethodsDocs-9cb92810.js similarity index 73% rename from ui/dist/assets/AuthMethodsDocs-21c3715f.js rename to ui/dist/assets/AuthMethodsDocs-9cb92810.js index e7cff7a26..de127fd32 100644 --- a/ui/dist/assets/AuthMethodsDocs-21c3715f.js +++ b/ui/dist/assets/AuthMethodsDocs-9cb92810.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n,m as me,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-38223559.js";import{S as Be}from"./SdkTabs-9d46fa03.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=g(s),f=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&H(m,s),C&6&&Q(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&Q(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,X,q,P,D,j,W,M,K,R,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n,m as me,x as G,N as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as H,u as je,M as Ae}from"./index-077c413f.js";import{S as Be}from"./SdkTabs-9bbe3355.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=g(s),f=w(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=w(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Te(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,X,q,P,D,j,W,M,K,R,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,T,b=[],ee=new Map,te,O,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -14,7 +14,7 @@ import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n ... final result = await pb.collection('${(ne=a[0])==null?void 0:ne.name}').listAuthMethods(); - `}});let G=a[2];const oe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;ee[5].code;for(let e=0;ee[5].code;for(let e=0;eo(1,f=d.code);return a.$$set=d=>{"collection"in d&&o(0,m=d.collection)},o(3,s=Se.getApiExampleUrl($e.baseUrl)),o(2,i=[{code:200,body:` + `),P.$set(c),(!$||t&1)&&y!==(y=e[0].name+"")&&G(E,y),t&6&&(z=e[2],b=re(b,t,oe,1,e,z,ee,T,we,fe,null,de)),t&6&&(N=e[2],ve(),p=re(p,t,se,1,e,N,le,O,Ce,he,null,ue),Pe())},i(e){if(!$){L(P.$$.fragment,e);for(let t=0;to(1,f=d.code);return a.$$set=d=>{"collection"in d&&o(0,m=d.collection)},o(3,s=Se.getApiExampleUrl($e.baseUrl)),o(2,i=[{code:200,body:` { "usernamePassword": true, "emailPassword": true, @@ -61,4 +61,4 @@ import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n } ] } - `}]),[m,f,i,s,u]}class Ke extends ke{constructor(l){super(),be(this,l,Te,Oe,ge,{collection:0})}}export{Ke as default}; + `}]),[m,f,i,s,u]}class Ke extends ke{constructor(l){super(),be(this,l,Oe,Te,ge,{collection:0})}}export{Ke as default}; diff --git a/ui/dist/assets/AuthRefreshDocs-1c9e307a.js b/ui/dist/assets/AuthRefreshDocs-7e8df999.js similarity index 77% rename from ui/dist/assets/AuthRefreshDocs-1c9e307a.js rename to ui/dist/assets/AuthRefreshDocs-7e8df999.js index 1e6e5c78a..72dcce97f 100644 --- a/ui/dist/assets/AuthRefreshDocs-1c9e307a.js +++ b/ui/dist/assets/AuthRefreshDocs-7e8df999.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,T as Qe,C as He,p as We,r as x,u as Ge}from"./index-38223559.js";import{S as Xe}from"./SdkTabs-9d46fa03.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){d(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&u(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){d(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,P,q,S=[],Te=new Map,Ce,H,y=[],Pe=new Map,M;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as He,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as u,d as ie,T as Ie,C as Oe,p as We,r as x,u as Ge}from"./index-077c413f.js";import{S as Xe}from"./SdkTabs-9bbe3355.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){d(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&u(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){d(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,q,se,P,H,S=[],Te=new Map,Ce,O,y=[],Pe=new Map,M;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); @@ -27,7 +27,7 @@ import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as `}}),R=new Ve({props:{content:"?expand=relField1,relField2.subRelField"}});let z=r[2];const Re=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eReturns a new auth response (token and record data) for an already authenticated record.

This method is usually called by users on page/screen reload to ensure that the previously stored - data in pb.authStore is still valid and up-to-date.

`,v=p(),ae(g.$$.fragment),w=p(),A=a("h6"),A.textContent="API details",J=p(),$=a("div"),F=a("strong"),F.textContent="POST",ce=p(),L=a("div"),B=a("p"),de=k("/api/collections/"),K=a("strong"),I=k(N),ue=k("/auth-refresh"),pe=p(),V=a("p"),V.innerHTML="Requires record Authorization:TOKEN header",Q=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`Param + data in pb.authStore is still valid and up-to-date.

`,v=p(),ae(g.$$.fragment),w=p(),A=a("h6"),A.textContent="API details",J=p(),$=a("div"),F=a("strong"),F.textContent="POST",ce=p(),L=a("div"),B=a("p"),de=k("/api/collections/"),K=a("strong"),Q=k(N),ue=k("/auth-refresh"),pe=p(),V=a("p"),V.innerHTML="Requires record Authorization:TOKEN header",I=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`Param Type Description`,fe=p(),X=a("tbody"),C=a("tr"),Y=a("td"),Y.textContent="expand",he=p(),Z=a("td"),Z.innerHTML='String',be=p(),h=a("td"),me=k(`Auto expand record relations. Ex.: `),ae(R.$$.fragment),_e=k(` @@ -35,7 +35,7 @@ import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as The expanded relations will be appended to the record under the `),ee=a("code"),ee.textContent="expand",ge=k(" property (eg. "),te=a("code"),te.textContent='"expand": {"relField1": {...}, ...}',ye=k(`). `),Se=a("br"),$e=k(` - Only the relations to which the request user has permissions to `),oe=a("strong"),oe.textContent="view",we=k(" will be expanded."),le=p(),O=a("div"),O.textContent="Responses",se=p(),P=a("div"),q=a("div");for(let e=0;es(1,_=v.code);return r.$$set=v=>{"collection"in v&&s(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&s(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:He.dummyCollectionRecord(m)},null,2)},{code:401,body:` + `),g.$set(c),(!M||t&1)&&N!==(N=e[0].name+"")&&re(Q,N),t&6&&(z=e[2],S=He(S,t,Re,1,e,z,Te,H,xe,Le,null,Fe)),t&6&&(E=e[2],Je(),y=He(y,t,Me,1,e,E,Pe,O,Ke,Ne,null,Ee),Qe())},i(e){if(!M){U(g.$$.fragment,e),U(R.$$.fragment,e);for(let t=0;ts(1,_=v.code);return r.$$set=v=>{"collection"in v&&s(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&s(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Oe.dummyCollectionRecord(m)},null,2)},{code:401,body:` { "code": 401, "message": "The request requires valid record authorization token to be set.", @@ -79,4 +79,4 @@ import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as "message": "Missing auth record context.", "data": {} } - `}])},s(3,n=He.getApiExampleUrl(We.baseUrl)),[m,_,i,n,f]}class ot extends ze{constructor(l){super(),Ue(this,l,Ze,Ye,je,{collection:0})}}export{ot as default}; + `}])},s(3,n=Oe.getApiExampleUrl(We.baseUrl)),[m,_,i,n,f]}class ot extends ze{constructor(l){super(),Ue(this,l,Ze,Ye,je,{collection:0})}}export{ot as default}; diff --git a/ui/dist/assets/AuthWithOAuth2Docs-c632a81b.js b/ui/dist/assets/AuthWithOAuth2Docs-6ac303d9.js similarity index 91% rename from ui/dist/assets/AuthWithOAuth2Docs-c632a81b.js rename to ui/dist/assets/AuthWithOAuth2Docs-6ac303d9.js index 13c4c9fd1..419473701 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-c632a81b.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-6ac303d9.js @@ -1,4 +1,4 @@ -import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,T as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-38223559.js";import{S as Qe}from"./SdkTabs-9d46fa03.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:` +import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,P as Le,k as Ee,Q as Je,n as Ne,t as E,a as J,o as c,d as de,T as Qe,C as Re,p as ze,r as N,u as Ie}from"./index-077c413f.js";import{S as Ke}from"./SdkTabs-9bbe3355.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ie(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,Q,S,j,he,F,M,pe,z,V=i[0].name+"",I,be,K,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); @@ -48,7 +48,7 @@ import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as `}}),C=new He({props:{content:"?expand=relField1,relField2.subRelField"}});let L=i[2];const De=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthenticate with an OAuth2 provider and returns a new auth token and record data.

For more details please check the OAuth2 integration documentation - .

`,_=h(),re(v.$$.fragment),A=h(),D=s("h6"),D.textContent="API details",z=h(),S=s("div"),j=s("strong"),j.textContent="POST",he=h(),F=s("div"),M=s("p"),pe=g("/api/collections/"),I=s("strong"),K=g(V),be=g("/auth-with-oauth2"),Q=h(),P=s("div"),P.textContent="Body Parameters",G=h(),R=s("table"),R.innerHTML=`Param + .

`,_=h(),re(v.$$.fragment),A=h(),D=s("h6"),D.textContent="API details",Q=h(),S=s("div"),j=s("strong"),j.textContent="POST",he=h(),F=s("div"),M=s("p"),pe=g("/api/collections/"),z=s("strong"),I=g(V),be=g("/auth-with-oauth2"),K=h(),P=s("div"),P.textContent="Body Parameters",G=h(),R=s("table"),R.innerHTML=`Param Type Description
Required @@ -83,7 +83,7 @@ import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as The expanded relations will be appended to the record under the `),le=s("code"),le.textContent="expand",Oe=g(" property (eg. "),oe=s("code"),oe.textContent='"expand": {"relField1": {...}, ...}',Ae=g(`). `),Se=s("br"),ye=g(` - Only the relations to which the request user has permissions to `),se=s("strong"),se.textContent="view",$e=g(" will be expanded."),ne=h(),W=s("div"),W.textContent="Responses",ie=h(),T=s("div"),U=s("div");for(let e=0;eo(1,k=_.code);return i.$$set=_=>{"collection"in _&&o(0,m=_.collection)},i.$$.update=()=>{i.$$.dirty&1&&o(2,u=[{code:200,body:JSON.stringify({token:"JWT_AUTH_TOKEN",record:Re.dummyCollectionRecord(m),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png",accessToken:"...",refreshToken:"...",rawUser:{}}},null,2)},{code:400,body:` + `),v.$set(d),(!q||t&1)&&V!==(V=e[0].name+"")&&ue(I,V),t&6&&(L=e[2],O=Pe(O,t,De,1,e,L,Te,U,Le,Ue,null,We)),t&6&&(H=e[2],Ee(),w=Pe(w,t,Me,1,e,H,qe,B,Je,Be,null,xe),Ne())},i(e){if(!q){E(v.$$.fragment,e),E(C.$$.fragment,e);for(let t=0;to(1,k=_.code);return i.$$set=_=>{"collection"in _&&o(0,m=_.collection)},i.$$.update=()=>{i.$$.dirty&1&&o(2,u=[{code:200,body:JSON.stringify({token:"JWT_AUTH_TOKEN",record:Re.dummyCollectionRecord(m),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png",accessToken:"...",refreshToken:"...",rawUser:{}}},null,2)},{code:400,body:` { "code": 400, "message": "An error occurred while submitting the form.", @@ -141,4 +141,4 @@ import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as } } } - `}])},o(3,n=Re.getApiExampleUrl(Ie.baseUrl)),[m,k,u,n,b]}class et extends je{constructor(l){super(),Fe(this,l,Xe,Ge,Ve,{collection:0})}}export{et as default}; + `}])},o(3,n=Re.getApiExampleUrl(ze.baseUrl)),[m,k,u,n,b]}class et extends je{constructor(l){super(),Fe(this,l,Xe,Ge,Ve,{collection:0})}}export{et as default}; diff --git a/ui/dist/assets/AuthWithPasswordDocs-23b7bd4b.js b/ui/dist/assets/AuthWithPasswordDocs-fe5fd2fa.js similarity index 75% rename from ui/dist/assets/AuthWithPasswordDocs-23b7bd4b.js rename to ui/dist/assets/AuthWithPasswordDocs-fe5fd2fa.js index cef4061ca..49a22e64a 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-23b7bd4b.js +++ b/ui/dist/assets/AuthWithPasswordDocs-fe5fd2fa.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as Tt,x as At,N as ce,O as ye,k as ge,P as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Oe}from"./index-38223559.js";import{S as Te}from"./SdkTabs-9d46fa03.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Ae(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&At(S,i),C&24&<(l,"active",e[3]===e[8].code)},d(R){R&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),Tt(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,O,B,Ut,ot,A,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,K,T=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Ae}let q=le(n),$=q&&q(n);A=new Te({props:{js:` +import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Tt,f as h,g as r,h as o,m as At,x as Ot,N as ce,P as ye,k as ge,Q as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Te}from"./index-077c413f.js";import{S as Ae}from"./SdkTabs-9bbe3355.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Oe(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Te(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&Ot(S,i),C&24&<(l,"active",e[3]===e[8].code)},d(R){R&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Tt(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,T,B,Ut,ot,O,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,Q,A=[],xt=new Map,te,K,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Oe}let q=le(n),$=q&&q(n);O=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); @@ -36,9 +36,9 @@ import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as // "logout" the last authenticated account pb.authStore.clear(); - `}});let w=n[1]&&pe(),y=n[1]&&n[2]&&be(),g=n[2]&&me();H=new ke({props:{content:"?expand=relField1,relField2.subRelField"}});let x=n[4];const oe=t=>t[8].code;for(let t=0;tt[8].code;for(let t=0;tParam + `}});let w=n[1]&&pe(),y=n[1]&&n[2]&&be(),g=n[2]&&me();H=new ke({props:{content:"?expand=relField1,relField2.subRelField"}});let x=n[4];const oe=t=>t[8].code;for(let t=0;tt[8].code;for(let t=0;tParam Type Description`,Lt=u(),V=s("tbody"),D=s("tr"),ut=s("td"),ut.innerHTML=`
Required identity
`,Bt=u(),ft=s("td"),ft.innerHTML='String',Ht=u(),P=s("td"),Yt=f(`The @@ -49,12 +49,12 @@ import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as The auth record password.`,_t=u(),j=s("div"),j.textContent="Query parameters",kt=u(),E=s("table"),St=s("thead"),St.innerHTML=`Param Type Description`,Ft=u(),vt=s("tbody"),W=s("tr"),wt=s("td"),wt.textContent="expand",Nt=u(),yt=s("td"),yt.innerHTML='String',It=u(),k=s("td"),Vt=f(`Auto expand record relations. Ex.: - `),Ot(H.$$.fragment),jt=f(` - Supports up to 6-levels depth nested relations expansion. `),Jt=s("br"),Kt=f(` + `),Tt(H.$$.fragment),jt=f(` + Supports up to 6-levels depth nested relations expansion. `),Jt=s("br"),Qt=f(` The expanded relations will be appended to the record under the - `),gt=s("code"),gt.textContent="expand",Qt=f(" property (eg. "),Pt=s("code"),Pt.textContent='"expand": {"relField1": {...}, ...}',zt=f(`). + `),gt=s("code"),gt.textContent="expand",Kt=f(" property (eg. "),Pt=s("code"),Pt.textContent='"expand": {"relField1": {...}, ...}',zt=f(`). `),Gt=s("br"),Xt=f(` - Only the relations to which the request user has permissions to `),$t=s("strong"),$t.textContent="view",Zt=f(" will be expanded."),Rt=u(),J=s("div"),J.textContent="Responses",Ct=u(),L=s("div"),K=s("div");for(let t=0;tl(3,_=O.code);return n.$$set=O=>{"collection"in O&&l(0,d=O.collection)},n.$$.update=()=>{var O,B;n.$$.dirty&1&&l(2,S=(O=d==null?void 0:d.options)==null?void 0:O.allowEmailAuth),n.$$.dirty&1&&l(1,m=(B=d==null?void 0:d.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&l(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&l(4,R=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:de.dummyCollectionRecord(d)},null,2)},{code:400,body:` + `),O.$set(b),(!Y||a&1)&&Z!==(Z=t[0].name+"")&&Ot(it,Z),t[1]?w||(w=pe(),w.c(),w.m(P,pt)):w&&(w.d(1),w=null),t[1]&&t[2]?y||(y=be(),y.c(),y.m(P,bt)):y&&(y.d(1),y=null),t[2]?g||(g=me(),g.c(),g.m(P,mt)):g&&(g.d(1),g=null),a&24&&(x=t[4],A=ce(A,a,oe,1,t,x,xt,Q,ye,he,null,fe)),a&24&&(z=t[4],ge(),v=ce(v,a,ae,1,t,z,ee,K,Pe,_e,null,ue),$e())},i(t){if(!Y){tt(O.$$.fragment,t),tt(H.$$.fragment,t);for(let a=0;al(3,_=T.code);return n.$$set=T=>{"collection"in T&&l(0,d=T.collection)},n.$$.update=()=>{var T,B;n.$$.dirty&1&&l(2,S=(T=d==null?void 0:d.options)==null?void 0:T.allowEmailAuth),n.$$.dirty&1&&l(1,m=(B=d==null?void 0:d.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&l(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&l(4,R=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:de.dummyCollectionRecord(d)},null,2)},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/CodeEditor-761096ff.js b/ui/dist/assets/CodeEditor-761096ff.js new file mode 100644 index 000000000..19f7c4cc8 --- /dev/null +++ b/ui/dist/assets/CodeEditor-761096ff.js @@ -0,0 +1,14 @@ +import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,U as E,g as bt,y as Re,o as wt,I as kt,J as yt,K as xt,H as vt,C as Yt,L as Ut}from"./index-077c413f.js";import{P as Tt,N as qt,u as _t,D as Wt,v as xe,T as D,I as ve,w as re,x as l,y as Vt,L as se,z as ne,A as G,B as le,F as yO,G as oe,H as W,J as xO,K as vO,M as YO,E as Y,O as z,Q as Ct,R as Rt,U as UO,V as X,W as jt,X as Gt,a as V,h as zt,b as At,c as It,d as Et,e as Nt,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ft,k as Ht,j as Kt,l as ea,m as Oa,n as ta,o as aa,p as ia,q as je,C as N}from"./index-03b6b7de.js";class F{constructor(e,a,t,i,r,s,n,o,c,h=0,Q){this.p=e,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let i=e.parser.context;return new F(e,[],a,t,t,0,[],0,i?new Ge(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,i=e&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,a,t,i=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(e,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(e,a,t){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=e,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(e,a,t){e&65536?this.reduce(e):this.shift(e,a,t)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),i=e.bufferBase+a;for(;e&&i==e.bufferBase;)e=e.parent;return new F(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=e&65535,r=this.stack.length-t*3;if(r<0||a.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ge{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}var ze;(function(O){O[O.Insert=200]="Insert",O[O.Delete=190]="Delete",O[O.Reduce=100]="Reduce",O[O.MaxNext=4]="MaxNext",O[O.MaxInsertStackDepth=300]="MaxInsertStackDepth",O[O.DampenInsertStackDepth=120]="DampenInsertStackDepth",O[O.MinBigReduction=2e3]="MinBigReduction"})(ze||(ze={}));class ra{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class H{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new H(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new H(this.stack,this.pos,this.index)}}function j(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new e(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ae=new J;class sa{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ae,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,i=this.rangeIndex,r=this.pos+e;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ae,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>e&&(t+=this.input.read(Math.max(i.from,e),Math.min(i.to,a)))}return t}}class q{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;TO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}q.prototype.contextual=q.prototype.fallback=q.prototype.extend=!1;class Xe{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?j(e):e}token(e,a){let t=e.pos,i=0;for(;TO(this.data,e,a,0,this.data,this.precTable),!(e.token.value>-1);){if(this.elseToken==null)return;if(e.next<0)break;e.advance(),e.reset(e.pos,e.token),i++}i&&(e.reset(t,e.token),e.acceptToken(this.elseToken,i))}}Xe.prototype.contextual=q.prototype.fallback=q.prototype.extend=!1;class b{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function TO(O,e,a,t,i,r){let s=0,n=1<0){let d=O[u];if(o.allows(d)&&(e.token.value==-1||e.token.value==d||na(d,e.token.value,i,r))){e.acceptToken(d);break}}let h=e.next,Q=0,f=O[s+2];if(e.next<0&&f>Q&&O[c+f*3-3]==65535&&O[c+f*3-3]==65535){s=O[c+f*3-1];continue e}for(;Q>1,d=c+u+(u<<1),$=O[d],g=O[d+1]||65536;if(h<$)f=u;else if(h>=g)Q=u+1;else{s=O[d+2],e.advance();continue e}}break}}function Ie(O,e,a){for(let t=e,i;(i=O[t])!=65535;t++)if(i==a)return t-e;return-1}function na(O,e,a,t){let i=Ie(a,t,e);return i<0||Ie(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class la{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ne(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ne(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(r instanceof D){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[a]++,this.nextStart=s+r.length}}}class oa{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new J)}getActions(e){let a=0,t=null,{parser:i}=e.p,{tokenizers:r}=i,s=i.stateSlot(e.state,3),n=e.curContext?e.curContext.hash:0,o=0;for(let c=0;cQ.end+25&&(o=Math.max(Q.lookAhead,o)),Q.value!=0)){let f=a;if(Q.extended>-1&&(a=this.addActions(e,Q.extended,Q.end,a)),a=this.addActions(e,Q.value,Q.end,a),!h.extend&&(t=Q,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new J,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=e;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(e,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,e),t),e.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?e.extended=n>>1:e.value=n>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,a,t,i){for(let r=0;re.bufferLength*4?new la(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,e))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ua(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let s=0;s500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,h=c?e.curContext.hash:0;for(let Q=this.fragments.nodeAt(i);Q;){let f=this.parser.nodeSet.types[Q.type.id]==Q.type?r.getGoto(e.state,Q.type.id):-1;if(f>-1&&Q.length&&(!c||(Q.prop(xe.contextHash)||0)==h))return e.useNode(Q,f),Z&&console.log(s+this.stackID(e)+` (via reuse of ${r.getName(Q.type.id)})`),!0;if(!(Q instanceof D)||Q.children.length==0||Q.positions[0]>0)break;let u=Q.children[0];if(u instanceof D&&Q.positions[0]==0)Q=u;else break}}let n=r.stateSlot(e.state,4);if(n>0)return e.reduce(n),Z&&console.log(s+this.stackID(e)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let c=0;ci?a.push(d):t.push(d)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return De(e,a),!0}}runRecovery(e,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let Q=n.split(),f=h;for(let u=0;Q.forceReduce()&&u<10&&(Z&&console.log(f+this.stackID(Q)+" (via force-reduce)"),!this.advanceFully(Q,t));u++)Z&&(f=this.stackID(Q)+" -> ");for(let u of n.recoverByInsert(o))Z&&console.log(h+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,t);this.stream.end>n.pos?(c==n.pos&&(c++,o=0),n.recoverByDelete(o,c),Z&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),De(n,t)):(!i||i.scoreO;class qO{constructor(e){this.start=e.start,this.shift=e.shift||he,this.reduce=e.reduce||he,this.reuse=e.reuse||he,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class U extends Tt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;ne.topRules[n][1]),i=[];for(let n=0;n=0)r(h,o,n[c++]);else{let Q=n[c+-h];for(let f=-h;f>0;f--)r(n[c++],o,Q);c++}}}this.nodeSet=new qt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Wt;let s=j(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new q(s,n):n),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let i=new Qa(this,e,a,t);for(let r of this.wrappers)i=r(i,e,a,t);return i}getGoto(e,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let c=r+(s>>1);r0}validAction(e,a){if(a==this.stateSlot(e,4))return!0;for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=w(this.data,t+2);else return!1;if(a==w(this.data,t+1))return!0}}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=w(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(e){let a=Object.assign(Object.create(U.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(r=>r.from==t);return i?i.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=e.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=Je(s),s})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let r of e.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const ha=54,fa=1,pa=55,da=2,Sa=56,$a=3,Le=4,ga=5,K=6,_O=7,WO=8,VO=9,CO=10,Pa=11,ma=12,Xa=13,fe=57,Za=14,Me=58,RO=20,ba=22,jO=23,wa=24,Ze=26,GO=27,ka=28,ya=31,xa=34,va=36,Ya=37,Ua=0,Ta=1,qa={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fe={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Wa(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function zO(O){return O==9||O==10||O==13||O==32}let He=null,Ke=null,eO=0;function be(O,e){let a=O.pos+e;if(eO==a&&Ke==O)return He;let t=O.peek(e);for(;zO(t);)t=O.peek(++e);let i="";for(;Wa(t);)i+=String.fromCharCode(t),t=O.peek(++e);return Ke=O,eO=a,He=i?i.toLowerCase():t==Va||t==Ca?void 0:null}const AO=60,ee=62,Ye=47,Va=63,Ca=33,Ra=45;function OO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new OO(be(t,1)||"",O):O},reduce(O,e){return e==RO&&O?O.parent:O},reuse(O,e,a,t){let i=e.type.id;return i==K||i==va?new OO(be(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),za=new b((O,e)=>{if(O.next!=AO){O.next<0&&e.context&&O.acceptToken(fe);return}O.advance();let a=O.next==Ye;a&&O.advance();let t=be(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?Za:K);let i=e.context?e.context.name:null;if(a){if(t==i)return O.acceptToken(Pa);if(i&&_a[i])return O.acceptToken(fe,-2);if(e.dialectEnabled(Ua))return O.acceptToken(ma);for(let r=e.context;r;r=r.parent)if(r.name==t)return;O.acceptToken(Xa)}else{if(t=="script")return O.acceptToken(_O);if(t=="style")return O.acceptToken(WO);if(t=="textarea")return O.acceptToken(VO);if(qa.hasOwnProperty(t))return O.acceptToken(CO);i&&Fe[i]&&Fe[i][t]?O.acceptToken(fe,-1):O.acceptToken(K)}},{contextual:!0}),Aa=new b(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Me);break}if(O.next==Ra)e++;else if(O.next==ee&&e>=2){a>3&&O.acceptToken(Me,-2);break}else e=0;O.advance()}});function Ia(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const Ea=new b((O,e)=>{if(O.next==Ye&&O.peek(1)==ee){let a=e.dialectEnabled(Ta)||Ia(e.context);O.acceptToken(a?ga:Le,2)}else O.next==ee&&O.acceptToken(Le,1)});function Ue(O,e,a){let t=2+O.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(e);break}if(r==0&&i.next==AO||r==1&&i.next==Ye||r>=2&&rs?i.acceptToken(e,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(e,1);break}else r=s=0;i.advance()}})}const Na=Ue("script",ha,fa),Ba=Ue("style",pa,da),Da=Ue("textarea",Sa,$a),Ja=re({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=U.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ga,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Na,Ba,Da,Ea,za,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function IO(O,e){let a=Object.create(null);for(let t of O.getChildren(jO)){let i=t.getChild(wa),r=t.getChild(Ze)||t.getChild(GO);i&&(a[e.read(i.from,i.to)]=r?r.type.id==Ze?e.read(r.from+1,r.to-1):e.read(r.from,r.to):"")}return a}function tO(O,e){let a=O.getChild(ba);return a?e.read(a.from,a.to):" "}function pe(O,e,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=IO(O.node.parent.firstChild,e))))return{parser:i.parser};return null}function EO(O=[],e=[]){let a=[],t=[],i=[],r=[];for(let n of O)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=e.length?Object.create(null):null;for(let n of e)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let c=n.type.id;if(c==ka)return pe(n,o,a);if(c==ya)return pe(n,o,t);if(c==xa)return pe(n,o,i);if(c==RO&&r.length){let h=n.node,Q=h.firstChild,f=Q&&tO(Q,o),u;if(f){for(let d of r)if(d.tag==f&&(!d.attrs||d.attrs(u||(u=IO(h,o))))){let $=h.lastChild;return{parser:d.parser,overlay:[{from:Q.to,to:$.type.id==Ya?$.from:h.to}]}}}}if(s&&c==jO){let h=n.node,Q;if(Q=h.firstChild){let f=s[o.read(Q.from,Q.to)];if(f)for(let u of f){if(u.tagName&&u.tagName!=tO(h.parent,o))continue;let d=h.lastChild;if(d.type.id==Ze){let $=d.from+1,g=d.lastChild,x=d.to-(g&&g.isError?0:1);if(x>$)return{parser:u.parser,overlay:[{from:$,to:x}]}}else if(d.type.id==GO)return{parser:u.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}const Ma=94,aO=1,Fa=95,Ha=96,iO=2,NO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,ei=40,BO=95,Oi=91,L=45,ti=46,ai=35,ii=37;function Oe(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function ri(O){return O>=48&&O<=57}const si=new b((O,e)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=O;if(Oe(r)||r==L||r==BO||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,O.advance();else{a&&O.acceptToken(r==ei?Fa:t==2&&e.canShift(iO)?iO:Ha);break}}}),ni=new b(O=>{if(NO.includes(O.peek(-1))){let{next:e}=O;(Oe(e)||e==BO||e==ai||e==ti||e==Oi||e==Ka||e==L)&&O.acceptToken(Ma)}}),li=new b(O=>{if(!NO.includes(O.peek(-1))){let{next:e}=O;if(e==ii&&(O.advance(),O.acceptToken(aO)),Oe(e)){do O.advance();while(Oe(O.next));O.acceptToken(aO)}}}),oi=re({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},ui={__proto__:null,not:128,only:128,from:158,to:160},hi=U.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:O=>Qi[O]||-1},{term:56,get:O=>ci[O]||-1},{term:96,get:O=>ui[O]||-1}],tokenPrec:1123});let de=null;function Se(){if(!de&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));de=e.sort().map(t=>({type:"property",label:t}))}return de||[]}const rO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),sO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),fi=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,pi=/^-(-[\w-]*)?$/;function di(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const nO=new xO,Si=["Declaration"];function $i(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function DO(O,e,a){if(e.to-e.from>4096){let t=nO.get(e);if(t)return t;let i=[],r=new Set,s=e.cursor(ve.IncludeAnonymous);if(s.firstChild())do for(let n of DO(O,s.node,a))r.has(n.label)||(r.add(n.label),i.push(n));while(s.nextSibling());return nO.set(e,i),i}else{let t=[],i=new Set;return e.cursor().iterate(r=>{var s;if(a(r)&&r.matchContext(Si)&&((s=r.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let n=O.sliceString(r.from,r.to);i.has(n)||(i.add(n),t.push({label:n,type:"variable"}))}}),t}}const gi=O=>e=>{let{state:a,pos:t}=e,i=W(a).resolveInner(t,-1),r=i.type.isError&&i.from==i.to-1&&a.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(r||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Se(),validFor:y};if(i.name=="ValueName")return{from:i.from,options:sO,validFor:y};if(i.name=="PseudoClassName")return{from:i.from,options:rO,validFor:y};if(O(i)||(e.explicit||r)&&di(i,a.doc))return{from:O(i)||r?i.from:t,options:DO(a.doc,$i(i),O),validFor:pi};if(i.name=="TagName"){for(let{parent:o}=i;o;o=o.parent)if(o.name=="Block")return{from:i.from,options:Se(),validFor:y};return{from:i.from,options:fi,validFor:y}}if(!e.explicit)return null;let s=i.resolve(t),n=s.childBefore(t);return n&&n.name==":"&&s.name=="PseudoClassSelector"?{from:t,options:rO,validFor:y}:n&&n.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:t,options:sO,validFor:y}:s.name=="Block"||s.name=="Styles"?{from:t,options:Se(),validFor:y}:null},Pi=gi(O=>O.name=="VariableName"),te=se.define({name:"css",parser:hi.configure({props:[ne.add({Declaration:G()}),le.add({Block:yO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mi(){return new oe(te,te.data.of({autocomplete:Pi}))}const lO=302,oO=1,Xi=2,QO=303,Zi=305,bi=306,wi=3,ki=4,yi=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],JO=125,xi=59,cO=47,vi=42,Yi=43,Ui=45,Ti=new qO({start:!1,shift(O,e){return e==wi||e==ki||e==Zi?O:e==bi},strict:!1}),qi=new b((O,e)=>{let{next:a}=O;(a==JO||a==-1||e.context)&&e.canShift(QO)&&O.acceptToken(QO)},{contextual:!0,fallback:!0}),_i=new b((O,e)=>{let{next:a}=O,t;yi.indexOf(a)>-1||a==cO&&((t=O.peek(1))==cO||t==vi)||a!=JO&&a!=xi&&a!=-1&&!e.context&&e.canShift(lO)&&O.acceptToken(lO)},{contextual:!0}),Wi=new b((O,e)=>{let{next:a}=O;if((a==Yi||a==Ui)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(oO);O.acceptToken(t?oO:Xi)}},{contextual:!0}),Vi=re({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Ci={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Ri={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},ji={__proto__:null,"<":137},Gi=U.deserialize({version:14,states:"$6[O`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#Ei'#EiOOQO'#Ib'#IbO0}QSO'#GkO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#KO'#KOO8yQSO'#IOO9OQ(C[O'#IPOOQQ'#JP'#JPOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HnO>VQ(C]O'#HtO%QQUO'#HvO>bQ(C]O'#HxO>mQ(C]O'#HzO9OQ(C[O'#H|O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOOQO'#Jk'#JkOOQO'#I_'#I_OAxQWO'#E`OOQ(CW'#E_'#E_OBtQ(C`O'#E`OCOQWO'#ESOOQO'#Jj'#JjOCdQWO'#JkODqQWO'#ESOCOQWO'#E`PEOO?MpO'#C`POOO)CDn)CDnOOOO'#IU'#IUOEZOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEiO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEwO07`O,59uOOQ(CY,59u,59uOFVQUO'#IYOFjQSO'#JeOHlQbO'#JeO+sQUO'#JeOHsQSO,59{OIZQSO'#EiOIhQSO'#JsOIsQSO'#JrOIsQSO'#JrOI{QSO,5;VOJQQSO'#JqOOQ(CY,5:W,5:WOJXQUO,5:WOLYQ(CjO,5:bOLyQSO,5:jOMdQ(C[O'#JpOMkQSO'#JoO:vQSO'#JoONPQSO'#JoONXQSO,5;UON^QSO'#JoO!!fQbO'#JdOOQ(CY'#Cf'#CfO%QQUO'#EOO!#UQ`O,5:oOOQO'#Jl'#JlOOQO-E<`-E<`O9_QSO,5=VO!#lQSO,5=VO!#qQUO,5;SO!%tQ,UO'#EdO!'XQSO,5;SO!(qQ,UO'#DpO!(xQUO'#DuO!)SQWO,5;]O!)[QWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!)jQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!+mQSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!+uQ(C[O,5jOOQQ'#JX'#JXOOQQ,5>k,5>kOOQQ-ERQ(C[O'#JYO8tQSO'#JYO!>dQ(C[O,59WO!>oQWO,59WO!>wQ,UO,59WO9dQ,UO,59WO!?SQSO,5;SO!?[QSO'#HWO!?mQSO'#KSO%QQUO,5;wO!?uQWO,5;yO!?zQSO,5=qO!@PQSO,5=qO!@UQSO,5=qO9OQ(C[O,5=qO!@dQSO'#EkO!A^QWO'#ElOOQ(CW'#Jq'#JqO!AeQ(C[O'#KPO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!ApQWO,5=^O!AxQ,UO,5=_O!BTQSO,5=aO!BYQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!BbQSO'#HPO9dQ,UO'#HRO!BgQSO'#HROOQQ,5=g,5=gO!BlQSO'#HSO!BtQSO'#ClO!ByQSO,58|O!CTQSO,58|O!E]QUO,58|OOQQ,58|,58|O!EjQ(C[O,58|O%QQUO,58|O!EuQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!FVQSO,5=sO`QUO,5=yO`QUO,5={O!F[QSO,5=}O`QUO,5>PO!FaQSO,5>SO!FfQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O9OQ(C[O,5>bOOQQ,5>d,5>dO!JmQSO,5>dOOQQ,5>f,5>fO!JmQSO,5>fOOQQ,5>h,5>hO!JrQWO'#DXO%QQUO'#JgO!KaQWO'#JgO!LOQWO'#DgO!LaQWO'#DgO!NrQUO'#DgO!NyQSO'#JfO# RQSO,5:QO# WQSO'#EmO# fQSO'#JtO# nQSO,5;WO# sQWO'#DgO#!QQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO#!XQSO,5:kO>QQSO,5;RO!>oQWO,5;RO!>wQ,UO,5;RO9dQ,UO,5;RO#!aQSO,5@RO#!fQ!LQO,5:oOOQO-E<]-E<]O##lQ(C`O,5:zOCOQWO,5:nO##vQWO,5:nOCOQWO,5:zO!>dQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%QQUO,5:zO#$TQ(C[O,5:zO#$`Q(C[O,5:zO!>oQWO,5:nOOQO,5;Q,5;QO#$nQ(C[O,5:zPOOO'#IS'#ISP#%SO?MpO,58zPOOO,58z,58zOOOO-EtO+sQUO,5>tOOQO,5>z,5>zO#%nQUO'#IYOOQO-EdQ(C[O1G.rO!>oQWO1G.rO!>wQ,UO1G.rO$%YQSO1G0nO$%_QSO'#CfO$%jQSO'#KTO$%rQSO,5=rO$%wQSO'#KTO$%|QSO'#KTO$&XQSO'#IsO$&gQSO,5@nO$&oQbO1G1cOOQ(CY1G1e1G1eO9_QSO1G3]O?rQSO1G3]O$&vQSO1G3]O$&{QSO1G3]OOQQ1G3]1G3]O:vQSO'#JrO:vQSO'#EmO%QQUO'#EmO:vQSO'#ImO$'QQ(C[O,5@kOOQQ1G2u1G2uO!BTQSO1G2{O!%tQ,UO1G2xO$']QSO1G2xOOQQ1G2y1G2yO!%tQ,UO1G2yO$'bQSO1G2yO$'jQWO'#GwOOQQ1G2{1G2{O!3cQWO'#IoO!BYQ`O1G3OOOQQ1G3O1G3OOOQQ,5=i,5=iO$'rQ,UO,5=kO9_QSO,5=kO#K`QSO,5=mO8tQSO,5=mO!>oQWO,5=mO!>wQ,UO,5=mO9dQ,UO,5=mO$(QQSO'#KRO$(]QSO,5=nOOQQ1G.h1G.hO$(bQ(C[O1G.hO?rQSO1G.hO$(mQSO1G.hO9OQ(C[O1G.hO$*rQbO,5@pO$+SQSO,5@pO$+_QUO,5=uO$+fQSO,5=uO:vQSO,5@pOOQQ1G3_1G3_O`QUO1G3_OOQQ1G3e1G3eOOQQ1G3g1G3gO={QSO1G3iO$+kQUO1G3kO$/lQUO'#HjOOQQ1G3n1G3nO$/yQSO'#HpO>QQSO'#HrOOQQ1G3t1G3tO$0RQUO1G3tO9OQ(C[O1G3zOOQQ1G3|1G3|OOQ(CW'#GW'#GWO9OQ(C[O1G4OO9OQ(C[O1G4QO$4VQSO,5@RO!)jQUO,5;XO:vQSO,5;XO>QQSO,5:RO!)jQUO,5:RO!>oQWO,5:RO$4[Q$IUO,5:ROOQO,5;X,5;XO$4fQWO'#IZO$4|QSO,5@QOOQ(CY1G/l1G/lO$5UQWO'#IaO$5`QSO,5@`OOQ(CW1G0r1G0rO!LaQWO,5:ROOQO'#I^'#I^O$5hQWO,5:mOOQ(CY,5:m,5:mO#![QSO1G0VOOQ(CY1G0V1G0VO%QQUO1G0VOOQ(CY1G0m1G0mO>QQSO1G0mO!>oQWO1G0mO!>wQ,UO1G0mOOQ(CW1G5m1G5mO!>dQ(C[O1G0YOOQO1G0f1G0fO%QQUO1G0fO$5oQ(C[O1G0fO$5zQ(C[O1G0fO!>oQWO1G0YOCOQWO1G0YO$6YQ(C[O1G0fOOQO1G0Y1G0YO$6nQ(CjO1G0fPOOO-EtO$7[QSO1G5kO$7dQSO1G5xO$7lQbO1G5yO:vQSO,5>zO$7vQ(CjO1G5vO%QQUO1G5vO$8WQ(C[O1G5vO$8iQSO1G5uO$8iQSO1G5uO:vQSO1G5uO$8qQSO,5>}O:vQSO,5>}OOQO,5>},5>}O$9VQSO,5>}O$ mQSO,5>}OOQO-EcQ(CjO,5oQWO,5dQ(C[O7+$^O!>oQWO7+$^O!#qQUO7+&YO$NgQSO'#IrO$N{QSO,5@oOOQO1G3^1G3^O9_QSO,5@oO$N{QSO,5@oO% TQSO,5@oOOQO,5?_,5?_OOQO-EoQWO1G3XO!>wQ,UO1G3XO%$RQSO'#IqO%$^QSO,5@mO%$fQWO,5@mOOQ(CW1G3Y1G3YOOQQ7+$S7+$SO?rQSO7+$SO9OQ(C[O7+$SO%$qQSO7+$SO%QQUO1G6[O%QQUO1G6]O%$vQUO1G3aO%$}QSO1G3aO%%SQUO1G3aO%%ZQ(C[O1G6[OOQQ7+(y7+(yO9OQ(C[O7+)TO`QUO7+)VOOQQ'#KW'#KWOOQQ'#It'#ItO%%eQUO,5>UOOQQ,5>U,5>UO%QQUO'#HkO%%rQSO'#HmOOQQ,5>[,5>[O:vQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%%wQWO1G5mO%&]Q$IUO1G0sO%&gQSO1G0sOOQO1G/m1G/mO%&rQ$IUO1G/mO>QQSO1G/mO!)jQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!>oQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#![QSO7+%qOOQ(CY7+&X7+&XO>QQSO7+&XO!>oQWO7+&XOOQO7+%t7+%tO$6nQ(CjO7+&QOOQO7+&Q7+&QO%QQUO7+&QO%&|Q(C[O7+&QO!>dQ(C[O7+%tO!>oQWO7+%tO%'XQ(C[O7+&QO%'gQ(CjO7++bO%QQUO7++bO%'wQSO7++aO%'wQSO7++aOOQO1G4i1G4iO:vQSO1G4iO%(PQSO1G4iOOQO7+%y7+%yO#![QSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ(CjO<oQWO1G2bOBoQSO1G2cO%EsQSO1G2dO%E{QSO1G2cO!'^Q,UO7+*}OOQ(CY1G/[1G/[O%FWQSO1G/[OOQ(CY7+'n7+'nO%F]Q,UO7+'uO%FmQ(CjO<dQ(C[O<oQWO7+(sO%JhQSO,5?]OOQO-EVOOQQ,5>X,5>XO%KmQSO1G3vO:vQSO7+&_O!)jQUO7+&_OOQO7+%X7+%XO%KrQ$IUO1G5yO>QQSO7+%XOOQ(CY<QQSO<dQ(C[O<QQSO7+)bO&3ZQSO<zAN>zO%QQUOAN?WOOQO<OQ$IUO7+'uO&?tQ,UOG26{OOQO<QOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO#v:PO(RVO(b$WO(i#yO(j#zO~O#y.dO~P#@_O#X:UO#{:UO#y(WX!W(WX~PNlO^'Ya!V'Ya'k'Ya'i'Ya!g'Ya!S'Yao'Ya!X'Ya%a'Ya!a'Ya~P!6UOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(R#fi(b#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#)tO^#zi!V#zi'k#zi'i#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!6UO$W.iO$Y.iO~O$W.jO$Y.jO~O!a)YO#X.kO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.lO~O!X)]O$T.nO$W)[O$Y)[O$a.oO~O!V:QO!W(VX~P#@_O!W.pO~O!a)YO$a(kX~O$a.rO~Oq)lO(S)mO(T.uO~Ol.xO!S.yO'vTO'yUO~O!VcX!acX!gcX!g$sX(bcX~P!.xO!g/PO~P#)tO!V/QO!a#rO(b'bO!g(oX~O!g/VO~O!U)}O't%eO!g(oP~O#d/XO~O!S$sX!V$sX!a$zX~P!.xO!V/YO!S(pX~P#)tO!a/[O~O!S/^O~Ok/bO!a#rO!h%ZO'}%OO(b'bO~O't/dO~O!a*}O~O^%^O!V/hO'k%^O~O!W/jO~P!2vO!]/kO!^/kO'u!iO(U!jO~O|/mO(U!jO~O#T/nO~O't%|Od'_X!V'_X~O!V*gOd(Oa~Od/sO~Oy/tOz/tO|/uOgva(iva(jva!Vva#Xva~Odva#yva~P#L|Oy)qO|)rOg$la(i$la(j$la!V$la#X$la~Od$la#y$la~P#MrOy)qO|)rOg$na(i$na(j$na!V$na#X$na~Od$na#y$na~P#NeO#d/wO~Od$|a!V$|a#X$|a#y$|a~P!0RO!a#rO~O#d/zO~Oy#vOz#wO|#xO!f#tO!h#uO(RVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(b!ni(i!ni(j!ni~O^!ni'k!ni'i!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$ wOg.PO!X'QO%a.OO~Oi0RO't0QO~P!0sO!a*}O^'|a!X'|a'k'|a!V'|a~O#d0XO~OXYX!VcX!WcX~O!V0YO!W(wX~O!W0[O~OX0]O~O't+VO'vTO'yUO~O!X%nO't%eO]'gX!V'gX~O!V+[O](va~O!g0bO~P!6UOX0eO~O]0fO~O!V+hO^(sa'k(sa~O#X0lO~Og0oO!X$yO~O(U(oO!W(tP~Og0xO!X0uO%a0wO'}%OO~OX1SO!V1QO!W(uX~O!W1TO~O]1VO^%^O'k%^O~O't#jO'vTO'yUO~O#X$bO#{$bOP(WXX(WXk(WXy(WXz(WX|(WX!V(WX!e(WX!h(WX!l(WX#g(WX#h(WX#i(WX#j(WX#k(WX#l(WX#m(WX#n(WX#q(WX#s(WX#u(WX#v(WX(R(WX(b(WX(i(WX(j(WX~O#o1YO&Q1ZO^(WX!f(WX~P$(xO#X$bO#o1YO&Q1ZO~O^1[O~P%QO^1^O~O&Z1bOP&XiQ&XiV&Xi^&Xia&Xib&Xii&Xik&Xil&Xim&Xis&Xiu&Xiw&Xi|&Xi!Q&Xi!R&Xi!X&Xi!c&Xi!h&Xi!k&Xi!l&Xi!m&Xi!o&Xi!q&Xi!t&Xi!x&Xi#p&Xi$Q&Xi$U&Xi%`&Xi%b&Xi%d&Xi%e&Xi%h&Xi%j&Xi%m&Xi%n&Xi%p&Xi%|&Xi&S&Xi&U&Xi&W&Xi&Y&Xi&]&Xi&c&Xi&i&Xi&k&Xi&m&Xi&o&Xi&q&Xi'i&Xi't&Xi'v&Xi'y&Xi(R&Xi(a&Xi(n&Xi!W&Xi_&Xi&`&Xi~O_1hO!W1fO&`1gO~P`O!XXO!h1jO~O&g,eOP&biQ&biV&bi^&bia&bib&bii&bik&bil&bim&bis&biu&biw&bi|&bi!Q&bi!R&bi!X&bi!c&bi!h&bi!k&bi!l&bi!m&bi!o&bi!q&bi!t&bi!x&bi#p&bi$Q&bi$U&bi%`&bi%b&bi%d&bi%e&bi%h&bi%j&bi%m&bi%n&bi%p&bi%|&bi&S&bi&U&bi&W&bi&Y&bi&]&bi&c&bi&i&bi&k&bi&m&bi&o&bi&q&bi'i&bi't&bi'v&bi'y&bi(R&bi(a&bi(n&bi!W&bi&Z&bi_&bi&`&bi~O!S1pO~O!V!Za!W!Za~P#@_Ol!kO|!lO!U1vO(U!jO!V&}X!W&}X~P?fO!V,uO!W(Ya~O!V'TX!W'TX~P!@xO!V,xO!W(ha~O!W1}O~P'TO^%^O#X2WO'k%^O~O^%^O!a#rO#X2WO'k%^O~O^%^O!a#rO!l2[O#X2WO'k%^O(b'bO~O^%^O'k%^O~P!6UO!V$^Oo$ka~O!S&|i!V&|i~P!6UO!V'vO!S(Xi~O!V'}O!S(fi~O!S(gi!V(gi~P!6UO!V(di!g(di^(di'k(di~P!6UO#X2^O!V(di!g(di^(di'k(di~O!V(ZO!g(ci~O|%vO!X%wO!x]O#b2cO#c2bO't%eO~O|%vO!X%wO#c2bO't%eO~Og2jO!X'QO%a2iO~Og2jO!X'QO%a2iO'}%OO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'kva(Rva(bva!gva!Sva'ivaova!Xva%ava!ava~P#L|O#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'k$la(R$la(b$la!g$la!S$la'i$lao$la!X$la%a$la!a$la~P#MrO#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'k$na(R$na(b$na!g$na!S$na'i$nao$na!X$na%a$na!a$na~P#NeO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'k$|a(R$|a(b$|a!g$|a!S$|a'i$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#)tO^#[q!V#[q'k#[q'i#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!6UOd'OX!V'OX~P!'^O!V.YOd([a~O!U2rO!V'PX!g'PX~P%QO!V.]O!g(]a~O!V.]O!g(]a~P!6UO!S2uO~O#y!ja!W!ja~PJ`O#y!ba!V!ba!W!ba~P#@_O#y!na!W!na~P!8oO#y!pa!W!pa~P!;YO!X3XO$UfO$_3YO~O!W3^O~Oo3_O~P#)tO^$hq!V$hq'k$hq'i$hq!S$hq!g$hqo$hq!X$hq%a$hq!a$hq~P!6UO!S3`O~Ol.xO'vTO'yUO~Oy)qO|)rO(j)vOg%Xi(i%Xi!V%Xi#X%Xi~Od%Xi#y%Xi~P$GeOy)qO|)rOg%Zi(i%Zi(j%Zi!V%Zi#X%Zi~Od%Zi#y%Zi~P$HWO(b$WO~P#)tO!U3cO't%eO!V'ZX!g'ZX~O!V/QO!g(oa~O!V/QO!a#rO!g(oa~O!V/QO!a#rO(b'bO!g(oa~Od$ui!V$ui#X$ui#y$ui~P!0RO!U3kO't*SO!S']X!V']X~P!0pO!V/YO!S(pa~O!V/YO!S(pa~P#)tO!a#rO#o3sO~Ok3vO!a#rO(b'bO~Od(Pi!V(Pi~P!0RO#X3yOd(Pi!V(Pi~P!0RO!g3|O~O^$iq!V$iq'k$iq'i$iq!S$iq!g$iqo$iq!X$iq%a$iq!a$iq~P!6UO!V4QO!X(qX~P#)tO!f#tO~P3}O^$sX!X$sX%UYX'k$sX!V$sX~P!.xO%U4SO^hXghXyhX|hX!XhX'khX(ihX(jhX!VhX~O%U4SO~O%b4ZO't+VO'vTO'yUO!V'fX!W'fX~O!V0YO!W(wa~OX4_O~O]4`O~O!S4dO~O^%^O'k%^O~P#)tO!X$yO~P#)tO!V4iO#X4kO!W(tX~O!W4lO~Ol!kO|4mO![!uO!]!rO!^!rO!x9mO!|!mO!}!mO#O!mO#P!mO#Q!mO#T4rO#U!vO'u!iO'vTO'yUO(U!jO(a!pO~O!W4qO~P%!VOg4wO!X0uO%a4vO~Og4wO!X0uO%a4vO'}%OO~O't#jO!V'eX!W'eX~O!V1QO!W(ua~O'vTO'yUO(U5QO~O]5UO~O!g5XO~P%QO^5ZO~O^5ZO~P%QO#o5]O&Q5^O~PMOO_1hO!W5bO&`1gO~P`O!a5dO~O!a5fO!V(Zi!W(Zi!a(Zi!h(Zi'}(Zi~O!V#ai!W#ai~P#@_O#X5gO!V#ai!W#ai~O!V!Zi!W!Zi~P#@_O^%^O#X5pO'k%^O~O^%^O!a#rO#X5pO'k%^O~O!V(dq!g(dq^(dq'k(dq~P!6UO!V(ZO!g(cq~O|%vO!X%wO#c5wO't%eO~O!X'QO%a5zO~Og5}O!X'QO%a5zO~O#d%XiP%XiX%Xi^%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi'k%Xi(R%Xi(b%Xi!g%Xi!S%Xi'i%Xio%Xi!X%Xi%a%Xi!a%Xi~P$GeO#d%ZiP%ZiX%Zi^%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi'k%Zi(R%Zi(b%Zi!g%Zi!S%Zi'i%Zio%Zi!X%Zi%a%Zi!a%Zi~P$HWO#d$uiP$uiX$ui^$uik$uiz$ui!V$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui'k$ui(R$ui(b$ui!g$ui!S$ui'i$ui#X$uio$ui!X$ui%a$ui!a$ui~P#)tOd'Oa!V'Oa~P!0RO!V'Pa!g'Pa~P!6UO!V.]O!g(]i~O#y#[i!V#[i!W#[i~P#@_OP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(RVOX#fik#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~O#g#fi~P%0fO#g9uO~P%0fOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO(RVOX#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~Ok#fi~P%2qOk9wO~P%2qOP$YOk9wOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO(RVO#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P%4|OX:TO!e9yO#l9yO#m9yO#n:SO#o9yO~P%4|OP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO(RVO#s#fi#u#fi#v#fi#y#fi(b#fi(j#fi!V#fi!W#fi~O(i#fi~P%7hO(i#yO~P%7hOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O(RVO(i#yO#u#fi#v#fi#y#fi(b#fi!V#fi!W#fi~O(j#fi~P%9sO(j#zO~P%9sOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO(RVO(i#yO(j#zO~O#v#fi#y#fi(b#fi!V#fi!W#fi~P%vO!f#tOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(b(QX(i(QX(j(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#@_O#y!ni!W!ni~P$ wO!W6ZO~O!V'Ya!W'Ya~P#@_O!a#rO(b'bO!V'Za!g'Za~O!V/QO!g(oi~O!V/QO!a#rO!g(oi~Od$uq!V$uq#X$uq#y$uq~P!0RO!S']a!V']a~P#)tO!a6bO~O!V/YO!S(pi~P#)tO!V/YO!S(pi~O!S6fO~O!a#rO#o6kO~Ok6lO!a#rO(b'bO~O!S6nO~Od$wq!V$wq#X$wq#y$wq~P!0RO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!6UO!V4QO!X(qa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!6UOX6sO~O!V0YO!W(wi~O]6yO~O!a5fO~O(U(oO!V'bX!W'bX~O!V4iO!W(ta~OikO't7QO~P._O!W7TO~P%!VOl!kO|7UO'vTO'yUO(U!jO(a!pO~O!X0uO~O!X0uO%a7WO~Og7ZO!X0uO%a7WO~OX7`O!V'ea!W'ea~O!V1QO!W(ui~O!g7dO~O!g7eO~O!g7fO~O!g7fO~P%QO^7hO~O!a7kO~O!g7lO~O!V(gi!W(gi~P#@_O^%^O#X7tO'k%^O~O!V(dy!g(dy^(dy'k(dy~P!6UO!V(ZO!g(cy~O!X'QO%a7wO~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'k$uq(R$uq(b$uq!g$uq!S$uq'i$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#)tO#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'k$wq(R$wq(b$wq!g$wq!S$wq'i$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#)tO!V'Pi!g'Pi~P!6UO#y#[q!V#[q!W#[q~P#@_Oy/tOz/tO|/uOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Rva(bva(iva(jva!Vva!Wva~Oy)qO|)rOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(R$la(b$la(i$la(j$la!V$la!W$la~Oy)qO|)rOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(R$na(b$na(i$na(j$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(R$|a(b$|a!V$|a!W$|a~P%>vO#y$hq!V$hq!W$hq~P#@_O#y$iq!V$iq!W$iq~P#@_O!W8RO~O#y8SO~P!0RO!a#rO!V'Zi!g'Zi~O!a#rO(b'bO!V'Zi!g'Zi~O!V/QO!g(oq~O!S']i!V']i~P#)tO!V/YO!S(pq~O!S8YO~P#)tO!S8YO~Od(Py!V(Py~P!0RO!V'`a!X'`a~P#)tO^%Tq!X%Tq'k%Tq!V%Tq~P#)tOX8_O~O!V0YO!W(wq~O#X8cO!V'ba!W'ba~O!V4iO!W(ti~P#@_OPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!a%RX#o%RX~P&/vO!X0uO%a8gO~O'vTO'yUO(U8lO~O!V1QO!W(uq~O!g8oO~O!g8oO~P%QO!g8qO~O!g8rO~O#X8tO!V#ay!W#ay~O!V#ay!W#ay~P#@_O!X'QO%a8yO~O#y#wy!V#wy!W#wy~P#@_OP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(R$ui(b$ui!V$ui!W$ui~P%>vOy)qO|)rO(j)vOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(R%Xi(b%Xi(i%Xi!V%Xi!W%Xi~Oy)qO|)rOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(R%Zi(b%Zi(i%Zi(j%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#@_O#y#[y!V#[y!W#[y~P#@_O!a#rO!V'Zq!g'Zq~O!V/QO!g(oy~O!S']q!V']q~P#)tO!S9QO~P#)tO!V0YO!W(wy~O!V4iO!W(tq~O!X0uO%a9XO~O!g9[O~O!X'QO%a9aO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(R$uq(b$uq!V$uq!W$uq~P%>vOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(R$wq(b$wq!V$wq!W$wq~P%>vOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0RO!V'bq!W'bq~P#@_O!V#a!Z!W#a!Z~P#@_O#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'k%]!Z(R%]!Z(b%]!Z!g%]!Z!S%]!Z'i%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#)tOP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(R%]!Z(b%]!Z!V%]!Z!W%]!Z~P%>vOo(VX~P1gO'u!iO~P!)jO!ScX!VcX#XcX~P&/vOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!acX!gYX!gcX(bcX~P&E^OP9lOQ9lOa;]Ob!fOikOk9lOlkOmkOskOu9lOw9lO|WO!QkO!RkO!XXO!c9oO!hZO!k9lO!l9lO!m9lO!o9pO!q9qO!t!eO$Q!hO$UfO't)PO'vTO'yUO(RVO(a[O(n;ZO~O!V:QO!W$ka~Oi%POk$qOl$pOm$pOs%QOu%ROw:WO|$xO!X$yO!c;bO!h$uO#c:^O$Q%VO$m:YO$o:[O$r%WO't(gO'vTO'yUO'}%OO(R$rO~O#p)WO~P&JSO!WYX!WcX~P&E^O#d9tO~O!a#rO#d9tO~O#X:UO~O#o9yO~O#X:`O!V(gX!W(gX~O#X:UO!V(eX!W(eX~O#d:aO~Od:cO~P!0RO#d:hO~O#d:iO~O!a#rO#d:jO~O!a#rO#d:aO~O#y:kO~P#@_O#d:lO~O#d:mO~O#d:nO~O#d:oO~O#d:pO~O#d:qO~O#y:rO~P!0RO#y:sO~P!0RO$U~!f!|!}#P#Q#T#b#c#n(n$m$o$r%U%`%a%b%h%j%m%n%p%r~'oR$U(n#h!R'm'u#il#g#jky'n(U'n't$W$Y$W~",goto:"$%Z({PPPP(|P)PP)aP*p.rPPPP5SPP5iP;d>iP>|P>|PPP>|P@lP>|P>|P>|P@pPP@uPA`PFUPPPFYPPPPFYIXPPPI_JYPFYPLgPPPPNuFYPPPFYPFYP!#TFYP!&g!'i!'rP!(e!(i!(ePPPPP!+r!'iPP!,`!-YP!/|FYFY!0R!3Z!7n!7n!;cPPP!;jFYPPPPPPPPPPP!>uP!@WPPFY!AePFYPFYFYFYFYPFY!BwPP!E}P!IPP!IT!I_!Ic!IcP!EzP!Ig!IgP!LiP!LmFYFY!Ls# t>|P>|P>|>|P##O>|>|#$x>|#'V>|#(y>|>|#)g#+c#+c#+g#+o#+c#+wP#+cP>|#,a>|#-i>|>|5SPPP#.tPP#/^#/^P#/^P#/s#/^PP#/yP#/pP#/p#0]#/p#0w#0}5P)P#1Q)PP#1X#1X#1XP)PP)PP)PP)PPP)PP#1_#1bP#1b)PP#1fP#1iP)PP)PP)PP)PP)PP)P)PPP#1o#1u#2P#2V#2]#2c#2i#2w#2}#3T#3_#3e#3o#4O#4U#4u#5X#5_#5e#5s#6Y#7j#7x#8O#8U#8[#8b#8l#8r#8x#9S#9f#9lPPPPPPPPPP#9rPPPPPPP#:f#=mP#>|#?T#?]PPPP#Cg#F]#Lr#Lu#Lx#Mq#Mt#Mw#NO#NWPP#N^#Nb$ Z$!Z$!_$!sPP$!w$!}$#RP$#U$#Y$#]$$R$$i$$n$$q$$t$$z$$}$%R$%VR!xRmpOXr!X#`%]&d&f&g&i,],b1b1eY!rQ'Q,}0u4pQ%ctQ%kwQ%rzQ&[!TS&x!c,uQ'W!fS'^!o!uS*Y$y*_Q+T%lQ+b%tQ+|&UQ,{'PQ-V'XQ-_'_Q/k*aQ1P+}R:_9p$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7tS#m]9m!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q*j%SQ+Y%nQ,O&XQ,V&aQ.S:VQ0O*{Q0S*}Q0_+ZQ1X,TQ2f.PQ4Y0YQ5O1QQ5|2jQ6S:WQ6u4ZR7z5}&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^t!kQ!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4r$Y$pi#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ%uzQ&v!cS&|%w,xQ+Y%nS.x)r.zQ/v*nQ0_+ZQ0d+aQ1W,SQ1X,TQ4Y0YQ4c0fQ5R1SQ5S1VQ6u4ZQ6x4`Q7c5UQ8b6yR8m7`pmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR,Q&]&r^OPXYrstux!X!^!g!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u'S'd'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;];^[#XWZ#S#V&y'tQ%fvQ%jwS%oz%t!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ&Q!RQ'T!eQ'V!fQ(b#oS)|$u*QS+S%k%lQ+W%nQ+w&SQ+{&US-U'W'XQ.R(cQ/U)}Q0W+TQ0^+ZQ0`+[Q0c+`Q0z+xS1O+|+}Q2S-VQ3b/QQ4X0YQ4]0]Q4b0eQ4}1PQ6_3cQ6t4ZQ6w4_Q8^6sR9S8_v$wi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!S%hw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uQ*|%fQ+m%}Q+p&OQ+z&UQ.Q(bQ0y+wU0}+{+|+}Q2k.RQ4x0zS4|1O1PQ7_4}!z;_#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg;`:S:T:Y:[:^:e:g:i:m:o:sW$|i%O*g;ZS%}!O&ZQ&O!PQ&P!QR+k%{$Z${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hT)m$r)nV*k%S:V:WU&|!c%w,xS(p#v#wQ+_%qS-z(^(_Q0p+qQ3z/tR6}4i&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^$i$]c#U#a%a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.e.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QT#PV#Q&ykOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q&z!cR1w,uv!kQ!c!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4rS*X$y*_S/c*Y*aQ/l*bQ0r+sQ3u/kR3x/nlpOXr!X#`%]&d&f&g&i,],b1b1eQ&k![Q'h!tS(d#q9tQ+Q%iQ+u&QQ+v&RQ-S'UQ-a'aS.W(i:aS/y*s:jQ0U+RQ0t+tQ1i,dQ1k,eQ1s,pQ2Q-TQ2T-XS4P/z:pQ4T0VS4W0X:qQ5h1uQ5l2RQ5q2YQ6r4UQ7o5jQ7p5mQ7s5rR8s7l$d$[c#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(a#l'ZU*d$z(h3US*w%a.eQ2g0OQ5y2fQ7y5|R8z7z$d$Zc#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(`#l'ZS(r#w$[S*v%a.eS-{(_(aQ.h)SQ/{*wR2d-|&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S#m]9mQ&f!VQ&g!WQ&i!YQ&j!ZR1a,`Q'R!eQ*y%fQ-Q'TS-}(b*|Q2O-PW2h.Q.R/}0PQ5k2PU5x2e2g2kS7v5y5{S8x7x7yS9_8w8zQ9g9`R9j9hU!sQ'Q,}T4n0u4p!O_OXZ`r!T!X#`#d%Z%]&Z&]&d&f&g&i(Z,],b-t1b1e]!mQ!o'Q,}0u4pT#m]9m%UyOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS(p#v#wS-z(^(_!s:w$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Y!qQ'Q,}0u4pQ']!oS'g!r!uS'i!v4rS-^'^'_Q-`'`R2Z-_Q'f!qS(V#c1_S-]']'iQ/T)|Q/a*XQ2[-`Q3g/US3p/b/lQ6^3bS6i3v3xQ8U6_R8]6lQ#sbQ'e!qS(U#c1_S(W#i*rQ*t%[Q+O%gQ+U%mU-[']'f'iQ-p(VQ/S)|Q/`*XQ/f*[Q0T+PQ0{+yS2X-]-`Q2a-xS3f/T/US3o/a/lQ3r/eQ3t/gQ4z0|Q5s2[Q6]3bQ6a3gS6e3p3xQ6j3wQ7]4{S8T6^6_Q8X6fQ8Z6iQ8j7^Q9O8UQ9P8YQ9R8]Q9Z8kQ9c9QQ:z:uQ;V;OR;W;PV!sQ'Q,}%UaOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS#sx!g!r:t$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:z;]%UbOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tQ%[j!S%gw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uS%mx!gQ+P%hQ+y&UW0|+z+{+|+}U4{0}1O1PS7^4|4}Q8k7_!r:u$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q;O;[R;P;]$xeOPXYrstu!X!^!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tY#^WZ#S#V't!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ,W&a!p:v$X$j)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:y&yS&}!c%wR1y,x$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7t!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q,V&aQ0O*{Q2f.PQ5|2jR7z5}!f$Rc#U%a's'y(e(l({(|(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!T9{)Q)c,s.e1q1t2v3O3P3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!b$Tc#U%a's'y(e(l(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!P9})Q)c,s.e1q1t2v3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!^$Xc#U%a's'y(e(l)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9nQ3a/Oz;^)Q)c,s.e1q1t2v3V3]5i6R6W6X7P7n7{8P8Q9U9];QQ;c;eR;d;f&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S$kh$lR3Y.k'PgOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$gf$mQ$efS)[$h)`R)h$mT$ff$mT)^$h)`'PhOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$kh$lQ$nhR)g$l%UjOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7t!s;[$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^#alOPXZr!X!^!l#O#`#k#x$j%]&]&`&a&d&f&g&i&m&u'S(q)e*{+g,X,],b-R.P.l/u0x1Y1Z1[1^1b1e1g2j3X4m4w5Z5]5^5}7U7Z7hv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hQ*o%WQ.w)qg3U:S:T:Y:[:^:e:g:i:m:o:sv$vi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;dQ*R$wS*[$y*_Q*p%XQ/g*]!z:|#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hf:}:S:T:Y:[:^:e:g:i:m:o:sQ;R;_Q;S;`Q;T;aR;U;bv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg3U:S:T:Y:[:^:e:g:i:m:o:slnOXr!X#`%]&d&f&g&i,],b1b1eQ*U$xQ,k&pQ,l&rR3j/Y$Y${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ+n&OQ0n+pQ4g0mR6|4hT*^$y*_S*^$y*_T4o0u4pS/e*Z4mT3w/m7UQ+O%gQ/f*[Q0T+PQ0{+yQ4z0|Q7]4{Q8j7^R9Z8kn)u$s(j*q/W/o/p2o3h3}6[6m8}:{;X;Y!W:d(f)V){*T.V.s/O/]/|0k0m2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f]:e3T6V7|8{8|9kp)w$s(j*q.|/W/o/p2o3h3}6[6m8}:{;X;Y!Y:f(f)V){*T.V.s/O/]/|0k0m2l2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f_:g3T6V7|7}8{8|9kpmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ&W!SR,X&apmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR&W!SQ+r&PR0j+kqmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ0v+wS4u0y0zU7V4s4t4xS8f7X7YS9V8e8hQ9d9WR9i9eQ&_!TR,R&ZR5R1SS%oz%tR0`+[Q&d!UR,]&eR,c&jT1c,b1eR,g&kQ,f&kR1l,gQ'k!wR-c'kQrOQ#`XT%`r#`Q!zTR'm!zQ!}UR'o!}Q)n$rR.t)nQ#QVR'q#QQ#TWU'w#T'x-jQ'x#UR-j'yQ,v&zR1x,vQ.Z(jR2p.ZQ.^(lS2s.^2tR2t._Q,}'QR1|,}Y!oQ'Q,}0u4pR'[!oS#ZW%vU(O#Z(P-kQ(P#[R-k'zQ,y&}R1z,yr`OXr!T!X#`%]&Z&]&d&f&g&i,],b1b1eS#dZ%ZU#n`#d-tR-t(ZQ([#fQ-q(WW-y([-q2_5uQ2_-rR5u2`Q)`$hR.m)`Q$lhR)f$lQ$_cU)U$_-f:RQ-f9nR:R)cQ/R)|W3d/R3e6`8VU3e/S/T/US6`3f3gR8V6a#m)s$s(f(j)V){*T*l*m*q.T.U.V.s.|.}/O/W/]/o/p/|0k0m2l2m2n2o3T3h3i3m3}4f4h6O6P6T6U6V6[6c6g6m6o6q7|7}8O8W8[8{8|8}9b9k:{;X;Y;e;fQ/Z*TU3l/Z3n6dQ3n/]R6d3mQ*_$yR/i*_Q*h$}R/r*hQ4R/|R6p4RQ+i%yR0i+iQ4j0pS7O4j8dR8d7PQ+t&QR0s+tQ4p0uR7S4pQ1R,OS5P1R7aR7a5RQ0Z+WW4[0Z4^6v8`Q4^0^Q6v4]R8`6wQ+]%oR0a+]Q1e,bR5a1eWqOXr#`Q&h!XQ*u%]Q,[&dQ,^&fQ,_&gQ,a&iQ1`,]S1c,b1eR5`1bQ%_oQ&l!]Q&o!_Q&q!`Q&s!aQ'c!qQ+Q%iQ+d%uQ+j%zQ,Q&_Q,i&nW-Y']'e'f'iQ-a'aQ/h*^Q0U+RS1U,R,UQ1m,hQ1n,kQ1o,lQ2T-XW2V-[-]-`-bQ4T0VQ4a0dQ4e0kQ4y0{Q5T1WQ5_1aU5n2U2X2[Q5q2YQ6r4UQ6z4cQ6{4fQ7R4oQ7[4zQ7b5SS7q5o5sQ7s5rQ8a6xQ8i7]Q8n7cQ8u7rQ9T8bQ9Y8jQ9^8vR9f9ZQ%iwQ'U!fQ'a!qU+R%j%k%lQ,p&wU-T'V'W'XS-X']'gQ/_*XS0V+S+TQ1u,rS2R-U-VQ2Y-^Q3q/cQ4U0WQ5j1{Q5m2SQ5r2ZR6h3uS$ti;ZR*i%OU$}i%O;ZR/q*gQ$siS(f#r*}Q(j#tS)V$`$aQ){$uQ*T$xQ*l%TQ*m%UQ*q%YQ.T:XQ.U:ZQ.V:]Q.s)lQ.|)uQ.})wQ/O)xQ/W*PQ/]*VQ/o*eQ/p*fh/|*z.O0w2i4v5z7W7w8g8y9X9aQ0k+lQ0m+oQ2l:dQ2m:fQ2n:hQ2o.YS3T:S:TQ3h/XQ3i/YQ3m/[Q3}/wQ4f0lQ4h0oQ6O:lQ6P:nQ6T:YQ6U:[Q6V:^Q6[3aQ6c3kQ6g3sQ6m3yQ6o4QQ6q4SQ7|:iQ7}:eQ8O:gQ8W6bQ8[6kQ8{:mQ8|:oQ8}8SQ9b:rQ9k:sQ:{;ZQ;X;cQ;Y;dQ;e;gR;f;hloOXr!X#`%]&d&f&g&i,],b1b1eQ!dPS#bZ#kQ&n!^U'Y!l4m7UQ'p#OQ(s#xQ)d$jS,U&]&`Q,Y&aQ,h&mQ,m&uQ-P'SQ.a(qQ.q)eQ0P*{Q0g+gQ1],XQ2P-RQ2g.PQ3[.lQ3{/uQ4t0xQ5V1YQ5W1ZQ5Y1[Q5[1^Q5c1gQ5y2jQ6Y3XQ7Y4wQ7g5ZQ7i5]Q7j5^Q7y5}Q8h7ZR8p7h#UcOPXZr!X!^!l#`#k#x%]&]&`&a&d&f&g&i&m&u'S(q*{+g,X,],b-R.P/u0x1Y1Z1[1^1b1e1g2j4m4w5Z5]5^5}7U7Z7hQ#UWQ#aYQ%asQ%btQ%duS's#S'vQ'y#VQ(e#qQ(l#uQ(t#{Q(u#|Q(v#}Q(w$OQ(x$PQ(y$QQ(z$RQ({$SQ(|$TQ(}$UQ)O$VQ)Q$XQ)T$^Q)X$bW)c$j)e.l3XQ*x%cQ+^%pS,s&y1vQ-b'dS-g't-iQ-l'|Q-n(TQ.X(iQ._(mQ.c9lQ.e9oQ.f9pQ.g9qQ.v)pQ/x*sQ1q,nQ1t,qQ2U-ZQ2]-oQ2q.]Q2v9tQ2w9uQ2x9vQ2y9wQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S.dQ3V:UQ3W:_Q3]:QQ4O/zQ4V0XQ5i:`Q5o2WQ5t2^Q6Q2rQ6R:aQ6W:cQ6X:jQ7P4kQ7n5gQ7r5pQ7{:kQ8P:pQ8Q:qQ8v7tQ9U8cQ9]8tQ9n#OR;Q;^R#WWR&{!cY!qQ'Q,}0u4pS&w!c,uQ']!oS'g!r!uS'i!v4rS,r&x'PS-^'^'_Q-`'`Q1{,{R2Z-_R(k#tR(n#uQ!dQT,|'Q,}]!nQ!o'Q,}0u4pQ#l]R'Z9mT#gZ%ZS#fZ%ZU%y|},ZU(W#d#e#hS-r(X(YQ-v(ZQ0h+hQ2`-sU2a-t-u-wS5v2b2cR7u5w`#YW#S#V%v't'}+e-mt#cZ|}#d#e#h%Z(X(Y(Z+h-s-t-u-w2b2c5wQ1_,ZQ1r,oQ5e1jQ7m5fT:x&y+fT#]W%vS#[W%vS'u#S'}S'z#V+eS,t&y+fT-h't-mT'O!c%wQ$hfR)j$mT)_$h)`R3Z.kT*O$u*QR*W$xQ/}*zQ2e.OQ4s0wQ5{2iQ7X4vQ7x5zQ8e7WQ8w7wQ9W8gQ9`8yQ9e9XR9h9alpOXr!X#`%]&d&f&g&i,],b1b1eQ&^!TR,Q&ZV%z|},ZR0q+qR,P&XQ%szR+c%tR+X%nT&b!U&eT&c!U&eT1d,b1e",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:364,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Vi],skippedNodes:[0,3,4,268],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(j%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[_i,Wi,2,3,4,5,6,7,8,9,10,11,12,13,qi,new Xe("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new Xe("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:12686,ts:12688},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:O=>Ci[O]||-1},{term:328,get:O=>Ri[O]||-1},{term:67,get:O=>ji[O]||-1}],tokenPrec:12712}),zi=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),X("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),X(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),X(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),X('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),X('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],uO=new xO,LO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function C(O){return(e,a)=>{let t=e.node.getChild("VariableDefinition");return t&&a(t,O),!0}}const Ai=["FunctionDeclaration"],Ii={FunctionDeclaration:C("function"),ClassDeclaration:C("class"),ClassExpression:()=>!0,EnumDeclaration:C("constant"),TypeAliasDeclaration:C("type"),NamespaceDeclaration:C("namespace"),VariableDefinition(O,e){O.matchContext(Ai)||e(O,"variable")},TypeDefinition(O,e){e(O,"type")},__proto__:null};function MO(O,e){let a=uO.get(e);if(a)return a;let t=[],i=!0;function r(s,n){let o=O.sliceString(s.from,s.to);t.push({label:o,type:n})}return e.cursor(ve.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let n=Ii[s.name];if(n&&n(s,r)||LO.has(s.name))return!1}else if(s.to-s.from>8192){for(let n of MO(O,s.node))t.push(n);return!1}}),uO.set(e,t),t}const hO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,FO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Ei(O){let e=W(O.state).resolveInner(O.pos,-1);if(FO.indexOf(e.name)>-1)return null;let a=e.name=="VariableName"||e.to-e.from<20&&hO.test(O.state.sliceDoc(e.from,e.to));if(!a&&!O.explicit)return null;let t=[];for(let i=e;i;i=i.parent)LO.has(i.name)&&(t=t.concat(MO(O.state.doc,i)));return{options:t,from:a?e.from:O.pos,validFor:hO}}const k=se.define({name:"javascript",parser:Gi.configure({props:[ne.add({IfStatement:G({except:/^\s*({|else\b)/}),TryStatement:G({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Ct,SwitchBody:O=>{let e=O.textAfter,a=/^\s*\}/.test(e),t=/^\s*(case|default)\b/.test(e);return O.baseIndent+(a?0:t?1:2)*O.unit},Block:Rt({closing:"}"}),ArrowFunction:O=>O.baseIndent+O.unit,"TemplateString BlockComment":()=>null,"Statement Property":G({except:/^{/}),JSXElement(O){let e=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},JSXEscape(O){let e=/\s*\}/.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},"JSXOpenTag JSXSelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),le.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":yO,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),HO={test:O=>/^JSX/.test(O.name),facet:jt({commentTokens:{block:{open:"{/*",close:"*/}"}}})},KO=k.configure({dialect:"ts"},"typescript"),et=k.configure({dialect:"jsx",props:[UO.add(O=>O.isTop?[HO]:void 0)]}),Ot=k.configure({dialect:"jsx ts",props:[UO.add(O=>O.isTop?[HO]:void 0)]},"typescript"),Ni="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(O=>({label:O,type:"keyword"}));function tt(O={}){let e=O.jsx?O.typescript?Ot:et:O.typescript?KO:k;return new oe(e,[k.data.of({autocomplete:vO(FO,YO(zi.concat(Ni)))}),k.data.of({autocomplete:Ei}),O.jsx?Li:[]])}function Bi(O){for(;;){if(O.name=="JSXOpenTag"||O.name=="JSXSelfClosingTag"||O.name=="JSXFragmentTag")return O;if(O.name=="JSXEscape"||!O.parent)return null;O=O.parent}}function fO(O,e,a=O.length){for(let t=e==null?void 0:e.firstChild;t;t=t.nextSibling)if(t.name=="JSXIdentifier"||t.name=="JSXBuiltin"||t.name=="JSXNamespacedName"||t.name=="JSXMemberExpression")return O.sliceString(t.from,Math.min(t.to,a));return""}function Di(O){return O&&(O.name=="JSXEndTag"||O.name=="JSXSelfCloseEndTag")}const Ji=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Li=Y.inputHandler.of((O,e,a,t)=>{if((Ji?O.composing:O.compositionStarted)||O.state.readOnly||e!=a||t!=">"&&t!="/"||!k.isActiveAt(O.state,e,-1))return!1;let{state:i}=O,r=i.changeByRange(s=>{var n;let{head:o}=s,c=W(i).resolveInner(o,-1),h;if(c.name=="JSXStartTag"&&(c=c.parent),!(c.name=="JSXAttributeValue"&&c.to>o)){if(t==">"&&c.name=="JSXFragmentTag")return{range:z.cursor(o+1),changes:{from:o,insert:">"}};if(t=="/"&&c.name=="JSXFragmentTag"){let Q=c.parent,f=Q==null?void 0:Q.parent;if(Q.from==o-1&&((n=f.lastChild)===null||n===void 0?void 0:n.name)!="JSXEndTag"&&(h=fO(i.doc,f==null?void 0:f.firstChild,o))){let u=`/${h}>`;return{range:z.cursor(o+u.length),changes:{from:o,insert:u}}}}else if(t==">"){let Q=Bi(c);if(Q&&!Di(Q.lastChild)&&i.sliceDoc(o,o+2)!="`}}}}return{range:s}});return r.changes.empty?!1:(O.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}),R=["_blank","_self","_top","_parent"],$e=["ascii","utf-8","utf-16","latin1","latin1"],ge=["get","post","put","delete"],Pe=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],m=["true","false"],p={},Mi={a:{attrs:{href:null,ping:null,type:null,media:null,target:R,hreflang:null}},abbr:p,address:p,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:p,aside:p,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:p,base:{attrs:{href:null,target:R}},bdi:p,bdo:p,blockquote:{attrs:{cite:null}},body:p,br:p,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Pe,formmethod:ge,formnovalidate:["novalidate"],formtarget:R,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:p,center:p,cite:p,code:p,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:p,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:p,div:p,dl:p,dt:p,em:p,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:p,figure:p,footer:p,form:{attrs:{action:null,name:null,"accept-charset":$e,autocomplete:["on","off"],enctype:Pe,method:ge,novalidate:["novalidate"],target:R}},h1:p,h2:p,h3:p,h4:p,h5:p,h6:p,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:p,hgroup:p,hr:p,html:{attrs:{manifest:null}},i:p,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Pe,formmethod:ge,formnovalidate:["novalidate"],formtarget:R,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:p,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:p,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:p,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:$e,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:p,noscript:p,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p,param:{attrs:{name:null,value:null}},pre:p,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:p,rt:p,ruby:p,samp:p,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:$e}},section:p,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:p,source:{attrs:{src:null,type:null,media:null}},span:p,strong:p,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:p,summary:p,sup:p,table:p,tbody:p,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:p,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:p,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:p,time:{attrs:{datetime:null}},title:p,tr:p,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:p,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:p},at={accesskey:null,class:null,contenteditable:m,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:m,autocorrect:m,autocapitalize:m,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":m,"aria-autocomplete":["inline","list","both","none"],"aria-busy":m,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":m,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":m,"aria-hidden":m,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":m,"aria-multiselectable":m,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":m,"aria-relevant":null,"aria-required":m,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},it="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(O=>"on"+O);for(let O of it)at[O]=null;class ae{constructor(e,a){this.tags=Object.assign(Object.assign({},Mi),e),this.globalAttrs=Object.assign(Object.assign({},at),a),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}ae.default=new ae;function _(O,e,a=O.length){if(!e)return"";let t=e.firstChild,i=t&&t.getChild("TagName");return i?O.sliceString(i.from,Math.min(i.to,a)):""}function Qe(O,e=!1){for(let a=O.parent;a;a=a.parent)if(a.name=="Element")if(e)e=!1;else return a;return null}function rt(O,e,a){let t=a.tags[_(O,Qe(e,!0))];return(t==null?void 0:t.children)||a.allTags}function Te(O,e){let a=[];for(let t=e;t=Qe(t);){let i=_(O,t);if(i&&t.lastChild.name=="CloseTag")break;i&&a.indexOf(i)<0&&(e.name=="EndTag"||e.from>=t.firstChild.to)&&a.push(i)}return a}const st=/^[:\-\.\w\u00b7-\uffff]*$/;function pO(O,e,a,t,i){let r=/\s*>/.test(O.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:rt(O.doc,a,e).map(s=>({label:s,type:"type"})).concat(Te(O.doc,a).map((s,n)=>({label:"/"+s,apply:"/"+s+r,type:"type",boost:99-n}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function dO(O,e,a,t){let i=/\s*>/.test(O.sliceDoc(t,t+5))?"":">";return{from:a,to:t,options:Te(O.doc,e).map((r,s)=>({label:r,apply:r+i,type:"type",boost:99-s})),validFor:st}}function Fi(O,e,a,t){let i=[],r=0;for(let s of rt(O.doc,a,e))i.push({label:"<"+s,type:"type"});for(let s of Te(O.doc,a))i.push({label:"",type:"type",boost:99-r++});return{from:t,to:t,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Hi(O,e,a,t,i){let r=Qe(a),s=r?e.tags[_(O.doc,r)]:null,n=s&&s.attrs?Object.keys(s.attrs):[],o=s&&s.globalAttrs===!1?n:n.length?n.concat(e.globalAttrNames):e.globalAttrNames;return{from:t,to:i,options:o.map(c=>({label:c,type:"property"})),validFor:st}}function Ki(O,e,a,t,i){var r;let s=(r=a.parent)===null||r===void 0?void 0:r.getChild("AttributeName"),n=[],o;if(s){let c=O.sliceDoc(s.from,s.to),h=e.globalAttrs[c];if(!h){let Q=Qe(a),f=Q?e.tags[_(O.doc,Q)]:null;h=(f==null?void 0:f.attrs)&&f.attrs[c]}if(h){let Q=O.sliceDoc(t,i).toLowerCase(),f='"',u='"';/^['"]/.test(Q)?(o=Q[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",u=O.sliceDoc(i,i+1)==Q[0]?"":Q[0],Q=Q.slice(1),t++):o=/^[^\s<>='"]*$/;for(let d of h)n.push({label:d,apply:f+d+u,type:"constant"})}}return{from:t,to:i,options:n,validFor:o}}function er(O,e){let{state:a,pos:t}=e,i=W(a).resolveInner(t),r=i.resolve(t,-1);for(let s=t,n;i==r&&(n=r.childBefore(s));){let o=n.lastChild;if(!o||!o.type.isError||o.fromer(t,i)}const nt=[{tag:"script",attrs:O=>O.type=="text/typescript"||O.lang=="ts",parser:KO.parser},{tag:"script",attrs:O=>O.type=="text/babel"||O.type=="text/jsx",parser:et.parser},{tag:"script",attrs:O=>O.type=="text/typescript-jsx",parser:Ot.parser},{tag:"script",attrs(O){return!O.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(O.type)},parser:k.parser},{tag:"style",attrs(O){return(!O.lang||O.lang=="css")&&(!O.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(O.type))},parser:te.parser}],lt=[{name:"style",parser:te.parser.configure({top:"Styles"})}].concat(it.map(O=>({name:O,parser:k.parser}))),ot=se.define({name:"html",parser:La.configure({props:[ne.add({Element(O){let e=/^(\s*)(<\/)?/.exec(O.textAfter);return O.node.to<=O.pos+e[0].length?O.continue():O.lineIndent(O.node.from)+(e[2]?0:O.unit)},"OpenTag CloseTag SelfClosingTag"(O){return O.column(O.node.from)+O.unit},Document(O){if(O.pos+/\s*/.exec(O.textAfter)[0].lengthO.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),M=ot.configure({wrap:EO(nt,lt)});function tr(O={}){let e="",a;O.matchClosingTags===!1&&(e="noMatch"),O.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(O.nestedLanguages&&O.nestedLanguages.length||O.nestedAttributes&&O.nestedAttributes.length)&&(a=EO((O.nestedLanguages||[]).concat(nt),(O.nestedAttributes||[]).concat(lt)));let t=a?ot.configure({wrap:a,dialect:e}):e?M.configure({dialect:e}):M;return new oe(t,[M.data.of({autocomplete:Or(O)}),O.autoCloseTags!==!1?ar:[],tt().support,mi().support])}const SO=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),ar=Y.inputHandler.of((O,e,a,t)=>{if(O.composing||O.state.readOnly||e!=a||t!=">"&&t!="/"||!M.isActiveAt(O.state,e,-1))return!1;let{state:i}=O,r=i.changeByRange(s=>{var n,o,c;let{head:h}=s,Q=W(i).resolveInner(h,-1),f;if((Q.name=="TagName"||Q.name=="StartTag")&&(Q=Q.parent),t==">"&&Q.name=="OpenTag"){if(((o=(n=Q.parent)===null||n===void 0?void 0:n.lastChild)===null||o===void 0?void 0:o.name)!="CloseTag"&&(f=_(i.doc,Q.parent,h))&&!SO.has(f)){let u=O.state.doc.sliceString(h,h+1)===">",d=`${u?"":">"}`;return{range:z.cursor(h+1),changes:{from:h+(u?1:0),insert:d}}}}else if(t=="/"&&Q.name=="OpenTag"){let u=Q.parent,d=u==null?void 0:u.parent;if(u.from==h-1&&((c=d.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(f=_(i.doc,d,h))&&!SO.has(f)){let $=O.state.doc.sliceString(h,h+1)===">",g=`/${f}${$?"":">"}`,x=h+g.length+($?1:0);return{range:z.cursor(x),changes:{from:h,insert:g}}}}return{range:s}});return r.changes.empty?!1:(O.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}),ir=36,$O=1,rr=2,B=3,me=4,sr=5,nr=6,lr=7,or=8,Qr=9,cr=10,ur=11,hr=12,fr=13,pr=14,dr=15,Sr=16,$r=17,gO=18,gr=19,Qt=20,ct=21,PO=22,Pr=23,mr=24;function we(O){return O>=65&&O<=90||O>=97&&O<=122||O>=48&&O<=57}function Xr(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function v(O,e,a){for(let t=!1;;){if(O.next<0)return;if(O.next==e&&!t){O.advance();return}t=a&&!t&&O.next==92,O.advance()}}function Zr(O){for(;;){if(O.next<0||O.peek(1)<0)return;if(O.next==36&&O.peek(1)==36){O.advance(2);return}O.advance()}}function ut(O,e){for(;!(O.next!=95&&!we(O.next));)e!=null&&(e+=String.fromCharCode(O.next)),O.advance();return e}function br(O){if(O.next==39||O.next==34||O.next==96){let e=O.next;O.advance(),v(O,e,!1)}else ut(O)}function mO(O,e){for(;O.next==48||O.next==49;)O.advance();e&&O.next==e&&O.advance()}function XO(O,e){for(;;){if(O.next==46){if(e)break;e=!0}else if(O.next<48||O.next>57)break;O.advance()}if(O.next==69||O.next==101)for(O.advance(),(O.next==43||O.next==45)&&O.advance();O.next>=48&&O.next<=57;)O.advance()}function ZO(O){for(;!(O.next<0||O.next==10);)O.advance()}function T(O,e){for(let a=0;a!=&|~^/",specialVar:"?",identifierQuotes:'"',words:ht(kr,wr)};function yr(O,e,a,t){let i={};for(let r in ke)i[r]=(O.hasOwnProperty(r)?O:ke)[r];return e&&(i.words=ht(e,a||"",t)),i}function ft(O){return new b(e=>{var a;let{next:t}=e;if(e.advance(),T(t,bO)){for(;T(e.next,bO);)e.advance();e.acceptToken(ir)}else if(t==36&&e.next==36&&O.doubleDollarQuotedStrings)Zr(e),e.acceptToken(B);else if(t==39||t==34&&O.doubleQuotedStrings)v(e,t,O.backslashEscapes),e.acceptToken(B);else if(t==35&&O.hashComments||t==47&&e.next==47&&O.slashComments)ZO(e),e.acceptToken($O);else if(t==45&&e.next==45&&(!O.spaceAfterDashes||e.peek(1)==32))ZO(e),e.acceptToken($O);else if(t==47&&e.next==42){e.advance();for(let i=1;;){let r=e.next;if(e.next<0)break;if(e.advance(),r==42&&e.next==47){if(i--,e.advance(),!i)break}else r==47&&e.next==42&&(i++,e.advance())}e.acceptToken(rr)}else if((t==101||t==69)&&e.next==39)e.advance(),v(e,39,!0);else if((t==110||t==78)&&e.next==39&&O.charSetCasts)e.advance(),v(e,39,O.backslashEscapes),e.acceptToken(B);else if(t==95&&O.charSetCasts)for(let i=0;;i++){if(e.next==39&&i>1){e.advance(),v(e,39,O.backslashEscapes),e.acceptToken(B);break}if(!we(e.next))break;e.advance()}else if(t==40)e.acceptToken(lr);else if(t==41)e.acceptToken(or);else if(t==123)e.acceptToken(Qr);else if(t==125)e.acceptToken(cr);else if(t==91)e.acceptToken(ur);else if(t==93)e.acceptToken(hr);else if(t==59)e.acceptToken(fr);else if(O.unquotedBitLiterals&&t==48&&e.next==98)e.advance(),mO(e),e.acceptToken(PO);else if((t==98||t==66)&&(e.next==39||e.next==34)){const i=e.next;e.advance(),O.treatBitsAsBytes?(v(e,i,O.backslashEscapes),e.acceptToken(Pr)):(mO(e,i),e.acceptToken(PO))}else if(t==48&&(e.next==120||e.next==88)||(t==120||t==88)&&e.next==39){let i=e.next==39;for(e.advance();Xr(e.next);)e.advance();i&&e.next==39&&e.advance(),e.acceptToken(me)}else if(t==46&&e.next>=48&&e.next<=57)XO(e,!0),e.acceptToken(me);else if(t==46)e.acceptToken(pr);else if(t>=48&&t<=57)XO(e,!1),e.acceptToken(me);else if(T(t,O.operatorChars)){for(;T(e.next,O.operatorChars);)e.advance();e.acceptToken(dr)}else if(T(t,O.specialVar))e.next==t&&e.advance(),br(e),e.acceptToken($r);else if(T(t,O.identifierQuotes))v(e,t,!1),e.acceptToken(gr);else if(t==58||t==44)e.acceptToken(Sr);else if(we(t)){let i=ut(e,String.fromCharCode(t));e.acceptToken(e.next==46?gO:(a=O.words[i.toLowerCase()])!==null&&a!==void 0?a:gO)}})}const pt=ft(ke),xr=U.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,pt],topRules:{Script:[0,25]},tokenPrec:0});function ye(O){let e=O.cursor().moveTo(O.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function A(O,e){let a=O.sliceString(e.from,e.to),t=/^([`'"])(.*)\1$/.exec(a);return t?t[2]:a}function ie(O){return O&&(O.name=="Identifier"||O.name=="QuotedIdentifier")}function vr(O,e){if(e.name=="CompositeIdentifier"){let a=[];for(let t=e.firstChild;t;t=t.nextSibling)ie(t)&&a.push(A(O,t));return a}return[A(O,e)]}function wO(O,e){for(let a=[];;){if(!e||e.name!=".")return a;let t=ye(e);if(!ie(t))return a;a.unshift(A(O,t)),e=ye(t)}}function Yr(O,e){let a=W(O).resolveInner(e,-1),t=Tr(O.doc,a);return a.name=="Identifier"||a.name=="QuotedIdentifier"||a.name=="Keyword"?{from:a.from,quoted:a.name=="QuotedIdentifier"?O.doc.sliceString(a.from,a.from+1):null,parents:wO(O.doc,ye(a)),aliases:t}:a.name=="."?{from:e,quoted:null,parents:wO(O.doc,a),aliases:t}:{from:e,quoted:null,parents:[],empty:!0,aliases:t}}const Ur=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function Tr(O,e){let a;for(let i=e;!a;i=i.parent){if(!i)return null;i.name=="Statement"&&(a=i)}let t=null;for(let i=a.firstChild,r=!1,s=null;i;i=i.nextSibling){let n=i.name=="Keyword"?O.sliceString(i.from,i.to).toLowerCase():null,o=null;if(!r)r=n=="from";else if(n=="as"&&s&&ie(i.nextSibling))o=A(O,i.nextSibling);else{if(n&&Ur.has(n))break;s&&ie(i)&&(o=A(O,i))}o&&(t||(t=Object.create(null)),t[o]=vr(O,s)),s=/Identifier$/.test(i.name)?i:null}return t}function qr(O,e){return O?e.map(a=>Object.assign(Object.assign({},a),{label:O+a.label+O,apply:void 0})):e}const _r=/^\w*$/,Wr=/^[`'"]?\w*[`'"]?$/;class qe{constructor(){this.list=[],this.children=void 0}child(e){let a=this.children||(this.children=Object.create(null));return a[e]||(a[e]=new qe)}childCompletions(e){return this.children?Object.keys(this.children).filter(a=>a).map(a=>({label:a,type:e})):[]}}function Vr(O,e,a,t,i){let r=new qe,s=r.child(i||"");for(let n in O){let o=n.indexOf("."),h=(o>-1?r.child(n.slice(0,o)):s).child(o>-1?n.slice(o+1):n);h.list=O[n].map(Q=>typeof Q=="string"?{label:Q,type:"property"}:Q)}s.list=(e||s.childCompletions("type")).concat(t?s.child(t).list:[]);for(let n in r.children){let o=r.child(n);o.list.length||(o.list=o.childCompletions("type"))}return r.list=s.list.concat(a||r.childCompletions("type")),n=>{let{parents:o,from:c,quoted:h,empty:Q,aliases:f}=Yr(n.state,n.pos);if(Q&&!n.explicit)return null;f&&o.length==1&&(o=f[o[0]]||o);let u=r;for(let g of o){for(;!u.children||!u.children[g];)if(u==r)u=s;else if(u==s&&t)u=u.child(t);else return null;u=u.child(g)}let d=h&&n.state.sliceDoc(n.pos,n.pos+1)==h,$=u.list;return u==r&&f&&($=$.concat(Object.keys(f).map(g=>({label:g,type:"constant"})))),{from:c,to:d?n.pos+1:void 0,options:qr(h,$),validFor:h?Wr:_r}}}function Cr(O,e){let a=Object.keys(O).map(t=>({label:e?t.toUpperCase():t,type:O[t]==ct?"type":O[t]==Qt?"keyword":"variable",boost:-1}));return vO(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],YO(a))}let Rr=xr.configure({props:[ne.add({Statement:G()}),le.add({Statement(O){return{from:O.firstChild.to,to:O.to}},BlockComment(O){return{from:O.from+2,to:O.to-2}}}),re({Keyword:l.keyword,Type:l.typeName,Builtin:l.standard(l.name),Bits:l.number,Bytes:l.string,Bool:l.bool,Null:l.null,Number:l.number,String:l.string,Identifier:l.name,QuotedIdentifier:l.special(l.string),SpecialVar:l.special(l.name),LineComment:l.lineComment,BlockComment:l.blockComment,Operator:l.operator,"Semi Punctuation":l.punctuation,"( )":l.paren,"{ }":l.brace,"[ ]":l.squareBracket})]});class I{constructor(e,a){this.dialect=e,this.language=a}get extension(){return this.language.extension}static define(e){let a=yr(e,e.keywords,e.types,e.builtin),t=se.define({name:"sql",parser:Rr.configure({tokenizers:[{from:pt,to:ft(a)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new I(a,t)}}function jr(O,e=!1){return Cr(O.dialect.words,e)}function Gr(O,e=!1){return O.language.data.of({autocomplete:jr(O,e)})}function zr(O){return O.schema?Vr(O.schema,O.tables,O.schemas,O.defaultTable,O.defaultSchema):()=>null}function Ar(O){return O.schema?(O.dialect||dt).language.data.of({autocomplete:zr(O)}):[]}function kO(O={}){let e=O.dialect||dt;return new oe(e.language,[Ar(O),Gr(e,!!O.upperCaseKeywords)])}const dt=I.define({});function Ir(O){let e;return{c(){e=Xt("div"),Zt(e,"class","code-editor"),E(e,"min-height",O[0]?O[0]+"px":null),E(e,"max-height",O[1]?O[1]+"px":"auto")},m(a,t){bt(a,e,t),O[11](e)},p(a,[t]){t&1&&E(e,"min-height",a[0]?a[0]+"px":null),t&2&&E(e,"max-height",a[1]?a[1]+"px":"auto")},i:Re,o:Re,d(a){a&&wt(e),O[11](null)}}}function Er(O,e,a){let t;kt(O,yt,S=>a(12,t=S));const i=xt();let{id:r=""}=e,{value:s=""}=e,{minHeight:n=null}=e,{maxHeight:o=null}=e,{disabled:c=!1}=e,{placeholder:h=""}=e,{language:Q="javascript"}=e,{singleLine:f=!1}=e,u,d,$=new N,g=new N,x=new N,_e=new N;function ce(){u==null||u.focus()}function St(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0})),i("change",s)}function We(){if(!r)return;const S=document.querySelectorAll('[for="'+r+'"]');for(let P of S)P.removeEventListener("click",ce)}function Ve(){if(!r)return;We();const S=document.querySelectorAll('[for="'+r+'"]');for(let P of S)P.addEventListener("click",ce)}function Ce(){switch(Q){case"html":return tr();case"sql-create-index":return kO({dialect:I.define({keywords:"create unique index if not exists on collate asc desc where like isnull notnull date time datetime unixepoch strftime lower upper substr case when then iif if else json_extract json_each json_tree json_array_length json_valid ",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"}),upperCaseKeywords:!0});case"sql-select":let S={};for(let P of t)S[P.name]=Yt.getAllCollectionIdentifiers(P);return kO({dialect:I.define({keywords:"select distinct from where having group by order limit offset join left right inner with like not in match asc desc regexp isnull notnull glob count avg sum min max current random cast as int real text date time datetime unixepoch strftime coalesce lower upper substr case when then iif if else json_extract json_each json_tree json_array_length json_valid ",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"}),schema:S,upperCaseKeywords:!0});default:return tt()}}vt(()=>{const S={key:"Enter",run:P=>{f&&i("submit",s)}};return Ve(),a(10,u=new Y({parent:d,state:V.create({doc:s,extensions:[zt(),At(),It(),Et(),Nt(),V.allowMultipleSelections.of(!0),Bt(Dt,{fallback:!0}),Jt(),Lt(),Mt(),Ft(),Ht.of([S,...Kt,...ea,Oa.find(P=>P.key==="Mod-d"),...ta,...aa]),Y.lineWrapping,ia({icons:!1}),$.of(Ce()),_e.of(je(h)),g.of(Y.editable.of(!0)),x.of(V.readOnly.of(!1)),V.transactionFilter.of(P=>f&&P.newDoc.lines>1?[]:P),Y.updateListener.of(P=>{!P.docChanged||c||(a(3,s=P.state.doc.toString()),St())})]})})),()=>{We(),u==null||u.destroy()}});function $t(S){Ut[S?"unshift":"push"](()=>{d=S,a(2,d)})}return O.$$set=S=>{"id"in S&&a(4,r=S.id),"value"in S&&a(3,s=S.value),"minHeight"in S&&a(0,n=S.minHeight),"maxHeight"in S&&a(1,o=S.maxHeight),"disabled"in S&&a(5,c=S.disabled),"placeholder"in S&&a(6,h=S.placeholder),"language"in S&&a(7,Q=S.language),"singleLine"in S&&a(8,f=S.singleLine)},O.$$.update=()=>{O.$$.dirty&16&&r&&Ve(),O.$$.dirty&1152&&u&&Q&&u.dispatch({effects:[$.reconfigure(Ce())]}),O.$$.dirty&1056&&u&&typeof c<"u"&&u.dispatch({effects:[g.reconfigure(Y.editable.of(!c)),x.reconfigure(V.readOnly.of(c))]}),O.$$.dirty&1032&&u&&s!=u.state.doc.toString()&&u.dispatch({changes:{from:0,to:u.state.doc.length,insert:s}}),O.$$.dirty&1088&&u&&typeof h<"u"&&u.dispatch({effects:[_e.reconfigure(je(h))]})},[n,o,d,s,r,c,h,Q,f,ce,u,$t]}class Dr extends gt{constructor(e){super(),Pt(this,e,Er,Ir,mt,{id:4,value:3,minHeight:0,maxHeight:1,disabled:5,placeholder:6,language:7,singleLine:8,focus:9})}get focus(){return this.$$.ctx[9]}}export{Dr as default}; diff --git a/ui/dist/assets/CodeEditor-f746b79b.js b/ui/dist/assets/CodeEditor-f746b79b.js deleted file mode 100644 index 812826f5c..000000000 --- a/ui/dist/assets/CodeEditor-f746b79b.js +++ /dev/null @@ -1,14 +0,0 @@ -import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,U as E,g as bt,y as Re,o as wt,I as kt,J as yt,K as xt,H as vt,C as Yt,L as Ut}from"./index-38223559.js";import{P as Tt,N as qt,u as _t,D as Wt,v as xe,T as D,I as ve,w as re,x as l,y as Vt,L as se,z as ne,A as G,B as le,F as yO,G as oe,H as W,J as xO,K as vO,M as YO,E as Y,O as z,Q as Ct,R as Rt,U as UO,V as X,W as jt,X as Gt,a as V,h as zt,b as At,c as It,d as Et,e as Nt,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ft,k as Ht,j as Kt,l as ea,m as Oa,n as ta,o as aa,p as ia,q as je,C as N}from"./index-be8a2174.js";class F{constructor(e,a,t,i,r,s,n,o,c,h=0,Q){this.p=e,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let i=e.parser.context;return new F(e,[],a,t,t,0,[],0,i?new Ge(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,i=e&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,a,t,i=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(e,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(e,a,t){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=e,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(e,a,t){e&65536?this.reduce(e):this.shift(e,a,t)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),i=e.bufferBase+a;for(;e&&i==e.bufferBase;)e=e.parent;return new F(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=e&65535,r=this.stack.length-t*3;if(r<0||a.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ge{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}var ze;(function(O){O[O.Insert=200]="Insert",O[O.Delete=190]="Delete",O[O.Reduce=100]="Reduce",O[O.MaxNext=4]="MaxNext",O[O.MaxInsertStackDepth=300]="MaxInsertStackDepth",O[O.DampenInsertStackDepth=120]="DampenInsertStackDepth",O[O.MinBigReduction=2e3]="MinBigReduction"})(ze||(ze={}));class ra{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class H{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new H(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new H(this.stack,this.pos,this.index)}}function j(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new e(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ae=new J;class sa{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ae,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,i=this.rangeIndex,r=this.pos+e;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ae,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>e&&(t+=this.input.read(Math.max(i.from,e),Math.min(i.to,a)))}return t}}class q{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;TO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}q.prototype.contextual=q.prototype.fallback=q.prototype.extend=!1;class Xe{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?j(e):e}token(e,a){let t=e.pos,i=0;for(;TO(this.data,e,a,0,this.data,this.precTable),!(e.token.value>-1);){if(this.elseToken==null)return;if(e.next<0)break;e.advance(),e.reset(e.pos,e.token),i++}i&&(e.reset(t,e.token),e.acceptToken(this.elseToken,i))}}Xe.prototype.contextual=q.prototype.fallback=q.prototype.extend=!1;class b{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function TO(O,e,a,t,i,r){let s=0,n=1<0){let d=O[u];if(o.allows(d)&&(e.token.value==-1||e.token.value==d||na(d,e.token.value,i,r))){e.acceptToken(d);break}}let h=e.next,Q=0,f=O[s+2];if(e.next<0&&f>Q&&O[c+f*3-3]==65535&&O[c+f*3-3]==65535){s=O[c+f*3-1];continue e}for(;Q>1,d=c+u+(u<<1),$=O[d],g=O[d+1]||65536;if(h<$)f=u;else if(h>=g)Q=u+1;else{s=O[d+2],e.advance();continue e}}break}}function Ie(O,e,a){for(let t=e,i;(i=O[t])!=65535;t++)if(i==a)return t-e;return-1}function na(O,e,a,t){let i=Ie(a,t,e);return i<0||Ie(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class la{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ne(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ne(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(r instanceof D){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[a]++,this.nextStart=s+r.length}}}class oa{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new J)}getActions(e){let a=0,t=null,{parser:i}=e.p,{tokenizers:r}=i,s=i.stateSlot(e.state,3),n=e.curContext?e.curContext.hash:0,o=0;for(let c=0;cQ.end+25&&(o=Math.max(Q.lookAhead,o)),Q.value!=0)){let f=a;if(Q.extended>-1&&(a=this.addActions(e,Q.extended,Q.end,a)),a=this.addActions(e,Q.value,Q.end,a),!h.extend&&(t=Q,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new J,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=e;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(e,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,e),t),e.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?e.extended=n>>1:e.value=n>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,a,t,i){for(let r=0;re.bufferLength*4?new la(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,e))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ua(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let s=0;s500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,h=c?e.curContext.hash:0;for(let Q=this.fragments.nodeAt(i);Q;){let f=this.parser.nodeSet.types[Q.type.id]==Q.type?r.getGoto(e.state,Q.type.id):-1;if(f>-1&&Q.length&&(!c||(Q.prop(xe.contextHash)||0)==h))return e.useNode(Q,f),Z&&console.log(s+this.stackID(e)+` (via reuse of ${r.getName(Q.type.id)})`),!0;if(!(Q instanceof D)||Q.children.length==0||Q.positions[0]>0)break;let u=Q.children[0];if(u instanceof D&&Q.positions[0]==0)Q=u;else break}}let n=r.stateSlot(e.state,4);if(n>0)return e.reduce(n),Z&&console.log(s+this.stackID(e)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let c=0;ci?a.push(d):t.push(d)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return De(e,a),!0}}runRecovery(e,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let Q=n.split(),f=h;for(let u=0;Q.forceReduce()&&u<10&&(Z&&console.log(f+this.stackID(Q)+" (via force-reduce)"),!this.advanceFully(Q,t));u++)Z&&(f=this.stackID(Q)+" -> ");for(let u of n.recoverByInsert(o))Z&&console.log(h+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,t);this.stream.end>n.pos?(c==n.pos&&(c++,o=0),n.recoverByDelete(o,c),Z&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),De(n,t)):(!i||i.scoreO;class qO{constructor(e){this.start=e.start,this.shift=e.shift||he,this.reduce=e.reduce||he,this.reuse=e.reuse||he,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class U extends Tt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;ne.topRules[n][1]),i=[];for(let n=0;n=0)r(h,o,n[c++]);else{let Q=n[c+-h];for(let f=-h;f>0;f--)r(n[c++],o,Q);c++}}}this.nodeSet=new qt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Wt;let s=j(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new q(s,n):n),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let i=new Qa(this,e,a,t);for(let r of this.wrappers)i=r(i,e,a,t);return i}getGoto(e,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let c=r+(s>>1);r0}validAction(e,a){if(a==this.stateSlot(e,4))return!0;for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=w(this.data,t+2);else return!1;if(a==w(this.data,t+1))return!0}}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=w(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(e){let a=Object.assign(Object.create(U.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(r=>r.from==t);return i?i.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=e.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=Je(s),s})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let r of e.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const ha=54,fa=1,pa=55,da=2,Sa=56,$a=3,Le=4,ga=5,K=6,_O=7,WO=8,VO=9,CO=10,Pa=11,ma=12,Xa=13,fe=57,Za=14,Me=58,RO=20,ba=22,jO=23,wa=24,Ze=26,GO=27,ka=28,ya=31,xa=34,va=36,Ya=37,Ua=0,Ta=1,qa={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fe={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Wa(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function zO(O){return O==9||O==10||O==13||O==32}let He=null,Ke=null,eO=0;function be(O,e){let a=O.pos+e;if(eO==a&&Ke==O)return He;let t=O.peek(e);for(;zO(t);)t=O.peek(++e);let i="";for(;Wa(t);)i+=String.fromCharCode(t),t=O.peek(++e);return Ke=O,eO=a,He=i?i.toLowerCase():t==Va||t==Ca?void 0:null}const AO=60,ee=62,Ye=47,Va=63,Ca=33,Ra=45;function OO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new OO(be(t,1)||"",O):O},reduce(O,e){return e==RO&&O?O.parent:O},reuse(O,e,a,t){let i=e.type.id;return i==K||i==va?new OO(be(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),za=new b((O,e)=>{if(O.next!=AO){O.next<0&&e.context&&O.acceptToken(fe);return}O.advance();let a=O.next==Ye;a&&O.advance();let t=be(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?Za:K);let i=e.context?e.context.name:null;if(a){if(t==i)return O.acceptToken(Pa);if(i&&_a[i])return O.acceptToken(fe,-2);if(e.dialectEnabled(Ua))return O.acceptToken(ma);for(let r=e.context;r;r=r.parent)if(r.name==t)return;O.acceptToken(Xa)}else{if(t=="script")return O.acceptToken(_O);if(t=="style")return O.acceptToken(WO);if(t=="textarea")return O.acceptToken(VO);if(qa.hasOwnProperty(t))return O.acceptToken(CO);i&&Fe[i]&&Fe[i][t]?O.acceptToken(fe,-1):O.acceptToken(K)}},{contextual:!0}),Aa=new b(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Me);break}if(O.next==Ra)e++;else if(O.next==ee&&e>=2){a>3&&O.acceptToken(Me,-2);break}else e=0;O.advance()}});function Ia(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const Ea=new b((O,e)=>{if(O.next==Ye&&O.peek(1)==ee){let a=e.dialectEnabled(Ta)||Ia(e.context);O.acceptToken(a?ga:Le,2)}else O.next==ee&&O.acceptToken(Le,1)});function Ue(O,e,a){let t=2+O.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(e);break}if(r==0&&i.next==AO||r==1&&i.next==Ye||r>=2&&rs?i.acceptToken(e,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(e,1);break}else r=s=0;i.advance()}})}const Na=Ue("script",ha,fa),Ba=Ue("style",pa,da),Da=Ue("textarea",Sa,$a),Ja=re({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=U.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ga,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Na,Ba,Da,Ea,za,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function IO(O,e){let a=Object.create(null);for(let t of O.getChildren(jO)){let i=t.getChild(wa),r=t.getChild(Ze)||t.getChild(GO);i&&(a[e.read(i.from,i.to)]=r?r.type.id==Ze?e.read(r.from+1,r.to-1):e.read(r.from,r.to):"")}return a}function tO(O,e){let a=O.getChild(ba);return a?e.read(a.from,a.to):" "}function pe(O,e,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=IO(O.node.parent.firstChild,e))))return{parser:i.parser};return null}function EO(O=[],e=[]){let a=[],t=[],i=[],r=[];for(let n of O)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=e.length?Object.create(null):null;for(let n of e)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let c=n.type.id;if(c==ka)return pe(n,o,a);if(c==ya)return pe(n,o,t);if(c==xa)return pe(n,o,i);if(c==RO&&r.length){let h=n.node,Q=h.firstChild,f=Q&&tO(Q,o),u;if(f){for(let d of r)if(d.tag==f&&(!d.attrs||d.attrs(u||(u=IO(h,o))))){let $=h.lastChild;return{parser:d.parser,overlay:[{from:Q.to,to:$.type.id==Ya?$.from:h.to}]}}}}if(s&&c==jO){let h=n.node,Q;if(Q=h.firstChild){let f=s[o.read(Q.from,Q.to)];if(f)for(let u of f){if(u.tagName&&u.tagName!=tO(h.parent,o))continue;let d=h.lastChild;if(d.type.id==Ze){let $=d.from+1,g=d.lastChild,x=d.to-(g&&g.isError?0:1);if(x>$)return{parser:u.parser,overlay:[{from:$,to:x}]}}else if(d.type.id==GO)return{parser:u.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}const Ma=94,aO=1,Fa=95,Ha=96,iO=2,NO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,ei=40,BO=95,Oi=91,L=45,ti=46,ai=35,ii=37;function Oe(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function ri(O){return O>=48&&O<=57}const si=new b((O,e)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=O;if(Oe(r)||r==L||r==BO||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,O.advance();else{a&&O.acceptToken(r==ei?Fa:t==2&&e.canShift(iO)?iO:Ha);break}}}),ni=new b(O=>{if(NO.includes(O.peek(-1))){let{next:e}=O;(Oe(e)||e==BO||e==ai||e==ti||e==Oi||e==Ka||e==L)&&O.acceptToken(Ma)}}),li=new b(O=>{if(!NO.includes(O.peek(-1))){let{next:e}=O;if(e==ii&&(O.advance(),O.acceptToken(aO)),Oe(e)){do O.advance();while(Oe(O.next));O.acceptToken(aO)}}}),oi=re({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},ui={__proto__:null,not:128,only:128,from:158,to:160},hi=U.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:O=>Qi[O]||-1},{term:56,get:O=>ci[O]||-1},{term:96,get:O=>ui[O]||-1}],tokenPrec:1123});let de=null;function Se(){if(!de&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));de=e.sort().map(t=>({type:"property",label:t}))}return de||[]}const rO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),sO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),fi=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,pi=/^-(-[\w-]*)?$/;function di(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const nO=new xO,Si=["Declaration"];function $i(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function DO(O,e,a){if(e.to-e.from>4096){let t=nO.get(e);if(t)return t;let i=[],r=new Set,s=e.cursor(ve.IncludeAnonymous);if(s.firstChild())do for(let n of DO(O,s.node,a))r.has(n.label)||(r.add(n.label),i.push(n));while(s.nextSibling());return nO.set(e,i),i}else{let t=[],i=new Set;return e.cursor().iterate(r=>{var s;if(a(r)&&r.matchContext(Si)&&((s=r.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let n=O.sliceString(r.from,r.to);i.has(n)||(i.add(n),t.push({label:n,type:"variable"}))}}),t}}const gi=O=>e=>{let{state:a,pos:t}=e,i=W(a).resolveInner(t,-1),r=i.type.isError&&i.from==i.to-1&&a.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(r||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Se(),validFor:y};if(i.name=="ValueName")return{from:i.from,options:sO,validFor:y};if(i.name=="PseudoClassName")return{from:i.from,options:rO,validFor:y};if(O(i)||(e.explicit||r)&&di(i,a.doc))return{from:O(i)||r?i.from:t,options:DO(a.doc,$i(i),O),validFor:pi};if(i.name=="TagName"){for(let{parent:o}=i;o;o=o.parent)if(o.name=="Block")return{from:i.from,options:Se(),validFor:y};return{from:i.from,options:fi,validFor:y}}if(!e.explicit)return null;let s=i.resolve(t),n=s.childBefore(t);return n&&n.name==":"&&s.name=="PseudoClassSelector"?{from:t,options:rO,validFor:y}:n&&n.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:t,options:sO,validFor:y}:s.name=="Block"||s.name=="Styles"?{from:t,options:Se(),validFor:y}:null},Pi=gi(O=>O.name=="VariableName"),te=se.define({name:"css",parser:hi.configure({props:[ne.add({Declaration:G()}),le.add({Block:yO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mi(){return new oe(te,te.data.of({autocomplete:Pi}))}const lO=302,oO=1,Xi=2,QO=303,Zi=305,bi=306,wi=3,ki=4,yi=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],JO=125,xi=59,cO=47,vi=42,Yi=43,Ui=45,Ti=new qO({start:!1,shift(O,e){return e==wi||e==ki||e==Zi?O:e==bi},strict:!1}),qi=new b((O,e)=>{let{next:a}=O;(a==JO||a==-1||e.context)&&e.canShift(QO)&&O.acceptToken(QO)},{contextual:!0,fallback:!0}),_i=new b((O,e)=>{let{next:a}=O,t;yi.indexOf(a)>-1||a==cO&&((t=O.peek(1))==cO||t==vi)||a!=JO&&a!=xi&&a!=-1&&!e.context&&e.canShift(lO)&&O.acceptToken(lO)},{contextual:!0}),Wi=new b((O,e)=>{let{next:a}=O;if((a==Yi||a==Ui)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(oO);O.acceptToken(t?oO:Xi)}},{contextual:!0}),Vi=re({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Ci={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Ri={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},ji={__proto__:null,"<":137},Gi=U.deserialize({version:14,states:"$6[O`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#Ei'#EiOOQO'#Ib'#IbO0}QSO'#GkO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#KO'#KOO8yQSO'#IOO9OQ(C[O'#IPOOQQ'#JP'#JPOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HnO>VQ(C]O'#HtO%QQUO'#HvO>bQ(C]O'#HxO>mQ(C]O'#HzO9OQ(C[O'#H|O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOOQO'#Jk'#JkOOQO'#I_'#I_OAxQWO'#E`OOQ(CW'#E_'#E_OBtQ(C`O'#E`OCOQWO'#ESOOQO'#Jj'#JjOCdQWO'#JkODqQWO'#ESOCOQWO'#E`PEOO?MpO'#C`POOO)CDn)CDnOOOO'#IU'#IUOEZOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEiO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEwO07`O,59uOOQ(CY,59u,59uOFVQUO'#IYOFjQSO'#JeOHlQbO'#JeO+sQUO'#JeOHsQSO,59{OIZQSO'#EiOIhQSO'#JsOIsQSO'#JrOIsQSO'#JrOI{QSO,5;VOJQQSO'#JqOOQ(CY,5:W,5:WOJXQUO,5:WOLYQ(CjO,5:bOLyQSO,5:jOMdQ(C[O'#JpOMkQSO'#JoO:vQSO'#JoONPQSO'#JoONXQSO,5;UON^QSO'#JoO!!fQbO'#JdOOQ(CY'#Cf'#CfO%QQUO'#EOO!#UQ`O,5:oOOQO'#Jl'#JlOOQO-E<`-E<`O9_QSO,5=VO!#lQSO,5=VO!#qQUO,5;SO!%tQ,UO'#EdO!'XQSO,5;SO!(qQ,UO'#DpO!(xQUO'#DuO!)SQWO,5;]O!)[QWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!)jQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!+mQSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!+uQ(C[O,5jOOQQ'#JX'#JXOOQQ,5>k,5>kOOQQ-ERQ(C[O'#JYO8tQSO'#JYO!>dQ(C[O,59WO!>oQWO,59WO!>wQ,UO,59WO9dQ,UO,59WO!?SQSO,5;SO!?[QSO'#HWO!?mQSO'#KSO%QQUO,5;wO!?uQWO,5;yO!?zQSO,5=qO!@PQSO,5=qO!@UQSO,5=qO9OQ(C[O,5=qO!@dQSO'#EkO!A^QWO'#ElOOQ(CW'#Jq'#JqO!AeQ(C[O'#KPO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!ApQWO,5=^O!AxQ,UO,5=_O!BTQSO,5=aO!BYQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!BbQSO'#HPO9dQ,UO'#HRO!BgQSO'#HROOQQ,5=g,5=gO!BlQSO'#HSO!BtQSO'#ClO!ByQSO,58|O!CTQSO,58|O!E]QUO,58|OOQQ,58|,58|O!EjQ(C[O,58|O%QQUO,58|O!EuQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!FVQSO,5=sO`QUO,5=yO`QUO,5={O!F[QSO,5=}O`QUO,5>PO!FaQSO,5>SO!FfQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O9OQ(C[O,5>bOOQQ,5>d,5>dO!JmQSO,5>dOOQQ,5>f,5>fO!JmQSO,5>fOOQQ,5>h,5>hO!JrQWO'#DXO%QQUO'#JgO!KaQWO'#JgO!LOQWO'#DgO!LaQWO'#DgO!NrQUO'#DgO!NyQSO'#JfO# RQSO,5:QO# WQSO'#EmO# fQSO'#JtO# nQSO,5;WO# sQWO'#DgO#!QQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO#!XQSO,5:kO>QQSO,5;RO!>oQWO,5;RO!>wQ,UO,5;RO9dQ,UO,5;RO#!aQSO,5@RO#!fQ!LQO,5:oOOQO-E<]-E<]O##lQ(C`O,5:zOCOQWO,5:nO##vQWO,5:nOCOQWO,5:zO!>dQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%QQUO,5:zO#$TQ(C[O,5:zO#$`Q(C[O,5:zO!>oQWO,5:nOOQO,5;Q,5;QO#$nQ(C[O,5:zPOOO'#IS'#ISP#%SO?MpO,58zPOOO,58z,58zOOOO-EtO+sQUO,5>tOOQO,5>z,5>zO#%nQUO'#IYOOQO-EdQ(C[O1G.rO!>oQWO1G.rO!>wQ,UO1G.rO$%YQSO1G0nO$%_QSO'#CfO$%jQSO'#KTO$%rQSO,5=rO$%wQSO'#KTO$%|QSO'#KTO$&XQSO'#IsO$&gQSO,5@nO$&oQbO1G1cOOQ(CY1G1e1G1eO9_QSO1G3]O?rQSO1G3]O$&vQSO1G3]O$&{QSO1G3]OOQQ1G3]1G3]O:vQSO'#JrO:vQSO'#EmO%QQUO'#EmO:vQSO'#ImO$'QQ(C[O,5@kOOQQ1G2u1G2uO!BTQSO1G2{O!%tQ,UO1G2xO$']QSO1G2xOOQQ1G2y1G2yO!%tQ,UO1G2yO$'bQSO1G2yO$'jQWO'#GwOOQQ1G2{1G2{O!3cQWO'#IoO!BYQ`O1G3OOOQQ1G3O1G3OOOQQ,5=i,5=iO$'rQ,UO,5=kO9_QSO,5=kO#K`QSO,5=mO8tQSO,5=mO!>oQWO,5=mO!>wQ,UO,5=mO9dQ,UO,5=mO$(QQSO'#KRO$(]QSO,5=nOOQQ1G.h1G.hO$(bQ(C[O1G.hO?rQSO1G.hO$(mQSO1G.hO9OQ(C[O1G.hO$*rQbO,5@pO$+SQSO,5@pO$+_QUO,5=uO$+fQSO,5=uO:vQSO,5@pOOQQ1G3_1G3_O`QUO1G3_OOQQ1G3e1G3eOOQQ1G3g1G3gO={QSO1G3iO$+kQUO1G3kO$/lQUO'#HjOOQQ1G3n1G3nO$/yQSO'#HpO>QQSO'#HrOOQQ1G3t1G3tO$0RQUO1G3tO9OQ(C[O1G3zOOQQ1G3|1G3|OOQ(CW'#GW'#GWO9OQ(C[O1G4OO9OQ(C[O1G4QO$4VQSO,5@RO!)jQUO,5;XO:vQSO,5;XO>QQSO,5:RO!)jQUO,5:RO!>oQWO,5:RO$4[Q$IUO,5:ROOQO,5;X,5;XO$4fQWO'#IZO$4|QSO,5@QOOQ(CY1G/l1G/lO$5UQWO'#IaO$5`QSO,5@`OOQ(CW1G0r1G0rO!LaQWO,5:ROOQO'#I^'#I^O$5hQWO,5:mOOQ(CY,5:m,5:mO#![QSO1G0VOOQ(CY1G0V1G0VO%QQUO1G0VOOQ(CY1G0m1G0mO>QQSO1G0mO!>oQWO1G0mO!>wQ,UO1G0mOOQ(CW1G5m1G5mO!>dQ(C[O1G0YOOQO1G0f1G0fO%QQUO1G0fO$5oQ(C[O1G0fO$5zQ(C[O1G0fO!>oQWO1G0YOCOQWO1G0YO$6YQ(C[O1G0fOOQO1G0Y1G0YO$6nQ(CjO1G0fPOOO-EtO$7[QSO1G5kO$7dQSO1G5xO$7lQbO1G5yO:vQSO,5>zO$7vQ(CjO1G5vO%QQUO1G5vO$8WQ(C[O1G5vO$8iQSO1G5uO$8iQSO1G5uO:vQSO1G5uO$8qQSO,5>}O:vQSO,5>}OOQO,5>},5>}O$9VQSO,5>}O$ mQSO,5>}OOQO-EcQ(CjO,5oQWO,5dQ(C[O7+$^O!>oQWO7+$^O!#qQUO7+&YO$NgQSO'#IrO$N{QSO,5@oOOQO1G3^1G3^O9_QSO,5@oO$N{QSO,5@oO% TQSO,5@oOOQO,5?_,5?_OOQO-EoQWO1G3XO!>wQ,UO1G3XO%$RQSO'#IqO%$^QSO,5@mO%$fQWO,5@mOOQ(CW1G3Y1G3YOOQQ7+$S7+$SO?rQSO7+$SO9OQ(C[O7+$SO%$qQSO7+$SO%QQUO1G6[O%QQUO1G6]O%$vQUO1G3aO%$}QSO1G3aO%%SQUO1G3aO%%ZQ(C[O1G6[OOQQ7+(y7+(yO9OQ(C[O7+)TO`QUO7+)VOOQQ'#KW'#KWOOQQ'#It'#ItO%%eQUO,5>UOOQQ,5>U,5>UO%QQUO'#HkO%%rQSO'#HmOOQQ,5>[,5>[O:vQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%%wQWO1G5mO%&]Q$IUO1G0sO%&gQSO1G0sOOQO1G/m1G/mO%&rQ$IUO1G/mO>QQSO1G/mO!)jQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!>oQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#![QSO7+%qOOQ(CY7+&X7+&XO>QQSO7+&XO!>oQWO7+&XOOQO7+%t7+%tO$6nQ(CjO7+&QOOQO7+&Q7+&QO%QQUO7+&QO%&|Q(C[O7+&QO!>dQ(C[O7+%tO!>oQWO7+%tO%'XQ(C[O7+&QO%'gQ(CjO7++bO%QQUO7++bO%'wQSO7++aO%'wQSO7++aOOQO1G4i1G4iO:vQSO1G4iO%(PQSO1G4iOOQO7+%y7+%yO#![QSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ(CjO<oQWO1G2bOBoQSO1G2cO%EsQSO1G2dO%E{QSO1G2cO!'^Q,UO7+*}OOQ(CY1G/[1G/[O%FWQSO1G/[OOQ(CY7+'n7+'nO%F]Q,UO7+'uO%FmQ(CjO<dQ(C[O<oQWO7+(sO%JhQSO,5?]OOQO-EVOOQQ,5>X,5>XO%KmQSO1G3vO:vQSO7+&_O!)jQUO7+&_OOQO7+%X7+%XO%KrQ$IUO1G5yO>QQSO7+%XOOQ(CY<QQSO<dQ(C[O<QQSO7+)bO&3ZQSO<zAN>zO%QQUOAN?WOOQO<OQ$IUO7+'uO&?tQ,UOG26{OOQO<QOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO#v:PO(RVO(b$WO(i#yO(j#zO~O#y.dO~P#@_O#X:UO#{:UO#y(WX!W(WX~PNlO^'Ya!V'Ya'k'Ya'i'Ya!g'Ya!S'Yao'Ya!X'Ya%a'Ya!a'Ya~P!6UOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(R#fi(b#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#)tO^#zi!V#zi'k#zi'i#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!6UO$W.iO$Y.iO~O$W.jO$Y.jO~O!a)YO#X.kO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.lO~O!X)]O$T.nO$W)[O$Y)[O$a.oO~O!V:QO!W(VX~P#@_O!W.pO~O!a)YO$a(kX~O$a.rO~Oq)lO(S)mO(T.uO~Ol.xO!S.yO'vTO'yUO~O!VcX!acX!gcX!g$sX(bcX~P!.xO!g/PO~P#)tO!V/QO!a#rO(b'bO!g(oX~O!g/VO~O!U)}O't%eO!g(oP~O#d/XO~O!S$sX!V$sX!a$zX~P!.xO!V/YO!S(pX~P#)tO!a/[O~O!S/^O~Ok/bO!a#rO!h%ZO'}%OO(b'bO~O't/dO~O!a*}O~O^%^O!V/hO'k%^O~O!W/jO~P!2vO!]/kO!^/kO'u!iO(U!jO~O|/mO(U!jO~O#T/nO~O't%|Od'_X!V'_X~O!V*gOd(Oa~Od/sO~Oy/tOz/tO|/uOgva(iva(jva!Vva#Xva~Odva#yva~P#L|Oy)qO|)rOg$la(i$la(j$la!V$la#X$la~Od$la#y$la~P#MrOy)qO|)rOg$na(i$na(j$na!V$na#X$na~Od$na#y$na~P#NeO#d/wO~Od$|a!V$|a#X$|a#y$|a~P!0RO!a#rO~O#d/zO~Oy#vOz#wO|#xO!f#tO!h#uO(RVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(b!ni(i!ni(j!ni~O^!ni'k!ni'i!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$ wOg.PO!X'QO%a.OO~Oi0RO't0QO~P!0sO!a*}O^'|a!X'|a'k'|a!V'|a~O#d0XO~OXYX!VcX!WcX~O!V0YO!W(wX~O!W0[O~OX0]O~O't+VO'vTO'yUO~O!X%nO't%eO]'gX!V'gX~O!V+[O](va~O!g0bO~P!6UOX0eO~O]0fO~O!V+hO^(sa'k(sa~O#X0lO~Og0oO!X$yO~O(U(oO!W(tP~Og0xO!X0uO%a0wO'}%OO~OX1SO!V1QO!W(uX~O!W1TO~O]1VO^%^O'k%^O~O't#jO'vTO'yUO~O#X$bO#{$bOP(WXX(WXk(WXy(WXz(WX|(WX!V(WX!e(WX!h(WX!l(WX#g(WX#h(WX#i(WX#j(WX#k(WX#l(WX#m(WX#n(WX#q(WX#s(WX#u(WX#v(WX(R(WX(b(WX(i(WX(j(WX~O#o1YO&Q1ZO^(WX!f(WX~P$(xO#X$bO#o1YO&Q1ZO~O^1[O~P%QO^1^O~O&Z1bOP&XiQ&XiV&Xi^&Xia&Xib&Xii&Xik&Xil&Xim&Xis&Xiu&Xiw&Xi|&Xi!Q&Xi!R&Xi!X&Xi!c&Xi!h&Xi!k&Xi!l&Xi!m&Xi!o&Xi!q&Xi!t&Xi!x&Xi#p&Xi$Q&Xi$U&Xi%`&Xi%b&Xi%d&Xi%e&Xi%h&Xi%j&Xi%m&Xi%n&Xi%p&Xi%|&Xi&S&Xi&U&Xi&W&Xi&Y&Xi&]&Xi&c&Xi&i&Xi&k&Xi&m&Xi&o&Xi&q&Xi'i&Xi't&Xi'v&Xi'y&Xi(R&Xi(a&Xi(n&Xi!W&Xi_&Xi&`&Xi~O_1hO!W1fO&`1gO~P`O!XXO!h1jO~O&g,eOP&biQ&biV&bi^&bia&bib&bii&bik&bil&bim&bis&biu&biw&bi|&bi!Q&bi!R&bi!X&bi!c&bi!h&bi!k&bi!l&bi!m&bi!o&bi!q&bi!t&bi!x&bi#p&bi$Q&bi$U&bi%`&bi%b&bi%d&bi%e&bi%h&bi%j&bi%m&bi%n&bi%p&bi%|&bi&S&bi&U&bi&W&bi&Y&bi&]&bi&c&bi&i&bi&k&bi&m&bi&o&bi&q&bi'i&bi't&bi'v&bi'y&bi(R&bi(a&bi(n&bi!W&bi&Z&bi_&bi&`&bi~O!S1pO~O!V!Za!W!Za~P#@_Ol!kO|!lO!U1vO(U!jO!V&}X!W&}X~P?fO!V,uO!W(Ya~O!V'TX!W'TX~P!@xO!V,xO!W(ha~O!W1}O~P'TO^%^O#X2WO'k%^O~O^%^O!a#rO#X2WO'k%^O~O^%^O!a#rO!l2[O#X2WO'k%^O(b'bO~O^%^O'k%^O~P!6UO!V$^Oo$ka~O!S&|i!V&|i~P!6UO!V'vO!S(Xi~O!V'}O!S(fi~O!S(gi!V(gi~P!6UO!V(di!g(di^(di'k(di~P!6UO#X2^O!V(di!g(di^(di'k(di~O!V(ZO!g(ci~O|%vO!X%wO!x]O#b2cO#c2bO't%eO~O|%vO!X%wO#c2bO't%eO~Og2jO!X'QO%a2iO~Og2jO!X'QO%a2iO'}%OO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'kva(Rva(bva!gva!Sva'ivaova!Xva%ava!ava~P#L|O#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'k$la(R$la(b$la!g$la!S$la'i$lao$la!X$la%a$la!a$la~P#MrO#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'k$na(R$na(b$na!g$na!S$na'i$nao$na!X$na%a$na!a$na~P#NeO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'k$|a(R$|a(b$|a!g$|a!S$|a'i$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#)tO^#[q!V#[q'k#[q'i#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!6UOd'OX!V'OX~P!'^O!V.YOd([a~O!U2rO!V'PX!g'PX~P%QO!V.]O!g(]a~O!V.]O!g(]a~P!6UO!S2uO~O#y!ja!W!ja~PJ`O#y!ba!V!ba!W!ba~P#@_O#y!na!W!na~P!8oO#y!pa!W!pa~P!;YO!X3XO$UfO$_3YO~O!W3^O~Oo3_O~P#)tO^$hq!V$hq'k$hq'i$hq!S$hq!g$hqo$hq!X$hq%a$hq!a$hq~P!6UO!S3`O~Ol.xO'vTO'yUO~Oy)qO|)rO(j)vOg%Xi(i%Xi!V%Xi#X%Xi~Od%Xi#y%Xi~P$GeOy)qO|)rOg%Zi(i%Zi(j%Zi!V%Zi#X%Zi~Od%Zi#y%Zi~P$HWO(b$WO~P#)tO!U3cO't%eO!V'ZX!g'ZX~O!V/QO!g(oa~O!V/QO!a#rO!g(oa~O!V/QO!a#rO(b'bO!g(oa~Od$ui!V$ui#X$ui#y$ui~P!0RO!U3kO't*SO!S']X!V']X~P!0pO!V/YO!S(pa~O!V/YO!S(pa~P#)tO!a#rO#o3sO~Ok3vO!a#rO(b'bO~Od(Pi!V(Pi~P!0RO#X3yOd(Pi!V(Pi~P!0RO!g3|O~O^$iq!V$iq'k$iq'i$iq!S$iq!g$iqo$iq!X$iq%a$iq!a$iq~P!6UO!V4QO!X(qX~P#)tO!f#tO~P3}O^$sX!X$sX%UYX'k$sX!V$sX~P!.xO%U4SO^hXghXyhX|hX!XhX'khX(ihX(jhX!VhX~O%U4SO~O%b4ZO't+VO'vTO'yUO!V'fX!W'fX~O!V0YO!W(wa~OX4_O~O]4`O~O!S4dO~O^%^O'k%^O~P#)tO!X$yO~P#)tO!V4iO#X4kO!W(tX~O!W4lO~Ol!kO|4mO![!uO!]!rO!^!rO!x9mO!|!mO!}!mO#O!mO#P!mO#Q!mO#T4rO#U!vO'u!iO'vTO'yUO(U!jO(a!pO~O!W4qO~P%!VOg4wO!X0uO%a4vO~Og4wO!X0uO%a4vO'}%OO~O't#jO!V'eX!W'eX~O!V1QO!W(ua~O'vTO'yUO(U5QO~O]5UO~O!g5XO~P%QO^5ZO~O^5ZO~P%QO#o5]O&Q5^O~PMOO_1hO!W5bO&`1gO~P`O!a5dO~O!a5fO!V(Zi!W(Zi!a(Zi!h(Zi'}(Zi~O!V#ai!W#ai~P#@_O#X5gO!V#ai!W#ai~O!V!Zi!W!Zi~P#@_O^%^O#X5pO'k%^O~O^%^O!a#rO#X5pO'k%^O~O!V(dq!g(dq^(dq'k(dq~P!6UO!V(ZO!g(cq~O|%vO!X%wO#c5wO't%eO~O!X'QO%a5zO~Og5}O!X'QO%a5zO~O#d%XiP%XiX%Xi^%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi'k%Xi(R%Xi(b%Xi!g%Xi!S%Xi'i%Xio%Xi!X%Xi%a%Xi!a%Xi~P$GeO#d%ZiP%ZiX%Zi^%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi'k%Zi(R%Zi(b%Zi!g%Zi!S%Zi'i%Zio%Zi!X%Zi%a%Zi!a%Zi~P$HWO#d$uiP$uiX$ui^$uik$uiz$ui!V$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui'k$ui(R$ui(b$ui!g$ui!S$ui'i$ui#X$uio$ui!X$ui%a$ui!a$ui~P#)tOd'Oa!V'Oa~P!0RO!V'Pa!g'Pa~P!6UO!V.]O!g(]i~O#y#[i!V#[i!W#[i~P#@_OP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(RVOX#fik#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~O#g#fi~P%0fO#g9uO~P%0fOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO(RVOX#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~Ok#fi~P%2qOk9wO~P%2qOP$YOk9wOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO(RVO#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P%4|OX:TO!e9yO#l9yO#m9yO#n:SO#o9yO~P%4|OP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO(RVO#s#fi#u#fi#v#fi#y#fi(b#fi(j#fi!V#fi!W#fi~O(i#fi~P%7hO(i#yO~P%7hOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O(RVO(i#yO#u#fi#v#fi#y#fi(b#fi!V#fi!W#fi~O(j#fi~P%9sO(j#zO~P%9sOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO(RVO(i#yO(j#zO~O#v#fi#y#fi(b#fi!V#fi!W#fi~P%vO!f#tOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(b(QX(i(QX(j(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#@_O#y!ni!W!ni~P$ wO!W6ZO~O!V'Ya!W'Ya~P#@_O!a#rO(b'bO!V'Za!g'Za~O!V/QO!g(oi~O!V/QO!a#rO!g(oi~Od$uq!V$uq#X$uq#y$uq~P!0RO!S']a!V']a~P#)tO!a6bO~O!V/YO!S(pi~P#)tO!V/YO!S(pi~O!S6fO~O!a#rO#o6kO~Ok6lO!a#rO(b'bO~O!S6nO~Od$wq!V$wq#X$wq#y$wq~P!0RO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!6UO!V4QO!X(qa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!6UOX6sO~O!V0YO!W(wi~O]6yO~O!a5fO~O(U(oO!V'bX!W'bX~O!V4iO!W(ta~OikO't7QO~P._O!W7TO~P%!VOl!kO|7UO'vTO'yUO(U!jO(a!pO~O!X0uO~O!X0uO%a7WO~Og7ZO!X0uO%a7WO~OX7`O!V'ea!W'ea~O!V1QO!W(ui~O!g7dO~O!g7eO~O!g7fO~O!g7fO~P%QO^7hO~O!a7kO~O!g7lO~O!V(gi!W(gi~P#@_O^%^O#X7tO'k%^O~O!V(dy!g(dy^(dy'k(dy~P!6UO!V(ZO!g(cy~O!X'QO%a7wO~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'k$uq(R$uq(b$uq!g$uq!S$uq'i$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#)tO#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'k$wq(R$wq(b$wq!g$wq!S$wq'i$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#)tO!V'Pi!g'Pi~P!6UO#y#[q!V#[q!W#[q~P#@_Oy/tOz/tO|/uOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Rva(bva(iva(jva!Vva!Wva~Oy)qO|)rOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(R$la(b$la(i$la(j$la!V$la!W$la~Oy)qO|)rOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(R$na(b$na(i$na(j$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(R$|a(b$|a!V$|a!W$|a~P%>vO#y$hq!V$hq!W$hq~P#@_O#y$iq!V$iq!W$iq~P#@_O!W8RO~O#y8SO~P!0RO!a#rO!V'Zi!g'Zi~O!a#rO(b'bO!V'Zi!g'Zi~O!V/QO!g(oq~O!S']i!V']i~P#)tO!V/YO!S(pq~O!S8YO~P#)tO!S8YO~Od(Py!V(Py~P!0RO!V'`a!X'`a~P#)tO^%Tq!X%Tq'k%Tq!V%Tq~P#)tOX8_O~O!V0YO!W(wq~O#X8cO!V'ba!W'ba~O!V4iO!W(ti~P#@_OPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!a%RX#o%RX~P&/vO!X0uO%a8gO~O'vTO'yUO(U8lO~O!V1QO!W(uq~O!g8oO~O!g8oO~P%QO!g8qO~O!g8rO~O#X8tO!V#ay!W#ay~O!V#ay!W#ay~P#@_O!X'QO%a8yO~O#y#wy!V#wy!W#wy~P#@_OP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(R$ui(b$ui!V$ui!W$ui~P%>vOy)qO|)rO(j)vOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(R%Xi(b%Xi(i%Xi!V%Xi!W%Xi~Oy)qO|)rOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(R%Zi(b%Zi(i%Zi(j%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#@_O#y#[y!V#[y!W#[y~P#@_O!a#rO!V'Zq!g'Zq~O!V/QO!g(oy~O!S']q!V']q~P#)tO!S9QO~P#)tO!V0YO!W(wy~O!V4iO!W(tq~O!X0uO%a9XO~O!g9[O~O!X'QO%a9aO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(R$uq(b$uq!V$uq!W$uq~P%>vOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(R$wq(b$wq!V$wq!W$wq~P%>vOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0RO!V'bq!W'bq~P#@_O!V#a!Z!W#a!Z~P#@_O#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'k%]!Z(R%]!Z(b%]!Z!g%]!Z!S%]!Z'i%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#)tOP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(R%]!Z(b%]!Z!V%]!Z!W%]!Z~P%>vOo(VX~P1gO'u!iO~P!)jO!ScX!VcX#XcX~P&/vOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!acX!gYX!gcX(bcX~P&E^OP9lOQ9lOa;]Ob!fOikOk9lOlkOmkOskOu9lOw9lO|WO!QkO!RkO!XXO!c9oO!hZO!k9lO!l9lO!m9lO!o9pO!q9qO!t!eO$Q!hO$UfO't)PO'vTO'yUO(RVO(a[O(n;ZO~O!V:QO!W$ka~Oi%POk$qOl$pOm$pOs%QOu%ROw:WO|$xO!X$yO!c;bO!h$uO#c:^O$Q%VO$m:YO$o:[O$r%WO't(gO'vTO'yUO'}%OO(R$rO~O#p)WO~P&JSO!WYX!WcX~P&E^O#d9tO~O!a#rO#d9tO~O#X:UO~O#o9yO~O#X:`O!V(gX!W(gX~O#X:UO!V(eX!W(eX~O#d:aO~Od:cO~P!0RO#d:hO~O#d:iO~O!a#rO#d:jO~O!a#rO#d:aO~O#y:kO~P#@_O#d:lO~O#d:mO~O#d:nO~O#d:oO~O#d:pO~O#d:qO~O#y:rO~P!0RO#y:sO~P!0RO$U~!f!|!}#P#Q#T#b#c#n(n$m$o$r%U%`%a%b%h%j%m%n%p%r~'oR$U(n#h!R'm'u#il#g#jky'n(U'n't$W$Y$W~",goto:"$%Z({PPPP(|P)PP)aP*p.rPPPP5SPP5iP;d>iP>|P>|PPP>|P@lP>|P>|P>|P@pPP@uPA`PFUPPPFYPPPPFYIXPPPI_JYPFYPLgPPPPNuFYPPPFYPFYP!#TFYP!&g!'i!'rP!(e!(i!(ePPPPP!+r!'iPP!,`!-YP!/|FYFY!0R!3Z!7n!7n!;cPPP!;jFYPPPPPPPPPPP!>uP!@WPPFY!AePFYPFYFYFYFYPFY!BwPP!E}P!IPP!IT!I_!Ic!IcP!EzP!Ig!IgP!LiP!LmFYFY!Ls# t>|P>|P>|>|P##O>|>|#$x>|#'V>|#(y>|>|#)g#+c#+c#+g#+o#+c#+wP#+cP>|#,a>|#-i>|>|5SPPP#.tPP#/^#/^P#/^P#/s#/^PP#/yP#/pP#/p#0]#/p#0w#0}5P)P#1Q)PP#1X#1X#1XP)PP)PP)PP)PPP)PP#1_#1bP#1b)PP#1fP#1iP)PP)PP)PP)PP)PP)P)PPP#1o#1u#2P#2V#2]#2c#2i#2w#2}#3T#3_#3e#3o#4O#4U#4u#5X#5_#5e#5s#6Y#7j#7x#8O#8U#8[#8b#8l#8r#8x#9S#9f#9lPPPPPPPPPP#9rPPPPPPP#:f#=mP#>|#?T#?]PPPP#Cg#F]#Lr#Lu#Lx#Mq#Mt#Mw#NO#NWPP#N^#Nb$ Z$!Z$!_$!sPP$!w$!}$#RP$#U$#Y$#]$$R$$i$$n$$q$$t$$z$$}$%R$%VR!xRmpOXr!X#`%]&d&f&g&i,],b1b1eY!rQ'Q,}0u4pQ%ctQ%kwQ%rzQ&[!TS&x!c,uQ'W!fS'^!o!uS*Y$y*_Q+T%lQ+b%tQ+|&UQ,{'PQ-V'XQ-_'_Q/k*aQ1P+}R:_9p$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7tS#m]9m!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q*j%SQ+Y%nQ,O&XQ,V&aQ.S:VQ0O*{Q0S*}Q0_+ZQ1X,TQ2f.PQ4Y0YQ5O1QQ5|2jQ6S:WQ6u4ZR7z5}&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^t!kQ!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4r$Y$pi#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ%uzQ&v!cS&|%w,xQ+Y%nS.x)r.zQ/v*nQ0_+ZQ0d+aQ1W,SQ1X,TQ4Y0YQ4c0fQ5R1SQ5S1VQ6u4ZQ6x4`Q7c5UQ8b6yR8m7`pmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR,Q&]&r^OPXYrstux!X!^!g!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u'S'd'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;];^[#XWZ#S#V&y'tQ%fvQ%jwS%oz%t!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ&Q!RQ'T!eQ'V!fQ(b#oS)|$u*QS+S%k%lQ+W%nQ+w&SQ+{&US-U'W'XQ.R(cQ/U)}Q0W+TQ0^+ZQ0`+[Q0c+`Q0z+xS1O+|+}Q2S-VQ3b/QQ4X0YQ4]0]Q4b0eQ4}1PQ6_3cQ6t4ZQ6w4_Q8^6sR9S8_v$wi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!S%hw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uQ*|%fQ+m%}Q+p&OQ+z&UQ.Q(bQ0y+wU0}+{+|+}Q2k.RQ4x0zS4|1O1PQ7_4}!z;_#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg;`:S:T:Y:[:^:e:g:i:m:o:sW$|i%O*g;ZS%}!O&ZQ&O!PQ&P!QR+k%{$Z${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hT)m$r)nV*k%S:V:WU&|!c%w,xS(p#v#wQ+_%qS-z(^(_Q0p+qQ3z/tR6}4i&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^$i$]c#U#a%a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.e.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QT#PV#Q&ykOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q&z!cR1w,uv!kQ!c!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4rS*X$y*_S/c*Y*aQ/l*bQ0r+sQ3u/kR3x/nlpOXr!X#`%]&d&f&g&i,],b1b1eQ&k![Q'h!tS(d#q9tQ+Q%iQ+u&QQ+v&RQ-S'UQ-a'aS.W(i:aS/y*s:jQ0U+RQ0t+tQ1i,dQ1k,eQ1s,pQ2Q-TQ2T-XS4P/z:pQ4T0VS4W0X:qQ5h1uQ5l2RQ5q2YQ6r4UQ7o5jQ7p5mQ7s5rR8s7l$d$[c#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(a#l'ZU*d$z(h3US*w%a.eQ2g0OQ5y2fQ7y5|R8z7z$d$Zc#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(`#l'ZS(r#w$[S*v%a.eS-{(_(aQ.h)SQ/{*wR2d-|&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S#m]9mQ&f!VQ&g!WQ&i!YQ&j!ZR1a,`Q'R!eQ*y%fQ-Q'TS-}(b*|Q2O-PW2h.Q.R/}0PQ5k2PU5x2e2g2kS7v5y5{S8x7x7yS9_8w8zQ9g9`R9j9hU!sQ'Q,}T4n0u4p!O_OXZ`r!T!X#`#d%Z%]&Z&]&d&f&g&i(Z,],b-t1b1e]!mQ!o'Q,}0u4pT#m]9m%UyOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS(p#v#wS-z(^(_!s:w$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Y!qQ'Q,}0u4pQ']!oS'g!r!uS'i!v4rS-^'^'_Q-`'`R2Z-_Q'f!qS(V#c1_S-]']'iQ/T)|Q/a*XQ2[-`Q3g/US3p/b/lQ6^3bS6i3v3xQ8U6_R8]6lQ#sbQ'e!qS(U#c1_S(W#i*rQ*t%[Q+O%gQ+U%mU-[']'f'iQ-p(VQ/S)|Q/`*XQ/f*[Q0T+PQ0{+yS2X-]-`Q2a-xS3f/T/US3o/a/lQ3r/eQ3t/gQ4z0|Q5s2[Q6]3bQ6a3gS6e3p3xQ6j3wQ7]4{S8T6^6_Q8X6fQ8Z6iQ8j7^Q9O8UQ9P8YQ9R8]Q9Z8kQ9c9QQ:z:uQ;V;OR;W;PV!sQ'Q,}%UaOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS#sx!g!r:t$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:z;]%UbOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tQ%[j!S%gw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uS%mx!gQ+P%hQ+y&UW0|+z+{+|+}U4{0}1O1PS7^4|4}Q8k7_!r:u$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q;O;[R;P;]$xeOPXYrstu!X!^!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tY#^WZ#S#V't!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ,W&a!p:v$X$j)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:y&yS&}!c%wR1y,x$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7t!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q,V&aQ0O*{Q2f.PQ5|2jR7z5}!f$Rc#U%a's'y(e(l({(|(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!T9{)Q)c,s.e1q1t2v3O3P3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!b$Tc#U%a's'y(e(l(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!P9})Q)c,s.e1q1t2v3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!^$Xc#U%a's'y(e(l)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9nQ3a/Oz;^)Q)c,s.e1q1t2v3V3]5i6R6W6X7P7n7{8P8Q9U9];QQ;c;eR;d;f&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S$kh$lR3Y.k'PgOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$gf$mQ$efS)[$h)`R)h$mT$ff$mT)^$h)`'PhOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$kh$lQ$nhR)g$l%UjOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7t!s;[$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^#alOPXZr!X!^!l#O#`#k#x$j%]&]&`&a&d&f&g&i&m&u'S(q)e*{+g,X,],b-R.P.l/u0x1Y1Z1[1^1b1e1g2j3X4m4w5Z5]5^5}7U7Z7hv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hQ*o%WQ.w)qg3U:S:T:Y:[:^:e:g:i:m:o:sv$vi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;dQ*R$wS*[$y*_Q*p%XQ/g*]!z:|#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hf:}:S:T:Y:[:^:e:g:i:m:o:sQ;R;_Q;S;`Q;T;aR;U;bv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg3U:S:T:Y:[:^:e:g:i:m:o:slnOXr!X#`%]&d&f&g&i,],b1b1eQ*U$xQ,k&pQ,l&rR3j/Y$Y${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ+n&OQ0n+pQ4g0mR6|4hT*^$y*_S*^$y*_T4o0u4pS/e*Z4mT3w/m7UQ+O%gQ/f*[Q0T+PQ0{+yQ4z0|Q7]4{Q8j7^R9Z8kn)u$s(j*q/W/o/p2o3h3}6[6m8}:{;X;Y!W:d(f)V){*T.V.s/O/]/|0k0m2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f]:e3T6V7|8{8|9kp)w$s(j*q.|/W/o/p2o3h3}6[6m8}:{;X;Y!Y:f(f)V){*T.V.s/O/]/|0k0m2l2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f_:g3T6V7|7}8{8|9kpmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ&W!SR,X&apmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR&W!SQ+r&PR0j+kqmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ0v+wS4u0y0zU7V4s4t4xS8f7X7YS9V8e8hQ9d9WR9i9eQ&_!TR,R&ZR5R1SS%oz%tR0`+[Q&d!UR,]&eR,c&jT1c,b1eR,g&kQ,f&kR1l,gQ'k!wR-c'kQrOQ#`XT%`r#`Q!zTR'm!zQ!}UR'o!}Q)n$rR.t)nQ#QVR'q#QQ#TWU'w#T'x-jQ'x#UR-j'yQ,v&zR1x,vQ.Z(jR2p.ZQ.^(lS2s.^2tR2t._Q,}'QR1|,}Y!oQ'Q,}0u4pR'[!oS#ZW%vU(O#Z(P-kQ(P#[R-k'zQ,y&}R1z,yr`OXr!T!X#`%]&Z&]&d&f&g&i,],b1b1eS#dZ%ZU#n`#d-tR-t(ZQ([#fQ-q(WW-y([-q2_5uQ2_-rR5u2`Q)`$hR.m)`Q$lhR)f$lQ$_cU)U$_-f:RQ-f9nR:R)cQ/R)|W3d/R3e6`8VU3e/S/T/US6`3f3gR8V6a#m)s$s(f(j)V){*T*l*m*q.T.U.V.s.|.}/O/W/]/o/p/|0k0m2l2m2n2o3T3h3i3m3}4f4h6O6P6T6U6V6[6c6g6m6o6q7|7}8O8W8[8{8|8}9b9k:{;X;Y;e;fQ/Z*TU3l/Z3n6dQ3n/]R6d3mQ*_$yR/i*_Q*h$}R/r*hQ4R/|R6p4RQ+i%yR0i+iQ4j0pS7O4j8dR8d7PQ+t&QR0s+tQ4p0uR7S4pQ1R,OS5P1R7aR7a5RQ0Z+WW4[0Z4^6v8`Q4^0^Q6v4]R8`6wQ+]%oR0a+]Q1e,bR5a1eWqOXr#`Q&h!XQ*u%]Q,[&dQ,^&fQ,_&gQ,a&iQ1`,]S1c,b1eR5`1bQ%_oQ&l!]Q&o!_Q&q!`Q&s!aQ'c!qQ+Q%iQ+d%uQ+j%zQ,Q&_Q,i&nW-Y']'e'f'iQ-a'aQ/h*^Q0U+RS1U,R,UQ1m,hQ1n,kQ1o,lQ2T-XW2V-[-]-`-bQ4T0VQ4a0dQ4e0kQ4y0{Q5T1WQ5_1aU5n2U2X2[Q5q2YQ6r4UQ6z4cQ6{4fQ7R4oQ7[4zQ7b5SS7q5o5sQ7s5rQ8a6xQ8i7]Q8n7cQ8u7rQ9T8bQ9Y8jQ9^8vR9f9ZQ%iwQ'U!fQ'a!qU+R%j%k%lQ,p&wU-T'V'W'XS-X']'gQ/_*XS0V+S+TQ1u,rS2R-U-VQ2Y-^Q3q/cQ4U0WQ5j1{Q5m2SQ5r2ZR6h3uS$ti;ZR*i%OU$}i%O;ZR/q*gQ$siS(f#r*}Q(j#tS)V$`$aQ){$uQ*T$xQ*l%TQ*m%UQ*q%YQ.T:XQ.U:ZQ.V:]Q.s)lQ.|)uQ.})wQ/O)xQ/W*PQ/]*VQ/o*eQ/p*fh/|*z.O0w2i4v5z7W7w8g8y9X9aQ0k+lQ0m+oQ2l:dQ2m:fQ2n:hQ2o.YS3T:S:TQ3h/XQ3i/YQ3m/[Q3}/wQ4f0lQ4h0oQ6O:lQ6P:nQ6T:YQ6U:[Q6V:^Q6[3aQ6c3kQ6g3sQ6m3yQ6o4QQ6q4SQ7|:iQ7}:eQ8O:gQ8W6bQ8[6kQ8{:mQ8|:oQ8}8SQ9b:rQ9k:sQ:{;ZQ;X;cQ;Y;dQ;e;gR;f;hloOXr!X#`%]&d&f&g&i,],b1b1eQ!dPS#bZ#kQ&n!^U'Y!l4m7UQ'p#OQ(s#xQ)d$jS,U&]&`Q,Y&aQ,h&mQ,m&uQ-P'SQ.a(qQ.q)eQ0P*{Q0g+gQ1],XQ2P-RQ2g.PQ3[.lQ3{/uQ4t0xQ5V1YQ5W1ZQ5Y1[Q5[1^Q5c1gQ5y2jQ6Y3XQ7Y4wQ7g5ZQ7i5]Q7j5^Q7y5}Q8h7ZR8p7h#UcOPXZr!X!^!l#`#k#x%]&]&`&a&d&f&g&i&m&u'S(q*{+g,X,],b-R.P/u0x1Y1Z1[1^1b1e1g2j4m4w5Z5]5^5}7U7Z7hQ#UWQ#aYQ%asQ%btQ%duS's#S'vQ'y#VQ(e#qQ(l#uQ(t#{Q(u#|Q(v#}Q(w$OQ(x$PQ(y$QQ(z$RQ({$SQ(|$TQ(}$UQ)O$VQ)Q$XQ)T$^Q)X$bW)c$j)e.l3XQ*x%cQ+^%pS,s&y1vQ-b'dS-g't-iQ-l'|Q-n(TQ.X(iQ._(mQ.c9lQ.e9oQ.f9pQ.g9qQ.v)pQ/x*sQ1q,nQ1t,qQ2U-ZQ2]-oQ2q.]Q2v9tQ2w9uQ2x9vQ2y9wQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S.dQ3V:UQ3W:_Q3]:QQ4O/zQ4V0XQ5i:`Q5o2WQ5t2^Q6Q2rQ6R:aQ6W:cQ6X:jQ7P4kQ7n5gQ7r5pQ7{:kQ8P:pQ8Q:qQ8v7tQ9U8cQ9]8tQ9n#OR;Q;^R#WWR&{!cY!qQ'Q,}0u4pS&w!c,uQ']!oS'g!r!uS'i!v4rS,r&x'PS-^'^'_Q-`'`Q1{,{R2Z-_R(k#tR(n#uQ!dQT,|'Q,}]!nQ!o'Q,}0u4pQ#l]R'Z9mT#gZ%ZS#fZ%ZU%y|},ZU(W#d#e#hS-r(X(YQ-v(ZQ0h+hQ2`-sU2a-t-u-wS5v2b2cR7u5w`#YW#S#V%v't'}+e-mt#cZ|}#d#e#h%Z(X(Y(Z+h-s-t-u-w2b2c5wQ1_,ZQ1r,oQ5e1jQ7m5fT:x&y+fT#]W%vS#[W%vS'u#S'}S'z#V+eS,t&y+fT-h't-mT'O!c%wQ$hfR)j$mT)_$h)`R3Z.kT*O$u*QR*W$xQ/}*zQ2e.OQ4s0wQ5{2iQ7X4vQ7x5zQ8e7WQ8w7wQ9W8gQ9`8yQ9e9XR9h9alpOXr!X#`%]&d&f&g&i,],b1b1eQ&^!TR,Q&ZV%z|},ZR0q+qR,P&XQ%szR+c%tR+X%nT&b!U&eT&c!U&eT1d,b1e",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:364,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Vi],skippedNodes:[0,3,4,268],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(j%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[_i,Wi,2,3,4,5,6,7,8,9,10,11,12,13,qi,new Xe("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new Xe("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:12686,ts:12688},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:O=>Ci[O]||-1},{term:328,get:O=>Ri[O]||-1},{term:67,get:O=>ji[O]||-1}],tokenPrec:12712}),zi=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { - \${} -} catch (\${error}) { - \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),X("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),X(`if (\${}) { - \${} -} else { - \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),X(`class \${name} { - constructor(\${params}) { - \${} - } -}`,{label:"class",detail:"definition",type:"keyword"}),X('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),X('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],uO=new xO,LO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function C(O){return(e,a)=>{let t=e.node.getChild("VariableDefinition");return t&&a(t,O),!0}}const Ai=["FunctionDeclaration"],Ii={FunctionDeclaration:C("function"),ClassDeclaration:C("class"),ClassExpression:()=>!0,EnumDeclaration:C("constant"),TypeAliasDeclaration:C("type"),NamespaceDeclaration:C("namespace"),VariableDefinition(O,e){O.matchContext(Ai)||e(O,"variable")},TypeDefinition(O,e){e(O,"type")},__proto__:null};function MO(O,e){let a=uO.get(e);if(a)return a;let t=[],i=!0;function r(s,n){let o=O.sliceString(s.from,s.to);t.push({label:o,type:n})}return e.cursor(ve.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let n=Ii[s.name];if(n&&n(s,r)||LO.has(s.name))return!1}else if(s.to-s.from>8192){for(let n of MO(O,s.node))t.push(n);return!1}}),uO.set(e,t),t}const hO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,FO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function Ei(O){let e=W(O.state).resolveInner(O.pos,-1);if(FO.indexOf(e.name)>-1)return null;let a=e.name=="VariableName"||e.to-e.from<20&&hO.test(O.state.sliceDoc(e.from,e.to));if(!a&&!O.explicit)return null;let t=[];for(let i=e;i;i=i.parent)LO.has(i.name)&&(t=t.concat(MO(O.state.doc,i)));return{options:t,from:a?e.from:O.pos,validFor:hO}}const k=se.define({name:"javascript",parser:Gi.configure({props:[ne.add({IfStatement:G({except:/^\s*({|else\b)/}),TryStatement:G({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Ct,SwitchBody:O=>{let e=O.textAfter,a=/^\s*\}/.test(e),t=/^\s*(case|default)\b/.test(e);return O.baseIndent+(a?0:t?1:2)*O.unit},Block:Rt({closing:"}"}),ArrowFunction:O=>O.baseIndent+O.unit,"TemplateString BlockComment":()=>null,"Statement Property":G({except:/^{/}),JSXElement(O){let e=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},JSXEscape(O){let e=/\s*\}/.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},"JSXOpenTag JSXSelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),le.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":yO,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),HO={test:O=>/^JSX/.test(O.name),facet:jt({commentTokens:{block:{open:"{/*",close:"*/}"}}})},KO=k.configure({dialect:"ts"},"typescript"),et=k.configure({dialect:"jsx",props:[UO.add(O=>O.isTop?[HO]:void 0)]}),Ot=k.configure({dialect:"jsx ts",props:[UO.add(O=>O.isTop?[HO]:void 0)]},"typescript"),Ni="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(O=>({label:O,type:"keyword"}));function tt(O={}){let e=O.jsx?O.typescript?Ot:et:O.typescript?KO:k;return new oe(e,[k.data.of({autocomplete:vO(FO,YO(zi.concat(Ni)))}),k.data.of({autocomplete:Ei}),O.jsx?Li:[]])}function Bi(O){for(;;){if(O.name=="JSXOpenTag"||O.name=="JSXSelfClosingTag"||O.name=="JSXFragmentTag")return O;if(O.name=="JSXEscape"||!O.parent)return null;O=O.parent}}function fO(O,e,a=O.length){for(let t=e==null?void 0:e.firstChild;t;t=t.nextSibling)if(t.name=="JSXIdentifier"||t.name=="JSXBuiltin"||t.name=="JSXNamespacedName"||t.name=="JSXMemberExpression")return O.sliceString(t.from,Math.min(t.to,a));return""}function Di(O){return O&&(O.name=="JSXEndTag"||O.name=="JSXSelfCloseEndTag")}const Ji=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Li=Y.inputHandler.of((O,e,a,t)=>{if((Ji?O.composing:O.compositionStarted)||O.state.readOnly||e!=a||t!=">"&&t!="/"||!k.isActiveAt(O.state,e,-1))return!1;let{state:i}=O,r=i.changeByRange(s=>{var n;let{head:o}=s,c=W(i).resolveInner(o,-1),h;if(c.name=="JSXStartTag"&&(c=c.parent),!(c.name=="JSXAttributeValue"&&c.to>o)){if(t==">"&&c.name=="JSXFragmentTag")return{range:z.cursor(o+1),changes:{from:o,insert:">"}};if(t=="/"&&c.name=="JSXFragmentTag"){let Q=c.parent,f=Q==null?void 0:Q.parent;if(Q.from==o-1&&((n=f.lastChild)===null||n===void 0?void 0:n.name)!="JSXEndTag"&&(h=fO(i.doc,f==null?void 0:f.firstChild,o))){let u=`/${h}>`;return{range:z.cursor(o+u.length),changes:{from:o,insert:u}}}}else if(t==">"){let Q=Bi(c);if(Q&&!Di(Q.lastChild)&&i.sliceDoc(o,o+2)!="`}}}}return{range:s}});return r.changes.empty?!1:(O.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}),R=["_blank","_self","_top","_parent"],$e=["ascii","utf-8","utf-16","latin1","latin1"],ge=["get","post","put","delete"],Pe=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],m=["true","false"],p={},Mi={a:{attrs:{href:null,ping:null,type:null,media:null,target:R,hreflang:null}},abbr:p,address:p,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:p,aside:p,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:p,base:{attrs:{href:null,target:R}},bdi:p,bdo:p,blockquote:{attrs:{cite:null}},body:p,br:p,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Pe,formmethod:ge,formnovalidate:["novalidate"],formtarget:R,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:p,center:p,cite:p,code:p,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:p,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:p,div:p,dl:p,dt:p,em:p,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:p,figure:p,footer:p,form:{attrs:{action:null,name:null,"accept-charset":$e,autocomplete:["on","off"],enctype:Pe,method:ge,novalidate:["novalidate"],target:R}},h1:p,h2:p,h3:p,h4:p,h5:p,h6:p,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:p,hgroup:p,hr:p,html:{attrs:{manifest:null}},i:p,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Pe,formmethod:ge,formnovalidate:["novalidate"],formtarget:R,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:p,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:p,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:p,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:$e,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:p,noscript:p,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p,param:{attrs:{name:null,value:null}},pre:p,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:p,rt:p,ruby:p,samp:p,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:$e}},section:p,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:p,source:{attrs:{src:null,type:null,media:null}},span:p,strong:p,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:p,summary:p,sup:p,table:p,tbody:p,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:p,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:p,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:p,time:{attrs:{datetime:null}},title:p,tr:p,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:p,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:p},at={accesskey:null,class:null,contenteditable:m,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:m,autocorrect:m,autocapitalize:m,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":m,"aria-autocomplete":["inline","list","both","none"],"aria-busy":m,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":m,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":m,"aria-hidden":m,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":m,"aria-multiselectable":m,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":m,"aria-relevant":null,"aria-required":m,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},it="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(O=>"on"+O);for(let O of it)at[O]=null;class ae{constructor(e,a){this.tags=Object.assign(Object.assign({},Mi),e),this.globalAttrs=Object.assign(Object.assign({},at),a),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}ae.default=new ae;function _(O,e,a=O.length){if(!e)return"";let t=e.firstChild,i=t&&t.getChild("TagName");return i?O.sliceString(i.from,Math.min(i.to,a)):""}function Qe(O,e=!1){for(let a=O.parent;a;a=a.parent)if(a.name=="Element")if(e)e=!1;else return a;return null}function rt(O,e,a){let t=a.tags[_(O,Qe(e,!0))];return(t==null?void 0:t.children)||a.allTags}function Te(O,e){let a=[];for(let t=e;t=Qe(t);){let i=_(O,t);if(i&&t.lastChild.name=="CloseTag")break;i&&a.indexOf(i)<0&&(e.name=="EndTag"||e.from>=t.firstChild.to)&&a.push(i)}return a}const st=/^[:\-\.\w\u00b7-\uffff]*$/;function pO(O,e,a,t,i){let r=/\s*>/.test(O.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:rt(O.doc,a,e).map(s=>({label:s,type:"type"})).concat(Te(O.doc,a).map((s,n)=>({label:"/"+s,apply:"/"+s+r,type:"type",boost:99-n}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function dO(O,e,a,t){let i=/\s*>/.test(O.sliceDoc(t,t+5))?"":">";return{from:a,to:t,options:Te(O.doc,e).map((r,s)=>({label:r,apply:r+i,type:"type",boost:99-s})),validFor:st}}function Fi(O,e,a,t){let i=[],r=0;for(let s of rt(O.doc,a,e))i.push({label:"<"+s,type:"type"});for(let s of Te(O.doc,a))i.push({label:"",type:"type",boost:99-r++});return{from:t,to:t,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Hi(O,e,a,t,i){let r=Qe(a),s=r?e.tags[_(O.doc,r)]:null,n=s&&s.attrs?Object.keys(s.attrs):[],o=s&&s.globalAttrs===!1?n:n.length?n.concat(e.globalAttrNames):e.globalAttrNames;return{from:t,to:i,options:o.map(c=>({label:c,type:"property"})),validFor:st}}function Ki(O,e,a,t,i){var r;let s=(r=a.parent)===null||r===void 0?void 0:r.getChild("AttributeName"),n=[],o;if(s){let c=O.sliceDoc(s.from,s.to),h=e.globalAttrs[c];if(!h){let Q=Qe(a),f=Q?e.tags[_(O.doc,Q)]:null;h=(f==null?void 0:f.attrs)&&f.attrs[c]}if(h){let Q=O.sliceDoc(t,i).toLowerCase(),f='"',u='"';/^['"]/.test(Q)?(o=Q[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",u=O.sliceDoc(i,i+1)==Q[0]?"":Q[0],Q=Q.slice(1),t++):o=/^[^\s<>='"]*$/;for(let d of h)n.push({label:d,apply:f+d+u,type:"constant"})}}return{from:t,to:i,options:n,validFor:o}}function er(O,e){let{state:a,pos:t}=e,i=W(a).resolveInner(t),r=i.resolve(t,-1);for(let s=t,n;i==r&&(n=r.childBefore(s));){let o=n.lastChild;if(!o||!o.type.isError||o.fromer(t,i)}const nt=[{tag:"script",attrs:O=>O.type=="text/typescript"||O.lang=="ts",parser:KO.parser},{tag:"script",attrs:O=>O.type=="text/babel"||O.type=="text/jsx",parser:et.parser},{tag:"script",attrs:O=>O.type=="text/typescript-jsx",parser:Ot.parser},{tag:"script",attrs(O){return!O.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(O.type)},parser:k.parser},{tag:"style",attrs(O){return(!O.lang||O.lang=="css")&&(!O.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(O.type))},parser:te.parser}],lt=[{name:"style",parser:te.parser.configure({top:"Styles"})}].concat(it.map(O=>({name:O,parser:k.parser}))),ot=se.define({name:"html",parser:La.configure({props:[ne.add({Element(O){let e=/^(\s*)(<\/)?/.exec(O.textAfter);return O.node.to<=O.pos+e[0].length?O.continue():O.lineIndent(O.node.from)+(e[2]?0:O.unit)},"OpenTag CloseTag SelfClosingTag"(O){return O.column(O.node.from)+O.unit},Document(O){if(O.pos+/\s*/.exec(O.textAfter)[0].lengthO.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),M=ot.configure({wrap:EO(nt,lt)});function tr(O={}){let e="",a;O.matchClosingTags===!1&&(e="noMatch"),O.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(O.nestedLanguages&&O.nestedLanguages.length||O.nestedAttributes&&O.nestedAttributes.length)&&(a=EO((O.nestedLanguages||[]).concat(nt),(O.nestedAttributes||[]).concat(lt)));let t=a?ot.configure({wrap:a,dialect:e}):e?M.configure({dialect:e}):M;return new oe(t,[M.data.of({autocomplete:Or(O)}),O.autoCloseTags!==!1?ar:[],tt().support,mi().support])}const SO=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),ar=Y.inputHandler.of((O,e,a,t)=>{if(O.composing||O.state.readOnly||e!=a||t!=">"&&t!="/"||!M.isActiveAt(O.state,e,-1))return!1;let{state:i}=O,r=i.changeByRange(s=>{var n,o,c;let{head:h}=s,Q=W(i).resolveInner(h,-1),f;if((Q.name=="TagName"||Q.name=="StartTag")&&(Q=Q.parent),t==">"&&Q.name=="OpenTag"){if(((o=(n=Q.parent)===null||n===void 0?void 0:n.lastChild)===null||o===void 0?void 0:o.name)!="CloseTag"&&(f=_(i.doc,Q.parent,h))&&!SO.has(f)){let u=O.state.doc.sliceString(h,h+1)===">",d=`${u?"":">"}`;return{range:z.cursor(h+1),changes:{from:h+(u?1:0),insert:d}}}}else if(t=="/"&&Q.name=="OpenTag"){let u=Q.parent,d=u==null?void 0:u.parent;if(u.from==h-1&&((c=d.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(f=_(i.doc,d,h))&&!SO.has(f)){let $=O.state.doc.sliceString(h,h+1)===">",g=`/${f}${$?"":">"}`,x=h+g.length+($?1:0);return{range:z.cursor(x),changes:{from:h,insert:g}}}}return{range:s}});return r.changes.empty?!1:(O.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}),ir=36,$O=1,rr=2,B=3,me=4,sr=5,nr=6,lr=7,or=8,Qr=9,cr=10,ur=11,hr=12,fr=13,pr=14,dr=15,Sr=16,$r=17,gO=18,gr=19,Qt=20,ct=21,PO=22,Pr=23,mr=24;function we(O){return O>=65&&O<=90||O>=97&&O<=122||O>=48&&O<=57}function Xr(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function v(O,e,a){for(let t=!1;;){if(O.next<0)return;if(O.next==e&&!t){O.advance();return}t=a&&!t&&O.next==92,O.advance()}}function Zr(O){for(;;){if(O.next<0||O.peek(1)<0)return;if(O.next==36&&O.peek(1)==36){O.advance(2);return}O.advance()}}function ut(O,e){for(;!(O.next!=95&&!we(O.next));)e!=null&&(e+=String.fromCharCode(O.next)),O.advance();return e}function br(O){if(O.next==39||O.next==34||O.next==96){let e=O.next;O.advance(),v(O,e,!1)}else ut(O)}function mO(O,e){for(;O.next==48||O.next==49;)O.advance();e&&O.next==e&&O.advance()}function XO(O,e){for(;;){if(O.next==46){if(e)break;e=!0}else if(O.next<48||O.next>57)break;O.advance()}if(O.next==69||O.next==101)for(O.advance(),(O.next==43||O.next==45)&&O.advance();O.next>=48&&O.next<=57;)O.advance()}function ZO(O){for(;!(O.next<0||O.next==10);)O.advance()}function T(O,e){for(let a=0;a!=&|~^/",specialVar:"?",identifierQuotes:'"',words:ht(kr,wr)};function yr(O,e,a,t){let i={};for(let r in ke)i[r]=(O.hasOwnProperty(r)?O:ke)[r];return e&&(i.words=ht(e,a||"",t)),i}function ft(O){return new b(e=>{var a;let{next:t}=e;if(e.advance(),T(t,bO)){for(;T(e.next,bO);)e.advance();e.acceptToken(ir)}else if(t==36&&e.next==36&&O.doubleDollarQuotedStrings)Zr(e),e.acceptToken(B);else if(t==39||t==34&&O.doubleQuotedStrings)v(e,t,O.backslashEscapes),e.acceptToken(B);else if(t==35&&O.hashComments||t==47&&e.next==47&&O.slashComments)ZO(e),e.acceptToken($O);else if(t==45&&e.next==45&&(!O.spaceAfterDashes||e.peek(1)==32))ZO(e),e.acceptToken($O);else if(t==47&&e.next==42){e.advance();for(let i=1;;){let r=e.next;if(e.next<0)break;if(e.advance(),r==42&&e.next==47){if(i--,e.advance(),!i)break}else r==47&&e.next==42&&(i++,e.advance())}e.acceptToken(rr)}else if((t==101||t==69)&&e.next==39)e.advance(),v(e,39,!0);else if((t==110||t==78)&&e.next==39&&O.charSetCasts)e.advance(),v(e,39,O.backslashEscapes),e.acceptToken(B);else if(t==95&&O.charSetCasts)for(let i=0;;i++){if(e.next==39&&i>1){e.advance(),v(e,39,O.backslashEscapes),e.acceptToken(B);break}if(!we(e.next))break;e.advance()}else if(t==40)e.acceptToken(lr);else if(t==41)e.acceptToken(or);else if(t==123)e.acceptToken(Qr);else if(t==125)e.acceptToken(cr);else if(t==91)e.acceptToken(ur);else if(t==93)e.acceptToken(hr);else if(t==59)e.acceptToken(fr);else if(O.unquotedBitLiterals&&t==48&&e.next==98)e.advance(),mO(e),e.acceptToken(PO);else if((t==98||t==66)&&(e.next==39||e.next==34)){const i=e.next;e.advance(),O.treatBitsAsBytes?(v(e,i,O.backslashEscapes),e.acceptToken(Pr)):(mO(e,i),e.acceptToken(PO))}else if(t==48&&(e.next==120||e.next==88)||(t==120||t==88)&&e.next==39){let i=e.next==39;for(e.advance();Xr(e.next);)e.advance();i&&e.next==39&&e.advance(),e.acceptToken(me)}else if(t==46&&e.next>=48&&e.next<=57)XO(e,!0),e.acceptToken(me);else if(t==46)e.acceptToken(pr);else if(t>=48&&t<=57)XO(e,!1),e.acceptToken(me);else if(T(t,O.operatorChars)){for(;T(e.next,O.operatorChars);)e.advance();e.acceptToken(dr)}else if(T(t,O.specialVar))e.next==t&&e.advance(),br(e),e.acceptToken($r);else if(T(t,O.identifierQuotes))v(e,t,!1),e.acceptToken(gr);else if(t==58||t==44)e.acceptToken(Sr);else if(we(t)){let i=ut(e,String.fromCharCode(t));e.acceptToken(e.next==46?gO:(a=O.words[i.toLowerCase()])!==null&&a!==void 0?a:gO)}})}const pt=ft(ke),xr=U.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,pt],topRules:{Script:[0,25]},tokenPrec:0});function ye(O){let e=O.cursor().moveTo(O.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function A(O,e){let a=O.sliceString(e.from,e.to),t=/^([`'"])(.*)\1$/.exec(a);return t?t[2]:a}function ie(O){return O&&(O.name=="Identifier"||O.name=="QuotedIdentifier")}function vr(O,e){if(e.name=="CompositeIdentifier"){let a=[];for(let t=e.firstChild;t;t=t.nextSibling)ie(t)&&a.push(A(O,t));return a}return[A(O,e)]}function wO(O,e){for(let a=[];;){if(!e||e.name!=".")return a;let t=ye(e);if(!ie(t))return a;a.unshift(A(O,t)),e=ye(t)}}function Yr(O,e){let a=W(O).resolveInner(e,-1),t=Tr(O.doc,a);return a.name=="Identifier"||a.name=="QuotedIdentifier"||a.name=="Keyword"?{from:a.from,quoted:a.name=="QuotedIdentifier"?O.doc.sliceString(a.from,a.from+1):null,parents:wO(O.doc,ye(a)),aliases:t}:a.name=="."?{from:e,quoted:null,parents:wO(O.doc,a),aliases:t}:{from:e,quoted:null,parents:[],empty:!0,aliases:t}}const Ur=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function Tr(O,e){let a;for(let i=e;!a;i=i.parent){if(!i)return null;i.name=="Statement"&&(a=i)}let t=null;for(let i=a.firstChild,r=!1,s=null;i;i=i.nextSibling){let n=i.name=="Keyword"?O.sliceString(i.from,i.to).toLowerCase():null,o=null;if(!r)r=n=="from";else if(n=="as"&&s&&ie(i.nextSibling))o=A(O,i.nextSibling);else{if(n&&Ur.has(n))break;s&&ie(i)&&(o=A(O,i))}o&&(t||(t=Object.create(null)),t[o]=vr(O,s)),s=/Identifier$/.test(i.name)?i:null}return t}function qr(O,e){return O?e.map(a=>Object.assign(Object.assign({},a),{label:O+a.label+O,apply:void 0})):e}const _r=/^\w*$/,Wr=/^[`'"]?\w*[`'"]?$/;class qe{constructor(){this.list=[],this.children=void 0}child(e){let a=this.children||(this.children=Object.create(null));return a[e]||(a[e]=new qe)}childCompletions(e){return this.children?Object.keys(this.children).filter(a=>a).map(a=>({label:a,type:e})):[]}}function Vr(O,e,a,t,i){let r=new qe,s=r.child(i||"");for(let n in O){let o=n.indexOf("."),h=(o>-1?r.child(n.slice(0,o)):s).child(o>-1?n.slice(o+1):n);h.list=O[n].map(Q=>typeof Q=="string"?{label:Q,type:"property"}:Q)}s.list=(e||s.childCompletions("type")).concat(t?s.child(t).list:[]);for(let n in r.children){let o=r.child(n);o.list.length||(o.list=o.childCompletions("type"))}return r.list=s.list.concat(a||r.childCompletions("type")),n=>{let{parents:o,from:c,quoted:h,empty:Q,aliases:f}=Yr(n.state,n.pos);if(Q&&!n.explicit)return null;f&&o.length==1&&(o=f[o[0]]||o);let u=r;for(let g of o){for(;!u.children||!u.children[g];)if(u==r)u=s;else if(u==s&&t)u=u.child(t);else return null;u=u.child(g)}let d=h&&n.state.sliceDoc(n.pos,n.pos+1)==h,$=u.list;return u==r&&f&&($=$.concat(Object.keys(f).map(g=>({label:g,type:"constant"})))),{from:c,to:d?n.pos+1:void 0,options:qr(h,$),validFor:h?Wr:_r}}}function Cr(O,e){let a=Object.keys(O).map(t=>({label:e?t.toUpperCase():t,type:O[t]==ct?"type":O[t]==Qt?"keyword":"variable",boost:-1}));return vO(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],YO(a))}let Rr=xr.configure({props:[ne.add({Statement:G()}),le.add({Statement(O){return{from:O.firstChild.to,to:O.to}},BlockComment(O){return{from:O.from+2,to:O.to-2}}}),re({Keyword:l.keyword,Type:l.typeName,Builtin:l.standard(l.name),Bits:l.number,Bytes:l.string,Bool:l.bool,Null:l.null,Number:l.number,String:l.string,Identifier:l.name,QuotedIdentifier:l.special(l.string),SpecialVar:l.special(l.name),LineComment:l.lineComment,BlockComment:l.blockComment,Operator:l.operator,"Semi Punctuation":l.punctuation,"( )":l.paren,"{ }":l.brace,"[ ]":l.squareBracket})]});class I{constructor(e,a){this.dialect=e,this.language=a}get extension(){return this.language.extension}static define(e){let a=yr(e,e.keywords,e.types,e.builtin),t=se.define({name:"sql",parser:Rr.configure({tokenizers:[{from:pt,to:ft(a)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new I(a,t)}}function jr(O,e=!1){return Cr(O.dialect.words,e)}function Gr(O,e=!1){return O.language.data.of({autocomplete:jr(O,e)})}function zr(O){return O.schema?Vr(O.schema,O.tables,O.schemas,O.defaultTable,O.defaultSchema):()=>null}function Ar(O){return O.schema?(O.dialect||dt).language.data.of({autocomplete:zr(O)}):[]}function kO(O={}){let e=O.dialect||dt;return new oe(e.language,[Ar(O),Gr(e,!!O.upperCaseKeywords)])}const dt=I.define({});function Ir(O){let e;return{c(){e=Xt("div"),Zt(e,"class","code-editor"),E(e,"min-height",O[0]?O[0]+"px":null),E(e,"max-height",O[1]?O[1]+"px":"auto")},m(a,t){bt(a,e,t),O[11](e)},p(a,[t]){t&1&&E(e,"min-height",a[0]?a[0]+"px":null),t&2&&E(e,"max-height",a[1]?a[1]+"px":"auto")},i:Re,o:Re,d(a){a&&wt(e),O[11](null)}}}function Er(O,e,a){let t;kt(O,yt,S=>a(12,t=S));const i=xt();let{id:r=""}=e,{value:s=""}=e,{minHeight:n=null}=e,{maxHeight:o=null}=e,{disabled:c=!1}=e,{placeholder:h=""}=e,{language:Q="javascript"}=e,{singleLine:f=!1}=e,u,d,$=new N,g=new N,x=new N,_e=new N;function ce(){u==null||u.focus()}function St(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0})),i("change",s)}function We(){if(!r)return;const S=document.querySelectorAll('[for="'+r+'"]');for(let P of S)P.removeEventListener("click",ce)}function Ve(){if(!r)return;We();const S=document.querySelectorAll('[for="'+r+'"]');for(let P of S)P.addEventListener("click",ce)}function Ce(){switch(Q){case"html":return tr();case"sql-create-index":return kO({dialect:I.define({keywords:"create unique index if not exists on collate asc desc where like isnull notnull date time datetime unixepoch strftime lower upper substr case when then iif if else json_extract json_each json_tree json_array_length json_valid ",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"}),upperCaseKeywords:!0});case"sql-select":let S={};for(let P of t)S[P.name]=Yt.getAllCollectionIdentifiers(P);return kO({dialect:I.define({keywords:"select distinct from where having group by order limit offset join left right inner with like not in match asc desc regexp isnull notnull glob count avg sum min max current random cast as int real text date time datetime unixepoch strftime coalesce lower upper substr case when then iif if else json_extract json_each json_tree json_array_length json_valid ",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"}),schema:S,upperCaseKeywords:!0});default:return tt()}}vt(()=>{const S={key:"Enter",run:P=>{f&&i("submit",s)}};return Ve(),a(10,u=new Y({parent:d,state:V.create({doc:s,extensions:[zt(),At(),It(),Et(),Nt(),V.allowMultipleSelections.of(!0),Bt(Dt,{fallback:!0}),Jt(),Lt(),Mt(),Ft(),Ht.of([S,...Kt,...ea,Oa.find(P=>P.key==="Mod-d"),...ta,...aa]),Y.lineWrapping,ia({icons:!1}),$.of(Ce()),_e.of(je(h)),g.of(Y.editable.of(!0)),x.of(V.readOnly.of(!1)),V.transactionFilter.of(P=>f&&P.newDoc.lines>1?[]:P),Y.updateListener.of(P=>{!P.docChanged||c||(a(3,s=P.state.doc.toString()),St())})]})})),()=>{We(),u==null||u.destroy()}});function $t(S){Ut[S?"unshift":"push"](()=>{d=S,a(2,d)})}return O.$$set=S=>{"id"in S&&a(4,r=S.id),"value"in S&&a(3,s=S.value),"minHeight"in S&&a(0,n=S.minHeight),"maxHeight"in S&&a(1,o=S.maxHeight),"disabled"in S&&a(5,c=S.disabled),"placeholder"in S&&a(6,h=S.placeholder),"language"in S&&a(7,Q=S.language),"singleLine"in S&&a(8,f=S.singleLine)},O.$$.update=()=>{O.$$.dirty&16&&r&&Ve(),O.$$.dirty&1152&&u&&Q&&u.dispatch({effects:[$.reconfigure(Ce())]}),O.$$.dirty&1056&&u&&typeof c<"u"&&u.dispatch({effects:[g.reconfigure(Y.editable.of(!c)),x.reconfigure(V.readOnly.of(c))]}),O.$$.dirty&1032&&u&&s!=u.state.doc.toString()&&u.dispatch({changes:{from:0,to:u.state.doc.length,insert:s}}),O.$$.dirty&1088&&u&&typeof h<"u"&&u.dispatch({effects:[_e.reconfigure(je(h))]})},[n,o,d,s,r,c,h,Q,f,ce,u,$t]}class Dr extends gt{constructor(e){super(),Pt(this,e,Er,Ir,mt,{id:4,value:3,minHeight:0,maxHeight:1,disabled:5,placeholder:6,language:7,singleLine:8,focus:9})}get focus(){return this.$$.ctx[9]}}export{Dr as default}; diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-c1ebdd85.js b/ui/dist/assets/ConfirmEmailChangeDocs-12e0a458.js similarity index 88% rename from ui/dist/assets/ConfirmEmailChangeDocs-c1ebdd85.js rename to ui/dist/assets/ConfirmEmailChangeDocs-12e0a458.js index 78852d21b..6bb1aa4b3 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-c1ebdd85.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-12e0a458.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-38223559.js";import{S as Ae}from"./SdkTabs-9d46fa03.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,T,L,P,M,te,N,R,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` +import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,P as Pe,k as Se,Q as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-077c413f.js";import{S as Ae}from"./SdkTabs-9bbe3355.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,T,L,P,M,te,N,R,le,Q,K=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -20,7 +20,7 @@ import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n 'TOKEN', 'YOUR_PASSWORD', ); - `}});let W=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let W=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required @@ -30,7 +30,7 @@ import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n
Required password
String - The account password to confirm the email change.`,V=h(),B=r("div"),B.textContent="Responses",X=h(),S=r("div"),q=r("div");for(let e=0;eThe account password to confirm the email change.`,V=h(),B=r("div"),B.textContent="Responses",X=h(),S=r("div"),q=r("div");for(let e=0;es(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Ee.getApiExampleUrl(ye.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + `),w.$set(c),(!O||t&1)&&K!==(K=e[0].name+"")&&Y(z,K),t&6&&(W=e[2],v=pe(v,t,ie,1,e,W,ae,q,Pe,_e,null,be)),t&6&&(U=e[2],Se(),k=pe(k,t,ce,1,e,U,ne,A,Oe,ke,null,ue),Te())},i(e){if(!O){Z(w.$$.fragment,e);for(let t=0;ts(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Ee.getApiExampleUrl(ye.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-e9329477.js b/ui/dist/assets/ConfirmPasswordResetDocs-1d1931c0.js similarity index 80% rename from ui/dist/assets/ConfirmPasswordResetDocs-e9329477.js rename to ui/dist/assets/ConfirmPasswordResetDocs-1d1931c0.js index edd6a2235..84df5a2ee 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-e9329477.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-1d1931c0.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-38223559.js";import{S as De}from"./SdkTabs-9d46fa03.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,P as Ne,k as Oe,Q as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-077c413f.js";import{S as De}from"./SdkTabs-9bbe3355.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,Q,N,q,te,B,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,O,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -22,7 +22,7 @@ import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n 'NEW_PASSWORD', 'NEW_PASSWORD_CONFIRM', ); - `}});let I=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let I=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required @@ -36,7 +36,7 @@ import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n
Required passwordConfirm
String - The new password confirmation.`,X=v(),g=r("div"),g.textContent="Responses",Y=v(),N=r("div"),A=r("div");for(let e=0;eThe new password confirmation.`,X=v(),g=r("div"),g.textContent="Responses",Y=v(),O=r("div"),A=r("div");for(let e=0;el(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=Ee.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` + `),R.$set(c),(!C||t&1)&&F!==(F=e[0].name+"")&&K(G,F),t&6&&(I=e[2],w=me(w,t,ie,1,e,I,ae,A,Ne,_e,null,be)),t&6&&(y=e[2],Oe(),k=me(k,t,ce,1,e,y,ne,D,Ce,ke,null,ue),We())},i(e){if(!C){Z(R.$$.fragment,e);for(let t=0;tl(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=Ee.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/ConfirmVerificationDocs-e77b8d5b.js b/ui/dist/assets/ConfirmVerificationDocs-9803d138.js similarity index 66% rename from ui/dist/assets/ConfirmVerificationDocs-e77b8d5b.js rename to ui/dist/assets/ConfirmVerificationDocs-9803d138.js index 430b2dc07..55d414383 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-e77b8d5b.js +++ b/ui/dist/assets/ConfirmVerificationDocs-9803d138.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Oe,p as Se,r as R,u as Ee,M as Me}from"./index-38223559.js";import{S as Ne}from"./SdkTabs-9d46fa03.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&R(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,U,q,le,G,j=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` +import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Se,p as Ee,r as R,u as Me,M as Ne}from"./index-077c413f.js";import{S as Oe}from"./SdkTabs-9bbe3355.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(w,s,C),n(s,_),n(s,u),a||(p=Me(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&R(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,U,q,le,z,j=i[0].name+"",G,se,J,S,W,E,X,M,Y,g,N,h=[],oe=new Map,ie,O,k=[],ne=new Map,y;P=new Oe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); @@ -14,13 +14,13 @@ import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n ... await pb.collection('${(fe=i[0])==null?void 0:fe.name}').confirmVerification('TOKEN'); - `}});let D=i[2];const ae=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let D=i[2];const ae=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required token
String - The token from the verification request email.`,X=v(),E=r("div"),E.textContent="Responses",Y=v(),g=r("div"),M=r("div");for(let e=0;eThe token from the verification request email.`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),g=r("div"),N=r("div");for(let e=0;es(1,u=d.code);return i.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Oe.getApiExampleUrl(Se.baseUrl)),s(2,a=[{code:204,body:"null"},{code:400,body:` + `),P.$set(c),(!y||t&1)&&j!==(j=e[0].name+"")&&H(G,j),t&6&&(D=e[2],h=de(h,t,ae,1,e,D,oe,N,Te,_e,null,be)),t&6&&(V=e[2],ge(),k=de(k,t,ce,1,e,V,ne,O,ye,ke,null,ue),Be())},i(e){if(!y){Z(P.$$.fragment,e);for(let t=0;ts(1,u=d.code);return i.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Se.getApiExampleUrl(Ee.baseUrl)),s(2,a=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/CreateApiDocs-b5573f81.js b/ui/dist/assets/CreateApiDocs-3cd84573.js similarity index 87% rename from ui/dist/assets/CreateApiDocs-b5573f81.js rename to ui/dist/assets/CreateApiDocs-3cd84573.js index 79fb793b1..5b36cdee5 100644 --- a/ui/dist/assets/CreateApiDocs-b5573f81.js +++ b/ui/dist/assets/CreateApiDocs-3cd84573.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Be,x,N as Le,O as ht,k as Bt,P as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-38223559.js";import{S as Nt}from"./SdkTabs-9d46fa03.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Ht,i as Lt,s as Pt,C as Q,M as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Be,x,N as Le,P as ht,k as Bt,Q as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-077c413f.js";import{S as Nt}from"./SdkTabs-9bbe3355.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=O(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record. @@ -17,8 +17,8 @@ import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as Boolean Indicates whether the auth record is verified or not.
- This field can be set only by admins or auth records with "Manage" access.`,C=m(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,v),n(f,T),n(p,w),n(p,M),n(p,g),n(p,D),r(u,E,$),r(u,L,$),r(u,I,$),r(u,j,$),r(u,R,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){K!==(K=O(u))&&(P.d(1),P=K(u),P&&(P.c(),P.m(f,v)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(E),u&&d(L),u&&d(I),u&&d(j),u&&d(R),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var v;f&1&&l!==(l=((v=c[12].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function zt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(` - Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function Kt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Qt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",v,T,w,M,g=z.getFieldValueType(e[12])+"",D,E,L,I;function j(_,O){return _[12].required?It:Et}let R=j(e),S=R(e);function N(_,O){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Qt;if(_[12].type==="url")return Kt;if(_[12].type==="file")return zt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),v=k(f),T=m(),w=a("td"),M=a("span"),D=k(g),E=m(),L=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(M,"class","label"),this.first=l},m(_,O){r(_,l,O),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,v),n(l,T),n(l,w),n(w,M),n(M,D),n(l,E),n(l,L),C&&C.m(L,null),n(l,I)},p(_,O){e=_,R!==(R=j(e))&&(S.d(1),S=R(e),S&&(S.c(),S.m(b,p))),O&1&&f!==(f=e[12].name+"")&&x(v,f),O&1&&g!==(g=z.getFieldValueType(e[12])+"")&&x(D,g),q===(q=N(e))&&C?C.p(e,O):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(L,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Mt(o,e){let l,s=e[7].code+"",b,p,c,f;function v(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",v),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Ot(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Be(s,l,null),n(l,b),p=!0},p(c,f){e=c;const v={};f&4&&(v.content=e[7].body),s.$set(v),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),Fe(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,v,T,w,M=o[0].name+"",g,D,E,L,I,j,R,S,N,q,C,_,O,K,P,u,$,ee,Q=o[0].name+"",me,Re,ge,be,ne,_e,W,ke,je,U,ye,De,ve,V=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Je,Te,Ee,A,Ie,te,Ue,ze,Ke,qe,Qe,Me,We,Ye,Ge,Oe,Xe,Ae,ie,He,X,ae,J=[],Ze=new Map,xe,oe,B=[],et=new Map,Z;S=new Nt({props:{js:` + This field can be set only by admins or auth records with "Manage" access.`,C=m(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,v),n(f,T),n(p,w),n(p,M),n(p,g),n(p,D),r(u,E,$),r(u,L,$),r(u,I,$),r(u,j,$),r(u,R,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){z!==(z=O(u))&&(P.d(1),P=z(u),P&&(P.c(),P.m(f,v)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(E),u&&d(L),u&&d(I),u&&d(j),u&&d(R),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var v;f&1&&l!==(l=((v=c[12].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function Qt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(` + Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function zt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Kt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",v,T,w,M,g=Q.getFieldValueType(e[12])+"",D,E,L,I;function j(_,O){return _[12].required?It:Et}let R=j(e),S=R(e);function N(_,O){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Kt;if(_[12].type==="url")return zt;if(_[12].type==="file")return Qt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),v=k(f),T=m(),w=a("td"),M=a("span"),D=k(g),E=m(),L=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(M,"class","label"),this.first=l},m(_,O){r(_,l,O),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,v),n(l,T),n(l,w),n(w,M),n(M,D),n(l,E),n(l,L),C&&C.m(L,null),n(l,I)},p(_,O){e=_,R!==(R=j(e))&&(S.d(1),S=R(e),S&&(S.c(),S.m(b,p))),O&1&&f!==(f=e[12].name+"")&&x(v,f),O&1&&g!==(g=Q.getFieldValueType(e[12])+"")&&x(D,g),q===(q=N(e))&&C?C.p(e,O):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(L,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Mt(o,e){let l,s=e[7].code+"",b,p,c,f;function v(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",v),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Ot(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Be(s,l,null),n(l,b),p=!0},p(c,f){e=c;const v={};f&4&&(v.content=e[7].body),s.$set(v),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),Fe(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,v,T,w,M=o[0].name+"",g,D,E,L,I,j,R,S,N,q,C,_,O,z,P,u,$,ee,K=o[0].name+"",me,Re,ge,be,ne,_e,W,ke,je,U,ye,De,ve,V=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Je,Te,Ee,A,Ie,te,Ue,Qe,ze,qe,Ke,Me,We,Ye,Ge,Oe,Xe,Ae,ie,He,X,ae,J=[],Ze=new Map,xe,oe,B=[],et=new Map,Z;S=new Nt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[4]}'); @@ -26,7 +26,7 @@ const pb = new PocketBase('${o[4]}'); ... // example create data -const data = ${JSON.stringify(Object.assign({},o[3],z.dummyCollectionSchemaData(o[0])),null,4)}; +const data = ${JSON.stringify(Object.assign({},o[3],Q.dummyCollectionSchemaData(o[0])),null,4)}; const record = await pb.collection('${(st=o[0])==null?void 0:st.name}').create(data); `+((it=o[0])!=null&&it.isAuth?` @@ -40,7 +40,7 @@ final pb = PocketBase('${o[4]}'); ... // example create body -final body = ${JSON.stringify(Object.assign({},o[3],z.dummyCollectionSchemaData(o[0])),null,2)}; +final body = ${JSON.stringify(Object.assign({},o[3],Q.dummyCollectionSchemaData(o[0])),null,2)}; final record = await pb.collection('${(ot=o[0])==null?void 0:ot.name}').create(body: body); `+((rt=o[0])!=null&&rt.isAuth?` @@ -51,7 +51,7 @@ await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('te
For more info and examples you could check the detailed Files upload and handling docs - .`,R=m(),Pe(S.$$.fragment),N=m(),q=a("h6"),q.textContent="API details",C=m(),_=a("div"),O=a("strong"),O.textContent="POST",K=m(),P=a("div"),u=a("p"),$=k("/api/collections/"),ee=a("strong"),me=k(Q),Re=k("/records"),ge=m(),F&&F.c(),be=m(),ne=a("div"),ne.textContent="Body Parameters",_e=m(),W=a("table"),ke=a("thead"),ke.innerHTML=`Param + .`,R=m(),Pe(S.$$.fragment),N=m(),q=a("h6"),q.textContent="API details",C=m(),_=a("div"),O=a("strong"),O.textContent="POST",z=m(),P=a("div"),u=a("p"),$=k("/api/collections/"),ee=a("strong"),me=k(K),Re=k("/records"),ge=m(),F&&F.c(),be=m(),ne=a("div"),ne.textContent="Body Parameters",_e=m(),W=a("table"),ke=a("thead"),ke.innerHTML=`Param Type Description`,je=m(),U=a("tbody"),ye=a("tr"),ye.innerHTML=`
Optional id
@@ -62,11 +62,11 @@ await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('te Type Description`,Ve=m(),Se=a("tbody"),G=a("tr"),$e=a("td"),$e.textContent="expand",Je=m(),Te=a("td"),Te.innerHTML='String',Ee=m(),A=a("td"),Ie=k(`Auto expand relations when returning the created record. Ex.: `),Pe(te.$$.fragment),Ue=k(` - Supports up to 6-levels depth nested relations expansion. `),ze=a("br"),Ke=k(` + Supports up to 6-levels depth nested relations expansion. `),Qe=a("br"),ze=k(` The expanded relations will be appended to the record under the - `),qe=a("code"),qe.textContent="expand",Qe=k(" property (eg. "),Me=a("code"),Me.textContent='"expand": {"relField1": {...}, ...}',We=k(`). + `),qe=a("code"),qe.textContent="expand",Ke=k(" property (eg. "),Me=a("code"),Me.textContent='"expand": {"relField1": {...}, ...}',We=k(`). `),Ye=a("br"),Ge=k(` - Only the relations to which the request user has permissions to `),Oe=a("strong"),Oe.textContent="view",Xe=k(" will be expanded."),Ae=m(),ie=a("div"),ie.textContent="Responses",He=m(),X=a("div"),ae=a("div");for(let t=0;t${JSON.stringify(Object.assign({},t[3],z.dummyCollectionSchemaData(t[0])),null,2)}; +final body = ${JSON.stringify(Object.assign({},t[3],Q.dummyCollectionSchemaData(t[0])),null,2)}; final record = await pb.collection('${(bt=t[0])==null?void 0:bt.name}').create(body: body); `+((_t=t[0])!=null&&_t.isAuth?` // (optional) send an email verification request await pb.collection('${(kt=t[0])==null?void 0:kt.name}').requestVerification('test@example.com'); -`:"")),S.$set(y),(!Z||i&1)&&Q!==(Q=t[0].name+"")&&x(me,Q),t[5]?F||(F=$t(),F.c(),F.m(_,null)):F&&(F.d(1),F=null),(yt=t[0])!=null&&yt.isAuth?H?H.p(t,i):(H=Tt(t),H.c(),H.m(U,ve)):H&&(H.d(1),H=null),i&1&&(de=(vt=t[0])==null?void 0:vt.schema,V=Le(V,i,tt,1,t,de,Ne,U,ht,qt,null,St)),i&6&&(ce=t[2],J=Le(J,i,lt,1,t,ce,Ze,ae,ht,Mt,null,Ct)),i&6&&(re=t[2],Bt(),B=Le(B,i,nt,1,t,re,et,oe,Ft,Ot,null,wt),Rt())},i(t){if(!Z){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;il(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,M;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(z.dummyCollectionRecord(p),null,2)},{code:400,body:` +`:"")),S.$set(y),(!Z||i&1)&&K!==(K=t[0].name+"")&&x(me,K),t[5]?F||(F=$t(),F.c(),F.m(_,null)):F&&(F.d(1),F=null),(yt=t[0])!=null&&yt.isAuth?H?H.p(t,i):(H=Tt(t),H.c(),H.m(U,ve)):H&&(H.d(1),H=null),i&1&&(de=(vt=t[0])==null?void 0:vt.schema,V=Le(V,i,tt,1,t,de,Ne,U,ht,qt,null,St)),i&6&&(ce=t[2],J=Le(J,i,lt,1,t,ce,Ze,ae,ht,Mt,null,Ct)),i&6&&(re=t[2],Bt(),B=Le(B,i,nt,1,t,re,et,oe,Ft,Ot,null,wt),Rt())},i(t){if(!Z){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;il(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,M;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(p),null,2)},{code:400,body:` { "code": 400, "message": "Failed to create record.", @@ -111,4 +111,4 @@ await pb.collection('${(kt=t[0])==null?void 0:kt.name}').requestVerification('te "message": "You are not allowed to perform this request.", "data": {} } - `}]),o.$$.dirty&1&&(p.$isAuth?l(3,v={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(3,v={}))},l(4,b=z.getApiExampleUrl(jt.baseUrl)),[p,c,f,v,b,s,T]}class tl extends Ht{constructor(e){super(),Lt(this,e,Zt,Xt,Pt,{collection:0})}}export{tl as default}; + `}]),o.$$.dirty&1&&(p.$isAuth?l(3,v={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(3,v={}))},l(4,b=Q.getApiExampleUrl(jt.baseUrl)),[p,c,f,v,b,s,T]}class tl extends Ht{constructor(e){super(),Lt(this,e,Zt,Xt,Pt,{collection:0})}}export{tl as default}; diff --git a/ui/dist/assets/DeleteApiDocs-e76eaa1f.js b/ui/dist/assets/DeleteApiDocs-07a7af86.js similarity index 81% rename from ui/dist/assets/DeleteApiDocs-e76eaa1f.js rename to ui/dist/assets/DeleteApiDocs-07a7af86.js index 552b9b63c..751ef4316 100644 --- a/ui/dist/assets/DeleteApiDocs-e76eaa1f.js +++ b/ui/dist/assets/DeleteApiDocs-07a7af86.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Te,P as Oe,n as Be,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-38223559.js";import{S as He}from"./SdkTabs-9d46fa03.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,O,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,P as Ee,k as Te,Q as Be,n as Oe,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-077c413f.js";import{S as He}from"./SdkTabs-9bbe3355.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,B,X,O,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -14,12 +14,12 @@ import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n ... await pb.collection('${(pe=o[0])==null?void 0:pe.name}').delete('RECORD_ID'); - `}});let k=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam + `}});let k=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id String - ID of the record to delete.`,Y=h(),I=c("div"),I.textContent="Responses",Z=h(),R=c("div"),M=c("div");for(let e=0;eID of the record to delete.`,Y=h(),I=c("div"),I.textContent="Responses",Z=h(),R=c("div"),M=c("div");for(let e=0;es(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(p.push({code:204,body:` + `),C.$set(d),(!P||t&1)&&U!==(U=e[0].name+"")&&x(J,U),e[1]?k||(k=ve(),k.c(),k.m(y,null)):k&&(k.d(1),k=null),t&20&&(j=e[4],D=_e(D,t,de,1,e,j,ie,M,Ee,ye,null,he)),t&20&&(S=e[4],Te(),_=_e(_,t,fe,1,e,S,ce,A,Be,De,null,ke),Oe())},i(e){if(!P){ee(C.$$.fragment,e);for(let t=0;ts(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(p.push({code:204,body:` null `}),p.push({code:400,body:` { diff --git a/ui/dist/assets/FilterAutocompleteInput-141a3c4e.js b/ui/dist/assets/FilterAutocompleteInput-e9273c93.js similarity index 98% rename from ui/dist/assets/FilterAutocompleteInput-141a3c4e.js rename to ui/dist/assets/FilterAutocompleteInput-e9273c93.js index 3c205016f..d49ac92e1 100644 --- a/ui/dist/assets/FilterAutocompleteInput-141a3c4e.js +++ b/ui/dist/assets/FilterAutocompleteInput-e9273c93.js @@ -1 +1 @@ -import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-38223559.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-be8a2174.js";function Me(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.define(Me({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; +import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-077c413f.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-03b6b7de.js";function Me(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.define(Me({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-4c95c3ad.js b/ui/dist/assets/ListApiDocs-f0f237f6.js similarity index 87% rename from ui/dist/assets/ListApiDocs-4c95c3ad.js rename to ui/dist/assets/ListApiDocs-f0f237f6.js index 9174c8f48..8e948bb13 100644 --- a/ui/dist/assets/ListApiDocs-4c95c3ad.js +++ b/ui/dist/assets/ListApiDocs-f0f237f6.js @@ -1,14 +1,14 @@ -import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,T as nl,C as ge,p as ol,r as ke}from"./index-38223559.js";import{S as il}from"./SdkTabs-9d46fa03.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,P as Ze,k as tl,Q as el,n as ll,t as Gt,a as Ut,d as ee,R as sl,T as nl,C as ge,p as ol,r as ke}from"./index-077c413f.js";import{S as il}from"./SdkTabs-9bbe3355.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,R,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Rt,oe,mt,ie,H,Ot,at,St,O,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`OPERAND - could be any of the above field literal, string (single or double quoted), number, null, true, false`,b=s(),d=e("li"),h=e("code"),h.textContent="OPERATOR",C=w(` - is one of: - `),x=e("br"),_=s(),f=e("ul"),et=e("li"),kt=e("code"),kt.textContent="=",jt=s(),S=e("span"),S.textContent="Equal",Qt=s(),D=e("li"),ct=e("code"),ct.textContent="!=",O=s(),lt=e("span"),lt.textContent="NOT equal",le=s(),U=e("li"),j=e("code"),j.textContent=">",se=s(),dt=e("span"),dt.textContent="Greater than",vt=s(),st=e("li"),yt=e("code"),yt.textContent=">=",ne=s(),ft=e("span"),ft.textContent="Greater than or equal",pt=s(),nt=e("li"),E=e("code"),E.textContent="<",zt=s(),Ft=e("span"),Ft.textContent="Less than",T=s(),ot=e("li"),Lt=e("code"),Lt.textContent="<=",Jt=s(),At=e("span"),At.textContent="Less than or equal",Q=s(),it=e("li"),Tt=e("code"),Tt.textContent="~",Kt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for - wildcard match)`,L=s(),ut=e("li"),Ot=e("code"),Ot.textContent="!~",oe=s(),mt=e("span"),mt.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for - wildcard match)`,ie=s(),H=e("li"),Rt=e("code"),Rt.textContent="?=",at=s(),St=e("em"),St.textContent="Any/At least one of",R=s(),bt=e("span"),bt.textContent="Equal",ae=s(),z=e("li"),Et=e("code"),Et.textContent="?!=",Vt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",re=s(),N=e("span"),N.textContent="NOT equal",Wt=s(),J=e("li"),ht=e("code"),ht.textContent="?>",ce=s(),I=e("em"),I.textContent="Any/At least one of",de=s(),B=e("span"),B.textContent="Greater than",fe=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",K=s(),_t=e("em"),_t.textContent="Any/At least one of",pe=s(),xt=e("span"),xt.textContent="Greater than or equal",ue=s(),$=e("li"),Mt=e("code"),Mt.textContent="?<",rt=s(),Dt=e("em"),Dt.textContent="Any/At least one of",me=s(),Ht=e("span"),Ht.textContent="Less than",Xt=s(),V=e("li"),wt=e("code"),wt.textContent="?<=",be=s(),It=e("em"),It.textContent="Any/At least one of",he=s(),Ct=e("span"),Ct.textContent="Less than or equal",_e=s(),G=e("li"),W=e("code"),W.textContent="?~",Yt=s(),q=e("em"),q.textContent="Any/At least one of",gt=s(),A=e("span"),A.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + `),x=e("br"),_=s(),f=e("ul"),et=e("li"),kt=e("code"),kt.textContent="=",jt=s(),S=e("span"),S.textContent="Equal",Qt=s(),D=e("li"),ct=e("code"),ct.textContent="!=",R=s(),lt=e("span"),lt.textContent="NOT equal",le=s(),U=e("li"),j=e("code"),j.textContent=">",se=s(),dt=e("span"),dt.textContent="Greater than",vt=s(),st=e("li"),yt=e("code"),yt.textContent=">=",ne=s(),ft=e("span"),ft.textContent="Greater than or equal",pt=s(),nt=e("li"),E=e("code"),E.textContent="<",zt=s(),Ft=e("span"),Ft.textContent="Less than",T=s(),ot=e("li"),Lt=e("code"),Lt.textContent="<=",Jt=s(),At=e("span"),At.textContent="Less than or equal",Q=s(),it=e("li"),Tt=e("code"),Tt.textContent="~",Kt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + wildcard match)`,L=s(),ut=e("li"),Rt=e("code"),Rt.textContent="!~",oe=s(),mt=e("span"),mt.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + wildcard match)`,ie=s(),H=e("li"),Ot=e("code"),Ot.textContent="?=",at=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),bt=e("span"),bt.textContent="Equal",ae=s(),z=e("li"),Et=e("code"),Et.textContent="?!=",Vt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",re=s(),N=e("span"),N.textContent="NOT equal",Wt=s(),J=e("li"),ht=e("code"),ht.textContent="?>",ce=s(),I=e("em"),I.textContent="Any/At least one of",de=s(),B=e("span"),B.textContent="Greater than",fe=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",K=s(),_t=e("em"),_t.textContent="Any/At least one of",pe=s(),xt=e("span"),xt.textContent="Greater than or equal",ue=s(),$=e("li"),Mt=e("code"),Mt.textContent="?<",rt=s(),Dt=e("em"),Dt.textContent="Any/At least one of",me=s(),Ht=e("span"),Ht.textContent="Less than",Xt=s(),V=e("li"),wt=e("code"),wt.textContent="?<=",be=s(),It=e("em"),It.textContent="Any/At least one of",he=s(),Ct=e("span"),Ct.textContent="Less than or equal",_e=s(),G=e("li"),W=e("code"),W.textContent="?~",Yt=s(),q=e("em"),q.textContent="Any/At least one of",gt=s(),A=e("span"),A.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard match)`,xe=s(),X=e("li"),Y=e("code"),Y.textContent="?!~",y=s(),Bt=e("em"),Bt.textContent="Any/At least one of",Z=s(),v=e("span"),v.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard match)`,tt=s(),k=e("p"),k.innerHTML=`To group and combine several expressions you could use brackets - (...), && (AND) and || (OR) tokens.`,i(h,"class","txt-danger"),i(kt,"class","filter-op svelte-1w7s5nw"),i(S,"class","txt"),i(ct,"class","filter-op svelte-1w7s5nw"),i(lt,"class","txt"),i(j,"class","filter-op svelte-1w7s5nw"),i(dt,"class","txt"),i(yt,"class","filter-op svelte-1w7s5nw"),i(ft,"class","txt"),i(E,"class","filter-op svelte-1w7s5nw"),i(Ft,"class","txt"),i(Lt,"class","filter-op svelte-1w7s5nw"),i(At,"class","txt"),i(Tt,"class","filter-op svelte-1w7s5nw"),i(Pt,"class","txt"),i(Ot,"class","filter-op svelte-1w7s5nw"),i(mt,"class","txt"),i(Rt,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(bt,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(Nt,"class","txt-hint"),i(N,"class","txt"),i(ht,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(qt,"class","filter-op svelte-1w7s5nw"),i(_t,"class","txt-hint"),i(xt,"class","txt"),i(Mt,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Ht,"class","txt"),i(wt,"class","filter-op svelte-1w7s5nw"),i(It,"class","txt-hint"),i(Ct,"class","txt"),i(W,"class","filter-op svelte-1w7s5nw"),i(q,"class","txt-hint"),i(A,"class","txt"),i(Y,"class","filter-op svelte-1w7s5nw"),i(Bt,"class","txt-hint"),i(v,"class","txt")},m(F,$t){u(F,n,$t),u(F,o,$t),u(F,a,$t),t(a,p),t(a,b),t(a,d),t(d,h),t(d,C),t(d,x),t(d,_),t(d,f),t(f,et),t(et,kt),t(et,jt),t(et,S),t(f,Qt),t(f,D),t(D,ct),t(D,O),t(D,lt),t(f,le),t(f,U),t(U,j),t(U,se),t(U,dt),t(f,vt),t(f,st),t(st,yt),t(st,ne),t(st,ft),t(f,pt),t(f,nt),t(nt,E),t(nt,zt),t(nt,Ft),t(f,T),t(f,ot),t(ot,Lt),t(ot,Jt),t(ot,At),t(f,Q),t(f,it),t(it,Tt),t(it,Kt),t(it,Pt),t(f,L),t(f,ut),t(ut,Ot),t(ut,oe),t(ut,mt),t(f,ie),t(f,H),t(H,Rt),t(H,at),t(H,St),t(H,R),t(H,bt),t(f,ae),t(f,z),t(z,Et),t(z,Vt),t(z,Nt),t(z,re),t(z,N),t(f,Wt),t(f,J),t(J,ht),t(J,ce),t(J,I),t(J,de),t(J,B),t(f,fe),t(f,P),t(P,qt),t(P,K),t(P,_t),t(P,pe),t(P,xt),t(f,ue),t(f,$),t($,Mt),t($,rt),t($,Dt),t($,me),t($,Ht),t(f,Xt),t(f,V),t(V,wt),t(V,be),t(V,It),t(V,he),t(V,Ct),t(f,_e),t(f,G),t(G,W),t(G,Yt),t(G,q),t(G,gt),t(G,A),t(f,xe),t(f,X),t(X,Y),t(X,y),t(X,Bt),t(X,Z),t(X,v),u(F,tt,$t),u(F,k,$t)},d(F){F&&m(n),F&&m(o),F&&m(a),F&&m(tt),F&&m(k)}}}function cl(c){let n,o,a,p,b;function d(_,f){return _[0]?rl:al}let h=d(c),C=h(c),x=c[0]&&Ie();return{c(){n=e("button"),C.c(),o=s(),x&&x.c(),a=Ye(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),C.m(n,null),u(_,o,f),x&&x.m(_,f),u(_,a,f),p||(b=Xe(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(C.d(1),C=h(_),C&&(C.c(),C.m(n,null))),_[0]?x||(x=Ie(),x.c(),x.m(a.parentNode,a)):x&&(x.d(1),x=null)},i:De,o:De,d(_){_&&m(n),C.d(),_&&m(o),x&&x.d(_),_&&m(a),p=!1,b()}}}function dl(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class fl extends Ke{constructor(n){super(),Ve(this,n,dl,cl,We,{})}}function Be(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ge(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ue(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function je(c){let n;return{c(){n=e("p"),n.innerHTML="Requires admin Authorization:TOKEN header",i(n,"class","txt-hint txt-sm txt-right")},m(o,a){u(o,n,a)},d(o){o&&m(n)}}}function Qe(c){let n,o=c[12]+"",a,p=c[14](...), && (AND) and || (OR) tokens.`,i(h,"class","txt-danger"),i(kt,"class","filter-op svelte-1w7s5nw"),i(S,"class","txt"),i(ct,"class","filter-op svelte-1w7s5nw"),i(lt,"class","txt"),i(j,"class","filter-op svelte-1w7s5nw"),i(dt,"class","txt"),i(yt,"class","filter-op svelte-1w7s5nw"),i(ft,"class","txt"),i(E,"class","filter-op svelte-1w7s5nw"),i(Ft,"class","txt"),i(Lt,"class","filter-op svelte-1w7s5nw"),i(At,"class","txt"),i(Tt,"class","filter-op svelte-1w7s5nw"),i(Pt,"class","txt"),i(Rt,"class","filter-op svelte-1w7s5nw"),i(mt,"class","txt"),i(Ot,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(bt,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(Nt,"class","txt-hint"),i(N,"class","txt"),i(ht,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(qt,"class","filter-op svelte-1w7s5nw"),i(_t,"class","txt-hint"),i(xt,"class","txt"),i(Mt,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Ht,"class","txt"),i(wt,"class","filter-op svelte-1w7s5nw"),i(It,"class","txt-hint"),i(Ct,"class","txt"),i(W,"class","filter-op svelte-1w7s5nw"),i(q,"class","txt-hint"),i(A,"class","txt"),i(Y,"class","filter-op svelte-1w7s5nw"),i(Bt,"class","txt-hint"),i(v,"class","txt")},m(F,$t){u(F,n,$t),u(F,o,$t),u(F,a,$t),t(a,p),t(a,b),t(a,d),t(d,h),t(d,C),t(d,x),t(d,_),t(d,f),t(f,et),t(et,kt),t(et,jt),t(et,S),t(f,Qt),t(f,D),t(D,ct),t(D,R),t(D,lt),t(f,le),t(f,U),t(U,j),t(U,se),t(U,dt),t(f,vt),t(f,st),t(st,yt),t(st,ne),t(st,ft),t(f,pt),t(f,nt),t(nt,E),t(nt,zt),t(nt,Ft),t(f,T),t(f,ot),t(ot,Lt),t(ot,Jt),t(ot,At),t(f,Q),t(f,it),t(it,Tt),t(it,Kt),t(it,Pt),t(f,L),t(f,ut),t(ut,Rt),t(ut,oe),t(ut,mt),t(f,ie),t(f,H),t(H,Ot),t(H,at),t(H,St),t(H,O),t(H,bt),t(f,ae),t(f,z),t(z,Et),t(z,Vt),t(z,Nt),t(z,re),t(z,N),t(f,Wt),t(f,J),t(J,ht),t(J,ce),t(J,I),t(J,de),t(J,B),t(f,fe),t(f,P),t(P,qt),t(P,K),t(P,_t),t(P,pe),t(P,xt),t(f,ue),t(f,$),t($,Mt),t($,rt),t($,Dt),t($,me),t($,Ht),t(f,Xt),t(f,V),t(V,wt),t(V,be),t(V,It),t(V,he),t(V,Ct),t(f,_e),t(f,G),t(G,W),t(G,Yt),t(G,q),t(G,gt),t(G,A),t(f,xe),t(f,X),t(X,Y),t(X,y),t(X,Bt),t(X,Z),t(X,v),u(F,tt,$t),u(F,k,$t)},d(F){F&&m(n),F&&m(o),F&&m(a),F&&m(tt),F&&m(k)}}}function cl(c){let n,o,a,p,b;function d(_,f){return _[0]?rl:al}let h=d(c),C=h(c),x=c[0]&&Ie();return{c(){n=e("button"),C.c(),o=s(),x&&x.c(),a=Ye(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),C.m(n,null),u(_,o,f),x&&x.m(_,f),u(_,a,f),p||(b=Xe(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(C.d(1),C=h(_),C&&(C.c(),C.m(n,null))),_[0]?x||(x=Ie(),x.c(),x.m(a.parentNode,a)):x&&(x.d(1),x=null)},i:De,o:De,d(_){_&&m(n),C.d(),_&&m(o),x&&x.d(_),_&&m(a),p=!1,b()}}}function dl(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class fl extends Ke{constructor(n){super(),Ve(this,n,dl,cl,We,{})}}function Be(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ge(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ue(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function je(c){let n;return{c(){n=e("p"),n.innerHTML="Requires admin Authorization:TOKEN header",i(n,"class","txt-hint txt-sm txt-right")},m(o,a){u(o,n,a)},d(o){o&&m(n)}}}function Qe(c){let n,o=c[12]+"",a,p=c[14]'2022-01-01') - `}}),P=new fl({}),rt=new $e({props:{content:"?expand=relField1,relField2.subRelField"}});let F=c[5];const $t=l=>l[7].code;for(let l=0;ll[7].code;for(let l=0;lParam + `}}),P=new fl({}),rt=new $e({props:{content:"?expand=relField1,relField2.subRelField"}});let F=c[5];const $t=l=>l[7].code;for(let l=0;ll[7].code;for(let l=0;lParam Type Description`,Ft=s(),T=e("tbody"),ot=e("tr"),ot.innerHTML=`page Number The page (aka. offset) of the paginated list (default to 1).`,Lt=s(),Jt=e("tr"),Jt.innerHTML=`perPage Number - Specify the max returned records per page (default to 30).`,At=s(),Q=e("tr"),it=e("td"),it.textContent="sort",Tt=s(),Kt=e("td"),Kt.innerHTML='String',Pt=s(),L=e("td"),ut=w("Specify the records order attribute(s). "),Ot=e("br"),oe=w(` - Add `),mt=e("code"),mt.textContent="-",ie=w(" / "),H=e("code"),H.textContent="+",Rt=w(` (default) in front of the attribute for DESC / ASC order. + Specify the max returned records per page (default to 30).`,At=s(),Q=e("tr"),it=e("td"),it.textContent="sort",Tt=s(),Kt=e("td"),Kt.innerHTML='String',Pt=s(),L=e("td"),ut=w("Specify the records order attribute(s). "),Rt=e("br"),oe=w(` + Add `),mt=e("code"),mt.textContent="-",ie=w(" / "),H=e("code"),H.textContent="+",Ot=w(` (default) in front of the attribute for DESC / ASC order. Ex.: - `),Zt(at.$$.fragment),St=s(),R=e("p"),bt=e("strong"),bt.textContent="Supported record sort fields:",ae=s(),z=e("br"),Et=s(),Vt=e("code"),Vt.textContent="@random",Nt=w(`, + `),Zt(at.$$.fragment),St=s(),O=e("p"),bt=e("strong"),bt.textContent="Supported record sort fields:",ae=s(),z=e("br"),Et=s(),Vt=e("code"),Vt.textContent="@random",Nt=w(`, `);for(let l=0;lString',ce=s(),I=e("td"),de=w(`Filter the returned records. Ex.: `),Zt(B.$$.fragment),fe=s(),Zt(P.$$.fragment),qt=s(),K=e("tr"),_t=e("td"),_t.textContent="expand",pe=s(),xt=e("td"),xt.innerHTML='String',ue=s(),$=e("td"),Mt=w(`Auto expand record relations. Ex.: `),Zt(rt.$$.fragment),Dt=w(` @@ -75,7 +75,7 @@ import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o The expanded relations will be appended to each individual record under the `),Xt=e("code"),Xt.textContent="expand",V=w(" property (eg. "),wt=e("code"),wt.textContent='"expand": {"relField1": {...}, ...}',be=w(`). `),It=e("br"),he=w(` - Only the relations to which the request user has permissions to `),Ct=e("strong"),Ct.textContent="view",_e=w(" will be expanded."),G=s(),W=e("div"),W.textContent="Responses",Yt=s(),q=e("div"),gt=e("div");for(let l=0;l= "2022-01-01 00:00:00" && someField1 != someField2', }); // you can also fetch all records at once via getFullList - const records = await pb.collection('${(Re=l[0])==null?void 0:Re.name}').getFullList({ + const records = await pb.collection('${(Oe=l[0])==null?void 0:Oe.name}').getFullList({ sort: '-created', }); @@ -120,7 +120,7 @@ import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o 'someField="test"', expand: 'relField1,relField2.subRelField', ); - `),S.$set(g),(!Z||r&1)&&vt!==(vt=l[0].name+"")&&Ce(st,vt),l[1]?v||(v=je(),v.c(),v.m(O,null)):v&&(v.d(1),v=null),r&16){tt=l[4];let M;for(M=0;Mo(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ge.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(C.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ge.dummyCollectionRecord(d),ge.dummyCollectionRecord(d)]},null,2)}),C.push({code:400,body:` + `),S.$set(g),(!Z||r&1)&&vt!==(vt=l[0].name+"")&&Ce(st,vt),l[1]?v||(v=je(),v.c(),v.m(R,null)):v&&(v.d(1),v=null),r&16){tt=l[4];let M;for(M=0;Mo(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ge.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(C.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ge.dummyCollectionRecord(d),ge.dummyCollectionRecord(d)]},null,2)}),C.push({code:400,body:` { "code": 400, "message": "Something went wrong while processing your request. Invalid filter.", diff --git a/ui/dist/assets/ListExternalAuthsDocs-72ff2f65.js b/ui/dist/assets/ListExternalAuthsDocs-92bdae8f.js similarity index 82% rename from ui/dist/assets/ListExternalAuthsDocs-72ff2f65.js rename to ui/dist/assets/ListExternalAuthsDocs-92bdae8f.js index 502b385d0..7ab5114a1 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-72ff2f65.js +++ b/ui/dist/assets/ListExternalAuthsDocs-92bdae8f.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-38223559.js";import{S as Ne}from"./SdkTabs-9d46fa03.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Te(a,l){let o,n=l[5].code+"",f,h,c,p;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){d(g,o,P),s(o,f),s(o,h),c||(p=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,W,ae,z,A,ne,Q,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,P as Le,k as Oe,Q as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-077c413f.js";import{S as Ne}from"./SdkTabs-9bbe3355.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Te(a,l){let o,n=l[5].code+"",f,h,c,p;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){d(g,o,P),s(o,f),s(o,h),c||(p=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,O=a[0].name+"",N,oe,se,G,K,y,Q,S,F,$,W,ae,z,A,ne,J,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -22,12 +22,12 @@ import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s final result = await pb.collection('${(ke=a[0])==null?void 0:ke.name}').listExternalAuths( pb.authStore.model.id, ); - `}});let R=a[2];const fe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Y=_(),E=i("div"),E.textContent="Path Parameters",Z=_(),I=i("table"),I.innerHTML=`Param + `}});let R=a[2];const fe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Y=_(),E=i("div"),E.textContent="Path Parameters",Z=_(),I=i("table"),I.innerHTML=`Param Type Description id String - ID of the auth record.`,x=_(),B=i("div"),B.textContent="Responses",ee=_(),T=i("div"),q=i("div");for(let e=0;eID of the auth record.`,x=_(),B=i("div"),B.textContent="Responses",ee=_(),T=i("div"),q=i("div");for(let e=0;eo(1,h=m.code);return a.$$set=m=>{"collection"in m&&o(0,f=m.collection)},a.$$.update=()=>{a.$$.dirty&1&&o(2,c=[{code:200,body:` + `),y.$set(r),(!C||t&1)&&D!==(D=e[0].name+"")&&U(V,D),t&6&&(R=e[2],w=Pe(w,t,fe,1,e,R,de,q,Le,Te,null,Ae)),t&6&&(L=e[2],Oe(),k=Pe(k,t,me,1,e,L,pe,M,We,Ce,null,ye),ze())},i(e){if(!C){te(y.$$.fragment,e);for(let t=0;to(1,h=m.code);return a.$$set=m=>{"collection"in m&&o(0,f=m.collection)},a.$$.update=()=>{a.$$.dirty&1&&o(2,c=[{code:200,body:` [ { "id": "8171022dc95a4e8", @@ -90,4 +90,4 @@ import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s "message": "The requested resource wasn't found.", "data": {} } - `}])},o(3,n=He.getApiExampleUrl(Re.baseUrl)),[f,h,c,n,p]}class Qe extends Be{constructor(l){super(),qe(this,l,Ke,Ge,Me,{collection:0})}}export{Qe as default}; + `}])},o(3,n=He.getApiExampleUrl(Re.baseUrl)),[f,h,c,n,p]}class Je extends Be{constructor(l){super(),qe(this,l,Ke,Ge,Me,{collection:0})}}export{Je as default}; diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-bc30579b.js b/ui/dist/assets/PageAdminConfirmPasswordReset-283a47f4.js similarity index 57% rename from ui/dist/assets/PageAdminConfirmPasswordReset-bc30579b.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-283a47f4.js index 932d2aa65..26c39d749 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-bc30579b.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-283a47f4.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-38223559.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password - `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; +import{S as E,i as G,s as I,F as K,c as A,m as B,t as N,a as T,d as h,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as j,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-077c413f.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=j(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=j(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,F,P,v,k,R,z,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password + `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",F=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,F,$),b(a,P,$),_(P,v),k=!0,R||(z=[j(e,"submit",O(f[4])),Q(U.call(null,v))],R=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const D={};$&769&&(D.$$scope={dirty:$,ctx:a}),r.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:a}),d.$set(H),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(N(r.$$.fragment,a),N(d.$$.fragment,a),k=!0)},o(a){T(r.$$.fragment,a),T(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),h(r),h(d),a&&w(F),a&&w(P),R=!1,V(z)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(N(e.$$.fragment,s),o=!0)},o(s){T(e.$$.fragment,s),o=!1},d(s){h(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.error(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-0320e30a.js b/ui/dist/assets/PageAdminRequestPasswordReset-0320e30a.js new file mode 100644 index 000000000..e59309ede --- /dev/null +++ b/ui/dist/assets/PageAdminRequestPasswordReset-0320e30a.js @@ -0,0 +1,2 @@ +import{S as M,i as T,s as j,F as z,c as R,m as S,t as w,a as y,d as E,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as H,v as I,w as h,x as J,y as P,z as L}from"./index-077c413f.js";function K(c){let e,s,n,l,t,i,f,m,o,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

+

Enter the email associated with your account and we’ll send you a recovery link:

`,n=g(),R(l.$$.fragment),t=g(),i=_("button"),f=_("i"),m=g(),o=_("span"),o.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(o,"class","txt"),p(i,"type","submit"),p(i,"class","btn btn-lg btn-block"),i.disabled=c[1],F(i,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,i),d(i,f),d(i,m),d(i,o),a=!0,b||(u=H(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(i.disabled=r[1]),(!a||$&2)&&F(i,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),E(l),b=!1,u()}}}function O(c){let e,s,n,l,t,i,f,m,o;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),i=h("Check "),f=_("strong"),m=h(c[0]),o=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,i),d(t,f),d(f,m),d(t,o)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,i,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",i=c[5]),t.required=!0,t.autofocus=!0},m(o,a){k(o,e,a),d(e,s),k(o,l,a),k(o,t,a),L(t,c[0]),t.focus(),f||(m=H(t,"input",c[4]),f=!0)},p(o,a){a&32&&n!==(n=o[5])&&p(e,"for",n),a&32&&i!==(i=o[5])&&p(t,"id",i),a&1&&t.value!==o[0]&&L(t,o[0])},d(o){o&&v(e),o&&v(l),o&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,i,f,m;const o=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=o[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),i=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=o[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){i||(w(s),i=!0)},o(u){y(s),i=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){R(e.$$.fragment)},m(n,l){S(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function i(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.error(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,i,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-40671a2b.js b/ui/dist/assets/PageAdminRequestPasswordReset-40671a2b.js deleted file mode 100644 index 126b2fc83..000000000 --- a/ui/dist/assets/PageAdminRequestPasswordReset-40671a2b.js +++ /dev/null @@ -1,2 +0,0 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-38223559.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

-

Enter the email associated with your account and we’ll send you a recovery link:

`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),(!a||$&2)&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=E(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageOAuth2Redirect-c20f1fc5.js b/ui/dist/assets/PageOAuth2Redirect-455a84f6.js similarity index 87% rename from ui/dist/assets/PageOAuth2Redirect-c20f1fc5.js rename to ui/dist/assets/PageOAuth2Redirect-455a84f6.js index 2dc8422cc..03c1121cd 100644 --- a/ui/dist/assets/PageOAuth2Redirect-c20f1fc5.js +++ b/ui/dist/assets/PageOAuth2Redirect-455a84f6.js @@ -1,2 +1,2 @@ -import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,H as h}from"./index-38223559.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`

Auth completed.

+import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,H as h}from"./index-077c413f.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`

Auth completed.

You can go back to the app if this window is not automatically closed.
`,l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-18d5209b.js b/ui/dist/assets/PageRecordConfirmEmailChange-18d5209b.js new file mode 100644 index 000000000..a13108f50 --- /dev/null +++ b/ui/dist/assets/PageRecordConfirmEmailChange-18d5209b.js @@ -0,0 +1,4 @@ +import{S as G,i as I,s as J,F as M,c as H,m as L,t as v,a as y,d as z,C as N,E as O,g as _,k as R,n as W,o as b,O as Y,G as j,p as A,q as B,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as D,y as E,x as K,z as F}from"./index-077c413f.js";function Q(r){let e,t,l,s,n,o,c,i,a,u,g,$,p=r[3]&&S(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address + `),p&&p.c(),n=h(),H(o.$$.fragment),c=h(),i=m("button"),a=m("span"),a.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(a,"class","txt"),d(i,"type","submit"),d(i,"class","btn btn-lg btn-block"),i.disabled=r[1],T(i,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),L(o,e,null),k(e,c),k(e,i),k(i,a),u=!0,g||($=P(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=S(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(i.disabled=f[1]),(!u||w&2)&&T(i,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),z(o),g=!1,$()}}}function U(r){let e,t,l,s,n;return{c(){e=m("div"),e.innerHTML=`
+

Successfully changed the user email address.

+

You can now sign in with your new email address.

`,t=h(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function S(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&K(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,i;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(a,u){_(a,e,u),k(e,t),_(a,s,u),_(a,n,u),F(n,r[0]),n.focus(),c||(i=P(n,"input",r[7]),c=!0)},p(a,u){u&256&&l!==(l=a[8])&&d(e,"for",l),u&256&&o!==(o=a[8])&&d(n,"id",o),u&1&&n.value!==a[0]&&F(n,a[0])},d(a){a&&b(e),a&&b(s),a&&b(n),c=!1,i()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(i,a){return i[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=O()},m(i,a){o[e].m(i,a),_(i,l,a),s=!0},p(i,a){let u=e;e=c(i),e===u?o[e].p(i,a):(R(),y(o[u],1,1,()=>{o[u]=null}),W(),t=o[e],t?t.p(i,a):(t=o[e]=n[e](i),t.c()),v(t,1),t.m(l.parentNode,l))},i(i){s||(v(t),s=!0)},o(i){y(t),s=!1},d(i){o[e].d(i),i&&b(l)}}}function Z(r){let e,t;return e=new M({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){H(e.$$.fragment)},m(l,s){L(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){z(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function i(){if(o)return;t(1,o=!0);const g=new Y("../");try{const $=j(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){A.error($)}t(1,o=!1)}const a=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=N.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,i,s,a,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-51c5d98d.js b/ui/dist/assets/PageRecordConfirmEmailChange-51c5d98d.js deleted file mode 100644 index 5cdd267dc..000000000 --- a/ui/dist/assets/PageRecordConfirmEmailChange-51c5d98d.js +++ /dev/null @@ -1,4 +0,0 @@ -import{S as z,i as G,s as I,F as J,c as R,m as S,t as v,a as y,d as L,C as M,E as N,g as _,k as W,n as Y,o as b,R as j,G as A,p as B,q as D,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-38223559.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address - `),p&&p.c(),n=h(),R(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],T(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),S(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=H(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&T(a,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),L(o),g=!1,$()}}}function U(r){let e,t,l,s,n;return{c(){e=m("div"),e.innerHTML=`
-

Successfully changed the user email address.

-

You can now sign in with your new email address.

`,t=h(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function H(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,t),_(i,s,u),_(i,n,u),F(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&F(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){R(e.$$.fragment)},m(l,s){S(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){L(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-5ecff2bc.js b/ui/dist/assets/PageRecordConfirmPasswordReset-5ecff2bc.js deleted file mode 100644 index e53573219..000000000 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-5ecff2bc.js +++ /dev/null @@ -1,4 +0,0 @@ -import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,R as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-38223559.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password - `),d&&d.c(),t=P(),H(o.$$.fragment),c=P(),H(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=S(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`
-

Successfully changed the user password.

-

You can now sign in with your new password.

`,l=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=S(s,"click",r[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=S(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=S(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){H(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!1;async function i(){if(c)return;l(2,c=!0);const g=new K("../");try{const C=O(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-c981e373.js b/ui/dist/assets/PageRecordConfirmPasswordReset-c981e373.js new file mode 100644 index 000000000..d5ca8538a --- /dev/null +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-c981e373.js @@ -0,0 +1,4 @@ +import{S as J,i as M,s as O,F as W,c as N,m as T,t as y,a as q,d as H,C as Y,E as j,g as _,k as A,n as B,o as m,O as D,G as K,p as Q,q as E,e as b,w as h,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as R}from"./index-077c413f.js";function X(r){let e,l,s,n,t,o,c,u,i,a,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),u=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=h(`Reset your user password + `),d&&d.c(),t=P(),N(o.$$.fragment),c=P(),N(u.$$.fragment),i=P(),a=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=r[2],G(a,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),T(o,e,null),w(e,c),T(u,e,null),w(e,i),w(e,a),w(a,v),k=!0,g||(C=S(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),u.$set(z),(!k||$&4)&&(a.disabled=f[2]),(!k||$&4)&&G(a,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(u.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(u.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),H(o),H(u),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`
+

Successfully changed the user password.

+

You can now sign in with your new password.

`,l=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=S(s,"click",r[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=h("for "),l=b("strong"),s=h(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,u;return{c(){e=b("label"),l=h("New password"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,a){_(i,e,a),w(e,l),_(i,n,a),_(i,t,a),R(t,r[0]),t.focus(),c||(u=S(t,"input",r[8]),c=!0)},p(i,a){a&1024&&s!==(s=i[10])&&p(e,"for",s),a&1024&&o!==(o=i[10])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,u()}}}function ee(r){let e,l,s,n,t,o,c,u;return{c(){e=b("label"),l=h("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,a){_(i,e,a),w(e,l),_(i,n,a),_(i,t,a),R(t,r[1]),c||(u=S(t,"input",r[9]),c=!0)},p(i,a){a&1024&&s!==(s=i[10])&&p(e,"for",s),a&1024&&o!==(o=i[10])&&p(t,"id",o),a&2&&t.value!==i[1]&&R(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,u()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(u,i){return u[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=j()},m(u,i){o[e].m(u,i),_(u,s,i),n=!0},p(u,i){let a=e;e=c(u),e===a?o[e].p(u,i):(A(),q(o[a],1,1,()=>{o[a]=null}),B(),l=o[e],l?l.p(u,i):(l=o[e]=t[e](u),l.c()),y(l,1),l.m(s.parentNode,s))},i(u){n||(y(l),n=!0)},o(u){q(l),n=!1},d(u){o[e].d(u),u&&m(s)}}}function se(r){let e,l;return e=new W({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},m(s,n){T(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){H(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,u=!1;async function i(){if(c)return;l(2,c=!0);const g=new D("../");try{const C=K(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,u=!0)}catch(C){Q.error(C)}l(2,c=!1)}const a=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=Y.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,u,s,i,n,a,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,O,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-5529d20b.js b/ui/dist/assets/PageRecordConfirmVerification-63d735a5.js similarity index 76% rename from ui/dist/assets/PageRecordConfirmVerification-5529d20b.js rename to ui/dist/assets/PageRecordConfirmVerification-63d735a5.js index 1e28c41a2..21359e6eb 100644 --- a/ui/dist/assets/PageRecordConfirmVerification-5529d20b.js +++ b/ui/dist/assets/PageRecordConfirmVerification-63d735a5.js @@ -1,3 +1,3 @@ -import{S as v,i as y,s as w,F as g,c as x,m as C,t as $,a as L,d as P,R as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-38223559.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`
+import{S as v,i as y,s as w,F as g,c as x,m as C,t as $,a as L,d as P,O as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-077c413f.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`

Invalid or expired verification token.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[4]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`
-

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function R(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function V(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[R]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function q(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const m=H(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class G extends v{constructor(t){super(),y(this,t,q,V,w,{params:2})}}export{G as default}; +

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const m=H(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-95487622.js b/ui/dist/assets/RealtimeApiDocs-e134c079.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-95487622.js rename to ui/dist/assets/RealtimeApiDocs-e134c079.js index a09979d53..151ae5982 100644 --- a/ui/dist/assets/RealtimeApiDocs-95487622.js +++ b/ui/dist/assets/RealtimeApiDocs-e134c079.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,T as me,p as de}from"./index-38223559.js";import{S as fe}from"./SdkTabs-9d46fa03.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` +import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,T as me,p as de}from"./index-077c413f.js";import{S as fe}from"./SdkTabs-9bbe3355.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs-fdf64daa.js b/ui/dist/assets/RequestEmailChangeDocs-ab29fae1.js similarity index 71% rename from ui/dist/assets/RequestEmailChangeDocs-fdf64daa.js rename to ui/dist/assets/RequestEmailChangeDocs-ab29fae1.js index 4a2ad8663..964e3931a 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-fdf64daa.js +++ b/ui/dist/assets/RequestEmailChangeDocs-ab29fae1.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-38223559.js";import{S as je}from"./SdkTabs-9d46fa03.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&d(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as N,N as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as O,u as Ue,M as je}from"./index-077c413f.js";import{S as De}from"./SdkTabs-9bbe3355.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),O(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Ue(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&N(_,a),q&6&&O(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new je({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),O(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&O(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&d(s),ye(a)}}}function Le(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,g,H,le,U,E,se,G,j=o[0].name+"",J,ae,oe,D,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -18,13 +18,13 @@ import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x await pb.collection('${(ue=o[0])==null?void 0:ue.name}').authWithPassword('test@example.com', '1234567890'); await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestEmailChange('new@example.com'); - `}});let D=o[2];const re=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",V=k(),B=r("div"),B.textContent="Body Parameters",X=k(),S=r("table"),S.innerHTML=`Param + `}});let L=o[2];const re=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",V=k(),B=r("div"),B.textContent="Body Parameters",X=k(),S=r("table"),S.innerHTML=`Param Type Description
Required newEmail
String - The new email address to send the change email request.`,Y=k(),M=r("div"),M.textContent="Responses",Z=k(),C=r("div"),R=r("div");for(let e=0;eThe new email address to send the change email request.`,Y=k(),M=r("div"),M.textContent="Responses",Z=k(),C=r("div"),R=r("div");for(let e=0;es(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=ze.getApiExampleUrl(He.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + `),P.$set(c),(!y||t&1)&&j!==(j=e[0].name+"")&&N(J,j),t&6&&(L=e[2],v=ve(v,t,re,1,e,L,ne,R,Se,$e,null,ge)),t&6&&(W=e[2],Me(),h=ve(h,t,me,1,e,W,ce,A,Re,qe,null,we),Ae())},i(e){if(!y){x(P.$$.fragment,e);for(let t=0;ts(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=ze.getApiExampleUrl(He.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -67,4 +67,4 @@ import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x "message": "The authorized record model is not allowed to perform this action.", "data": {} } - `}]),[_,b,i,a,p]}class Ie extends Te{constructor(l){super(),Ee(this,l,Le,De,Be,{collection:0})}}export{Ie as default}; + `}]),[_,b,i,a,p]}class Ie extends Te{constructor(l){super(),Ee(this,l,Ne,Le,Be,{collection:0})}}export{Ie as default}; diff --git a/ui/dist/assets/RequestPasswordResetDocs-48ff72aa.js b/ui/dist/assets/RequestPasswordResetDocs-85cec4fc.js similarity index 70% rename from ui/dist/assets/RequestPasswordResetDocs-48ff72aa.js rename to ui/dist/assets/RequestPasswordResetDocs-85cec4fc.js index dad9fd889..bd80d8398 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-48ff72aa.js +++ b/ui/dist/assets/RequestPasswordResetDocs-85cec4fc.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as ue,O as ge,k as ye,P as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-38223559.js";import{S as Ue}from"./SdkTabs-9d46fa03.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&f(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,z,q,G,B,J,g,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as L,N as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as N,u as Me,M as Ae}from"./index-077c413f.js";import{S as Ue}from"./SdkTabs-9bbe3355.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&L(_,o),$&6&&N(l,"active",s[1]===s[5].code)},d(P){P&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&N(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&f(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",O,ee,Q,q,z,B,G,g,H,te,E,C,se,J,F=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -14,13 +14,13 @@ import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n ... await pb.collection('${(de=a[0])==null?void 0:de.name}').requestPasswordReset('test@example.com'); - `}});let F=a[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let I=a[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required email
String - The auth record email address to send the password reset request (if exists).`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),y=r("div"),A=r("div");for(let e=0;eThe auth record email address to send the password reset request (if exists).`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),y=r("div"),A=r("div");for(let e=0;el(1,m=u.code);return a.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,o=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` + `),q.$set(c),(!R||t&1)&&F!==(F=e[0].name+"")&&L(K,F),t&6&&(I=e[2],w=ue(w,t,ie,1,e,I,oe,A,ge,_e,null,be)),t&6&&(j=e[2],ye(),k=ue(k,t,ce,1,e,j,ne,U,Re,ke,null,me),Be())},i(e){if(!R){Z(q.$$.fragment,e);for(let t=0;tl(1,m=u.code);return a.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,o=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -47,4 +47,4 @@ import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n } } } - `}]),[_,m,i,o,p]}class Ee extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Ee as default}; + `}]),[_,m,i,o,p]}class Fe extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Fe as default}; diff --git a/ui/dist/assets/RequestVerificationDocs-e3bde5f0.js b/ui/dist/assets/RequestVerificationDocs-4c733f64.js similarity index 70% rename from ui/dist/assets/RequestVerificationDocs-e3bde5f0.js rename to ui/dist/assets/RequestVerificationDocs-4c733f64.js index 713ef8231..bef1d188b 100644 --- a/ui/dist/assets/RequestVerificationDocs-e3bde5f0.js +++ b/ui/dist/assets/RequestVerificationDocs-4c733f64.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as me,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as I,u as Ve,M as Re}from"./index-38223559.js";import{S as Ae}from"./SdkTabs-9d46fa03.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&u(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",L,ee,N,P,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,V,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as I,N as me,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as L,u as Ve,M as Re}from"./index-077c413f.js";import{S as Ae}from"./SdkTabs-9bbe3355.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&I(_,o),w&6&&L(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&L(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&u(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",N,ee,O,P,Q,C,z,g,D,te,H,S,le,G,E=a[0].name+"",J,se,K,T,W,M,X,V,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -14,13 +14,13 @@ import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i ... await pb.collection('${(fe=a[0])==null?void 0:fe.name}').requestVerification('test@example.com'); - `}});let E=a[2];const ne=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let F=a[2];const ne=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required email
String - The auth record email address to send the verification request (if exists).`,X=v(),V=r("div"),V.textContent="Responses",Y=v(),y=r("div"),R=r("div");for(let e=0;eThe auth record email address to send the verification request (if exists).`,X=v(),V=r("div"),V.textContent="Responses",Y=v(),y=r("div"),R=r("div");for(let e=0;es(1,p=m.code);return a.$$set=m=>{"collection"in m&&s(0,_=m.collection)},s(3,o=Te.getApiExampleUrl(Me.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:` + `),P.$set(c),(!B||t&1)&&E!==(E=e[0].name+"")&&I(J,E),t&6&&(F=e[2],h=me(h,t,ne,1,e,F,oe,R,ge,_e,null,be)),t&6&&(U=e[2],ye(),k=me(k,t,ce,1,e,U,ie,A,Be,ke,null,pe),Ce())},i(e){if(!B){Z(P.$$.fragment,e);for(let t=0;ts(1,p=m.code);return a.$$set=m=>{"collection"in m&&s(0,_=m.collection)},s(3,o=Te.getApiExampleUrl(Me.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -47,4 +47,4 @@ import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i } } } - `}]),[_,p,n,o,d]}class Oe extends qe{constructor(l){super(),we(this,l,je,Ue,Pe,{collection:0})}}export{Oe as default}; + `}]),[_,p,n,o,d]}class Ee extends qe{constructor(l){super(),we(this,l,je,Ue,Pe,{collection:0})}}export{Ee as default}; diff --git a/ui/dist/assets/SdkTabs-9d46fa03.js b/ui/dist/assets/SdkTabs-9bbe3355.js similarity index 90% rename from ui/dist/assets/SdkTabs-9d46fa03.js rename to ui/dist/assets/SdkTabs-9bbe3355.js index b3660e9f9..860f56c88 100644 --- a/ui/dist/assets/SdkTabs-9d46fa03.js +++ b/ui/dist/assets/SdkTabs-9bbe3355.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-38223559.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,P as J,k as Q,Q as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as O}from"./index-077c413f.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),O(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-e00bf869.js b/ui/dist/assets/UnlinkExternalAuthDocs-0e4f3037.js similarity index 79% rename from ui/dist/assets/UnlinkExternalAuthDocs-e00bf869.js rename to ui/dist/assets/UnlinkExternalAuthDocs-0e4f3037.js index 27fe1ed95..59b1aa08e 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-e00bf869.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-0e4f3037.js @@ -1,4 +1,4 @@ -import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-38223559.js";import{S as Ke}from"./SdkTabs-9d46fa03.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,D=n[0].name+"",R,se,ae,K,F,y,G,E,J,w,W,ne,z,T,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` +import{S as qe,i as Me,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,P as Oe,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-077c413f.js";import{S as Ke}from"./SdkTabs-9bbe3355.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,O=n[0].name+"",R,se,ae,K,Q,y,F,E,G,w,W,ne,z,T,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); @@ -24,7 +24,7 @@ import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s pb.authStore.model.id, 'google', ); - `}});let j=n[2];const me=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`Param + `}});let j=n[2];const me=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`Param Type Description id @@ -33,7 +33,7 @@ import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s provider String The name of the auth provider to unlink, eg. google, twitter, - github, etc.`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),A=i("div"),q=i("div");for(let e=0;egithub, etc.`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),A=i("div"),q=i("div");for(let e=0;eo(1,b=f.code);return n.$$set=f=>{"collection"in f&&o(0,_=f.collection)},o(3,a=je.getApiExampleUrl(Ie.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:` + `),y.$set(r),(!C||t&1)&&H!==(H=e[0].name+"")&&I(V,H),t&6&&(j=e[2],g=Te(g,t,me,1,e,j,ue,q,Oe,Ce,null,Ae)),t&6&&(D=e[2],We(),k=Te(k,t,be,1,e,D,fe,M,ze,Ee,null,ye),He())},i(e){if(!C){le(y.$$.fragment,e);for(let t=0;to(1,b=f.code);return n.$$set=f=>{"collection"in f&&o(0,_=f.collection)},o(3,a=je.getApiExampleUrl(Ie.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:` { "code": 401, "message": "The request requires valid record authorization token to be set.", @@ -77,4 +77,4 @@ import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s "message": "The requested resource wasn't found.", "data": {} } - `}]),[_,b,c,a,p]}class Ve extends qe{constructor(l){super(),Me(this,l,Ge,Fe,Oe,{collection:0})}}export{Ve as default}; + `}]),[_,b,c,a,p]}class Ve extends qe{constructor(l){super(),Me(this,l,Fe,Qe,De,{collection:0})}}export{Ve as default}; diff --git a/ui/dist/assets/UpdateApiDocs-c1fc576c.js b/ui/dist/assets/UpdateApiDocs-67bd0657.js similarity index 88% rename from ui/dist/assets/UpdateApiDocs-c1fc576c.js rename to ui/dist/assets/UpdateApiDocs-67bd0657.js index 18bd9db3f..227d679f1 100644 --- a/ui/dist/assets/UpdateApiDocs-c1fc576c.js +++ b/ui/dist/assets/UpdateApiDocs-67bd0657.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,N as Pe,O as ut,k as Mt,P as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-38223559.js";import{S as Lt}from"./SdkTabs-9d46fa03.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,N as Pe,P as ut,k as Mt,Q as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-077c413f.js";import{S as Lt}from"./SdkTabs-9bbe3355.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional @@ -29,7 +29,7 @@ import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as Indicates whether the auth record is verified or not.
This field can be set only by admins or auth records with "Manage" access.`,E=m(),B=r("tr"),B.innerHTML='Schema fields'},m(c,_){a(c,t,_),a(c,l,_),a(c,s,_),a(c,b,_),a(c,u,_),a(c,d,_),a(c,p,_),a(c,k,_),a(c,C,_),a(c,w,_),a(c,O,_),a(c,R,_),a(c,A,_),a(c,j,_),a(c,M,_),a(c,E,_),a(c,B,_)},d(c){c&&o(t),c&&o(l),c&&o(s),c&&o(b),c&&o(u),c&&o(d),c&&o(p),c&&o(k),c&&o(C),c&&o(w),c&&o(O),c&&o(R),c&&o(A),c&&o(j),c&&o(M),c&&o(E),c&&o(B)}}}function Pt(f){let t;return{c(){t=r("span"),t.textContent="Optional",T(t,"class","label label-warning")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function At(f){let t;return{c(){t=r("span"),t.textContent="Required",T(t,"class","label label-success")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function Bt(f){var u;let t,l=((u=f[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("User "),s=y(l),b=y(".")},m(d,p){a(d,t,p),a(d,s,p),a(d,b,p)},p(d,p){var k;p&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&I(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Ft(f){var u;let t,l=((u=f[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("Relation record "),s=y(l),b=y(".")},m(d,p){a(d,t,p),a(d,s,p),a(d,b,p)},p(d,p){var k;p&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&I(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Nt(f){let t,l,s,b,u;return{c(){t=y("File object."),l=r("br"),s=y(` - Set to `),b=r("code"),b.textContent="null",u=y(" to delete already uploaded file(s).")},m(d,p){a(d,t,p),a(d,l,p),a(d,s,p),a(d,b,p),a(d,u,p)},p:G,d(d){d&&o(t),d&&o(l),d&&o(s),d&&o(b),d&&o(u)}}}function jt(f){let t;return{c(){t=y("URL address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Et(f){let t;return{c(){t=y("Email address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Ut(f){let t;return{c(){t=y("JSON array or object.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function It(f){let t;return{c(){t=y("Number value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Jt(f){let t;return{c(){t=y("Plain text value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function ht(f,t){let l,s,b,u,d,p=t[12].name+"",k,C,w,O,R=U.getFieldValueType(t[12])+"",A,j,M,E;function B(h,P){return h[12].required?At:Pt}let c=B(t),_=c(t);function Q(h,P){if(h[12].type==="text")return Jt;if(h[12].type==="number")return It;if(h[12].type==="json")return Ut;if(h[12].type==="email")return Et;if(h[12].type==="url")return jt;if(h[12].type==="file")return Nt;if(h[12].type==="relation")return Ft;if(h[12].type==="user")return Bt}let L=Q(t),S=L&&L(t);return{key:f,first:null,c(){l=r("tr"),s=r("td"),b=r("div"),_.c(),u=m(),d=r("span"),k=y(p),C=m(),w=r("td"),O=r("span"),A=y(R),j=m(),M=r("td"),S&&S.c(),E=m(),T(b,"class","inline-flex"),T(O,"class","label"),this.first=l},m(h,P){a(h,l,P),i(l,s),i(s,b),_.m(b,null),i(b,u),i(b,d),i(d,k),i(l,C),i(l,w),i(w,O),i(O,A),i(l,j),i(l,M),S&&S.m(M,null),i(l,E)},p(h,P){t=h,c!==(c=B(t))&&(_.d(1),_=c(t),_&&(_.c(),_.m(b,u))),P&1&&p!==(p=t[12].name+"")&&I(k,p),P&1&&R!==(R=U.getFieldValueType(t[12])+"")&&I(A,R),L===(L=Q(t))&&S?S.p(t,P):(S&&S.d(1),S=L&&L(t),S&&(S.c(),S.m(M,null)))},d(h){h&&o(l),_.d(),S&&S.d()}}}function vt(f,t){let l,s=t[7].code+"",b,u,d,p;function k(){return t[6](t[7])}return{key:f,first:null,c(){l=r("button"),b=y(s),u=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(C,w){a(C,l,w),i(l,b),i(l,u),d||(p=Rt(l,"click",k),d=!0)},p(C,w){t=C,w&4&&s!==(s=t[7].code+"")&&I(b,s),w&6&&ce(l,"active",t[1]===t[7].code)},d(C){C&&o(l),d=!1,p()}}}function wt(f,t){let l,s,b,u;return s=new Tt({props:{content:t[7].body}}),{key:f,first:null,c(){l=r("div"),Ae(s.$$.fragment),b=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(d,p){a(d,l,p),Be(s,l,null),i(l,b),u=!0},p(d,p){t=d;const k={};p&4&&(k.content=t[7].body),s.$set(k),(!u||p&6)&&ce(l,"active",t[1]===t[7].code)},i(d){u||(fe(s.$$.fragment,d),u=!0)},o(d){pe(s.$$.fragment,d),u=!1},d(d){d&&o(l),Fe(s)}}}function gt(f){var it,at,ot,dt;let t,l,s=f[0].name+"",b,u,d,p,k,C,w,O=f[0].name+"",R,A,j,M,E,B,c,_,Q,L,S,h,P,Ne,ae,W,je,ue,oe=f[0].name+"",be,Ee,me,Ue,_e,X,ye,Z,ke,ee,he,J,ve,Ie,g,we,F=[],Je=new Map,Te,te,Ce,V,Se,ge,Oe,x,Me,Ve,$e,xe,$,ze,Y,Ke,Qe,We,qe,Ye,De,Ge,He,Xe,Re,le,Le,z,se,N=[],Ze=new Map,et,ne,q=[],tt=new Map,K;_=new Lt({props:{js:` + Set to `),b=r("code"),b.textContent="null",u=y(" to delete already uploaded file(s).")},m(d,p){a(d,t,p),a(d,l,p),a(d,s,p),a(d,b,p),a(d,u,p)},p:G,d(d){d&&o(t),d&&o(l),d&&o(s),d&&o(b),d&&o(u)}}}function jt(f){let t;return{c(){t=y("URL address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Et(f){let t;return{c(){t=y("Email address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Ut(f){let t;return{c(){t=y("JSON array or object.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function It(f){let t;return{c(){t=y("Number value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Jt(f){let t;return{c(){t=y("Plain text value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function ht(f,t){let l,s,b,u,d,p=t[12].name+"",k,C,w,O,R=U.getFieldValueType(t[12])+"",A,j,M,E;function B(h,P){return h[12].required?At:Pt}let c=B(t),_=c(t);function K(h,P){if(h[12].type==="text")return Jt;if(h[12].type==="number")return It;if(h[12].type==="json")return Ut;if(h[12].type==="email")return Et;if(h[12].type==="url")return jt;if(h[12].type==="file")return Nt;if(h[12].type==="relation")return Ft;if(h[12].type==="user")return Bt}let L=K(t),S=L&&L(t);return{key:f,first:null,c(){l=r("tr"),s=r("td"),b=r("div"),_.c(),u=m(),d=r("span"),k=y(p),C=m(),w=r("td"),O=r("span"),A=y(R),j=m(),M=r("td"),S&&S.c(),E=m(),T(b,"class","inline-flex"),T(O,"class","label"),this.first=l},m(h,P){a(h,l,P),i(l,s),i(s,b),_.m(b,null),i(b,u),i(b,d),i(d,k),i(l,C),i(l,w),i(w,O),i(O,A),i(l,j),i(l,M),S&&S.m(M,null),i(l,E)},p(h,P){t=h,c!==(c=B(t))&&(_.d(1),_=c(t),_&&(_.c(),_.m(b,u))),P&1&&p!==(p=t[12].name+"")&&I(k,p),P&1&&R!==(R=U.getFieldValueType(t[12])+"")&&I(A,R),L===(L=K(t))&&S?S.p(t,P):(S&&S.d(1),S=L&&L(t),S&&(S.c(),S.m(M,null)))},d(h){h&&o(l),_.d(),S&&S.d()}}}function vt(f,t){let l,s=t[7].code+"",b,u,d,p;function k(){return t[6](t[7])}return{key:f,first:null,c(){l=r("button"),b=y(s),u=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(C,w){a(C,l,w),i(l,b),i(l,u),d||(p=Rt(l,"click",k),d=!0)},p(C,w){t=C,w&4&&s!==(s=t[7].code+"")&&I(b,s),w&6&&ce(l,"active",t[1]===t[7].code)},d(C){C&&o(l),d=!1,p()}}}function wt(f,t){let l,s,b,u;return s=new Tt({props:{content:t[7].body}}),{key:f,first:null,c(){l=r("div"),Ae(s.$$.fragment),b=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(d,p){a(d,l,p),Be(s,l,null),i(l,b),u=!0},p(d,p){t=d;const k={};p&4&&(k.content=t[7].body),s.$set(k),(!u||p&6)&&ce(l,"active",t[1]===t[7].code)},i(d){u||(fe(s.$$.fragment,d),u=!0)},o(d){pe(s.$$.fragment,d),u=!1},d(d){d&&o(l),Fe(s)}}}function gt(f){var it,at,ot,dt;let t,l,s=f[0].name+"",b,u,d,p,k,C,w,O=f[0].name+"",R,A,j,M,E,B,c,_,K,L,S,h,P,Ne,ae,W,je,ue,oe=f[0].name+"",be,Ee,me,Ue,_e,X,ye,Z,ke,ee,he,J,ve,Ie,g,we,F=[],Je=new Map,Te,te,Ce,V,Se,ge,Oe,x,Me,Ve,$e,xe,$,Qe,Y,ze,Ke,We,qe,Ye,De,Ge,He,Xe,Re,le,Le,Q,se,N=[],Ze=new Map,et,ne,q=[],tt=new Map,z;_=new Lt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${f[4]}'); @@ -56,7 +56,7 @@ final record = await pb.collection('${(at=f[0])==null?void 0:at.name}').update('
For more info and examples you could check the detailed Files upload and handling docs - .`,c=m(),Ae(_.$$.fragment),Q=m(),L=r("h6"),L.textContent="API details",S=m(),h=r("div"),P=r("strong"),P.textContent="PATCH",Ne=m(),ae=r("div"),W=r("p"),je=y("/api/collections/"),ue=r("strong"),be=y(oe),Ee=y("/records/"),me=r("strong"),me.textContent=":id",Ue=m(),D&&D.c(),_e=m(),X=r("div"),X.textContent="Path parameters",ye=m(),Z=r("table"),Z.innerHTML=`Param + .`,c=m(),Ae(_.$$.fragment),K=m(),L=r("h6"),L.textContent="API details",S=m(),h=r("div"),P=r("strong"),P.textContent="PATCH",Ne=m(),ae=r("div"),W=r("p"),je=y("/api/collections/"),ue=r("strong"),be=y(oe),Ee=y("/records/"),me=r("strong"),me.textContent=":id",Ue=m(),D&&D.c(),_e=m(),X=r("div"),X.textContent="Path parameters",ye=m(),Z=r("table"),Z.innerHTML=`Param Type Description id @@ -65,12 +65,12 @@ final record = await pb.collection('${(at=f[0])==null?void 0:at.name}').update(' Type Description`,Ie=m(),g=r("tbody"),H&&H.c(),we=m();for(let e=0;eParam Type - Description`,ge=m(),Oe=r("tbody"),x=r("tr"),Me=r("td"),Me.textContent="expand",Ve=m(),$e=r("td"),$e.innerHTML='String',xe=m(),$=r("td"),ze=y(`Auto expand relations when returning the updated record. Ex.: - `),Ae(Y.$$.fragment),Ke=y(` - Supports up to 6-levels depth nested relations expansion. `),Qe=r("br"),We=y(` + Description`,ge=m(),Oe=r("tbody"),x=r("tr"),Me=r("td"),Me.textContent="expand",Ve=m(),$e=r("td"),$e.innerHTML='String',xe=m(),$=r("td"),Qe=y(`Auto expand relations when returning the updated record. Ex.: + `),Ae(Y.$$.fragment),ze=y(` + Supports up to 6-levels depth nested relations expansion. `),Ke=r("br"),We=y(` The expanded relations will be appended to the record under the `),qe=r("code"),qe.textContent="expand",Ye=y(" property (eg. "),De=r("code"),De.textContent='"expand": {"relField1": {...}, ...}',Ge=y(`). Only - the relations that the user has permissions to `),He=r("strong"),He.textContent="view",Xe=y(" will be expanded."),Re=m(),le=r("div"),le.textContent="Responses",Le=m(),z=r("div"),se=r("div");for(let e=0;e${JSON.stringify(Object.assign({},e[3],U.dummyCollectionSchemaData(e[0])),null,2)}; final record = await pb.collection('${(ft=e[0])==null?void 0:ft.name}').update('RECORD_ID', body: body); - `),_.$set(v),(!K||n&1)&&oe!==(oe=e[0].name+"")&&I(be,oe),e[5]?D||(D=yt(),D.c(),D.m(h,null)):D&&(D.d(1),D=null),(pt=e[0])!=null&&pt.isAuth?H||(H=kt(),H.c(),H.m(g,we)):H&&(H.d(1),H=null),n&1&&(de=(ct=e[0])==null?void 0:ct.schema,F=Pe(F,n,lt,1,e,de,Je,g,ut,ht,null,_t)),n&6&&(re=e[2],N=Pe(N,n,st,1,e,re,Ze,se,ut,vt,null,mt)),n&6&&(ie=e[2],Mt(),q=Pe(q,n,nt,1,e,ie,tt,ne,$t,wt,null,bt),qt())},i(e){if(!K){fe(_.$$.fragment,e),fe(Y.$$.fragment,e);for(let n=0;nl(1,d=w.code);return f.$$set=w=>{"collection"in w&&l(0,u=w.collection)},f.$$.update=()=>{var w,O;f.$$.dirty&1&&l(5,s=(u==null?void 0:u.updateRule)===null),f.$$.dirty&1&&l(2,p=[{code:200,body:JSON.stringify(U.dummyCollectionRecord(u),null,2)},{code:400,body:` + `),_.$set(v),(!z||n&1)&&oe!==(oe=e[0].name+"")&&I(be,oe),e[5]?D||(D=yt(),D.c(),D.m(h,null)):D&&(D.d(1),D=null),(pt=e[0])!=null&&pt.isAuth?H||(H=kt(),H.c(),H.m(g,we)):H&&(H.d(1),H=null),n&1&&(de=(ct=e[0])==null?void 0:ct.schema,F=Pe(F,n,lt,1,e,de,Je,g,ut,ht,null,_t)),n&6&&(re=e[2],N=Pe(N,n,st,1,e,re,Ze,se,ut,vt,null,mt)),n&6&&(ie=e[2],Mt(),q=Pe(q,n,nt,1,e,ie,tt,ne,$t,wt,null,bt),qt())},i(e){if(!z){fe(_.$$.fragment,e),fe(Y.$$.fragment,e);for(let n=0;nl(1,d=w.code);return f.$$set=w=>{"collection"in w&&l(0,u=w.collection)},f.$$.update=()=>{var w,O;f.$$.dirty&1&&l(5,s=(u==null?void 0:u.updateRule)===null),f.$$.dirty&1&&l(2,p=[{code:200,body:JSON.stringify(U.dummyCollectionRecord(u),null,2)},{code:400,body:` { "code": 400, "message": "Failed to update record.", @@ -115,4 +115,4 @@ final record = await pb.collection('${(ft=e[0])==null?void 0:ft.name}').update(' "message": "The requested resource wasn't found.", "data": {} } - `}]),f.$$.dirty&1&&(u.$isAuth?l(3,k={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):l(3,k={}))},l(4,b=U.getApiExampleUrl(Ht.baseUrl)),[u,d,p,k,b,s,C]}class Kt extends Ct{constructor(t){super(),St(this,t,Vt,gt,Ot,{collection:0})}}export{Kt as default}; + `}]),f.$$.dirty&1&&(u.$isAuth?l(3,k={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):l(3,k={}))},l(4,b=U.getApiExampleUrl(Ht.baseUrl)),[u,d,p,k,b,s,C]}class zt extends Ct{constructor(t){super(),St(this,t,Vt,gt,Ot,{collection:0})}}export{zt as default}; diff --git a/ui/dist/assets/ViewApiDocs-7c4555f7.js b/ui/dist/assets/ViewApiDocs-9b9dc672.js similarity index 73% rename from ui/dist/assets/ViewApiDocs-7c4555f7.js rename to ui/dist/assets/ViewApiDocs-9b9dc672.js index 7f2f9ce34..0a4ee9929 100644 --- a/ui/dist/assets/ViewApiDocs-7c4555f7.js +++ b/ui/dist/assets/ViewApiDocs-9b9dc672.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,T as it,C as Ge,p as at,r as K,u as rt}from"./index-38223559.js";import{S as dt}from"./SdkTabs-9d46fa03.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,T as it,C as ze,p as at,r as J,u as rt}from"./index-077c413f.js";import{S as dt}from"./SdkTabs-9bbe3355.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&J(n,"active",s[2]===s[6].code)},i(f){c||(z(a.$$.fragment,f),c=!0)},o(f){G(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); @@ -18,7 +18,7 @@ import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as final record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID', expand: 'relField1,relField2.subRelField', ); - `}});let w=i[1]&&Qe();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let z=i[4];const qe=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam + `}});let w=i[1]&&Ke();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let V=i[4];const qe=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id @@ -31,7 +31,7 @@ import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as The expanded relations will be appended to the record under the `),ce=o("code"),ce.textContent="expand",Ee=m(" property (eg. "),fe=o("code"),fe.textContent='"expand": {"relField1": {...}, ...}',Se=m(`). `),Be=o("br"),Me=m(` - Only the relations to which the request user has permissions to `),pe=o("strong"),pe.textContent="view",xe=m(" will be expanded."),ue=u(),I=o("div"),I.textContent="Responses",be=u(),D=o("div"),H=o("div");for(let e=0;en(2,f=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(b.push({code:200,body:JSON.stringify(Ge.dummyCollectionRecord(c),null,2)}),a&&b.push({code:403,body:` + `),g.$set(p),(!P||t&1)&&Q!==(Q=e[0].name+"")&&me(ee,Q),e[1]?w||(w=Ke(),w.c(),w.m($,null)):w&&(w.d(1),w=null),t&20&&(V=e[4],C=Ve(C,t,qe,1,e,V,Ae,H,lt,We,null,Je)),t&20&&(L=e[4],st(),v=Ve(v,t,Le,1,e,L,He,q,nt,Xe,null,Ge),ot())},i(e){if(!P){z(g.$$.fragment,e),z(S.$$.fragment,e);for(let t=0;tn(2,f=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(b.push({code:200,body:JSON.stringify(ze.dummyCollectionRecord(c),null,2)}),a&&b.push({code:403,body:` { "code": 403, "message": "Only admins can access this action.", @@ -63,4 +63,4 @@ import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as "message": "The requested resource wasn't found.", "data": {} } - `}))},n(3,y=Ge.getApiExampleUrl(at.baseUrl)),[c,a,f,y,b,F]}class bt extends Ze{constructor(s){super(),et(this,s,ft,ct,tt,{collection:0})}}export{bt as default}; + `}))},n(3,y=ze.getApiExampleUrl(at.baseUrl)),[c,a,f,y,b,F]}class bt extends Ze{constructor(s){super(),et(this,s,ft,ct,tt,{collection:0})}}export{bt as default}; diff --git a/ui/dist/assets/index-be8a2174.js b/ui/dist/assets/index-03b6b7de.js similarity index 54% rename from ui/dist/assets/index-be8a2174.js rename to ui/dist/assets/index-03b6b7de.js index 227949bf4..87cc7ae2b 100644 --- a/ui/dist/assets/index-be8a2174.js +++ b/ui/dist/assets/index-03b6b7de.js @@ -1,13 +1,13 @@ -class I{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),qe.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),qe.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new si(this),r=new si(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new si(this,e)}iterRange(e,t=this.length){return new rl(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ol(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?I.empty:e.length<=32?new J(e):qe.from(J.split(e,[]))}}class J extends I{constructor(e,t=Ya(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Qa(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new J(kr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=ji(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new J(l,o.length+r.length));else{let h=l.length>>1;i.push(new J(l.slice(0,h)),new J(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof J))return super.replace(e,t,i);let s=ji(this.text,ji(i.text,kr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new J(s,r):qe.from(J.split(s,[]),r)}sliceString(e,t=this.length,i=` -`){let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new J(i,s)),i=[],s=-1);return s>-1&&t.push(new J(i,s)),t}}class qe extends I{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new qe(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` -`){let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof qe))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new J(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof qe)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof J&&h&&(p=c[c.length-1])instanceof J&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new J(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:qe.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new qe(l,t)}}I.empty=new J([""],0);function Ya(n){let e=-1;for(let t of n)e+=t.length+1;return e}function ji(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(h>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof J?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof J?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(s instanceof J){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof J?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class rl{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new si(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ol{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(I.prototype[Symbol.iterator]=function(){return this.iter()},si.prototype[Symbol.iterator]=rl.prototype[Symbol.iterator]=ol.prototype[Symbol.iterator]=function(){return this});class Qa{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Rt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Rt[e-1]<=n;return!1}function vr(n){return n>=127462&&n<=127487}const Cr=8205;function ue(n,e,t=!0,i=!0){return(t?ll:ec)(n,e,i)}function ll(n,e,t){if(e==n.length)return e;e&&hl(n.charCodeAt(e))&&al(n.charCodeAt(e-1))&&e--;let i=ne(n,e);for(e+=Oe(i);e=0&&vr(ne(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function ec(n,e,t){for(;e>0;){let i=ll(n,e-2,t);if(i=56320&&n<57344}function al(n){return n>=55296&&n<56320}function ne(n,e){let t=n.charCodeAt(e);if(!al(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return hl(i)?(t-55296<<10)+(i-56320)+65536:t}function Us(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Oe(n){return n<65536?1:2}const ts=/\r\n?|\n/;var ce=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(ce||(ce={}));class Ue{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=ce.Simple&&a>=e&&(i==ce.TrackDel&&se||i==ce.TrackBefore&&se))return null;if(a>e||a==e&&t<0&&!l)return e==s||t<0?r:r+h;r+=h}s=a}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ue(e)}static create(e){return new Ue(e)}}class Z extends Ue{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return is(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return ns(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let h=s>>1;for(;i.length0&&it(i,t,r.text),r.forward(c),l+=c}let a=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function h(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?I.of(d.split(i||ts)):d:I.empty,g=p.length;if(f==u&&g==0)return;fo&&ae(s,f-o,-1),ae(s,u-f,g),it(r,s,p),o=u}}return a(e),h(!l),l}static empty(e){return new Z(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function it(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],h=n.sections[o++];e(s,a,r,c,f),s=a,r=c}}}function ns(n,e,t,i=!1){let s=[],r=i?[]:null,o=new li(n),l=new li(e);for(let h=-1;;)if(o.ins==-1&&l.ins==-1){let a=Math.min(o.len,l.len);ae(s,a,-1),o.forward(a),l.forward(a)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len=0&&h=0){let a=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);a+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lenh||o.ins>=0&&o.len>h)&&(l||i.length>a),r.forward2(h),o.forward(h)}}}}class li{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?I.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?I.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class pt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new pt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return b.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return b.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return b.range(e.anchor,e.head)}static create(e,t,i){return new pt(e,t,i)}}class b{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:b.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new b(e.ranges.map(t=>pt.fromJSON(t)),e.main)}static single(e,t=e){return new b([b.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?4:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?b.range(h,l):b.range(l,h))}}return new b(e,t)}}function fl(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Gs=0;class D{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Gs++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new D(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Js),!!e.static,e.enables)}of(e){return new Ui([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ui(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ui(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Js(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Ui{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Gs++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,h=!1,a=!1,c=[];for(let f of this.dependencies)f=="doc"?h=!0:f=="selection"?a=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(h&&u.docChanged||a&&(u.docChanged||u.selection)||ss(f,c)){let d=i(f);if(l?!Ar(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let g=Zi(u,p);if(this.dependencies.every(m=>m instanceof D?u.facet(m)===f.facet(m):m instanceof be?u.field(m,!1)==f.field(m,!1):!0)||(l?Ar(d=i(f),g,s):s(d=i(f),g)))return f.values[o]=g,0}else d=i(f);return f.values[o]=d,1}}}}function Ar(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[h.id]),s=t.map(h=>h.type),r=i.filter(h=>!(h&1)),o=n[e.id]>>1;function l(h){let a=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Mr).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Mr.of({field:this,create:e})]}get extension(){return this}}const dt={lowest:4,low:3,default:2,high:1,highest:0};function _t(n){return e=>new ul(e,n)}const Ct={highest:_t(dt.highest),high:_t(dt.high),default:_t(dt.default),low:_t(dt.low),lowest:_t(dt.lowest)};class ul{constructor(e,t){this.inner=e,this.prec=t}}class kn{of(e){return new rs(this,e)}reconfigure(e){return kn.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class rs{constructor(e,t){this.compartment=e,this.inner=t}}class Qi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of ic(e,t,o))u instanceof be?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),h=[],a=[];for(let u of s)l[u.id]=a.length<<1,a.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(m=>m.type==0))if(l[p.id]=h.length<<1|1,Js(g,d))h.push(i.facet(p));else{let m=p.combine(d.map(y=>y.value));h.push(i&&p.compare(m,i.facet(p))?i.facet(p):m)}else{for(let m of d)m.type==0?(l[m.id]=h.length<<1|1,h.push(m.value)):(l[m.id]=a.length<<1,a.push(y=>m.dynamicSlot(y)));l[p.id]=a.length<<1,a.push(m=>tc(m,p,d))}}let f=a.map(u=>u(l));return new Qi(e,o,f,l,h,r)}}function ic(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let h=s.get(o);if(h!=null){if(h<=l)return;let a=i[h].indexOf(o);a>-1&&i[h].splice(a,1),o instanceof rs&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let a of o)r(a,l);else if(o instanceof rs){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(o.compartment)||o.inner;t.set(o.compartment,a),r(a,l)}else if(o instanceof ul)r(o.inner,o.prec);else if(o instanceof be)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Ui)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,dt.default);else{let a=o.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,l)}}return r(n,dt.default),i.reduce((o,l)=>o.concat(l))}function ri(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Zi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const dl=D.define(),pl=D.define({combine:n=>n.some(e=>e),static:!0}),gl=D.define({combine:n=>n.length?n[0]:void 0,static:!0}),ml=D.define(),yl=D.define(),bl=D.define(),wl=D.define({combine:n=>n.length?n[0]:!1});class Qe{constructor(e,t){this.type=e,this.value=t}static define(){return new nc}}class nc{of(e){return new Qe(this,e)}}class sc{constructor(e){this.map=e}of(e){return new E(this,e)}}class E{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new E(this.type,t)}is(e){return this.type==e}static define(e={}){return new sc(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}E.reconfigure=E.define();E.appendConfig=E.define();class ee{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&fl(i,t.newLength),r.some(l=>l.type==ee.time)||(this.annotations=r.concat(ee.time.of(Date.now())))}static create(e,t,i,s,r,o){return new ee(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ee.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ee.time=Qe.define();ee.userEvent=Qe.define();ee.addToHistory=Qe.define();ee.remote=Qe.define();function rc(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof ee?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof ee?n=r[0]:n=Sl(e,Lt(r),!1)}return n}function lc(n){let e=n.startState,t=e.facet(bl),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=xl(i,os(e,r,n.changes.newLength),!0))}return i==n?n:ee.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const hc=[];function Lt(n){return n==null?hc:Array.isArray(n)?n:[n]}var $=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}($||($={}));const ac=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ls;try{ls=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function cc(n){if(ls)return ls.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||ac.test(t)))return!0}return!1}function fc(n){return e=>{if(!/\S/.test(e))return $.Space;if(cc(e))return $.Word;for(let t=0;t-1)return $.Word;return $.Other}}class N{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(E.reconfigure)?(t=null,i=o.value):o.is(E.appendConfig)&&(t=null,i=Lt(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Qi.resolve(i,s,this),r=new N(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,h)=>h.reconfigure(l,this),null).values),new N(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:b.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Lt(i.effects);for(let l=1;lo.spec.fromJSON(l,h)))}}return N.create({doc:e.doc,selection:b.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Qi.resolve(e.extensions||[],new Map),i=e.doc instanceof I?e.doc:I.of((e.doc||"").split(t.staticFacet(N.lineSeparator)||ts)),s=e.selection?e.selection instanceof b?e.selection:b.single(e.selection.anchor,e.selection.head):b.single(0);return fl(s,i.length),t.staticFacet(pl)||(s=s.asSingle()),new N(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(N.tabSize)}get lineBreak(){return this.facet(N.lineSeparator)||` -`}get readOnly(){return this.facet(wl)}phrase(e,...t){for(let i of this.facet(N.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(dl))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return fc(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let h=ue(t,o,!1);if(r(t.slice(h,o))!=$.Word)break;o=h}for(;ln.length?n[0]:4});N.lineSeparator=gl;N.readOnly=wl;N.phrases=D.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});N.languageData=dl;N.changeFilter=ml;N.transactionFilter=yl;N.transactionExtender=bl;kn.reconfigure=E.define();function At(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class bt{eq(e){return this==e}range(e,t=e){return hs.create(e,t,this)}}bt.prototype.startSide=bt.prototype.endSide=0;bt.prototype.point=!1;bt.prototype.mapMode=ce.TrackDel;let hs=class kl{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new kl(e,t,i)}};function as(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class _s{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-e||(i?this.value[h].endSide:this.value[h].startSide)-t;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&a.startSide>0&&a.endSide<=0)continue;(d-u||a.endSide-a.startSide)<0||(o<0&&(o=u),a.point&&(l=Math.max(l,d-u)),i.push(a),s.push(u-o),r.push(d-o))}return{mapped:i.length?new _s(s,r,i,l):null,pos:o}}}class j{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new j(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(as)),this.isEmpty)return t.length?j.of(t):this;let l=new vl(this,null,-1).goto(0),h=0,a=[],c=new wt;for(;l.value||h=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return hi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return hi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),h=Dr(o,l,i),a=new Xt(o,h,r),c=new Xt(l,h,r);i.iterGaps((f,u,d)=>Or(a,f,c,u,d,s)),i.empty&&i.length==0&&Or(a,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Dr(r,o),h=new Xt(r,l,0).goto(i),a=new Xt(o,l,0).goto(i);for(;;){if(h.to!=a.to||!cs(h.active,a.active)||h.point&&(!a.point||!h.point.eq(a.point)))return!1;if(h.to>s)return!0;h.next(),a.next()}}static spans(e,t,i,s,r=-1){let o=new Xt(e,null,r).goto(t),l=t,h=o.openStart;for(;;){let a=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,a,o.active,h),h=o.openEnd(a));if(o.to>i)return h+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new wt;for(let s of e instanceof hs?[e]:t?uc(e):e)i.add(s.from,s.to,s.value);return i.finish()}}j.empty=new j([],[],null,-1);function uc(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(as);e=i}return n}j.empty.nextLayer=j.empty;class wt{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new _s(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new wt)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(j.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=j.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Dr(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new vl(o,t,i,r));return s.length==1?s[0]:new hi(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Nn(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Nn(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Nn(this.heap,0)}}}function Nn(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class Xt{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=hi.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Ai(this.active,e),Ai(this.activeTo,e),Ai(this.activeRank,e),this.minActive=Tr(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Ai(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Or(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,h=i-e;for(;;){let a=n.to+h-t.to||n.endSide-t.endSide,c=a<0?n.to+h:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&cs(n.activeForPoint(n.to+h),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!cs(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,a<=0&&n.next(),a>=0&&t.next()}}function cs(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function Tr(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=ue(n,s)}return i===!0?-1:n.length}const us="ͼ",Br=typeof Symbol>"u"?"__"+us:Symbol.for(us),ds=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class lt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,h,a){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return h.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,h);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),p,c,u)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||u)&&h.push((i&&!f&&!a?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +class I{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),qe.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),qe.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new ri(this),r=new ri(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new ri(this,e)}iterRange(e,t=this.length){return new rl(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ol(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?I.empty:e.length<=32?new G(e):qe.from(G.split(e,[]))}}class G extends I{constructor(e,t=Ya(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Qa(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new G(vr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=ji(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new G(l,o.length+r.length));else{let h=l.length>>1;i.push(new G(l.slice(0,h)),new G(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof G))return super.replace(e,t,i);let s=ji(this.text,ji(i.text,vr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new G(s,r):qe.from(G.split(s,[]),r)}sliceString(e,t=this.length,i=` +`){let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new G(i,s)),i=[],s=-1);return s>-1&&t.push(new G(i,s)),t}}class qe extends I{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new qe(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof qe))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new G(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof qe)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof G&&h&&(p=c[c.length-1])instanceof G&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new G(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:qe.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new qe(l,t)}}I.empty=new G([""],0);function Ya(n){let e=-1;for(let t of n)e+=t.length+1;return e}function ji(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(h>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof G?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof G?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof G){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof G?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class rl{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ri(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ol{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(I.prototype[Symbol.iterator]=function(){return this.iter()},ri.prototype[Symbol.iterator]=rl.prototype[Symbol.iterator]=ol.prototype[Symbol.iterator]=function(){return this});class Qa{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Rt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Rt[e-1]<=n;return!1}function kr(n){return n>=127462&&n<=127487}const Cr=8205;function ue(n,e,t=!0,i=!0){return(t?ll:ec)(n,e,i)}function ll(n,e,t){if(e==n.length)return e;e&&hl(n.charCodeAt(e))&&al(n.charCodeAt(e-1))&&e--;let i=ne(n,e);for(e+=Oe(i);e=0&&kr(ne(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function ec(n,e,t){for(;e>0;){let i=ll(n,e-2,t);if(i=56320&&n<57344}function al(n){return n>=55296&&n<56320}function ne(n,e){let t=n.charCodeAt(e);if(!al(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return hl(i)?(t-55296<<10)+(i-56320)+65536:t}function Us(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Oe(n){return n<65536?1:2}const ts=/\r\n?|\n/;var ce=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(ce||(ce={}));class Ue{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=ce.Simple&&a>=e&&(i==ce.TrackDel&&se||i==ce.TrackBefore&&se))return null;if(a>e||a==e&&t<0&&!l)return e==s||t<0?r:r+h;r+=h}s=a}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ue(e)}static create(e){return new Ue(e)}}class Z extends Ue{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return is(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return ns(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let h=s>>1;for(;i.length0&&it(i,t,r.text),r.forward(c),l+=c}let a=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function h(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?I.of(d.split(i||ts)):d:I.empty,g=p.length;if(f==u&&g==0)return;fo&&ae(s,f-o,-1),ae(s,u-f,g),it(r,s,p),o=u}}return a(e),h(!l),l}static empty(e){return new Z(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function it(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],h=n.sections[o++];e(s,a,r,c,f),s=a,r=c}}}function ns(n,e,t,i=!1){let s=[],r=i?[]:null,o=new li(n),l=new li(e);for(let h=-1;;)if(o.ins==-1&&l.ins==-1){let a=Math.min(o.len,l.len);ae(s,a,-1),o.forward(a),l.forward(a)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len=0&&h=0){let a=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);a+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lenh||o.ins>=0&&o.len>h)&&(l||i.length>a),r.forward2(h),o.forward(h)}}}}class li{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?I.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?I.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class dt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new dt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return b.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return b.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return b.range(e.anchor,e.head)}static create(e,t,i){return new dt(e,t,i)}}class b{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:b.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new b(e.ranges.map(t=>dt.fromJSON(t)),e.main)}static single(e,t=e){return new b([b.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?4:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?b.range(h,l):b.range(l,h))}}return new b(e,t)}}function fl(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Gs=0;class D{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Gs++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new D(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Js),!!e.static,e.enables)}of(e){return new Ui([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ui(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ui(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Js(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Ui{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Gs++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,h=!1,a=!1,c=[];for(let f of this.dependencies)f=="doc"?h=!0:f=="selection"?a=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(h&&u.docChanged||a&&(u.docChanged||u.selection)||ss(f,c)){let d=i(f);if(l?!Ar(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let g=Zi(u,p);if(this.dependencies.every(m=>m instanceof D?u.facet(m)===f.facet(m):m instanceof be?u.field(m,!1)==f.field(m,!1):!0)||(l?Ar(d=i(f),g,s):s(d=i(f),g)))return f.values[o]=g,0}else d=i(f);return f.values[o]=d,1}}}}function Ar(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[h.id]),s=t.map(h=>h.type),r=i.filter(h=>!(h&1)),o=n[e.id]>>1;function l(h){let a=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Mr).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Mr.of({field:this,create:e})]}get extension(){return this}}const ut={lowest:4,low:3,default:2,high:1,highest:0};function Xt(n){return e=>new ul(e,n)}const kt={highest:Xt(ut.highest),high:Xt(ut.high),default:Xt(ut.default),low:Xt(ut.low),lowest:Xt(ut.lowest)};class ul{constructor(e,t){this.inner=e,this.prec=t}}class vn{of(e){return new rs(this,e)}reconfigure(e){return vn.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class rs{constructor(e,t){this.compartment=e,this.inner=t}}class Qi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of ic(e,t,o))u instanceof be?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),h=[],a=[];for(let u of s)l[u.id]=a.length<<1,a.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(m=>m.type==0))if(l[p.id]=h.length<<1|1,Js(g,d))h.push(i.facet(p));else{let m=p.combine(d.map(y=>y.value));h.push(i&&p.compare(m,i.facet(p))?i.facet(p):m)}else{for(let m of d)m.type==0?(l[m.id]=h.length<<1|1,h.push(m.value)):(l[m.id]=a.length<<1,a.push(y=>m.dynamicSlot(y)));l[p.id]=a.length<<1,a.push(m=>tc(m,p,d))}}let f=a.map(u=>u(l));return new Qi(e,o,f,l,h,r)}}function ic(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let h=s.get(o);if(h!=null){if(h<=l)return;let a=i[h].indexOf(o);a>-1&&i[h].splice(a,1),o instanceof rs&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let a of o)r(a,l);else if(o instanceof rs){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(o.compartment)||o.inner;t.set(o.compartment,a),r(a,l)}else if(o instanceof ul)r(o.inner,o.prec);else if(o instanceof be)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Ui)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,ut.default);else{let a=o.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,l)}}return r(n,ut.default),i.reduce((o,l)=>o.concat(l))}function oi(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Zi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const dl=D.define(),pl=D.define({combine:n=>n.some(e=>e),static:!0}),gl=D.define({combine:n=>n.length?n[0]:void 0,static:!0}),ml=D.define(),yl=D.define(),bl=D.define(),wl=D.define({combine:n=>n.length?n[0]:!1});class Qe{constructor(e,t){this.type=e,this.value=t}static define(){return new nc}}class nc{of(e){return new Qe(this,e)}}class sc{constructor(e){this.map=e}of(e){return new E(this,e)}}class E{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new E(this.type,t)}is(e){return this.type==e}static define(e={}){return new sc(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}E.reconfigure=E.define();E.appendConfig=E.define();class ee{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&fl(i,t.newLength),r.some(l=>l.type==ee.time)||(this.annotations=r.concat(ee.time.of(Date.now())))}static create(e,t,i,s,r,o){return new ee(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ee.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ee.time=Qe.define();ee.userEvent=Qe.define();ee.addToHistory=Qe.define();ee.remote=Qe.define();function rc(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof ee?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof ee?n=r[0]:n=Sl(e,Lt(r),!1)}return n}function lc(n){let e=n.startState,t=e.facet(bl),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=xl(i,os(e,r,n.changes.newLength),!0))}return i==n?n:ee.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const hc=[];function Lt(n){return n==null?hc:Array.isArray(n)?n:[n]}var q=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(q||(q={}));const ac=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ls;try{ls=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function cc(n){if(ls)return ls.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||ac.test(t)))return!0}return!1}function fc(n){return e=>{if(!/\S/.test(e))return q.Space;if(cc(e))return q.Word;for(let t=0;t-1)return q.Word;return q.Other}}class N{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(E.reconfigure)?(t=null,i=o.value):o.is(E.appendConfig)&&(t=null,i=Lt(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Qi.resolve(i,s,this),r=new N(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,h)=>h.reconfigure(l,this),null).values),new N(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:b.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Lt(i.effects);for(let l=1;lo.spec.fromJSON(l,h)))}}return N.create({doc:e.doc,selection:b.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Qi.resolve(e.extensions||[],new Map),i=e.doc instanceof I?e.doc:I.of((e.doc||"").split(t.staticFacet(N.lineSeparator)||ts)),s=e.selection?e.selection instanceof b?e.selection:b.single(e.selection.anchor,e.selection.head):b.single(0);return fl(s,i.length),t.staticFacet(pl)||(s=s.asSingle()),new N(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(N.tabSize)}get lineBreak(){return this.facet(N.lineSeparator)||` +`}get readOnly(){return this.facet(wl)}phrase(e,...t){for(let i of this.facet(N.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(dl))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return fc(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let h=ue(t,o,!1);if(r(t.slice(h,o))!=q.Word)break;o=h}for(;ln.length?n[0]:4});N.lineSeparator=gl;N.readOnly=wl;N.phrases=D.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});N.languageData=dl;N.changeFilter=ml;N.transactionFilter=yl;N.transactionExtender=bl;vn.reconfigure=E.define();function Ct(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class yt{eq(e){return this==e}range(e,t=e){return hs.create(e,t,this)}}yt.prototype.startSide=yt.prototype.endSide=0;yt.prototype.point=!1;yt.prototype.mapMode=ce.TrackDel;let hs=class vl{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new vl(e,t,i)}};function as(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class _s{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-e||(i?this.value[h].endSide:this.value[h].startSide)-t;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&a.startSide>0&&a.endSide<=0)continue;(d-u||a.endSide-a.startSide)<0||(o<0&&(o=u),a.point&&(l=Math.max(l,d-u)),i.push(a),s.push(u-o),r.push(d-o))}return{mapped:i.length?new _s(s,r,i,l):null,pos:o}}}class K{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new K(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(as)),this.isEmpty)return t.length?K.of(t):this;let l=new kl(this,null,-1).goto(0),h=0,a=[],c=new bt;for(;l.value||h=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return hi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return hi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),h=Dr(o,l,i),a=new Yt(o,h,r),c=new Yt(l,h,r);i.iterGaps((f,u,d)=>Or(a,f,c,u,d,s)),i.empty&&i.length==0&&Or(a,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Dr(r,o),h=new Yt(r,l,0).goto(i),a=new Yt(o,l,0).goto(i);for(;;){if(h.to!=a.to||!cs(h.active,a.active)||h.point&&(!a.point||!h.point.eq(a.point)))return!1;if(h.to>s)return!0;h.next(),a.next()}}static spans(e,t,i,s,r=-1){let o=new Yt(e,null,r).goto(t),l=t,h=o.openStart;for(;;){let a=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,a,o.active,h),h=o.openEnd(a));if(o.to>i)return h+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new bt;for(let s of e instanceof hs?[e]:t?uc(e):e)i.add(s.from,s.to,s.value);return i.finish()}}K.empty=new K([],[],null,-1);function uc(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(as);e=i}return n}K.empty.nextLayer=K.empty;class bt{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new _s(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new bt)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(K.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=K.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Dr(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new kl(o,t,i,r));return s.length==1?s[0]:new hi(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Nn(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Nn(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Nn(this.heap,0)}}}function Nn(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class Yt{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=hi.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Ai(this.active,e),Ai(this.activeTo,e),Ai(this.activeRank,e),this.minActive=Tr(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Ai(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Or(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,h=i-e;for(;;){let a=n.to+h-t.to||n.endSide-t.endSide,c=a<0?n.to+h:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&cs(n.activeForPoint(n.to+h),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!cs(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,a<=0&&n.next(),a>=0&&t.next()}}function cs(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function Tr(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=ue(n,s)}return i===!0?-1:n.length}const us="ͼ",Br=typeof Symbol>"u"?"__"+us:Symbol.for(us),ds=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ot{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,h,a){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return h.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,h);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),p,c,u)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||u)&&h.push((i&&!f&&!a?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` `)}static newName(){let e=Pr[Br]||1;return Pr[Br]=e+1,us+e.toString(36)}static mount(e,t){(e[ds]||new dc(e)).mount(Array.isArray(t)?t:[t])}}let Rr=new Map;class dc{constructor(e){let t=e.ownerDocument||e,i=t.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=Rr.get(t);if(s)return e.adoptedStyleSheets=[s.sheet,...e.adoptedStyleSheets],e[ds]=s;this.sheet=new i.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Rr.set(t,this)}else{this.styleTag=t.createElement("style");let s=e.head||e;s.insertBefore(this.styleTag,s.firstChild)}this.modules=[],e[ds]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Lr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),pc=typeof navigator<"u"&&/Mac/.test(navigator.platform),gc=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),mc=pc||Lr&&+Lr[1]<57;for(var se=0;se<10;se++)ht[48+se]=ht[96+se]=String(se);for(var se=1;se<=24;se++)ht[se+111]="F"+se;for(var se=65;se<=90;se++)ht[se]=String.fromCharCode(se+32),ai[se]=String.fromCharCode(se);for(var Fn in ht)ai.hasOwnProperty(Fn)||(ai[Fn]=ht[Fn]);function yc(n){var e=mc&&(n.ctrlKey||n.altKey||n.metaKey)||gc&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ai:ht)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function en(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Ft(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function bc(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Gi(n,e){if(!e.anchorNode)return!1;try{return Ft(n,e.anchorNode)}catch{return!1}}function Vt(n){return n.nodeType==3?Wt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function tn(n,e,t,i){return t?Er(n,e,t,i,-1)||Er(n,e,t,i,1):!1}function nn(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Er(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:ci(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=nn(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?ci(n):0}else return!1}}function ci(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function vn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function wc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function xc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView||window;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=wc(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class kc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Ot=null;function Cl(n){if(n.setActive)return n.setActive();if(Ot)return n.focus(Ot);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ot==null?{get preventScroll(){return Ot={preventScroll:!0},!0}}:void 0),!Ot){Ot=!1;for(let t=0;tt)return f.domBoundsAround(e,t,a);if(u>=e&&s==-1&&(s=h,r=a),a>t&&f.dom.parentNode==this.dom){o=h,l=c;break}c=u,a=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),t.dirty&1)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Xs){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Dl(n,e,t,i,s,r,o,l,h){let{children:a}=n,c=a.length?a[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,h))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var M={mac:Wr||/Mac/.test(Me.platform),windows:/Win/.test(Me.platform),linux:/Linux|X11/.test(Me.platform),ie:Cn,ie_version:Tl?ps.documentMode||6:ms?+ms[1]:gs?+gs[1]:0,gecko:Fr,gecko_version:Fr?+(/Firefox\/(\d+)/.exec(Me.userAgent)||[0,0])[1]:0,chrome:!!Vn,chrome_version:Vn?+Vn[1]:0,ios:Wr,android:/Android\b/.test(Me.userAgent),webkit:Vr,safari:Bl,webkit_version:Vr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:ps.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const Ac=256;class xt extends W{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return i&&(!(i instanceof xt)||this.length-(t-e)+i.length>Ac)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new xt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new re(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return ys(this.dom,e,t)}}class Ye extends W{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(Al(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Ye&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=h,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Ye(this.mark,t,o)}domAtPos(e){return Il(this,e)}coordsAt(e,t){return Fl(this,e,t)}}function ys(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?M.chrome||M.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return M.safari&&!o&&h.width==0&&(h=Array.prototype.find.call(l,a=>a.width)||h),o?vn(h,o<0):h||null}class nt extends W{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||nt)(e,t,i)}split(e){let t=nt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof nt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?re.before(this.dom):re.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;for(let o=e>0?s.length-1:0;r=s[o],!(e>0?o==0:o==s.length-1||r.top0?-1:1);return this.length?r:vn(r,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Pl extends nt{domAtPos(e){let{topView:t,text:i}=this.widget;return t?bs(e,0,t,i,this.length-t.length,(s,r)=>s.domAtPos(r),(s,r)=>new re(s,Math.min(r,s.nodeValue.length))):new re(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:s}=this.widget;return i?Ll(e,t,i,s,this.length-i.length):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:s}=this.widget;return i?bs(e,t,i,s,this.length-i.length,(r,o,l)=>r.coordsAt(o,l),(r,o,l)=>ys(r,o,l)):ys(s,e,t)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function bs(n,e,t,i,s,r,o){if(t instanceof Ye){for(let l=t.dom.firstChild;l;l=l.nextSibling){let h=W.get(l);if(h){let a=Ft(l,i),c=h.length+(a?s:0);if(n0?re.before(this.dom):re.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return I.empty}get isHidden(){return!0}}xt.prototype.children=nt.prototype.children=Ht.prototype.children=Xs;function Il(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Ye&&s.length&&(i=s[s.length-1])instanceof Ye&&i.mark.eq(e.mark)?Nl(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function Fl(n,e,t){let i=null,s=-1,r=null,o=-1;function l(a,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):(!r||r.isHidden&&t>0)&&(p>c||u==p&&d.getSide()>0)?(r=d,o=c-u):(u0?3e8:-4e8:t>0?1e8:-1e8,new St(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Vl(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new St(e,i,s,t,e.widget||null,!0)}static line(e){return new xi(e)}static set(e,t=!1){return j.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}B.none=j.empty;class An extends B{constructor(e){let{start:t,end:i}=Vl(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof An&&this.tagName==e.tagName&&this.class==e.class&&Ys(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}An.prototype.point=!1;class xi extends B{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof xi&&this.spec.class==e.spec.class&&Ys(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}xi.prototype.mapMode=ce.TrackBefore;xi.prototype.point=!0;class St extends B{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?ce.TrackBefore:ce.TrackAfter:ce.TrackDel}get type(){return this.startSide=5}eq(e){return e instanceof St&&Dc(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}St.prototype.point=!0;function Vl(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function Dc(n,e){return n==e||!!(n&&e&&n.compare(e))}function Ss(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class de extends W{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof de))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),Ol(this,e,t,i?i.children:[],r,o),!0}split(e){let t=new de;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ys(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Nl(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=ws(t,this.attrs||{})),i&&(this.attrs=ws({class:i},this.attrs||{}))}domAtPos(e){return Il(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var i;this.dom?this.dirty&4&&(Al(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(xs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&W.get(s)instanceof Ye;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=W.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!M.ios||!this.children.some(r=>r instanceof xt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof xt)||/[^ -~]/.test(i.text))return null;let s=Vt(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=Fl(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof de)return r;if(o>t)break}s=o+r.breakAfter}return null}}class yt extends W{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof yt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Di(new xt(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof St){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof St)if(i.block){let{type:h}=i;h==q.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new yt(i.widget||new Hr("div"),l,h))}else{let h=nt.create(i.widget||new Hr("span"),l,l?0:i.startSide),a=this.atCursorPos&&!h.isEditable&&r<=s.length&&(e0),c=!h.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!a&&!h.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),a&&(f.append(Di(new Ht(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Di(h,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Qs(e,t,i,r);return o.openEnd=j.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Di(n,e){for(let t of e)n=new Ye(t,[n],n.length);return n}class Hr extends at{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Wl=D.define(),Hl=D.define(),zl=D.define(),ql=D.define(),ks=D.define(),$l=D.define(),Kl=D.define(),jl=D.define({combine:n=>n.some(e=>e)}),Ul=D.define({combine:n=>n.some(e=>e)});class sn{constructor(e,t="nearest",i="nearest",s=5,r=5){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r}map(e){return e.empty?this:new sn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const zr=E.define({map:(n,e)=>n.map(e)});function Ee(n,e,t){let i=n.facet(ql);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Mn=D.define({combine:n=>n.length?n[0]:!0});let Oc=0;const ei=D.define();class ge{constructor(e,t,i,s){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=s(this)}static define(e,t){const{eventHandlers:i,provide:s,decorations:r}=t||{};return new ge(Oc++,e,i,o=>{let l=[ei.of(o)];return r&&l.push(fi.of(h=>{let a=h.plugin(o);return a?r(a):B.none})),s&&l.push(s(o)),l})}static fromClass(e,t){return ge.define(i=>new e(i),t)}}class Wn{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Ee(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ee(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Ee(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Gl=D.define(),Zs=D.define(),fi=D.define(),Jl=D.define(),_l=D.define(),ti=D.define();class Ge{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Ge(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!h)return i;new Ge(h.fromA,h.toA,h.fromB,h.toB).addToSet(i),o=h.toA,l=h.toB}}}class rn{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Z.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,h)=>s.push(new Ge(r,o,l,h))),this.changedRanges=s}static create(e,t,i){return new rn(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var _=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(_||(_={}));const vs=_.LTR,Tc=_.RTL;function Xl(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}const K=[];function Ec(n,e){let t=n.length,i=e==vs?1:2,s=e==vs?2:1;if(!n||i==1&&!Lc.test(n))return Yl(t);for(let o=0,l=i,h=i;o=0;u-=3)if(Fe[u+1]==-c){let d=Fe[u+2],p=d&2?i:d&4?d&1?s:i:0;p&&(K[o]=K[Fe[u]]=p),l=u;break}}else{if(Fe.length==189)break;Fe[l++]=o,Fe[l++]=a,Fe[l++]=h}else if((f=K[o])==2||f==1){let u=f==i;h=u?0:1;for(let d=l-3;d>=0;d-=3){let p=Fe[d+2];if(p&2)break;if(u)Fe[d+2]|=2;else{if(p&4)break;Fe[d+2]|=4}}}for(let o=0;ol;){let c=a,f=K[--a]!=2;for(;a>l&&f==(K[a-1]!=2);)a--;r.push(new It(a,c,f?2:1))}else r.push(new It(l,o,0))}else for(let o=0;o1)for(let h of this.points)h.node==e&&h.pos>this.text.length&&(h.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=W.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function qr(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class $r{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Kr extends W{constructor(e){super(),this.view=e,this.compositionDeco=B.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new de],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ge(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:o,toA:l})=>lthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=B.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=Fc(this.view,e.changes)),(M.ie||M.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,s=this.updateDeco(),r=zc(i,s,e.changes);return t=Ge.extendWithRanges(t,r),this.dirty==0&&t.length==0?!1:(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=M.chrome||M.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,r),this.dirty=0,r&&(r.written||i.selectionRange.focusNode!=r.node)&&(this.forceSelection=!0),this.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to=0?e[s]:null;if(!r)break;let{fromA:o,toA:l,fromB:h,toB:a}=r,{content:c,breakAtStart:f,openStart:u,openEnd:d}=Qs.build(this.view.state.doc,h,a,this.decorations,this.dynamicDecorationMap),{i:p,off:g}=i.findPos(l,1),{i:m,off:y}=i.findPos(o,-1);Dl(this,m,y,p,g,c,f,u,d)}}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Gi(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,h=this.domAtPos(l.anchor),a=l.empty?h:this.domAtPos(l.head);if(M.gecko&&l.empty&&!this.compositionDeco.size&&Nc(h)){let f=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(f,h.node.childNodes[h.offset]||null)),h=a=new re(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||!tn(h.node,h.offset,c.anchorNode,c.anchorOffset)||!tn(a.node,a.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{M.android&&M.chrome&&this.dom.contains(c.focusNode)&&qc(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=en(this.view.root);if(f)if(l.empty){if(M.gecko){let u=Wc(h.node,h.offset);if(u&&u!=3){let d=th(h.node,h.offset,u==1?1:-1);d&&(h=new re(d,u==1?0:d.nodeValue.length))}}f.collapse(h.node,h.offset),l.bidiLevel!=null&&c.cursorBidiLevel!=null&&(c.cursorBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(h.node,h.offset);try{f.extend(a.node,a.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([h,a]=[a,h]),u.setEnd(a.node,a.offset),u.setStart(h.node,h.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,a)),this.impreciseAnchor=h.precise?null:new re(c.anchorNode,c.anchorOffset),this.impreciseHead=a.precise?null:new re(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,i=en(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=de.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let h=this.coordsAt(t.head,-1),a=this.coordsAt(t.head,1);if(!h||!a||h.bottom>a.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}nearest(e){for(let t=e;t;){let i=W.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;to||e==o&&r.type!=q.WidgetBefore&&r.type!=q.WidgetAfter&&(!s||t==2||this.children[s-1].breakAfter||this.children[s-1].type==q.WidgetBefore&&t>-2))return r.coordsAt(e-o,t);i=o}}measureVisibleLineHeights(e){let t=[],{from:i,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,h=this.view.textDirection==_.LTR;for(let a=0,c=0;cs)break;if(a>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,g=p?Vt(p):[];if(g.length){let m=g[g.length-1],y=h?m.right-d.left:d.right-m.left;y>l&&(l=y,this.minWidth=r,this.minWidthFrom=a,this.minWidthTo=u)}}}a=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?_.RTL:_.LTR}measureTextSize(){for(let r of this.children)if(r instanceof de){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Vt(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Ml(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=t.lineBlockAt(o).bottom-t.lineBlockAt(i).top;e.push(B.replace({widget:new jr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return B.set(e)}updateDeco(){let e=this.view.state.facet(fi).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;tt.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=0,o=0,l=0,h=0;for(let c of this.view.state.facet(_l).map(f=>f(this.view)))if(c){let{left:f,right:u,top:d,bottom:p}=c;f!=null&&(r=Math.max(r,f)),u!=null&&(o=Math.max(o,u)),d!=null&&(l=Math.max(l,d)),p!=null&&(h=Math.max(h,p))}let a={left:i.left-r,top:i.top-l,right:i.right+o,bottom:i.bottom+h};xc(this.view.scrollDOM,a,t.head0)i=i.childNodes[s-1],s=ci(i);else break}if(t>=0)for(let i=n,s=e;;){if(i.nodeType==3)return i;if(i.nodeType==1&&s=0)i=i.childNodes[s],s=0;else break}return null}function Wc(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e0;){let a=ue(s.text,o,!1);if(i(s.text.slice(a,o))!=h)break;o=a}for(;ln?e.left-n:Math.max(0,n-e.right)}function jc(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Hn(n,e){return n.tope.top+1}function Ur(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function As(n,e,t){let i,s,r,o,l=!1,h,a,c,f;for(let p=n.firstChild;p;p=p.nextSibling){let g=Vt(p);for(let m=0;mA||o==A&&r>k){i=p,s=y,r=k,o=A;let x=A?t0?m0)}k==0?t>y.bottom&&(!c||c.bottomy.top)&&(a=p,f=y):c&&Hn(c,y)?c=Gr(c,y.bottom):f&&Hn(f,y)&&(f=Ur(f,y.top))}}if(c&&c.bottom>=t?(i=h,s=c):f&&f.top<=t&&(i=a,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Jr(i,u,t);if(l&&i.contentEditable!="false")return As(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Jr(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((M.chrome||M.gecko)&&Wt(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function ih(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,h,{docHeight:a}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>a)return n.state.doc.length;for(let x=n.defaultLineHeight/2,S=!1;h=n.elementAtHeight(u),h.type!=q.Text;)for(;u=i>0?h.bottom+x:h.top-x,!(u>=0&&u<=a);){if(S)return t?null:0;S=!0,i=-i}f=l+u;let d=h.from;if(dn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:_r(n,o,h,c,f);let p=n.dom.ownerDocument,g=n.root.elementFromPoint?n.root:p,m=g.elementFromPoint(c,f);m&&!n.contentDOM.contains(m)&&(m=null),m||(c=Math.max(o.left+1,Math.min(o.right-1,c)),m=g.elementFromPoint(c,f),m&&!n.contentDOM.contains(m)&&(m=null));let y,k=-1;if(m&&((s=n.docView.nearest(m))===null||s===void 0?void 0:s.isEditable)!=!1){if(p.caretPositionFromPoint){let x=p.caretPositionFromPoint(c,f);x&&({offsetNode:y,offset:k}=x)}else if(p.caretRangeFromPoint){let x=p.caretRangeFromPoint(c,f);x&&({startContainer:y,startOffset:k}=x,(!n.contentDOM.contains(y)||M.safari&&Uc(y,k,c)||M.chrome&&Gc(y,k,c))&&(y=void 0))}}if(!y||!n.docView.dom.contains(y)){let x=de.find(n.docView,d);if(!x)return u>h.top+h.height/2?h.to:h.from;({node:y,offset:k}=As(x.dom,c,f))}let A=n.docView.nearest(y);if(!A)return null;if(A.isWidget&&((r=A.dom)===null||r===void 0?void 0:r.nodeType)==1){let x=A.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=Math.floor((s-t.top)/n.defaultLineHeight);r+=l*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+fs(o,r,n.state.tabSize)}function Uc(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Wt(n,i-1,i).getBoundingClientRect().left>t}function Gc(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Wt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function Jc(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=!i||!n.lineWrapping?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let h=n.dom.getBoundingClientRect(),a=n.textDirectionAt(s.from),c=n.posAtCoords({x:t==(a==_.LTR)?h.right-1:h.left+1,y:(r.top+r.bottom)/2});if(c!=null)return b.cursor(c,t?-1:1)}let o=de.find(n.docView,e.head),l=o?t?o.posAtEnd:o.posAtStart:t?s.to:s.from;return b.cursor(l,t?-1:1)}function Xr(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,h=null;;){let a=Ic(s,r,o,l,t),c=Ql;if(!a){if(s.number==(t?n.state.doc.lines:1))return l;c=` -`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=b.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function _c(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==$.Space&&(s=o),s==o}}function Xc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return b.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i??n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=ih(n,{x:f,y:p},!1,r);if(ph.bottom||(r<0?gs))return b.cursor(g,e.assoc,void 0,o)}}function zn(n,e,t){let i=n.state.facet(Jl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.fromt.from?b.cursor(o,1):b.cursor(l,-1),s=!0)});if(!s)return t}}class Yc{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;let t=(i,s)=>{this.ignoreDuringComposition(s)||s.type=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(s.type,e,s)?s.preventDefault():i(e,s))};for(let i in X){let s=X[i];e.contentDOM.addEventListener(i,r=>{Yr(e,r)&&t(s,r)},Ms[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(X.mousedown,i),!i.defaultPrevented&&i.button==2)){let s=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=s,200)}}),e.scrollDOM.addEventListener("drop",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(X.drop,i)}),M.chrome&&M.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,M.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{Yr(e,l)&&this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Ee(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Ee(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()s.keyCode==t.keyCode))&&!t.ctrlKey||Qc.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=i||t,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,Et(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:M.safari&&!M.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const nh=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Qc="dthko",sh=[16,17,18,20,91,92,224,225],Oi=6;function Ti(n){return Math.max(0,n)*.7+8}class Zc{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=Sc(e.contentDOM);let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(N.allowMultipleSelections)&&ef(e,t),this.dragMove=tf(e,t),this.dragging=nf(e,t)&&hh(t)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=e);let i=0,s=0,r=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=r.left+Oi?i=-Ti(r.left-e.clientX):e.clientX>=r.right-Oi&&(i=Ti(e.clientX-r.right)),e.clientY<=r.top+Oi?s=-Ti(r.top-e.clientY):e.clientY>=r.bottom-Oi&&(s=Ti(e.clientY-r.bottom)),this.setScrollSpeed(i,s)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!t.eq(this.view.state.selection)||t.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function ef(n,e){let t=n.state.facet(Wl);return t.length?t[0](e):M.mac?e.metaKey:e.ctrlKey}function tf(n,e){let t=n.state.facet(Hl);return t.length?t[0](e):M.mac?!e.altKey:!e.ctrlKey}function nf(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=en(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Yr(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=W.get(t))&&i.ignoreEvent(e))return!1;return!0}const X=Object.create(null),Ms=Object.create(null),rh=M.ie&&M.ie_version<15||M.ios&&M.webkit_version<604;function sf(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),oh(n,t.value)},50)}function oh(n,e){let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(Ds!=null&&t.selection.ranges.every(h=>h.empty)&&Ds==r.toString()){let h=-1;i=t.changeByRange(a=>{let c=t.doc.lineAt(a.from);if(c.from==h)return{range:a};h=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:b.cursor(a.from+f.length)}})}else o?i=t.changeByRange(h=>{let a=r.line(s++);return{changes:{from:h.from,to:h.to,insert:a.text},range:b.cursor(h.from+a.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}X.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27&&(n.inputState.lastEscPress=Date.now())};X.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};X.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Ms.touchstart=Ms.touchmove={passive:!0};X.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return;let t=null;for(let i of n.state.facet(zl))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=lf(n,e)),t){let i=n.root.activeElement!=n.contentDOM;n.inputState.startMouseSelection(new Zc(n,e,t,i)),i&&n.observer.ignore(()=>Cl(n.contentDOM)),n.inputState.mouseSelection&&n.inputState.mouseSelection.start(e)}};function Qr(n,e,t,i){if(i==1)return b.cursor(e,t);if(i==2)return $c(n.state,e,t);{let s=de.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return ln>=e.top&&n<=e.bottom,Zr=(n,e,t)=>lh(e,t)&&n>=t.left&&n<=t.right;function rf(n,e,t,i){let s=de.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Zr(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Zr(t,i,l)?1:o&&lh(i,o)?-1:1}function eo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:rf(n,t,e.clientX,e.clientY)}}const of=M.ie&&M.ie_version<=11;let to=null,io=0,no=0;function hh(n){if(!of)return n.detail;let e=to,t=no;return to=n,no=Date.now(),io=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(io+1)%3:1}function lf(n,e){let t=eo(n,e),i=hh(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let h=eo(n,r),a,c=Qr(n,h.pos,h.bias,i);if(t.pos!=h.pos&&!o){let f=Qr(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=u1&&(a=hf(s,h.pos))?a:l?s.addRange(c):b.create([c])}}}function hf(n,e){for(let t=0;t=e)return b.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}X.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function so(n,e,t,i){if(!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=n.inputState,o=i&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,l={from:s,insert:t},h=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}X.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),s=0,r=()=>{++s==t.length&&so(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}}else so(n,e,e.dataTransfer.getData("Text"),!0)};X.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=rh?null:e.clipboardData;t?(oh(n,t.getData("text/plain")||t.getData("text/uri-text")),e.preventDefault()):sf(n)};function af(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function cf(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let Ds=null;X.copy=X.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=cf(n.state);if(!t&&!s)return;Ds=s?t:null;let r=rh?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",t)):af(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};const ah=Qe.define();function ch(n,e){let t=[];for(let i of n.facet(Kl)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:ah.of(!0)}):null}function fh(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=ch(n.state,e);t?n.dispatch(t):n.update([])}},10)}X.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),fh(n)};X.blur=n=>{n.observer.clearSelectionRange(),fh(n)};X.compositionstart=X.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0)};X.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,M.chrome&&M.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.compositionDeco.size&&n.update([])},50)};X.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};X.beforeinput=(n,e)=>{var t;let i;if(M.chrome&&M.android&&(i=nh.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const ro=["pre-wrap","normal","pre-line","break-spaces"];class ff{constructor(e){this.lineWrapping=e,this.doc=I.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ro.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,h=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,h){this.heightSamples={};for(let a=0;a0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Ji&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return pe.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:h,toA:a,fromB:c,toB:f}=s[l],u=r.lineAt(h,z.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=a?u:r.lineAt(a,z.ByPosNoHeight,i,0,0);for(f+=d.to-a,a=d.to;l>0&&u.from<=s[l-1].toA;)h=s[l-1].fromA,c=s[l-1].fromB,l--,hr*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(e,s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ae extends uh{constructor(e,t){super(e,t,q.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Ae||s instanceof ie&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ie?s=new Ae(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):pe.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(e,s.heights[s.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ie extends pe{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let h=Math.min(this.height,e.lineHeight*r);o=h/r,this.length>r+1&&(l=(this.height-h)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:h}=this.heightMetrics(t,s);if(t.lineWrapping){let a=s+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),c=t.doc.lineAt(a),f=l+c.length*h,u=Math.max(i,e-f/2);return new _e(c.from,c.length,u,f,q.Text)}else{let a=Math.max(0,Math.min(o-r,Math.floor((e-i)/l))),{from:c,length:f}=t.doc.line(r+a);return new _e(c,f,i+l*a,l,q.Text)}}lineAt(e,t,i,s,r){if(t==z.ByHeight)return this.blockAt(e,i,s,r);if(t==z.ByPosNoHeight){let{from:d,to:p}=i.doc.lineAt(e);return new _e(d,p-d,0,0,q.Text)}let{firstLine:o,perLine:l,perChar:h}=this.heightMetrics(i,r),a=i.doc.lineAt(e),c=l+a.length*h,f=a.number-o,u=s+l*f+h*(a.from-r-f);return new _e(a.from,a.length,Math.max(s,Math.min(u,s+this.height-c)),c,q.Text)}forEachLine(e,t,i,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:l,perLine:h,perChar:a}=this.heightMetrics(i,r);for(let c=e,f=s;c<=t;){let u=i.doc.lineAt(c);if(c==e){let p=u.number-l;f+=h*p+a*(e-r-p)}let d=h+a*u.length;o(new _e(u.from,u.length,f,d,q.Text)),f+=d,c=u.to+1}}replace(e,t,i){let s=this.length-t;if(s>0){let r=i[i.length-1];r instanceof ie?i[i.length-1]=new ie(r.length+s):i.push(null,new ie(s-1))}if(e>0){let r=i[0];r instanceof ie?i[0]=new ie(e+r.length):i.unshift(new ie(e-1),null)}return pe.of(i)}decomposeLeft(e,t){t.push(new ie(e-1),null)}decomposeRight(e,t){t.push(null,new ie(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),h=-1;for(s.from>t&&o.push(new ie(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];h==-1?h=f:Math.abs(f-h)>=Ji&&(h=-2);let u=new Ae(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new ie(r-l).updateHeight(e,l));let a=pe.of(o);return(h<0||Math.abs(a.height-this.height)>=Ji||Math.abs(h-this.heightMetrics(e,t).perLine)>=Ji)&&(e.heightChanged=!0),a}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class df extends pe{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return a;let c=t==z.ByPosNoHeight?z.ByPosNoHeight:z.ByPos;return h?a.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(a)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,h=r+this.left.length+this.break;if(this.break)e=h&&this.right.forEachLine(e,t,i,l,h,o);else{let a=this.lineAt(h,z.ByPos,i,s,r);e=e&&a.from<=t&&o(a),t>a.to&&this.right.forEachLine(a.to+1,t,i,l,h,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&oo(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?pe.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,h=null;return s&&s.from<=t+r.length&&s.more?h=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?h=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),h?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function oo(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ie&&(i=n[e+1])instanceof ie&&n.splice(e-1,3,new ie(t.length+1+i.length))}const pf=5;class er{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ae?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ae(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=pf)&&this.addLineDeco(s,r)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Ae(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ie(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ae)return e;let t=new Ae(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type==q.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=q.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ae)&&!this.isCovered?this.nodes.push(new Ae(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),h=a==n.parentNode?u.bottom:Math.min(h,u.bottom)}a=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(a.nodeType==11)a=a.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,h)-(t.top+e)}}function bf(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class qn{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new ff(t),this.stateDeco=e.facet(fi).filter(i=>typeof i!="function"),this.heightMap=pe.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle.setDoc(e.doc),[new Ge(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=B.set(this.lineGaps.map(i=>i.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Bi(r,o))}}this.viewports=e.sort((i,s)=>i.from-s.from),this.scaler=this.heightMap.height<=7e6?ho:new kf(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:ii(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(fi).filter(a=>typeof a!="function");let s=e.changedRanges,r=Ge.extendWithRanges(s,gf(i,this.stateDeco,e?e.changes:Z.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2);let l=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let h=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),h&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Ul)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?_.RTL:_.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),h=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let a=0,c=0,f=parseInt(i.paddingTop)||0,u=parseInt(i.paddingBottom)||0;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,a|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(h=!0),this.editorWidth=e.scrollDOM.clientWidth,a|=8);let d=(this.printing?bf:yf)(t,this.paddingTop),p=d.top-this.pixelViewport.top,g=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(h=!0)),!this.inView&&!this.scrollTarget)return 0;let y=l.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,a|=8),h){let A=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(A)&&(o=!0),o||s.lineWrapping&&Math.abs(y-this.contentDOMWidth)>s.charWidth){let{lineHeight:x,charWidth:S,textHeight:v}=e.docView.measureTextSize();o=x>0&&s.refresh(r,x,S,v,y/S,A),o&&(e.docView.minWidth=0,a|=8)}p>0&&g>0?c=Math.max(p,g):p<0&&g<0&&(c=Math.min(p,g)),s.heightChanged=!1;for(let x of this.viewports){let S=x.from==this.viewport.from?A:e.docView.measureVisibleLineHeights(x);this.heightMap=(o?pe.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle,[new Ge(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new uf(x.from,S))}s.heightChanged&&(a|=2)}let k=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return k&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(a&2||k)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,h=new Bi(s.lineAt(o-i*1e3,z.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,z.ByHeight,r,0,0).to);if(t){let{head:a}=t.range;if(ah.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(a,z.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&a=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=_.LTR&&!i)return[];let l=[],h=(a,c,f,u)=>{if(c-aa&&mm.from>=f.from&&m.to<=f.to&&Math.abs(m.from-a)m.fromy));if(!g){if(cm.from<=c&&m.to>=c)){let m=t.moveToLineBoundary(b.cursor(c),!1,!0).head;m>a&&(c=m)}g=new qn(a,c,this.gapSize(f,a,c,u))}l.push(g)};for(let a of this.viewportLines){if(a.lengtha.from&&h(a.from,u,a,c),dt.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];j.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ii(this.heightMap.lineAt(e,z.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return ii(this.heightMap.lineAt(this.scaler.fromDOM(e),z.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return ii(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Bi{constructor(e,t){this.from=e,this.to=t}}function xf(n,e,t){let i=[],s=n,r=0;return j.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function Ri(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function Sf(n,e){for(let t of n)if(e(t))return t}const ho={toDOM(n){return n},fromDOM(n){return n},scale:1};class kf{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:h})=>{let a=t.lineAt(l,z.ByPos,e,0,0).top,c=t.lineAt(h,z.ByPos,e,0,0).bottom;return s+=c-a,{from:l,to:h,top:a,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tii(s,e)):n.type)}const Li=D.define({combine:n=>n.join(" ")}),Os=D.define({combine:n=>n.indexOf(!0)>-1}),Ts=lt.newName(),dh=lt.newName(),ph=lt.newName(),gh={"&light":"."+dh,"&dark":"."+ph};function Bs(n,e,t){return new lt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const vf=Bs("."+Ts,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},gh);class Cf{constructor(e,t,i,s){this.typeOver=s,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:Mf(e),h=new Zl(l,e.state);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=Df(l,this.bounds.from)}else{let l=e.observer.selectionRange,h=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Ft(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),a=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Ft(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=b.single(a,h)}}}function mh(n,e){let t,{newSel:i}=e,s=n.state.selection.main;if(e.bounds){let{from:r,to:o}=e.bounds,l=s.from,h=null;(n.inputState.lastKeyCode===8&&n.inputState.lastKeyTime>Date.now()-100||M.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(M.mac||M.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}):M.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` - `&&n.lineWrapping&&(i&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}),t){let r=n.state;if(M.ios&&n.inputState.flushIOSKey(n)||M.android&&(t.from==s.from&&t.to==s.to&&t.insert.length==1&&t.insert.lines==2&&Et(n.contentDOM,"Enter",13)||t.from==s.from-1&&t.to==s.to&&t.insert.length==0&&Et(n.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&t.insert.length==0&&Et(n.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();if(n.state.facet($l).some(a=>a(n,t.from,t.to,o)))return!0;n.inputState.composing>=0&&n.inputState.composing++;let l;if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&n.inputState.composing<0){let a=s.fromt.to?r.sliceDoc(t.to,s.to):"";l=r.replaceSelection(n.state.toText(a+t.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let a=r.changes(t),c=i&&i.main.to<=a.newLength?i.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&t.to<=s.to&&t.to>=s.to-10){let f=n.state.sliceDoc(t.from,t.to),u=eh(n)||n.state.doc.lineAt(s.head),d=s.to-t.to,p=s.to-s.from;l=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:a,range:c||g.map(a)};let m=g.to-d,y=m-f.length;if(g.to-g.from!=p||n.state.sliceDoc(y,m)!=f||u&&g.to>=u.from&&g.from<=u.to)return{range:g};let k=r.changes({from:y,to:m,insert:t.insert}),A=g.to-s.to;return{changes:k,range:c?b.range(Math.max(0,c.anchor+A),Math.max(0,c.head+A)):g.map(k)}})}else l={changes:a,selection:c&&r.selection.replaceRange(c)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),n.dispatch(l,{scrollIntoView:!0,userEvent:h}),!0}else if(i&&!i.main.eq(s)){let r=!1,o="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(r=!0),o=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:r,userEvent:o}),!0}else return!1}function Af(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let h=Math.max(0,r-Math.min(o,l));t-=o+h-r}if(o=o?r-t:0;r-=h,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=h,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Mf(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new $r(t,i)),(s!=t||r!=i)&&e.push(new $r(s,r))),e}function Df(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?b.single(t+e,i+e):null}const Of={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},$n=M.ie&&M.ie_version<=11;class Tf{constructor(e){this.view=e,this.active=!1,this.selectionRange=new kc,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(M.ie&&M.ie_version<=11||M.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),$n&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(Mn)?i.root.activeElement!=this.dom:!Gi(i.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(M.ie&&M.ie_version<=11||M.android&&M.chrome)&&!i.state.selection.main.empty&&s.focusNode&&tn(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=M.safari&&e.root.nodeType==11&&bc(this.dom.ownerDocument)==this.dom&&Bf(this.view)||en(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Gi(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),!this.flush()&&r.force&&Et(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Gi(this.dom,this.selectionRange);return e<0&&!s?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Cf(this.view,e,t,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,s=mh(this.view,t);return this.view.state==i&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.dirty|=4),e.type=="childList"){let i=ao(t,e.previousSibling||e.target.previousSibling,-1),s=ao(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,s;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(s=this.resizeContent)===null||s===void 0||s.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function ao(n,e,t){for(;e;){let i=W.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Bf(n){let e=null;function t(h){h.preventDefault(),h.stopImmediatePropagation(),e=h.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor);return tn(l.node,l.offset,r,o)&&([i,s,r,o]=[r,o,i,s]),{anchorNode:i,anchorOffset:s,focusNode:r,focusOffset:o}}class O{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this._root=e.root||vc(e.parent)||document,this.viewState=new lo(e.state||N.create(e)),this.plugins=this.state.facet(ei).map(t=>new Wn(t));for(let t of this.plugins)t.update(this);this.observer=new Tf(this),this.inputState=new Yc(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Kr(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof ee?e[0]:this.state.update(...e))}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,h=null;e.some(u=>u.annotation(ah))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,h=ch(r,o),h||(l=1));let a=this.observer.delayedAndroidKey,c=null;if(a?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(N.phrases)!=this.state.facet(N.phrases))return this.setState(r);s=rn.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:d}=u.state.selection;f=new sn(d.empty?d:b.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of u.effects)d.is(zr)&&(f=d.value)}this.viewState.update(s,f),this.bidiCache=on.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(ti)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Li)!=s.state.facet(Li)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!s.empty)for(let u of this.state.facet(ks))u(s);(h||c)&&Promise.resolve().then(()=>{h&&this.state==h.startState&&this.dispatch(h),c&&!mh(this,c)&&a.force&&Et(this.contentDOM,a.key,a.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new lo(e),this.plugins=e.facet(ei).map(i=>new Wn(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new Kr(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(ei),i=e.state.facet(ei);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new Wn(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:s,clientHeight:r}=this.scrollDOM,o=s>i-r-4?i:s;try{for(let l=0;;l++){this.updateState=1;let h=this.viewport,a=this.viewState.lineBlockAtHeight(o),c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let u=f.map(m=>{try{return m.read(this)}catch(y){return Ee(this.state,y),co}}),d=rn.create(this,this.state,[]),p=!1,g=!1;d.flags|=c,t?t.flags|=c:t=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),p=this.docView.update(d));for(let m=0;m1||m<-1)&&(this.scrollDOM.scrollTop+=m,g=!0)}if(p&&this.docView.updateSelection(!0),this.viewport.from==h.from&&this.viewport.to==h.to&&!g&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(ks))l(t)}get themeClasses(){return Ts+" "+(this.state.facet(Os)?ph:dh)+" "+this.state.facet(Li)}updateAttrs(){let e=fo(this,Gl,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Mn)?"true":"false",class:"cm-content",style:`${M.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),fo(this,Zs,t);let i=this.observer.ignore(()=>{let s=xs(this.contentDOM,this.contentAttrs,t),r=xs(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(O.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(ti),lt.mount(this.root,this.styleModules.concat(vf).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return zn(this,e,Xr(this,e,t,i))}moveByGroup(e,t){return zn(this,e,Xr(this,e,t,i=>_c(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return Jc(this,e,t,i)}moveVertically(e,t,i){return zn(this,e,Xc(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),ih(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[It.find(r,e-s.from,-1,t)];return vn(i,o.dir==_.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(jl)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Pf)return Yl(e.length);let t=this.textDirectionAt(e.from);for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t)return s.order;let i=Ec(e.text,t);return this.bidiCache.push(new on(e.from,e.to,t,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||M.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Cl(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return zr.of(new sn(typeof e=="number"?b.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return ge.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=lt.newName(),s=[Li.of(i),ti.of(Bs(`.${i}`,e))];return t&&t.dark&&s.push(Os.of(!0)),s}static baseTheme(e){return Ct.lowest(ti.of(Bs("."+Ts,e,gh)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&W.get(i)||W.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}O.styleModule=ti;O.inputHandler=$l;O.focusChangeEffect=Kl;O.perLineTextDirection=jl;O.exceptionSink=ql;O.updateListener=ks;O.editable=Mn;O.mouseSelectionStyle=zl;O.dragMovesSelection=Hl;O.clickAddsSelectionRange=Wl;O.decorations=fi;O.atomicRanges=Jl;O.scrollMargins=_l;O.darkTheme=Os;O.contentAttributes=Zs;O.editorAttributes=Gl;O.lineWrapping=O.contentAttributes.of({class:"cm-lineWrapping"});O.announce=E.define();const Pf=4096,co={};class on{constructor(e,t,i,s){this.from=e,this.to=t,this.dir=i,this.order=s}static update(e,t){if(t.empty)return e;let i=[],s=e.length?e[e.length-1].dir:_.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&ws(o,t)}return t}const Rf=M.mac?"mac":M.windows?"win":M.linux?"linux":"key";function Lf(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let h=0;hi.concat(s),[]))),t}function If(n,e,t){return bh(yh(n.state),e,n,t)}let tt=null;const Nf=4e3;function Ff(n,e=Rf){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let h=i[o];if(h==null)i[o]=l;else if(h!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,h,a)=>{var c,f;let u=t[o]||(t[o]=Object.create(null)),d=l.split(/ (?!$)/).map(m=>Lf(m,e));for(let m=1;m{let A=tt={view:k,prefix:y,scope:o};return setTimeout(()=>{tt==A&&(tt=null)},Nf),!0}]})}let p=d.join(" ");s(p,!1);let g=u[p]||(u[p]={preventDefault:!1,run:((f=(c=u._any)===null||c===void 0?void 0:c.run)===null||f===void 0?void 0:f.slice())||[]});h&&g.run.push(h),a&&(g.preventDefault=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let a of l){let c=t[a]||(t[a]=Object.create(null));c._any||(c._any={preventDefault:!1,run:[]});for(let f in c)c[f].run.push(o.any)}let h=o[e]||o.key;if(h)for(let a of l)r(a,h,o.run,o.preventDefault),o.shift&&r(a,"Shift-"+h,o.shift,o.preventDefault)}return t}function bh(n,e,t,i){let s=yc(e),r=ne(s,0),o=Oe(r)==s.length&&s!=" ",l="",h=!1;tt&&tt.view==t&&tt.scope==i&&(l=tt.prefix+" ",(h=sh.indexOf(e.keyCode)<0)&&(tt=null));let a=new Set,c=p=>{if(p){for(let g of p.run)if(!a.has(g)&&(a.add(g),g(t,e)))return!0;p.preventDefault&&(h=!0)}return!1},f=n[i],u,d;if(f){if(c(f[l+Ei(s,e,!o)]))return!0;if(o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(M.windows&&e.ctrlKey&&e.altKey)&&(u=ht[e.keyCode])&&u!=s){if(c(f[l+Ei(u,e,!0)]))return!0;if(e.shiftKey&&(d=ai[e.keyCode])!=s&&d!=u&&c(f[l+Ei(d,e,!1)]))return!0}else if(o&&e.shiftKey&&c(f[l+Ei(s,e,!0)]))return!0;if(c(f._any))return!0}return h}class Si{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=wh(e);return[new Si(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Vf(e,t,i)}}function wh(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==_.LTR?e.left:e.right-n.scrollDOM.clientWidth)-n.scrollDOM.scrollLeft,top:e.top-n.scrollDOM.scrollTop}}function po(n,e,t){let i=b.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:q.Text}}function go(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==q.Text))return i}return t}function Vf(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==_.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),h=wh(n),a=o.querySelector(".cm-line"),c=a&&window.getComputedStyle(a),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),d=go(n,i),p=go(n,s),g=d.type==q.Text?d:null,m=p.type==q.Text?p:null;if(n.lineWrapping&&(g&&(g=po(n,i,g)),m&&(m=po(n,s,m))),g&&m&&g.from==m.from)return k(A(t.from,t.to,g));{let S=g?A(t.from,null,g):x(d,!1),v=m?A(null,t.to,m):x(p,!0),T=[];return(g||d).to<(m||p).from-1?T.push(y(f,S.bottom,u,v.top)):S.bottomY&&we.from=le)break;Q>te&&H(Math.max(G,te),S==null&&G<=Y,Math.min(Q,le),v==null&&Q>=oe,xe.dir)}if(te=Ne.to+1,te>=le)break}return L.length==0&&H(Y,S==null,oe,v==null,n.textDirection),{top:F,bottom:P,horizontal:L}}function x(S,v){let T=l.top+(v?S.top:S.bottom);return{top:T,bottom:T,horizontal:[]}}}function Wf(n,e){return n.constructor==e.constructor&&n.eq(e)}class Hf{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(_i)!=e.state.facet(_i)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(_i);for(;t!Wf(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const _i=D.define();function xh(n){return[ge.define(e=>new Hf(e,n)),_i.of(n)]}const Sh=!M.ios,ui=D.define({combine(n){return At(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Pg(n={}){return[ui.of(n),zf,qf,$f,Ul.of(!0)]}function kh(n){return n.startState.facet(ui)!=n.state.facet(ui)}const zf=xh({above:!0,markers(n){let{state:e}=n,t=e.facet(ui),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||Sh:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:b.cursor(s.head,s.head>s.anchor?-1:1);for(let h of Si.forRange(n,o,l))i.push(h)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=kh(n);return t&&mo(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){mo(e.state,n)},class:"cm-cursorLayer"});function mo(n,e){e.style.animationDuration=n.facet(ui).cursorBlinkRate+"ms"}const qf=xh({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:Si.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||kh(n)},class:"cm-selectionLayer"}),vh={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Sh&&(vh[".cm-line"].caretColor="transparent !important");const $f=Ct.highest(O.theme(vh)),Ch=E.define({map(n,e){return n==null?null:e.mapPos(n)}}),ni=be.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(Ch)?i.value:t,n)}}),Kf=ge.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(ni);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(ni)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let n=this.view.state.field(ni),e=n!=null&&this.view.coordsAtPos(n);if(!e)return null;let t=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-t.left+this.view.scrollDOM.scrollLeft,top:e.top-t.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(ni)!=n&&this.view.dispatch({effects:Ch.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Rg(){return[ni,Kf]}function yo(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function jf(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Uf{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,h,a,c)=>s(c,a,a+l[0].length,l,h);else if(typeof i=="function")this.addMatch=(l,h,a,c)=>{let f=i(l,h,a);f&&c(a,a+l[0].length,f)};else if(i)this.addMatch=(l,h,a,c)=>c(a,a+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new wt,i=t.add.bind(t);for(let{from:s,to:r}of jf(e,this.maxLength))yo(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,h)=>{h>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let h=e.state.doc.lineAt(o),a=h.toh.from;o--)if(this.boundary.test(h.text[o-1-h.from])){c=o;break}for(;lu.push(y.range(g,m));if(h==a)for(this.regexp.lastIndex=c-h.from;(d=this.regexp.exec(h.text))&&d.indexthis.addMatch(m,e,g,p));t=t.update({filterFrom:c,filterTo:f,filter:(g,m)=>gf,add:u})}}return t}}const Ps=/x/.unicode!=null?"gu":"g",Gf=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ps),Jf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Kn=null;function _f(){var n;if(Kn==null&&typeof document<"u"&&document.body){let e=document.body.style;Kn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Kn||!1}const Xi=D.define({combine(n){let e=At(n,{render:null,specialChars:Gf,addSpecialChars:null});return(e.replaceTabs=!_f())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ps)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ps)),e}});function Lg(n={}){return[Xi.of(n),Xf()]}let bo=null;function Xf(){return bo||(bo=ge.fromClass(class{constructor(n){this.view=n,this.decorations=B.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Xi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Uf({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ne(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=wi(o.text,l,i-o.from);return B.replace({widget:new eu((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=B.replace({widget:new Zf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Xi);n.startState.facet(Xi)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Yf="•";function Qf(n){return n>=32?Yf:n==10?"␤":String.fromCharCode(9216+n)}class Zf extends at{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Qf(this.code),i=e.state.phrase("Control character")+" "+(Jf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class eu extends at{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class tu extends at{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Vt(e.firstChild):[];return t.length?vn(t[0],window.getComputedStyle(e).direction!="rtl"):null}ignoreEvent(){return!1}}function Eg(n){return ge.fromClass(class{constructor(e){this.view=e,this.placeholder=B.set([B.widget({widget:new tu(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?B.none:this.placeholder}},{decorations:e=>e.decorations})}const Rs=2e3;function iu(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Rs||t.off>Rs||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(b.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=fs(a.text,o,n.tabSize,!0);if(c<0)r.push(b.cursor(a.to));else{let f=fs(a.text,l,n.tabSize);r.push(b.range(a.from+c,a.from+f))}}}return r}function nu(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function wo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Rs?-1:s==i.length?nu(n,e.clientX):wi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function su(n,e){let t=wo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=wo(n,s);if(!l)return i;let h=iu(n.state,t,l);return h.length?o?b.create(h.concat(i.ranges)):b.create(h):i}}:null}function Ig(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?su(t,i):null)}const Ii="-10000px";class ru{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),s=i.filter(o=>o);if(i===this.input){for(let o of this.tooltipViews)o.update&&o.update(e);return!1}let r=[];for(let o=0;o{var e,t,i;return{position:M.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||ou}}}),xo=new WeakMap,Ah=ge.fromClass(class{constructor(n){this.view=n,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(jn);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new ru(n,Mh,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(jn);if(i.position!=this.position){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Ii,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(n=t.destroy)===null||n===void 0||n.call(t);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect();return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(jn).tooltipSpace(this.view)}}writeMeasure(n){var e;let{editor:t,space:i}=n,s=[];for(let r=0;r=Math.min(t.bottom,i.bottom)||a.rightMath.min(t.right,i.right)+.1){h.style.top=Ii;continue}let f=o.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,u=f?7:0,d=c.right-c.left,p=(e=xo.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||hu,m=this.view.textDirection==_.LTR,y=c.width>i.right-i.left?m?i.left:i.right-c.width:m?Math.min(a.left-(f?14:0)+g.x,i.right-d):Math.max(i.left,a.left-d+(f?14:0)-g.x),k=!!o.above;!o.strictSide&&(k?a.top-(c.bottom-c.top)-g.yi.bottom)&&k==i.bottom-a.bottom>a.top-i.top&&(k=!k);let A=(k?a.top-i.top:i.bottom-a.bottom)-u;if(Ay&&v.topx&&(x=k?v.top-p-2-u:v.bottom+u+2);this.position=="absolute"?(h.style.top=x-n.parent.top+"px",h.style.left=y-n.parent.left+"px"):(h.style.top=x+"px",h.style.left=y+"px"),f&&(f.style.left=`${a.left+(m?g.x:-g.x)-(y+14-7)}px`),l.overlap!==!0&&s.push({left:y,top:x,right:S,bottom:x+p}),h.classList.toggle("cm-tooltip-above",k),h.classList.toggle("cm-tooltip-below",!k),l.positioned&&l.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Ii}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),lu=O.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),hu={x:0,y:0},Mh=D.define({enables:[Ah,lu]});function Dh(n,e){let t=n.plugin(Ah);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const So=D.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function ln(n,e){let t=n.plugin(Oh),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const Oh=ge.fromClass(class{constructor(n){this.input=n.state.facet(hn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(So);this.top=new Ni(n,!0,e.topContainer),this.bottom=new Ni(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(So);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ni(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ni(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(hn);if(t!=this.input){let i=t.filter(h=>h),s=[],r=[],o=[],l=[];for(let h of i){let a=this.specs.indexOf(h),c;a<0?(c=h(n.view),l.push(c)):(c=this.panels[a],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let h of l)h.dom.classList.add("cm-panel"),h.mount&&h.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>O.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Ni{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=ko(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=ko(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function ko(n){let e=n.nextSibling;return n.remove(),e}const hn=D.define({enables:Oh});class kt extends bt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}kt.prototype.elementClass="";kt.prototype.toDOM=void 0;kt.prototype.mapMode=ce.TrackBefore;kt.prototype.startSide=kt.prototype.endSide=-1;kt.prototype.point=!0;const au=D.define(),cu=new class extends kt{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},fu=au.compute(["selection"],n=>{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(cu.range(s)))}return j.of(e)});function Ng(){return fu}const uu=1024;let du=0;class Te{constructor(e,t){this.from=e,this.to=t}}class R{constructor(e={}){this.id=du++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=me.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}R.closedBy=new R({deserialize:n=>n.split(" ")});R.openedBy=new R({deserialize:n=>n.split(" ")});R.group=new R({deserialize:n=>n.split(" ")});R.contextHash=new R({perNode:!0});R.lookAhead=new R({perNode:!0});R.mounted=new R({perNode:!0});class pu{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const gu=Object.create(null);class me{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):gu,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new me(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(R.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(R.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}me.none=new me("",Object.create(null),0,8);class ir{constructor(e){this.types=e;for(let t=0;t=s&&(o.type.isAnonymous||t(o)!==!1)){if(o.firstChild())continue;l=!0}for(;l&&i&&!o.type.isAnonymous&&i(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rr(me.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new V(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new V(me.none,t,i,s)))}static build(e){return yu(e)}}V.empty=new V(me.none,[],[],0);class nr{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new nr(this.buffer,this.index)}}class Mt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return me.none}toString(){let e=[];for(let t=0;t0));h=o[h+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,h=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Bh(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function zt(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=a;e+=t){let c=l[e],f=h[e]+o.from;if(Th(s,i,f,f+c.length)){if(c instanceof Mt){if(r&U.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new $e(new mu(o,c,e,f),null,u)}else if(r&U.IncludeAnonymous||!c.type.isAnonymous||sr(c)){let u;if(!(r&U.IgnoreMounts)&&c.props&&(u=c.prop(R.mounted))&&!u.overlay)return new Re(u.tree,f,e,o);let d=new Re(c,f,e,o);return r&U.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&U.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&U.IgnoreOverlays)&&(s=this._tree.prop(R.mounted))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Re(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new di(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return zt(this,e,t,!1)}resolveInner(e,t=0){return zt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Bh(this,e)}getChild(e,t=null,i=null){let s=an(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return an(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return cn(this,e)}}function an(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(;!s.type.is(t);)if(!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function cn(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class mu{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class $e{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new $e(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&U.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new $e(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new $e(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new $e(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new di(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new V(this.type,e,t,this.to-this.from)}resolve(e,t=0){return zt(this,e,t,!1)}resolveInner(e,t=0){return zt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Bh(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let s=an(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return an(this,e,t,i)}get node(){return this}matchContext(e){return cn(this,e)}}class di{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Re)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Re?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&U.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&U.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&U.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&U.IncludeAnonymous||l instanceof Mt||!l.type.isAnonymous||sr(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return cn(this.node,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function sr(n){return n.children.some(e=>e instanceof Mt||!e.type.isAnonymous||sr(e))}function yu(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=uu,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new nr(t,t.length):t,h=i.types,a=0,c=0;function f(x,S,v,T,F){let{id:P,start:L,end:H,size:Y}=l,oe=c;for(;Y<0;)if(l.next(),Y==-1){let xe=r[P];v.push(xe),T.push(L-x);return}else if(Y==-3){a=P;return}else if(Y==-4){c=P;return}else throw new RangeError(`Unrecognized record size: ${Y}`);let we=h[P],te,le,Ne=L-x;if(H-L<=s&&(le=g(l.pos-S,F))){let xe=new Uint16Array(le.size-le.skip),G=l.pos-le.size,Q=xe.length;for(;l.pos>G;)Q=m(le.start,xe,Q);te=new Mt(xe,H-le.start,i),Ne=le.start-x}else{let xe=l.pos-Y;l.next();let G=[],Q=[],ft=P>=o?P:-1,Dt=0,Ci=H;for(;l.pos>xe;)ft>=0&&l.id==ft&&l.size>=0?(l.end<=Ci-s&&(d(G,Q,L,Dt,l.end,Ci,ft,oe),Dt=G.length,Ci=l.end),l.next()):f(L,xe,G,Q,ft);if(ft>=0&&Dt>0&&Dt-1&&Dt>0){let Sr=u(we);te=rr(we,G,Q,0,G.length,0,H-L,Sr,Sr)}else te=p(we,G,Q,H-L,oe-H)}v.push(te),T.push(Ne)}function u(x){return(S,v,T)=>{let F=0,P=S.length-1,L,H;if(P>=0&&(L=S[P])instanceof V){if(!P&&L.type==x&&L.length==T)return L;(H=L.prop(R.lookAhead))&&(F=v[P]+L.length+H)}return p(x,S,v,T,F)}}function d(x,S,v,T,F,P,L,H){let Y=[],oe=[];for(;x.length>T;)Y.push(x.pop()),oe.push(S.pop()+v-F);x.push(p(i.types[L],Y,oe,P-F,H-P)),S.push(F-v)}function p(x,S,v,T,F=0,P){if(a){let L=[R.contextHash,a];P=P?[L].concat(P):[L]}if(F>25){let L=[R.lookAhead,F];P=P?[L].concat(P):[L]}return new V(x,S,v,T,P)}function g(x,S){let v=l.fork(),T=0,F=0,P=0,L=v.end-s,H={size:0,start:0,skip:0};e:for(let Y=v.pos-x;v.pos>Y;){let oe=v.size;if(v.id==S&&oe>=0){H.size=T,H.start=F,H.skip=P,P+=4,T+=4,v.next();continue}let we=v.pos-oe;if(oe<0||we=o?4:0,le=v.start;for(v.next();v.pos>we;){if(v.size<0)if(v.size==-3)te+=4;else break e;else v.id>=o&&(te+=4);v.next()}F=le,T+=oe,P+=te}return(S<0||T==x)&&(H.size=T,H.start=F,H.skip=P),H.size>4?H:void 0}function m(x,S,v){let{id:T,start:F,end:P,size:L}=l;if(l.next(),L>=0&&T4){let Y=l.pos-(L-4);for(;l.pos>Y;)v=m(x,S,v)}S[--v]=H,S[--v]=P-x,S[--v]=F-x,S[--v]=T}else L==-3?a=T:L==-4&&(c=T);return v}let y=[],k=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,y,k,-1);let A=(e=n.length)!==null&&e!==void 0?e:y.length?k[0]+y[0].length:0;return new V(h[n.topID],y.reverse(),k.reverse(),A)}const Co=new WeakMap;function Yi(n,e){if(!n.isAnonymous||e instanceof Mt||e.type!=n)return 1;let t=Co.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof V)){t=1;break}t+=Yi(n,i)}Co.set(e,t)}return t}function rr(n,e,t,i,s,r,o,l,h){let a=0;for(let p=i;p=c)break;v+=T}if(A==x+1){if(v>c){let T=p[x];d(T.children,T.positions,0,T.children.length,g[x]+k);continue}f.push(p[x])}else{let T=g[A-1]+p[A-1].length-S;f.push(rr(n,p,g,x,A,S,T,null,h))}u.push(S+k-r)}}return d(e,t,i,s,0),(l||h)(f,u,o)}class Fg{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof $e?this.setBuffer(e.context.buffer,e.index,t):e instanceof Re&&this.map.set(e.tree,t)}get(e){return e instanceof $e?this.getBuffer(e.context.buffer,e.index):e instanceof Re?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Xe{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new Xe(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,h=0,a=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||a){let d=Math.max(u.from,h)-a,p=Math.min(u.to,f)-a;u=d>=p?null:new Xe(d,p,u.tree,u.offset+a,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew Te(s.from,s.to)):[new Te(0,0)]:[new Te(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class bu{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Vg(n){return(e,t,i,s)=>new xu(e,n,t,i,s)}class Ao{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.ranges=r}}class wu{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Ls=new R({perNode:!0});class xu{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new V(i.type,i.children,i.positions,i.length,i.propValues.concat([[Ls,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[R.mounted.id]=new pu(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;tc.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(a)for(let c of a.mount.overlay){let f=c.from+a.pos,u=c.to+a.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=Su(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&s.fromnew Te(f.from-s.from,f.to-s.from)):null,s.tree,c)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else t&&(h=t.predicate(s))&&(h===!0&&(h=new Te(s.from,s.to)),h.fromnew Te(c.from-t.start,c.to-t.start)),t.target,a)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function Su(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Mo(n,e,t,i,s,r){if(e=e.to);i++);let o=s.children[i],l=o.buffer;function h(a,c,f,u,d){let p=a;for(;l[p+2]+r<=e.from;)p=l[p+3];let g=[],m=[];Mo(o,a,p,g,m,u);let y=l[p+1],k=l[p+2],A=y+r==e.from&&k+r==e.to&&l[p]==e.type.id;return g.push(A?e.toTree():h(p+4,l[p+3],o.set.types[l[p]],y,k-y)),m.push(y-u),Mo(o,l[p+3],c,g,m,u),new V(f,g,m,d)}s.children[i]=h(0,l.length,me.none,0,o.length);for(let a=0;a<=t;a++)n.childAfter(e.from)}class Do{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(U.IncludeAnonymous|U.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,U.IgnoreOverlays|U.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof V)t=t.children[0];else break}return!1}}class vu{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Ls))!==null&&t!==void 0?t:i.to,this.inner=new Do(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Ls))!==null&&e!==void 0?e:t.to,this.inner=new Do(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(R.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;h.tree==this.curFrag.tree&&s.push({frag:h,pos:r.from-h.offset,mount:o})}}}return s}}function Oo(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;h.to<=o||(t||(i=t=e.slice()),h.froml&&t.splice(r+1,0,new Te(l,h.to))):h.to>l?t[r--]=new Te(l,h.to):t.splice(r--,1))}}return i}function Cu(n,e,t,i){let s=0,r=0,o=!1,l=!1,h=-1e9,a=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(h,t),d=Math.min(c,f,i);unew Te(u.from+i,u.to+i)),f=Cu(e,c,h,a);for(let u=0,d=h;;u++){let p=u==f.length,g=p?a:f[u].from;if(g>d&&t.push(new Xe(d,g,s.tree,-o,r.from>=d||r.openStart,r.to<=g||r.openEnd)),p)break;d=f[u].to}}else t.push(new Xe(h,a,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let Au=0;class ze{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=Au++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new ze([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new fn;return t=>t.modified.indexOf(e)>-1?t:fn.get(t.base||t,t.modified.concat(e).sort((i,s)=>i.id-s.id))}}let Mu=0;class fn{constructor(){this.instances=[],this.id=Mu++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Du(t,l.modified));if(i)return i;let s=[],r=new ze(s,e,t);for(let l of t)l.instances.push(r);let o=Ou(t);for(let l of e.set)if(!l.modified.length)for(let h of o)s.push(fn.get(l,h));return r}}function Du(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function Ou(n){let e=[[]];for(let t=0;ti.length-t.length)}function Tu(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let h=r.length-1,a=r[h];if(!a)throw new RangeError("Invalid path: "+s);let c=new un(i,o,h>0?r.slice(0,h):null);e[a]=c.sort(e[a])}}return Rh.add(e)}const Rh=new R;class un{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let h of l.set){let a=t[h.id];if(a){o=o?o+" "+a:a;break}}return o},scope:i}}function Bu(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Pu(n,e,t,i=0,s=n.length){let r=new Ru(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Ru{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:h}=e;if(l>=i||h<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let a=s,c=Lu(e)||un.empty,f=Bu(r,c.tags);if(f&&(a&&(a+=" "),a+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(e.from,a),c.opaque)return;let u=e.tree&&e.tree.prop(R.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),p=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),g=e.firstChild();for(let m=0,y=l;;m++){let k=m=A||!e.nextSibling())););if(!k||A>i)break;y=k.to+l,y>t&&(this.highlightRange(d.cursor(),Math.max(t,k.from+l),Math.min(i,y),s,p),this.startSpan(y,a))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),a)}while(e.nextSibling());e.parent()}}}function Lu(n){let e=n.type.prop(Rh);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const w=ze.define,Vi=w(),Ze=w(),Bo=w(Ze),Po=w(Ze),et=w(),Wi=w(et),Un=w(et),He=w(),ut=w(He),Ve=w(),We=w(),Es=w(),Yt=w(Es),Hi=w(),C={comment:Vi,lineComment:w(Vi),blockComment:w(Vi),docComment:w(Vi),name:Ze,variableName:w(Ze),typeName:Bo,tagName:w(Bo),propertyName:Po,attributeName:w(Po),className:w(Ze),labelName:w(Ze),namespace:w(Ze),macroName:w(Ze),literal:et,string:Wi,docString:w(Wi),character:w(Wi),attributeValue:w(Wi),number:Un,integer:w(Un),float:w(Un),bool:w(et),regexp:w(et),escape:w(et),color:w(et),url:w(et),keyword:Ve,self:w(Ve),null:w(Ve),atom:w(Ve),unit:w(Ve),modifier:w(Ve),operatorKeyword:w(Ve),controlKeyword:w(Ve),definitionKeyword:w(Ve),moduleKeyword:w(Ve),operator:We,derefOperator:w(We),arithmeticOperator:w(We),logicOperator:w(We),bitwiseOperator:w(We),compareOperator:w(We),updateOperator:w(We),definitionOperator:w(We),typeOperator:w(We),controlOperator:w(We),punctuation:Es,separator:w(Es),bracket:Yt,angleBracket:w(Yt),squareBracket:w(Yt),paren:w(Yt),brace:w(Yt),content:He,heading:ut,heading1:w(ut),heading2:w(ut),heading3:w(ut),heading4:w(ut),heading5:w(ut),heading6:w(ut),contentSeparator:w(He),list:w(He),quote:w(He),emphasis:w(He),strong:w(He),link:w(He),monospace:w(He),strikethrough:w(He),inserted:w(),deleted:w(),changed:w(),invalid:w(),meta:Hi,documentMeta:w(Hi),annotation:w(Hi),processingInstruction:w(Hi),definition:ze.defineModifier(),constant:ze.defineModifier(),function:ze.defineModifier(),standard:ze.defineModifier(),local:ze.defineModifier(),special:ze.defineModifier()};Lh([{tag:C.link,class:"tok-link"},{tag:C.heading,class:"tok-heading"},{tag:C.emphasis,class:"tok-emphasis"},{tag:C.strong,class:"tok-strong"},{tag:C.keyword,class:"tok-keyword"},{tag:C.atom,class:"tok-atom"},{tag:C.bool,class:"tok-bool"},{tag:C.url,class:"tok-url"},{tag:C.labelName,class:"tok-labelName"},{tag:C.inserted,class:"tok-inserted"},{tag:C.deleted,class:"tok-deleted"},{tag:C.literal,class:"tok-literal"},{tag:C.string,class:"tok-string"},{tag:C.number,class:"tok-number"},{tag:[C.regexp,C.escape,C.special(C.string)],class:"tok-string2"},{tag:C.variableName,class:"tok-variableName"},{tag:C.local(C.variableName),class:"tok-variableName tok-local"},{tag:C.definition(C.variableName),class:"tok-variableName tok-definition"},{tag:C.special(C.variableName),class:"tok-variableName2"},{tag:C.definition(C.propertyName),class:"tok-propertyName tok-definition"},{tag:C.typeName,class:"tok-typeName"},{tag:C.namespace,class:"tok-namespace"},{tag:C.className,class:"tok-className"},{tag:C.macroName,class:"tok-macroName"},{tag:C.propertyName,class:"tok-propertyName"},{tag:C.operator,class:"tok-operator"},{tag:C.comment,class:"tok-comment"},{tag:C.meta,class:"tok-meta"},{tag:C.invalid,class:"tok-invalid"},{tag:C.punctuation,class:"tok-punctuation"}]);var Gn;const gt=new R;function Eh(n){return D.define({combine:n?e=>e.concat(n):void 0})}const Eu=new R;class Be{constructor(e,t,i=[],s=""){this.data=e,this.name=s,N.prototype.hasOwnProperty("tree")||Object.defineProperty(N.prototype,"tree",{get(){return ye(this)}}),this.parser=t,this.extension=[Kt.of(this),N.languageData.of((r,o,l)=>{let h=Ro(r,o,l),a=h.type.prop(gt);if(!a)return[];let c=r.facet(a),f=h.type.prop(Eu);if(f){let u=h.resolve(o-h.from,l);for(let d of f)if(d.test(u,r)){let p=r.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return Ro(e,t,i).type.prop(gt)==this.data}findRegions(e){let t=e.facet(Kt);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(gt)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(R.mounted);if(l){if(l.tree.prop(gt)==this.data){if(l.overlay)for(let h of l.overlay)i.push({from:h.from+o,to:h.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let h=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>h)return}}for(let h=0;hi.isTop?t:void 0)]}),e.name)}configure(e,t){return new Is(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ye(n){let e=n.field(Be.state,!1);return e?e.tree:V.empty}class Iu{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let Qt=null;class qt{constructor(e,t,i=[],s,r,o,l,h){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=h,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new qt(e,t,[],V.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Iu(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=V.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Xe.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Qt;Qt=this;try{return e()}finally{Qt=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Lo(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let h=[];if(e.iterChangedRanges((a,c,f,u)=>h.push({fromA:a,toA:c,fromB:f,toB:u})),i=Xe.applyChanges(i,h),s=V.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let a of this.skipped){let c=e.mapPos(a.from,1),f=e.mapPos(a.to,-1);ce.from&&(this.fragments=Lo(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ph{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let h=Qt;if(h){for(let a of s)h.tempSkipped.push(a);e&&(h.scheduleOn=h.scheduleOn?Promise.all([h.scheduleOn,e]):e)}return this.parsedPos=o,new V(me.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Qt}}function Lo(n,e,t){return Xe.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class $t{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new $t(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=qt.create(e.facet(Kt).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new $t(i)}}Be.state=be.define({create:$t.init,update(n,e){for(let t of e.effects)if(t.is(Be.setState))return t.value;return e.startState.facet(Kt)!=e.state.facet(Kt)?$t.init(e.state):n.apply(e)}});let Ih=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Ih=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Jn=typeof navigator<"u"&&(!((Gn=navigator.scheduling)===null||Gn===void 0)&&Gn.isInputPending)?()=>navigator.scheduling.isInputPending():null,Nu=ge.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Be.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Be.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Ih(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,h=r.context.work(()=>Jn&&Jn()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(h||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Be.setState.of(new $t(r.context))})),this.chunkBudget>0&&!(h&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ee(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Kt=D.define({combine(n){return n.length?n[0]:null},enables:n=>[Be.state,Nu,O.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Hg{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Nh=D.define(),Dn=D.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function vt(n){let e=n.facet(Dn);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function dn(n,e){let t="",i=n.tabSize,s=n.facet(Dn)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return wi(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Fu=new R;function Vu(n,e,t){return Vh(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function Wu(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function Hu(n){let e=n.type.prop(Fu);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(R.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Wh(o,!0,1,void 0,r&&!Wu(o)?s.from:void 0)}return n.parent==null?zu:null}function Vh(n,e,t){for(;n;n=n.parent){let i=Hu(n);if(i)return i(or.create(t,e,n))}return null}function zu(){return 0}class or extends On{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new or(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(qu(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?Vh(e,this.pos,this.base):0}}function qu(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function $u(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let h=e.childAfter(l);if(!h||h==i)return null;if(!h.type.isSkipped)return h.fromWh(i,e,t,n)}function Wh(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,h=e?$u(n):null;return h?l?n.column(h.from):n.column(h.to):n.baseIndent+(l?0:n.unit*t)}const qg=n=>n.baseIndent;function $g({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Kg=new R;function jg(n){let e=n.firstChild,t=n.lastChild;return e&&e.tol.prop(gt)==o.data:o?l=>l==o:void 0,this.style=Lh(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new lt(i):null,this.themeType=t.themeType}static define(e,t){return new Tn(e,t||{})}}const Ns=D.define(),Hh=D.define({combine(n){return n.length?[n[0]]:null}});function _n(n){let e=n.facet(Ns);return e.length?e:n.facet(Hh)}function Ug(n,e){let t=[ju],i;return n instanceof Tn&&(n.module&&t.push(O.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Hh.of(n)):i?t.push(Ns.computeN([O.darkTheme],s=>s.facet(O.darkTheme)==(i=="dark")?[n]:[])):t.push(Ns.of(n)),t}class Ku{constructor(e){this.markCache=Object.create(null),this.tree=ye(e.state),this.decorations=this.buildDeco(e,_n(e.state))}update(e){let t=ye(e.state),i=_n(e.state),s=i!=_n(e.startState);t.length{i.add(o,l,this.markCache[h]||(this.markCache[h]=B.mark({class:h})))},s,r);return i.finish()}}const ju=Ct.high(ge.fromClass(Ku,{decorations:n=>n.decorations})),Gg=Tn.define([{tag:C.meta,color:"#404740"},{tag:C.link,textDecoration:"underline"},{tag:C.heading,textDecoration:"underline",fontWeight:"bold"},{tag:C.emphasis,fontStyle:"italic"},{tag:C.strong,fontWeight:"bold"},{tag:C.strikethrough,textDecoration:"line-through"},{tag:C.keyword,color:"#708"},{tag:[C.atom,C.bool,C.url,C.contentSeparator,C.labelName],color:"#219"},{tag:[C.literal,C.inserted],color:"#164"},{tag:[C.string,C.deleted],color:"#a11"},{tag:[C.regexp,C.escape,C.special(C.string)],color:"#e40"},{tag:C.definition(C.variableName),color:"#00f"},{tag:C.local(C.variableName),color:"#30a"},{tag:[C.typeName,C.namespace],color:"#085"},{tag:C.className,color:"#167"},{tag:[C.special(C.variableName),C.macroName],color:"#256"},{tag:C.definition(C.propertyName),color:"#00c"},{tag:C.comment,color:"#940"},{tag:C.invalid,color:"#f00"}]),Uu=O.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),zh=1e4,qh="()[]{}",$h=D.define({combine(n){return At(n,{afterCursor:!0,brackets:qh,maxScanDistance:zh,renderMatch:_u})}}),Gu=B.mark({class:"cm-matchingBracket"}),Ju=B.mark({class:"cm-nonmatchingBracket"});function _u(n){let e=[],t=n.matched?Gu:Ju;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Xu=be.define({create(){return B.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet($h);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=Ke(e.state,s.head,-1,i)||s.head>0&&Ke(e.state,s.head-1,1,i)||i.afterCursor&&(Ke(e.state,s.head,1,i)||s.headO.decorations.from(n)}),Yu=[Xu,Uu];function Jg(n={}){return[$h.of(n),Yu]}const Qu=new R;function Fs(n,e,t){let i=n.prop(e<0?R.openedBy:R.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Vs(n){let e=n.type.prop(Qu);return e?e(n.node):n}function Ke(n,e,t,i={}){let s=i.maxScanDistance||zh,r=i.brackets||qh,o=ye(n),l=o.resolveInner(e,t);for(let h=l;h;h=h.parent){let a=Fs(h.type,t,r);if(a&&h.from0?e>=c.from&&ec.from&&e<=c.to))return Zu(n,e,t,h,c,a,r)}}return ed(n,e,t,o,l.type,s,r)}function Zu(n,e,t,i,s,r,o){let l=i.parent,h={from:s.from,to:s.to},a=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(a==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let a={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let p=e+u*t;for(let g=t>0?0:d.length-1,m=t>0?d.length:-1;g!=m;g+=t){let y=o.indexOf(d[g]);if(!(y<0||i.resolveInner(p+g,1).type!=s))if(y%2==0==t>0)f++;else{if(f==1)return{start:a,end:{from:p+g,to:p+g+1},matched:y>>1==h>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:a,matched:!1}:null}function Eo(n,e,t,i=0,s=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let r=s;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,r=this.string.substr(this.pos,e.length);return s(r)==s(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function td(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||id,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||hr}}function id(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}const Io=new WeakMap;class jh extends Be{constructor(e){let t=Eh(e.languageData),i=td(e),s,r=new class extends Ph{createParse(o,l,h){return new sd(s,o,l,h)}};super(t,r,[Nh.of((o,l)=>this.getIndent(o,l))],e.name),this.topNode=ld(t),s=this,this.streamParser=i,this.stateAfter=new R({perNode:!0}),this.tokenTable=e.tokenTable?new _h(i.tokenTable):od}static define(e){return new jh(e)}getIndent(e,t){let i=ye(e.state),s=i.resolve(t);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let r,{overrideIndentation:o}=e.options;o&&(r=Io.get(e.state),r!=null&&r1e4)return null;for(;h=i&&t+e.length<=s&&e.prop(n.stateAfter);if(r)return{state:n.streamParser.copyState(r),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],h=t+e.positions[o],a=l instanceof V&&h=e.length)return e;!s&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],h;if(ot&&lr(n,s.tree,0-s.offset,t,o),h;if(l&&(h=Uh(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:h}}return{state:n.streamParser.startState(i?vt(i):4),tree:V.empty}}class sd{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=qt.get(),o=s[0].from,{state:l,tree:h}=nd(e,i,o,r==null?void 0:r.state);this.state=l,this.parsedPos=this.chunkStart=o+h.length;for(let a=0;a=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` +`;this.styleTag.textContent=r}}}var lt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ai={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Lr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),pc=typeof navigator<"u"&&/Mac/.test(navigator.platform),gc=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),mc=pc||Lr&&+Lr[1]<57;for(var se=0;se<10;se++)lt[48+se]=lt[96+se]=String(se);for(var se=1;se<=24;se++)lt[se+111]="F"+se;for(var se=65;se<=90;se++)lt[se]=String.fromCharCode(se+32),ai[se]=String.fromCharCode(se);for(var Fn in lt)ai.hasOwnProperty(Fn)||(ai[Fn]=lt[Fn]);function yc(n){var e=mc&&(n.ctrlKey||n.altKey||n.metaKey)||gc&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ai:lt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function en(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Vt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function bc(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Gi(n,e){if(!e.anchorNode)return!1;try{return Vt(n,e.anchorNode)}catch{return!1}}function Wt(n){return n.nodeType==3?Ht(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function tn(n,e,t,i){return t?Er(n,e,t,i,-1)||Er(n,e,t,i,1):!1}function nn(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Er(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:ci(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=nn(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?ci(n):0}else return!1}}function ci(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function kn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function wc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function xc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView||window;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=wc(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class vc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Dt=null;function Cl(n){if(n.setActive)return n.setActive();if(Dt)return n.focus(Dt);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Dt==null?{get preventScroll(){return Dt={preventScroll:!0},!0}}:void 0),!Dt){Dt=!1;for(let t=0;tt)return f.domBoundsAround(e,t,a);if(u>=e&&s==-1&&(s=h,r=a),a>t&&f.dom.parentNode==this.dom){o=h,l=c;break}c=u,a=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),t.dirty&1)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Xs){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Dl(n,e,t,i,s,r,o,l,h){let{children:a}=n,c=a.length?a[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,h))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var M={mac:Wr||/Mac/.test(De.platform),windows:/Win/.test(De.platform),linux:/Linux|X11/.test(De.platform),ie:Cn,ie_version:Tl?ps.documentMode||6:ms?+ms[1]:gs?+gs[1]:0,gecko:Fr,gecko_version:Fr?+(/Firefox\/(\d+)/.exec(De.userAgent)||[0,0])[1]:0,chrome:!!Vn,chrome_version:Vn?+Vn[1]:0,ios:Wr,android:/Android\b/.test(De.userAgent),webkit:Vr,safari:Bl,webkit_version:Vr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:ps.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const Ac=256;class wt extends W{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return i&&(!(i instanceof wt)||this.length-(t-e)+i.length>Ac)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new wt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new re(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return ys(this.dom,e,t)}}class Ye extends W{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(Al(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Ye&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=h,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Ye(this.mark,t,o)}domAtPos(e){return Il(this,e)}coordsAt(e,t){return Fl(this,e,t)}}function ys(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?M.chrome||M.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return M.safari&&!o&&h.width==0&&(h=Array.prototype.find.call(l,a=>a.width)||h),o?kn(h,o<0):h||null}class nt extends W{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||nt)(e,t,i)}split(e){let t=nt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof nt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?re.before(this.dom):re.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;for(let o=e>0?s.length-1:0;r=s[o],!(e>0?o==0:o==s.length-1||r.top0?-1:1);return this.length?r:kn(r,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Pl extends nt{domAtPos(e){let{topView:t,text:i}=this.widget;return t?bs(e,0,t,i,this.length-t.length,(s,r)=>s.domAtPos(r),(s,r)=>new re(s,Math.min(r,s.nodeValue.length))):new re(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:s}=this.widget;return i?Ll(e,t,i,s,this.length-i.length):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:s}=this.widget;return i?bs(e,t,i,s,this.length-i.length,(r,o,l)=>r.coordsAt(o,l),(r,o,l)=>ys(r,o,l)):ys(s,e,t)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function bs(n,e,t,i,s,r,o){if(t instanceof Ye){for(let l=t.dom.firstChild;l;l=l.nextSibling){let h=W.get(l);if(h){let a=Vt(l,i),c=h.length+(a?s:0);if(n0?re.before(this.dom):re.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return I.empty}get isHidden(){return!0}}wt.prototype.children=nt.prototype.children=zt.prototype.children=Xs;function Il(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Ye&&s.length&&(i=s[s.length-1])instanceof Ye&&i.mark.eq(e.mark)?Nl(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function Fl(n,e,t){let i=null,s=-1,r=null,o=-1;function l(a,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):(!r||r.isHidden&&t>0)&&(p>c||u==p&&d.getSide()>0)?(r=d,o=c-u):(u0?3e8:-4e8:t>0?1e8:-1e8,new xt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Vl(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new xt(e,i,s,t,e.widget||null,!0)}static line(e){return new xi(e)}static set(e,t=!1){return K.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}B.none=K.empty;class An extends B{constructor(e){let{start:t,end:i}=Vl(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof An&&this.tagName==e.tagName&&this.class==e.class&&Ys(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}An.prototype.point=!1;class xi extends B{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof xi&&this.spec.class==e.spec.class&&Ys(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}xi.prototype.mapMode=ce.TrackBefore;xi.prototype.point=!0;class xt extends B{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?ce.TrackBefore:ce.TrackAfter:ce.TrackDel}get type(){return this.startSide=5}eq(e){return e instanceof xt&&Dc(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}xt.prototype.point=!0;function Vl(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function Dc(n,e){return n==e||!!(n&&e&&n.compare(e))}function Ss(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class de extends W{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof de))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),Ol(this,e,t,i?i.children:[],r,o),!0}split(e){let t=new de;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ys(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Nl(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=ws(t,this.attrs||{})),i&&(this.attrs=ws({class:i},this.attrs||{}))}domAtPos(e){return Il(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var i;this.dom?this.dirty&4&&(Al(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(xs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&W.get(s)instanceof Ye;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=W.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!M.ios||!this.children.some(r=>r instanceof wt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof wt)||/[^ -~]/.test(i.text))return null;let s=Wt(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=Fl(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof de)return r;if(o>t)break}s=o+r.breakAfter}return null}}class mt extends W{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof mt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Di(new wt(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof xt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof xt)if(i.block){let{type:h}=i;h==X.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new mt(i.widget||new Hr("div"),l,h))}else{let h=nt.create(i.widget||new Hr("span"),l,l?0:i.startSide),a=this.atCursorPos&&!h.isEditable&&r<=s.length&&(e0),c=!h.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!a&&!h.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),a&&(f.append(Di(new zt(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Di(h,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Qs(e,t,i,r);return o.openEnd=K.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Di(n,e){for(let t of e)n=new Ye(t,[n],n.length);return n}class Hr extends ht{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Wl=D.define(),Hl=D.define(),zl=D.define(),ql=D.define(),vs=D.define(),$l=D.define(),Kl=D.define(),jl=D.define({combine:n=>n.some(e=>e)}),Ul=D.define({combine:n=>n.some(e=>e)});class sn{constructor(e,t="nearest",i="nearest",s=5,r=5){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r}map(e){return e.empty?this:new sn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const zr=E.define({map:(n,e)=>n.map(e)});function Ee(n,e,t){let i=n.facet(ql);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Mn=D.define({combine:n=>n.length?n[0]:!0});let Oc=0;const ti=D.define();class ge{constructor(e,t,i,s){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=s(this)}static define(e,t){const{eventHandlers:i,provide:s,decorations:r}=t||{};return new ge(Oc++,e,i,o=>{let l=[ti.of(o)];return r&&l.push(fi.of(h=>{let a=h.plugin(o);return a?r(a):B.none})),s&&l.push(s(o)),l})}static fromClass(e,t){return ge.define(i=>new e(i),t)}}class Wn{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Ee(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ee(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Ee(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Gl=D.define(),Zs=D.define(),fi=D.define(),Jl=D.define(),_l=D.define(),ii=D.define();class Ge{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Ge(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!h)return i;new Ge(h.fromA,h.toA,h.fromB,h.toB).addToSet(i),o=h.toA,l=h.toB}}}class rn{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Z.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,h)=>s.push(new Ge(r,o,l,h))),this.changedRanges=s}static create(e,t,i){return new rn(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var J=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(J||(J={}));const ks=J.LTR,Tc=J.RTL;function Xl(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}const $=[];function Ec(n,e){let t=n.length,i=e==ks?1:2,s=e==ks?2:1;if(!n||i==1&&!Lc.test(n))return Yl(t);for(let o=0,l=i,h=i;o=0;u-=3)if(Fe[u+1]==-c){let d=Fe[u+2],p=d&2?i:d&4?d&1?s:i:0;p&&($[o]=$[Fe[u]]=p),l=u;break}}else{if(Fe.length==189)break;Fe[l++]=o,Fe[l++]=a,Fe[l++]=h}else if((f=$[o])==2||f==1){let u=f==i;h=u?0:1;for(let d=l-3;d>=0;d-=3){let p=Fe[d+2];if(p&2)break;if(u)Fe[d+2]|=2;else{if(p&4)break;Fe[d+2]|=4}}}for(let o=0;ol;){let c=a,f=$[--a]!=2;for(;a>l&&f==($[a-1]!=2);)a--;r.push(new It(a,c,f?2:1))}else r.push(new It(l,o,0))}else for(let o=0;o1)for(let h of this.points)h.node==e&&h.pos>this.text.length&&(h.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=W.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function qr(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class $r{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Kr extends W{constructor(e){super(),this.view=e,this.compositionDeco=B.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new de],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ge(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:o,toA:l})=>lthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=B.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=Fc(this.view,e.changes)),(M.ie||M.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,s=this.updateDeco(),r=zc(i,s,e.changes);return t=Ge.extendWithRanges(t,r),this.dirty==0&&t.length==0?!1:(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=M.chrome||M.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,r),this.dirty=0,r&&(r.written||i.selectionRange.focusNode!=r.node)&&(this.forceSelection=!0),this.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to=0?e[s]:null;if(!r)break;let{fromA:o,toA:l,fromB:h,toB:a}=r,{content:c,breakAtStart:f,openStart:u,openEnd:d}=Qs.build(this.view.state.doc,h,a,this.decorations,this.dynamicDecorationMap),{i:p,off:g}=i.findPos(l,1),{i:m,off:y}=i.findPos(o,-1);Dl(this,m,y,p,g,c,f,u,d)}}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Gi(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,h=this.domAtPos(l.anchor),a=l.empty?h:this.domAtPos(l.head);if(M.gecko&&l.empty&&!this.compositionDeco.size&&Nc(h)){let f=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(f,h.node.childNodes[h.offset]||null)),h=a=new re(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||!tn(h.node,h.offset,c.anchorNode,c.anchorOffset)||!tn(a.node,a.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{M.android&&M.chrome&&this.dom.contains(c.focusNode)&&qc(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=en(this.view.root);if(f)if(l.empty){if(M.gecko){let u=Wc(h.node,h.offset);if(u&&u!=3){let d=th(h.node,h.offset,u==1?1:-1);d&&(h=new re(d,u==1?0:d.nodeValue.length))}}f.collapse(h.node,h.offset),l.bidiLevel!=null&&c.cursorBidiLevel!=null&&(c.cursorBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(h.node,h.offset);try{f.extend(a.node,a.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([h,a]=[a,h]),u.setEnd(a.node,a.offset),u.setStart(h.node,h.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,a)),this.impreciseAnchor=h.precise?null:new re(c.anchorNode,c.anchorOffset),this.impreciseHead=a.precise?null:new re(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,i=en(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=de.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let h=this.coordsAt(t.head,-1),a=this.coordsAt(t.head,1);if(!h||!a||h.bottom>a.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}nearest(e){for(let t=e;t;){let i=W.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;to||e==o&&r.type!=X.WidgetBefore&&r.type!=X.WidgetAfter&&(!s||t==2||this.children[s-1].breakAfter||this.children[s-1].type==X.WidgetBefore&&t>-2))return r.coordsAt(e-o,t);i=o}}measureVisibleLineHeights(e){let t=[],{from:i,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,h=this.view.textDirection==J.LTR;for(let a=0,c=0;cs)break;if(a>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,g=p?Wt(p):[];if(g.length){let m=g[g.length-1],y=h?m.right-d.left:d.right-m.left;y>l&&(l=y,this.minWidth=r,this.minWidthFrom=a,this.minWidthTo=u)}}}a=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?J.RTL:J.LTR}measureTextSize(){for(let r of this.children)if(r instanceof de){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Wt(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Ml(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=t.lineBlockAt(o).bottom-t.lineBlockAt(i).top;e.push(B.replace({widget:new jr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return B.set(e)}updateDeco(){let e=this.view.state.facet(fi).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;tt.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=0,o=0,l=0,h=0;for(let c of this.view.state.facet(_l).map(f=>f(this.view)))if(c){let{left:f,right:u,top:d,bottom:p}=c;f!=null&&(r=Math.max(r,f)),u!=null&&(o=Math.max(o,u)),d!=null&&(l=Math.max(l,d)),p!=null&&(h=Math.max(h,p))}let a={left:i.left-r,top:i.top-l,right:i.right+o,bottom:i.bottom+h};xc(this.view.scrollDOM,a,t.head-1)return B.none;if(h-l0)i=i.childNodes[s-1],s=ci(i);else break}if(t>=0)for(let i=n,s=e;;){if(i.nodeType==3)return i;if(i.nodeType==1&&s=0)i=i.childNodes[s],s=0;else break}return null}function Wc(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e0;){let a=ue(s.text,o,!1);if(i(s.text.slice(a,o))!=h)break;o=a}for(;ln?e.left-n:Math.max(0,n-e.right)}function jc(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Hn(n,e){return n.tope.top+1}function Ur(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function As(n,e,t){let i,s,r,o,l=!1,h,a,c,f;for(let p=n.firstChild;p;p=p.nextSibling){let g=Wt(p);for(let m=0;mA||o==A&&r>v){i=p,s=y,r=v,o=A;let x=A?t0?m0)}v==0?t>y.bottom&&(!c||c.bottomy.top)&&(a=p,f=y):c&&Hn(c,y)?c=Gr(c,y.bottom):f&&Hn(f,y)&&(f=Ur(f,y.top))}}if(c&&c.bottom>=t?(i=h,s=c):f&&f.top<=t&&(i=a,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Jr(i,u,t);if(l&&i.contentEditable!="false")return As(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Jr(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((M.chrome||M.gecko)&&Ht(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function ih(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,h,{docHeight:a}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>a)return n.state.doc.length;for(let x=n.defaultLineHeight/2,S=!1;h=n.elementAtHeight(u),h.type!=X.Text;)for(;u=i>0?h.bottom+x:h.top-x,!(u>=0&&u<=a);){if(S)return t?null:0;S=!0,i=-i}f=l+u;let d=h.from;if(dn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:_r(n,o,h,c,f);let p=n.dom.ownerDocument,g=n.root.elementFromPoint?n.root:p,m=g.elementFromPoint(c,f);m&&!n.contentDOM.contains(m)&&(m=null),m||(c=Math.max(o.left+1,Math.min(o.right-1,c)),m=g.elementFromPoint(c,f),m&&!n.contentDOM.contains(m)&&(m=null));let y,v=-1;if(m&&((s=n.docView.nearest(m))===null||s===void 0?void 0:s.isEditable)!=!1){if(p.caretPositionFromPoint){let x=p.caretPositionFromPoint(c,f);x&&({offsetNode:y,offset:v}=x)}else if(p.caretRangeFromPoint){let x=p.caretRangeFromPoint(c,f);x&&({startContainer:y,startOffset:v}=x,(!n.contentDOM.contains(y)||M.safari&&Uc(y,v,c)||M.chrome&&Gc(y,v,c))&&(y=void 0))}}if(!y||!n.docView.dom.contains(y)){let x=de.find(n.docView,d);if(!x)return u>h.top+h.height/2?h.to:h.from;({node:y,offset:v}=As(x.dom,c,f))}let A=n.docView.nearest(y);if(!A)return null;if(A.isWidget&&((r=A.dom)===null||r===void 0?void 0:r.nodeType)==1){let x=A.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=Math.floor((s-t.top)/n.defaultLineHeight);r+=l*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+fs(o,r,n.state.tabSize)}function Uc(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Ht(n,i-1,i).getBoundingClientRect().left>t}function Gc(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Ht(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function Jc(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=!i||!n.lineWrapping?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let h=n.dom.getBoundingClientRect(),a=n.textDirectionAt(s.from),c=n.posAtCoords({x:t==(a==J.LTR)?h.right-1:h.left+1,y:(r.top+r.bottom)/2});if(c!=null)return b.cursor(c,t?-1:1)}let o=de.find(n.docView,e.head),l=o?t?o.posAtEnd:o.posAtStart:t?s.to:s.from;return b.cursor(l,t?-1:1)}function Xr(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,h=null;;){let a=Ic(s,r,o,l,t),c=Ql;if(!a){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=b.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function _c(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==q.Space&&(s=o),s==o}}function Xc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return b.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i??n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=ih(n,{x:f,y:p},!1,r);if(ph.bottom||(r<0?gs))return b.cursor(g,e.assoc,void 0,o)}}function zn(n,e,t){let i=n.state.facet(Jl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.fromt.from?b.cursor(o,1):b.cursor(l,-1),s=!0)});if(!s)return t}}class Yc{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;let t=(i,s)=>{this.ignoreDuringComposition(s)||s.type=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(s.type,e,s)?s.preventDefault():i(e,s))};for(let i in _){let s=_[i];e.contentDOM.addEventListener(i,r=>{Yr(e,r)&&t(s,r)},Ms[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(_.mousedown,i),!i.defaultPrevented&&i.button==2)){let s=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=s,200)}}),e.scrollDOM.addEventListener("drop",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(_.drop,i)}),M.chrome&&M.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,M.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{Yr(e,l)&&this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Ee(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Ee(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()s.keyCode==t.keyCode))&&!t.ctrlKey||Qc.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=i||t,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,Et(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:M.safari&&!M.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const nh=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Qc="dthko",sh=[16,17,18,20,91,92,224,225],Oi=6;function Ti(n){return Math.max(0,n)*.7+8}class Zc{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=Sc(e.contentDOM);let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(N.allowMultipleSelections)&&ef(e,t),this.dragMove=tf(e,t),this.dragging=nf(e,t)&&hh(t)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=e);let i=0,s=0,r=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=r.left+Oi?i=-Ti(r.left-e.clientX):e.clientX>=r.right-Oi&&(i=Ti(e.clientX-r.right)),e.clientY<=r.top+Oi?s=-Ti(r.top-e.clientY):e.clientY>=r.bottom-Oi&&(s=Ti(e.clientY-r.bottom)),this.setScrollSpeed(i,s)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!t.eq(this.view.state.selection)||t.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function ef(n,e){let t=n.state.facet(Wl);return t.length?t[0](e):M.mac?e.metaKey:e.ctrlKey}function tf(n,e){let t=n.state.facet(Hl);return t.length?t[0](e):M.mac?!e.altKey:!e.ctrlKey}function nf(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=en(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Yr(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=W.get(t))&&i.ignoreEvent(e))return!1;return!0}const _=Object.create(null),Ms=Object.create(null),rh=M.ie&&M.ie_version<15||M.ios&&M.webkit_version<604;function sf(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),oh(n,t.value)},50)}function oh(n,e){let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(Ds!=null&&t.selection.ranges.every(h=>h.empty)&&Ds==r.toString()){let h=-1;i=t.changeByRange(a=>{let c=t.doc.lineAt(a.from);if(c.from==h)return{range:a};h=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:b.cursor(a.from+f.length)}})}else o?i=t.changeByRange(h=>{let a=r.line(s++);return{changes:{from:h.from,to:h.to,insert:a.text},range:b.cursor(h.from+a.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}_.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27&&(n.inputState.lastEscPress=Date.now())};_.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};_.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Ms.touchstart=Ms.touchmove={passive:!0};_.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return;let t=null;for(let i of n.state.facet(zl))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=lf(n,e)),t){let i=n.root.activeElement!=n.contentDOM;n.inputState.startMouseSelection(new Zc(n,e,t,i)),i&&n.observer.ignore(()=>Cl(n.contentDOM)),n.inputState.mouseSelection&&n.inputState.mouseSelection.start(e)}};function Qr(n,e,t,i){if(i==1)return b.cursor(e,t);if(i==2)return $c(n.state,e,t);{let s=de.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return ln>=e.top&&n<=e.bottom,Zr=(n,e,t)=>lh(e,t)&&n>=t.left&&n<=t.right;function rf(n,e,t,i){let s=de.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Zr(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Zr(t,i,l)?1:o&&lh(i,o)?-1:1}function eo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:rf(n,t,e.clientX,e.clientY)}}const of=M.ie&&M.ie_version<=11;let to=null,io=0,no=0;function hh(n){if(!of)return n.detail;let e=to,t=no;return to=n,no=Date.now(),io=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(io+1)%3:1}function lf(n,e){let t=eo(n,e),i=hh(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let h=eo(n,r),a,c=Qr(n,h.pos,h.bias,i);if(t.pos!=h.pos&&!o){let f=Qr(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=u1&&(a=hf(s,h.pos))?a:l?s.addRange(c):b.create([c])}}}function hf(n,e){for(let t=0;t=e)return b.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}_.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function so(n,e,t,i){if(!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=n.inputState,o=i&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,l={from:s,insert:t},h=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}_.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),s=0,r=()=>{++s==t.length&&so(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}}else so(n,e,e.dataTransfer.getData("Text"),!0)};_.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=rh?null:e.clipboardData;t?(oh(n,t.getData("text/plain")||t.getData("text/uri-text")),e.preventDefault()):sf(n)};function af(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function cf(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let Ds=null;_.copy=_.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=cf(n.state);if(!t&&!s)return;Ds=s?t:null;let r=rh?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",t)):af(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};const ah=Qe.define();function ch(n,e){let t=[];for(let i of n.facet(Kl)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:ah.of(!0)}):null}function fh(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=ch(n.state,e);t?n.dispatch(t):n.update([])}},10)}_.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),fh(n)};_.blur=n=>{n.observer.clearSelectionRange(),fh(n)};_.compositionstart=_.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0)};_.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,M.chrome&&M.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.compositionDeco.size&&n.update([])},50)};_.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};_.beforeinput=(n,e)=>{var t;let i;if(M.chrome&&M.android&&(i=nh.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const ro=["pre-wrap","normal","pre-line","break-spaces"];class ff{constructor(e){this.lineWrapping=e,this.doc=I.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ro.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,h=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,h){this.heightSamples={};for(let a=0;a0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Ji&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return pe.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:h,toA:a,fromB:c,toB:f}=s[l],u=r.lineAt(h,z.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=a?u:r.lineAt(a,z.ByPosNoHeight,i,0,0);for(f+=d.to-a,a=d.to;l>0&&u.from<=s[l-1].toA;)h=s[l-1].fromA,c=s[l-1].fromB,l--,hr*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(e,s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ae extends uh{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Ae||s instanceof ie&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ie?s=new Ae(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):pe.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(e,s.heights[s.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ie extends pe{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let h=Math.min(this.height,e.lineHeight*r);o=h/r,this.length>r+1&&(l=(this.height-h)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:h}=this.heightMetrics(t,s);if(t.lineWrapping){let a=s+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),c=t.doc.lineAt(a),f=l+c.length*h,u=Math.max(i,e-f/2);return new _e(c.from,c.length,u,f,null,null)}else{let a=Math.max(0,Math.min(o-r,Math.floor((e-i)/l))),{from:c,length:f}=t.doc.line(r+a);return new _e(c,f,i+l*a,l,null,null)}}lineAt(e,t,i,s,r){if(t==z.ByHeight)return this.blockAt(e,i,s,r);if(t==z.ByPosNoHeight){let{from:d,to:p}=i.doc.lineAt(e);return new _e(d,p-d,0,0,null,null)}let{firstLine:o,perLine:l,perChar:h}=this.heightMetrics(i,r),a=i.doc.lineAt(e),c=l+a.length*h,f=a.number-o,u=s+l*f+h*(a.from-r-f);return new _e(a.from,a.length,Math.max(s,Math.min(u,s+this.height-c)),c,null,null)}forEachLine(e,t,i,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:l,perLine:h,perChar:a}=this.heightMetrics(i,r);for(let c=e,f=s;c<=t;){let u=i.doc.lineAt(c);if(c==e){let p=u.number-l;f+=h*p+a*(e-r-p)}let d=h+a*u.length;o(new _e(u.from,u.length,f,d,null,null)),f+=d,c=u.to+1}}replace(e,t,i){let s=this.length-t;if(s>0){let r=i[i.length-1];r instanceof ie?i[i.length-1]=new ie(r.length+s):i.push(null,new ie(s-1))}if(e>0){let r=i[0];r instanceof ie?i[0]=new ie(e+r.length):i.unshift(new ie(e-1),null)}return pe.of(i)}decomposeLeft(e,t){t.push(new ie(e-1),null)}decomposeRight(e,t){t.push(null,new ie(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),h=-1;for(s.from>t&&o.push(new ie(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];h==-1?h=f:Math.abs(f-h)>=Ji&&(h=-2);let u=new Ae(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new ie(r-l).updateHeight(e,l));let a=pe.of(o);return(h<0||Math.abs(a.height-this.height)>=Ji||Math.abs(h-this.heightMetrics(e,t).perLine)>=Ji)&&(e.heightChanged=!0),a}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class df extends pe{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return a;let c=t==z.ByPosNoHeight?z.ByPosNoHeight:z.ByPos;return h?a.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(a)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,h=r+this.left.length+this.break;if(this.break)e=h&&this.right.forEachLine(e,t,i,l,h,o);else{let a=this.lineAt(h,z.ByPos,i,s,r);e=e&&a.from<=t&&o(a),t>a.to&&this.right.forEachLine(a.to+1,t,i,l,h,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&oo(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?pe.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,h=null;return s&&s.from<=t+r.length&&s.more?h=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?h=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),h?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function oo(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ie&&(i=n[e+1])instanceof ie&&n.splice(e-1,3,new ie(t.length+1+i.length))}const pf=5;class er{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ae?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ae(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=pf)&&this.addLineDeco(s,r)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Ae(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ie(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ae)return e;let t=new Ae(0,-1);return this.nodes.push(t),t}addBlock(e){var t;this.enterLine();let i=(t=e.deco)===null||t===void 0?void 0:t.type;i==X.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,i!=X.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ae)&&!this.isCovered?this.nodes.push(new Ae(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),h=a==n.parentNode?u.bottom:Math.min(h,u.bottom)}a=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(a.nodeType==11)a=a.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,h)-(t.top+e)}}function bf(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class qn{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new ff(t),this.stateDeco=e.facet(fi).filter(i=>typeof i!="function"),this.heightMap=pe.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle.setDoc(e.doc),[new Ge(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=B.set(this.lineGaps.map(i=>i.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Bi(r,o))}}this.viewports=e.sort((i,s)=>i.from-s.from),this.scaler=this.heightMap.height<=7e6?ho:new vf(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:ni(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(fi).filter(a=>typeof a!="function");let s=e.changedRanges,r=Ge.extendWithRanges(s,gf(i,this.stateDeco,e?e.changes:Z.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2);let l=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let h=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),h&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Ul)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?J.RTL:J.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),h=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let a=0,c=0,f=parseInt(i.paddingTop)||0,u=parseInt(i.paddingBottom)||0;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,a|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(h=!0),this.editorWidth=e.scrollDOM.clientWidth,a|=8);let d=(this.printing?bf:yf)(t,this.paddingTop),p=d.top-this.pixelViewport.top,g=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(h=!0)),!this.inView&&!this.scrollTarget)return 0;let y=l.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,a|=8),h){let A=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(A)&&(o=!0),o||s.lineWrapping&&Math.abs(y-this.contentDOMWidth)>s.charWidth){let{lineHeight:x,charWidth:S,textHeight:k}=e.docView.measureTextSize();o=x>0&&s.refresh(r,x,S,k,y/S,A),o&&(e.docView.minWidth=0,a|=8)}p>0&&g>0?c=Math.max(p,g):p<0&&g<0&&(c=Math.min(p,g)),s.heightChanged=!1;for(let x of this.viewports){let S=x.from==this.viewport.from?A:e.docView.measureVisibleLineHeights(x);this.heightMap=(o?pe.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle,[new Ge(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new uf(x.from,S))}s.heightChanged&&(a|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return v&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(a&2||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,h=new Bi(s.lineAt(o-i*1e3,z.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,z.ByHeight,r,0,0).to);if(t){let{head:a}=t.range;if(ah.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(a,z.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&a=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=J.LTR&&!i)return[];let l=[],h=(a,c,f,u)=>{if(c-aa&&mm.from>=f.from&&m.to<=f.to&&Math.abs(m.from-a)m.fromy));if(!g){if(cm.from<=c&&m.to>=c)){let m=t.moveToLineBoundary(b.cursor(c),!1,!0).head;m>a&&(c=m)}g=new qn(a,c,this.gapSize(f,a,c,u))}l.push(g)};for(let a of this.viewportLines){if(a.lengtha.from&&h(a.from,u,a,c),dt.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];K.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ni(this.heightMap.lineAt(e,z.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return ni(this.heightMap.lineAt(this.scaler.fromDOM(e),z.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return ni(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Bi{constructor(e,t){this.from=e,this.to=t}}function xf(n,e,t){let i=[],s=n,r=0;return K.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function Ri(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function Sf(n,e){for(let t of n)if(e(t))return t}const ho={toDOM(n){return n},fromDOM(n){return n},scale:1};class vf{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:h})=>{let a=t.lineAt(l,z.ByPos,e,0,0).top,c=t.lineAt(h,z.ByPos,e,0,0).bottom;return s+=c-a,{from:l,to:h,top:a,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tni(s,e)),n.deco)}const Li=D.define({combine:n=>n.join(" ")}),Os=D.define({combine:n=>n.indexOf(!0)>-1}),Ts=ot.newName(),dh=ot.newName(),ph=ot.newName(),gh={"&light":"."+dh,"&dark":"."+ph};function Bs(n,e,t){return new ot(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const kf=Bs("."+Ts,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},gh);class Cf{constructor(e,t,i,s){this.typeOver=s,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:Mf(e),h=new Zl(l,e.state);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=Df(l,this.bounds.from)}else{let l=e.observer.selectionRange,h=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Vt(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),a=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Vt(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=b.single(a,h)}}}function mh(n,e){let t,{newSel:i}=e,s=n.state.selection.main;if(e.bounds){let{from:r,to:o}=e.bounds,l=s.from,h=null;(n.inputState.lastKeyCode===8&&n.inputState.lastKeyTime>Date.now()-100||M.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(M.mac||M.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}):M.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}),t){let r=n.state;if(M.ios&&n.inputState.flushIOSKey(n)||M.android&&(t.from==s.from&&t.to==s.to&&t.insert.length==1&&t.insert.lines==2&&Et(n.contentDOM,"Enter",13)||t.from==s.from-1&&t.to==s.to&&t.insert.length==0&&Et(n.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&t.insert.length==0&&Et(n.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();if(n.state.facet($l).some(a=>a(n,t.from,t.to,o)))return!0;n.inputState.composing>=0&&n.inputState.composing++;let l;if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&n.inputState.composing<0){let a=s.fromt.to?r.sliceDoc(t.to,s.to):"";l=r.replaceSelection(n.state.toText(a+t.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let a=r.changes(t),c=i&&i.main.to<=a.newLength?i.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&t.to<=s.to&&t.to>=s.to-10){let f=n.state.sliceDoc(t.from,t.to),u=eh(n)||n.state.doc.lineAt(s.head),d=s.to-t.to,p=s.to-s.from;l=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:a,range:c||g.map(a)};let m=g.to-d,y=m-f.length;if(g.to-g.from!=p||n.state.sliceDoc(y,m)!=f||u&&g.to>=u.from&&g.from<=u.to)return{range:g};let v=r.changes({from:y,to:m,insert:t.insert}),A=g.to-s.to;return{changes:v,range:c?b.range(Math.max(0,c.anchor+A),Math.max(0,c.head+A)):g.map(v)}})}else l={changes:a,selection:c&&r.selection.replaceRange(c)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),n.dispatch(l,{scrollIntoView:!0,userEvent:h}),!0}else if(i&&!i.main.eq(s)){let r=!1,o="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(r=!0),o=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:r,userEvent:o}),!0}else return!1}function Af(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let h=Math.max(0,r-Math.min(o,l));t-=o+h-r}if(o=o?r-t:0;r-=h,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=h,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Mf(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new $r(t,i)),(s!=t||r!=i)&&e.push(new $r(s,r))),e}function Df(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?b.single(t+e,i+e):null}const Of={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},$n=M.ie&&M.ie_version<=11;class Tf{constructor(e){this.view=e,this.active=!1,this.selectionRange=new vc,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(M.ie&&M.ie_version<=11||M.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),$n&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(Mn)?i.root.activeElement!=this.dom:!Gi(i.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(M.ie&&M.ie_version<=11||M.android&&M.chrome)&&!i.state.selection.main.empty&&s.focusNode&&tn(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=M.safari&&e.root.nodeType==11&&bc(this.dom.ownerDocument)==this.dom&&Bf(this.view)||en(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Gi(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),!this.flush()&&r.force&&Et(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Gi(this.dom,this.selectionRange);return e<0&&!s?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Cf(this.view,e,t,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,s=mh(this.view,t);return this.view.state==i&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.dirty|=4),e.type=="childList"){let i=ao(t,e.previousSibling||e.target.previousSibling,-1),s=ao(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,s;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(s=this.resizeContent)===null||s===void 0||s.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function ao(n,e,t){for(;e;){let i=W.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Bf(n){let e=null;function t(h){h.preventDefault(),h.stopImmediatePropagation(),e=h.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor);return tn(l.node,l.offset,r,o)&&([i,s,r,o]=[r,o,i,s]),{anchorNode:i,anchorOffset:s,focusNode:r,focusOffset:o}}class O{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this._root=e.root||kc(e.parent)||document,this.viewState=new lo(e.state||N.create(e)),this.plugins=this.state.facet(ti).map(t=>new Wn(t));for(let t of this.plugins)t.update(this);this.observer=new Tf(this),this.inputState=new Yc(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Kr(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof ee?e[0]:this.state.update(...e))}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,h=null;e.some(u=>u.annotation(ah))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,h=ch(r,o),h||(l=1));let a=this.observer.delayedAndroidKey,c=null;if(a?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(N.phrases)!=this.state.facet(N.phrases))return this.setState(r);s=rn.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:d}=u.state.selection;f=new sn(d.empty?d:b.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of u.effects)d.is(zr)&&(f=d.value)}this.viewState.update(s,f),this.bidiCache=on.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(ii)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Li)!=s.state.facet(Li)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!s.empty)for(let u of this.state.facet(vs))u(s);(h||c)&&Promise.resolve().then(()=>{h&&this.state==h.startState&&this.dispatch(h),c&&!mh(this,c)&&a.force&&Et(this.contentDOM,a.key,a.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new lo(e),this.plugins=e.facet(ti).map(i=>new Wn(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new Kr(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(ti),i=e.state.facet(ti);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new Wn(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:s,clientHeight:r}=this.scrollDOM,o=s>i-r-4?i:s;try{for(let l=0;;l++){this.updateState=1;let h=this.viewport,a=this.viewState.lineBlockAtHeight(o),c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let u=f.map(m=>{try{return m.read(this)}catch(y){return Ee(this.state,y),co}}),d=rn.create(this,this.state,[]),p=!1,g=!1;d.flags|=c,t?t.flags|=c:t=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),p=this.docView.update(d));for(let m=0;m1||m<-1)&&(this.scrollDOM.scrollTop+=m,g=!0)}if(p&&this.docView.updateSelection(!0),this.viewport.from==h.from&&this.viewport.to==h.to&&!g&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(vs))l(t)}get themeClasses(){return Ts+" "+(this.state.facet(Os)?ph:dh)+" "+this.state.facet(Li)}updateAttrs(){let e=fo(this,Gl,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Mn)?"true":"false",class:"cm-content",style:`${M.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),fo(this,Zs,t);let i=this.observer.ignore(()=>{let s=xs(this.contentDOM,this.contentAttrs,t),r=xs(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(O.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(ii),ot.mount(this.root,this.styleModules.concat(kf).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return zn(this,e,Xr(this,e,t,i))}moveByGroup(e,t){return zn(this,e,Xr(this,e,t,i=>_c(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return Jc(this,e,t,i)}moveVertically(e,t,i){return zn(this,e,Xc(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),ih(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[It.find(r,e-s.from,-1,t)];return kn(i,o.dir==J.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(jl)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Pf)return Yl(e.length);let t=this.textDirectionAt(e.from);for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t)return s.order;let i=Ec(e.text,t);return this.bidiCache.push(new on(e.from,e.to,t,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||M.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Cl(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return zr.of(new sn(typeof e=="number"?b.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return ge.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=ot.newName(),s=[Li.of(i),ii.of(Bs(`.${i}`,e))];return t&&t.dark&&s.push(Os.of(!0)),s}static baseTheme(e){return kt.lowest(ii.of(Bs("."+Ts,e,gh)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&W.get(i)||W.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}O.styleModule=ii;O.inputHandler=$l;O.focusChangeEffect=Kl;O.perLineTextDirection=jl;O.exceptionSink=ql;O.updateListener=vs;O.editable=Mn;O.mouseSelectionStyle=zl;O.dragMovesSelection=Hl;O.clickAddsSelectionRange=Wl;O.decorations=fi;O.atomicRanges=Jl;O.scrollMargins=_l;O.darkTheme=Os;O.contentAttributes=Zs;O.editorAttributes=Gl;O.lineWrapping=O.contentAttributes.of({class:"cm-lineWrapping"});O.announce=E.define();const Pf=4096,co={};class on{constructor(e,t,i,s){this.from=e,this.to=t,this.dir=i,this.order=s}static update(e,t){if(t.empty)return e;let i=[],s=e.length?e[e.length-1].dir:J.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&ws(o,t)}return t}const Rf=M.mac?"mac":M.windows?"win":M.linux?"linux":"key";function Lf(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let h=0;hi.concat(s),[]))),t}function If(n,e,t){return bh(yh(n.state),e,n,t)}let tt=null;const Nf=4e3;function Ff(n,e=Rf){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let h=i[o];if(h==null)i[o]=l;else if(h!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,h,a)=>{var c,f;let u=t[o]||(t[o]=Object.create(null)),d=l.split(/ (?!$)/).map(m=>Lf(m,e));for(let m=1;m{let A=tt={view:v,prefix:y,scope:o};return setTimeout(()=>{tt==A&&(tt=null)},Nf),!0}]})}let p=d.join(" ");s(p,!1);let g=u[p]||(u[p]={preventDefault:!1,run:((f=(c=u._any)===null||c===void 0?void 0:c.run)===null||f===void 0?void 0:f.slice())||[]});h&&g.run.push(h),a&&(g.preventDefault=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let a of l){let c=t[a]||(t[a]=Object.create(null));c._any||(c._any={preventDefault:!1,run:[]});for(let f in c)c[f].run.push(o.any)}let h=o[e]||o.key;if(h)for(let a of l)r(a,h,o.run,o.preventDefault),o.shift&&r(a,"Shift-"+h,o.shift,o.preventDefault)}return t}function bh(n,e,t,i){let s=yc(e),r=ne(s,0),o=Oe(r)==s.length&&s!=" ",l="",h=!1;tt&&tt.view==t&&tt.scope==i&&(l=tt.prefix+" ",(h=sh.indexOf(e.keyCode)<0)&&(tt=null));let a=new Set,c=p=>{if(p){for(let g of p.run)if(!a.has(g)&&(a.add(g),g(t,e)))return!0;p.preventDefault&&(h=!0)}return!1},f=n[i],u,d;if(f){if(c(f[l+Ei(s,e,!o)]))return!0;if(o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(M.windows&&e.ctrlKey&&e.altKey)&&(u=lt[e.keyCode])&&u!=s){if(c(f[l+Ei(u,e,!0)]))return!0;if(e.shiftKey&&(d=ai[e.keyCode])!=s&&d!=u&&c(f[l+Ei(d,e,!1)]))return!0}else if(o&&e.shiftKey&&c(f[l+Ei(s,e,!0)]))return!0;if(c(f._any))return!0}return h}class Si{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=wh(e);return[new Si(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Vf(e,t,i)}}function wh(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==J.LTR?e.left:e.right-n.scrollDOM.clientWidth)-n.scrollDOM.scrollLeft,top:e.top-n.scrollDOM.scrollTop}}function po(n,e,t){let i=b.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:X.Text}}function go(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==X.Text))return i}return t}function Vf(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==J.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),h=wh(n),a=o.querySelector(".cm-line"),c=a&&window.getComputedStyle(a),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),d=go(n,i),p=go(n,s),g=d.type==X.Text?d:null,m=p.type==X.Text?p:null;if(n.lineWrapping&&(g&&(g=po(n,i,g)),m&&(m=po(n,s,m))),g&&m&&g.from==m.from)return v(A(t.from,t.to,g));{let S=g?A(t.from,null,g):x(d,!1),k=m?A(null,t.to,m):x(p,!0),T=[];return(g||d).to<(m||p).from-1?T.push(y(f,S.bottom,u,k.top)):S.bottomY&&we.from=le)break;Q>te&&H(Math.max(U,te),S==null&&U<=Y,Math.min(Q,le),k==null&&Q>=oe,xe.dir)}if(te=Ne.to+1,te>=le)break}return L.length==0&&H(Y,S==null,oe,k==null,n.textDirection),{top:F,bottom:P,horizontal:L}}function x(S,k){let T=l.top+(k?S.top:S.bottom);return{top:T,bottom:T,horizontal:[]}}}function Wf(n,e){return n.constructor==e.constructor&&n.eq(e)}class Hf{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(_i)!=e.state.facet(_i)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(_i);for(;t!Wf(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const _i=D.define();function xh(n){return[ge.define(e=>new Hf(e,n)),_i.of(n)]}const Sh=!M.ios,ui=D.define({combine(n){return Ct(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Pg(n={}){return[ui.of(n),zf,qf,$f,Ul.of(!0)]}function vh(n){return n.startState.facet(ui)!=n.state.facet(ui)}const zf=xh({above:!0,markers(n){let{state:e}=n,t=e.facet(ui),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||Sh:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:b.cursor(s.head,s.head>s.anchor?-1:1);for(let h of Si.forRange(n,o,l))i.push(h)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=vh(n);return t&&mo(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){mo(e.state,n)},class:"cm-cursorLayer"});function mo(n,e){e.style.animationDuration=n.facet(ui).cursorBlinkRate+"ms"}const qf=xh({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:Si.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||vh(n)},class:"cm-selectionLayer"}),kh={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Sh&&(kh[".cm-line"].caretColor="transparent !important");const $f=kt.highest(O.theme(kh)),Ch=E.define({map(n,e){return n==null?null:e.mapPos(n)}}),si=be.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(Ch)?i.value:t,n)}}),Kf=ge.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(si);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(si)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let n=this.view.state.field(si),e=n!=null&&this.view.coordsAtPos(n);if(!e)return null;let t=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-t.left+this.view.scrollDOM.scrollLeft,top:e.top-t.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(si)!=n&&this.view.dispatch({effects:Ch.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Rg(){return[si,Kf]}function yo(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function jf(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Uf{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,h,a,c)=>s(c,a,a+l[0].length,l,h);else if(typeof i=="function")this.addMatch=(l,h,a,c)=>{let f=i(l,h,a);f&&c(a,a+l[0].length,f)};else if(i)this.addMatch=(l,h,a,c)=>c(a,a+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new bt,i=t.add.bind(t);for(let{from:s,to:r}of jf(e,this.maxLength))yo(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,h)=>{h>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let h=e.state.doc.lineAt(o),a=h.toh.from;o--)if(this.boundary.test(h.text[o-1-h.from])){c=o;break}for(;lu.push(y.range(g,m));if(h==a)for(this.regexp.lastIndex=c-h.from;(d=this.regexp.exec(h.text))&&d.indexthis.addMatch(m,e,g,p));t=t.update({filterFrom:c,filterTo:f,filter:(g,m)=>gf,add:u})}}return t}}const Ps=/x/.unicode!=null?"gu":"g",Gf=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ps),Jf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Kn=null;function _f(){var n;if(Kn==null&&typeof document<"u"&&document.body){let e=document.body.style;Kn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Kn||!1}const Xi=D.define({combine(n){let e=Ct(n,{render:null,specialChars:Gf,addSpecialChars:null});return(e.replaceTabs=!_f())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ps)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ps)),e}});function Lg(n={}){return[Xi.of(n),Xf()]}let bo=null;function Xf(){return bo||(bo=ge.fromClass(class{constructor(n){this.view=n,this.decorations=B.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Xi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Uf({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ne(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=wi(o.text,l,i-o.from);return B.replace({widget:new eu((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=B.replace({widget:new Zf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Xi);n.startState.facet(Xi)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Yf="•";function Qf(n){return n>=32?Yf:n==10?"␤":String.fromCharCode(9216+n)}class Zf extends ht{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Qf(this.code),i=e.state.phrase("Control character")+" "+(Jf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class eu extends ht{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class tu extends ht{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Wt(e.firstChild):[];if(!t.length)return null;let i=window.getComputedStyle(e.parentNode),s=kn(t[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function Eg(n){return ge.fromClass(class{constructor(e){this.view=e,this.placeholder=B.set([B.widget({widget:new tu(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?B.none:this.placeholder}},{decorations:e=>e.decorations})}const Rs=2e3;function iu(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Rs||t.off>Rs||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(b.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=fs(a.text,o,n.tabSize,!0);if(c<0)r.push(b.cursor(a.to));else{let f=fs(a.text,l,n.tabSize);r.push(b.range(a.from+c,a.from+f))}}}return r}function nu(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function wo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Rs?-1:s==i.length?nu(n,e.clientX):wi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function su(n,e){let t=wo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=wo(n,s);if(!l)return i;let h=iu(n.state,t,l);return h.length?o?b.create(h.concat(i.ranges)):b.create(h):i}}:null}function Ig(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?su(t,i):null)}const Ii="-10000px";class ru{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),s=i.filter(o=>o);if(i===this.input){for(let o of this.tooltipViews)o.update&&o.update(e);return!1}let r=[];for(let o=0;o{var e,t,i;return{position:M.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||ou}}}),xo=new WeakMap,Ah=ge.fromClass(class{constructor(n){this.view=n,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(jn);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new ru(n,Mh,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(jn);if(i.position!=this.position){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Ii,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(n=t.destroy)===null||n===void 0||n.call(t);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect();return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(jn).tooltipSpace(this.view)}}writeMeasure(n){var e;let{editor:t,space:i}=n,s=[];for(let r=0;r=Math.min(t.bottom,i.bottom)||a.rightMath.min(t.right,i.right)+.1){h.style.top=Ii;continue}let f=o.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,u=f?7:0,d=c.right-c.left,p=(e=xo.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||hu,m=this.view.textDirection==J.LTR,y=c.width>i.right-i.left?m?i.left:i.right-c.width:m?Math.min(a.left-(f?14:0)+g.x,i.right-d):Math.max(i.left,a.left-d+(f?14:0)-g.x),v=!!o.above;!o.strictSide&&(v?a.top-(c.bottom-c.top)-g.yi.bottom)&&v==i.bottom-a.bottom>a.top-i.top&&(v=!v);let A=(v?a.top-i.top:i.bottom-a.bottom)-u;if(Ay&&k.topx&&(x=v?k.top-p-2-u:k.bottom+u+2);this.position=="absolute"?(h.style.top=x-n.parent.top+"px",h.style.left=y-n.parent.left+"px"):(h.style.top=x+"px",h.style.left=y+"px"),f&&(f.style.left=`${a.left+(m?g.x:-g.x)-(y+14-7)}px`),l.overlap!==!0&&s.push({left:y,top:x,right:S,bottom:x+p}),h.classList.toggle("cm-tooltip-above",v),h.classList.toggle("cm-tooltip-below",!v),l.positioned&&l.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Ii}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),lu=O.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),hu={x:0,y:0},Mh=D.define({enables:[Ah,lu]});function Dh(n,e){let t=n.plugin(Ah);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const So=D.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function ln(n,e){let t=n.plugin(Oh),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const Oh=ge.fromClass(class{constructor(n){this.input=n.state.facet(hn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(So);this.top=new Ni(n,!0,e.topContainer),this.bottom=new Ni(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(So);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ni(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ni(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(hn);if(t!=this.input){let i=t.filter(h=>h),s=[],r=[],o=[],l=[];for(let h of i){let a=this.specs.indexOf(h),c;a<0?(c=h(n.view),l.push(c)):(c=this.panels[a],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let h of l)h.dom.classList.add("cm-panel"),h.mount&&h.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>O.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Ni{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=vo(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=vo(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function vo(n){let e=n.nextSibling;return n.remove(),e}const hn=D.define({enables:Oh});class St extends yt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}St.prototype.elementClass="";St.prototype.toDOM=void 0;St.prototype.mapMode=ce.TrackBefore;St.prototype.startSide=St.prototype.endSide=-1;St.prototype.point=!0;const au=D.define(),cu=new class extends St{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},fu=au.compute(["selection"],n=>{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(cu.range(s)))}return K.of(e)});function Ng(){return fu}const uu=1024;let du=0;class Te{constructor(e,t){this.from=e,this.to=t}}class R{constructor(e={}){this.id=du++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=me.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}R.closedBy=new R({deserialize:n=>n.split(" ")});R.openedBy=new R({deserialize:n=>n.split(" ")});R.group=new R({deserialize:n=>n.split(" ")});R.contextHash=new R({perNode:!0});R.lookAhead=new R({perNode:!0});R.mounted=new R({perNode:!0});class pu{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const gu=Object.create(null);class me{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):gu,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new me(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(R.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(R.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}me.none=new me("",Object.create(null),0,8);class ir{constructor(e){this.types=e;for(let t=0;t=s&&(o.type.isAnonymous||t(o)!==!1)){if(o.firstChild())continue;l=!0}for(;l&&i&&!o.type.isAnonymous&&i(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rr(me.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new V(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new V(me.none,t,i,s)))}static build(e){return yu(e)}}V.empty=new V(me.none,[],[],0);class nr{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new nr(this.buffer,this.index)}}class At{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return me.none}toString(){let e=[];for(let t=0;t0));h=o[h+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,h=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Bh(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function qt(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=a;e+=t){let c=l[e],f=h[e]+o.from;if(Th(s,i,f,f+c.length)){if(c instanceof At){if(r&j.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new $e(new mu(o,c,e,f),null,u)}else if(r&j.IncludeAnonymous||!c.type.isAnonymous||sr(c)){let u;if(!(r&j.IgnoreMounts)&&c.props&&(u=c.prop(R.mounted))&&!u.overlay)return new Re(u.tree,f,e,o);let d=new Re(c,f,e,o);return r&j.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&j.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&j.IgnoreOverlays)&&(s=this._tree.prop(R.mounted))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Re(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new di(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return qt(this,e,t,!1)}resolveInner(e,t=0){return qt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Bh(this,e)}getChild(e,t=null,i=null){let s=an(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return an(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return cn(this,e)}}function an(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(;!s.type.is(t);)if(!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function cn(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class mu{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class $e{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new $e(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&j.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new $e(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new $e(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new $e(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new di(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new V(this.type,e,t,this.to-this.from)}resolve(e,t=0){return qt(this,e,t,!1)}resolveInner(e,t=0){return qt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Bh(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let s=an(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return an(this,e,t,i)}get node(){return this}matchContext(e){return cn(this,e)}}class di{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Re)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Re?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&j.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&j.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&j.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&j.IncludeAnonymous||l instanceof At||!l.type.isAnonymous||sr(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return cn(this.node,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function sr(n){return n.children.some(e=>e instanceof At||!e.type.isAnonymous||sr(e))}function yu(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=uu,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new nr(t,t.length):t,h=i.types,a=0,c=0;function f(x,S,k,T,F){let{id:P,start:L,end:H,size:Y}=l,oe=c;for(;Y<0;)if(l.next(),Y==-1){let xe=r[P];k.push(xe),T.push(L-x);return}else if(Y==-3){a=P;return}else if(Y==-4){c=P;return}else throw new RangeError(`Unrecognized record size: ${Y}`);let we=h[P],te,le,Ne=L-x;if(H-L<=s&&(le=g(l.pos-S,F))){let xe=new Uint16Array(le.size-le.skip),U=l.pos-le.size,Q=xe.length;for(;l.pos>U;)Q=m(le.start,xe,Q);te=new At(xe,H-le.start,i),Ne=le.start-x}else{let xe=l.pos-Y;l.next();let U=[],Q=[],ct=P>=o?P:-1,Mt=0,Ci=H;for(;l.pos>xe;)ct>=0&&l.id==ct&&l.size>=0?(l.end<=Ci-s&&(d(U,Q,L,Mt,l.end,Ci,ct,oe),Mt=U.length,Ci=l.end),l.next()):f(L,xe,U,Q,ct);if(ct>=0&&Mt>0&&Mt-1&&Mt>0){let Sr=u(we);te=rr(we,U,Q,0,U.length,0,H-L,Sr,Sr)}else te=p(we,U,Q,H-L,oe-H)}k.push(te),T.push(Ne)}function u(x){return(S,k,T)=>{let F=0,P=S.length-1,L,H;if(P>=0&&(L=S[P])instanceof V){if(!P&&L.type==x&&L.length==T)return L;(H=L.prop(R.lookAhead))&&(F=k[P]+L.length+H)}return p(x,S,k,T,F)}}function d(x,S,k,T,F,P,L,H){let Y=[],oe=[];for(;x.length>T;)Y.push(x.pop()),oe.push(S.pop()+k-F);x.push(p(i.types[L],Y,oe,P-F,H-P)),S.push(F-k)}function p(x,S,k,T,F=0,P){if(a){let L=[R.contextHash,a];P=P?[L].concat(P):[L]}if(F>25){let L=[R.lookAhead,F];P=P?[L].concat(P):[L]}return new V(x,S,k,T,P)}function g(x,S){let k=l.fork(),T=0,F=0,P=0,L=k.end-s,H={size:0,start:0,skip:0};e:for(let Y=k.pos-x;k.pos>Y;){let oe=k.size;if(k.id==S&&oe>=0){H.size=T,H.start=F,H.skip=P,P+=4,T+=4,k.next();continue}let we=k.pos-oe;if(oe<0||we=o?4:0,le=k.start;for(k.next();k.pos>we;){if(k.size<0)if(k.size==-3)te+=4;else break e;else k.id>=o&&(te+=4);k.next()}F=le,T+=oe,P+=te}return(S<0||T==x)&&(H.size=T,H.start=F,H.skip=P),H.size>4?H:void 0}function m(x,S,k){let{id:T,start:F,end:P,size:L}=l;if(l.next(),L>=0&&T4){let Y=l.pos-(L-4);for(;l.pos>Y;)k=m(x,S,k)}S[--k]=H,S[--k]=P-x,S[--k]=F-x,S[--k]=T}else L==-3?a=T:L==-4&&(c=T);return k}let y=[],v=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,y,v,-1);let A=(e=n.length)!==null&&e!==void 0?e:y.length?v[0]+y[0].length:0;return new V(h[n.topID],y.reverse(),v.reverse(),A)}const Co=new WeakMap;function Yi(n,e){if(!n.isAnonymous||e instanceof At||e.type!=n)return 1;let t=Co.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof V)){t=1;break}t+=Yi(n,i)}Co.set(e,t)}return t}function rr(n,e,t,i,s,r,o,l,h){let a=0;for(let p=i;p=c)break;k+=T}if(A==x+1){if(k>c){let T=p[x];d(T.children,T.positions,0,T.children.length,g[x]+v);continue}f.push(p[x])}else{let T=g[A-1]+p[A-1].length-S;f.push(rr(n,p,g,x,A,S,T,null,h))}u.push(S+v-r)}}return d(e,t,i,s,0),(l||h)(f,u,o)}class Fg{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof $e?this.setBuffer(e.context.buffer,e.index,t):e instanceof Re&&this.map.set(e.tree,t)}get(e){return e instanceof $e?this.getBuffer(e.context.buffer,e.index):e instanceof Re?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Xe{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new Xe(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,h=0,a=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||a){let d=Math.max(u.from,h)-a,p=Math.min(u.to,f)-a;u=d>=p?null:new Xe(d,p,u.tree,u.offset+a,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew Te(s.from,s.to)):[new Te(0,0)]:[new Te(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class bu{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Vg(n){return(e,t,i,s)=>new xu(e,n,t,i,s)}class Ao{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.ranges=r}}class wu{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Ls=new R({perNode:!0});class xu{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new V(i.type,i.children,i.positions,i.length,i.propValues.concat([[Ls,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[R.mounted.id]=new pu(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;tc.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(a)for(let c of a.mount.overlay){let f=c.from+a.pos,u=c.to+a.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=Su(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&s.fromnew Te(f.from-s.from,f.to-s.from)):null,s.tree,c)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else t&&(h=t.predicate(s))&&(h===!0&&(h=new Te(s.from,s.to)),h.fromnew Te(c.from-t.start,c.to-t.start)),t.target,a)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function Su(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Mo(n,e,t,i,s,r){if(e=e.to);i++);let o=s.children[i],l=o.buffer;function h(a,c,f,u,d){let p=a;for(;l[p+2]+r<=e.from;)p=l[p+3];let g=[],m=[];Mo(o,a,p,g,m,u);let y=l[p+1],v=l[p+2],A=y+r==e.from&&v+r==e.to&&l[p]==e.type.id;return g.push(A?e.toTree():h(p+4,l[p+3],o.set.types[l[p]],y,v-y)),m.push(y-u),Mo(o,l[p+3],c,g,m,u),new V(f,g,m,d)}s.children[i]=h(0,l.length,me.none,0,o.length);for(let a=0;a<=t;a++)n.childAfter(e.from)}class Do{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(j.IncludeAnonymous|j.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,j.IgnoreOverlays|j.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof V)t=t.children[0];else break}return!1}}class ku{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Ls))!==null&&t!==void 0?t:i.to,this.inner=new Do(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Ls))!==null&&e!==void 0?e:t.to,this.inner=new Do(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(R.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;h.tree==this.curFrag.tree&&s.push({frag:h,pos:r.from-h.offset,mount:o})}}}return s}}function Oo(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;h.to<=o||(t||(i=t=e.slice()),h.froml&&t.splice(r+1,0,new Te(l,h.to))):h.to>l?t[r--]=new Te(l,h.to):t.splice(r--,1))}}return i}function Cu(n,e,t,i){let s=0,r=0,o=!1,l=!1,h=-1e9,a=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(h,t),d=Math.min(c,f,i);unew Te(u.from+i,u.to+i)),f=Cu(e,c,h,a);for(let u=0,d=h;;u++){let p=u==f.length,g=p?a:f[u].from;if(g>d&&t.push(new Xe(d,g,s.tree,-o,r.from>=d||r.openStart,r.to<=g||r.openEnd)),p)break;d=f[u].to}}else t.push(new Xe(h,a,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let Au=0;class ze{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=Au++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new ze([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new fn;return t=>t.modified.indexOf(e)>-1?t:fn.get(t.base||t,t.modified.concat(e).sort((i,s)=>i.id-s.id))}}let Mu=0;class fn{constructor(){this.instances=[],this.id=Mu++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Du(t,l.modified));if(i)return i;let s=[],r=new ze(s,e,t);for(let l of t)l.instances.push(r);let o=Ou(t);for(let l of e.set)if(!l.modified.length)for(let h of o)s.push(fn.get(l,h));return r}}function Du(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function Ou(n){let e=[[]];for(let t=0;ti.length-t.length)}function Tu(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let h=r.length-1,a=r[h];if(!a)throw new RangeError("Invalid path: "+s);let c=new un(i,o,h>0?r.slice(0,h):null);e[a]=c.sort(e[a])}}return Rh.add(e)}const Rh=new R;class un{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let h of l.set){let a=t[h.id];if(a){o=o?o+" "+a:a;break}}return o},scope:i}}function Bu(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Pu(n,e,t,i=0,s=n.length){let r=new Ru(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Ru{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:h}=e;if(l>=i||h<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let a=s,c=Lu(e)||un.empty,f=Bu(r,c.tags);if(f&&(a&&(a+=" "),a+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(e.from,a),c.opaque)return;let u=e.tree&&e.tree.prop(R.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),p=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),g=e.firstChild();for(let m=0,y=l;;m++){let v=m=A||!e.nextSibling())););if(!v||A>i)break;y=v.to+l,y>t&&(this.highlightRange(d.cursor(),Math.max(t,v.from+l),Math.min(i,y),s,p),this.startSpan(y,a))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),a)}while(e.nextSibling());e.parent()}}}function Lu(n){let e=n.type.prop(Rh);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const w=ze.define,Vi=w(),Ze=w(),Bo=w(Ze),Po=w(Ze),et=w(),Wi=w(et),Un=w(et),He=w(),ft=w(He),Ve=w(),We=w(),Es=w(),Qt=w(Es),Hi=w(),C={comment:Vi,lineComment:w(Vi),blockComment:w(Vi),docComment:w(Vi),name:Ze,variableName:w(Ze),typeName:Bo,tagName:w(Bo),propertyName:Po,attributeName:w(Po),className:w(Ze),labelName:w(Ze),namespace:w(Ze),macroName:w(Ze),literal:et,string:Wi,docString:w(Wi),character:w(Wi),attributeValue:w(Wi),number:Un,integer:w(Un),float:w(Un),bool:w(et),regexp:w(et),escape:w(et),color:w(et),url:w(et),keyword:Ve,self:w(Ve),null:w(Ve),atom:w(Ve),unit:w(Ve),modifier:w(Ve),operatorKeyword:w(Ve),controlKeyword:w(Ve),definitionKeyword:w(Ve),moduleKeyword:w(Ve),operator:We,derefOperator:w(We),arithmeticOperator:w(We),logicOperator:w(We),bitwiseOperator:w(We),compareOperator:w(We),updateOperator:w(We),definitionOperator:w(We),typeOperator:w(We),controlOperator:w(We),punctuation:Es,separator:w(Es),bracket:Qt,angleBracket:w(Qt),squareBracket:w(Qt),paren:w(Qt),brace:w(Qt),content:He,heading:ft,heading1:w(ft),heading2:w(ft),heading3:w(ft),heading4:w(ft),heading5:w(ft),heading6:w(ft),contentSeparator:w(He),list:w(He),quote:w(He),emphasis:w(He),strong:w(He),link:w(He),monospace:w(He),strikethrough:w(He),inserted:w(),deleted:w(),changed:w(),invalid:w(),meta:Hi,documentMeta:w(Hi),annotation:w(Hi),processingInstruction:w(Hi),definition:ze.defineModifier(),constant:ze.defineModifier(),function:ze.defineModifier(),standard:ze.defineModifier(),local:ze.defineModifier(),special:ze.defineModifier()};Lh([{tag:C.link,class:"tok-link"},{tag:C.heading,class:"tok-heading"},{tag:C.emphasis,class:"tok-emphasis"},{tag:C.strong,class:"tok-strong"},{tag:C.keyword,class:"tok-keyword"},{tag:C.atom,class:"tok-atom"},{tag:C.bool,class:"tok-bool"},{tag:C.url,class:"tok-url"},{tag:C.labelName,class:"tok-labelName"},{tag:C.inserted,class:"tok-inserted"},{tag:C.deleted,class:"tok-deleted"},{tag:C.literal,class:"tok-literal"},{tag:C.string,class:"tok-string"},{tag:C.number,class:"tok-number"},{tag:[C.regexp,C.escape,C.special(C.string)],class:"tok-string2"},{tag:C.variableName,class:"tok-variableName"},{tag:C.local(C.variableName),class:"tok-variableName tok-local"},{tag:C.definition(C.variableName),class:"tok-variableName tok-definition"},{tag:C.special(C.variableName),class:"tok-variableName2"},{tag:C.definition(C.propertyName),class:"tok-propertyName tok-definition"},{tag:C.typeName,class:"tok-typeName"},{tag:C.namespace,class:"tok-namespace"},{tag:C.className,class:"tok-className"},{tag:C.macroName,class:"tok-macroName"},{tag:C.propertyName,class:"tok-propertyName"},{tag:C.operator,class:"tok-operator"},{tag:C.comment,class:"tok-comment"},{tag:C.meta,class:"tok-meta"},{tag:C.invalid,class:"tok-invalid"},{tag:C.punctuation,class:"tok-punctuation"}]);var Gn;const pt=new R;function Eh(n){return D.define({combine:n?e=>e.concat(n):void 0})}const Eu=new R;class Be{constructor(e,t,i=[],s=""){this.data=e,this.name=s,N.prototype.hasOwnProperty("tree")||Object.defineProperty(N.prototype,"tree",{get(){return ye(this)}}),this.parser=t,this.extension=[jt.of(this),N.languageData.of((r,o,l)=>{let h=Ro(r,o,l),a=h.type.prop(pt);if(!a)return[];let c=r.facet(a),f=h.type.prop(Eu);if(f){let u=h.resolve(o-h.from,l);for(let d of f)if(d.test(u,r)){let p=r.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return Ro(e,t,i).type.prop(pt)==this.data}findRegions(e){let t=e.facet(jt);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(pt)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(R.mounted);if(l){if(l.tree.prop(pt)==this.data){if(l.overlay)for(let h of l.overlay)i.push({from:h.from+o,to:h.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let h=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>h)return}}for(let h=0;hi.isTop?t:void 0)]}),e.name)}configure(e,t){return new Is(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ye(n){let e=n.field(Be.state,!1);return e?e.tree:V.empty}class Iu{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let Zt=null;class $t{constructor(e,t,i=[],s,r,o,l,h){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=h,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new $t(e,t,[],V.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Iu(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=V.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Xe.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Zt;Zt=this;try{return e()}finally{Zt=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Lo(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let h=[];if(e.iterChangedRanges((a,c,f,u)=>h.push({fromA:a,toA:c,fromB:f,toB:u})),i=Xe.applyChanges(i,h),s=V.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let a of this.skipped){let c=e.mapPos(a.from,1),f=e.mapPos(a.to,-1);ce.from&&(this.fragments=Lo(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ph{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let h=Zt;if(h){for(let a of s)h.tempSkipped.push(a);e&&(h.scheduleOn=h.scheduleOn?Promise.all([h.scheduleOn,e]):e)}return this.parsedPos=o,new V(me.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Zt}}function Lo(n,e,t){return Xe.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Kt{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Kt(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=$t.create(e.facet(jt).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Kt(i)}}Be.state=be.define({create:Kt.init,update(n,e){for(let t of e.effects)if(t.is(Be.setState))return t.value;return e.startState.facet(jt)!=e.state.facet(jt)?Kt.init(e.state):n.apply(e)}});let Ih=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Ih=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Jn=typeof navigator<"u"&&(!((Gn=navigator.scheduling)===null||Gn===void 0)&&Gn.isInputPending)?()=>navigator.scheduling.isInputPending():null,Nu=ge.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Be.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Be.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Ih(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,h=r.context.work(()=>Jn&&Jn()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(h||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Be.setState.of(new Kt(r.context))})),this.chunkBudget>0&&!(h&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ee(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),jt=D.define({combine(n){return n.length?n[0]:null},enables:n=>[Be.state,Nu,O.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Hg{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Nh=D.define(),Dn=D.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function vt(n){let e=n.facet(Dn);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function dn(n,e){let t="",i=n.tabSize,s=n.facet(Dn)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return wi(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Fu=new R;function Vu(n,e,t){return Vh(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function Wu(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function Hu(n){let e=n.type.prop(Fu);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(R.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Wh(o,!0,1,void 0,r&&!Wu(o)?s.from:void 0)}return n.parent==null?zu:null}function Vh(n,e,t){for(;n;n=n.parent){let i=Hu(n);if(i)return i(or.create(t,e,n))}return null}function zu(){return 0}class or extends On{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new or(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(qu(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?Vh(e,this.pos,this.base):0}}function qu(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function $u(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let h=e.childAfter(l);if(!h||h==i)return null;if(!h.type.isSkipped)return h.fromWh(i,e,t,n)}function Wh(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,h=e?$u(n):null;return h?l?n.column(h.from):n.column(h.to):n.baseIndent+(l?0:n.unit*t)}const qg=n=>n.baseIndent;function $g({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Kg=new R;function jg(n){let e=n.firstChild,t=n.lastChild;return e&&e.tol.prop(pt)==o.data:o?l=>l==o:void 0,this.style=Lh(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new ot(i):null,this.themeType=t.themeType}static define(e,t){return new Tn(e,t||{})}}const Ns=D.define(),Hh=D.define({combine(n){return n.length?[n[0]]:null}});function _n(n){let e=n.facet(Ns);return e.length?e:n.facet(Hh)}function Ug(n,e){let t=[ju],i;return n instanceof Tn&&(n.module&&t.push(O.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Hh.of(n)):i?t.push(Ns.computeN([O.darkTheme],s=>s.facet(O.darkTheme)==(i=="dark")?[n]:[])):t.push(Ns.of(n)),t}class Ku{constructor(e){this.markCache=Object.create(null),this.tree=ye(e.state),this.decorations=this.buildDeco(e,_n(e.state))}update(e){let t=ye(e.state),i=_n(e.state),s=i!=_n(e.startState);t.length{i.add(o,l,this.markCache[h]||(this.markCache[h]=B.mark({class:h})))},s,r);return i.finish()}}const ju=kt.high(ge.fromClass(Ku,{decorations:n=>n.decorations})),Gg=Tn.define([{tag:C.meta,color:"#404740"},{tag:C.link,textDecoration:"underline"},{tag:C.heading,textDecoration:"underline",fontWeight:"bold"},{tag:C.emphasis,fontStyle:"italic"},{tag:C.strong,fontWeight:"bold"},{tag:C.strikethrough,textDecoration:"line-through"},{tag:C.keyword,color:"#708"},{tag:[C.atom,C.bool,C.url,C.contentSeparator,C.labelName],color:"#219"},{tag:[C.literal,C.inserted],color:"#164"},{tag:[C.string,C.deleted],color:"#a11"},{tag:[C.regexp,C.escape,C.special(C.string)],color:"#e40"},{tag:C.definition(C.variableName),color:"#00f"},{tag:C.local(C.variableName),color:"#30a"},{tag:[C.typeName,C.namespace],color:"#085"},{tag:C.className,color:"#167"},{tag:[C.special(C.variableName),C.macroName],color:"#256"},{tag:C.definition(C.propertyName),color:"#00c"},{tag:C.comment,color:"#940"},{tag:C.invalid,color:"#f00"}]),Uu=O.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),zh=1e4,qh="()[]{}",$h=D.define({combine(n){return Ct(n,{afterCursor:!0,brackets:qh,maxScanDistance:zh,renderMatch:_u})}}),Gu=B.mark({class:"cm-matchingBracket"}),Ju=B.mark({class:"cm-nonmatchingBracket"});function _u(n){let e=[],t=n.matched?Gu:Ju;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Xu=be.define({create(){return B.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet($h);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=Ke(e.state,s.head,-1,i)||s.head>0&&Ke(e.state,s.head-1,1,i)||i.afterCursor&&(Ke(e.state,s.head,1,i)||s.headO.decorations.from(n)}),Yu=[Xu,Uu];function Jg(n={}){return[$h.of(n),Yu]}const Qu=new R;function Fs(n,e,t){let i=n.prop(e<0?R.openedBy:R.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Vs(n){let e=n.type.prop(Qu);return e?e(n.node):n}function Ke(n,e,t,i={}){let s=i.maxScanDistance||zh,r=i.brackets||qh,o=ye(n),l=o.resolveInner(e,t);for(let h=l;h;h=h.parent){let a=Fs(h.type,t,r);if(a&&h.from0?e>=c.from&&ec.from&&e<=c.to))return Zu(n,e,t,h,c,a,r)}}return ed(n,e,t,o,l.type,s,r)}function Zu(n,e,t,i,s,r,o){let l=i.parent,h={from:s.from,to:s.to},a=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(a==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let a={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let p=e+u*t;for(let g=t>0?0:d.length-1,m=t>0?d.length:-1;g!=m;g+=t){let y=o.indexOf(d[g]);if(!(y<0||i.resolveInner(p+g,1).type!=s))if(y%2==0==t>0)f++;else{if(f==1)return{start:a,end:{from:p+g,to:p+g+1},matched:y>>1==h>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:a,matched:!1}:null}function Eo(n,e,t,i=0,s=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let r=s;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,r=this.string.substr(this.pos,e.length);return s(r)==s(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function td(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||id,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||hr}}function id(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}const Io=new WeakMap;class jh extends Be{constructor(e){let t=Eh(e.languageData),i=td(e),s,r=new class extends Ph{createParse(o,l,h){return new sd(s,o,l,h)}};super(t,r,[Nh.of((o,l)=>this.getIndent(o,l))],e.name),this.topNode=ld(t),s=this,this.streamParser=i,this.stateAfter=new R({perNode:!0}),this.tokenTable=e.tokenTable?new _h(i.tokenTable):od}static define(e){return new jh(e)}getIndent(e,t){let i=ye(e.state),s=i.resolve(t);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let r,{overrideIndentation:o}=e.options;o&&(r=Io.get(e.state),r!=null&&r1e4)return null;for(;h=i&&t+e.length<=s&&e.prop(n.stateAfter);if(r)return{state:n.streamParser.copyState(r),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],h=t+e.positions[o],a=l instanceof V&&h=e.length)return e;!s&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],h;if(ot&&lr(n,s.tree,0-s.offset,t,o),h;if(l&&(h=Uh(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:h}}return{state:n.streamParser.startState(i?vt(i):4),tree:V.empty}}class sd{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=$t.get(),o=s[0].from,{state:l,tree:h}=nd(e,i,o,r==null?void 0:r.state);this.state=l,this.parsedPos=this.chunkStart=o+h.length;for(let a=0;a=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` `&&(t="");else{let i=t.indexOf(` -`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;let o=this.ranges[++this.rangeIndex].from;t+=o-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new Kh(t,e?e.state.tabSize:4,e?vt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Gh(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return s}throw new Error("Stream parser failed to advance stream.")}const hr=Object.create(null),pi=[me.none],rd=new ir(pi),No=[],Jh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Jh[n]=Xh(hr,e);class _h{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Jh)}resolve(e){return e?this.table[e]||(this.table[e]=Xh(this.extra,e)):0}}const od=new _h(hr);function Xn(n,e){No.indexOf(n)>-1||(No.push(n),console.warn(e))}function Xh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||C[r];o?typeof o=="function"?t?t=o(t):Xn(r,`Modifier ${r} used at start of tag`):t?Xn(r,`Tag ${r} used as modifier`):t=o:Xn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=me.define({id:pi.length,name:i,props:[Tu({[i]:t})]});return pi.push(s),s.id}function ld(n){let e=me.define({id:pi.length,name:"Document",props:[gt.add(()=>n)]});return pi.push(e),e}const hd=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=cr(n.state,t.from);return i.line?ad(n):i.block?fd(n):!1};function ar(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const ad=ar(pd,0),cd=ar(Yh,0),fd=ar((n,e)=>Yh(n,e,dd(e)),0);function cr(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Zt=50;function ud(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Zt,i),o=n.sliceDoc(s,s+Zt),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*Zt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Zt),f=n.sliceDoc(s-Zt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function dd(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Yh(n,e,t=e.selection.ranges){let i=t.map(r=>cr(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>ud(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,p=f.text.slice(u,u+a.length)==a?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:h,indent:a,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+a,insert:h+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:h}of i)if(l>=0){let a=o.from+l,c=a+h.length;o.text[c-o.from]==" "&&c++,r.push({from:a,to:c})}return{changes:r}}return null}const Ws=Qe.define(),gd=Qe.define(),md=D.define(),Qh=D.define({combine(n){return At(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}});function yd(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const Zh=be.define({create(){return je.empty},update(n,e){let t=e.state.facet(Qh),i=e.annotation(Ws);if(i){let h=e.docChanged?b.single(yd(e.changes)):void 0,a=ke.fromTransaction(e,h),c=i.side,f=c==0?n.undone:n.done;return a?f=pn(f,f.length,t.minDepth,a):f=ia(f,e.startState.selection),new je(c==0?i.rest:f,c==0?f:i.rest)}let s=e.annotation(gd);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(ee.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=ke.fromTransaction(e),o=e.annotation(ee.time),l=e.annotation(ee.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new je(n.done.map(ke.fromJSON),n.undone.map(ke.fromJSON))}});function _g(n={}){return[Zh,Qh.of(n),O.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?ea:e.inputType=="historyRedo"?Hs:null;return i?(e.preventDefault(),i(t)):!1}})]}function Bn(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Zh,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const ea=Bn(0,!1),Hs=Bn(1,!1),bd=Bn(0,!0),wd=Bn(1,!0);class ke{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new ke(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new ke(e.changes&&Z.fromJSON(e.changes),[],e.mapped&&Ue.fromJSON(e.mapped),e.startSelection&&b.fromJSON(e.startSelection),e.selectionsAfter.map(b.fromJSON))}static fromTransaction(e,t){let i=Pe;for(let s of e.startState.facet(md)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new ke(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Pe)}static selection(e){return new ke(void 0,Pe,void 0,void 0,e)}}function pn(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function xd(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let h=0;h=a&&o<=c&&(i=!0)}}),i}function Sd(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function ta(n,e){return n.length?e.length?n.concat(e):n:e}const Pe=[],kd=200;function ia(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-kd));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),pn(n,n.length-1,1e9,t.setSelAfter(i)))}else return[ke.selection([e])]}function vd(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Yn(n,e){if(!n.length)return n;let t=n.length,i=Pe;for(;t;){let s=Cd(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[ke.selection(i)]:Pe}function Cd(n,e,t){let i=ta(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):Pe,t);if(!n.changes)return ke.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new ke(s,E.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const Ad=/^(input\.type|delete)($|\.)/;class je{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new je(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||Ad.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Pn(t,e))}function fe(n){return n.textDirectionAt(n.state.selection.main.head)==_.LTR}const sa=n=>na(n,!fe(n)),ra=n=>na(n,fe(n));function oa(n,e){return Ie(n,t=>t.empty?n.moveByGroup(t,e):Pn(t,e))}const Md=n=>oa(n,!fe(n)),Dd=n=>oa(n,fe(n));function Od(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Rn(n,e,t){let i=ye(n).resolveInner(e.head),s=t?R.closedBy:R.openedBy;for(let h=e.head;;){let a=t?i.childAfter(h):i.childBefore(h);if(!a)break;Od(n,a,s)?i=a:h=t?a.to:a.from}let r=i.type.prop(s),o,l;return r&&(o=t?Ke(n,i.from,1):Ke(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,b.cursor(l,t?-1:1)}const Td=n=>Ie(n,e=>Rn(n.state,e,!fe(n))),Bd=n=>Ie(n,e=>Rn(n.state,e,fe(n)));function la(n,e){return Ie(n,t=>{if(!t.empty)return Pn(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const ha=n=>la(n,!1),aa=n=>la(n,!0);function ca(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Pn(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),h=l.top+t.marginTop,a=l.bottom-t.marginBottom;o&&o.top>h&&o.bottomfa(n,!1),zs=n=>fa(n,!0);function ct(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=b.cursor(i.from+r))}return s}const Pd=n=>Ie(n,e=>ct(n,e,!0)),Rd=n=>Ie(n,e=>ct(n,e,!1)),Ld=n=>Ie(n,e=>ct(n,e,!fe(n))),Ed=n=>Ie(n,e=>ct(n,e,fe(n))),Id=n=>Ie(n,e=>b.cursor(n.lineBlockAt(e.head).from,1)),Nd=n=>Ie(n,e=>b.cursor(n.lineBlockAt(e.head).to,-1));function Fd(n,e,t){let i=!1,s=Ut(n.selection,r=>{let o=Ke(n,r.head,-1)||Ke(n,r.head,1)||r.head>0&&Ke(n,r.head-1,1)||r.headFd(n,e,!1);function Le(n,e){let t=Ut(n.state.selection,i=>{let s=e(i);return b.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Je(n.state,t)),!0)}function ua(n,e){return Le(n,t=>n.moveByChar(t,e))}const da=n=>ua(n,!fe(n)),pa=n=>ua(n,fe(n));function ga(n,e){return Le(n,t=>n.moveByGroup(t,e))}const Wd=n=>ga(n,!fe(n)),Hd=n=>ga(n,fe(n)),zd=n=>Le(n,e=>Rn(n.state,e,!fe(n))),qd=n=>Le(n,e=>Rn(n.state,e,fe(n)));function ma(n,e){return Le(n,t=>n.moveVertically(t,e))}const ya=n=>ma(n,!1),ba=n=>ma(n,!0);function wa(n,e){return Le(n,t=>n.moveVertically(t,e,ca(n).height))}const Vo=n=>wa(n,!1),Wo=n=>wa(n,!0),$d=n=>Le(n,e=>ct(n,e,!0)),Kd=n=>Le(n,e=>ct(n,e,!1)),jd=n=>Le(n,e=>ct(n,e,!fe(n))),Ud=n=>Le(n,e=>ct(n,e,fe(n))),Gd=n=>Le(n,e=>b.cursor(n.lineBlockAt(e.head).from)),Jd=n=>Le(n,e=>b.cursor(n.lineBlockAt(e.head).to)),Ho=({state:n,dispatch:e})=>(e(Je(n,{anchor:0})),!0),zo=({state:n,dispatch:e})=>(e(Je(n,{anchor:n.doc.length})),!0),qo=({state:n,dispatch:e})=>(e(Je(n,{anchor:n.selection.main.anchor,head:0})),!0),$o=({state:n,dispatch:e})=>(e(Je(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),_d=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),Xd=({state:n,dispatch:e})=>{let t=En(n).map(({from:i,to:s})=>b.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:b.create(t),userEvent:"select"})),!0},Yd=({state:n,dispatch:e})=>{let t=Ut(n.selection,i=>{var s;let r=ye(n).resolveInner(i.head,1);for(;!(r.from=i.to||r.to>i.to&&r.from<=i.from||!(!((s=r.parent)===null||s===void 0)&&s.parent));)r=r.parent;return b.range(r.to,r.from)});return e(Je(n,t)),!0},Qd=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=b.create([t.main]):t.main.empty||(i=b.create([b.cursor(t.main.head)])),i?(e(Je(n,i)),!0):!1};function Ln(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let h=e(o);ho&&(t="delete.forward",h=zi(n,h,!0)),o=Math.min(o,h),l=Math.max(l,h)}else o=zi(n,o,!1),l=zi(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:b.cursor(o)}});return s.changes.empty?!1:(n.dispatch(i.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?O.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function zi(n,e,t){if(n instanceof O)for(let i of n.state.facet(O.atomicRanges).map(s=>s(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const xa=(n,e)=>Ln(n,t=>{let{state:i}=n,s=i.doc.lineAt(t),r,o;if(!e&&t>s.from&&txa(n,!1),Sa=n=>xa(n,!0),ka=(n,e)=>Ln(n,t=>{let i=t,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let h=ue(r.text,i-r.from,e)+r.from,a=r.text.slice(Math.min(i,h)-r.from,Math.max(i,h)-r.from),c=o(a);if(l!=null&&c!=l)break;(a!=" "||i!=t)&&(l=c),i=h}return i}),va=n=>ka(n,!1),Zd=n=>ka(n,!0),Ca=n=>Ln(n,e=>{let t=n.lineBlockAt(e).to;return eLn(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),tp=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:I.of(["",""])},range:b.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},ip=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:ue(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:ue(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:b.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function En(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function Aa(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of En(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let h of r.ranges)s.push(b.range(Math.min(n.doc.length,h.anchor+l),Math.min(n.doc.length,h.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let h of r.ranges)s.push(b.range(h.anchor-l,h.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:b.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const np=({state:n,dispatch:e})=>Aa(n,e,!1),sp=({state:n,dispatch:e})=>Aa(n,e,!0);function Ma(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of En(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const rp=({state:n,dispatch:e})=>Ma(n,e,!1),op=({state:n,dispatch:e})=>Ma(n,e,!0),lp=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(En(e).map(({from:s,to:r})=>(s>0?s--:rn.moveVertically(s,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function hp(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ye(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(R.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from?{from:i.to,to:s.from}:null}const ap=Da(!1),cp=Da(!0);function Da(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),h=!n&&r==o&&hp(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let a=new On(e,{simulateBreak:r,simulateDoubleBreak:!!h}),c=Fh(a,r);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(r).text)[0].length);ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:b.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const fp=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new On(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=fr(n,(r,o,l)=>{let h=Fh(i,r.from);if(h==null)return;/\S/.test(r.text)||(h=0);let a=/^\s*/.exec(r.text)[0],c=dn(n,h);(a!=c||l.fromn.readOnly?!1:(e(n.update(fr(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Dn)})}),{userEvent:"input.indent"})),!0),dp=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(fr(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=wi(s,n.tabSize),o=0,l=dn(n,Math.max(0,r-vt(n)));for(;o({mac:n.key,run:n.run,shift:n.shift}))),Yg=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Td,shift:zd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Bd,shift:qd},{key:"Alt-ArrowUp",run:np},{key:"Shift-Alt-ArrowUp",run:rp},{key:"Alt-ArrowDown",run:sp},{key:"Shift-Alt-ArrowDown",run:op},{key:"Escape",run:Qd},{key:"Mod-Enter",run:cp},{key:"Alt-l",mac:"Ctrl-l",run:Xd},{key:"Mod-i",run:Yd,preventDefault:!0},{key:"Mod-[",run:dp},{key:"Mod-]",run:up},{key:"Mod-Alt-\\",run:fp},{key:"Shift-Mod-k",run:lp},{key:"Shift-Mod-\\",run:Vd},{key:"Mod-/",run:hd},{key:"Alt-A",run:cd}].concat(gp);function he(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class jt{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Ko(l)):Ko,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ne(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Us(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Oe(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),h=this.match(l,o);if(h)return this.value=h,this;if(r==s.length-1)break;o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=gn(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new Nt(t,e.sliceString(t,i));return Qn.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=gn(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Nt.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Ba.prototype[Symbol.iterator]=Pa.prototype[Symbol.iterator]=function(){return this});function mp(n){try{return new RegExp(n,ur),!0}catch{return!1}}function gn(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function $s(n){let e=he("input",{class:"cm-textfield",name:"line"}),t=he("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),n.dispatch({effects:mn.of(!1)}),n.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},he("label",n.state.phrase("Go to line"),": ",e)," ",he("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!s)return;let{state:r}=n,o=r.doc.lineAt(r.selection.main.head),[,l,h,a,c]=s,f=a?+a.slice(1):0,u=h?+h:o.number;if(h&&c){let p=u/100;l&&(p=p*(l=="-"?-1:1)+o.number/r.doc.lines),u=Math.round(r.doc.lines*p)}else h&&l&&(u=u*(l=="-"?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u)));n.dispatch({effects:mn.of(!1),selection:b.cursor(d.from+Math.max(0,Math.min(f,d.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const mn=E.define(),jo=be.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(mn)&&(n=t.value);return n},provide:n=>hn.from(n,e=>e?$s:null)}),yp=n=>{let e=ln(n,$s);if(!e){let t=[mn.of(!0)];n.state.field(jo,!1)==null&&t.push(E.appendConfig.of([jo,bp])),n.dispatch({effects:t}),e=ln(n,$s)}return e&&e.dom.querySelector("input").focus(),!0},bp=O.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),wp={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ra=D.define({combine(n){return At(n,wp,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Qg(n){let e=[Cp,vp];return n&&e.push(Ra.of(n)),e}const xp=B.mark({class:"cm-selectionMatch"}),Sp=B.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Uo(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=$.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=$.Word)}function kp(n,e,t,i){return n(e.sliceDoc(t,t+1))==$.Word&&n(e.sliceDoc(i-1,i))==$.Word}const vp=ge.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(Ra),{state:t}=n,i=t.selection;if(i.ranges.length>1)return B.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return B.none;let h=t.wordAt(s.head);if(!h)return B.none;o=t.charCategorizer(s.head),r=t.sliceDoc(h.from,h.to)}else{let h=s.to-s.from;if(h200)return B.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Uo(o,t,s.from,s.to)&&kp(o,t,s.from,s.to)))return B.none}else if(r=t.sliceDoc(s.from,s.to).trim(),!r)return B.none}let l=[];for(let h of n.visibleRanges){let a=new jt(t.doc,r,h.from,h.to);for(;!a.next().done;){let{from:c,to:f}=a.value;if((!o||Uo(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(Sp.range(c,f)):(c>=s.to||f<=s.from)&&l.push(xp.range(c,f)),l.length>e.maxMatches))return B.none}}return B.set(l)}},{decorations:n=>n.decorations}),Cp=O.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ap=({state:n,dispatch:e})=>{let{selection:t}=n,i=b.create(t.ranges.map(s=>n.wordAt(s.head)||b.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function Mp(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new jt(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new jt(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(h=>h.from==l.value.from))continue;if(r){let h=n.wordAt(l.value.from);if(!h||h.from!=l.value.from||h.to!=l.value.to)continue}return l.value}}const Dp=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return Ap({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=Mp(n,i);return s?(e(n.update({selection:n.selection.addRange(b.range(s.from,s.to),!1),effects:O.scrollIntoView(s.to)})),!0):!1},Gt=D.define({combine(n){return At(n,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Vp(e),scrollToMatch:e=>O.scrollIntoView(e)})}});class La{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||mp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Pp(this):new Tp(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Bt(this,s,t,i):Tt(this,s,t,i)}}class Ea{constructor(e){this.spec=e}}function Tt(n,e,t,i){return new jt(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?Op(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Op(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Tt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Bt(n,e,t,i){return new Ba(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Bp(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function yn(n,e){return n.slice(ue(n,e,!1),e)}function bn(n,e){return n.slice(e,ue(n,e))}function Bp(n){return(e,t,i)=>!i[0].length||(n(yn(i.input,i.index))!=$.Word||n(bn(i.input,i.index))!=$.Word)&&(n(bn(i.input,i.index+i[0].length))!=$.Word||n(yn(i.input,i.index+i[0].length))!=$.Word)}class Pp extends Ea{nextMatch(e,t,i){let s=Bt(this.spec,e,i,e.doc.length).next();return s.done&&(s=Bt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Bt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Bt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const gi=E.define(),dr=E.define(),rt=be.define({create(n){return new Zn(Ks(n).create(),null)},update(n,e){for(let t of e.effects)t.is(gi)?n=new Zn(t.value.create(),n.panel):t.is(dr)&&(n=new Zn(n.query,t.value?pr:null));return n},provide:n=>hn.from(n,e=>e.panel)});class Zn{constructor(e,t){this.query=e,this.panel=t}}const Rp=B.mark({class:"cm-searchMatch"}),Lp=B.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Ep=ge.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(rt))}update(n){let e=n.state.field(rt);(e!=n.startState.field(rt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return B.none;let{view:t}=this,i=new wt;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?Lp:Rp)})}return i.finish()}},{decorations:n=>n.decorations});function ki(n){return e=>{let t=e.state.field(rt,!1);return t&&t.query.spec.valid?n(e,t):Fa(e)}}const wn=ki((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=b.single(i.from,i.to),r=n.state.facet(Gt);return n.dispatch({selection:s,effects:[gr(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),Na(n),!0}),xn=ki((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=b.single(s.from,s.to),o=n.state.facet(Gt);return n.dispatch({selection:r,effects:[gr(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),Na(n),!0}),Ip=ki((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:b.create(t.map(i=>b.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),Np=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new jt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(b.range(l.value.from,l.value.to))}return e(n.update({selection:b.create(r,o),userEvent:"select.search.matches"})),!0},Go=ki((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l=b.single(r.from-c,r.to-c),a.push(gr(n,r)),a.push(t.facet(Gt).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:a,userEvent:"input.replace"}),!0}),Fp=ki((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:O.announce.of(i),userEvent:"input.replace.all"}),!0});function pr(n){return n.state.facet(Gt).createPanel(n)}function Ks(n,e){var t,i,s,r;let o=n.selection.main,l=o.empty||o.to>o.from+100?"":n.sliceDoc(o.from,o.to);if(e&&!l)return e;let h=n.facet(Gt);return new La({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,wholeWord:(r=e==null?void 0:e.wholeWord)!==null&&r!==void 0?r:h.wholeWord})}function Ia(n){let e=ln(n,pr);return e&&e.dom.querySelector("[main-field]")}function Na(n){let e=Ia(n);e&&e==n.root.activeElement&&e.select()}const Fa=n=>{let e=n.state.field(rt,!1);if(e&&e.panel){let t=Ia(n);if(t&&t!=n.root.activeElement){let i=Ks(n.state,e.query.spec);i.valid&&n.dispatch({effects:gi.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[dr.of(!0),e?gi.of(Ks(n.state,e.query.spec)):E.appendConfig.of(Hp)]});return!0},Va=n=>{let e=n.state.field(rt,!1);if(!e||!e.panel)return!1;let t=ln(n,pr);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:dr.of(!1)}),!0},Zg=[{key:"Mod-f",run:Fa,scope:"editor search-panel"},{key:"F3",run:wn,shift:xn,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:wn,shift:xn,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Va,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Np},{key:"Alt-g",run:yp},{key:"Mod-d",run:Dp,preventDefault:!0}];class Vp{constructor(e){this.view=e;let t=this.query=e.state.field(rt).query.spec;this.commit=this.commit.bind(this),this.searchField=he("input",{value:t.search,placeholder:Ce(e,"Find"),"aria-label":Ce(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=he("input",{value:t.replace,placeholder:Ce(e,"Replace"),"aria-label":Ce(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=he("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=he("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=he("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return he("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=he("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>wn(e),[Ce(e,"next")]),i("prev",()=>xn(e),[Ce(e,"previous")]),i("select",()=>Ip(e),[Ce(e,"all")]),he("label",null,[this.caseField,Ce(e,"match case")]),he("label",null,[this.reField,Ce(e,"regexp")]),he("label",null,[this.wordField,Ce(e,"by word")]),...e.state.readOnly?[]:[he("br"),this.replaceField,i("replace",()=>Go(e),[Ce(e,"replace")]),i("replaceAll",()=>Fp(e),[Ce(e,"replace all")])],he("button",{name:"close",onclick:()=>Va(e),"aria-label":Ce(e,"close"),type:"button"},["×"])])}commit(){let e=new La({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:gi.of(e)}))}keydown(e){If(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?xn:wn)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Go(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(gi)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Gt).top}}function Ce(n,e){return n.state.phrase(e)}const qi=30,$i=/[\s\.,:;?!]/;function gr(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-qi),o=Math.min(s,t+qi),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let h=0;hl.length-qi;h--)if(!$i.test(l[h-1])&&$i.test(l[h])){l=l.slice(0,h);break}}return O.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const Wp=O.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Hp=[rt,Ct.lowest(Ep),Wp];class Wa{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=ye(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(Ha(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function Jo(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function zp(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:zp(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function em(n,e){return t=>{for(let i=ye(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class _o{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function ot(n){return n.selection.main.from}function Ha(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const za=Qe.define();function $p(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i)?{range:l}:{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:e},range:b.cursor(l.from+r+e.length)})),{userEvent:"input.complete"})}function qa(n,e){const t=e.completion.apply||e.completion.label;let i=e.source;typeof t=="string"?n.dispatch(Object.assign(Object.assign({},$p(n.state,t,i.from,i.to)),{annotations:za.of(e.completion)})):t(n,e.completion,i.from,i.to)}const Xo=new WeakMap;function Kp(n){if(!Array.isArray(n))return n;let e=Xo.get(n);return e||Xo.set(n,e=qp(n)),e}const mr=E.define(),mi=E.define();class jp{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(v=Us(S))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!k||T==1&&m||x==0&&T!=0)&&(t[f]==S||i[f]==S&&(u=!0)?o[f++]=k:o.length&&(y=!1)),x=T,k+=Oe(S)}return f==h&&o[0]==0&&y?this.result(-100+(u?-200:0),o,e):d==h&&p==0?[-200-e.length+(g==e.length?0:-100),0,g]:l>-1?[-700-e.length,l,l+this.pattern.length]:d==h?[-200+-700-e.length,p,g]:f==h?this.result(-100+(u?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[e-i.length],r=1;for(let o of t){let l=o+(this.astral?Oe(ne(i,o)):1);r>1&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return s}}const ve=D.define({combine(n){return At(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Up,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Yo(e(i),t(i)),optionClass:(e,t)=>i=>Yo(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function Yo(n,e){return n?e?n+" "+e:n:e}function Up(n,e,t,i,s){let r=n.textDirection==_.RTL,o=r,l=!1,h="top",a,c,f=e.left-s.left,u=s.right-e.right,d=i.right-i.left,p=i.bottom-i.top;if(o&&f=p||g>e.top?a=t.bottom-e.top:(h="bottom",a=e.bottom-t.top)}return{style:`${h}: ${a}px; max-width: ${c}px`,class:"cm-completionInfo-"+(l?r?"left-narrow":"right-narrow":o?"left":"right")}}function Gp(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s){let r=document.createElement("span");r.className="cm-completionLabel";let{label:o}=t,l=0;for(let h=1;hl&&r.appendChild(document.createTextNode(o.slice(l,a)));let f=r.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(o.slice(a,c))),f.className="cm-completionMatchedText",l=c}return lt.position-i.position).map(t=>t.render)}function Qo(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class Jp{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:r}=i.open,o=e.state.facet(ve);this.optionContent=Gp(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Qo(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{for(let h=l.target,a;h&&h!=this.dom;h=h.parentNode)if(h.nodeName=="LI"&&(a=/-(\d+)$/.exec(h.id))&&+a[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ve).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:mi.of(null)})}),this.list=this.dom.appendChild(this.createListBox(s,i.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var t,i,s;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=o&&(this.updateSel(),((t=r.open)===null||t===void 0?void 0:t.disabled)!=((i=o.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((s=r.open)===null||s===void 0)&&s.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Qo(t.options.length,t.selected,this.view.state.facet(ve).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o)}).catch(o=>Ee(this.view.state,o,"completion info")):this.addInfoPane(r)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&Xp(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof a!="string"&&a.header)s.appendChild(a.header(a));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let d=u(l,this.view.state,h);d&&c.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew Jp(e,n)}function Xp(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.topt.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function Zo(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function Yp(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:a}=h.completion;if(a){i||(i=[]);let c=typeof a=="string"?a:a.name;i.some(f=>f.name==c)||i.push(typeof a=="string"?{name:c}:a)}};for(let h of n)if(h.hasResult())if(h.result.filter===!1){let a=h.result.getMatch;for(let c of h.result.options){let f=[1e9-t.length];if(a)for(let u of a(c))f.push(u);s(new _o(c,h,f,f[0]))}}else{let a=new jp(e.sliceDoc(h.from,h.to)),c;for(let f of h.result.options)(c=a.match(f.label))&&s(new _o(f,h,c,c[0]+(f.boost||0)))}if(i){let h=Object.create(null),a=0,c=(f,u)=>{var d,p;return((d=f.rank)!==null&&d!==void 0?d:1e9)-((p=u.rank)!==null&&p!==void 0?p:1e9)||(f.namec.score-a.score||l(a.completion,c.completion)))!o||o.label!=h.completion.label||o.detail!=h.completion.detail||o.type!=null&&h.completion.type!=null&&o.type!=h.completion.type||o.apply!=h.completion.apply?r.push(h):Zo(h.completion)>Zo(o)&&(r[r.length-1]=h),o=h.completion;return r}class Pt{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Pt(this.options,el(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=Yp(e,t);if(!o.length)return s&&e.some(h=>h.state==1)?new Pt(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(ve).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let h=s.options[s.selected].completion;for(let a=0;aa.hasResult()?Math.min(h,a.from):h,1e8),create:_p(De),above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Pt(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Sn{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Sn(eg,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ve),r=(i.override||t.languageDataAt("autocomplete",ot(t)).map(Kp)).map(l=>(this.active.find(a=>a.source==l)||new Se(l,this.active.some(a=>a.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,h)=>l==this.active[h])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Qp(r,this.active)?o=Pt.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new Se(l.source,0):l));for(let l of e.effects)l.is(Ka)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new Sn(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Zp}}function Qp(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const eg=[];function js(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class Se{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=js(e),s=this;i?s=s.handleUserEvent(e,i,t):e.docChanged?s=s.handleChange(e):e.selection&&s.state!=0&&(s=new Se(s.source,0));for(let r of e.effects)if(r.is(mr))s=new Se(s.source,1,r.value?ot(e.state):-1);else if(r.is(mi))s=new Se(s.source,0);else if(r.is($a))for(let o of r.value)o.source==s.source&&(s=o);return s}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new Se(this.source,1)}handleChange(e){return e.changes.touchesRange(ot(e.startState))?new Se(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Se(this.source,this.state,e.mapPos(this.explicitPos))}}class oi extends Se{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}handleUserEvent(e,t,i){var s;let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=ot(e.state);if((this.explicitPos<0?l<=r:lo||t=="delete"&&ot(e.startState)==this.from)return new Se(this.source,t=="input"&&i.activateOnTyping?1:0);let h=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),a;return tg(this.result.validFor,e.state,r,o)?new oi(this.source,h,this.result,r,o):this.result.update&&(a=this.result.update(this.result,r,o,new Wa(e.state,l,h>=0)))?new oi(this.source,h,a,a.from,(s=a.to)!==null&&s!==void 0?s:ot(e.state)):new Se(this.source,1,h)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Se(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new oi(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function tg(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):Ha(n,!0).test(s)}const $a=E.define({map(n,e){return n.map(t=>t.map(e))}}),Ka=E.define(),De=be.define({create(){return Sn.start()},update(n,e){return n.update(e)},provide:n=>[Mh.from(n,e=>e.tooltip),O.contentAttributes.from(n,e=>e.attrs)]});function Ki(n,e="option"){return t=>{let i=t.state.field(De,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Ka.of(l)}),!0}}const ig=n=>{let e=n.state.field(De,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestampn.state.field(De,!1)?(n.dispatch({effects:mr.of(!0)}),!0):!1,sg=n=>{let e=n.state.field(De,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:mi.of(null)}),!0)};class rg{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const tl=50,og=50,lg=1e3,hg=ge.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(De).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(De);if(!n.selectionSet&&!n.docChanged&&n.startState.field(De)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!js(i));for(let i=0;iog&&Date.now()-s.time>lg){for(let r of s.context.abortListeners)try{r()}catch(o){Ee(this.view.state,o)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(s=>s.active.source==i.source))?setTimeout(()=>this.startUpdate(),tl):-1,this.composing!=0)for(let i of n.transactions)js(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(De);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=ot(e),i=new Wa(e,t,n.explicitPos==t),s=new rg(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:mi.of(null)}),Ee(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),tl))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ve);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new Se(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:$a.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(De,!1);if(e&&e.tooltip&&this.view.state.facet(ve).closeOnBlur){let t=e.open&&Dh(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&this.view.dispatch({effects:mi.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:mr.of(!1)}),20),this.composing=0}}}),ja=O.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class ag{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class yr{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,ce.TrackDel),i=e.mapPos(this.to,1,ce.TrackDel);return t==null||i==null?null:new yr(this.field,t,i)}}class br{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let h of this.lines){if(i.length){let a=o,c=/^\t*/.exec(h)[0].length;for(let f=0;fnew yr(h.field,s[h.line]+h.from,s[h.line]+h.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let l=r[1]?+r[1]:null,h=r[2]||r[3]||"",a=-1;for(let c=0;c=a&&f.field++}s.push(new ag(a,i.length,r.index,r.index+h.length)),o=o.slice(0,r.index)+h+o.slice(r.index+r[0].length)}for(let l;l=/\\([{}])/.exec(o);){o=o.slice(0,l.index)+l[1]+o.slice(l.index+l[0].length);for(let h of s)h.line==i.length&&h.from>l.index&&(h.from--,h.to--)}i.push(o)}return new br(i,s)}}let cg=B.widget({widget:new class extends at{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),fg=B.mark({class:"cm-snippetField"});class Jt{constructor(e,t){this.ranges=e,this.active=t,this.deco=B.set(e.map(i=>(i.from==i.to?cg:fg).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new Jt(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const vi=E.define({map(n,e){return n&&n.map(e)}}),ug=E.define(),yi=be.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(vi))return t.value;if(t.is(ug)&&n)return new Jt(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>O.decorations.from(n,e=>e?e.deco:B.none)});function wr(n,e){return b.create(n.filter(t=>t.field==e).map(t=>b.range(t.from,t.to)))}function dg(n){let e=br.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),h={changes:{from:s,to:r,insert:I.of(o)},scrollIntoView:!0,annotations:i?za.of(i):void 0};if(l.length&&(h.selection=wr(l,0)),l.length>1){let a=new Jt(l,0),c=h.effects=[vi.of(a)];t.state.field(yi,!1)===void 0&&c.push(E.appendConfig.of([yi,bg,wg,ja]))}t.dispatch(t.state.update(h))}}function Ua(n){return({state:e,dispatch:t})=>{let i=e.field(yi,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:wr(i.ranges,s),effects:vi.of(r?null:new Jt(i.ranges,s))})),!0}}const pg=({state:n,dispatch:e})=>n.field(yi,!1)?(e(n.update({effects:vi.of(null)})),!0):!1,gg=Ua(1),mg=Ua(-1),yg=[{key:"Tab",run:gg,shift:mg},{key:"Escape",run:pg}],il=D.define({combine(n){return n.length?n[0]:yg}}),bg=Ct.highest(tr.compute([il],n=>n.facet(il)));function tm(n,e){return Object.assign(Object.assign({},e),{apply:dg(n)})}const wg=O.domEventHandlers({mousedown(n,e){let t=e.state.field(yi,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:wr(t.ranges,s.field),effects:vi.of(t.ranges.some(r=>r.field>s.field)?new Jt(t.ranges,s.field):null)}),!0)}}),bi={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},mt=E.define({map(n,e){let t=e.mapPos(n,-1,ce.TrackAfter);return t??void 0}}),xr=new class extends bt{};xr.startSide=1;xr.endSide=-1;const Ga=be.define({create(){return j.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=j.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(mt)&&(n=n.update({add:[xr.range(t.value,t.value+1)]}));return n}});function im(){return[Sg,Ga]}const es="()[]{}<>";function Ja(n){for(let e=0;e{if((xg?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Oe(ne(i,0))==1||e!=s.from||t!=s.to)return!1;let r=vg(n.state,i);return r?(n.dispatch(r),!0):!1}),kg=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=_a(n,n.selection.main.head).brackets||bi.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=Cg(n.doc,o.head);for(let h of i)if(h==l&&In(n.doc,o.head)==Ja(ne(h,0)))return{changes:{from:o.head-h.length,to:o.head+h.length},range:b.cursor(o.head-h.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},nm=[{key:"Backspace",run:kg}];function vg(n,e){let t=_a(n,n.selection.main.head),i=t.brackets||bi.brackets;for(let s of i){let r=Ja(ne(s,0));if(e==s)return r==s?Dg(n,s,i.indexOf(s+s+s)>-1,t):Ag(n,s,r,t.before||bi.before);if(e==r&&Xa(n,n.selection.main.from))return Mg(n,s,r)}return null}function Xa(n,e){let t=!1;return n.field(Ga).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function In(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Oe(ne(t,0)))}function Cg(n,e){let t=n.sliceString(e-2,e);return Oe(ne(t,0))==t.length?t:t.slice(1)}function Ag(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:mt.of(o.to+e.length),range:b.range(o.anchor+e.length,o.head+e.length)};let l=In(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:mt.of(o.head+e.length),range:b.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Mg(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&In(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:b.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Dg(n,e,t,i){let s=i.stringPrefixes||bi.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:mt.of(l.to+e.length),range:b.range(l.anchor+e.length,l.head+e.length)};let h=l.head,a=In(n.doc,h),c;if(a==e){if(nl(n,h))return{changes:{insert:e+e,from:h},effects:mt.of(h+e.length),range:b.cursor(h+e.length)};if(Xa(n,h)){let u=t&&n.sliceDoc(h,h+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:h,to:h+u.length,insert:u},range:b.cursor(h+u.length)}}}else{if(t&&n.sliceDoc(h-2*e.length,h)==e+e&&(c=sl(n,h-2*e.length,s))>-1&&nl(n,c))return{changes:{insert:e+e+e+e,from:h},effects:mt.of(h+e.length),range:b.cursor(h+e.length)};if(n.charCategorizer(h)(a)!=$.Word&&sl(n,h,s)>-1&&!Og(n,h,e,s))return{changes:{insert:e+e,from:h},effects:mt.of(h+e.length),range:b.cursor(h+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function nl(n,e){let t=ye(n).resolveInner(e+1);return t.parent&&t.from==e}function Og(n,e,t,i){let s=ye(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),h=l.indexOf(t);if(!h||h>-1&&i.indexOf(l.slice(0,h))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+h;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let a=s.to==e&&s.parent;if(!a)break;s=a}return!1}function sl(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=$.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=$.Word)return r}return-1}function sm(n={}){return[De,ve.of(n),hg,Bg,ja]}const Tg=[{key:"Ctrl-Space",run:ng},{key:"Escape",run:sg},{key:"ArrowDown",run:Ki(!0)},{key:"ArrowUp",run:Ki(!1)},{key:"PageDown",run:Ki(!0,"page")},{key:"PageUp",run:Ki(!1,"page")},{key:"Enter",run:ig}],Bg=Ct.highest(tr.computeN([ve],n=>n.facet(ve).defaultKeymap?[Tg]:[]));export{$g as A,Kg as B,kn as C,uu as D,O as E,jg as F,Hg as G,ye as H,U as I,Fg as J,em as K,Is as L,qp as M,ir as N,b as O,Ph as P,qg as Q,zg as R,jh as S,V as T,Eu as U,tm as V,Eh as W,Qu as X,N as a,Lg as b,_g as c,Pg as d,Rg as e,Jg as f,im as g,Ng as h,Qg as i,nm as j,tr as k,Yg as l,Zg as m,Xg as n,Tg as o,sm as p,Eg as q,Ig as r,Ug as s,Gg as t,me as u,R as v,Tu as w,C as x,Vg as y,Fu as z}; +`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;let o=this.ranges[++this.rangeIndex].from;t+=o-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new Kh(t,e?e.state.tabSize:4,e?vt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Gh(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return s}throw new Error("Stream parser failed to advance stream.")}const hr=Object.create(null),pi=[me.none],rd=new ir(pi),No=[],Jh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Jh[n]=Xh(hr,e);class _h{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Jh)}resolve(e){return e?this.table[e]||(this.table[e]=Xh(this.extra,e)):0}}const od=new _h(hr);function Xn(n,e){No.indexOf(n)>-1||(No.push(n),console.warn(e))}function Xh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||C[r];o?typeof o=="function"?t?t=o(t):Xn(r,`Modifier ${r} used at start of tag`):t?Xn(r,`Tag ${r} used as modifier`):t=o:Xn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=me.define({id:pi.length,name:i,props:[Tu({[i]:t})]});return pi.push(s),s.id}function ld(n){let e=me.define({id:pi.length,name:"Document",props:[pt.add(()=>n)]});return pi.push(e),e}const hd=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=cr(n.state,t.from);return i.line?ad(n):i.block?fd(n):!1};function ar(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const ad=ar(pd,0),cd=ar(Yh,0),fd=ar((n,e)=>Yh(n,e,dd(e)),0);function cr(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const ei=50;function ud(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-ei,i),o=n.sliceDoc(s,s+ei),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*ei?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+ei),f=n.sliceDoc(s-ei,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function dd(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Yh(n,e,t=e.selection.ranges){let i=t.map(r=>cr(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>ud(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,p=f.text.slice(u,u+a.length)==a?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:h,indent:a,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+a,insert:h+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:h}of i)if(l>=0){let a=o.from+l,c=a+h.length;o.text[c-o.from]==" "&&c++,r.push({from:a,to:c})}return{changes:r}}return null}const Ws=Qe.define(),gd=Qe.define(),md=D.define(),Qh=D.define({combine(n){return Ct(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}});function yd(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const Zh=be.define({create(){return je.empty},update(n,e){let t=e.state.facet(Qh),i=e.annotation(Ws);if(i){let h=e.docChanged?b.single(yd(e.changes)):void 0,a=ve.fromTransaction(e,h),c=i.side,f=c==0?n.undone:n.done;return a?f=pn(f,f.length,t.minDepth,a):f=ia(f,e.startState.selection),new je(c==0?i.rest:f,c==0?f:i.rest)}let s=e.annotation(gd);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(ee.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=ve.fromTransaction(e),o=e.annotation(ee.time),l=e.annotation(ee.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new je(n.done.map(ve.fromJSON),n.undone.map(ve.fromJSON))}});function _g(n={}){return[Zh,Qh.of(n),O.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?ea:e.inputType=="historyRedo"?Hs:null;return i?(e.preventDefault(),i(t)):!1}})]}function Bn(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Zh,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const ea=Bn(0,!1),Hs=Bn(1,!1),bd=Bn(0,!0),wd=Bn(1,!0);class ve{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new ve(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new ve(e.changes&&Z.fromJSON(e.changes),[],e.mapped&&Ue.fromJSON(e.mapped),e.startSelection&&b.fromJSON(e.startSelection),e.selectionsAfter.map(b.fromJSON))}static fromTransaction(e,t){let i=Pe;for(let s of e.startState.facet(md)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new ve(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Pe)}static selection(e){return new ve(void 0,Pe,void 0,void 0,e)}}function pn(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function xd(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let h=0;h=a&&o<=c&&(i=!0)}}),i}function Sd(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function ta(n,e){return n.length?e.length?n.concat(e):n:e}const Pe=[],vd=200;function ia(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-vd));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),pn(n,n.length-1,1e9,t.setSelAfter(i)))}else return[ve.selection([e])]}function kd(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Yn(n,e){if(!n.length)return n;let t=n.length,i=Pe;for(;t;){let s=Cd(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[ve.selection(i)]:Pe}function Cd(n,e,t){let i=ta(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):Pe,t);if(!n.changes)return ve.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new ve(s,E.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const Ad=/^(input\.type|delete)($|\.)/;class je{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new je(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||Ad.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Pn(t,e))}function fe(n){return n.textDirectionAt(n.state.selection.main.head)==J.LTR}const sa=n=>na(n,!fe(n)),ra=n=>na(n,fe(n));function oa(n,e){return Ie(n,t=>t.empty?n.moveByGroup(t,e):Pn(t,e))}const Md=n=>oa(n,!fe(n)),Dd=n=>oa(n,fe(n));function Od(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Rn(n,e,t){let i=ye(n).resolveInner(e.head),s=t?R.closedBy:R.openedBy;for(let h=e.head;;){let a=t?i.childAfter(h):i.childBefore(h);if(!a)break;Od(n,a,s)?i=a:h=t?a.to:a.from}let r=i.type.prop(s),o,l;return r&&(o=t?Ke(n,i.from,1):Ke(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,b.cursor(l,t?-1:1)}const Td=n=>Ie(n,e=>Rn(n.state,e,!fe(n))),Bd=n=>Ie(n,e=>Rn(n.state,e,fe(n)));function la(n,e){return Ie(n,t=>{if(!t.empty)return Pn(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const ha=n=>la(n,!1),aa=n=>la(n,!0);function ca(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Pn(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),h=l.top+t.marginTop,a=l.bottom-t.marginBottom;o&&o.top>h&&o.bottomfa(n,!1),zs=n=>fa(n,!0);function at(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=b.cursor(i.from+r))}return s}const Pd=n=>Ie(n,e=>at(n,e,!0)),Rd=n=>Ie(n,e=>at(n,e,!1)),Ld=n=>Ie(n,e=>at(n,e,!fe(n))),Ed=n=>Ie(n,e=>at(n,e,fe(n))),Id=n=>Ie(n,e=>b.cursor(n.lineBlockAt(e.head).from,1)),Nd=n=>Ie(n,e=>b.cursor(n.lineBlockAt(e.head).to,-1));function Fd(n,e,t){let i=!1,s=Gt(n.selection,r=>{let o=Ke(n,r.head,-1)||Ke(n,r.head,1)||r.head>0&&Ke(n,r.head-1,1)||r.headFd(n,e,!1);function Le(n,e){let t=Gt(n.state.selection,i=>{let s=e(i);return b.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Je(n.state,t)),!0)}function ua(n,e){return Le(n,t=>n.moveByChar(t,e))}const da=n=>ua(n,!fe(n)),pa=n=>ua(n,fe(n));function ga(n,e){return Le(n,t=>n.moveByGroup(t,e))}const Wd=n=>ga(n,!fe(n)),Hd=n=>ga(n,fe(n)),zd=n=>Le(n,e=>Rn(n.state,e,!fe(n))),qd=n=>Le(n,e=>Rn(n.state,e,fe(n)));function ma(n,e){return Le(n,t=>n.moveVertically(t,e))}const ya=n=>ma(n,!1),ba=n=>ma(n,!0);function wa(n,e){return Le(n,t=>n.moveVertically(t,e,ca(n).height))}const Vo=n=>wa(n,!1),Wo=n=>wa(n,!0),$d=n=>Le(n,e=>at(n,e,!0)),Kd=n=>Le(n,e=>at(n,e,!1)),jd=n=>Le(n,e=>at(n,e,!fe(n))),Ud=n=>Le(n,e=>at(n,e,fe(n))),Gd=n=>Le(n,e=>b.cursor(n.lineBlockAt(e.head).from)),Jd=n=>Le(n,e=>b.cursor(n.lineBlockAt(e.head).to)),Ho=({state:n,dispatch:e})=>(e(Je(n,{anchor:0})),!0),zo=({state:n,dispatch:e})=>(e(Je(n,{anchor:n.doc.length})),!0),qo=({state:n,dispatch:e})=>(e(Je(n,{anchor:n.selection.main.anchor,head:0})),!0),$o=({state:n,dispatch:e})=>(e(Je(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),_d=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),Xd=({state:n,dispatch:e})=>{let t=En(n).map(({from:i,to:s})=>b.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:b.create(t),userEvent:"select"})),!0},Yd=({state:n,dispatch:e})=>{let t=Gt(n.selection,i=>{var s;let r=ye(n).resolveInner(i.head,1);for(;!(r.from=i.to||r.to>i.to&&r.from<=i.from||!(!((s=r.parent)===null||s===void 0)&&s.parent));)r=r.parent;return b.range(r.to,r.from)});return e(Je(n,t)),!0},Qd=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=b.create([t.main]):t.main.empty||(i=b.create([b.cursor(t.main.head)])),i?(e(Je(n,i)),!0):!1};function Ln(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let h=e(o);ho&&(t="delete.forward",h=zi(n,h,!0)),o=Math.min(o,h),l=Math.max(l,h)}else o=zi(n,o,!1),l=zi(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:b.cursor(o)}});return s.changes.empty?!1:(n.dispatch(i.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?O.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function zi(n,e,t){if(n instanceof O)for(let i of n.state.facet(O.atomicRanges).map(s=>s(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const xa=(n,e)=>Ln(n,t=>{let{state:i}=n,s=i.doc.lineAt(t),r,o;if(!e&&t>s.from&&txa(n,!1),Sa=n=>xa(n,!0),va=(n,e)=>Ln(n,t=>{let i=t,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let h=ue(r.text,i-r.from,e)+r.from,a=r.text.slice(Math.min(i,h)-r.from,Math.max(i,h)-r.from),c=o(a);if(l!=null&&c!=l)break;(a!=" "||i!=t)&&(l=c),i=h}return i}),ka=n=>va(n,!1),Zd=n=>va(n,!0),Ca=n=>Ln(n,e=>{let t=n.lineBlockAt(e).to;return eLn(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),tp=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:I.of(["",""])},range:b.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},ip=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:ue(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:ue(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:b.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function En(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function Aa(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of En(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let h of r.ranges)s.push(b.range(Math.min(n.doc.length,h.anchor+l),Math.min(n.doc.length,h.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let h of r.ranges)s.push(b.range(h.anchor-l,h.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:b.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const np=({state:n,dispatch:e})=>Aa(n,e,!1),sp=({state:n,dispatch:e})=>Aa(n,e,!0);function Ma(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of En(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const rp=({state:n,dispatch:e})=>Ma(n,e,!1),op=({state:n,dispatch:e})=>Ma(n,e,!0),lp=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(En(e).map(({from:s,to:r})=>(s>0?s--:rn.moveVertically(s,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function hp(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ye(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(R.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from?{from:i.to,to:s.from}:null}const ap=Da(!1),cp=Da(!0);function Da(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),h=!n&&r==o&&hp(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let a=new On(e,{simulateBreak:r,simulateDoubleBreak:!!h}),c=Fh(a,r);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(r).text)[0].length);ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:b.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const fp=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new On(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=fr(n,(r,o,l)=>{let h=Fh(i,r.from);if(h==null)return;/\S/.test(r.text)||(h=0);let a=/^\s*/.exec(r.text)[0],c=dn(n,h);(a!=c||l.fromn.readOnly?!1:(e(n.update(fr(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Dn)})}),{userEvent:"input.indent"})),!0),dp=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(fr(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=wi(s,n.tabSize),o=0,l=dn(n,Math.max(0,r-vt(n)));for(;o({mac:n.key,run:n.run,shift:n.shift}))),Yg=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Td,shift:zd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Bd,shift:qd},{key:"Alt-ArrowUp",run:np},{key:"Shift-Alt-ArrowUp",run:rp},{key:"Alt-ArrowDown",run:sp},{key:"Shift-Alt-ArrowDown",run:op},{key:"Escape",run:Qd},{key:"Mod-Enter",run:cp},{key:"Alt-l",mac:"Ctrl-l",run:Xd},{key:"Mod-i",run:Yd,preventDefault:!0},{key:"Mod-[",run:dp},{key:"Mod-]",run:up},{key:"Mod-Alt-\\",run:fp},{key:"Shift-Mod-k",run:lp},{key:"Shift-Mod-\\",run:Vd},{key:"Mod-/",run:hd},{key:"Alt-A",run:cd}].concat(gp);function he(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class Ut{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Ko(l)):Ko,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ne(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Us(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Oe(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),h=this.match(l,o);if(h)return this.value=h,this;if(r==s.length-1)break;o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=gn(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new Nt(t,e.sliceString(t,i));return Qn.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=gn(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Nt.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Ba.prototype[Symbol.iterator]=Pa.prototype[Symbol.iterator]=function(){return this});function mp(n){try{return new RegExp(n,ur),!0}catch{return!1}}function gn(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function $s(n){let e=he("input",{class:"cm-textfield",name:"line"}),t=he("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),n.dispatch({effects:mn.of(!1)}),n.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},he("label",n.state.phrase("Go to line"),": ",e)," ",he("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!s)return;let{state:r}=n,o=r.doc.lineAt(r.selection.main.head),[,l,h,a,c]=s,f=a?+a.slice(1):0,u=h?+h:o.number;if(h&&c){let p=u/100;l&&(p=p*(l=="-"?-1:1)+o.number/r.doc.lines),u=Math.round(r.doc.lines*p)}else h&&l&&(u=u*(l=="-"?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u)));n.dispatch({effects:mn.of(!1),selection:b.cursor(d.from+Math.max(0,Math.min(f,d.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const mn=E.define(),jo=be.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(mn)&&(n=t.value);return n},provide:n=>hn.from(n,e=>e?$s:null)}),yp=n=>{let e=ln(n,$s);if(!e){let t=[mn.of(!0)];n.state.field(jo,!1)==null&&t.push(E.appendConfig.of([jo,bp])),n.dispatch({effects:t}),e=ln(n,$s)}return e&&e.dom.querySelector("input").focus(),!0},bp=O.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),wp={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ra=D.define({combine(n){return Ct(n,wp,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Qg(n){let e=[Cp,kp];return n&&e.push(Ra.of(n)),e}const xp=B.mark({class:"cm-selectionMatch"}),Sp=B.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Uo(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=q.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=q.Word)}function vp(n,e,t,i){return n(e.sliceDoc(t,t+1))==q.Word&&n(e.sliceDoc(i-1,i))==q.Word}const kp=ge.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(Ra),{state:t}=n,i=t.selection;if(i.ranges.length>1)return B.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return B.none;let h=t.wordAt(s.head);if(!h)return B.none;o=t.charCategorizer(s.head),r=t.sliceDoc(h.from,h.to)}else{let h=s.to-s.from;if(h200)return B.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Uo(o,t,s.from,s.to)&&vp(o,t,s.from,s.to)))return B.none}else if(r=t.sliceDoc(s.from,s.to).trim(),!r)return B.none}let l=[];for(let h of n.visibleRanges){let a=new Ut(t.doc,r,h.from,h.to);for(;!a.next().done;){let{from:c,to:f}=a.value;if((!o||Uo(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(Sp.range(c,f)):(c>=s.to||f<=s.from)&&l.push(xp.range(c,f)),l.length>e.maxMatches))return B.none}}return B.set(l)}},{decorations:n=>n.decorations}),Cp=O.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ap=({state:n,dispatch:e})=>{let{selection:t}=n,i=b.create(t.ranges.map(s=>n.wordAt(s.head)||b.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function Mp(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new Ut(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Ut(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(h=>h.from==l.value.from))continue;if(r){let h=n.wordAt(l.value.from);if(!h||h.from!=l.value.from||h.to!=l.value.to)continue}return l.value}}const Dp=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return Ap({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=Mp(n,i);return s?(e(n.update({selection:n.selection.addRange(b.range(s.from,s.to),!1),effects:O.scrollIntoView(s.to)})),!0):!1},Jt=D.define({combine(n){return Ct(n,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Vp(e),scrollToMatch:e=>O.scrollIntoView(e)})}});class La{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||mp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Pp(this):new Tp(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Tt(this,s,t,i):Ot(this,s,t,i)}}class Ea{constructor(e){this.spec=e}}function Ot(n,e,t,i){return new Ut(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?Op(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Op(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ot(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Tt(n,e,t,i){return new Ba(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Bp(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function yn(n,e){return n.slice(ue(n,e,!1),e)}function bn(n,e){return n.slice(e,ue(n,e))}function Bp(n){return(e,t,i)=>!i[0].length||(n(yn(i.input,i.index))!=q.Word||n(bn(i.input,i.index))!=q.Word)&&(n(bn(i.input,i.index+i[0].length))!=q.Word||n(yn(i.input,i.index+i[0].length))!=q.Word)}class Pp extends Ea{nextMatch(e,t,i){let s=Tt(this.spec,e,i,e.doc.length).next();return s.done&&(s=Tt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Tt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Tt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const gi=E.define(),dr=E.define(),st=be.define({create(n){return new Zn(Ks(n).create(),null)},update(n,e){for(let t of e.effects)t.is(gi)?n=new Zn(t.value.create(),n.panel):t.is(dr)&&(n=new Zn(n.query,t.value?pr:null));return n},provide:n=>hn.from(n,e=>e.panel)});class Zn{constructor(e,t){this.query=e,this.panel=t}}const Rp=B.mark({class:"cm-searchMatch"}),Lp=B.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Ep=ge.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(st))}update(n){let e=n.state.field(st);(e!=n.startState.field(st)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return B.none;let{view:t}=this,i=new bt;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?Lp:Rp)})}return i.finish()}},{decorations:n=>n.decorations});function vi(n){return e=>{let t=e.state.field(st,!1);return t&&t.query.spec.valid?n(e,t):Fa(e)}}const wn=vi((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=b.single(i.from,i.to),r=n.state.facet(Jt);return n.dispatch({selection:s,effects:[gr(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),Na(n),!0}),xn=vi((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=b.single(s.from,s.to),o=n.state.facet(Jt);return n.dispatch({selection:r,effects:[gr(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),Na(n),!0}),Ip=vi((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:b.create(t.map(i=>b.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),Np=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Ut(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(b.range(l.value.from,l.value.to))}return e(n.update({selection:b.create(r,o),userEvent:"select.search.matches"})),!0},Go=vi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l=b.single(r.from-c,r.to-c),a.push(gr(n,r)),a.push(t.facet(Jt).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:a,userEvent:"input.replace"}),!0}),Fp=vi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:O.announce.of(i),userEvent:"input.replace.all"}),!0});function pr(n){return n.state.facet(Jt).createPanel(n)}function Ks(n,e){var t,i,s,r;let o=n.selection.main,l=o.empty||o.to>o.from+100?"":n.sliceDoc(o.from,o.to);if(e&&!l)return e;let h=n.facet(Jt);return new La({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,wholeWord:(r=e==null?void 0:e.wholeWord)!==null&&r!==void 0?r:h.wholeWord})}function Ia(n){let e=ln(n,pr);return e&&e.dom.querySelector("[main-field]")}function Na(n){let e=Ia(n);e&&e==n.root.activeElement&&e.select()}const Fa=n=>{let e=n.state.field(st,!1);if(e&&e.panel){let t=Ia(n);if(t&&t!=n.root.activeElement){let i=Ks(n.state,e.query.spec);i.valid&&n.dispatch({effects:gi.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[dr.of(!0),e?gi.of(Ks(n.state,e.query.spec)):E.appendConfig.of(Hp)]});return!0},Va=n=>{let e=n.state.field(st,!1);if(!e||!e.panel)return!1;let t=ln(n,pr);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:dr.of(!1)}),!0},Zg=[{key:"Mod-f",run:Fa,scope:"editor search-panel"},{key:"F3",run:wn,shift:xn,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:wn,shift:xn,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Va,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Np},{key:"Alt-g",run:yp},{key:"Mod-d",run:Dp,preventDefault:!0}];class Vp{constructor(e){this.view=e;let t=this.query=e.state.field(st).query.spec;this.commit=this.commit.bind(this),this.searchField=he("input",{value:t.search,placeholder:Ce(e,"Find"),"aria-label":Ce(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=he("input",{value:t.replace,placeholder:Ce(e,"Replace"),"aria-label":Ce(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=he("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=he("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=he("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return he("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=he("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>wn(e),[Ce(e,"next")]),i("prev",()=>xn(e),[Ce(e,"previous")]),i("select",()=>Ip(e),[Ce(e,"all")]),he("label",null,[this.caseField,Ce(e,"match case")]),he("label",null,[this.reField,Ce(e,"regexp")]),he("label",null,[this.wordField,Ce(e,"by word")]),...e.state.readOnly?[]:[he("br"),this.replaceField,i("replace",()=>Go(e),[Ce(e,"replace")]),i("replaceAll",()=>Fp(e),[Ce(e,"replace all")])],he("button",{name:"close",onclick:()=>Va(e),"aria-label":Ce(e,"close"),type:"button"},["×"])])}commit(){let e=new La({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:gi.of(e)}))}keydown(e){If(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?xn:wn)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Go(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(gi)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Jt).top}}function Ce(n,e){return n.state.phrase(e)}const qi=30,$i=/[\s\.,:;?!]/;function gr(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-qi),o=Math.min(s,t+qi),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let h=0;hl.length-qi;h--)if(!$i.test(l[h-1])&&$i.test(l[h])){l=l.slice(0,h);break}}return O.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const Wp=O.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Hp=[st,kt.lowest(Ep),Wp];class Wa{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=ye(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(Ha(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function Jo(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function zp(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:zp(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function em(n,e){return t=>{for(let i=ye(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class _o{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function rt(n){return n.selection.main.from}function Ha(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const za=Qe.define();function $p(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i)?{range:l}:{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:e},range:b.cursor(l.from+r+e.length)})),{userEvent:"input.complete"})}const Xo=new WeakMap;function Kp(n){if(!Array.isArray(n))return n;let e=Xo.get(n);return e||Xo.set(n,e=qp(n)),e}const mr=E.define(),mi=E.define();class jp{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(k=Us(S))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!v||T==1&&m||x==0&&T!=0)&&(t[f]==S||i[f]==S&&(u=!0)?o[f++]=v:o.length&&(y=!1)),x=T,v+=Oe(S)}return f==h&&o[0]==0&&y?this.result(-100+(u?-200:0),o,e):d==h&&p==0?[-200-e.length+(g==e.length?0:-100),0,g]:l>-1?[-700-e.length,l,l+this.pattern.length]:d==h?[-200+-700-e.length,p,g]:f==h?this.result(-100+(u?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[e-i.length],r=1;for(let o of t){let l=o+(this.astral?Oe(ne(i,o)):1);r>1&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return s}}const ke=D.define({combine(n){return Ct(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Up,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Yo(e(i),t(i)),optionClass:(e,t)=>i=>Yo(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function Yo(n,e){return n?e?n+" "+e:n:e}function Up(n,e,t,i,s){let r=n.textDirection==J.RTL,o=r,l=!1,h="top",a,c,f=e.left-s.left,u=s.right-e.right,d=i.right-i.left,p=i.bottom-i.top;if(o&&f=p||g>e.top?a=t.bottom-e.top:(h="bottom",a=e.bottom-t.top)}return{style:`${h}: ${a}px; max-width: ${c}px`,class:"cm-completionInfo-"+(l?r?"left-narrow":"right-narrow":o?"left":"right")}}function Ki(n,e="option"){return t=>{let i=t.state.field(Me,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Ka.of(l)}),!0}}const Gp=n=>{let e=n.state.field(Me,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestampn.state.field(Me,!1)?(n.dispatch({effects:mr.of(!0)}),!0):!1,_p=n=>{let e=n.state.field(Me,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:mi.of(null)}),!0)};class Xp{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Qo=50,Yp=50,Qp=1e3,Zp=ge.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(Me).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Me);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Me)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!js(i));for(let i=0;iYp&&Date.now()-s.time>Qp){for(let r of s.context.abortListeners)try{r()}catch(o){Ee(this.view.state,o)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(s=>s.active.source==i.source))?setTimeout(()=>this.startUpdate(),Qo):-1,this.composing!=0)for(let i of n.transactions)js(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(Me);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=rt(e),i=new Wa(e,t,n.explicitPos==t),s=new Xp(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:mi.of(null)}),Ee(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),Qo))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ke);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new Se(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:$a.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Me,!1);if(e&&e.tooltip&&this.view.state.facet(ke).closeOnBlur){let t=e.open&&Dh(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&this.view.dispatch({effects:mi.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:mr.of(!1)}),20),this.composing=0}}});function qa(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(Me).active.find(s=>s.source==e.source);return i instanceof Ft?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},$p(n.state,t,i.from,i.to)),{annotations:za.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}function eg(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s){let r=document.createElement("span");r.className="cm-completionLabel";let{label:o}=t,l=0;for(let h=1;hl&&r.appendChild(document.createTextNode(o.slice(l,a)));let f=r.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(o.slice(a,c))),f.className="cm-completionMatchedText",l=c}return lt.position-i.position).map(t=>t.render)}function Zo(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class tg{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:r}=i.open,o=e.state.facet(ke);this.optionContent=eg(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Zo(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{for(let h=l.target,a;h&&h!=this.dom;h=h.parentNode)if(h.nodeName=="LI"&&(a=/-(\d+)$/.exec(h.id))&&+a[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ke).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:mi.of(null)})}),this.list=this.dom.appendChild(this.createListBox(s,i.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var t,i,s;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=o&&(this.updateSel(),((t=r.open)===null||t===void 0?void 0:t.disabled)!=((i=o.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((s=r.open)===null||s===void 0)&&s.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Zo(t.options.length,t.selected,this.view.state.facet(ke).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o)}).catch(o=>Ee(this.view.state,o,"completion info")):this.addInfoPane(r)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&ng(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof a!="string"&&a.header)s.appendChild(a.header(a));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let d=u(l,this.view.state,h);d&&c.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew tg(e,n)}function ng(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.topt.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function el(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function sg(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:a}=h.completion;if(a){i||(i=[]);let c=typeof a=="string"?a:a.name;i.some(f=>f.name==c)||i.push(typeof a=="string"?{name:c}:a)}};for(let h of n)if(h.hasResult())if(h.result.filter===!1){let a=h.result.getMatch;for(let c of h.result.options){let f=[1e9-t.length];if(a)for(let u of a(c))f.push(u);s(new _o(c,h.source,f,f[0]))}}else{let a=new jp(e.sliceDoc(h.from,h.to)),c;for(let f of h.result.options)(c=a.match(f.label))&&s(new _o(f,h.source,c,c[0]+(f.boost||0)))}if(i){let h=Object.create(null),a=0,c=(f,u)=>{var d,p;return((d=f.rank)!==null&&d!==void 0?d:1e9)-((p=u.rank)!==null&&p!==void 0?p:1e9)||(f.namec.score-a.score||l(a.completion,c.completion)))!o||o.label!=h.completion.label||o.detail!=h.completion.detail||o.type!=null&&h.completion.type!=null&&o.type!=h.completion.type||o.apply!=h.completion.apply?r.push(h):el(h.completion)>el(o)&&(r[r.length-1]=h),o=h.completion;return r}class Pt{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Pt(this.options,tl(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=sg(e,t);if(!o.length)return s&&e.some(h=>h.state==1)?new Pt(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(ke).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let h=s.options[s.selected].completion;for(let a=0;aa.hasResult()?Math.min(h,a.from):h,1e8),create:ig(Me),above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Pt(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Sn{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Sn(lg,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ke),r=(i.override||t.languageDataAt("autocomplete",rt(t)).map(Kp)).map(l=>(this.active.find(a=>a.source==l)||new Se(l,this.active.some(a=>a.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,h)=>l==this.active[h])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!rg(r,this.active)?o=Pt.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new Se(l.source,0):l));for(let l of e.effects)l.is(Ka)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new Sn(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:og}}function rg(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const lg=[];function js(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class Se{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=js(e),s=this;i?s=s.handleUserEvent(e,i,t):e.docChanged?s=s.handleChange(e):e.selection&&s.state!=0&&(s=new Se(s.source,0));for(let r of e.effects)if(r.is(mr))s=new Se(s.source,1,r.value?rt(e.state):-1);else if(r.is(mi))s=new Se(s.source,0);else if(r.is($a))for(let o of r.value)o.source==s.source&&(s=o);return s}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new Se(this.source,1)}handleChange(e){return e.changes.touchesRange(rt(e.startState))?new Se(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Se(this.source,this.state,e.mapPos(this.explicitPos))}}class Ft extends Se{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}handleUserEvent(e,t,i){var s;let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=rt(e.state);if((this.explicitPos<0?l<=r:lo||t=="delete"&&rt(e.startState)==this.from)return new Se(this.source,t=="input"&&i.activateOnTyping?1:0);let h=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),a;return hg(this.result.validFor,e.state,r,o)?new Ft(this.source,h,this.result,r,o):this.result.update&&(a=this.result.update(this.result,r,o,new Wa(e.state,l,h>=0)))?new Ft(this.source,h,a,a.from,(s=a.to)!==null&&s!==void 0?s:rt(e.state)):new Se(this.source,1,h)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Se(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new Ft(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function hg(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):Ha(n,!0).test(s)}const $a=E.define({map(n,e){return n.map(t=>t.map(e))}}),Ka=E.define(),Me=be.define({create(){return Sn.start()},update(n,e){return n.update(e)},provide:n=>[Mh.from(n,e=>e.tooltip),O.contentAttributes.from(n,e=>e.attrs)]}),ja=O.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class ag{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class yr{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,ce.TrackDel),i=e.mapPos(this.to,1,ce.TrackDel);return t==null||i==null?null:new yr(this.field,t,i)}}class br{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let h of this.lines){if(i.length){let a=o,c=/^\t*/.exec(h)[0].length;for(let f=0;fnew yr(h.field,s[h.line]+h.from,s[h.line]+h.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let l=r[1]?+r[1]:null,h=r[2]||r[3]||"",a=-1;for(let c=0;c=a&&f.field++}s.push(new ag(a,i.length,r.index,r.index+h.length)),o=o.slice(0,r.index)+h+o.slice(r.index+r[0].length)}for(let l;l=/\\([{}])/.exec(o);){o=o.slice(0,l.index)+l[1]+o.slice(l.index+l[0].length);for(let h of s)h.line==i.length&&h.from>l.index&&(h.from--,h.to--)}i.push(o)}return new br(i,s)}}let cg=B.widget({widget:new class extends ht{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),fg=B.mark({class:"cm-snippetField"});class _t{constructor(e,t){this.ranges=e,this.active=t,this.deco=B.set(e.map(i=>(i.from==i.to?cg:fg).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new _t(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const ki=E.define({map(n,e){return n&&n.map(e)}}),ug=E.define(),yi=be.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(ki))return t.value;if(t.is(ug)&&n)return new _t(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>O.decorations.from(n,e=>e?e.deco:B.none)});function wr(n,e){return b.create(n.filter(t=>t.field==e).map(t=>b.range(t.from,t.to)))}function dg(n){let e=br.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),h={changes:{from:s,to:r,insert:I.of(o)},scrollIntoView:!0,annotations:i?za.of(i):void 0};if(l.length&&(h.selection=wr(l,0)),l.length>1){let a=new _t(l,0),c=h.effects=[ki.of(a)];t.state.field(yi,!1)===void 0&&c.push(E.appendConfig.of([yi,bg,wg,ja]))}t.dispatch(t.state.update(h))}}function Ua(n){return({state:e,dispatch:t})=>{let i=e.field(yi,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:wr(i.ranges,s),effects:ki.of(r?null:new _t(i.ranges,s))})),!0}}const pg=({state:n,dispatch:e})=>n.field(yi,!1)?(e(n.update({effects:ki.of(null)})),!0):!1,gg=Ua(1),mg=Ua(-1),yg=[{key:"Tab",run:gg,shift:mg},{key:"Escape",run:pg}],il=D.define({combine(n){return n.length?n[0]:yg}}),bg=kt.highest(tr.compute([il],n=>n.facet(il)));function tm(n,e){return Object.assign(Object.assign({},e),{apply:dg(n)})}const wg=O.domEventHandlers({mousedown(n,e){let t=e.state.field(yi,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:wr(t.ranges,s.field),effects:ki.of(t.ranges.some(r=>r.field>s.field)?new _t(t.ranges,s.field):null)}),!0)}}),bi={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},gt=E.define({map(n,e){let t=e.mapPos(n,-1,ce.TrackAfter);return t??void 0}}),xr=new class extends yt{};xr.startSide=1;xr.endSide=-1;const Ga=be.define({create(){return K.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=K.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(gt)&&(n=n.update({add:[xr.range(t.value,t.value+1)]}));return n}});function im(){return[Sg,Ga]}const es="()[]{}<>";function Ja(n){for(let e=0;e{if((xg?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Oe(ne(i,0))==1||e!=s.from||t!=s.to)return!1;let r=kg(n.state,i);return r?(n.dispatch(r),!0):!1}),vg=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=_a(n,n.selection.main.head).brackets||bi.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=Cg(n.doc,o.head);for(let h of i)if(h==l&&In(n.doc,o.head)==Ja(ne(h,0)))return{changes:{from:o.head-h.length,to:o.head+h.length},range:b.cursor(o.head-h.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},nm=[{key:"Backspace",run:vg}];function kg(n,e){let t=_a(n,n.selection.main.head),i=t.brackets||bi.brackets;for(let s of i){let r=Ja(ne(s,0));if(e==s)return r==s?Dg(n,s,i.indexOf(s+s+s)>-1,t):Ag(n,s,r,t.before||bi.before);if(e==r&&Xa(n,n.selection.main.from))return Mg(n,s,r)}return null}function Xa(n,e){let t=!1;return n.field(Ga).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function In(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Oe(ne(t,0)))}function Cg(n,e){let t=n.sliceString(e-2,e);return Oe(ne(t,0))==t.length?t:t.slice(1)}function Ag(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:gt.of(o.to+e.length),range:b.range(o.anchor+e.length,o.head+e.length)};let l=In(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:gt.of(o.head+e.length),range:b.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Mg(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&In(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:b.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Dg(n,e,t,i){let s=i.stringPrefixes||bi.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:gt.of(l.to+e.length),range:b.range(l.anchor+e.length,l.head+e.length)};let h=l.head,a=In(n.doc,h),c;if(a==e){if(nl(n,h))return{changes:{insert:e+e,from:h},effects:gt.of(h+e.length),range:b.cursor(h+e.length)};if(Xa(n,h)){let u=t&&n.sliceDoc(h,h+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:h,to:h+u.length,insert:u},range:b.cursor(h+u.length)}}}else{if(t&&n.sliceDoc(h-2*e.length,h)==e+e&&(c=sl(n,h-2*e.length,s))>-1&&nl(n,c))return{changes:{insert:e+e+e+e,from:h},effects:gt.of(h+e.length),range:b.cursor(h+e.length)};if(n.charCategorizer(h)(a)!=q.Word&&sl(n,h,s)>-1&&!Og(n,h,e,s))return{changes:{insert:e+e,from:h},effects:gt.of(h+e.length),range:b.cursor(h+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function nl(n,e){let t=ye(n).resolveInner(e+1);return t.parent&&t.from==e}function Og(n,e,t,i){let s=ye(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),h=l.indexOf(t);if(!h||h>-1&&i.indexOf(l.slice(0,h))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+h;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let a=s.to==e&&s.parent;if(!a)break;s=a}return!1}function sl(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=q.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=q.Word)return r}return-1}function sm(n={}){return[Me,ke.of(n),Zp,Bg,ja]}const Tg=[{key:"Ctrl-Space",run:Jp},{key:"Escape",run:_p},{key:"ArrowDown",run:Ki(!0)},{key:"ArrowUp",run:Ki(!1)},{key:"PageDown",run:Ki(!0,"page")},{key:"PageUp",run:Ki(!1,"page")},{key:"Enter",run:Gp}],Bg=kt.highest(tr.computeN([ke],n=>n.facet(ke).defaultKeymap?[Tg]:[]));export{$g as A,Kg as B,vn as C,uu as D,O as E,jg as F,Hg as G,ye as H,j as I,Fg as J,em as K,Is as L,qp as M,ir as N,b as O,Ph as P,qg as Q,zg as R,jh as S,V as T,Eu as U,tm as V,Eh as W,Qu as X,N as a,Lg as b,_g as c,Pg as d,Rg as e,Jg as f,im as g,Ng as h,Qg as i,nm as j,tr as k,Yg as l,Zg as m,Xg as n,Tg as o,sm as p,Eg as q,Ig as r,Ug as s,Gg as t,me as u,R as v,Tu as w,C as x,Vg as y,Fu as z}; diff --git a/ui/dist/assets/index-077c413f.js b/ui/dist/assets/index-077c413f.js new file mode 100644 index 000000000..c962883da --- /dev/null +++ b/ui/dist/assets/index-077c413f.js @@ -0,0 +1,226 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function ee(){}const $l=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function q1(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Q_(n){return n()}function hu(){return Object.create(null)}function De(n){n.forEach(Q_)}function jt(n){return typeof n=="function"}function _e(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let ql;function _n(n,e){return ql||(ql=document.createElement("a")),ql.href=e,n===ql.href}function j1(n){return Object.keys(n).length===0}function va(n,...e){if(n==null)return ee;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function V1(n){let e;return va(n,t=>e=t)(),e}function Ze(n,e,t){n.$$.on_destroy.push(va(e,t))}function kt(n,e,t,i){if(n){const s=x_(n,e,t,i);return n[0](s)}}function x_(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function wt(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),ya=eg?n=>requestAnimationFrame(n):ee;const Ss=new Set;function tg(n){Ss.forEach(e=>{e.c(n)||(Ss.delete(e),e.f())}),Ss.size!==0&&ya(tg)}function qo(n){let e;return Ss.size===0&&ya(tg),{promise:new Promise(t=>{Ss.add(e={c:n,f:t})}),abort(){Ss.delete(e)}}}const z1=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;"WeakMap"in z1;function v(n,e){n.appendChild(e)}function ng(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function H1(n){const e=y("style");return B1(ng(n),e),e.sheet}function B1(n,e){return v(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function pt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function xe(n){return function(e){return e.preventDefault(),n.call(this,e)}}function In(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function m(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}const U1=["width","height"];function ai(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set&&U1.indexOf(i)===-1?n[i]=e[i]:m(n,i,e[i])}function W1(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function mt(n){return n===""?null:+n}function Y1(n){return Array.from(n.childNodes)}function le(n,e){e=""+e,n.data!==e&&(n.data=e)}function re(n,e){n.value=e??""}function zr(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function ig(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Rt(n,e){return new n(e)}const ho=new Map;let _o=0;function K1(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function J1(n,e){const t={stylesheet:H1(e),rules:{}};return ho.set(n,t),t}function pl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +`;for(let b=0;b<=1;b+=a){const k=e+(t-e)*l(b);u+=b*100+`%{${o(k,1-k)}} +`}const f=u+`100% {${o(t,1-t)}} +}`,d=`__svelte_${K1(f)}_${r}`,p=ng(n),{stylesheet:h,rules:g}=ho.get(p)||J1(p,n);g[d]||(g[d]=!0,h.insertRule(`@keyframes ${d} ${f}`,h.cssRules.length));const _=n.style.animation||"";return n.style.animation=`${_?`${_}, `:""}${d} ${i}ms linear ${s}ms 1 both`,_o+=1,d}function ml(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),_o-=s,_o||Z1())}function Z1(){ya(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function G1(n,e,t,i){if(!e)return ee;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return ee;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Ro()+l,end:u=a+o,tick:f=ee,css:d}=t(n,{from:e,to:s},i);let p=!0,h=!1,g;function _(){d&&(g=pl(n,0,1,o,l,r,d)),l||(h=!0)}function b(){d&&ml(n,g),p=!1}return qo(k=>{if(!h&&k>=a&&(h=!0),h&&k>=u&&(f(1,0),b()),!p)return!1;if(h){const $=k-a,C=0+1*r($/o);f(C,1-C)}return!0}),_(),f(0,1),b}function X1(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,sg(n,s)}}function sg(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let hl;function vi(n){hl=n}function Tl(){if(!hl)throw new Error("Function called outside component initialization");return hl}function Xt(n){Tl().$$.on_mount.push(n)}function Q1(n){Tl().$$.after_update.push(n)}function jo(n){Tl().$$.on_destroy.push(n)}function Tt(){const n=Tl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=ig(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function me(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ws=[],ne=[];let $s=[];const Hr=[],lg=Promise.resolve();let Br=!1;function og(){Br||(Br=!0,lg.then(ka))}function cn(){return og(),lg}function et(n){$s.push(n)}function ye(n){Hr.push(n)}const sr=new Set;let _s=0;function ka(){if(_s!==0)return;const n=hl;do{try{for(;_sn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),$s=e}let Bs;function wa(){return Bs||(Bs=Promise.resolve(),Bs.then(()=>{Bs=null})),Bs}function ns(n,e,t){n.dispatchEvent(ig(`${e?"intro":"outro"}${t}`))}const oo=new Set;let li;function ue(){li={r:0,c:[],p:li}}function fe(){li.r||De(li.c),li=li.p}function I(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),li.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const Sa={duration:0};function rg(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&ml(n,o)}function f(){const{delay:p=0,duration:h=300,easing:g=$l,tick:_=ee,css:b}=s||Sa;b&&(o=pl(n,0,1,h,p,g,b,a++)),_(0,1);const k=Ro()+p,$=k+h;r&&r.abort(),l=!0,et(()=>ns(n,!0,"start")),r=qo(C=>{if(l){if(C>=$)return _(1,0),ns(n,!0,"end"),u(),l=!1;if(C>=k){const T=g((C-k)/h);_(T,1-T)}}return l})}let d=!1;return{start(){d||(d=!0,ml(n),jt(s)?(s=s(i),wa().then(f)):f())},invalidate(){d=!1},end(){l&&(u(),l=!1)}}}function $a(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=li;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:d=$l,tick:p=ee,css:h}=s||Sa;h&&(o=pl(n,1,0,f,u,d,h));const g=Ro()+u,_=g+f;et(()=>ns(n,!1,"start")),qo(b=>{if(l){if(b>=_)return p(0,1),ns(n,!1,"end"),--r.r||De(r.c),!1;if(b>=g){const k=d((b-g)/f);p(1-k,k)}}return l})}return jt(s)?wa().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&ml(n,o),l=!1)}}}function Ve(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&ml(n,u)}function d(h,g){const _=h.b-o;return g*=Math.abs(_),{a:o,b:h.b,d:_,duration:g,start:h.start,end:h.start+g,group:h.group}}function p(h){const{delay:g=0,duration:_=300,easing:b=$l,tick:k=ee,css:$}=l||Sa,C={start:Ro()+g,b:h};h||(C.group=li,li.r+=1),r||a?a=C:($&&(f(),u=pl(n,o,h,_,g,b,$)),h&&k(0,1),r=d(C,_),et(()=>ns(n,h,"start")),qo(T=>{if(a&&T>a.start&&(r=d(a,_),a=null,ns(n,r.b,"start"),$&&(f(),u=pl(n,o,r.b,r.duration,0,b,l.css))),r){if(T>=r.end)k(o=r.b,1-o),ns(n,r.b,"end"),a||(r.b?f():--r.group.r||De(r.group.c)),r=null;else if(T>=r.start){const E=T-r.start;o=r.a+r.d*b(E/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(h){jt(l)?wa().then(()=>{l=l(s),p(h)}):p(h)},end(){f(),r=a=null}}}function gu(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((d,p)=>{p!==l&&d&&(ue(),P(d,1,1,()=>{e.blocks[p]===d&&(e.blocks[p]=null)}),fe())}):e.block.d(1),u.c(),I(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ka()}if(q1(n)){const s=Tl();if(n.then(l=>{vi(s),i(e.then,1,e.value,l),vi(null)},l=>{if(vi(s),i(e.catch,2,e.error,l),vi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function t0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function us(n,e){n.d(1),e.delete(n.key)}function Kt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function n0(n,e){n.f(),Kt(n,e)}function yt(n,e,t,i,s,l,o,r,a,u,f,d){let p=n.length,h=l.length,g=p;const _={};for(;g--;)_[n[g].key]=g;const b=[],k=new Map,$=new Map,C=[];for(g=h;g--;){const O=d(s,l,g),A=t(O);let L=o.get(A);L?i&&C.push(()=>L.p(O,e)):(L=u(A,O),L.c()),k.set(A,b[g]=L),A in _&&$.set(A,Math.abs(g-_[A]))}const T=new Set,E=new Set;function M(O){I(O,1),O.m(r,f),o.set(O.key,O),f=O.first,h--}for(;p&&h;){const O=b[h-1],A=n[p-1],L=O.key,N=A.key;O===A?(f=O.first,p--,h--):k.has(N)?!o.has(L)||T.has(L)?M(O):E.has(N)?p--:$.get(L)>$.get(N)?(E.add(L),M(O)):(T.add(N),p--):(a(A,o),p--)}for(;p--;){const O=n[p];k.has(O.key)||a(O,o)}for(;h;)M(b[h-1]);return De(C),b}function Et(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Qt(n){return typeof n=="object"&&n!==null?n:{}}const i0=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"];[...i0];function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function B(n){n&&n.c()}function z(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||et(()=>{const o=n.$$.on_mount.map(Q_).filter(jt);n.$$.on_destroy?n.$$.on_destroy.push(...o):De(o),n.$$.on_mount=[]}),l.forEach(et)}function H(n,e){const t=n.$$;t.fragment!==null&&(e0(t.after_update),De(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function s0(n,e){n.$$.dirty[0]===-1&&(ws.push(n),og(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const g=h.length?h[0]:p;return u.ctx&&s(u.ctx[d],u.ctx[d]=g)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](g),f&&s0(n,d)),p}):[],u.update(),f=!0,De(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const d=Y1(e.target);u.fragment&&u.fragment.l(d),d.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&I(n.$$.fragment),z(n,e.target,e.anchor,e.customElement),ka()}vi(a)}class be{$destroy(){H(this,1),this.$destroy=ee}$on(e,t){if(!jt(t))return ee;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!j1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Lt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function ug(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return ag(t,o=>{let r=!1;const a=[];let u=0,f=ee;const d=()=>{if(u)return;f();const h=e(i?a[0]:a,o);l?o(h):f=jt(h)?h:ee},p=s.map((h,g)=>va(h,_=>{a[g]=_,u&=~(1<{u|=1<{H(f,1)}),fe()}l?(e=Rt(l,o()),e.$on("routeEvent",r[7]),B(e.$$.fragment),I(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&I(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function o0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{H(f,1)}),fe()}l?(e=Rt(l,o()),e.$on("routeEvent",r[6]),B(e.$$.fragment),I(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&I(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function r0(n){let e,t,i,s;const l=[o0,l0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ue(),P(o[f],1,1,()=>{o[f]=null}),fe(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),I(t,1),t.m(i.parentNode,i))},i(a){s||(I(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function bu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Vo=ag(null,function(e){e(bu());const t=()=>{e(bu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});ug(Vo,n=>n.location);const Ta=ug(Vo,n=>n.querystring),vu=Ln(void 0);async function Vi(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await cn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function rn(n,e){if(e=ku(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return yu(n,e),{update(t){t=ku(t),yu(n,t)}}}function a0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function yu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||u0(i.currentTarget.getAttribute("href"))})}function ku(n){return n&&typeof n=="string"?{href:n}:n||{}}function u0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function f0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(E,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!E||typeof E=="string"&&(E.length<1||E.charAt(0)!="/"&&E.charAt(0)!="*")||typeof E=="object"&&!(E instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:A}=fg(E);this.path=E,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=A}match(E){if(s){if(typeof s=="string")if(E.startsWith(s))E=E.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=E.match(s);if(L&&L[0])E=E.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(E);if(M===null)return null;if(this._keys===!1)return M;const O={};let A=0;for(;A{r.push(new o(E,T))}):Object.keys(i).forEach(T=>{r.push(new o(T,i[T]))});let a=null,u=null,f={};const d=Tt();async function p(T,E){await cn(),d(T,E)}let h=null,g=null;l&&(g=T=>{T.state&&(T.state.__svelte_spa_router_scrollY||T.state.__svelte_spa_router_scrollX)?h=T.state:h=null},window.addEventListener("popstate",g),Q1(()=>{a0(h)}));let _=null,b=null;const k=Vo.subscribe(async T=>{_=T;let E=0;for(;E{vu.set(u)});return}t(0,a=null),b=null,vu.set(void 0)});jo(()=>{k(),g&&window.removeEventListener("popstate",g)});function $(T){me.call(this,n,T)}function C(T){me.call(this,n,T)}return n.$$set=T=>{"routes"in T&&t(3,i=T.routes),"prefix"in T&&t(4,s=T.prefix),"restoreScrollState"in T&&t(5,l=T.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,$,C]}class c0 extends be{constructor(e){super(),ge(this,e,f0,r0,_e,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let cg;function dg(n){const e=n.pattern.test(cg);wu(n,n.className,e),wu(n,n.inactiveClassName,!e)}function wu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Vo.subscribe(n=>{cg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(dg)});function zn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?fg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),dg(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const d0="modulepreload",p0=function(n,e){return new URL(n,e).href},Su={},ut=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=p0(l,i),l in Su)return;Su[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===l&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":d0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Ur=function(n,e){return Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Ur(n,e)};function nn(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Ur(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Wr=function(){return Wr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||d[0]!==6&&d[0]!==2)){o=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}pg=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Cl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof wi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=$u(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},Ca=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return xt(l,void 0,void 0,function(){return en(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var d=f,p=d.items,h=d.totalItems;return o=o.concat(p),p.length&&h>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new yi(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,d){return xt(a,void 0,void 0,function(){var p,h,g,_,b=this;return en(this,function(k){switch(k.label){case 0:return k.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function($){return xt(b,void 0,void 0,function(){var C,T,E;return en(this,function(M){switch(M.label){case 0:C=this.client.realtime.clientId,M.label=1;case 1:if(M.trys.push([1,3,,4]),p(),!$.state||C!==$.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,$.code,o.codeVerifier,r,s.createData,s.body,s.query)];case 2:return T=M.sent(),f(T),[3,4];case 3:return E=M.sent(),d(new yi(E)),[3,4];case 4:return[2]}})})})];case 1:return p=k.sent(),(h=new URL(o.authUrl+r)).searchParams.set("state",this.client.realtime.clientId),!((_=s.scopes)===null||_===void 0)&&_.length&&h.searchParams.set("scope",s.scopes.join(" ")),[4,s.urlCallback?s.urlCallback(h.toString()):this._defaultUrlCallback(h.toString())];case 2:return k.sent(),[3,4];case 3:return g=k.sent(),d(new yi(g)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o"u"||!(window!=null&&window.open))throw new yi(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(Ca),wn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},kn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return xt(this,void 0,void 0,function(){return en(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return xt(t,void 0,void 0,function(){var l;return en(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new yi({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new yi(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t,i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function is(n){return typeof n=="number"}function Ho(n){return typeof n=="number"&&n%1===0}function I0(n){return typeof n=="string"}function L0(n){return Object.prototype.toString.call(n)==="[object Date]"}function qg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function P0(n){return Array.isArray(n)?n:[n]}function Cu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function F0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ds(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ki(n,e,t){return Ho(n)&&n>=e&&n<=t}function N0(n,e){return n-e*Math.floor(n/e)}function Wt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ai(n){if(!(st(n)||n===null||n===""))return parseInt(n,10)}function Wi(n){if(!(st(n)||n===null||n===""))return parseFloat(n)}function Ma(n){if(!(st(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Ea(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Ml(n){return n%4===0&&(n%100!==0||n%400===0)}function ll(n){return Ml(n)?366:365}function go(n,e){const t=N0(e-1,12)+1,i=n+(e-t)/12;return t===2?Ml(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Oa(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function bo(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Jr(n){return n>99?n:n>60?1900+n:2e3+n}function jg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Bo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Vg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Bn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Ds(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Vg(s)}return t}function ol(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Wt(t,2)}:${Wt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Wt(t,2)}${Wt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Uo(n){return F0(n,["hour","minute","second","millisecond"])}const zg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,R0=["January","February","March","April","May","June","July","August","September","October","November","December"],Hg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],q0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Bg(n){switch(n){case"narrow":return[...q0];case"short":return[...Hg];case"long":return[...R0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Ug=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],j0=["M","T","W","T","F","S","S"];function Yg(n){switch(n){case"narrow":return[...j0];case"short":return[...Wg];case"long":return[...Ug];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Kg=["AM","PM"],V0=["Before Christ","Anno Domini"],z0=["BC","AD"],H0=["B","A"];function Jg(n){switch(n){case"narrow":return[...H0];case"short":return[...z0];case"long":return[...V0];default:return null}}function B0(n){return Kg[n.hour<12?0:1]}function U0(n,e){return Yg(e)[n.weekday-1]}function W0(n,e){return Bg(e)[n.month-1]}function Y0(n,e){return Jg(e)[n.year<0?0:1]}function K0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${s[n][0]}`;case-1:return d?"yesterday":`last ${s[n][0]}`;case 0:return d?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function Mu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const J0={D:Kr,DD:vg,DDD:yg,DDDD:kg,t:wg,tt:Sg,ttt:$g,tttt:Tg,T:Cg,TT:Mg,TTT:Eg,TTTT:Og,f:Dg,ff:Ig,fff:Pg,ffff:Ng,F:Ag,FF:Lg,FFF:Fg,FFFF:Rg};class yn{static create(e,t={}){return new yn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return J0[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Wt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,g)=>this.loc.extract(e,h,g),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?B0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,g)=>i?W0(e,h):l(g?{month:h}:{month:h,day:"numeric"},"month"),u=(h,g)=>i?U0(e,h):l(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const g=yn.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(e,g):h},d=h=>i?Y0(e,h):l({era:h},"era"),p=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return Mu(yn.parseFormat(t),p)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=yn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return Mu(l,s(r))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class El{get type(){throw new Oi}get name(){throw new Oi}get ianaName(){return this.name}get isUniversal(){throw new Oi}offsetName(e,t){throw new Oi}formatOffset(e,t){throw new Oi}offset(e){throw new Oi}equals(e){throw new Oi}get isValid(){throw new Oi}}let lr=null;class Da extends El{static get instance(){return lr===null&&(lr=new Da),lr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return jg(e,t,i)}formatOffset(e,t){return ol(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function Z0(n){return ao[n]||(ao[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),ao[n]}const G0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function X0(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function Q0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?g:1e3+g,(p-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let or=null;class hn extends El{static get utcInstance(){return or===null&&(or=new hn(0)),or}static instance(e){return e===0?hn.utcInstance:new hn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new hn(Bo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ol(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ol(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ol(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class x0 extends El{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ii(n,e){if(st(n)||n===null)return e;if(n instanceof El)return n;if(I0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?hn.utcInstance:hn.parseSpecifier(t)||Si.create(n)}else return is(n)?hn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new x0(n)}let Eu=()=>Date.now(),Ou="system",Du=null,Au=null,Iu=null,Lu;class Zt{static get now(){return Eu}static set now(e){Eu=e}static set defaultZone(e){Ou=e}static get defaultZone(){return Ii(Ou,Da.instance)}static get defaultLocale(){return Du}static set defaultLocale(e){Du=e}static get defaultNumberingSystem(){return Au}static set defaultNumberingSystem(e){Au=e}static get defaultOutputCalendar(){return Iu}static set defaultOutputCalendar(e){Iu=e}static get throwOnInvalid(){return Lu}static set throwOnInvalid(e){Lu=e}static resetCaches(){Dt.resetCache(),Si.resetCache()}}let Pu={};function ev(n,e={}){const t=JSON.stringify([n,e]);let i=Pu[t];return i||(i=new Intl.ListFormat(n,e),Pu[t]=i),i}let Zr={};function Gr(n,e={}){const t=JSON.stringify([n,e]);let i=Zr[t];return i||(i=new Intl.DateTimeFormat(n,e),Zr[t]=i),i}let Xr={};function tv(n,e={}){const t=JSON.stringify([n,e]);let i=Xr[t];return i||(i=new Intl.NumberFormat(n,e),Xr[t]=i),i}let Qr={};function nv(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Qr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Qr[s]=l),l}let nl=null;function iv(){return nl||(nl=new Intl.DateTimeFormat().resolvedOptions().locale,nl)}function sv(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Gr(n).resolvedOptions()}catch{t=Gr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function lv(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function ov(n){const e=[];for(let t=1;t<=12;t++){const i=We.utc(2016,t,1);e.push(n(i))}return e}function rv(n){const e=[];for(let t=1;t<=7;t++){const i=We.utc(2016,11,13+t);e.push(n(i))}return e}function zl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function av(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class uv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=tv(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Ea(e,3);return Wt(t,this.padTo)}}}class fv{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Si.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:We.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Gr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class cv{constructor(e,t,i){this.opts={style:"long",...i},!t&&qg()&&(this.rtf=nv(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):K0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Dt{static fromOpts(e){return Dt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Zt.defaultLocale,o=l||(s?"en-US":iv()),r=t||Zt.defaultNumberingSystem,a=i||Zt.defaultOutputCalendar;return new Dt(o,r,a,l)}static resetCache(){nl=null,Zr={},Xr={},Qr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Dt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=sv(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=lv(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=av(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Dt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return zl(this,e,i,Bg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=ov(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return zl(this,e,i,Yg,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=rv(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return zl(this,void 0,e,()=>Kg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[We.utc(2016,11,13,9),We.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return zl(this,e,t,Jg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[We.utc(-40,1,1),We.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new uv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new fv(e,this.intl,t)}relFormatter(e={}){return new cv(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ev(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Rs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function qs(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function js(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Zg(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(g||h&&f)?-h:h;return[{years:p(Wi(t)),months:p(Wi(i)),weeks:p(Wi(s)),days:p(Wi(l)),hours:p(Wi(o)),minutes:p(Wi(r)),seconds:p(Wi(a),a==="-0"),milliseconds:p(Ma(u),d)}]}const $v={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function La(n,e,t,i,s,l,o){const r={year:e.length===2?Jr(Ai(e)):Ai(e),month:Hg.indexOf(t)+1,day:Ai(i),hour:Ai(s),minute:Ai(l)};return o&&(r.second=Ai(o)),n&&(r.weekday=n.length>3?Ug.indexOf(n)+1:Wg.indexOf(n)+1),r}const Tv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Cv(n){const[,e,t,i,s,l,o,r,a,u,f,d]=n,p=La(e,s,i,t,l,o,r);let h;return a?h=$v[a]:u?h=0:h=Bo(f,d),[p,new hn(h)]}function Mv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ev=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ov=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Fu(n){const[,e,t,i,s,l,o,r]=n;return[La(e,s,i,t,l,o,r),hn.utcInstance]}function Av(n){const[,e,t,i,s,l,o,r]=n;return[La(e,r,t,i,s,l,o),hn.utcInstance]}const Iv=Rs(pv,Ia),Lv=Rs(mv,Ia),Pv=Rs(hv,Ia),Fv=Rs(Xg),xg=qs(yv,Vs,Ol,Dl),Nv=qs(_v,Vs,Ol,Dl),Rv=qs(gv,Vs,Ol,Dl),qv=qs(Vs,Ol,Dl);function jv(n){return js(n,[Iv,xg],[Lv,Nv],[Pv,Rv],[Fv,qv])}function Vv(n){return js(Mv(n),[Tv,Cv])}function zv(n){return js(n,[Ev,Fu],[Ov,Fu],[Dv,Av])}function Hv(n){return js(n,[wv,Sv])}const Bv=qs(Vs);function Uv(n){return js(n,[kv,Bv])}const Wv=Rs(bv,vv),Yv=Rs(Qg),Kv=qs(Vs,Ol,Dl);function Jv(n){return js(n,[Wv,xg],[Yv,Kv])}const Zv="Invalid Duration",eb={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Gv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...eb},Rn=146097/400,bs=146097/4800,Xv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:bs/7,days:bs,hours:bs*24,minutes:bs*24*60,seconds:bs*24*60*60,milliseconds:bs*24*60*60*1e3},...eb},Xi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Qv=Xi.slice(0).reverse();function Yi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new at(i)}function xv(n){return n<0?Math.floor(n):Math.ceil(n)}function tb(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?xv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function ey(n,e){Qv.reduce((t,i)=>st(e[i])?t:(t&&tb(n,e,t,e,i),i),null)}class at{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Dt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Xv:Gv,this.isLuxonDuration=!0}static fromMillis(e,t){return at.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Bn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new at({values:vo(e,at.normalizeUnit),loc:Dt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(is(e))return at.fromMillis(e);if(at.isDuration(e))return e;if(typeof e=="object")return at.fromObject(e);throw new Bn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Hv(e);return i?at.fromObject(i,t):at.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Uv(e);return i?at.fromObject(i,t):at.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Bn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Zt.throwOnInvalid)throw new O0(i);return new at({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new bg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?yn.create(this.loc,i).formatDurationFromString(this,e):Zv}toHuman(e={}){const t=Xi.map(i=>{const s=this.values[i];return st(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Ea(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=at.fromDurationLike(e),i={};for(const s of Xi)(Ds(t.values,s)||Ds(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Yi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=at.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Vg(e(this.values[i],i));return Yi(this,{values:t},!0)}get(e){return this[at.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,at.normalizeUnit)};return Yi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Yi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return ey(this.matrix,e),Yi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>at.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Xi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;is(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Xi.indexOf(u)>Xi.indexOf(o)&&tb(this.matrix,s,u,t,o)}else is(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Yi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Yi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Xi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Us="Invalid Interval";function ty(n,e){return!n||!n.isValid?Pt.invalid("missing or invalid start"):!e||!e.isValid?Pt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Pt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ks).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Pt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=at.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(Pt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:Pt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Pt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Pt.fromDateTimes(t,a.time)),t=null);return Pt.merge(s)}difference(...e){return Pt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Us}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Us}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Us}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Us}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Us}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):at.invalid(this.invalidReason)}mapEndpoints(e){return Pt.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Zt.defaultZone){const t=We.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Si.isValidZone(e)}static normalizeZone(e){return Ii(e,Zt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Dt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Dt.create(t,null,"gregory").eras(e)}static features(){return{relative:qg()}}}function Nu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(at.fromMillis(i).as("days"))}function ny(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Nu(r,a);return(u-u%7)/7}],["days",Nu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function iy(n,e,t,i){let[s,l,o,r]=ny(n,e,t);const a=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?at.fromMillis(a,i).shiftTo(...u).plus(f):f}const Pa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ru={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},sy=Pa.hanidec.replace(/[\[|\]]/g,"").split("");function ly(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Zn({numberingSystem:n},e=""){return new RegExp(`${Pa[n||"latn"]}${e}`)}const oy="missing Intl.DateTimeFormat.formatToParts support";function ft(n,e=t=>t){return{regex:n,deser:([t])=>e(ly(t))}}const ry=String.fromCharCode(160),nb=`[ ${ry}]`,ib=new RegExp(nb,"g");function ay(n){return n.replace(/\./g,"\\.?").replace(ib,nb)}function qu(n){return n.replace(/\./g,"").replace(ib," ").toLowerCase()}function Gn(n,e){return n===null?null:{regex:RegExp(n.map(ay).join("|")),deser:([t])=>n.findIndex(i=>qu(t)===qu(i))+e}}function ju(n,e){return{regex:n,deser:([,t,i])=>Bo(t,i),groups:e}}function rr(n){return{regex:n,deser:([e])=>e}}function uy(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function fy(n,e){const t=Zn(e),i=Zn(e,"{2}"),s=Zn(e,"{3}"),l=Zn(e,"{4}"),o=Zn(e,"{6}"),r=Zn(e,"{1,2}"),a=Zn(e,"{1,3}"),u=Zn(e,"{1,6}"),f=Zn(e,"{1,9}"),d=Zn(e,"{2,4}"),p=Zn(e,"{4,6}"),h=b=>({regex:RegExp(uy(b.val)),deser:([k])=>k,literal:!0}),_=(b=>{if(n.literal)return h(b);switch(b.val){case"G":return Gn(e.eras("short",!1),0);case"GG":return Gn(e.eras("long",!1),0);case"y":return ft(u);case"yy":return ft(d,Jr);case"yyyy":return ft(l);case"yyyyy":return ft(p);case"yyyyyy":return ft(o);case"M":return ft(r);case"MM":return ft(i);case"MMM":return Gn(e.months("short",!0,!1),1);case"MMMM":return Gn(e.months("long",!0,!1),1);case"L":return ft(r);case"LL":return ft(i);case"LLL":return Gn(e.months("short",!1,!1),1);case"LLLL":return Gn(e.months("long",!1,!1),1);case"d":return ft(r);case"dd":return ft(i);case"o":return ft(a);case"ooo":return ft(s);case"HH":return ft(i);case"H":return ft(r);case"hh":return ft(i);case"h":return ft(r);case"mm":return ft(i);case"m":return ft(r);case"q":return ft(r);case"qq":return ft(i);case"s":return ft(r);case"ss":return ft(i);case"S":return ft(a);case"SSS":return ft(s);case"u":return rr(f);case"uu":return rr(r);case"uuu":return ft(t);case"a":return Gn(e.meridiems(),0);case"kkkk":return ft(l);case"kk":return ft(d,Jr);case"W":return ft(r);case"WW":return ft(i);case"E":case"c":return ft(t);case"EEE":return Gn(e.weekdays("short",!1,!1),1);case"EEEE":return Gn(e.weekdays("long",!1,!1),1);case"ccc":return Gn(e.weekdays("short",!0,!1),1);case"cccc":return Gn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ju(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return ju(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return rr(/[a-z_+-/]{1,256}?/i);default:return h(b)}})(n)||{invalidReason:oy};return _.token=n,_}const cy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function dy(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=cy[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function py(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function my(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ds(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function hy(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return st(n.z)||(t=Si.create(n.z)),st(n.Z)||(t||(t=new hn(n.Z)),i=n.Z),st(n.q)||(n.M=(n.q-1)*3+1),st(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),st(n.u)||(n.S=Ma(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ar=null;function _y(){return ar||(ar=We.fromMillis(1555555555555)),ar}function gy(n,e){if(n.literal)return n;const t=yn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=yn.create(e,t).formatDateTimeParts(_y()).map(o=>dy(o,e,t));return l.includes(void 0)?n:l}function by(n,e){return Array.prototype.concat(...n.map(t=>gy(t,e)))}function sb(n,e,t){const i=by(yn.parseFormat(t),n),s=i.map(o=>fy(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=py(s),a=RegExp(o,"i"),[u,f]=my(e,a,r),[d,p,h]=f?hy(f):[null,null,void 0];if(Ds(f,"a")&&Ds(f,"H"))throw new tl("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:d,zone:p,specificOffset:h}}}function vy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=sb(n,e,t);return[i,s,l,o]}const lb=[0,31,59,90,120,151,181,212,243,273,304,334],ob=[0,31,60,91,121,152,182,213,244,274,305,335];function Wn(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function rb(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function ab(n,e,t){return t+(Ml(n)?ob:lb)[e-1]}function ub(n,e){const t=Ml(n)?ob:lb,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Uo(n)}}function Vu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=rb(e,1,4),l=ll(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=ll(r)):o>l?(r=e+1,o-=ll(e)):r=e;const{month:a,day:u}=ub(r,o);return{year:r,month:a,day:u,...Uo(n)}}function ur(n){const{year:e,month:t,day:i}=n,s=ab(e,t,i);return{year:e,ordinal:s,...Uo(n)}}function zu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=ub(e,t);return{year:e,month:i,day:s,...Uo(n)}}function yy(n){const e=Ho(n.weekYear),t=ki(n.weekNumber,1,bo(n.weekYear)),i=ki(n.weekday,1,7);return e?t?i?!1:Wn("weekday",n.weekday):Wn("week",n.week):Wn("weekYear",n.weekYear)}function ky(n){const e=Ho(n.year),t=ki(n.ordinal,1,ll(n.year));return e?t?!1:Wn("ordinal",n.ordinal):Wn("year",n.year)}function fb(n){const e=Ho(n.year),t=ki(n.month,1,12),i=ki(n.day,1,go(n.year,n.month));return e?t?i?!1:Wn("day",n.day):Wn("month",n.month):Wn("year",n.year)}function cb(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ki(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ki(t,0,59),r=ki(i,0,59),a=ki(s,0,999);return l?o?r?a?!1:Wn("millisecond",s):Wn("second",i):Wn("minute",t):Wn("hour",e)}const fr="Invalid DateTime",Hu=864e13;function Bl(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function cr(n){return n.weekData===null&&(n.weekData=xr(n.c)),n.weekData}function Ws(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new We({...t,...e,old:t})}function db(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Bu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function uo(n,e,t){return db(Oa(n),e,t)}function Uu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,go(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=at.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Oa(l);let[a,u]=db(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ys(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=We.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return We.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Ul(n,e,t=!0){return n.isValid?yn.create(Dt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function dr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Wt(n.c.year,t?6:4),e?(i+="-",i+=Wt(n.c.month),i+="-",i+=Wt(n.c.day)):(i+=Wt(n.c.month),i+=Wt(n.c.day)),i}function Wu(n,e,t,i,s,l){let o=Wt(n.c.hour);return e?(o+=":",o+=Wt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Wt(n.c.minute),(n.c.second!==0||!t)&&(o+=Wt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Wt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Wt(Math.trunc(-n.o/60)),o+=":",o+=Wt(Math.trunc(-n.o%60))):(o+="+",o+=Wt(Math.trunc(n.o/60)),o+=":",o+=Wt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const pb={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},wy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Sy={ordinal:1,hour:0,minute:0,second:0,millisecond:0},mb=["year","month","day","hour","minute","second","millisecond"],$y=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ty=["year","ordinal","hour","minute","second","millisecond"];function Yu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new bg(n);return e}function Ku(n,e){const t=Ii(e.zone,Zt.defaultZone),i=Dt.fromObject(e),s=Zt.now();let l,o;if(st(n.year))l=s;else{for(const u of mb)st(n[u])&&(n[u]=pb[u]);const r=fb(n)||cb(n);if(r)return We.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new We({ts:l,zone:t,loc:i,o})}function Ju(n,e,t){const i=st(t.round)?!0:t.round,s=(o,r)=>(o=Ea(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Zu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class We{constructor(e){const t=e.zone||Zt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:Bl(t));this.ts=st(e.ts)?Zt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Bu(this.ts,r),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Dt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new We({})}static local(){const[e,t]=Zu(arguments),[i,s,l,o,r,a,u]=t;return Ku({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Zu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=hn.utcInstance,Ku({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=L0(e)?e.valueOf():NaN;if(Number.isNaN(i))return We.invalid("invalid input");const s=Ii(t.zone,Zt.defaultZone);return s.isValid?new We({ts:i,zone:s,loc:Dt.fromObject(t)}):We.invalid(Bl(s))}static fromMillis(e,t={}){if(is(e))return e<-Hu||e>Hu?We.invalid("Timestamp out of range"):new We({ts:e,zone:Ii(t.zone,Zt.defaultZone),loc:Dt.fromObject(t)});throw new Bn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(is(e))return new We({ts:e*1e3,zone:Ii(t.zone,Zt.defaultZone),loc:Dt.fromObject(t)});throw new Bn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ii(t.zone,Zt.defaultZone);if(!i.isValid)return We.invalid(Bl(i));const s=Zt.now(),l=st(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Yu),r=!st(o.ordinal),a=!st(o.year),u=!st(o.month)||!st(o.day),f=a||u,d=o.weekYear||o.weekNumber,p=Dt.fromObject(t);if((f||r)&&d)throw new tl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new tl("Can't mix ordinal dates with month/day");const h=d||o.weekday&&!f;let g,_,b=Bu(s,l);h?(g=$y,_=wy,b=xr(b)):r?(g=Ty,_=Sy,b=ur(b)):(g=mb,_=pb);let k=!1;for(const A of g){const L=o[A];st(L)?k?o[A]=_[A]:o[A]=b[A]:k=!0}const $=h?yy(o):r?ky(o):fb(o),C=$||cb(o);if(C)return We.invalid(C);const T=h?Vu(o):r?zu(o):o,[E,M]=uo(T,l,i),O=new We({ts:E,zone:i,o:M,loc:p});return o.weekday&&f&&e.weekday!==O.weekday?We.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=jv(e);return Ys(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Vv(e);return Ys(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=zv(e);return Ys(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(st(e)||st(t))throw new Bn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=vy(o,e,t);return f?We.invalid(f):Ys(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return We.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Jv(e);return Ys(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Bn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Zt.throwOnInvalid)throw new M0(i);return new We({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?cr(this).weekYear:NaN}get weekNumber(){return this.isValid?cr(this).weekNumber:NaN}get weekday(){return this.isValid?cr(this).weekday:NaN}get ordinal(){return this.isValid?ur(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Ml(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?ll(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=yn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(hn.instance(e),t)}toLocal(){return this.setZone(Zt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ii(e,Zt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=uo(o,l,e)}return Ws(this,{ts:s,zone:e})}else return We.invalid(Bl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Ws(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Yu),i=!st(t.weekYear)||!st(t.weekNumber)||!st(t.weekday),s=!st(t.ordinal),l=!st(t.year),o=!st(t.month)||!st(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new tl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new tl("Can't mix ordinal dates with month/day");let u;i?u=Vu({...xr(this.c),...t}):st(t.ordinal)?(u={...this.toObject(),...t},st(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=zu({...ur(this.c),...t});const[f,d]=uo(u,this.o,this.zone);return Ws(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=at.fromDurationLike(e);return Ws(this,Uu(this,t))}minus(e){if(!this.isValid)return this;const t=at.fromDurationLike(e).negate();return Ws(this,Uu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=at.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?yn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):fr}toLocaleString(e=Kr,t={}){return this.isValid?yn.create(this.loc.clone(t),e).formatDateTime(this):fr}toLocaleParts(e={}){return this.isValid?yn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=dr(this,o);return r+="T",r+=Wu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?dr(this,e==="extended"):null}toISOWeekDate(){return Ul(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Wu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Ul(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ul(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?dr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ul(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():fr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return at.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=P0(t).map(at.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=iy(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(We.now(),e,t)}until(e){return this.isValid?Pt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||We.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(We.isDateTime))throw new Bn("max requires all arguments be DateTimes");return Cu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return sb(o,e,t)}static fromStringExplain(e,t,i={}){return We.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Kr}static get DATE_MED(){return vg}static get DATE_MED_WITH_WEEKDAY(){return D0}static get DATE_FULL(){return yg}static get DATE_HUGE(){return kg}static get TIME_SIMPLE(){return wg}static get TIME_WITH_SECONDS(){return Sg}static get TIME_WITH_SHORT_OFFSET(){return $g}static get TIME_WITH_LONG_OFFSET(){return Tg}static get TIME_24_SIMPLE(){return Cg}static get TIME_24_WITH_SECONDS(){return Mg}static get TIME_24_WITH_SHORT_OFFSET(){return Eg}static get TIME_24_WITH_LONG_OFFSET(){return Og}static get DATETIME_SHORT(){return Dg}static get DATETIME_SHORT_WITH_SECONDS(){return Ag}static get DATETIME_MED(){return Ig}static get DATETIME_MED_WITH_SECONDS(){return Lg}static get DATETIME_MED_WITH_WEEKDAY(){return A0}static get DATETIME_FULL(){return Pg}static get DATETIME_FULL_WITH_SECONDS(){return Fg}static get DATETIME_HUGE(){return Ng}static get DATETIME_HUGE_WITH_SECONDS(){return Rg}}function Ks(n){if(We.isDateTime(n))return n;if(n&&n.valueOf&&is(n.valueOf()))return We.fromJSDate(n);if(n&&typeof n=="object")return We.fromObject(n);throw new Bn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],My=[".mp4",".avi",".mov",".3gp",".wmv"],Ey=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],Oy=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class U{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||U.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return U.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!U.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!U.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){U.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=U.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!U.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!U.isObject(l)&&!Array.isArray(l)||!U.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!U.isObject(s)&&!Array.isArray(s)||!U.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):U.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||U.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||U.isObject(e)&&Object.keys(e).length>0)&&U.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return We.fromFormat(e,i,{zone:"UTC"})}return We.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return U.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return U.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static download(e,t){const i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.click(),i.remove()}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2));t=t.endsWith(".json")?t:t+".json",download(i,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!Cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!My.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!Ey.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!Oy.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return U.hasImageExtension(e)?"image":U.hasDocumentExtension(e)?"document":U.hasVideoExtension(e)?"video":U.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,d=r.height;return a.width=t,a.height=i,u.drawImage(r,f>d?(f-d)/2:0,0,f>d?d:f,f>d?d:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(U.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)U.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):U.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,d,p;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||U.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||U.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const h of t){let g=null;h.type==="number"?g=123:h.type==="date"?g="2022-01-01 10:00:00.123Z":h.type==="bool"?g=!0:h.type==="email"?g="test@example.com":h.type==="url"?g="https://example.com":h.type==="json"?g="JSON":h.type==="file"?(g="filename.jpg",((a=h.options)==null?void 0:a.maxSelect)!==1&&(g=[g])):h.type==="select"?(g=(f=(u=h.options)==null?void 0:u.values)==null?void 0:f[0],((d=h.options)==null?void 0:d.maxSelect)!==1&&(g=[g])):h.type==="relation"?(g="RELATION_RECORD_ID",((p=h.options)==null?void 0:p.maxSelect)!==1&&(g=[g])):g="test",i[h.name]=g}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!U.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!U.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=U.isObject(u)&&U.findByKey(s,"id",u.id);if(!f)return!1;for(let d in f)if(JSON.stringify(u[d])!=JSON.stringify(f[d]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type==="auth"?t.push(l):l.type==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],d=u.create(a,o,f);u.add(d),e(d.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(U.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?U.plainText(r):r,s.push(U.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!U.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of U.extractColumnsFromQuery(e.options.query))U.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)U.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,d,p;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s+\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!U.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let h of r){h=h.trim().replaceAll("{PB_TEMP}",",");const _=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(h);if((_==null?void 0:_.length)!=4)continue;const b=(d=(f=_[1])==null?void 0:f.trim())==null?void 0:d.replace(l,"");b&&t.columns.push({name:b,collate:_[2]||"",sort:((p=_[3])==null?void 0:p.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+U.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` + `),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+c.sort.toUpperCase()),l}).join(`, + `),i.length>1&&(t+=` +`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=U.parseIndex(e);return i.tableName=t,U.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=U.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?U.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Wo=Ln([]);function yo(n,e=4e3){return Yo(n,"info",e)}function Ht(n,e=3e3){return Yo(n,"success",e)}function As(n,e=4500){return Yo(n,"error",e)}function Dy(n,e=4500){return Yo(n,"warning",e)}function Yo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{hb(i)},t)};Wo.update(s=>(Na(s,i.message),U.pushOrReplaceByKey(s,i,"message"),s))}function hb(n){Wo.update(e=>(Na(e,n),e))}function Fa(){Wo.update(n=>{for(let e of n)Na(n,e);return[]})}function Na(n,e){let t;typeof e=="string"?t=U.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),U.removeByKey(n,"message",t.message))}const Ti=Ln({});function tn(n){Ti.set(n||{})}function ui(n){Ti.update(e=>(U.deleteByPath(e,n),e))}const Ra=Ln({});function ea(n){Ra.set(n||{})}const di=Ln([]),fi=Ln({}),ko=Ln(!1),_b=Ln({});function Ay(n){di.update(e=>{const t=U.findByKey(e,"id",n);return t?fi.set(t):e.length&&fi.set(e[0]),e})}function Iy(n){fi.update(e=>U.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),di.update(e=>(U.pushOrReplaceByKey(e,n,"id"),qa(),U.sortCollections(e)))}function Ly(n){di.update(e=>(U.removeByKey(e,"id",n.id),fi.update(t=>t.id===n.id?e[0]:t),qa(),e))}async function Py(n=null){ko.set(!0);try{let e=await de.collections.getFullList(200,{sort:"+name"});e=U.sortCollections(e),di.set(e);const t=n&&U.findByKey(e,"id",n);t?fi.set(t):e.length&&fi.set(e[0]),qa()}catch(e){de.error(e)}ko.set(!1)}function qa(){_b.update(n=>(di.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const pr="pb_admin_file_token";zo.prototype.logout=function(n=!0){this.authStore.clear(),n&&Vi("/login")};zo.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&As(l)}if(U.isEmpty(s.data)||tn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Vi("/")};zo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=V1(_b);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(pr)||"";return(!t||hg(t,10))&&(t&&localStorage.removeItem(pr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(pr,t),this._adminFileTokenRequest=null),t};class Fy extends _g{save(e,t){super.save(e,t),t instanceof rs&&ea(t)}clear(){super.clear(),ea(null)}}const de=new zo("../",new Fy("pb_admin_auth"));de.authStore.model instanceof rs&&ea(de.authStore.model);function Ny(n){let e,t,i,s,l,o,r,a,u,f,d,p;const h=n[3].default,g=kt(h,n,n[2],null);return{c(){e=y("div"),t=y("main"),g&&g.c(),i=D(),s=y("footer"),l=y("a"),l.innerHTML=` + Docs`,o=D(),r=y("span"),r.textContent="|",a=D(),u=y("a"),f=y("span"),f.textContent="PocketBase v0.16.0-WIP",m(t,"class","page-content"),m(l,"href","https://pocketbase.io/docs/"),m(l,"target","_blank"),m(l,"rel","noopener noreferrer"),m(r,"class","delimiter"),m(f,"class","txt"),m(u,"href","https://github.com/pocketbase/pocketbase/releases"),m(u,"target","_blank"),m(u,"rel","noopener noreferrer"),m(u,"title","Releases"),m(s,"class","page-footer"),m(e,"class",d="page-wrapper "+n[1]),x(e,"center-content",n[0])},m(_,b){S(_,e,b),v(e,t),g&&g.m(t,null),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(u,f),p=!0},p(_,[b]){g&&g.p&&(!p||b&4)&&St(g,h,_,_[2],p?wt(h,_[2],b,null):$t(_[2]),null),(!p||b&2&&d!==(d="page-wrapper "+_[1]))&&m(e,"class",d),(!p||b&3)&&x(e,"center-content",_[0])},i(_){p||(I(g,_),p=!0)},o(_){P(g,_),p=!1},d(_){_&&w(e),g&&g.d(_)}}}function Ry(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class Sn extends be{constructor(e){super(),ge(this,e,Ry,Ny,_e,{center:0,class:1})}}function Gu(n){let e,t,i;return{c(){e=y("div"),e.innerHTML=``,t=D(),i=y("div"),m(e,"class","block txt-center m-b-lg"),m(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function qy(n){let e,t,i,s=!n[0]&&Gu();const l=n[1].default,o=kt(l,n,n[2],null);return{c(){e=y("div"),s&&s.c(),t=D(),o&&o.c(),m(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),v(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Gu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&St(o,l,r,r[2],i?wt(l,r[2],a,null):$t(r[2]),null)},i(r){i||(I(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function jy(n){let e,t;return e=new Sn({props:{class:"full-page",center:!0,$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Vy(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class gb extends be{constructor(e){super(),ge(this,e,Vy,jy,_e,{nobranding:0})}}function Ko(n){const e=n-1;return e*e*e+1}function ta(n,{delay:e=0,duration:t=400,easing:i=$l}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function ci(n,{delay:e=0,duration:t=400,easing:i=Ko,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o),[d,p]=_u(s),[h,g]=_u(l);return{delay:e,duration:t,easing:i,css:(_,b)=>` + transform: ${u} translate(${(1-_)*d}${p}, ${(1-_)*h}${g}); + opacity: ${a-f*b}`}}function rt(n,{delay:e=0,duration:t=400,easing:i=Ko,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),d=parseFloat(l[`padding${f[0]}`]),p=parseFloat(l[`padding${f[1]}`]),h=parseFloat(l[`margin${f[0]}`]),g=parseFloat(l[`margin${f[1]}`]),_=parseFloat(l[`border${f[0]}Width`]),b=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${r}: ${k*a}px;padding-${u[0]}: ${k*d}px;padding-${u[1]}: ${k*p}px;margin-${u[0]}: ${k*h}px;margin-${u[1]}: ${k*g}px;border-${u[0]}-width: ${k*_}px;border-${u[1]}-width: ${k*b}px;`}}function Jt(n,{delay:e=0,duration:t=400,easing:i=Ko,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(d,p)=>` + transform: ${a} scale(${1-u*p}); + opacity: ${r-f*p} + `}}let na,Ki;const ia="app-tooltip";function Xu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Ki=Ki||document.querySelector("."+ia),Ki||(Ki=document.createElement("div"),Ki.classList.add(ia),document.body.appendChild(Ki)),Ki}function bb(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){sa();return}t.textContent=e.text,t.className=ia+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function sa(){clearTimeout(na),Ni().classList.remove("active"),Ni().activeNode=void 0}function zy(n,e){Ni().activeNode=n,clearTimeout(na),na=setTimeout(()=>{Ni().classList.add("active"),bb(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=Xu(e);function i(){zy(n,t)}function s(){sa()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&U.isFocusable(n))&&n.addEventListener("click",s),Ni(),{update(l){var o,r;t=Xu(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&bb(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&sa(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Qu(n,e,t){const i=n.slice();return i[12]=e[t],i}const Hy=n=>({}),xu=n=>({uniqueId:n[4]});function By(n){let e,t,i=n[3],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=Ve(t,Jt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=Ve(t,Jt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&w(e),a&&s&&s.end(),o=!1,r()}}}function ef(n){let e,t,i=wo(n[12])+"",s,l,o,r;return{c(){e=y("div"),t=y("pre"),s=Y(i),l=D(),m(e,"class","help-block help-block-error")},m(a,u){S(a,e,u),v(e,t),v(t,s),v(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=wo(a[12])+"")&&le(s,i)},i(a){r||(a&&et(()=>{r&&(o||(o=Ve(e,rt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=Ve(e,rt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&w(e),a&&o&&o.end()}}}function Wy(n){let e,t,i,s,l,o,r;const a=n[9].default,u=kt(a,n,n[8],xu),f=[Uy,By],d=[];function p(h,g){return h[0]&&h[3].length?0:1}return i=p(n),s=d[i]=f[i](n),{c(){e=y("div"),u&&u.c(),t=D(),s.c(),m(e,"class",n[1]),x(e,"error",n[3].length)},m(h,g){S(h,e,g),u&&u.m(e,null),v(e,t),d[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(h,[g]){u&&u.p&&(!l||g&256)&&St(u,a,h,h[8],l?wt(a,h[8],g,Hy):$t(h[8]),xu);let _=i;i=p(h),i===_?d[i].p(h,g):(ue(),P(d[_],1,1,()=>{d[_]=null}),fe(),s=d[i],s?s.p(h,g):(s=d[i]=f[i](h),s.c()),I(s,1),s.m(e,null)),(!l||g&2)&&m(e,"class",h[1]),(!l||g&10)&&x(e,"error",h[3].length)},i(h){l||(I(u,h),I(s),l=!0)},o(h){P(u,h),P(s),l=!1},d(h){h&&w(e),u&&u.d(h),d[i].d(),n[11](null),o=!1,r()}}}const tf="Invalid value";function wo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||tf:n||tf}function Yy(n,e,t){let i;Ze(n,Ti,_=>t(7,i=_));let{$$slots:s={},$$scope:l}=e;const o="field_"+U.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,d=[];function p(){ui(r)}Xt(()=>(f.addEventListener("input",p),f.addEventListener("change",p),()=>{f.removeEventListener("input",p),f.removeEventListener("change",p)}));function h(_){me.call(this,n,_)}function g(_){ne[_?"unshift":"push"](()=>{f=_,t(2,f)})}return n.$$set=_=>{"name"in _&&t(5,r=_.name),"inlineError"in _&&t(0,a=_.inlineError),"class"in _&&t(1,u=_.class),"$$scope"in _&&t(8,l=_.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,d=U.toArray(U.getNestedVal(i,r)))},[a,u,f,d,o,r,p,i,l,s,h,g]}class pe extends be{constructor(e){super(),ge(this,e,Yy,Wy,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Ky(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Email"),s=D(),l=y("input"),m(e,"for",i=n[9]),m(l,"type","email"),m(l,"autocomplete","off"),m(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&m(e,"for",i),f&512&&o!==(o=u[9])&&m(l,"id",o),f&1&&l.value!==u[0]&&re(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Jy(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Password"),s=D(),l=y("input"),r=D(),a=y("div"),a.textContent="Minimum 10 characters.",m(e,"for",i=n[9]),m(l,"type","password"),m(l,"autocomplete","new-password"),m(l,"minlength","10"),m(l,"id",o=n[9]),l.required=!0,m(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),re(l,n[1]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[6]),u=!0)},p(d,p){p&512&&i!==(i=d[9])&&m(e,"for",i),p&512&&o!==(o=d[9])&&m(l,"id",o),p&2&&l.value!==d[1]&&re(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Zy(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Password confirm"),s=D(),l=y("input"),m(e,"for",i=n[9]),m(l,"type","password"),m(l,"minlength","10"),m(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&m(e,"for",i),f&512&&o!==(o=u[9])&&m(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Gy(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;return s=new pe({props:{class:"form-field required",name:"email",$$slots:{default:[Ky,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[Jy,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),a=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Zy,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

Create your first admin account in order to continue

",i=D(),B(s.$$.fragment),l=D(),B(o.$$.fragment),r=D(),B(a.$$.fragment),u=D(),f=y("button"),f.innerHTML=`Create and login + `,m(t,"class","content txt-center m-b-base"),m(f,"type","submit"),m(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),m(e,"class","block"),m(e,"autocomplete","off")},m(g,_){S(g,e,_),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),z(a,e,null),v(e,u),v(e,f),d=!0,p||(h=J(e,"submit",xe(n[4])),p=!0)},p(g,[_]){const b={};_&1537&&(b.$$scope={dirty:_,ctx:g}),s.$set(b);const k={};_&1538&&(k.$$scope={dirty:_,ctx:g}),o.$set(k);const $={};_&1540&&($.$$scope={dirty:_,ctx:g}),a.$set($),(!d||_&8)&&x(f,"btn-disabled",g[3]),(!d||_&8)&&x(f,"btn-loading",g[3])},i(g){d||(I(s.$$.fragment,g),I(o.$$.fragment,g),I(a.$$.fragment,g),d=!0)},o(g){P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),d=!1},d(g){g&&w(e),H(s),H(o),H(a),p=!1,h()}}}function Xy(n,e,t){const i=Tt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await de.admins.create({email:s,password:l,passwordConfirm:o}),await de.admins.authWithPassword(s,l),i("submit")}catch(p){de.error(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class Qy extends be{constructor(e){super(),ge(this,e,Xy,Gy,_e,{})}}function nf(n){let e,t;return e=new gb({props:{$$slots:{default:[xy]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function xy(n){let e,t;return e=new Qy({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p:ee,i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function ek(n){let e,t,i=n[0]&&nf(n);return{c(){i&&i.c(),e=Se()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&I(i,1)):(i=nf(s),i.c(),I(i,1),i.m(e.parentNode,e)):i&&(ue(),P(i,1,1,()=>{i=null}),fe())},i(s){t||(I(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function tk(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){de.logout(!1),t(0,i=!0);return}de.authStore.isValid?Vi("/collections"):de.logout()}return[i,async()=>{t(0,i=!1),await cn(),window.location.search=""}]}class nk extends be{constructor(e){super(),ge(this,e,tk,ek,_e,{})}}const Mt=Ln(""),So=Ln(""),Is=Ln(!1);function ik(n){let e,t,i,s;return{c(){e=y("input"),m(e,"type","text"),m(e,"id",n[8]),m(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),re(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&m(e,"placeholder",t),o&128&&e.value!==l[7]&&re(e,l[7])},i:ee,o:ee,d(l){l&&w(e),n[13](null),i=!1,s()}}}function sk(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Rt(o,r(n)),ne.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=Se()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ye(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ue();const d=e;P(d.$$.fragment,1,0,()=>{H(d,1)}),fe()}o?(e=Rt(o,r(a)),ne.push(()=>he(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),I(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&I(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function sf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',m(e,"type","submit"),m(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&et(()=>{i&&(t||(t=Ve(e,ci,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Ve(e,ci,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function lf(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',m(e,"type","button"),m(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:ee,i(o){i||(o&&et(()=>{i&&(t||(t=Ve(e,ci,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,ci,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function lk(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[sk,ik],h=[];function g(k,$){return k[4]&&!k[5]?0:1}l=g(n),o=h[l]=p[l](n);let _=(n[0].length||n[7].length)&&n[7]!=n[0]&&sf(),b=(n[0].length||n[7].length)&&lf(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=D(),o.c(),r=D(),_&&_.c(),a=D(),b&&b.c(),m(i,"class","ri-search-line"),m(t,"for",n[8]),m(t,"class","m-l-10 txt-xl"),m(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),h[l].m(e,null),v(e,r),_&&_.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",In(n[11])),J(e,"submit",xe(n[10]))],f=!0)},p(k,[$]){let C=l;l=g(k),l===C?h[l].p(k,$):(ue(),P(h[C],1,1,()=>{h[C]=null}),fe(),o=h[l],o?o.p(k,$):(o=h[l]=p[l](k),o.c()),I(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?_?$&129&&I(_,1):(_=sf(),_.c(),I(_,1),_.m(e,a)):_&&(ue(),P(_,1,1,()=>{_=null}),fe()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&I(b,1)):(b=lf(k),b.c(),I(b,1),b.m(e,null)):b&&(ue(),P(b,1,1,()=>{b=null}),fe())},i(k){u||(I(o),I(_),I(b),u=!0)},o(k){P(o),P(_),P(b),u=!1},d(k){k&&w(e),h[l].d(),_&&_.d(),b&&b.d(),f=!1,De(d)}}}function ok(n,e,t){const i=Tt(),s="search_"+U.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new kn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function h(E=!0){t(7,p=""),E&&(d==null||d.focus()),i("clear")}function g(){t(0,l=p),i("submit",l)}async function _(){u||f||(t(5,f=!0),t(4,u=(await ut(()=>import("./FilterAutocompleteInput-e9273c93.js"),["./FilterAutocompleteInput-e9273c93.js","./index-03b6b7de.js"],import.meta.url)).default),t(5,f=!1))}Xt(()=>{_()});function b(E){me.call(this,n,E)}function k(E){p=E,t(7,p),t(0,l)}function $(E){ne[E?"unshift":"push"](()=>{d=E,t(6,d)})}function C(){p=this.value,t(7,p),t(0,l)}const T=()=>{h(!1),g()};return n.$$set=E=>{"value"in E&&t(0,l=E.value),"placeholder"in E&&t(1,o=E.placeholder),"autocompleteCollection"in E&&t(2,r=E.autocompleteCollection),"extraAutocompleteKeys"in E&&t(3,a=E.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,h,g,b,k,$,C,T]}class Jo extends be{constructor(e){super(),ge(this,e,ok,lk,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function rk(n){let e,t,i,s,l,o;return{c(){e=y("button"),t=y("i"),m(t,"class","ri-refresh-line svelte-1bvelc2"),m(e,"type","button"),m(e,"aria-label","Refresh"),m(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),x(e,"refreshing",n[2])},m(r,a){S(r,e,a),v(e,t),l||(o=[Oe(s=Be.call(null,e,n[0])),J(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&m(e,"class",i),s&&jt(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&x(e,"refreshing",r[2])},i:ee,o:ee,d(r){r&&w(e),l=!1,De(o)}}}function ak(n,e,t){const i=Tt();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Xt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Zo extends be{constructor(e){super(),ge(this,e,ak,rk,_e,{tooltip:0,class:1})}}function uk(n){let e,t,i,s,l;const o=n[6].default,r=kt(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),m(e,"tabindex","0"),m(e,"title",n[2]),m(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&St(r,o,a,a[5],i?wt(o,a[5],u,null):$t(a[5]),null),(!i||u&4)&&m(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&m(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(I(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,De(l)}}}function fk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class un extends be{constructor(e){super(),ge(this,e,fk,uk,_e,{class:1,name:2,sort:0,disable:3})}}function ck(n){let e;return{c(){e=y("span"),e.textContent="N/A",m(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function dk(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=Y(n[2]),s=D(),l=y("div"),o=Y(n[1]),r=Y(" UTC"),m(t,"class","date"),m(l,"class","time svelte-zdiknu"),m(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&le(i,a[2]),u&2&&le(o,a[1])},d(a){a&&w(e)}}}function pk(n){let e;function t(l,o){return l[0]?dk:ck}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function mk(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class $i extends be{constructor(e){super(),ge(this,e,mk,pk,_e,{date:0})}}const hk=n=>({}),of=n=>({}),_k=n=>({}),rf=n=>({});function gk(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=kt(u,n,n[4],rf),d=n[5].default,p=kt(d,n,n[4],null),h=n[5].after,g=kt(h,n,n[4],of);return{c(){e=y("div"),f&&f.c(),t=D(),i=y("div"),p&&p.c(),l=D(),g&&g.c(),m(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),m(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(_,b){S(_,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),g&&g.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(_,[b]){f&&f.p&&(!o||b&16)&&St(f,u,_,_[4],o?wt(u,_[4],b,_k):$t(_[4]),rf),p&&p.p&&(!o||b&16)&&St(p,d,_,_[4],o?wt(d,_[4],b,null):$t(_[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+_[0]+" "+_[3]+" svelte-wc2j9h"))&&m(i,"class",s),g&&g.p&&(!o||b&16)&&St(g,h,_,_[4],o?wt(h,_[4],b,hk):$t(_[4]),of)},i(_){o||(I(f,_),I(p,_),I(g,_),o=!0)},o(_){P(f,_),P(p,_),P(g,_),o=!1},d(_){_&&w(e),f&&f.d(_),p&&p.d(_),n[6](null),g&&g.d(_),r=!1,De(a)}}}function bk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const p=o.offsetWidth,h=o.scrollWidth;h-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}Xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){ne[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class ja extends be{constructor(e){super(),ge(this,e,bk,gk,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function af(n,e,t){const i=n.slice();return i[23]=e[t],i}function vk(n){let e;return{c(){e=y("div"),e.innerHTML=` + Method`,m(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function yk(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="URL",m(t,"class",U.getFieldTypeIcon("url")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function kk(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="Referer",m(t,"class",U.getFieldTypeIcon("url")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function wk(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="User IP",m(t,"class",U.getFieldTypeIcon("number")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function Sk(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="Status",m(t,"class",U.getFieldTypeIcon("number")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function $k(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="Created",m(t,"class",U.getFieldTypeIcon("date")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function uf(n){let e;function t(l,o){return l[6]?Ck:Tk}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function Tk(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&ff(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No logs found.",s=D(),o&&o.c(),l=D(),m(t,"colspan","99"),m(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=ff(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function Ck(n){let e;return{c(){e=y("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function ff(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',m(e,"type","button"),m(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function cf(n){let e;return{c(){e=y("i"),m(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),m(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function df(n,e){var Ee,Ge,_t;let t,i,s,l=((Ee=e[23].method)==null?void 0:Ee.toUpperCase())+"",o,r,a,u,f,d=e[23].url+"",p,h,g,_,b,k,$=(e[23].referer||"N/A")+"",C,T,E,M,O,A=(e[23].userIp||"N/A")+"",L,N,q,R,F,j=e[23].status+"",V,W,te,X,G,ae,Q,se,ve,$e,ze=(((Ge=e[23].meta)==null?void 0:Ge.errorMessage)||((_t=e[23].meta)==null?void 0:_t.errorData))&&cf();X=new $i({props:{date:e[23].created}});function Ue(){return e[17](e[23])}function we(...Xe){return e[18](e[23],...Xe)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("span"),o=Y(l),a=D(),u=y("td"),f=y("span"),p=Y(d),g=D(),ze&&ze.c(),_=D(),b=y("td"),k=y("span"),C=Y($),E=D(),M=y("td"),O=y("span"),L=Y(A),q=D(),R=y("td"),F=y("span"),V=Y(j),W=D(),te=y("td"),B(X.$$.fragment),G=D(),ae=y("td"),ae.innerHTML='',Q=D(),m(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),m(i,"class","col-type-text col-field-method min-width"),m(f,"class","txt txt-ellipsis"),m(f,"title",h=e[23].url),m(u,"class","col-type-text col-field-url"),m(k,"class","txt txt-ellipsis"),m(k,"title",T=e[23].referer),x(k,"txt-hint",!e[23].referer),m(b,"class","col-type-text col-field-referer"),m(O,"class","txt txt-ellipsis"),m(O,"title",N=e[23].userIp),x(O,"txt-hint",!e[23].userIp),m(M,"class","col-type-number col-field-userIp"),m(F,"class","label"),x(F,"label-danger",e[23].status>=400),m(R,"class","col-type-number col-field-status"),m(te,"class","col-type-date col-field-created"),m(ae,"class","col-type-action min-width"),m(t,"tabindex","0"),m(t,"class","row-handle"),this.first=t},m(Xe,Ke){S(Xe,t,Ke),v(t,i),v(i,s),v(s,o),v(t,a),v(t,u),v(u,f),v(f,p),v(u,g),ze&&ze.m(u,null),v(t,_),v(t,b),v(b,k),v(k,C),v(t,E),v(t,M),v(M,O),v(O,L),v(t,q),v(t,R),v(R,F),v(F,V),v(t,W),v(t,te),z(X,te,null),v(t,G),v(t,ae),v(t,Q),se=!0,ve||($e=[J(t,"click",Ue),J(t,"keydown",we)],ve=!0)},p(Xe,Ke){var ce,He,At;e=Xe,(!se||Ke&8)&&l!==(l=((ce=e[23].method)==null?void 0:ce.toUpperCase())+"")&&le(o,l),(!se||Ke&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&m(s,"class",r),(!se||Ke&8)&&d!==(d=e[23].url+"")&&le(p,d),(!se||Ke&8&&h!==(h=e[23].url))&&m(f,"title",h),(He=e[23].meta)!=null&&He.errorMessage||(At=e[23].meta)!=null&&At.errorData?ze||(ze=cf(),ze.c(),ze.m(u,null)):ze&&(ze.d(1),ze=null),(!se||Ke&8)&&$!==($=(e[23].referer||"N/A")+"")&&le(C,$),(!se||Ke&8&&T!==(T=e[23].referer))&&m(k,"title",T),(!se||Ke&8)&&x(k,"txt-hint",!e[23].referer),(!se||Ke&8)&&A!==(A=(e[23].userIp||"N/A")+"")&&le(L,A),(!se||Ke&8&&N!==(N=e[23].userIp))&&m(O,"title",N),(!se||Ke&8)&&x(O,"txt-hint",!e[23].userIp),(!se||Ke&8)&&j!==(j=e[23].status+"")&&le(V,j),(!se||Ke&8)&&x(F,"label-danger",e[23].status>=400);const Te={};Ke&8&&(Te.date=e[23].created),X.$set(Te)},i(Xe){se||(I(X.$$.fragment,Xe),se=!0)},o(Xe){P(X.$$.fragment,Xe),se=!1},d(Xe){Xe&&w(t),ze&&ze.d(),H(X),ve=!1,De($e)}}}function Mk(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O,A,L=[],N=new Map,q;function R(we){n[11](we)}let F={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[vk]},$$scope:{ctx:n}};n[1]!==void 0&&(F.sort=n[1]),s=new un({props:F}),ne.push(()=>he(s,"sort",R));function j(we){n[12](we)}let V={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[yk]},$$scope:{ctx:n}};n[1]!==void 0&&(V.sort=n[1]),r=new un({props:V}),ne.push(()=>he(r,"sort",j));function W(we){n[13](we)}let te={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[kk]},$$scope:{ctx:n}};n[1]!==void 0&&(te.sort=n[1]),f=new un({props:te}),ne.push(()=>he(f,"sort",W));function X(we){n[14](we)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[wk]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),h=new un({props:G}),ne.push(()=>he(h,"sort",X));function ae(we){n[15](we)}let Q={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Sk]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),b=new un({props:Q}),ne.push(()=>he(b,"sort",ae));function se(we){n[16](we)}let ve={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[$k]},$$scope:{ctx:n}};n[1]!==void 0&&(ve.sort=n[1]),C=new un({props:ve}),ne.push(()=>he(C,"sort",se));let $e=n[3];const ze=we=>we[23].id;for(let we=0;we<$e.length;we+=1){let Ee=af(n,$e,we),Ge=ze(Ee);N.set(Ge,L[we]=df(Ge,Ee))}let Ue=null;return $e.length||(Ue=uf(n)),{c(){e=y("table"),t=y("thead"),i=y("tr"),B(s.$$.fragment),o=D(),B(r.$$.fragment),u=D(),B(f.$$.fragment),p=D(),B(h.$$.fragment),_=D(),B(b.$$.fragment),$=D(),B(C.$$.fragment),E=D(),M=y("th"),O=D(),A=y("tbody");for(let we=0;wel=!1)),s.$set(Ge);const _t={};Ee&67108864&&(_t.$$scope={dirty:Ee,ctx:we}),!a&&Ee&2&&(a=!0,_t.sort=we[1],ye(()=>a=!1)),r.$set(_t);const Xe={};Ee&67108864&&(Xe.$$scope={dirty:Ee,ctx:we}),!d&&Ee&2&&(d=!0,Xe.sort=we[1],ye(()=>d=!1)),f.$set(Xe);const Ke={};Ee&67108864&&(Ke.$$scope={dirty:Ee,ctx:we}),!g&&Ee&2&&(g=!0,Ke.sort=we[1],ye(()=>g=!1)),h.$set(Ke);const Te={};Ee&67108864&&(Te.$$scope={dirty:Ee,ctx:we}),!k&&Ee&2&&(k=!0,Te.sort=we[1],ye(()=>k=!1)),b.$set(Te);const ce={};Ee&67108864&&(ce.$$scope={dirty:Ee,ctx:we}),!T&&Ee&2&&(T=!0,ce.sort=we[1],ye(()=>T=!1)),C.$set(ce),Ee&841&&($e=we[3],ue(),L=yt(L,Ee,ze,1,we,$e,N,A,Kt,df,null,af),fe(),!$e.length&&Ue?Ue.p(we,Ee):$e.length?Ue&&(Ue.d(1),Ue=null):(Ue=uf(we),Ue.c(),Ue.m(A,null))),(!q||Ee&64)&&x(e,"table-loading",we[6])},i(we){if(!q){I(s.$$.fragment,we),I(r.$$.fragment,we),I(f.$$.fragment,we),I(h.$$.fragment,we),I(b.$$.fragment,we),I(C.$$.fragment,we);for(let Ee=0;Ee<$e.length;Ee+=1)I(L[Ee]);q=!0}},o(we){P(s.$$.fragment,we),P(r.$$.fragment,we),P(f.$$.fragment,we),P(h.$$.fragment,we),P(b.$$.fragment,we),P(C.$$.fragment,we);for(let Ee=0;Ee{if(N<=1&&_(),t(6,p=!1),t(5,f=R.page),t(4,d=R.totalItems),s("load",u.concat(R.items)),q){const F=++h;for(;R.items.length&&h==F;)t(3,u=u.concat(R.items.splice(0,10))),await U.yieldToMain()}else t(3,u=u.concat(R.items))}).catch(R=>{R!=null&&R.isAbort||(t(6,p=!1),console.warn(R),_(),de.error(R,!1))})}function _(){t(3,u=[]),t(5,f=1),t(4,d=0)}function b(N){a=N,t(1,a)}function k(N){a=N,t(1,a)}function $(N){a=N,t(1,a)}function C(N){a=N,t(1,a)}function T(N){a=N,t(1,a)}function E(N){a=N,t(1,a)}const M=N=>s("select",N),O=(N,q)=>{q.code==="Enter"&&(q.preventDefault(),s("select",N))},A=()=>t(0,o=""),L=()=>g(f+1);return n.$$set=N=>{"filter"in N&&t(0,o=N.filter),"presets"in N&&t(10,r=N.presets),"sort"in N&&t(1,a=N.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(_(),g(1)),n.$$.dirty&24&&t(7,i=d>u.length)},[o,a,g,u,d,f,p,i,s,l,r,b,k,$,C,T,E,M,O,A,L]}class Dk extends be{constructor(e){super(),ge(this,e,Ok,Ek,_e,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + */function hi(){}const Ak=function(){let n=0;return function(){return n++}}();function dt(n){return n===null||typeof n>"u"}function Ct(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function nt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Bt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return Bt(n)?n:e}function lt(n,e){return typeof n>"u"?e:n}const Ik=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,vb=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Ft(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function ht(n,e,t,i){let s,l,o;if(Ct(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function qi(n,e){return(hf[e]||(hf[e]=Fk(e)))(n)}function Fk(n){const e=Nk(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Nk(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Va(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Yn=n=>typeof n<"u",ji=n=>typeof n=="function",_f=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Rk(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const qt=Math.PI,bt=2*qt,qk=bt+qt,Co=Number.POSITIVE_INFINITY,jk=qt/180,Nt=qt/2,Js=qt/4,gf=qt*2/3,Un=Math.log10,ri=Math.sign;function bf(n){const e=Math.round(n);n=al(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Un(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Vk(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Ls(n){return!isNaN(parseFloat(n))&&isFinite(n)}function al(n,e,t){return Math.abs(n-e)=n}function kb(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ha(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const ts=(n,e,t,i)=>Ha(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ha(n,t,i=>n[i][e]>=t);function Wk(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Va(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function yf(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(Sb.forEach(l=>{delete n[l]}),delete n._chartjs)}function $b(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Cb(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,Tb.call(window,()=>{s=!1,n.apply(e,l)}))}}function Kk(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Jk=n=>n==="start"?"left":n==="end"?"right":"center",kf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Mb(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:d,maxDefined:p}=o.getUserBounds();d&&(s=fn(Math.min(ts(r,o.axis,u).lo,t?i:ts(e,a,o.getPixelForValue(u)).lo),0,i-1)),p?l=fn(Math.max(ts(r,o.axis,f,!0).hi+1,t?0:ts(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Eb(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Wl=n=>n===0||n===1,wf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*bt/t)),Sf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*bt/t)+1,ul={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Nt)+1,easeOutSine:n=>Math.sin(n*Nt),easeInOutSine:n=>-.5*(Math.cos(qt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Wl(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Wl(n)?n:wf(n,.075,.3),easeOutElastic:n=>Wl(n)?n:Sf(n,.075,.3),easeInOutElastic(n){return Wl(n)?n:n<.5?.5*wf(n*2,.1125,.45):.5+.5*Sf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-ul.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ul.easeInBounce(n*2)*.5:ul.easeOutBounce(n*2-1)*.5+.5};/*! + * @kurkle/color v0.2.1 + * https://github.com/kurkle/color#readme + * (c) 2022 Jukka Kurkela + * Released under the MIT License + */function Al(n){return n+.5|0}const Li=(n,e,t)=>Math.max(Math.min(n,t),e);function il(n){return Li(Al(n*2.55),0,255)}function Ri(n){return Li(Al(n*255),0,255)}function bi(n){return Li(Al(n/2.55)/100,0,1)}function $f(n){return Li(Al(n*100),0,100)}const qn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},oa=[..."0123456789ABCDEF"],Zk=n=>oa[n&15],Gk=n=>oa[(n&240)>>4]+oa[n&15],Yl=n=>(n&240)>>4===(n&15),Xk=n=>Yl(n.r)&&Yl(n.g)&&Yl(n.b)&&Yl(n.a);function Qk(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&qn[n[1]]*17,g:255&qn[n[2]]*17,b:255&qn[n[3]]*17,a:e===5?qn[n[4]]*17:255}:(e===7||e===9)&&(t={r:qn[n[1]]<<4|qn[n[2]],g:qn[n[3]]<<4|qn[n[4]],b:qn[n[5]]<<4|qn[n[6]],a:e===9?qn[n[7]]<<4|qn[n[8]]:255})),t}const xk=(n,e)=>n<255?e(n):"";function e2(n){var e=Xk(n)?Zk:Gk;return n?"#"+e(n.r)+e(n.g)+e(n.b)+xk(n.a,e):void 0}const t2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ob(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function n2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function i2(n,e,t){const i=Ob(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function s2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=s2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Ua(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ri)}function Wa(n,e,t){return Ua(Ob,n,e,t)}function l2(n,e,t){return Ua(i2,n,e,t)}function o2(n,e,t){return Ua(n2,n,e,t)}function Db(n){return(n%360+360)%360}function r2(n){const e=t2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?il(+e[5]):Ri(+e[5]));const s=Db(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=l2(s,l,o):e[1]==="hsv"?i=o2(s,l,o):i=Wa(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function a2(n,e){var t=Ba(n);t[0]=Db(t[0]+e),t=Wa(t),n.r=t[0],n.g=t[1],n.b=t[2]}function u2(n){if(!n)return;const e=Ba(n),t=e[0],i=$f(e[1]),s=$f(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${bi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Tf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Cf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function f2(){const n={},e=Object.keys(Cf),t=Object.keys(Tf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Kl;function c2(n){Kl||(Kl=f2(),Kl.transparent=[0,0,0,0]);const e=Kl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const d2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function p2(n){const e=d2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?il(o):Li(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?il(i):Li(i,0,255)),s=255&(e[4]?il(s):Li(s,0,255)),l=255&(e[6]?il(l):Li(l,0,255)),{r:i,g:s,b:l,a:t}}}function m2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${bi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const mr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,vs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function h2(n,e,t){const i=vs(bi(n.r)),s=vs(bi(n.g)),l=vs(bi(n.b));return{r:Ri(mr(i+t*(vs(bi(e.r))-i))),g:Ri(mr(s+t*(vs(bi(e.g))-s))),b:Ri(mr(l+t*(vs(bi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Jl(n,e,t){if(n){let i=Ba(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Wa(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ab(n,e){return n&&Object.assign(e||{},n)}function Mf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Ri(n[3]))):(e=Ab(n,{r:0,g:0,b:0,a:1}),e.a=Ri(e.a)),e}function _2(n){return n.charAt(0)==="r"?p2(n):r2(n)}class Mo{constructor(e){if(e instanceof Mo)return e;const t=typeof e;let i;t==="object"?i=Mf(e):t==="string"&&(i=Qk(e)||c2(e)||_2(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Ab(this._rgb);return e&&(e.a=bi(e.a)),e}set rgb(e){this._rgb=Mf(e)}rgbString(){return this._valid?m2(this._rgb):void 0}hexString(){return this._valid?e2(this._rgb):void 0}hslString(){return this._valid?u2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=h2(this._rgb,e._rgb,t)),this}clone(){return new Mo(this.rgb)}alpha(e){return this._rgb.a=Ri(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Al(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Jl(this._rgb,2,e),this}darken(e){return Jl(this._rgb,2,-e),this}saturate(e){return Jl(this._rgb,1,e),this}desaturate(e){return Jl(this._rgb,1,-e),this}rotate(e){return a2(this._rgb,e),this}}function Ib(n){return new Mo(n)}function Lb(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ef(n){return Lb(n)?n:Ib(n)}function hr(n){return Lb(n)?n:Ib(n).saturate(.5).darken(.1).hexString()}const as=Object.create(null),ra=Object.create(null);function fl(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>hr(i.backgroundColor),this.hoverBorderColor=(t,i)=>hr(i.borderColor),this.hoverColor=(t,i)=>hr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return _r(this,e,t)}get(e){return fl(this,e)}describe(e,t){return _r(ra,e,t)}override(e,t){return _r(as,e,t)}route(e,t,i,s){const l=fl(this,e),o=fl(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return nt(a)?Object.assign({},u,a):lt(a,u)},set(a){this[r]=a}}})}}var ot=new g2({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function b2(n){return!n||dt(n.size)||dt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Eo(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function v2(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,d,p;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function vl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,S2(n,l),a=0;a+n||0;function Ja(n,e){const t={},i=nt(e),s=i?Object.keys(e):e,l=nt(n)?i?o=>lt(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=E2(l(o));return t}function Pb(n){return Ja(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Cs(n){return Ja(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Kn(n){const e=Pb(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Dn(n,e){n=n||{},e=e||ot.font;let t=lt(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=lt(n.style,e.style);i&&!(""+i).match(C2)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:lt(n.family,e.family),lineHeight:M2(lt(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:lt(n.weight,e.weight),string:""};return s.string=b2(s),s}function Zl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function zi(n,e){return Object.assign(Object.create(n),e)}function Za(n,e=[""],t=n,i,s=()=>n[0]){Yn(i)||(i=qb("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Za([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return Nb(o,r,()=>R2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Af(o).includes(r)},ownKeys(o){return Af(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ps(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Fb(n,i),setContext:l=>Ps(n,l,t,i),override:l=>Ps(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return Nb(l,o,()=>A2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Fb(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:ji(t)?t:()=>t,isIndexable:ji(i)?i:()=>i}}const D2=(n,e)=>n?n+Va(e):e,Ga=(n,e)=>nt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Nb(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function A2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return ji(r)&&o.isScriptable(e)&&(r=I2(e,r,n,t)),Ct(r)&&r.length&&(r=L2(e,r,n,o.isIndexable)),Ga(e,r)&&(r=Ps(r,s,l&&l[e],o)),r}function I2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Ga(n,e)&&(e=Xa(s._scopes,s,n,e)),e}function L2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Yn(l.index)&&i(n))e=e[l.index%e.length];else if(nt(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const d=Xa(u,s,n,f);e.push(Ps(d,l,o&&o[n],r))}}return e}function Rb(n,e,t){return ji(n)?n(e,t):n}const P2=(n,e)=>n===!0?e:typeof n=="string"?qi(e,n):void 0;function F2(n,e,t,i,s){for(const l of e){const o=P2(t,l);if(o){n.add(o);const r=Rb(o._fallback,t,s);if(Yn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Yn(i)&&t!==i)return null}return!1}function Xa(n,e,t,i){const s=e._rootScopes,l=Rb(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=Df(r,o,t,l||t,i);return a===null||Yn(l)&&l!==t&&(a=Df(r,o,l,a,i),a===null)?!1:Za(Array.from(r),[""],s,l,()=>N2(e,t,i))}function Df(n,e,t,i,s){for(;t;)t=F2(n,e,t,i,s);return t}function N2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Ct(s)&&nt(t)?t:s}function R2(n,e,t,i){let s;for(const l of e)if(s=qb(D2(l,n),t),Yn(s))return Ga(n,s)?Xa(t,i,n,s):s}function qb(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Yn(i))return i}}function Af(n){let e=n._keys;return e||(e=n._keys=q2(n._scopes)),e}function q2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function jb(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function V2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=la(l,s),a=la(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const d=i*u,p=i*f;return{previous:{x:l.x-d*(o.x-s.x),y:l.y-d*(o.y-s.y)},next:{x:l.x+p*(o.x-s.x),y:l.y+p*(o.y-s.y)}}}function z2(n,e,t){const i=n.length;let s,l,o,r,a,u=Fs(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")B2(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Y2(n,e){return Go(n).getPropertyValue(e)}const K2=["top","right","bottom","left"];function ss(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=K2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const J2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Z2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(J2(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Qi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Go(t),l=s.boxSizing==="border-box",o=ss(s,"padding"),r=ss(s,"border","width"),{x:a,y:u,box:f}=Z2(n,t),d=o.left+(f&&r.left),p=o.top+(f&&r.top);let{width:h,height:g}=e;return l&&(h-=o.width+r.width,g-=o.height+r.height),{x:Math.round((a-d)/h*t.width/i),y:Math.round((u-p)/g*t.height/i)}}function G2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Qa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Go(l),a=ss(r,"border","width"),u=ss(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Ao(r.maxWidth,l,"clientWidth"),s=Ao(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||Co,maxHeight:s||Co}}const gr=n=>Math.round(n*10)/10;function X2(n,e,t,i){const s=Go(n),l=ss(s,"margin"),o=Ao(s.maxWidth,n,"clientWidth")||Co,r=Ao(s.maxHeight,n,"clientHeight")||Co,a=G2(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const d=ss(s,"border","width"),p=ss(s,"padding");u-=p.width+d.width,f-=p.height+d.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=gr(Math.min(u,o,a.maxWidth)),f=gr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=gr(u/2)),{width:u,height:f}}function If(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Q2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function Lf(n,e){const t=Y2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function xi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function x2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function ew(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=xi(n,s,t),r=xi(s,l,t),a=xi(l,e,t),u=xi(o,r,t),f=xi(r,a,t);return xi(u,f,t)}const Pf=new Map;function tw(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Pf.get(t);return i||(i=new Intl.NumberFormat(n,e),Pf.set(t,i)),i}function Il(n,e,t){return tw(e,t).format(n)}const nw=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},iw=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function br(n,e,t){return n?nw(e,t):iw()}function sw(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function lw(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Hb(n){return n==="angle"?{between:gl,compare:Hk,normalize:On}:{between:bl,compare:(e,t)=>e-t,normalize:e=>e}}function Ff({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function ow(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=Hb(i),a=e.length;let{start:u,end:f,loop:d}=n,p,h;if(d){for(u+=a,f+=a,p=0,h=a;pa(s,C,k)&&r(s,C)!==0,E=()=>r(l,k)===0||a(l,C,k),M=()=>_||T(),O=()=>!_||E();for(let A=f,L=f;A<=d;++A)$=e[A%o],!$.skip&&(k=u($[i]),k!==C&&(_=a(k,s,l),b===null&&M()&&(b=r(k,s)===0?A:L),b!==null&&O()&&(g.push(Ff({start:b,end:A,loop:p,count:o,style:h})),b=null),L=A,C=k));return b!==null&&g.push(Ff({start:b,end:d,loop:p,count:o,style:h})),g}function Ub(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function aw(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function uw(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=rw(t,s,l,i);if(i===!0)return Nf(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Tb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var _i=new dw;const qf="transparent",pw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Ef(n||qf),s=i.valid&&Ef(e||qf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class mw{constructor(e,t,i,s){const l=t[i];s=Zl([e.to,s,l,e.from]);const o=Zl([e.from,l,s]);this._active=!0,this._fn=e.fn||pw[e.type||typeof o],this._easing=ul[e.easing]||ul.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Zl([e.to,t,s,e.from]),this._from=Zl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});ot.set("animations",{colors:{type:"color",properties:_w},numbers:{type:"number",properties:hw}});ot.describe("animations",{_fallback:"animation"});ot.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class Wb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!nt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!nt(s))return;const l={};for(const o of gw)l[o]=s[o];(Ct(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=vw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&bw(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let d=l[u];const p=i.get(u);if(d)if(p&&d.active()){d.update(p,f,r);continue}else d.cancel();if(!p||!p.duration){e[u]=f;continue}l[u]=d=new mw(p,e,u,f),s.push(d)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return _i.add(this._chart,i),!0}}function bw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Bf(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=Sw(l,o,i),d=e.length;let p;for(let h=0;ht[i].axis===e).shift()}function Cw(n,e){return zi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Mw(n,e,t){return zi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Zs(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const yr=n=>n==="reset"||n==="none",Uf=(n,e)=>e?n:Object.assign({},n),Ew=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Yb(t,!0),values:null};class ei{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=zf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Zs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(d,p,h,g)=>d==="x"?p:d==="r"?g:h,l=t.xAxisID=lt(i.xAxisID,vr(e,"x")),o=t.yAxisID=lt(i.yAxisID,vr(e,"y")),r=t.rAxisID=lt(i.rAxisID,vr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&yf(this._data,this),e._stacked&&Zs(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(nt(t))this._data=ww(t);else if(i!==t){if(i){yf(i,this);const s=this._cachedMeta;Zs(s),s._parsed=[]}t&&Object.isExtensible(t)&&Yk(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=zf(t.vScale,t),t.stack!==i.stack&&(s=!0,Zs(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Bf(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,d,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{Ct(s[e])?p=this.parseArrayData(i,s,e,t):nt(s[e])?p=this.parseObjectData(i,s,e,t):p=this.parsePrimitiveData(i,s,e,t);const h=()=>d[r]===null||u&&d[r]_||d<_}for(p=0;p=0;--p)if(!g()){this.updateRangeFromParsed(u,e,h,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),_=u.resolveNamedOptions(p,h,g,d);return _.$shared&&(_.$shared=a,l[o]=Object.freeze(Uf(_,a))),_}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,t),p=f.getOptionScopes(this.getDataset(),d);a=f.createResolver(p,this.getContext(e,i,t))}const u=new Wb(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||yr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){yr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!yr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function Dw(n){const e=n.iScale,t=Ow(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Yn(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function Kb(n,e,t,i){return Ct(n)?Lw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Wf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,d,p;for(u=t,f=t+i;u=t?1:-1)}function Fw(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(dt(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,d=r.axis;for(let p=t;pgl(C,r,a,!0)?1:Math.max(T,T*t,E,E*t),g=(C,T,E)=>gl(C,r,a,!0)?-1:Math.min(T,T*t,E,E*t),_=h(0,u,d),b=h(Nt,f,p),k=g(qt,u,d),$=g(qt+Nt,f,p);i=(_-k)/2,s=(b-$)/2,l=-(_+k)/2,o=-(b+$)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Ll extends ei{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(nt(i[e])){const{key:a="value"}=this._parsing;l=u=>+qi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?bt*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Il(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Ll.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return Ct(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Xo extends ei{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=Mb(t,s,o);this._drawStart=r,this._drawCount=a,Eb(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(t,s),p=o.axis,h=r.axis,{spanGaps:g,segment:_}=this.options,b=Ls(g)?g:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||s==="none";let $=t>0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(E[p]-$[p])>b,_&&(M.parsed=E,M.raw=u.data[C]),d&&(M.options=f||this.resolveDataElementOptions(C,T.active?"active":s)),k||this.updateElement(T,C,M,s),$=E}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Xo.id="line";Xo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Xo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class tu extends ei{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Il(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return jb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,d=u.yCenter,p=u.getIndexAngle(0)-.5*qt;let h=p,g;const _=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Qn(this.resolveDataElementOptions(e,t).angle||i):0}}tu.id="polarArea";tu.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};tu.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Jb extends Ll{}Jb.id="pie";Jb.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class nu extends ei{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return jb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};Ci.defaults={};Ci.defaultRoutes=void 0;const Zb={values(n){return Ct(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=Vw(n,t)}const o=Un(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Il(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Un(n)));return i===1||i===2||i===5?Zb.numeric.call(this,n,e,t):""}};function Vw(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Qo={formatters:Zb};ot.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Qo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});ot.route("scale.ticks","color","","color");ot.route("scale.grid","color","","borderColor");ot.route("scale.grid","borderColor","","borderColor");ot.route("scale.title","color","","color");ot.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});ot.describe("scales",{_fallback:"scale"});ot.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function zw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Hw(n),s=t.major.enabled?Uw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Ww(e,a,s,l/i),a;const u=Bw(s,e,i);if(l>0){let f,d;const p=l>1?Math.round((r-o)/(l-1)):null;for(Xl(e,a,u,dt(p)?0:o-p,o),f=0,d=l-1;fs)return a}return Math.max(s,1)}function Uw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Jf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Zf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Zw(n,e){ht(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:jn(t,jn(i,t)),max:jn(i,jn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ft(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=O2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),d=f.widest.width,p=f.highest.height,h=fn(this.chart.width-d,0,this.maxWidth);r=e.offset?this.maxWidth/i:h/(i-1),d+6>r&&(r=h/(i-(e.offset?.5:1)),a=this.maxHeight-Gs(e.grid)-t.padding-Gf(e.title,this.chart.options.font),u=Math.sqrt(d*d+p*p),o=za(Math.min(Math.asin(fn((f.highest.height+6)/r,-1,1)),Math.asin(fn(a/u,-1,1))-Math.asin(fn(p/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){Ft(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ft(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Gf(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Gs(l)+a):(e.height=this.maxHeight,e.width=Gs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:d,highest:p}=this._getLabelSizes(),h=i.padding*2,g=Qn(this.labelRotation),_=Math.cos(g),b=Math.sin(g);if(r){const k=i.mirror?0:b*d.width+_*p.height;e.height=Math.min(this.maxHeight,e.height+k+h)}else{const k=i.mirror?0:_*d.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+k+h)}this._calculatePadding(u,f,b,_)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,h=0;a?u?(p=s*e.width,h=i*t.height):(p=i*e.height,h=s*t.width):l==="start"?h=t.width:l==="end"?p=e.width:l!=="inner"&&(p=e.width/2,h=t.width/2),this.paddingLeft=Math.max((p-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let f=t.height/2,d=e.height/2;l==="start"?(f=0,d=e.height):l==="end"&&(f=t.height,d=0),this.paddingTop=f+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ft(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[O]||0,height:o[O]||0});return{first:M(0),last:M(t-1),widest:M(T),highest:M(E),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Bk(this._alignToPixels?Ji(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),d=Gs(l),p=[],h=l.setContext(this.getContext()),g=h.drawBorder?h.borderWidth:0,_=g/2,b=function(V){return Ji(i,V,g)};let k,$,C,T,E,M,O,A,L,N,q,R;if(o==="top")k=b(this.bottom),M=this.bottom-d,A=k-_,N=b(e.top)+_,R=e.bottom;else if(o==="bottom")k=b(this.top),N=e.top,R=b(e.bottom)-_,M=k+_,A=this.top+d;else if(o==="left")k=b(this.right),E=this.right-d,O=k-_,L=b(e.left)+_,q=e.right;else if(o==="right")k=b(this.left),L=e.left,q=b(e.right)-_,E=k+_,O=this.left+d;else if(t==="x"){if(o==="center")k=b((e.top+e.bottom)/2+.5);else if(nt(o)){const V=Object.keys(o)[0],W=o[V];k=b(this.chart.scales[V].getPixelForValue(W))}N=e.top,R=e.bottom,M=k+_,A=M+d}else if(t==="y"){if(o==="center")k=b((e.left+e.right)/2);else if(nt(o)){const V=Object.keys(o)[0],W=o[V];k=b(this.chart.scales[V].getPixelForValue(W))}E=k-_,O=E-d,L=e.left,q=e.right}const F=lt(s.ticks.maxTicksLimit,f),j=Math.max(1,Math.ceil(f/F));for($=0;$l.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");ot.route(l,s,a,r)})}function n3(n){return"id"in n&&"defaults"in n}class i3{constructor(){this.controllers=new Ql(ei,"datasets",!0),this.elements=new Ql(Ci,"elements"),this.plugins=new Ql(Object,"plugins"),this.scales=new Ql(ds,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):ht(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Va(e);Ft(i["before"+s],[],i),t[e](i),Ft(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(M[h]-C[h])>k,b&&(O.parsed=M,O.raw=u.data[T]),p&&(O.options=d||this.resolveDataElementOptions(T,E.active?"active":s)),$||this.updateElement(E,T,O,s),C=M}this.updateSharedOptions(d,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}iu.id="scatter";iu.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};iu.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Zi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ua{constructor(e){this.options=e||{}}init(e){}formats(){return Zi()}parse(e,t){return Zi()}format(e,t){return Zi()}add(e,t,i){return Zi()}diff(e,t,i){return Zi()}startOf(e,t,i){return Zi()}endOf(e,t){return Zi()}}ua.override=function(n){Object.assign(ua.prototype,n)};var Gb={_date:ua};function s3(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?Uk:ts;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const d=a(l,e,t-f),p=a(l,e,t+f);return{lo:d.lo,hi:p.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Pl(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var a3={evaluateInteractionItems:Pl,modes:{index(n,e,t,i){const s=Qi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?wr(n,s,l,i,o):Sr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,d=u.data[f];d&&!d.skip&&a.push({element:d,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Qi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?wr(n,s,l,i,o):Sr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Qf(n,e){return n.filter(t=>Xb.indexOf(t.pos)===-1&&t.box.axis===e)}function Qs(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function u3(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Qs(Xs(e,"left"),!0),s=Qs(Xs(e,"right")),l=Qs(Xs(e,"top"),!0),o=Qs(Xs(e,"bottom")),r=Qf(e,"x"),a=Qf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Xs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function xf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function Qb(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function p3(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!nt(s)){t.size&&(n[s]-=t.size);const d=i[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?l.height:l.width),t.size=d.size/d.count,n[s]+=t.size}l.getPadding&&Qb(o,l.getPadding());const r=Math.max(0,e.outerWidth-xf(o,n,"left","right")),a=Math.max(0,e.outerHeight-xf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function m3(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function h3(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function sl(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof _.beforeLayout=="function"&&_.beforeLayout()});const f=a.reduce((_,b)=>b.box.options&&b.box.options.display===!1?_:_+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),p=Object.assign({},s);Qb(p,Kn(i));const h=Object.assign({maxPadding:p,w:l,h:o,x:s.left,y:s.top},s),g=c3(a.concat(u),d);sl(r.fullSize,h,d,g),sl(a,h,d,g),sl(u,h,d,g)&&sl(a,h,d,g),m3(h),ec(r.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,ec(r.rightAndBottom,h,d,g),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},ht(r.chartArea,_=>{const b=_.box;Object.assign(b,n.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class xb{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class _3 extends xb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const fo="$chartjs",g3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tc=n=>n===null||n==="";function b3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[fo]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",tc(s)){const l=Lf(n,"width");l!==void 0&&(n.width=l)}if(tc(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Lf(n,"height");l!==void 0&&(n.height=l)}return n}const e1=Q2?{passive:!0}:!1;function v3(n,e,t){n.addEventListener(e,t,e1)}function y3(n,e,t){n.canvas.removeEventListener(e,t,e1)}function k3(n,e){const t=g3[n.type]||n.type,{x:i,y:s}=Qi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Io(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function w3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Io(r.addedNodes,i),o=o&&!Io(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function S3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Io(r.removedNodes,i),o=o&&!Io(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const yl=new Map;let nc=0;function t1(){const n=window.devicePixelRatio;n!==nc&&(nc=n,yl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function $3(n,e){yl.size||window.addEventListener("resize",t1),yl.set(n,e)}function T3(n){yl.delete(n),yl.size||window.removeEventListener("resize",t1)}function C3(n,e,t){const i=n.canvas,s=i&&Qa(i);if(!s)return;const l=Cb((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),$3(n,l),o}function $r(n,e,t){t&&t.disconnect(),e==="resize"&&T3(n)}function M3(n,e,t){const i=n.canvas,s=Cb(l=>{n.ctx!==null&&t(k3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return v3(i,e,s),s}class E3 extends xb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(b3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[fo])return!1;const i=t[fo].initial;["height","width"].forEach(l=>{const o=i[l];dt(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[fo],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:w3,detach:S3,resize:C3}[t]||M3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:$r,detach:$r,resize:$r}[t]||y3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return X2(e,t,i,s)}isAttached(e){const t=Qa(e);return!!(t&&t.isConnected)}}function O3(n){return!zb()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?_3:E3}class D3{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(Ft(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){dt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=lt(i.options&&i.options.plugins,{}),l=A3(i);return s===!1&&!t?[]:L3(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function A3(n){const e={},t=[],i=Object.keys(oi.plugins.items);for(let l=0;l{const a=i[r];if(!nt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=ca(r,a),f=N3(u,s),d=t.scales||{};l[u]=l[u]||r,o[r]=rl(Object.create(null),[{axis:u},a,d[u],d[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||fa(a,e),d=(as[a]||{}).scales||{};Object.keys(d).forEach(p=>{const h=F3(p,u),g=r[h+"AxisID"]||l[h]||h;o[g]=o[g]||Object.create(null),rl(o[g],[{axis:h},i[g],d[p]])})}),Object.keys(o).forEach(r=>{const a=o[r];rl(a,[ot.scales[a.type],ot.scale])}),o}function n1(n){const e=n.options||(n.options={});e.plugins=lt(e.plugins,{}),e.scales=q3(n,e)}function i1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function j3(n){return n=n||{},n.data=i1(n.data),n1(n),n}const ic=new Map,s1=new Set;function to(n,e){let t=ic.get(n);return t||(t=e(),ic.set(n,t),s1.add(t)),t}const xs=(n,e,t)=>{const i=qi(e,t);i!==void 0&&n.add(i)};class V3{constructor(e){this._config=j3(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=i1(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),n1(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return to(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return to(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return to(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return to(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(d=>xs(a,e,d))),f.forEach(d=>xs(a,s,d)),f.forEach(d=>xs(a,as[l]||{},d)),f.forEach(d=>xs(a,ot,d)),f.forEach(d=>xs(a,ra,d))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),s1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,as[t]||{},ot.datasets[t]||{},{type:t},ot,ra]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=sc(this._resolverCache,e,s);let a=o;if(H3(o,t)){l.$shared=!1,i=ji(i)?i():i;const u=this.createResolver(e,i,r);a=Ps(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=sc(this._resolverCache,e,i);return nt(t)?Ps(l,t,void 0,s):l}}function sc(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Za(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const z3=n=>nt(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||ji(n[t]),!1);function H3(n,e){const{isScriptable:t,isIndexable:i}=Fb(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(ji(r)||z3(r))||o&&Ct(r))return!0}return!1}var B3="3.9.1";const U3=["top","bottom","left","right","chartArea"];function lc(n,e){return n==="top"||n==="bottom"||U3.indexOf(n)===-1&&e==="x"}function oc(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function rc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Ft(t&&t.onComplete,[n],e)}function W3(n){const e=n.chart,t=e.options.animation;Ft(t&&t.onProgress,[n],e)}function l1(n){return zb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Lo={},o1=n=>{const e=l1(n);return Object.values(Lo).filter(t=>t.canvas===e).pop()};function Y3(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function K3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Po{constructor(e,t){const i=this.config=new V3(t),s=l1(e),l=o1(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||O3(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Ak(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new D3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kk(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Lo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}_i.listen(this,"complete",rc),_i.listen(this,"progress",W3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return dt(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():If(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Of(this.canvas,this.ctx),this}stop(){return _i.stop(this),this}resize(e,t){_i.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,If(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Ft(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};ht(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=ca(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),ht(l,o=>{const r=o.options,a=r.id,u=ca(a,r),f=lt(r.type,o.dtype);(r.position===void 0||lc(r.position,u)!==lc(o.dposition))&&(r.position=o.dposition),s[a]=!0;let d=null;if(a in i&&i[a].type===f)d=i[a];else{const p=oi.getScale(f);d=new p({id:a,type:f,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(r,e)}),ht(s,(o,r)=>{o||delete i[r]}),ht(i,o=>{eo.configure(this,o,o.options),eo.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(oc("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){ht(this.scales,e=>{eo.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!_f(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;Y3(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;eo.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],ht(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ya(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ka(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return vl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=a3.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=zi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);Yn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),_i.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};ht(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){ht(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},ht(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!$o(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Rk(e),u=K3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Ft(l.onHover,[e,r,this],this),a&&Ft(l.onClick,[e,r,this],this));const f=!$o(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const ac=()=>ht(Po.instances,n=>n._plugins.invalidate()),Di=!0;Object.defineProperties(Po,{defaults:{enumerable:Di,value:ot},instances:{enumerable:Di,value:Lo},overrides:{enumerable:Di,value:as},registry:{enumerable:Di,value:oi},version:{enumerable:Di,value:B3},getChart:{enumerable:Di,value:o1},register:{enumerable:Di,value:(...n)=>{oi.add(...n),ac()}},unregister:{enumerable:Di,value:(...n)=>{oi.remove(...n),ac()}}});function r1(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+Nt,i-Nt),n.closePath(),n.clip()}function J3(n){return Ja(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Z3(n,e,t,i){const s=J3(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return fn(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:fn(s.innerStart,0,o),innerEnd:fn(s.innerEnd,0,o)}}function ys(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function da(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,d=Math.max(e.outerRadius+i+t-u,0),p=f>0?f+i+t+u:0;let h=0;const g=s-a;if(i){const V=f>0?f-i:0,W=d>0?d-i:0,te=(V+W)/2,X=te!==0?g*te/(te+i):g;h=(g-X)/2}const _=Math.max(.001,g*d-t/qt)/d,b=(g-_)/2,k=a+b+h,$=s-b-h,{outerStart:C,outerEnd:T,innerStart:E,innerEnd:M}=Z3(e,p,d,$-k),O=d-C,A=d-T,L=k+C/O,N=$-T/A,q=p+E,R=p+M,F=k+E/q,j=$-M/R;if(n.beginPath(),l){if(n.arc(o,r,d,L,N),T>0){const te=ys(A,N,o,r);n.arc(te.x,te.y,T,N,$+Nt)}const V=ys(R,$,o,r);if(n.lineTo(V.x,V.y),M>0){const te=ys(R,j,o,r);n.arc(te.x,te.y,M,$+Nt,j+Math.PI)}if(n.arc(o,r,p,$-M/p,k+E/p,!0),E>0){const te=ys(q,F,o,r);n.arc(te.x,te.y,E,F+Math.PI,k-Nt)}const W=ys(O,k,o,r);if(n.lineTo(W.x,W.y),C>0){const te=ys(O,L,o,r);n.arc(te.x,te.y,C,k-Nt,L)}}else{n.moveTo(o,r);const V=Math.cos(L)*d+o,W=Math.sin(L)*d+r;n.lineTo(V,W);const te=Math.cos(N)*d+o,X=Math.sin(N)*d+r;n.lineTo(te,X)}n.closePath()}function G3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){da(n,e,t,i,o+bt,s);for(let u=0;u=bt||gl(l,r,a),_=bl(o,u+p,f+p);return g&&_}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,d=(o+r+u+a)/2;return{x:t+Math.cos(f)*d,y:i+Math.sin(f)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>bt?Math.floor(i/bt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=qt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=G3(e,this,r,l,o);Q3(e,this,r,l,a,o),e.restore()}}su.id="arc";su.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};su.defaultRoutes={backgroundColor:"backgroundColor"};function a1(n,e,t=e){n.lineCap=lt(t.borderCapStyle,e.borderCapStyle),n.setLineDash(lt(t.borderDash,e.borderDash)),n.lineDashOffset=lt(t.borderDashOffset,e.borderDashOffset),n.lineJoin=lt(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=lt(t.borderWidth,e.borderWidth),n.strokeStyle=lt(t.borderColor,e.borderColor)}function x3(n,e,t){n.lineTo(t.x,t.y)}function eS(n){return n.stepped?k2:n.tension||n.cubicInterpolationMode==="monotone"?w2:x3}function u1(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-T:T))%l,C=()=>{_!==b&&(n.lineTo(f,b),n.lineTo(f,_),n.lineTo(f,k))};for(a&&(h=s[$(0)],n.moveTo(h.x,h.y)),p=0;p<=r;++p){if(h=s[$(p)],h.skip)continue;const T=h.x,E=h.y,M=T|0;M===g?(E<_?_=E:E>b&&(b=E),f=(d*f+T)/++d):(C(),n.lineTo(T,E),g=M,d=0,_=b=E),k=E}C()}function pa(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?nS:tS}function iS(n){return n.stepped?x2:n.tension||n.cubicInterpolationMode==="monotone"?ew:xi}function sS(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),a1(n,e.options),n.stroke(s)}function lS(n,e,t,i){const{segments:s,options:l}=e,o=pa(e);for(const r of s)a1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const oS=typeof Path2D=="function";function rS(n,e,t,i){oS&&!e.options.segment?sS(n,e,t,i):lS(n,e,t,i)}class Hi extends Ci{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;W2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=uw(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=Ub(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=iS(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function uc(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=ou(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function ou(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function fc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function c1(n,e){let t=[],i=!1;return Ct(n)?(i=!0,t=n):t=mS(n,e),t.length?new Hi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function cc(n){return n&&n.fill!==!1}function hS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Bt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function _S(n,e,t){const i=yS(n);if(nt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Bt(s)&&Math.floor(s)===s?gS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function gS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function bS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:nt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function vS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:nt(n)?i=n.value:i=e.getBaseValue(),i}function yS(n){const e=n.options,t=e.fill;let i=lt(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function kS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=wS(e,t);r.push(c1({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&Mr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;cc(l)&&Mr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!cc(i)||t.drawTime!=="beforeDatasetDraw"||Mr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const cl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` +`):n}function LS(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function hc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=Dn(e.bodyFont),u=Dn(e.titleFont),f=Dn(e.footerFont),d=l.length,p=s.length,h=i.length,g=Kn(e.padding);let _=g.height,b=0,k=i.reduce((T,E)=>T+E.before.length+E.lines.length+E.after.length,0);if(k+=n.beforeBody.length+n.afterBody.length,d&&(_+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),k){const T=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;_+=h*T+(k-h)*a.lineHeight+(k-1)*e.bodySpacing}p&&(_+=e.footerMarginTop+p*f.lineHeight+(p-1)*e.footerSpacing);let $=0;const C=function(T){b=Math.max(b,t.measureText(T).width+$)};return t.save(),t.font=u.string,ht(n.title,C),t.font=a.string,ht(n.beforeBody.concat(n.afterBody),C),$=e.displayColors?o+2+e.boxPadding:0,ht(i,T=>{ht(T.before,C),ht(T.lines,C),ht(T.after,C)}),$=0,t.font=f.string,ht(n.footer,C),t.restore(),b+=g.width,{width:b,height:_}}function PS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function FS(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function NS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),FS(u,n,e,t)&&(u="center"),u}function _c(n,e,t){const i=t.yAlign||e.yAlign||PS(n,t);return{xAlign:t.xAlign||e.xAlign||NS(n,e,t,i),yAlign:i}}function RS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function qS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function gc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:h}=Cs(o);let g=RS(e,r);const _=qS(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,p)+s:r==="right"&&(g+=Math.max(d,h)+s),{x:fn(g,0,i.width-e.width),y:fn(_,0,i.height-e.height)}}function no(n,e,t){const i=Kn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function bc(n){return si([],gi(n))}function jS(n,e,t){return zi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function vc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ha extends Ci{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new Wb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=jS(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=si(r,gi(s)),r=si(r,gi(l)),r=si(r,gi(o)),r}getBeforeBody(e,t){return bc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ht(e,l=>{const o={before:[],lines:[],after:[]},r=vc(i,l);si(o.before,gi(r.beforeLabel.call(this,l))),si(o.lines,r.label.call(this,l)),si(o.after,gi(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return bc(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=si(r,gi(s)),r=si(r,gi(l)),r=si(r,gi(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,d,p,i))),e.itemSort&&(r=r.sort((f,d)=>e.itemSort(f,d,i))),ht(r,f=>{const d=vc(e.callbacks,f);s.push(d.labelColor.call(this,f)),l.push(d.labelPointStyle.call(this,f)),o.push(d.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=cl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=hc(this,i),u=Object.assign({},r,a),f=_c(this.chart,i,u),d=gc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:d.x,y:d.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:d}=Cs(r),{x:p,y:h}=e,{width:g,height:_}=t;let b,k,$,C,T,E;return l==="center"?(T=h+_/2,s==="left"?(b=p,k=b-o,C=T+o,E=T-o):(b=p+g,k=b+o,C=T-o,E=T+o),$=b):(s==="left"?k=p+Math.max(a,f)+o:s==="right"?k=p+g-Math.max(u,d)-o:k=this.caretX,l==="top"?(C=h,T=C-o,b=k-o,$=k+o):(C=h+_,T=C+o,b=k+o,$=k-o),E=C),{x1:b,x2:k,x3:$,y1:C,y2:T,y3:E}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=br(i.rtl,this.x,this.width);for(e.x=no(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=Dn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aC!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Do(e,{x:b,y:_,w:u,h:a,radius:$}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Do(e,{x:k,y:_+1,w:u-2,h:a-2,radius:$}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,_,u,a),e.strokeRect(b,_,u,a),e.fillStyle=o.backgroundColor,e.fillRect(k,_+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,d=Dn(i.bodyFont);let p=d.lineHeight,h=0;const g=br(i.rtl,this.x,this.width),_=function(A){t.fillText(A,g.x(e.x+h),e.y+p/2),e.y+=p+l},b=g.textAlign(o);let k,$,C,T,E,M,O;for(t.textAlign=o,t.textBaseline="middle",t.font=d.string,e.x=no(this,b,i),t.fillStyle=i.bodyColor,ht(this.beforeBody,_),h=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,T=0,M=s.length;T0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=cl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=hc(this,e),a=Object.assign({},o,this._size),u=_c(t,e,a),f=gc(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Kn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),sw(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),lw(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!$o(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!$o(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=cl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ha.positioners=cl;var VS={id:"tooltip",_element:ha,positioners:cl,afterInit(n,e,t){t&&(n.tooltip=new ha({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:hi,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const zS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function HS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return zS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const BS=(n,e)=>n===null?null:fn(Math.round(n),0,e);class _a extends ds{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(dt(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:HS(i,e,lt(t,e),this._addedLabels),BS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}_a.id="category";_a.defaults={ticks:{callback:_a.prototype.getLabelForValue}};function US(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:d,includeBounds:p}=n,h=l||1,g=f-1,{min:_,max:b}=e,k=!dt(o),$=!dt(r),C=!dt(u),T=(b-_)/(d+1);let E=bf((b-_)/g/h)*h,M,O,A,L;if(E<1e-14&&!k&&!$)return[{value:_},{value:b}];L=Math.ceil(b/E)-Math.floor(_/E),L>g&&(E=bf(L*E/g/h)*h),dt(a)||(M=Math.pow(10,a),E=Math.ceil(E*M)/M),s==="ticks"?(O=Math.floor(_/E)*E,A=Math.ceil(b/E)*E):(O=_,A=b),k&&$&&l&&zk((r-o)/l,E/1e3)?(L=Math.round(Math.min((r-o)/E,f)),E=(r-o)/L,O=o,A=r):C?(O=k?o:O,A=$?r:A,L=u-1,E=(A-O)/L):(L=(A-O)/E,al(L,Math.round(L),E/1e3)?L=Math.round(L):L=Math.ceil(L));const N=Math.max(vf(E),vf(O));M=Math.pow(10,dt(a)?N:a),O=Math.round(O*M)/M,A=Math.round(A*M)/M;let q=0;for(k&&(p&&O!==o?(t.push({value:o}),Os=t?s:a,r=a=>l=i?l:a;if(e){const a=ri(s),u=ri(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=US(s,l);return e.bounds==="ticks"&&kb(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Il(e,this.chart.options.locale,this.options.ticks.format)}}class ru extends Fo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Bt(e)?e:0,this.max=Bt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Qn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ru.id="linear";ru.defaults={ticks:{callback:Qo.formatters.numeric}};function kc(n){return n/Math.pow(10,Math.floor(Un(n)))===1}function WS(n,e){const t=Math.floor(Un(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Un(e.min)))),o=Math.floor(Un(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:kc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Bt(e)?Math.max(0,e):null,this.max=Bt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(Un(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=WS(t,this);return e.bounds==="ticks"&&kb(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Il(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Un(e),this._valueRange=Un(this.max)-Un(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Un(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}p1.id="logarithmic";p1.defaults={ticks:{callback:Qo.formatters.logarithmic,major:{enabled:!0}}};function ga(n){const e=n.ticks;if(e.display&&n.display){const t=Kn(e.backdropPadding);return lt(e.font&&e.font.size,ot.font.size)+t.height}return 0}function YS(n,e,t){return t=Ct(t)?t:[t],{w:v2(n,e.string,t),h:t.length*e.lineHeight}}function wc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function KS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?qt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function ZS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ga(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?qt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function xS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=Dn(l.font),{x:r,y:a,textAlign:u,left:f,top:d,right:p,bottom:h}=n._pointLabelItems[s],{backdropColor:g}=l;if(!dt(g)){const _=Cs(l.borderRadius),b=Kn(l.backdropPadding);t.fillStyle=g;const k=f-b.left,$=d-b.top,C=p-f+b.width,T=h-d+b.height;Object.values(_).some(E=>E!==0)?(t.beginPath(),Do(t,{x:k,y:$,w:C,h:T,radius:_}),t.fill()):t.fillRect(k,$,C,T)}Oo(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function m1(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,bt);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=Ft(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?KS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=bt/(this._pointLabels.length||1),i=this.options.startAngle||0;return On(e*t+Qn(i))}getDistanceFromCenterForValue(e){if(dt(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(dt(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const d=s.setContext(this.getContext(f-1));e$(this,d,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:d}=u;!d||!f||(e.lineWidth=d,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=Dn(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const d=Kn(u.backdropPadding);e.fillRect(-o/2-d.left,-l-f.size/2-d.top,o+d.width,f.size+d.height)}Oo(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}er.id="radialLinear";er.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Qo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};er.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};er.descriptors={angleLines:{_fallback:"grid"}};const tr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},vn=Object.keys(tr);function n$(n,e){return n-e}function Sc(n,e){if(dt(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Bt(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Ls(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function $c(n,e,t,i){const s=vn.length;for(let l=vn.indexOf(n);l=vn.indexOf(t);l--){const o=vn[l];if(tr[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return vn[t?vn.indexOf(t):0]}function s$(n){for(let e=vn.indexOf(n)+1,t=vn.length;e=e?t[i]:t[s];n[l]=!0}}function l$(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function Cc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=fn(t,0,o),i=fn(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||$c(l.minUnit,t,i,this._getLabelCapacity(t)),r=lt(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Ls(a)||a===!0,f={};let d=t,p,h;if(u&&(d=+e.startOf(d,"isoWeek",a)),d=+e.startOf(d,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(p=d,h=0;p_-b).map(_=>+_)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],d=i[t],p=a&&f&&d&&d.major,h=this._adapter.format(e,s||(p?f:u)),g=l.ticks.callback;return g?Ft(g,[h,t,i],this):h}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=ts(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=ts(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class h1 extends Fl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=io(t,this.min),this._tableRange=io(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{i&&(t||(t=Ve(e,Jt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Ve(e,Jt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function r$(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=Y(n[1]),t=D(),s=Y(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&le(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&le(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function a$(n){let e;return{c(){e=Y("Loading...")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function u$(n){let e,t,i,s,l,o=n[2]&&Mc();function r(f,d){return f[2]?a$:r$}let a=r(n),u=a(n);return{c(){e=y("div"),o&&o.c(),t=D(),i=y("canvas"),s=D(),l=y("div"),u.c(),m(i,"class","chart-canvas svelte-vh4sl8"),zr(i,"height","250px"),zr(i,"width","100%"),m(e,"class","chart-wrapper svelte-vh4sl8"),x(e,"loading",n[2]),m(l,"class","txt-hint m-t-xs txt-right")},m(f,d){S(f,e,d),o&&o.m(e,null),v(e,t),v(e,i),n[8](i),S(f,s,d),S(f,l,d),u.m(l,null)},p(f,[d]){f[2]?o?d&4&&I(o,1):(o=Mc(),o.c(),I(o,1),o.m(e,t)):o&&(ue(),P(o,1,1,()=>{o=null}),fe()),d&4&&x(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,d):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){I(o)},o(f){P(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function f$(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),de.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{d();for(let g of h)r.push({x:new Date(g.date),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(d(),console.warn(h),de.error(h,!1))}).finally(()=>{t(2,u=!1)})}function d(){t(1,a=0),t(7,r=[])}Xt(()=>(Po.register(Hi,xo,Xo,ru,Fl,IS,VS),t(6,o=new Po(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function p(h){ne[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,p]}class c$ extends be{constructor(e){super(),ge(this,e,f$,u$,_e,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Ec=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d$(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _1={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function $(C){return C instanceof a?new a(C.type,$(C.content),C.alias):Array.isArray(C)?C.map($):C.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(E){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(E.stack)||[])[1];if($){var C=document.getElementsByTagName("script");for(var T in C)if(C[T].src==$)return C[T]}return null}},isActive:function($,C,T){for(var E="no-"+C;$;){var M=$.classList;if(M.contains(C))return!0;if(M.contains(E))return!1;$=$.parentElement}return!!T}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,C){var T=r.util.clone(r.languages[$]);for(var E in C)T[E]=C[E];return T},insertBefore:function($,C,T,E){E=E||r.languages;var M=E[$],O={};for(var A in M)if(M.hasOwnProperty(A)){if(A==C)for(var L in T)T.hasOwnProperty(L)&&(O[L]=T[L]);T.hasOwnProperty(A)||(O[A]=M[A])}var N=E[$];return E[$]=O,r.languages.DFS(r.languages,function(q,R){R===N&&q!=$&&(this[q]=O)}),O},DFS:function $(C,T,E,M){M=M||{};var O=r.util.objId;for(var A in C)if(C.hasOwnProperty(A)){T.call(C,A,C[A],E||A);var L=C[A],N=r.util.type(L);N==="Object"&&!M[O(L)]?(M[O(L)]=!0,$(L,T,null,M)):N==="Array"&&!M[O(L)]&&(M[O(L)]=!0,$(L,T,A,M))}}},plugins:{},highlightAll:function($,C){r.highlightAllUnder(document,$,C)},highlightAllUnder:function($,C,T){var E={callback:T,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",E),E.elements=Array.prototype.slice.apply(E.container.querySelectorAll(E.selector)),r.hooks.run("before-all-elements-highlight",E);for(var M=0,O;O=E.elements[M++];)r.highlightElement(O,C===!0,E.callback)},highlightElement:function($,C,T){var E=r.util.getLanguage($),M=r.languages[E];r.util.setLanguage($,E);var O=$.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,E);var A=$.textContent,L={element:$,language:E,grammar:M,code:A};function N(R){L.highlightedCode=R,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),T&&T.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),T&&T.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){N(r.util.encode(L.code));return}if(C&&i.Worker){var q=new Worker(r.filename);q.onmessage=function(R){N(R.data)},q.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else N(r.highlight(L.code,L.grammar,L.language))},highlight:function($,C,T){var E={code:$,grammar:C,language:T};if(r.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=r.tokenize(E.code,E.grammar),r.hooks.run("after-tokenize",E),a.stringify(r.util.encode(E.tokens),E.language)},tokenize:function($,C){var T=C.rest;if(T){for(var E in T)C[E]=T[E];delete C.rest}var M=new d;return p(M,M.head,$),f($,M,C,M.head,0),g(M)},hooks:{all:{},add:function($,C){var T=r.hooks.all;T[$]=T[$]||[],T[$].push(C)},run:function($,C){var T=r.hooks.all[$];if(!(!T||!T.length))for(var E=0,M;M=T[E++];)M(C)}},Token:a};i.Prism=r;function a($,C,T,E){this.type=$,this.content=C,this.alias=T,this.length=(E||"").length|0}a.stringify=function $(C,T){if(typeof C=="string")return C;if(Array.isArray(C)){var E="";return C.forEach(function(N){E+=$(N,T)}),E}var M={type:C.type,content:$(C.content,T),tag:"span",classes:["token",C.type],attributes:{},language:T},O=C.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var A="";for(var L in M.attributes)A+=" "+L+'="'+(M.attributes[L]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+A+">"+M.content+""};function u($,C,T,E){$.lastIndex=C;var M=$.exec(T);if(M&&E&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}function f($,C,T,E,M,O){for(var A in T)if(!(!T.hasOwnProperty(A)||!T[A])){var L=T[A];L=Array.isArray(L)?L:[L];for(var N=0;N=O.reach);G+=X.value.length,X=X.next){var ae=X.value;if(C.length>$.length)return;if(!(ae instanceof a)){var Q=1,se;if(j){if(se=u(te,G,$,F),!se||se.index>=$.length)break;var Ue=se.index,ve=se.index+se[0].length,$e=G;for($e+=X.value.length;Ue>=$e;)X=X.next,$e+=X.value.length;if($e-=X.value.length,G=$e,X.value instanceof a)continue;for(var ze=X;ze!==C.tail&&($eO.reach&&(O.reach=_t);var Xe=X.prev;Ee&&(Xe=p(C,Xe,Ee),G+=Ee.length),h(C,Xe,Q);var Ke=new a(A,R?r.tokenize(we,R):we,V,we);if(X=p(C,Xe,Ke),Ge&&p(C,X,Ge),Q>1){var Te={cause:A+","+N,reach:_t};f($,C,T,X.prev,G,Te),O&&Te.reach>O.reach&&(O.reach=Te.reach)}}}}}}function d(){var $={value:null,prev:null,next:null},C={value:null,prev:$,next:null};$.next=C,this.head=$,this.tail=C,this.length=0}function p($,C,T){var E=C.next,M={value:T,prev:C,next:E};return C.next=M,E.prev=M,$.length++,M}function h($,C,T){for(var E=C.next,M=0;M/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(_,b){return"✖ Error "+_+" while fetching file: "+b},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",d="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function p(_,b,k){var $=new XMLHttpRequest;$.open("GET",_,!0),$.onreadystatechange=function(){$.readyState==4&&($.status<400&&$.responseText?b($.responseText):$.status>=400?k(s($.status,$.statusText)):k(l))},$.send(null)}function h(_){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_||"");if(b){var k=Number(b[1]),$=b[2],C=b[3];return $?C?[k,Number(C)]:[k,void 0]:[k,k]}}t.hooks.add("before-highlightall",function(_){_.selector+=", "+d}),t.hooks.add("before-sanity-check",function(_){var b=_.element;if(b.matches(d)){_.code="",b.setAttribute(r,a);var k=b.appendChild(document.createElement("CODE"));k.textContent=i;var $=b.getAttribute("data-src"),C=_.language;if(C==="none"){var T=(/\.(\w+)$/.exec($)||[,"none"])[1];C=o[T]||T}t.util.setLanguage(k,C),t.util.setLanguage(b,C);var E=t.plugins.autoloader;E&&E.loadLanguages(C),p($,function(M){b.setAttribute(r,u);var O=h(b.getAttribute("data-range"));if(O){var A=M.split(/\r\n?|\n/g),L=O[0],N=O[1]==null?A.length:O[1];L<0&&(L+=A.length),L=Math.max(0,Math.min(L-1,A.length)),N<0&&(N+=A.length),N=Math.max(0,Math.min(N,A.length)),M=A.slice(L,N).join(` +`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}k.textContent=M,t.highlightElement(k)},function(M){b.setAttribute(r,f),k.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(d),$=0,C;C=k[$++];)t.highlightElement(C)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(_1);var p$=_1.exports;const el=d$(p$);var m$={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[p]=` +`+f[p],d=h)}a[u]=f.join("")}return a.join(` +`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,h="",g="",_=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function h$(n){let e,t,i;return{c(){e=y("div"),t=y("code"),m(t,"class","svelte-10s5tkd"),m(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&m(e,"class",i)},i:ee,o:ee,d(s){s&&w(e)}}}function _$(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=el.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),el.highlight(a,el.languages[l]||el.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof el<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class g1 extends be{constructor(e){super(),ge(this,e,_$,h$,_e,{class:0,content:2,language:3})}}const g$=n=>({}),Oc=n=>({}),b$=n=>({}),Dc=n=>({});function Ac(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C=n[4]&&!n[2]&&Ic(n);const T=n[19].header,E=kt(T,n,n[18],Dc);let M=n[4]&&n[2]&&Lc(n);const O=n[19].default,A=kt(O,n,n[18],null),L=n[19].footer,N=kt(L,n,n[18],Oc);return{c(){e=y("div"),t=y("div"),s=D(),l=y("div"),o=y("div"),C&&C.c(),r=D(),E&&E.c(),a=D(),M&&M.c(),u=D(),f=y("div"),A&&A.c(),d=D(),p=y("div"),N&&N.c(),m(t,"class","overlay"),m(o,"class","overlay-panel-section panel-header"),m(f,"class","overlay-panel-section panel-content"),m(p,"class","overlay-panel-section panel-footer"),m(l,"class",h="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),m(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(q,R){S(q,e,R),v(e,t),v(e,s),v(e,l),v(l,o),C&&C.m(o,null),v(o,r),E&&E.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),A&&A.m(f,null),n[21](f),v(l,d),v(l,p),N&&N.m(p,null),b=!0,k||($=[J(t,"click",xe(n[20])),J(f,"scroll",n[22])],k=!0)},p(q,R){n=q,n[4]&&!n[2]?C?C.p(n,R):(C=Ic(n),C.c(),C.m(o,r)):C&&(C.d(1),C=null),E&&E.p&&(!b||R[0]&262144)&&St(E,T,n,n[18],b?wt(T,n[18],R,b$):$t(n[18]),Dc),n[4]&&n[2]?M?M.p(n,R):(M=Lc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),A&&A.p&&(!b||R[0]&262144)&&St(A,O,n,n[18],b?wt(O,n[18],R,null):$t(n[18]),null),N&&N.p&&(!b||R[0]&262144)&&St(N,L,n,n[18],b?wt(L,n[18],R,g$):$t(n[18]),Oc),(!b||R[0]&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&m(l,"class",h),(!b||R[0]&262)&&x(l,"popup",n[2]),(!b||R[0]&4)&&x(e,"padded",n[2]),(!b||R[0]&1)&&x(e,"active",n[0])},i(q){b||(q&&et(()=>{b&&(i||(i=Ve(t,ta,{duration:ks,opacity:0},!0)),i.run(1))}),I(E,q),I(A,q),I(N,q),et(()=>{b&&(_&&_.end(1),g=rg(l,ci,n[2]?{duration:ks,y:-10}:{duration:ks,x:50}),g.start())}),b=!0)},o(q){q&&(i||(i=Ve(t,ta,{duration:ks,opacity:0},!1)),i.run(0)),P(E,q),P(A,q),P(N,q),g&&g.invalidate(),_=$a(l,ci,n[2]?{duration:ks,y:10}:{duration:ks,x:50}),b=!1},d(q){q&&w(e),q&&i&&i.end(),C&&C.d(),E&&E.d(q),M&&M.d(),A&&A.d(q),n[21](null),N&&N.d(q),q&&_&&_.end(),k=!1,De($)}}}function Ic(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",xe(n[5])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function Lc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",xe(n[5])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function v$(n){let e,t,i,s,l=n[0]&&Ac(n);return{c(){e=y("div"),l&&l.c(),m(e,"class","overlay-panel-wrapper"),m(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&I(l,1)):(l=Ac(o),l.c(),I(l,1),l.m(e,null)):l&&(ue(),P(l,1,1,()=>{l=null}),fe())},i(o){t||(I(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,De(s)}}}let Gi,Er=[];function b1(){return Gi=Gi||document.querySelector(".overlays"),Gi||(Gi=document.createElement("div"),Gi.classList.add("overlays"),document.body.appendChild(Gi)),Gi}let ks=150;function Pc(){return 1e3+b1().querySelectorAll(".overlay-panel-container.active").length}function y$(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:d=void 0}=e,{beforeHide:p=void 0}=e;const h=Tt(),g="op_"+U.randomString(10);let _,b,k,$,C="",T=o;function E(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function O(){return o}async function A(G){t(17,T=G),G?(k=document.activeElement,h("show"),_==null||_.focus()):(clearTimeout($),h("hide"),k==null||k.focus()),await cn(),L()}function L(){_&&(o?t(6,_.style.zIndex=Pc(),_):t(6,_.style="",_))}function N(){U.pushUnique(Er,g),document.body.classList.add("overlay-active")}function q(){U.removeByValue(Er,g),Er.length||document.body.classList.remove("overlay-active")}function R(G){o&&f&&G.code=="Escape"&&!U.isInput(G.target)&&_&&_.style.zIndex==Pc()&&(G.preventDefault(),M())}function F(G){o&&j(b)}function j(G,ae){ae&&t(8,C=""),G&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,C="scrollable");else{t(8,C="");return}G.scrollTop==0?t(8,C+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,C+=" scroll-bottom-reached")},100)))}Xt(()=>(b1().appendChild(_),()=>{var G;clearTimeout($),q(),(G=_==null?void 0:_.classList)==null||G.add("hidden"),setTimeout(()=>{_==null||_.remove()},0)}));const V=()=>a?M():!0;function W(G){ne[G?"unshift":"push"](()=>{b=G,t(7,b)})}const te=G=>j(G.target);function X(G){ne[G?"unshift":"push"](()=>{_=G,t(6,_)})}return n.$$set=G=>{"class"in G&&t(1,l=G.class),"active"in G&&t(0,o=G.active),"popup"in G&&t(2,r=G.popup),"overlayClose"in G&&t(3,a=G.overlayClose),"btnClose"in G&&t(4,u=G.btnClose),"escClose"in G&&t(12,f=G.escClose),"beforeOpen"in G&&t(13,d=G.beforeOpen),"beforeHide"in G&&t(14,p=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&T!=o&&A(o),n.$$.dirty[0]&128&&j(b,!0),n.$$.dirty[0]&64&&_&&L(),n.$$.dirty[0]&1&&(o?N():q())},[o,l,r,a,u,M,_,b,C,R,F,j,f,d,p,E,O,T,s,i,V,W,te,X]}class on extends be{constructor(e){super(),ge(this,e,y$,v$,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function k$(n){let e;return{c(){e=y("span"),e.textContent="N/A",m(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function w$(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=Y(t),m(e,"href",s=n[2].referer),m(e,"target","_blank"),m(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&m(e,"href",s)},d(l){l&&w(e)}}}function S$(n){let e;return{c(){e=y("span"),e.textContent="N/A",m(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function $$(n){let e,t,i;return t=new g1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","block")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function T$(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,h,g,_=n[2].status+"",b,k,$,C,T,E,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",O,A,L,N,q,R,F=n[2].auth+"",j,V,W,te,X,G,ae=n[2].url+"",Q,se,ve,$e,ze,Ue,we,Ee,Ge,_t,Xe,Ke=n[2].remoteIp+"",Te,ce,He,At,Fe,Ce,it=n[2].userIp+"",It,Vt,Ut,Pn,ti,$n,gt=n[2].userAgent+"",Fn,ps,ni,Ei,ms,mi,ke,Ie,Re,Qe,Ot,Tn,Nn,Ui,sn,dn;function Rl(Ne,Ae){return Ne[2].referer?w$:k$}let K=Rl(n),Z=K(n);const ie=[$$,S$],oe=[];function Me(Ne,Ae){return Ae&4&&(ke=null),ke==null&&(ke=!U.isEmpty(Ne[2].meta)),ke?0:1}return Ie=Me(n,-1),Re=oe[Ie]=ie[Ie](n),sn=new $i({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=D(),o=y("td"),a=Y(r),u=D(),f=y("tr"),d=y("td"),d.textContent="Status",p=D(),h=y("td"),g=y("span"),b=Y(_),k=D(),$=y("tr"),C=y("td"),C.textContent="Method",T=D(),E=y("td"),O=Y(M),A=D(),L=y("tr"),N=y("td"),N.textContent="Auth",q=D(),R=y("td"),j=Y(F),V=D(),W=y("tr"),te=y("td"),te.textContent="URL",X=D(),G=y("td"),Q=Y(ae),se=D(),ve=y("tr"),$e=y("td"),$e.textContent="Referer",ze=D(),Ue=y("td"),Z.c(),we=D(),Ee=y("tr"),Ge=y("td"),Ge.textContent="Remote IP",_t=D(),Xe=y("td"),Te=Y(Ke),ce=D(),He=y("tr"),At=y("td"),At.textContent="User IP",Fe=D(),Ce=y("td"),It=Y(it),Vt=D(),Ut=y("tr"),Pn=y("td"),Pn.textContent="UserAgent",ti=D(),$n=y("td"),Fn=Y(gt),ps=D(),ni=y("tr"),Ei=y("td"),Ei.textContent="Meta",ms=D(),mi=y("td"),Re.c(),Qe=D(),Ot=y("tr"),Tn=y("td"),Tn.textContent="Created",Nn=D(),Ui=y("td"),B(sn.$$.fragment),m(s,"class","min-width txt-hint txt-bold"),m(d,"class","min-width txt-hint txt-bold"),m(g,"class","label"),x(g,"label-danger",n[2].status>=400),m(C,"class","min-width txt-hint txt-bold"),m(N,"class","min-width txt-hint txt-bold"),m(te,"class","min-width txt-hint txt-bold"),m($e,"class","min-width txt-hint txt-bold"),m(Ge,"class","min-width txt-hint txt-bold"),m(At,"class","min-width txt-hint txt-bold"),m(Pn,"class","min-width txt-hint txt-bold"),m(Ei,"class","min-width txt-hint txt-bold"),m(Tn,"class","min-width txt-hint txt-bold"),m(e,"class","table-border")},m(Ne,Ae){S(Ne,e,Ae),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,h),v(h,g),v(g,b),v(t,k),v(t,$),v($,C),v($,T),v($,E),v(E,O),v(t,A),v(t,L),v(L,N),v(L,q),v(L,R),v(R,j),v(t,V),v(t,W),v(W,te),v(W,X),v(W,G),v(G,Q),v(t,se),v(t,ve),v(ve,$e),v(ve,ze),v(ve,Ue),Z.m(Ue,null),v(t,we),v(t,Ee),v(Ee,Ge),v(Ee,_t),v(Ee,Xe),v(Xe,Te),v(t,ce),v(t,He),v(He,At),v(He,Fe),v(He,Ce),v(Ce,It),v(t,Vt),v(t,Ut),v(Ut,Pn),v(Ut,ti),v(Ut,$n),v($n,Fn),v(t,ps),v(t,ni),v(ni,Ei),v(ni,ms),v(ni,mi),oe[Ie].m(mi,null),v(t,Qe),v(t,Ot),v(Ot,Tn),v(Ot,Nn),v(Ot,Ui),z(sn,Ui,null),dn=!0},p(Ne,Ae){var Ye;(!dn||Ae&4)&&r!==(r=Ne[2].id+"")&&le(a,r),(!dn||Ae&4)&&_!==(_=Ne[2].status+"")&&le(b,_),(!dn||Ae&4)&&x(g,"label-danger",Ne[2].status>=400),(!dn||Ae&4)&&M!==(M=((Ye=Ne[2].method)==null?void 0:Ye.toUpperCase())+"")&&le(O,M),(!dn||Ae&4)&&F!==(F=Ne[2].auth+"")&&le(j,F),(!dn||Ae&4)&&ae!==(ae=Ne[2].url+"")&&le(Q,ae),K===(K=Rl(Ne))&&Z?Z.p(Ne,Ae):(Z.d(1),Z=K(Ne),Z&&(Z.c(),Z.m(Ue,null))),(!dn||Ae&4)&&Ke!==(Ke=Ne[2].remoteIp+"")&&le(Te,Ke),(!dn||Ae&4)&&it!==(it=Ne[2].userIp+"")&&le(It,it),(!dn||Ae&4)&>!==(gt=Ne[2].userAgent+"")&&le(Fn,gt);let Je=Ie;Ie=Me(Ne,Ae),Ie===Je?oe[Ie].p(Ne,Ae):(ue(),P(oe[Je],1,1,()=>{oe[Je]=null}),fe(),Re=oe[Ie],Re?Re.p(Ne,Ae):(Re=oe[Ie]=ie[Ie](Ne),Re.c()),I(Re,1),Re.m(mi,null));const qe={};Ae&4&&(qe.date=Ne[2].created),sn.$set(qe)},i(Ne){dn||(I(Re),I(sn.$$.fragment,Ne),dn=!0)},o(Ne){P(Re),P(sn.$$.fragment,Ne),dn=!1},d(Ne){Ne&&w(e),Z.d(),oe[Ie].d(),H(sn)}}}function C$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function M$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',m(e,"type","button"),m(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function E$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[M$],header:[C$],default:[T$]},$$scope:{ctx:n}};return e=new on({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function O$(n,e,t){let i,s=new Yr;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){ne[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){me.call(this,n,d)}function f(d){me.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class D$ extends be{constructor(e){super(),ge(this,e,O$,E$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function A$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Include requests by admins"),m(e,"type","checkbox"),m(e,"id",t=n[14]),m(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[1],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&m(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Fc(n){let e,t;return e=new c$({props:{filter:n[4],presets:n[5]}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Nc(n){let e,t;return e=new Dk({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function I$(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$=n[3],C,T=n[3],E,M;r=new Zo({}),r.$on("refresh",n[9]),p=new pe({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[A$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),g=new Jo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),g.$on("submit",n[11]);let O=Fc(n),A=Nc(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=Y(n[6]),o=D(),B(r.$$.fragment),a=D(),u=y("div"),f=D(),d=y("div"),B(p.$$.fragment),h=D(),B(g.$$.fragment),_=D(),b=y("div"),k=D(),O.c(),C=D(),A.c(),E=Se(),m(s,"class","breadcrumb-item"),m(i,"class","breadcrumbs"),m(u,"class","flex-fill"),m(d,"class","inline-flex"),m(t,"class","page-header"),m(b,"class","clearfix m-b-base"),m(e,"class","page-header-wrapper m-b-0")},m(L,N){S(L,e,N),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),z(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),z(p,d,null),v(e,h),z(g,e,null),v(e,_),v(e,b),v(e,k),O.m(e,null),S(L,C,N),A.m(L,N),S(L,E,N),M=!0},p(L,N){(!M||N&64)&&le(l,L[6]);const q={};N&49154&&(q.$$scope={dirty:N,ctx:L}),p.$set(q);const R={};N&1&&(R.value=L[0]),g.$set(R),N&8&&_e($,$=L[3])?(ue(),P(O,1,1,ee),fe(),O=Fc(L),O.c(),I(O,1),O.m(e,null)):O.p(L,N),N&8&&_e(T,T=L[3])?(ue(),P(A,1,1,ee),fe(),A=Nc(L),A.c(),I(A,1),A.m(E.parentNode,E)):A.p(L,N)},i(L){M||(I(r.$$.fragment,L),I(p.$$.fragment,L),I(g.$$.fragment,L),I(O),I(A),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(g.$$.fragment,L),P(O),P(A),M=!1},d(L){L&&w(e),H(r),H(p),H(g),O.d(L),L&&w(C),L&&w(E),A.d(L)}}}function L$(n){let e,t,i,s;e=new Sn({props:{$$slots:{default:[I$]},$$scope:{ctx:n}}});let l={};return i=new D$({props:l}),n[13](i),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(o,r){z(e,o,r),S(o,t,r),z(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(I(e.$$.fragment,o),I(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[13](null),H(i,o)}}}const Rc="includeAdminLogs";function P$(n,e,t){var k;let i,s,l;Ze(n,Mt,$=>t(6,l=$));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];ln(Mt,l="Request logs",l);let r,a="",u=((k=window.localStorage)==null?void 0:k.getItem(Rc))<<0,f=1;function d(){t(3,f++,f)}const p=()=>d();function h(){u=this.checked,t(1,u)}const g=$=>t(0,a=$.detail),_=$=>r==null?void 0:r.show($==null?void 0:$.detail);function b($){ne[$?"unshift":"push"](()=>{r=$,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Rc,u<<0),n.$$.dirty&1&&t(4,s=U.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,d,p,h,g,_,b]}class F$ extends be{constructor(e){super(),ge(this,e,P$,L$,_e,{})}}const au=Ln({});function mn(n,e,t){au.set({text:n,yesCallback:e,noCallback:t})}function v1(){au.set({})}function qc(n){let e,t,i;const s=n[17].default,l=kt(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),m(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&St(l,s,o,o[16],i?wt(s,o[16],r,null):$t(o[16]),null),(!i||r&2)&&m(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(I(l,o),o&&et(()=>{i&&(t||(t=Ve(e,ci,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=Ve(e,ci,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function N$(n){let e,t,i,s,l=n[0]&&qc(n);return{c(){e=y("div"),l&&l.c(),m(e,"class","toggler-container"),m(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&I(l,1)):(l=qc(o),l.c(),I(l,1),l.m(e,null)):l&&(ue(),P(l,1,1,()=>{l=null}),fe())},i(o){t||(I(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,De(s)}}}function R$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,h,g,_=!1;const b=Tt();function k(){t(0,o=!1),_=!1,clearTimeout(g)}function $(){t(0,o=!0),clearTimeout(g),g=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function C(){o?k():$()}function T(V){return!d||V.classList.contains(u)||(h==null?void 0:h.contains(V))&&!d.contains(V)||d.contains(V)&&V.closest&&V.closest("."+u)}function E(V){(!o||T(V.target))&&(V.preventDefault(),V.stopPropagation(),C())}function M(V){(V.code==="Enter"||V.code==="Space")&&(!o||T(V.target))&&(V.preventDefault(),V.stopPropagation(),C())}function O(V){o&&r&&V.code==="Escape"&&(V.preventDefault(),k())}function A(V){o&&!(d!=null&&d.contains(V.target))?_=!0:_&&(_=!1)}function L(V){var W;o&&_&&!(d!=null&&d.contains(V.target))&&!(h!=null&&h.contains(V.target))&&!((W=V.target)!=null&&W.closest(".flatpickr-calendar"))&&k()}function N(V){A(V),L(V)}function q(V){R(),d==null||d.addEventListener("click",E),t(15,h=V||(d==null?void 0:d.parentNode)),h==null||h.addEventListener("click",E),h==null||h.addEventListener("keydown",M)}function R(){clearTimeout(g),d==null||d.removeEventListener("click",E),h==null||h.removeEventListener("click",E),h==null||h.removeEventListener("keydown",M)}Xt(()=>(q(),()=>R()));function F(V){ne[V?"unshift":"push"](()=>{p=V,t(3,p)})}function j(V){ne[V?"unshift":"push"](()=>{d=V,t(2,d)})}return n.$$set=V=>{"trigger"in V&&t(8,l=V.trigger),"active"in V&&t(0,o=V.active),"escClose"in V&&t(9,r=V.escClose),"autoScroll"in V&&t(10,a=V.autoScroll),"closableClass"in V&&t(11,u=V.closableClass),"class"in V&&t(1,f=V.class),"$$scope"in V&&t(16,s=V.$$scope)},n.$$.update=()=>{var V,W;n.$$.dirty&260&&d&&q(l),n.$$.dirty&32769&&(o?((V=h==null?void 0:h.classList)==null||V.add("active"),b("show")):((W=h==null?void 0:h.classList)==null||W.remove("active"),b("hide")))},[o,f,d,p,O,A,L,N,l,r,a,u,k,$,C,h,s,i,F,j]}class Jn extends be{constructor(e){super(),ge(this,e,R$,N$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function jc(n,e,t){const i=n.slice();return i[27]=e[t],i}function q$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=D(),l=y("label"),o=Y("Unique"),m(e,"type","checkbox"),m(e,"id",t=n[30]),e.checked=i=n[3].unique,m(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&m(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&m(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function j$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Rt(o,r(n)),ne.push(()=>he(e,"value",l))),{c(){e&&B(e.$$.fragment),i=Se()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ye(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ue();const p=e;P(p.$$.fragment,1,0,()=>{H(p,1)}),fe()}o?(e=Rt(o,r(a)),ne.push(()=>he(e,"value",l)),B(e.$$.fragment),I(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&I(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function V$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,m(e,"rows","7"),m(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function z$(n){let e,t,i,s;const l=[V$,j$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(ue(),P(o[f],1,1,()=>{o[f]=null}),fe(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),I(t,1),t.m(i.parentNode,i))},i(a){s||(I(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Vc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new pe({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[z$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Vc(n);return{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment),s=D(),r&&r.c(),l=Se()},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=Vc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(I(e.$$.fragment,a),I(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function B$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=Y(t),s=Y(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&le(i,t)},d(l){l&&w(e)}}}function Hc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[Oe(Be.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:ee,d(s){s&&w(e),t=!1,De(i)}}}function U$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=D(),t=y("button"),t.innerHTML='Cancel',i=D(),s=y("button"),s.innerHTML='Set index',m(t,"type","button"),m(t,"class","btn btn-transparent"),m(s,"type","button"),m(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,De(o)}}}function W$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[U$],header:[B$],default:[H$]},$$scope:{ctx:n}};for(let l=0;lX.name==V);te?U.removeByValue(W.columns,te):U.pushUnique(W.columns,{name:V}),t(2,p=U.buildIndex(W))}Xt(async()=>{t(8,_=!0);try{t(7,g=(await ut(()=>import("./CodeEditor-761096ff.js"),["./CodeEditor-761096ff.js","./index-03b6b7de.js"],import.meta.url)).default)}catch(V){console.warn(V)}t(8,_=!1)});const M=()=>C(),O=()=>k(),A=()=>T(),L=V=>{t(3,s.unique=V.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=U.buildIndex(s))};function N(V){p=V,t(2,p)}const q=V=>E(V);function R(V){ne[V?"unshift":"push"](()=>{f=V,t(4,f)})}function F(V){me.call(this,n,V)}function j(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Gt(V)),t(14,r=tt(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,W,te;n.$$.dirty[0]&1&&t(10,i=(((W=(V=u==null?void 0:u.schema)==null?void 0:V.filter(X=>!X.toDelete))==null?void 0:W.map(X=>X.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=U.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((te=s.columns)==null?void 0:te.map(X=>X.name))||[])},[u,k,p,s,f,d,h,g,_,l,i,C,T,E,r,b,M,O,A,L,N,q,R,F,j]}class K$ extends be{constructor(e){super(),ge(this,e,Y$,W$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Bc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=U.parseIndex(i[10]);return i[11]=s,i}function Uc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Wc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(Yc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Uc();function d(){return n[4](n[10],n[13])}return{c(){var h,g;e=y("button"),f&&f.c(),t=D(),i=y("span"),l=Y(s),m(i,"class","txt"),m(e,"type","button"),m(e,"class",o="label link-primary "+((g=(h=n[2].indexes)==null?void 0:h[n[13]])!=null&&g.message?"label-danger":"")+" svelte-167lbwu")},m(h,g){var _,b;S(h,e,g),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[Oe(r=Be.call(null,e,((b=(_=n[2].indexes)==null?void 0:_[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(h,g){var _,b,k,$,C;n=h,n[11].unique?f||(f=Uc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),g&1&&s!==(s=((_=n[11].columns)==null?void 0:_.map(Yc).join(", "))+"")&&le(l,s),g&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&m(e,"class",o),r&&jt(r.update)&&g&4&&r.update.call(null,((C=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:C.message)||"")},d(h){h&&w(e),f&&f.d(),a=!1,De(u)}}}function J$(n){var T,E,M;let e,t,i=(((E=(T=n[0])==null?void 0:T.indexes)==null?void 0:E.length)||0)+"",s,l,o,r,a,u,f,d,p,h,g,_,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let O=0;Ohe(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=Y("Unique constraints and indexes ("),s=Y(i),l=Y(")"),o=D(),r=y("div");for(let O=0;O+ + New index`,f=D(),B(d.$$.fragment),m(e,"class","section-title"),m(u,"type","button"),m(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),m(r,"class","indexes-list svelte-167lbwu")},m(O,A){S(O,e,A),v(e,t),v(e,s),v(e,l),S(O,o,A),S(O,r,A);for(let L=0;Lp=!1)),d.$set(L)},i(O){h||(I(d.$$.fragment,O),h=!0)},o(O){P(d.$$.fragment,O),h=!1},d(O){O&&w(e),O&&w(o),O&&w(r),pt(k,O),O&&w(f),n[6](null),H(d,O),g=!1,_()}}}const Yc=n=>n.name;function Z$(n,e,t){let i;Ze(n,Ti,h=>t(2,i=h));let{collection:s}=e,l;function o(h,g){for(let _=0;_l==null?void 0:l.show(h,g),a=()=>l==null?void 0:l.show();function u(h){ne[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){s=h,t(0,s)}const d=h=>{for(let g=0;g{o(h.detail.old,h.detail.new)};return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},[s,l,i,o,r,a,u,f,d,p]}class G$ extends be{constructor(e){super(),ge(this,e,Z$,J$,_e,{collection:0})}}function Kc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Jc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function d(...p){return n[5](n[6],...p)}return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),o=Y(l),r=D(),m(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),m(s,"class","txt"),m(e,"tabindex","0"),m(e,"class","dropdown-item closable svelte-1gz9b6p")},m(p,h){S(p,e,h),v(e,t),v(e,i),v(e,s),v(s,o),v(e,r),a||(u=[J(e,"click",In(f)),J(e,"keydown",In(d))],a=!0)},p(p,h){n=p},d(p){p&&w(e),a=!1,De(u)}}}function X$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class eT extends be{constructor(e){super(),ge(this,e,x$,Q$,_e,{class:0})}}const tT=n=>({interactive:n&128,hasErrors:n&64}),Zc=n=>({interactive:n[7],hasErrors:n[6]}),nT=n=>({interactive:n&128,hasErrors:n&64}),Gc=n=>({interactive:n[7],hasErrors:n[6]}),iT=n=>({interactive:n&128,hasErrors:n&64}),Xc=n=>({interactive:n[7],hasErrors:n[6]}),sT=n=>({interactive:n&128,hasErrors:n&64}),Qc=n=>({interactive:n[7],hasErrors:n[6]});function xc(n){let e;return{c(){e=y("div"),e.innerHTML='',m(e,"class","drag-handle-wrapper"),m(e,"draggable","true"),m(e,"aria-label","Sort")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ed(n){let e,t,i,s;return{c(){e=y("span"),m(e,"class","marker marker-required")},m(l,o){S(l,e,o),i||(s=Oe(t=Be.call(null,e,n[5])),i=!0)},p(l,o){t&&jt(t.update)&&o&32&&t.update.call(null,l[5])},d(l){l&&w(e),i=!1,s()}}}function lT(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g=n[0].required&&ed(n);return{c(){e=y("div"),g&&g.c(),t=D(),i=y("div"),s=y("i"),o=D(),r=y("input"),m(e,"class","markers"),m(s,"class",l=U.getFieldTypeIcon(n[0].type)),m(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),x(i,"txt-disabled",!n[7]),m(r,"type","text"),r.required=!0,r.disabled=a=!n[7],r.readOnly=u=n[0].id&&n[0].system,m(r,"spellcheck","false"),r.autofocus=f=!n[0].id,m(r,"placeholder","Field name"),r.value=d=n[0].name},m(_,b){S(_,e,b),g&&g.m(e,null),S(_,t,b),S(_,i,b),v(i,s),S(_,o,b),S(_,r,b),n[16](r),n[0].id||r.focus(),p||(h=J(r,"input",n[17]),p=!0)},p(_,b){_[0].required?g?g.p(_,b):(g=ed(_),g.c(),g.m(e,null)):g&&(g.d(1),g=null),b&1&&l!==(l=U.getFieldTypeIcon(_[0].type))&&m(s,"class",l),b&128&&x(i,"txt-disabled",!_[7]),b&128&&a!==(a=!_[7])&&(r.disabled=a),b&1&&u!==(u=_[0].id&&_[0].system)&&(r.readOnly=u),b&1&&f!==(f=!_[0].id)&&(r.autofocus=f),b&1&&d!==(d=_[0].name)&&r.value!==d&&(r.value=d)},d(_){_&&w(e),g&&g.d(),_&&w(t),_&&w(i),_&&w(o),_&&w(r),n[16](null),p=!1,h()}}}function oT(n){let e;return{c(){e=y("span"),m(e,"class","separator")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function rT(n){let e,t,i,s,l;return{c(){e=y("button"),t=y("i"),m(t,"class","ri-settings-3-line"),m(e,"type","button"),m(e,"aria-label","Toggle field options"),m(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[4]?"btn-secondary":"btn-transparent")),x(e,"btn-hint",!n[4]&&!n[6]),x(e,"btn-danger",n[6])},m(o,r){S(o,e,r),v(e,t),s||(l=J(e,"click",n[12]),s=!0)},p(o,r){r&16&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[4]?"btn-secondary":"btn-transparent"))&&m(e,"class",i),r&80&&x(e,"btn-hint",!o[4]&&!o[6]),r&80&&x(e,"btn-danger",o[6])},d(o){o&&w(e),s=!1,l()}}}function aT(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),m(e,"aria-label","Restore")},m(s,l){S(s,e,l),t||(i=[Oe(Be.call(null,e,"Restore")),J(e,"click",n[10])],t=!0)},p:ee,d(s){s&&w(e),t=!1,De(i)}}}function td(n){let e,t,i,s,l,o,r,a,u,f,d;const p=n[14].options,h=kt(p,n,n[23],Xc),g=n[14].beforeNonempty,_=kt(g,n,n[23],Gc);r=new pe({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[uT,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}});const b=n[14].afterNonempty,k=kt(b,n,n[23],Zc);let $=!n[0].toDelete&&nd(n);return{c(){e=y("div"),t=y("div"),i=y("div"),h&&h.c(),s=D(),_&&_.c(),l=D(),o=y("div"),B(r.$$.fragment),a=D(),k&&k.c(),u=D(),$&&$.c(),m(i,"class","col-sm-12 hidden-empty"),m(o,"class","col-sm-4"),m(t,"class","grid grid-sm"),m(e,"class","schema-field-options")},m(C,T){S(C,e,T),v(e,t),v(t,i),h&&h.m(i,null),v(t,s),_&&_.m(t,null),v(t,l),v(t,o),z(r,o,null),v(t,a),k&&k.m(t,null),v(t,u),$&&$.m(t,null),d=!0},p(C,T){h&&h.p&&(!d||T&8388800)&&St(h,p,C,C[23],d?wt(p,C[23],T,iT):$t(C[23]),Xc),_&&_.p&&(!d||T&8388800)&&St(_,g,C,C[23],d?wt(g,C[23],T,nT):$t(C[23]),Gc);const E={};T&545259553&&(E.$$scope={dirty:T,ctx:C}),r.$set(E),k&&k.p&&(!d||T&8388800)&&St(k,b,C,C[23],d?wt(b,C[23],T,tT):$t(C[23]),Zc),C[0].toDelete?$&&(ue(),P($,1,1,()=>{$=null}),fe()):$?($.p(C,T),T&1&&I($,1)):($=nd(C),$.c(),I($,1),$.m(t,null))},i(C){d||(I(h,C),I(_,C),I(r.$$.fragment,C),I(k,C),I($),C&&et(()=>{d&&(f||(f=Ve(e,rt,{duration:150},!0)),f.run(1))}),d=!0)},o(C){P(h,C),P(_,C),P(r.$$.fragment,C),P(k,C),P($),C&&(f||(f=Ve(e,rt,{duration:150},!1)),f.run(0)),d=!1},d(C){C&&w(e),h&&h.d(C),_&&_.d(C),H(r),k&&k.d(C),$&&$.d(),C&&f&&f.end()}}}function uT(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("input"),i=D(),s=y("label"),l=y("span"),o=Y(n[5]),r=D(),a=y("i"),m(e,"type","checkbox"),m(e,"id",t=n[29]),m(l,"class","txt"),m(a,"class","ri-information-line link-hint"),m(s,"for",f=n[29])},m(h,g){S(h,e,g),e.checked=n[0].required,S(h,i,g),S(h,s,g),v(s,l),v(l,o),v(s,r),v(s,a),d||(p=[J(e,"change",n[18]),Oe(u=Be.call(null,a,{text:`Requires the field value NOT to be ${U.zeroDefaultStr(n[0])}.`,position:"right"}))],d=!0)},p(h,g){g&536870912&&t!==(t=h[29])&&m(e,"id",t),g&1&&(e.checked=h[0].required),g&32&&le(o,h[5]),u&&jt(u.update)&&g&1&&u.update.call(null,{text:`Requires the field value NOT to be ${U.zeroDefaultStr(h[0])}.`,position:"right"}),g&536870912&&f!==(f=h[29])&&m(s,"for",f)},d(h){h&&w(e),h&&w(i),h&&w(s),d=!1,De(p)}}}function nd(n){let e,t,i,s,l,o,r,a,u;return a=new Jn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[fT]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=D(),s=y("div"),l=y("button"),o=y("i"),r=D(),B(a.$$.fragment),m(t,"class","flex-fill"),m(o,"class","ri-more-line"),m(l,"type","button"),m(l,"aria-label","More"),m(l,"class","btn btn-circle btn-sm btn-transparent"),m(s,"class","inline-flex flex-gap-sm flex-nowrap"),m(e,"class","col-sm-4 m-l-auto txt-right")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(s,l),v(l,o),v(l,r),z(a,l,null),u=!0},p(f,d){const p={};d&8388608&&(p.$$scope={dirty:d,ctx:f}),a.$set(p)},i(f){u||(I(a.$$.fragment,f),u=!0)},o(f){P(a.$$.fragment,f),u=!1},d(f){f&&w(e),H(a)}}}function fT(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Remove',m(e,"type","button"),m(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[9]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function cT(n){let e,t,i,s,l,o,r,a,u,f,d,p=n[7]&&xc();s=new pe({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[lT]},$$scope:{ctx:n}}});const h=n[14].default,g=kt(h,n,n[23],Qc),_=g||oT();function b(T,E){if(T[0].toDelete)return aT;if(T[7])return rT}let k=b(n),$=k&&k(n),C=n[7]&&n[4]&&td(n);return{c(){e=y("div"),t=y("div"),p&&p.c(),i=D(),B(s.$$.fragment),l=D(),_&&_.c(),o=D(),$&&$.c(),r=D(),C&&C.c(),m(t,"class","schema-field-header"),m(e,"draggable",!0),m(e,"class","schema-field"),x(e,"required",n[0].required),x(e,"expanded",n[7]&&n[4]),x(e,"deleted",n[0].toDelete),x(e,"drag-over",n[3])},m(T,E){S(T,e,E),v(e,t),p&&p.m(t,null),v(t,i),z(s,t,null),v(t,l),_&&_.m(t,null),v(t,o),$&&$.m(t,null),v(e,r),C&&C.m(e,null),u=!0,f||(d=[J(e,"dragstart",n[19]),J(e,"dragenter",n[20]),J(e,"drop",xe(n[21])),J(e,"dragleave",n[22]),J(e,"dragover",xe(n[15]))],f=!0)},p(T,[E]){T[7]?p||(p=xc(),p.c(),p.m(t,i)):p&&(p.d(1),p=null);const M={};E&128&&(M.class="form-field required m-0 "+(T[7]?"":"disabled")),E&2&&(M.name="schema."+T[1]+".name"),E&8388773&&(M.$$scope={dirty:E,ctx:T}),s.$set(M),g&&g.p&&(!u||E&8388800)&&St(g,h,T,T[23],u?wt(h,T[23],E,sT):$t(T[23]),Qc),k===(k=b(T))&&$?$.p(T,E):($&&$.d(1),$=k&&k(T),$&&($.c(),$.m(t,null))),T[7]&&T[4]?C?(C.p(T,E),E&144&&I(C,1)):(C=td(T),C.c(),I(C,1),C.m(e,null)):C&&(ue(),P(C,1,1,()=>{C=null}),fe()),(!u||E&1)&&x(e,"required",T[0].required),(!u||E&144)&&x(e,"expanded",T[7]&&T[4]),(!u||E&1)&&x(e,"deleted",T[0].toDelete),(!u||E&8)&&x(e,"drag-over",T[3])},i(T){u||(I(s.$$.fragment,T),I(_,T),I(C),T&&et(()=>{u&&(a||(a=Ve(e,rt,{duration:150},!0)),a.run(1))}),u=!0)},o(T){P(s.$$.fragment,T),P(_,T),P(C),T&&(a||(a=Ve(e,rt,{duration:150},!1)),a.run(0)),u=!1},d(T){T&&w(e),p&&p.d(),H(s),_&&_.d(T),$&&$.d(),C&&C.d(),T&&a&&a.end(),f=!1,De(d)}}}let Or=[];function dT(n,e,t){let i,s,l,o;Ze(n,Ti,W=>t(13,o=W));let{$$slots:r={},$$scope:a}=e,{key:u=""}=e,{field:f=new wn}=e,d,p=!1,h=!1;const g="f_"+U.randomString(8),_=Tt(),b={bool:"Nonfalsey",number:"Nonzero"};function k(){f.id?t(0,f.toDelete=!0,f):_("remove")}function $(){t(0,f.toDelete=!1,f),tn({})}function C(W){return U.slugify(W)}function T(){t(4,h=!0),O()}function E(){t(4,h=!1)}function M(){h?E():T()}function O(){for(let W of Or)W.id!=g&&W.collapse()}Xt(()=>(Or.push({id:g,collapse:E}),f.onMountSelect&&(t(0,f.onMountSelect=!1,f),d==null||d.select()),()=>{U.removeByKey(Or,"id",g)}));function A(W){me.call(this,n,W)}function L(W){ne[W?"unshift":"push"](()=>{d=W,t(2,d)})}const N=W=>{const te=f.name;t(0,f.name=C(W.target.value),f),W.target.value=f.name,_("rename",{oldName:te,newName:f.name})};function q(){f.required=this.checked,t(0,f)}const R=W=>{if(!W.target.classList.contains("drag-handle-wrapper")){W.preventDefault();return}const te=document.createElement("div");W.dataTransfer.setDragImage(te,0,0),i&&_("dragstart",W)},F=W=>{i&&(t(3,p=!0),_("dragenter",W))},j=W=>{i&&(t(3,p=!1),_("drop",W))},V=W=>{i&&(t(3,p=!1),_("dragleave",W))};return n.$$set=W=>{"key"in W&&t(1,u=W.key),"field"in W&&t(0,f=W.field),"$$scope"in W&&t(23,a=W.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&f.toDelete&&f.originalName&&f.name!==f.originalName&&t(0,f.name=f.originalName,f),n.$$.dirty&1&&!f.originalName&&f.name&&t(0,f.originalName=f.name,f),n.$$.dirty&1&&typeof f.toDelete>"u"&&t(0,f.toDelete=!1,f),n.$$.dirty&1&&f.required&&t(0,f.nullable=!1,f),n.$$.dirty&1&&t(7,i=!f.toDelete&&!(f.id&&f.system)),n.$$.dirty&8194&&t(6,s=!U.isEmpty(U.getNestedVal(o,`schema.${u}`))),n.$$.dirty&1&&t(5,l=b[f==null?void 0:f.type]||"Nonempty")},[f,u,d,p,h,l,s,i,_,k,$,C,M,o,r,A,L,N,q,R,F,j,V,a]}class pi extends be{constructor(e){super(),ge(this,e,dT,cT,_e,{key:1,field:0})}}function pT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Min length"),s=D(),l=y("input"),m(e,"for",i=n[13]),m(l,"type","number"),m(l,"id",o=n[13]),m(l,"step","1"),m(l,"min","0")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&m(e,"for",i),f&8192&&o!==(o=u[13])&&m(l,"id",o),f&1&&mt(l.value)!==u[0].options.min&&re(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function mT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Max length"),s=D(),l=y("input"),m(e,"for",i=n[13]),m(l,"type","number"),m(l,"id",o=n[13]),m(l,"step","1"),m(l,"min",r=n[0].options.min||0)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),re(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&8192&&i!==(i=f[13])&&m(e,"for",i),d&8192&&o!==(o=f[13])&&m(l,"id",o),d&1&&r!==(r=f[0].options.min||0)&&m(l,"min",r),d&1&&mt(l.value)!==f[0].options.max&&re(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function hT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Regex pattern"),s=D(),l=y("input"),m(e,"for",i=n[13]),m(l,"type","text"),m(l,"id",o=n[13]),m(l,"placeholder","Valid Go regular expression, eg. ^w+$")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&m(e,"for",i),f&8192&&o!==(o=u[13])&&m(l,"id",o),f&1&&l.value!==u[0].options.pattern&&re(l,u[0].options.pattern)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _T(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[pT,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[mT,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[hT,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),r=D(),a=y("div"),B(u.$$.fragment),m(t,"class","col-sm-3"),m(l,"class","col-sm-3"),m(a,"class","col-sm-6"),m(e,"class","grid grid-sm")},m(d,p){S(d,e,p),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),f=!0},p(d,p){const h={};p&2&&(h.name="schema."+d[1]+".options.min"),p&24577&&(h.$$scope={dirty:p,ctx:d}),i.$set(h);const g={};p&2&&(g.name="schema."+d[1]+".options.max"),p&24577&&(g.$$scope={dirty:p,ctx:d}),o.$set(g);const _={};p&2&&(_.name="schema."+d[1]+".options.pattern"),p&24577&&(_.$$scope={dirty:p,ctx:d}),u.$set(_)},i(d){f||(I(i.$$.fragment,d),I(o.$$.fragment,d),I(u.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),f=!1},d(d){d&&w(e),H(i),H(o),H(u)}}}function gT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[_T]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("drop",n[9]),e.$on("dragstart",n[10]),e.$on("dragenter",n[11]),e.$on("dragleave",n[12]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Et(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&16387&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function bT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=mt(this.value),t(0,l)}function a(){l.options.max=mt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(k){l=k,t(0,l)}function d(k){me.call(this,n,k)}function p(k){me.call(this,n,k)}function h(k){me.call(this,n,k)}function g(k){me.call(this,n,k)}function _(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$set=k=>{e=je(je({},e),Gt(k)),t(2,s=tt(e,i)),"field"in k&&t(0,l=k.field),"key"in k&&t(1,o=k.key)},[l,o,s,r,a,u,f,d,p,h,g,_,b]}class vT extends be{constructor(e){super(),ge(this,e,bT,gT,_e,{field:0,key:1})}}function yT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Min"),s=D(),l=y("input"),m(e,"for",i=n[12]),m(l,"type","number"),m(l,"id",o=n[12])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&m(e,"for",i),f&4096&&o!==(o=u[12])&&m(l,"id",o),f&1&&mt(l.value)!==u[0].options.min&&re(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function kT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Max"),s=D(),l=y("input"),m(e,"for",i=n[12]),m(l,"type","number"),m(l,"id",o=n[12]),m(l,"min",r=n[0].options.min)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),re(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&4096&&i!==(i=f[12])&&m(e,"for",i),d&4096&&o!==(o=f[12])&&m(l,"id",o),d&1&&r!==(r=f[0].options.min)&&m(l,"min",r),d&1&&mt(l.value)!==f[0].options.max&&re(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function wT(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[yT,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[kT,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),m(t,"class","col-sm-6"),m(l,"class","col-sm-6"),m(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(I(i.$$.fragment,a),I(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function ST(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[wT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Et(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function $T(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=mt(this.value),t(0,l)}function a(){l.options.max=mt(this.value),t(0,l)}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function h(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Gt(b)),t(2,s=tt(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,h,g,_]}class TT extends be{constructor(e){super(),ge(this,e,$T,ST,_e,{field:0,key:1})}}function CT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Et(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function MT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(g){l=g,t(0,l)}function a(g){me.call(this,n,g)}function u(g){me.call(this,n,g)}function f(g){me.call(this,n,g)}function d(g){me.call(this,n,g)}function p(g){me.call(this,n,g)}function h(g){me.call(this,n,g)}return n.$$set=g=>{e=je(je({},e),Gt(g)),t(2,s=tt(e,i)),"field"in g&&t(0,l=g.field),"key"in g&&t(1,o=g.key)},[l,o,s,r,a,u,f,d,p,h]}class ET extends be{constructor(e){super(),ge(this,e,MT,CT,_e,{field:0,key:1})}}function OT(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=U.splitNonEmpty(d.target.value,r))};return n.$$set=d=>{e=je(je({},e),Gt(d)),t(5,l=tt(e,s)),"value"in d&&t(0,o=d.value),"separator"in d&&t(1,r=d.separator),"readonly"in d&&t(2,a=d.readonly),"disabled"in d&&t(3,u=d.disabled)},n.$$.update=()=>{n.$$.dirty&1&&t(4,i=(o||[]).join(", "))},[o,r,a,u,i,l,f]}class zs extends be{constructor(e){super(),ge(this,e,DT,OT,_e,{value:0,separator:1,readonly:2,disabled:3})}}function AT(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;function g(b){n[3](b)}let _={id:n[12],disabled:!U.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(_.value=n[0].options.exceptDomains),r=new zs({props:_}),ne.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=D(),s=y("i"),o=D(),B(r.$$.fragment),u=D(),f=y("div"),f.textContent="Use comma as separator.",m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[12]),m(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(h=Oe(Be.call(null,s,{text:`List of domains that are NOT allowed. + This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&m(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!U.isEmpty(b[0].options.onlyDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(I(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),p=!1,h()}}}function IT(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;function g(b){n[4](b)}let _={id:n[12]+".options.onlyDomains",disabled:!U.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(_.value=n[0].options.onlyDomains),r=new zs({props:_}),ne.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=D(),s=y("i"),o=D(),B(r.$$.fragment),u=D(),f=y("div"),f.textContent="Use comma as separator.",m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[12]+".options.onlyDomains"),m(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(h=Oe(Be.call(null,s,{text:`List of domains that are ONLY allowed. + This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]+".options.onlyDomains"))&&m(e,"for",l);const $={};k&4096&&($.id=b[12]+".options.onlyDomains"),k&1&&($.disabled=!U.isEmpty(b[0].options.exceptDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(I(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),p=!1,h()}}}function LT(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[AT,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[IT,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),m(t,"class","col-sm-6"),m(l,"class","col-sm-6"),m(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.onlyDomains"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(I(i.$$.fragment,a),I(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function PT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[LT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Et(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function FT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(b){n.$$.not_equal(l.options.exceptDomains,b)&&(l.options.exceptDomains=b,t(0,l))}function a(b){n.$$.not_equal(l.options.onlyDomains,b)&&(l.options.onlyDomains=b,t(0,l))}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function h(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Gt(b)),t(2,s=tt(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,h,g,_]}class y1 extends be{constructor(e){super(),ge(this,e,FT,PT,_e,{field:0,key:1})}}function NT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Et(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function RT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(g){l=g,t(0,l)}function a(g){me.call(this,n,g)}function u(g){me.call(this,n,g)}function f(g){me.call(this,n,g)}function d(g){me.call(this,n,g)}function p(g){me.call(this,n,g)}function h(g){me.call(this,n,g)}return n.$$set=g=>{e=je(je({},e),Gt(g)),t(2,s=tt(e,i)),"field"in g&&t(0,l=g.field),"key"in g&&t(1,o=g.key)},[l,o,s,r,a,u,f,d,p,h]}class qT extends be{constructor(e){super(),ge(this,e,RT,NT,_e,{field:0,key:1})}}function jT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Et(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function VT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(g){l=g,t(0,l)}function a(g){me.call(this,n,g)}function u(g){me.call(this,n,g)}function f(g){me.call(this,n,g)}function d(g){me.call(this,n,g)}function p(g){me.call(this,n,g)}function h(g){me.call(this,n,g)}return n.$$set=g=>{e=je(je({},e),Gt(g)),t(2,s=tt(e,i)),"field"in g&&t(0,l=g.field),"key"in g&&t(1,o=g.key)},[l,o,s,r,a,u,f,d,p,h]}class zT extends be{constructor(e){super(),ge(this,e,VT,jT,_e,{field:0,key:1})}}var Dr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ms={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},kl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},gn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function id(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Ar=function(n){return n instanceof Array?n:[n]};function pn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ct(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function so(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function k1(n,e){if(e(n))return n;if(n.parentNode)return k1(n.parentNode,e)}function lo(n,e){var t=ct("div","numInputWrapper"),i=ct("input","numInput "+n),s=ct("span","arrowUp"),l=ct("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function Mn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Ir=function(){},No=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},HT={D:Ir,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Vn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Ir,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Ir,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},es={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},dl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[dl.w(n,e,t)]},F:function(n,e,t){return No(dl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return gn(dl.h(n,e,t))},H:function(n){return gn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Vn(n.getHours()>11)]},M:function(n,e){return No(n.getMonth(),!0,e)},S:function(n){return gn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return gn(n.getFullYear(),4)},d:function(n){return gn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return gn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return gn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},w1=function(n){var e=n.config,t=e===void 0?Ms:e,i=n.l10n,s=i===void 0?kl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(d,p,h){return dl[d]&&h[p-1]!=="\\"?dl[d](r,f,t):d!=="\\"?d:""}).join("")}},ba=function(n){var e=n.config,t=e===void 0?Ms:e,i=n.l10n,s=i===void 0?kl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,d=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var p=o||(t||Ms).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,p);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var g=void 0,_=[],b=0,k=0,$="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Pr(t.config);Z.setHours(ie.hours,ie.minutes,ie.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}K!==void 0&&K.type!=="blur"&&Rl(K);var oe=t._input.value;d(),sn(),t._input.value!==oe&&t._debouncedChange()}function u(K,Z){return K%12+12*Vn(Z===t.l10n.amPM[1])}function f(K){switch(K%24){case 0:case 12:return 12;default:return K%12}}function d(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var K=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(K=u(K,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&En(t.latestSelectedDateObj,t.config.minDate,!0)===0,Me=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&En(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Pe=Lr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ne=Lr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Ae=Lr(K,Z,ie);if(Ae>Ne&&Ae=12)]),t.secondElement!==void 0&&(t.secondElement.value=gn(ie)))}function g(K){var Z=Mn(K),ie=parseInt(Z.value)+(K.delta||0);(ie/1e3>1||K.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&we(ie)}function _(K,Z,ie,oe){if(Z instanceof Array)return Z.forEach(function(Me){return _(K,Me,ie,oe)});if(K instanceof Array)return K.forEach(function(Me){return _(Me,Z,ie,oe)});K.addEventListener(Z,ie,oe),t._handlers.push({remove:function(){return K.removeEventListener(Z,ie,oe)}})}function b(){Re("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(oe){return _(oe,"click",t[ie])})}),t.isMobile){ke();return}var K=id(Te,50);if(t._debouncedChange=id(b,YT),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&_(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&Ke(Mn(ie))}),_(t._input,"keydown",Xe),t.calendarContainer!==void 0&&_(t.calendarContainer,"keydown",Xe),!t.config.inline&&!t.config.static&&_(window,"resize",K),window.ontouchstart!==void 0?_(window.document,"touchstart",Ue):_(window.document,"mousedown",Ue),_(window.document,"focus",Ue,{capture:!0}),t.config.clickOpens===!0&&(_(t._input,"focus",t.open),_(t._input,"click",t.open)),t.daysContainer!==void 0&&(_(t.monthNav,"click",dn),_(t.monthNav,["keyup","increment"],g),_(t.daysContainer,"click",ti)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ie){return Mn(ie).select()};_(t.timeContainer,["increment"],a),_(t.timeContainer,"blur",a,{capture:!0}),_(t.timeContainer,"click",C),_([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&_(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&_(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&_(t._input,"blur",_t)}function $(K,Z){var ie=K!==void 0?t.parseDate(K):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(K);var Me=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Me&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Pe=ct("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Pe,t.element),Pe.appendChild(t.element),t.altInput&&Pe.appendChild(t.altInput),Pe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(K,Z,ie,oe){var Me=Ee(Z,!0),Pe=ct("span",K,Z.getDate().toString());return Pe.dateObj=Z,Pe.$i=oe,Pe.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),K.indexOf("hidden")===-1&&En(Z,t.now)===0&&(t.todayDateElem=Pe,Pe.classList.add("today"),Pe.setAttribute("aria-current","date")),Me?(Pe.tabIndex=-1,Ot(Z)&&(Pe.classList.add("selected"),t.selectedDateElem=Pe,t.config.mode==="range"&&(pn(Pe,"startRange",t.selectedDates[0]&&En(Z,t.selectedDates[0],!0)===0),pn(Pe,"endRange",t.selectedDates[1]&&En(Z,t.selectedDates[1],!0)===0),K==="nextMonthDay"&&Pe.classList.add("inRange")))):Pe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Tn(Z)&&!Ot(Z)&&Pe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&K!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),Re("onDayCreate",Pe),Pe}function O(K){K.focus(),t.config.mode==="range"&&Ke(K)}function A(K){for(var Z=K>0?0:t.config.showMonths-1,ie=K>0?t.config.showMonths:-1,oe=Z;oe!=ie;oe+=K)for(var Me=t.daysContainer.children[oe],Pe=K>0?0:Me.children.length-1,Ne=K>0?Me.children.length:-1,Ae=Pe;Ae!=Ne;Ae+=K){var Je=Me.children[Ae];if(Je.className.indexOf("hidden")===-1&&Ee(Je.dateObj))return Je}}function L(K,Z){for(var ie=K.className.indexOf("Month")===-1?K.dateObj.getMonth():t.currentMonth,oe=Z>0?t.config.showMonths:-1,Me=Z>0?1:-1,Pe=ie-t.currentMonth;Pe!=oe;Pe+=Me)for(var Ne=t.daysContainer.children[Pe],Ae=ie-t.currentMonth===Pe?K.$i+Z:Z<0?Ne.children.length-1:0,Je=Ne.children.length,qe=Ae;qe>=0&&qe0?Je:-1);qe+=Me){var Ye=Ne.children[qe];if(Ye.className.indexOf("hidden")===-1&&Ee(Ye.dateObj)&&Math.abs(K.$i-qe)>=Math.abs(Z))return O(Ye)}t.changeMonth(Me),N(A(Me),0)}function N(K,Z){var ie=l(),oe=Ge(ie||document.body),Me=K!==void 0?K:oe?ie:t.selectedDateElem!==void 0&&Ge(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ge(t.todayDateElem)?t.todayDateElem:A(Z>0?1:-1);Me===void 0?t._input.focus():oe?L(Me,Z):O(Me)}function q(K,Z){for(var ie=(new Date(K,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((Z-1+12)%12,K),Me=t.utils.getDaysInMonth(Z,K),Pe=window.document.createDocumentFragment(),Ne=t.config.showMonths>1,Ae=Ne?"prevMonthDay hidden":"prevMonthDay",Je=Ne?"nextMonthDay hidden":"nextMonthDay",qe=oe+1-ie,Ye=0;qe<=oe;qe++,Ye++)Pe.appendChild(M("flatpickr-day "+Ae,new Date(K,Z-1,qe),qe,Ye));for(qe=1;qe<=Me;qe++,Ye++)Pe.appendChild(M("flatpickr-day",new Date(K,Z,qe),qe,Ye));for(var vt=Me+1;vt<=42-ie&&(t.config.showMonths===1||Ye%7!==0);vt++,Ye++)Pe.appendChild(M("flatpickr-day "+Je,new Date(K,Z+1,vt%Me),vt,Ye));var ii=ct("div","dayContainer");return ii.appendChild(Pe),ii}function R(){if(t.daysContainer!==void 0){so(t.daysContainer),t.weekNumbers&&so(t.weekNumbers);for(var K=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var K=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(K(Z)){var ie=ct("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,Z).getMonth().toString(),ie.textContent=No(Z,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===Z&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function j(){var K=ct("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=ct("span","cur-month"):(t.monthsDropdownContainer=ct("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),_(t.monthsDropdownContainer,"change",function(Ne){var Ae=Mn(Ne),Je=parseInt(Ae.value,10);t.changeMonth(Je-t.currentMonth),Re("onMonthChange")}),F(),ie=t.monthsDropdownContainer);var oe=lo("cur-year",{tabindex:"-1"}),Me=oe.getElementsByTagName("input")[0];Me.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Me.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Me.setAttribute("max",t.config.maxDate.getFullYear().toString()),Me.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Pe=ct("div","flatpickr-current-month");return Pe.appendChild(ie),Pe.appendChild(oe),Z.appendChild(Pe),K.appendChild(Z),{container:K,yearElement:Me,monthElement:ie}}function V(){so(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var K=t.config.showMonths;K--;){var Z=j();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function W(){return t.monthNav=ct("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ct("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ct("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(K){t.__hidePrevMonthArrow!==K&&(pn(t.prevMonthNav,"flatpickr-disabled",K),t.__hidePrevMonthArrow=K)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(K){t.__hideNextMonthArrow!==K&&(pn(t.nextMonthNav,"flatpickr-disabled",K),t.__hideNextMonthArrow=K)}}),t.currentYearElement=t.yearElements[0],Nn(),t.monthNav}function te(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var K=Pr(t.config);t.timeContainer=ct("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ct("span","flatpickr-time-separator",":"),ie=lo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var oe=lo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=gn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?K.hours:f(K.hours)),t.minuteElement.value=gn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():K.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ie),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Me=lo("flatpickr-second");t.secondElement=Me.getElementsByTagName("input")[0],t.secondElement.value=gn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():K.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ct("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Me)}return t.config.time_24hr||(t.amPM=ct("span","flatpickr-am-pm",t.l10n.amPM[Vn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function X(){t.weekdayContainer?so(t.weekdayContainer):t.weekdayContainer=ct("div","flatpickr-weekdays");for(var K=t.config.showMonths;K--;){var Z=ct("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var K=t.l10n.firstDayOfWeek,Z=sd(t.l10n.weekdays.shorthand);K>0&&K + `+Z.join("")+` + + `}}function ae(){t.calendarContainer.classList.add("hasWeeks");var K=ct("div","flatpickr-weekwrapper");K.appendChild(ct("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ct("div","flatpickr-weeks");return K.appendChild(Z),{weekWrapper:K,weekNumbers:Z}}function Q(K,Z){Z===void 0&&(Z=!0);var ie=Z?K:K-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Re("onYearChange"),F()),R(),Re("onMonthChange"),Nn())}function se(K,Z){if(K===void 0&&(K=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Pr(t.config),oe=ie.hours,Me=ie.minutes,Pe=ie.seconds;h(oe,Me,Pe)}t.redraw(),K&&Re("onChange")}function ve(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Re("onClose")}function $e(){t.config!==void 0&&Re("onDestroy");for(var K=t._handlers.length;K--;)t._handlers[K].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ie){try{delete t[ie]}catch{}})}function ze(K){return t.calendarContainer.contains(K)}function Ue(K){if(t.isOpen&&!t.config.inline){var Z=Mn(K),ie=ze(Z),oe=Z===t.input||Z===t.altInput||t.element.contains(Z)||K.path&&K.path.indexOf&&(~K.path.indexOf(t.input)||~K.path.indexOf(t.altInput)),Me=!oe&&!ie&&!ze(K.relatedTarget),Pe=!t.config.ignoredFocusElements.some(function(Ne){return Ne.contains(Z)});Me&&Pe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function we(K){if(!(!K||t.config.minDate&&Kt.config.maxDate.getFullYear())){var Z=K,ie=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ie&&(t.redraw(),Re("onYearChange"),F())}}function Ee(K,Z){var ie;Z===void 0&&(Z=!0);var oe=t.parseDate(K,void 0,Z);if(t.config.minDate&&oe&&En(oe,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&oe&&En(oe,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Me=!!t.config.enable,Pe=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Ne=0,Ae=void 0;Ne=Ae.from.getTime()&&oe.getTime()<=Ae.to.getTime())return Me}return!Me}function Ge(K){return t.daysContainer!==void 0?K.className.indexOf("hidden")===-1&&K.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(K):!1}function _t(K){var Z=K.target===t._input,ie=t._input.value.trimEnd()!==Ui();Z&&ie&&!(K.relatedTarget&&ze(K.relatedTarget))&&t.setDate(t._input.value,!0,K.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Xe(K){var Z=Mn(K),ie=t.config.wrap?n.contains(Z):Z===t._input,oe=t.config.allowInput,Me=t.isOpen&&(!oe||!ie),Pe=t.config.inline&&ie&&!oe;if(K.keyCode===13&&ie){if(oe)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(ze(Z)||Me||Pe){var Ne=!!t.timeContainer&&t.timeContainer.contains(Z);switch(K.keyCode){case 13:Ne?(K.preventDefault(),a(),Pn()):ti(K);break;case 27:K.preventDefault(),Pn();break;case 8:case 46:ie&&!t.config.allowInput&&(K.preventDefault(),t.clear());break;case 37:case 39:if(!Ne&&!ie){K.preventDefault();var Ae=l();if(t.daysContainer!==void 0&&(oe===!1||Ae&&Ge(Ae))){var Je=K.keyCode===39?1:-1;K.ctrlKey?(K.stopPropagation(),Q(Je),N(A(1),0)):N(void 0,Je)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:K.preventDefault();var qe=K.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?K.ctrlKey?(K.stopPropagation(),we(t.currentYear-qe),N(A(1),0)):Ne||N(void 0,qe*7):Z===t.currentYearElement?we(t.currentYear-qe):t.config.enableTime&&(!Ne&&t.hourElement&&t.hourElement.focus(),a(K),t._debouncedChange());break;case 9:if(Ne){var Ye=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Cn){return Cn}),vt=Ye.indexOf(Z);if(vt!==-1){var ii=Ye[vt+(K.shiftKey?-1:1)];K.preventDefault(),(ii||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&K.shiftKey&&(K.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&Z===t.amPM)switch(K.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],d(),sn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],d(),sn();break}(ie||ze(Z))&&Re("onKeyDown",K)}function Ke(K,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||K&&(!K.classList.contains(Z)||K.classList.contains("flatpickr-disabled")))){for(var ie=K?K.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Me=Math.min(ie,t.selectedDates[0].getTime()),Pe=Math.max(ie,t.selectedDates[0].getTime()),Ne=!1,Ae=0,Je=0,qe=Me;qeMe&&qeAe)?Ae=qe:qe>oe&&(!Je||qe ."+Z));Ye.forEach(function(vt){var ii=vt.dateObj,Cn=ii.getTime(),Hs=Ae>0&&Cn0&&Cn>Je;if(Hs){vt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(hs){vt.classList.remove(hs)});return}else if(Ne&&!Hs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(hs){vt.classList.remove(hs)}),K!==void 0&&(K.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),oeie&&Cn===oe&&vt.classList.add("endRange"),Cn>=Ae&&(Je===0||Cn<=Je)&&BT(Cn,oe,ie)&&vt.classList.add("inRange"))})}}function Te(){t.isOpen&&!t.config.static&&!t.config.inline&&it()}function ce(K,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(K){K.preventDefault();var ie=Mn(K);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Re("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Re("onOpen"),it(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(K===void 0||!t.timeContainer.contains(K.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function He(K){return function(Z){var ie=t.config["_"+K+"Date"]=t.parseDate(Z,t.config.dateFormat),oe=t.config["_"+(K==="min"?"max":"min")+"Date"];ie!==void 0&&(t[K==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Me){return Ee(Me)}),!t.selectedDates.length&&K==="min"&&p(ie),sn()),t.daysContainer&&(Ut(),ie!==void 0?t.currentYearElement[K]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(K),t.currentYearElement.disabled=!!oe&&ie!==void 0&&oe.getFullYear()===ie.getFullYear())}}function At(){var K=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=an(an({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Ye){t.config._enable=ni(Ye)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Ye){t.config._disable=ni(Ye)}});var oe=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||oe)){var Me=Yt.defaultConfig.dateFormat||Ms.dateFormat;ie.dateFormat=Z.noCalendar||oe?"H:i"+(Z.enableSeconds?":S":""):Me+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||oe)&&!Z.altFormat){var Pe=Yt.defaultConfig.altFormat||Ms.altFormat;ie.altFormat=Z.noCalendar||oe?"h:i"+(Z.enableSeconds?":S K":" K"):Pe+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:He("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:He("max")});var Ne=function(Ye){return function(vt){t.config[Ye==="min"?"_minTime":"_maxTime"]=t.parseDate(vt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ne("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ne("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var Ae=0;Ae-1?t.config[qe]=Ar(Je[qe]).map(o).concat(t.config[qe]):typeof Z[qe]>"u"&&(t.config[qe]=Je[qe])}Z.altInputClass||(t.config.altInputClass=Fe().className+" "+t.config.altInputClass),Re("onParseConfig")}function Fe(){return t.config.wrap?n.querySelector("[data-input]"):n}function Ce(){typeof t.config.locale!="object"&&typeof Yt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=an(an({},Yt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Yt.l10ns[t.config.locale]:void 0),es.D="("+t.l10n.weekdays.shorthand.join("|")+")",es.l="("+t.l10n.weekdays.longhand.join("|")+")",es.M="("+t.l10n.months.shorthand.join("|")+")",es.F="("+t.l10n.months.longhand.join("|")+")",es.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var K=an(an({},e),JSON.parse(JSON.stringify(n.dataset||{})));K.time_24hr===void 0&&Yt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=w1(t),t.parseDate=ba({config:t.config,l10n:t.l10n})}function it(K){if(typeof t.config.position=="function")return void t.config.position(t,K);if(t.calendarContainer!==void 0){Re("onPreCalendarPosition");var Z=K||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,function(N1,R1){return N1+R1.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Me=t.config.position.split(" "),Pe=Me[0],Ne=Me.length>1?Me[1]:null,Ae=Z.getBoundingClientRect(),Je=window.innerHeight-Ae.bottom,qe=Pe==="above"||Pe!=="below"&&Jeie,Ye=window.pageYOffset+Ae.top+(qe?-ie-2:Z.offsetHeight+2);if(pn(t.calendarContainer,"arrowTop",!qe),pn(t.calendarContainer,"arrowBottom",qe),!t.config.inline){var vt=window.pageXOffset+Ae.left,ii=!1,Cn=!1;Ne==="center"?(vt-=(oe-Ae.width)/2,ii=!0):Ne==="right"&&(vt-=oe-Ae.width,Cn=!0),pn(t.calendarContainer,"arrowLeft",!ii&&!Cn),pn(t.calendarContainer,"arrowCenter",ii),pn(t.calendarContainer,"arrowRight",Cn);var Hs=window.document.body.offsetWidth-(window.pageXOffset+Ae.right),hs=vt+oe>window.document.body.offsetWidth,O1=Hs+oe>window.document.body.offsetWidth;if(pn(t.calendarContainer,"rightMost",hs),!t.config.static)if(t.calendarContainer.style.top=Ye+"px",!hs)t.calendarContainer.style.left=vt+"px",t.calendarContainer.style.right="auto";else if(!O1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Hs+"px";else{var ir=It();if(ir===void 0)return;var D1=window.document.body.offsetWidth,A1=Math.max(0,D1/2-oe/2),I1=".flatpickr-calendar.centerMost:before",L1=".flatpickr-calendar.centerMost:after",P1=ir.cssRules.length,F1="{left:"+Ae.left+"px;right:auto;}";pn(t.calendarContainer,"rightMost",!1),pn(t.calendarContainer,"centerMost",!0),ir.insertRule(I1+","+L1+F1,P1),t.calendarContainer.style.left=A1+"px",t.calendarContainer.style.right="auto"}}}}function It(){for(var K=null,Z=0;Zt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Me];else if(t.config.mode==="multiple"){var Ne=Ot(Me);Ne?t.selectedDates.splice(parseInt(Ne),1):t.selectedDates.push(Me)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Me,t.selectedDates.push(Me),En(Me,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Ye,vt){return Ye.getTime()-vt.getTime()}));if(d(),Pe){var Ae=t.currentYear!==Me.getFullYear();t.currentYear=Me.getFullYear(),t.currentMonth=Me.getMonth(),Ae&&(Re("onYearChange"),F()),Re("onMonthChange")}if(Nn(),R(),sn(),!Pe&&t.config.mode!=="range"&&t.config.showMonths===1?O(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Je=t.config.mode==="single"&&!t.config.enableTime,qe=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Je||qe)&&Pn()}b()}}var $n={locale:[Ce,G],showMonths:[V,r,X],minDate:[$],maxDate:[$],positionElement:[mi],clickOpens:[function(){t.config.clickOpens===!0?(_(t._input,"focus",t.open),_(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function gt(K,Z){if(K!==null&&typeof K=="object"){Object.assign(t.config,K);for(var ie in K)$n[ie]!==void 0&&$n[ie].forEach(function(oe){return oe()})}else t.config[K]=Z,$n[K]!==void 0?$n[K].forEach(function(oe){return oe()}):Dr.indexOf(K)>-1&&(t.config[K]=Ar(Z));t.redraw(),sn(!0)}function Fn(K,Z){var ie=[];if(K instanceof Array)ie=K.map(function(oe){return t.parseDate(oe,Z)});else if(K instanceof Date||typeof K=="number")ie=[t.parseDate(K,Z)];else if(typeof K=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(K,Z)];break;case"multiple":ie=K.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,Z)});break;case"range":ie=K.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,Z)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(K)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(oe){return oe instanceof Date&&Ee(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Me){return oe.getTime()-Me.getTime()})}function ps(K,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),K!==0&&!K||K instanceof Array&&K.length===0)return t.clear(Z);Fn(K,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,Z),p(),t.selectedDates.length===0&&t.clear(!1),sn(Z),Z&&Re("onChange")}function ni(K){return K.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function Ei(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var K=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);K&&Fn(K,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ms(){if(t.input=Fe(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=ct(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),mi()}function mi(){t._positionElement=t.config.positionElement||t._input}function ke(){var K=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ct("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=K,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=K==="datetime-local"?"Y-m-d\\TH:i:S":K==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}_(t.mobileInput,"change",function(Z){t.setDate(Mn(Z).value,!1,t.mobileFormatStr),Re("onChange"),Re("onClose")})}function Ie(K){if(t.isOpen===!0)return t.close();t.open(K)}function Re(K,Z){if(t.config!==void 0){var ie=t.config[K];if(ie!==void 0&&ie.length>0)for(var oe=0;ie[oe]&&oe=0&&En(K,t.selectedDates[1])<=0}function Nn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(K,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=No(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),K.value=ie.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ui(K){var Z=K||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,oe,Me){return t.config.mode!=="range"||t.config.enableTime||Me.indexOf(ie)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function sn(K){K===void 0&&(K=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ui(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ui(t.config.altFormat)),K!==!1&&Re("onValueUpdate")}function dn(K){var Z=Mn(K),ie=t.prevMonthNav.contains(Z),oe=t.nextMonthNav.contains(Z);ie||oe?Q(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Rl(K){K.preventDefault();var Z=K.type==="keydown",ie=Mn(K),oe=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]);var Me=parseFloat(oe.getAttribute("min")),Pe=parseFloat(oe.getAttribute("max")),Ne=parseFloat(oe.getAttribute("step")),Ae=parseInt(oe.value,10),Je=K.delta||(Z?K.which===38?1:-1:0),qe=Ae+Ne*Je;if(typeof oe.value<"u"&&oe.value.length===2){var Ye=oe===t.hourElement,vt=oe===t.minuteElement;qePe&&(qe=oe===t.hourElement?qe-Pe-Vn(!t.amPM):Me,vt&&T(void 0,1,t.hourElement)),t.amPM&&Ye&&(Ne===1?qe+Ae===23:Math.abs(qe-Ae)>Ne)&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=gn(qe)}}return s(),t}function Es(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function XT(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=tt(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:d=void 0}=e,{options:p={}}=e,h=!1,{input:g=void 0,flatpickr:_=void 0}=e;Xt(()=>{const T=f??g,E=k(p);return E.onReady.push((M,O,A)=>{a===void 0&&$(M,O,A),cn().then(()=>{t(8,h=!0)})}),t(3,_=Yt(T,Object.assign(E,f?{wrap:!0}:{}))),()=>{_.destroy()}});const b=Tt();function k(T={}){T=Object.assign({},T);for(const E of r){const M=(O,A,L)=>{b(GT(E),[O,A,L])};E in T?(Array.isArray(T[E])||(T[E]=[T[E]]),T[E].push(M)):T[E]=[M]}return T.onChange&&!T.onChange.includes($)&&T.onChange.push($),T}function $(T,E,M){const O=ld(M,T);!od(a,O)&&(a||O)&&t(2,a=O),t(4,u=E)}function C(T){ne[T?"unshift":"push"](()=>{g=T,t(0,g)})}return n.$$set=T=>{e=je(je({},e),Gt(T)),t(1,s=tt(e,i)),"value"in T&&t(2,a=T.value),"formattedValue"in T&&t(4,u=T.formattedValue),"element"in T&&t(5,f=T.element),"dateFormat"in T&&t(6,d=T.dateFormat),"options"in T&&t(7,p=T.options),"input"in T&&t(0,g=T.input),"flatpickr"in T&&t(3,_=T.flatpickr),"$$scope"in T&&t(9,o=T.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&_&&h&&(od(a,ld(_,_.selectedDates))||_.setDate(a,!0,d)),n.$$.dirty&392&&_&&h)for(const[T,E]of Object.entries(k(p)))_.set(T,E)},[g,s,a,_,u,f,d,p,h,o,l,C]}class uu extends be{constructor(e){super(),ge(this,e,XT,ZT,_e,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function QT(n){let e,t,i,s,l,o,r,a;function u(p){n[6](p)}function f(p){n[7](p)}let d={id:n[19],options:U.defaultFlatpickrOptions()};return n[2]!==void 0&&(d.value=n[2]),n[0].options.min!==void 0&&(d.formattedValue=n[0].options.min),l=new uu({props:d}),ne.push(()=>he(l,"value",u)),ne.push(()=>he(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=y("label"),t=Y("Min date (UTC)"),s=D(),B(l.$$.fragment),m(e,"for",i=n[19])},m(p,h){S(p,e,h),v(e,t),S(p,s,h),z(l,p,h),a=!0},p(p,h){(!a||h&524288&&i!==(i=p[19]))&&m(e,"for",i);const g={};h&524288&&(g.id=p[19]),!o&&h&4&&(o=!0,g.value=p[2],ye(()=>o=!1)),!r&&h&1&&(r=!0,g.formattedValue=p[0].options.min,ye(()=>r=!1)),l.$set(g)},i(p){a||(I(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),H(l,p)}}}function xT(n){let e,t,i,s,l,o,r,a;function u(p){n[9](p)}function f(p){n[10](p)}let d={id:n[19],options:U.defaultFlatpickrOptions()};return n[3]!==void 0&&(d.value=n[3]),n[0].options.max!==void 0&&(d.formattedValue=n[0].options.max),l=new uu({props:d}),ne.push(()=>he(l,"value",u)),ne.push(()=>he(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=y("label"),t=Y("Max date (UTC)"),s=D(),B(l.$$.fragment),m(e,"for",i=n[19])},m(p,h){S(p,e,h),v(e,t),S(p,s,h),z(l,p,h),a=!0},p(p,h){(!a||h&524288&&i!==(i=p[19]))&&m(e,"for",i);const g={};h&524288&&(g.id=p[19]),!o&&h&8&&(o=!0,g.value=p[3],ye(()=>o=!1)),!r&&h&1&&(r=!0,g.formattedValue=p[0].options.max,ye(()=>r=!1)),l.$set(g)},i(p){a||(I(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),H(l,p)}}}function eC(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[QT,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[xT,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),m(t,"class","col-sm-6"),m(l,"class","col-sm-6"),m(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1572869&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&1572873&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(I(i.$$.fragment,a),I(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function tC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[eC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),e.$on("drop",n[15]),e.$on("dragstart",n[16]),e.$on("dragenter",n[17]),e.$on("dragleave",n[18]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Et(s,[a&2&&{key:r[1]},a&32&&Qt(r[5])]):{};a&1048591&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function nC(n,e,t){var O,A;const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e,r=(O=l==null?void 0:l.options)==null?void 0:O.min,a=(A=l==null?void 0:l.options)==null?void 0:A.max;function u(L,N){L.detail&&L.detail.length==3&&t(0,l.options[N]=L.detail[1],l)}function f(L){r=L,t(2,r),t(0,l)}function d(L){n.$$.not_equal(l.options.min,L)&&(l.options.min=L,t(0,l))}const p=L=>u(L,"min");function h(L){a=L,t(3,a),t(0,l)}function g(L){n.$$.not_equal(l.options.max,L)&&(l.options.max=L,t(0,l))}const _=L=>u(L,"max");function b(L){l=L,t(0,l)}function k(L){me.call(this,n,L)}function $(L){me.call(this,n,L)}function C(L){me.call(this,n,L)}function T(L){me.call(this,n,L)}function E(L){me.call(this,n,L)}function M(L){me.call(this,n,L)}return n.$$set=L=>{e=je(je({},e),Gt(L)),t(5,s=tt(e,i)),"field"in L&&t(0,l=L.field),"key"in L&&t(1,o=L.key)},n.$$.update=()=>{var L,N,q,R;n.$$.dirty&5&&r!=((L=l==null?void 0:l.options)==null?void 0:L.min)&&t(2,r=(N=l==null?void 0:l.options)==null?void 0:N.min),n.$$.dirty&9&&a!=((q=l==null?void 0:l.options)==null?void 0:q.max)&&t(3,a=(R=l==null?void 0:l.options)==null?void 0:R.max)},[l,o,r,a,u,s,f,d,p,h,g,_,b,k,$,C,T,E,M]}class iC extends be{constructor(e){super(),ge(this,e,nC,tC,_e,{field:0,key:1})}}const sC=n=>({}),rd=n=>({});function ad(n,e,t){const i=n.slice();return i[47]=e[t],i}const lC=n=>({}),ud=n=>({});function fd(n,e,t){const i=n.slice();return i[47]=e[t],i[51]=t,i}function cd(n){let e,t,i;return{c(){e=y("div"),t=Y(n[2]),i=D(),m(e,"class","block txt-placeholder"),x(e,"link-hint",!n[5]&&!n[6])},m(s,l){S(s,e,l),v(e,t),v(e,i)},p(s,l){l[0]&4&&le(t,s[2]),l[0]&96&&x(e,"link-hint",!s[5]&&!s[6])},d(s){s&&w(e)}}}function oC(n){let e,t=n[47]+"",i;return{c(){e=y("span"),i=Y(t),m(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&1&&t!==(t=s[47]+"")&&le(i,t)},i:ee,o:ee,d(s){s&&w(e)}}}function rC(n){let e,t,i;const s=[{item:n[47]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{H(f,1)}),fe()}l?(e=Rt(l,o()),B(e.$$.fragment),I(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&I(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function dd(n){let e,t,i;function s(){return n[35](n[47])}return{c(){e=y("span"),e.innerHTML='',m(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Oe(Be.call(null,e,"Clear")),J(e,"click",In(xe(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,De(i)}}}function pd(n){let e,t,i,s,l,o;const r=[rC,oC],a=[];function u(d,p){return d[9]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[7])&&dd(n);return{c(){e=y("div"),i.c(),s=D(),f&&f.c(),l=D(),m(e,"class","option")},m(d,p){S(d,e,p),a[t].m(e,null),v(e,s),f&&f.m(e,null),v(e,l),o=!0},p(d,p){let h=t;t=u(d),t===h?a[t].p(d,p):(ue(),P(a[h],1,1,()=>{a[h]=null}),fe(),i=a[t],i?i.p(d,p):(i=a[t]=r[t](d),i.c()),I(i,1),i.m(e,s)),d[4]||d[7]?f?f.p(d,p):(f=dd(d),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(d){o||(I(i),o=!0)},o(d){P(i),o=!1},d(d){d&&w(e),a[t].d(),f&&f.d()}}}function md(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[19],$$slots:{default:[fC]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[40](e),e.$on("show",n[25]),e.$on("hide",n[41]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,l){const o={};l[0]&524288&&(o.trigger=s[19]),l[0]&3225866|l[1]&4096&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[40](null),H(e,s)}}}function hd(n){let e,t,i,s,l,o,r,a,u=n[16].length&&_d(n);return{c(){e=y("div"),t=y("label"),i=y("div"),i.innerHTML='',s=D(),l=y("input"),o=D(),u&&u.c(),m(i,"class","addon p-r-0"),l.autofocus=!0,m(l,"type","text"),m(l,"placeholder",n[3]),m(t,"class","input-group"),m(e,"class","form-field form-field-sm options-search")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(t,s),v(t,l),re(l,n[16]),v(t,o),u&&u.m(t,null),l.focus(),r||(a=J(l,"input",n[37]),r=!0)},p(f,d){d[0]&8&&m(l,"placeholder",f[3]),d[0]&65536&&l.value!==f[16]&&re(l,f[16]),f[16].length?u?u.p(f,d):(u=_d(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function _d(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',m(t,"type","button"),m(t,"class","btn btn-sm btn-circle btn-transparent clear"),m(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",In(xe(n[22]))),i=!0)},p:ee,d(l){l&&w(e),i=!1,s()}}}function gd(n){let e,t=n[1]&&bd(n);return{c(){t&&t.c(),e=Se()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=bd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function bd(n){let e,t;return{c(){e=y("div"),t=Y(n[1]),m(e,"class","txt-missing")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s[0]&2&&le(t,i[1])},d(i){i&&w(e)}}}function aC(n){let e=n[47]+"",t;return{c(){t=Y(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&2097152&&e!==(e=i[47]+"")&&le(t,e)},i:ee,o:ee,d(i){i&&w(t)}}}function uC(n){let e,t,i;const s=[{item:n[47]},n[12]];var l=n[11];function o(r){let a={};for(let u=0;u{H(f,1)}),fe()}l?(e=Rt(l,o()),B(e.$$.fragment),I(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&I(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function vd(n){let e,t,i,s,l,o,r;const a=[uC,aC],u=[];function f(h,g){return h[11]?0:1}t=f(n),i=u[t]=a[t](n);function d(...h){return n[38](n[47],...h)}function p(...h){return n[39](n[47],...h)}return{c(){e=y("div"),i.c(),s=D(),m(e,"tabindex","0"),m(e,"class","dropdown-item option"),x(e,"closable",n[8]),x(e,"selected",n[20](n[47]))},m(h,g){S(h,e,g),u[t].m(e,null),v(e,s),l=!0,o||(r=[J(e,"click",d),J(e,"keydown",p)],o=!0)},p(h,g){n=h;let _=t;t=f(n),t===_?u[t].p(n,g):(ue(),P(u[_],1,1,()=>{u[_]=null}),fe(),i=u[t],i?i.p(n,g):(i=u[t]=a[t](n),i.c()),I(i,1),i.m(e,s)),(!l||g[0]&256)&&x(e,"closable",n[8]),(!l||g[0]&3145728)&&x(e,"selected",n[20](n[47]))},i(h){l||(I(i),l=!0)},o(h){P(i),l=!1},d(h){h&&w(e),u[t].d(),o=!1,De(r)}}}function fC(n){let e,t,i,s,l,o=n[13]&&hd(n);const r=n[34].beforeOptions,a=kt(r,n,n[43],ud);let u=n[21],f=[];for(let _=0;_P(f[_],1,1,()=>{f[_]=null});let p=null;u.length||(p=gd(n));const h=n[34].afterOptions,g=kt(h,n,n[43],rd);return{c(){o&&o.c(),e=D(),a&&a.c(),t=D(),i=y("div");for(let _=0;_P(a[p],1,1,()=>{a[p]=null});let f=null;r.length||(f=cd(n));let d=!n[5]&&!n[6]&&md(n);return{c(){e=y("div"),t=y("div");for(let p=0;p{d=null}),fe()),(!o||h[0]&16384&&l!==(l="select "+p[14]))&&m(e,"class",l),(!o||h[0]&16400)&&x(e,"multiple",p[4]),(!o||h[0]&16416)&&x(e,"disabled",p[5]),(!o||h[0]&16448)&&x(e,"readonly",p[6])},i(p){if(!o){for(let h=0;hAt(Fe,He))||[]}function se(ce,He){ce.preventDefault(),b&&p?V(He):j(He)}function ve(ce,He){(ce.code==="Enter"||ce.code==="Space")&&(se(ce,He),k&&X())}function $e(){ae(),setTimeout(()=>{const ce=q==null?void 0:q.querySelector(".dropdown-item.option.selected");ce&&(ce.focus(),ce.scrollIntoView({block:"nearest"}))},0)}function ze(ce){ce.stopPropagation(),!g&&!h&&(L==null||L.toggle())}Xt(()=>{const ce=document.querySelectorAll(`label[for="${r}"]`);for(const He of ce)He.addEventListener("click",ze);return()=>{for(const He of ce)He.removeEventListener("click",ze)}});const Ue=ce=>F(ce);function we(ce){ne[ce?"unshift":"push"](()=>{R=ce,t(19,R)})}function Ee(){N=this.value,t(16,N)}const Ge=(ce,He)=>se(He,ce),_t=(ce,He)=>ve(He,ce);function Xe(ce){ne[ce?"unshift":"push"](()=>{L=ce,t(17,L)})}function Ke(ce){me.call(this,n,ce)}function Te(ce){ne[ce?"unshift":"push"](()=>{q=ce,t(18,q)})}return n.$$set=ce=>{"id"in ce&&t(26,r=ce.id),"noOptionsText"in ce&&t(1,a=ce.noOptionsText),"selectPlaceholder"in ce&&t(2,u=ce.selectPlaceholder),"searchPlaceholder"in ce&&t(3,f=ce.searchPlaceholder),"items"in ce&&t(27,d=ce.items),"multiple"in ce&&t(4,p=ce.multiple),"disabled"in ce&&t(5,h=ce.disabled),"readonly"in ce&&t(6,g=ce.readonly),"selected"in ce&&t(0,_=ce.selected),"toggle"in ce&&t(7,b=ce.toggle),"closable"in ce&&t(8,k=ce.closable),"labelComponent"in ce&&t(9,$=ce.labelComponent),"labelComponentProps"in ce&&t(10,C=ce.labelComponentProps),"optionComponent"in ce&&t(11,T=ce.optionComponent),"optionComponentProps"in ce&&t(12,E=ce.optionComponentProps),"searchable"in ce&&t(13,M=ce.searchable),"searchFunc"in ce&&t(28,O=ce.searchFunc),"class"in ce&&t(14,A=ce.class),"$$scope"in ce&&t(43,o=ce.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&134217728&&d&&(G(),ae()),n.$$.dirty[0]&134283264&&t(21,i=Q(d,N)),n.$$.dirty[0]&1&&t(20,s=function(ce){const He=U.toArray(_);return U.inArray(He,ce)})},[_,a,u,f,p,h,g,b,k,$,C,T,E,M,A,F,N,L,q,R,s,i,ae,se,ve,$e,r,d,O,j,V,W,te,X,l,Ue,we,Ee,Ge,_t,Xe,Ke,Te,o]}class fu extends be{constructor(e){super(),ge(this,e,pC,cC,_e,{id:26,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:27,multiple:4,disabled:5,readonly:6,selected:0,toggle:7,closable:8,labelComponent:9,labelComponentProps:10,optionComponent:11,optionComponentProps:12,searchable:13,searchFunc:28,class:14,deselectItem:15,selectItem:29,toggleItem:30,reset:31,showDropdown:32,hideDropdown:33},null,[-1,-1])}get deselectItem(){return this.$$.ctx[15]}get selectItem(){return this.$$.ctx[29]}get toggleItem(){return this.$$.ctx[30]}get reset(){return this.$$.ctx[31]}get showDropdown(){return this.$$.ctx[32]}get hideDropdown(){return this.$$.ctx[33]}}function yd(n){let e,t;return{c(){e=y("i"),m(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&m(e,"class",t)},d(i){i&&w(e)}}}function mC(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&yd(n);return{c(){l&&l.c(),e=D(),t=y("span"),s=Y(i),m(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),v(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=yd(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&le(s,i)},i:ee,o:ee,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function hC(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class kd extends be{constructor(e){super(),ge(this,e,hC,mC,_e,{item:0})}}const _C=n=>({}),wd=n=>({});function gC(n){let e;const t=n[8].afterOptions,i=kt(t,n,n[12],wd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&St(i,t,s,s[12],e?wt(t,s[12],l,_C):$t(s[12]),wd)},i(s){e||(I(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function bC(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[gC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&62?Et(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Qt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function vC(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=tt(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=kd}=e,{optionComponent:d=kd}=e,{selectionKey:p="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function g(C){C=U.toArray(C,!0);let T=[];for(let E of C){const M=U.findByKey(r,p,E);M&&T.push(M)}C.length&&!T.length||t(0,u=a?T:T[0])}async function _(C){let T=U.toArray(C,!0).map(E=>E[p]);r.length&&t(6,h=a?T:T[0])}function b(C){u=C,t(0,u)}function k(C){me.call(this,n,C)}function $(C){me.call(this,n,C)}return n.$$set=C=>{e=je(je({},e),Gt(C)),t(5,s=tt(e,i)),"items"in C&&t(1,r=C.items),"multiple"in C&&t(2,a=C.multiple),"selected"in C&&t(0,u=C.selected),"labelComponent"in C&&t(3,f=C.labelComponent),"optionComponent"in C&&t(4,d=C.optionComponent),"selectionKey"in C&&t(7,p=C.selectionKey),"keyOfSelected"in C&&t(6,h=C.keyOfSelected),"$$scope"in C&&t(12,o=C.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&g(h),n.$$.dirty&1&&_(u)},[u,r,a,f,d,s,h,p,l,b,k,$,o]}class Bi extends be{constructor(e){super(),ge(this,e,vC,bC,_e,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function yC(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[17],placeholder:"Choices: eg. optionA, optionB",required:!0,readonly:!n[18]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new zs({props:a}),ne.push(()=>he(t,"value",r)),{c(){e=y("div"),B(t.$$.fragment)},m(u,f){S(u,e,f),z(t,e,null),s=!0,l||(o=Oe(Be.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const d={};f&131072&&(d.id=u[17]),f&262144&&(d.readonly=!u[18]),!i&&f&1&&(i=!0,d.value=u[0].options.values,ye(()=>i=!1)),t.$set(d)},i(u){s||(I(t.$$.fragment,u),s=!0)},o(u){P(t.$$.fragment,u),s=!1},d(u){u&&w(e),H(t),l=!1,o()}}}function kC(n){let e,t,i;function s(o){n[8](o)}let l={id:n[17],items:n[3],readonly:!n[18]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),ne.push(()=>he(e,"keyOfSelected",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&131072&&(a.id=o[17]),r&262144&&(a.readonly=!o[18]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function wC(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field required "+(n[18]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[yC,({uniqueId:d})=>({17:d}),({uniqueId:d})=>d?131072:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[18]?"":"readonly"),inlineError:!0,$$slots:{default:[kC,({uniqueId:d})=>({17:d}),({uniqueId:d})=>d?131072:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=D(),B(i.$$.fragment),s=D(),l=y("div"),o=D(),B(r.$$.fragment),a=D(),u=y("div"),m(e,"class","separator"),m(l,"class","separator"),m(u,"class","separator")},m(d,p){S(d,e,p),S(d,t,p),z(i,d,p),S(d,s,p),S(d,l,p),S(d,o,p),z(r,d,p),S(d,a,p),S(d,u,p),f=!0},p(d,p){const h={};p&262144&&(h.class="form-field required "+(d[18]?"":"readonly")),p&2&&(h.name="schema."+d[1]+".options.values"),p&917505&&(h.$$scope={dirty:p,ctx:d}),i.$set(h);const g={};p&262144&&(g.class="form-field form-field-single-multiple-select "+(d[18]?"":"readonly")),p&917508&&(g.$$scope={dirty:p,ctx:d}),r.$set(g)},i(d){f||(I(i.$$.fragment,d),I(r.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(r.$$.fragment,d),f=!1},d(d){d&&w(e),d&&w(t),H(i,d),d&&w(s),d&&w(l),d&&w(o),H(r,d),d&&w(a),d&&w(u)}}}function Sd(n){let e,t;return e=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[SC,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&655361&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function SC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Max select"),s=D(),l=y("input"),m(e,"for",i=n[17]),m(l,"id",o=n[17]),m(l,"type","number"),m(l,"step","1"),m(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.maxSelect),r||(a=J(l,"input",n[6]),r=!0)},p(u,f){f&131072&&i!==(i=u[17])&&m(e,"for",i),f&131072&&o!==(o=u[17])&&m(l,"id",o),f&1&&mt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $C(n){let e,t,i=!n[2]&&Sd(n);return{c(){i&&i.c(),e=Se()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,l){s[2]?i&&(ue(),P(i,1,1,()=>{i=null}),fe()):i?(i.p(s,l),l&4&&I(i,1)):(i=Sd(s),i.c(),I(i,1),i.m(e.parentNode,e))},i(s){t||(I(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function TC(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[$C],default:[wC,({interactive:r})=>({18:r}),({interactive:r})=>r?262144:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),e.$on("drop",n[12]),e.$on("dragstart",n[13]),e.$on("dragenter",n[14]),e.$on("dragleave",n[15]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&18?Et(s,[a&2&&{key:r[1]},a&16&&Qt(r[4])]):{};a&786439&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function CC(n,e,t){var E;const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((E=l.options)==null?void 0:E.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function d(){l.options.maxSelect=mt(this.value),t(0,l),t(5,u),t(2,a)}function p(M){n.$$.not_equal(l.options.values,M)&&(l.options.values=M,t(0,l),t(5,u),t(2,a))}function h(M){a=M,t(2,a)}function g(M){l=M,t(0,l),t(5,u),t(2,a)}function _(M){me.call(this,n,M)}function b(M){me.call(this,n,M)}function k(M){me.call(this,n,M)}function $(M){me.call(this,n,M)}function C(M){me.call(this,n,M)}function T(M){me.call(this,n,M)}return n.$$set=M=>{e=je(je({},e),Gt(M)),t(4,s=tt(e,i)),"field"in M&&t(0,l=M.field),"key"in M&&t(1,o=M.key)},n.$$.update=()=>{var M,O;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((O=(M=l.options)==null?void 0:M.values)==null?void 0:O.length)||2,l)),n.$$.dirty&1&&U.isEmpty(l.options)&&f()},[l,o,a,r,s,u,d,p,h,g,_,b,k,$,C,T]}class MC extends be{constructor(e){super(),ge(this,e,CC,TC,_e,{field:0,key:1})}}function EC(n){let e;return{c(){e=y("i"),m(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function OC(n){let e;return{c(){e=y("i"),m(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $d(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O='"{"a":1,"b":2}"',A,L,N,q,R,F,j,V,W,te,X,G,ae;return{c(){e=y("div"),t=y("div"),i=y("div"),s=Y("In order to support seamlessly both "),l=y("code"),l.textContent="application/json",o=Y(` and + `),r=y("code"),r.textContent="multipart/form-data",a=Y(` + requests, the following normalization rules are applied if the `),u=y("code"),u.textContent="json",f=Y(` field + is a + `),d=y("strong"),d.textContent="plain string",p=Y(`: + `),h=y("ul"),g=y("li"),g.innerHTML=""true" is converted to the json true",_=D(),b=y("li"),b.innerHTML=""false" is converted to the json false",k=D(),$=y("li"),$.innerHTML=""null" is converted to the json null",C=D(),T=y("li"),T.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",E=D(),M=y("li"),A=Y(O),L=Y(" is converted to the json "),N=y("code"),N.textContent='{"a":1,"b":2}',q=D(),R=y("li"),R.textContent="numeric strings are converted to json number",F=D(),j=y("li"),j.textContent="double quoted strings are left as they are (aka. without normalizations)",V=D(),W=y("li"),W.textContent="any other string (empty string too) is double quoted",te=Y(` + Alternatively, if you want to avoid the string value normalizations, you can wrap your + data inside an object, eg.`),X=y("code"),X.textContent='{"data": anything}',m(i,"class","content"),m(t,"class","alert alert-warning m-b-0 m-t-10"),m(e,"class","block")},m(Q,se){S(Q,e,se),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(i,r),v(i,a),v(i,u),v(i,f),v(i,d),v(i,p),v(i,h),v(h,g),v(h,_),v(h,b),v(h,k),v(h,$),v(h,C),v(h,T),v(h,E),v(h,M),v(M,A),v(M,L),v(M,N),v(h,q),v(h,R),v(h,F),v(h,j),v(h,V),v(h,W),v(i,te),v(i,X),ae=!0},i(Q){ae||(Q&&et(()=>{ae&&(G||(G=Ve(e,rt,{duration:150},!0)),G.run(1))}),ae=!0)},o(Q){Q&&(G||(G=Ve(e,rt,{duration:150},!1)),G.run(0)),ae=!1},d(Q){Q&&w(e),Q&&G&&G.end()}}}function DC(n){let e,t,i,s,l,o,r;function a(p,h){return p[2]?OC:EC}let u=a(n),f=u(n),d=n[2]&&$d();return{c(){e=y("button"),t=y("strong"),t.textContent="String value normalizations",i=D(),f.c(),s=D(),d&&d.c(),l=Se(),m(t,"class","txt"),m(e,"type","button"),m(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(p,h){S(p,e,h),v(e,t),v(e,i),f.m(e,null),S(p,s,h),d&&d.m(p,h),S(p,l,h),o||(r=J(e,"click",n[4]),o=!0)},p(p,h){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(e,null))),p[2]?d?h&4&&I(d,1):(d=$d(),d.c(),I(d,1),d.m(l.parentNode,l)):d&&(ue(),P(d,1,1,()=>{d=null}),fe())},d(p){p&&w(e),f.d(),p&&w(s),d&&d.d(p),p&&w(l),o=!1,r()}}}function AC(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[DC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&10?Et(s,[a&2&&{key:r[1]},a&8&&Qt(r[3])]):{};a&4100&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function IC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function h(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Gt(b)),t(3,s=tt(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,r,s,a,u,f,d,p,h,g,_]}class LC extends be{constructor(e){super(),ge(this,e,IC,AC,_e,{field:0,key:1})}}function PC(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=y("span"),i=Y(t),s=D(),l=y("small"),r=Y(o),m(e,"class","txt"),m(l,"class","txt-hint")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),S(a,l,u),v(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&le(i,t),u&1&&o!==(o=a[0].mimeType+"")&&le(r,o)},i:ee,o:ee,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function FC(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Td extends be{constructor(e){super(),ge(this,e,FC,PC,_e,{item:0})}}const NC=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function RC(n){let e,t,i;function s(o){n[16](o)}let l={id:n[26],items:n[4],readonly:!n[27]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),ne.push(()=>he(e,"keyOfSelected",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&67108864&&(a.id=o[26]),r&134217728&&(a.readonly=!o[27]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function qC(n){let e,t,i,s,l,o;return i=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[27]?"":"readonly"),inlineError:!0,$$slots:{default:[RC,({uniqueId:r})=>({26:r}),({uniqueId:r})=>r?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=D(),B(i.$$.fragment),s=D(),l=y("div"),m(e,"class","separator"),m(l,"class","separator")},m(r,a){S(r,e,a),S(r,t,a),z(i,r,a),S(r,s,a),S(r,l,a),o=!0},p(r,a){const u={};a&134217728&&(u.class="form-field form-field-single-multiple-select "+(r[27]?"":"readonly")),a&469762052&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(I(i.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),H(i,r),r&&w(s),r&&w(l)}}}function jC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=D(),i=y("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=D(),l=y("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=D(),r=y("button"),r.innerHTML='Archives (zip, 7zip, rar)',m(e,"type","button"),m(e,"class","dropdown-item closable"),m(i,"type","button"),m(i,"class","dropdown-item closable"),m(l,"type","button"),m(l,"class","dropdown-item closable"),m(r,"type","button"),m(r,"class","dropdown-item closable")},m(f,d){S(f,e,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),S(f,o,d),S(f,r,d),a||(u=[J(e,"click",n[9]),J(i,"click",n[10]),J(l,"click",n[11]),J(r,"click",n[12])],a=!0)},p:ee,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,De(u)}}}function VC(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C;function T(M){n[8](M)}let E={id:n[26],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:Td,optionComponent:Td};return n[0].options.mimeTypes!==void 0&&(E.keyOfSelected=n[0].options.mimeTypes),r=new Bi({props:E}),ne.push(()=>he(r,"keyOfSelected",T)),b=new Jn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[jC]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Allowed mime types",i=D(),s=y("i"),o=D(),B(r.$$.fragment),u=D(),f=y("div"),d=y("button"),p=y("span"),p.textContent="Choose presets",h=D(),g=y("i"),_=D(),B(b.$$.fragment),m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[26]),m(p,"class","txt link-primary"),m(g,"class","ri-arrow-drop-down-fill"),m(d,"type","button"),m(d,"class","inline-flex flex-gap-0"),m(f,"class","help-block")},m(M,O){S(M,e,O),v(e,t),v(e,i),v(e,s),S(M,o,O),z(r,M,O),S(M,u,O),S(M,f,O),v(f,d),v(d,p),v(d,h),v(d,g),v(d,_),z(b,d,null),k=!0,$||(C=Oe(Be.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),$=!0)},p(M,O){(!k||O&67108864&&l!==(l=M[26]))&&m(e,"for",l);const A={};O&67108864&&(A.id=M[26]),O&8&&(A.items=M[3]),!a&&O&1&&(a=!0,A.keyOfSelected=M[0].options.mimeTypes,ye(()=>a=!1)),r.$set(A);const L={};O&268435457&&(L.$$scope={dirty:O,ctx:M}),b.$set(L)},i(M){k||(I(r.$$.fragment,M),I(b.$$.fragment,M),k=!0)},o(M){P(r.$$.fragment,M),P(b.$$.fragment,M),k=!1},d(M){M&&w(e),M&&w(o),H(r,M),M&&w(u),M&&w(f),H(b),$=!1,C()}}}function zC(n){let e;return{c(){e=y("ul"),e.innerHTML=`
  • WxH + (eg. 100x50) - crop to WxH viewbox (from center)
  • +
  • WxHt + (eg. 100x50t) - crop to WxH viewbox (from top)
  • +
  • WxHb + (eg. 100x50b) - crop to WxH viewbox (from bottom)
  • +
  • WxHf + (eg. 100x50f) - fit inside a WxH viewbox (without cropping)
  • +
  • 0xH + (eg. 0x50) - resize to H height preserving the aspect ratio
  • +
  • Wx0 + (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,m(e,"class","m-0")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function HC(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E;function M(A){n[13](A)}let O={id:n[26],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new zs({props:O}),ne.push(()=>he(r,"value",M)),$=new Jn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[zC]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Thumb sizes",i=D(),s=y("i"),o=D(),B(r.$$.fragment),u=D(),f=y("div"),d=y("span"),d.textContent="Use comma as separator.",p=D(),h=y("button"),g=y("span"),g.textContent="Supported formats",_=D(),b=y("i"),k=D(),B($.$$.fragment),m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[26]),m(d,"class","txt"),m(g,"class","txt link-primary"),m(b,"class","ri-arrow-drop-down-fill"),m(h,"type","button"),m(h,"class","inline-flex flex-gap-0"),m(f,"class","help-block")},m(A,L){S(A,e,L),v(e,t),v(e,i),v(e,s),S(A,o,L),z(r,A,L),S(A,u,L),S(A,f,L),v(f,d),v(f,p),v(f,h),v(h,g),v(h,_),v(h,b),v(h,k),z($,h,null),C=!0,T||(E=Oe(Be.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),T=!0)},p(A,L){(!C||L&67108864&&l!==(l=A[26]))&&m(e,"for",l);const N={};L&67108864&&(N.id=A[26]),!a&&L&1&&(a=!0,N.value=A[0].options.thumbs,ye(()=>a=!1)),r.$set(N);const q={};L&268435456&&(q.$$scope={dirty:L,ctx:A}),$.$set(q)},i(A){C||(I(r.$$.fragment,A),I($.$$.fragment,A),C=!0)},o(A){P(r.$$.fragment,A),P($.$$.fragment,A),C=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H($),T=!1,E()}}}function BC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Max file size"),s=D(),l=y("input"),r=D(),a=y("div"),a.textContent="Must be in bytes.",m(e,"for",i=n[26]),m(l,"type","number"),m(l,"id",o=n[26]),m(l,"step","1"),m(l,"min","0"),m(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),re(l,n[0].options.maxSize),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[14]),u=!0)},p(d,p){p&67108864&&i!==(i=d[26])&&m(e,"for",i),p&67108864&&o!==(o=d[26])&&m(l,"id",o),p&1&&mt(l.value)!==d[0].options.maxSize&&re(l,d[0].options.maxSize)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Cd(n){let e,t,i;return t=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[UC,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","col-sm-3")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function UC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Max select"),s=D(),l=y("input"),m(e,"for",i=n[26]),m(l,"id",o=n[26]),m(l,"type","number"),m(l,"step","1"),m(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.maxSelect),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&67108864&&i!==(i=u[26])&&m(e,"for",i),f&67108864&&o!==(o=u[26])&&m(l,"id",o),f&1&&mt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WC(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[VC,({uniqueId:_})=>({26:_}),({uniqueId:_})=>_?67108864:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[HC,({uniqueId:_})=>({26:_}),({uniqueId:_})=>_?67108864:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[BC,({uniqueId:_})=>({26:_}),({uniqueId:_})=>_?67108864:0]},$$scope:{ctx:n}}});let g=!n[2]&&Cd(n);return{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),a=D(),u=y("div"),B(f.$$.fragment),p=D(),g&&g.c(),m(t,"class","col-sm-12"),m(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),m(u,"class",d=n[2]?"col-sm-4":"col-sm-3"),m(e,"class","grid grid-sm")},m(_,b){S(_,e,b),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,a),v(e,u),z(f,u,null),v(e,p),g&&g.m(e,null),h=!0},p(_,b){const k={};b&2&&(k.name="schema."+_[1]+".options.mimeTypes"),b&335544329&&(k.$$scope={dirty:b,ctx:_}),i.$set(k);const $={};b&2&&($.name="schema."+_[1]+".options.thumbs"),b&335544321&&($.$$scope={dirty:b,ctx:_}),o.$set($),(!h||b&4&&r!==(r=_[2]?"col-sm-8":"col-sm-6"))&&m(l,"class",r);const C={};b&2&&(C.name="schema."+_[1]+".options.maxSize"),b&335544321&&(C.$$scope={dirty:b,ctx:_}),f.$set(C),(!h||b&4&&d!==(d=_[2]?"col-sm-4":"col-sm-3"))&&m(u,"class",d),_[2]?g&&(ue(),P(g,1,1,()=>{g=null}),fe()):g?(g.p(_,b),b&4&&I(g,1)):(g=Cd(_),g.c(),I(g,1),g.m(e,null))},i(_){h||(I(i.$$.fragment,_),I(o.$$.fragment,_),I(f.$$.fragment,_),I(g),h=!0)},o(_){P(i.$$.fragment,_),P(o.$$.fragment,_),P(f.$$.fragment,_),P(g),h=!1},d(_){_&&w(e),H(i),H(o),H(f),g&&g.d()}}}function YC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=D(),s=y("label"),l=y("span"),l.textContent="Protected",r=D(),a=y("a"),a.textContent="(Learn more)",m(e,"type","checkbox"),m(e,"id",t=n[26]),m(l,"class","txt"),m(s,"for",o=n[26]),m(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),m(a,"class","toggle-info txt-sm txt-hint m-l-5"),m(a,"target","_blank"),m(a,"rel","noopener")},m(d,p){S(d,e,p),e.checked=n[0].options.protected,S(d,i,p),S(d,s,p),v(s,l),S(d,r,p),S(d,a,p),u||(f=J(e,"change",n[7]),u=!0)},p(d,p){p&67108864&&t!==(t=d[26])&&m(e,"id",t),p&1&&(e.checked=d[0].options.protected),p&67108864&&o!==(o=d[26])&&m(s,"for",o)},d(d){d&&w(e),d&&w(i),d&&w(s),d&&w(r),d&&w(a),u=!1,f()}}}function KC(n){let e,t,i;return t=new pe({props:{class:"form-field form-field-toggle m-0",name:"schema."+n[1]+".options.protected",$$slots:{default:[YC,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","col-sm-4")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.protected"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function JC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{afterNonempty:[KC],options:[WC],default:[qC,({interactive:r})=>({27:r}),({interactive:r})=>r?134217728:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),e.$on("drop",n[20]),e.$on("dragstart",n[21]),e.$on("dragenter",n[22]),e.$on("dragleave",n[23]),{c(){B(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Et(s,[a&2&&{key:r[1]},a&32&&Qt(r[5])]):{};a&402653199&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(I(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function ZC(n,e,t){var j;const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=NC.slice(),u=((j=l.options)==null?void 0:j.maxSelect)<=1,f=u;function d(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function p(){if(U.isEmpty(l.options.mimeTypes))return;const V=[];for(const W of l.options.mimeTypes)a.find(te=>te.mimeType===W)||V.push({mimeType:W});V.length&&t(3,a=a.concat(V))}function h(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function g(V){n.$$.not_equal(l.options.mimeTypes,V)&&(l.options.mimeTypes=V,t(0,l),t(6,f),t(2,u))}const _=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},b=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},k=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},$=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function C(V){n.$$.not_equal(l.options.thumbs,V)&&(l.options.thumbs=V,t(0,l),t(6,f),t(2,u))}function T(){l.options.maxSize=mt(this.value),t(0,l),t(6,f),t(2,u)}function E(){l.options.maxSelect=mt(this.value),t(0,l),t(6,f),t(2,u)}function M(V){u=V,t(2,u)}function O(V){l=V,t(0,l),t(6,f),t(2,u)}function A(V){me.call(this,n,V)}function L(V){me.call(this,n,V)}function N(V){me.call(this,n,V)}function q(V){me.call(this,n,V)}function R(V){me.call(this,n,V)}function F(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Gt(V)),t(5,s=tt(e,i)),"field"in V&&t(0,l=V.field),"key"in V&&t(1,o=V.key)},n.$$.update=()=>{var V,W;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((W=(V=l.options)==null?void 0:V.values)==null?void 0:W.length)||99,l)),n.$$.dirty&1&&(U.isEmpty(l.options)?d():p())},[l,o,u,a,r,s,f,h,g,_,b,k,$,C,T,E,M,O,A,L,N,q,R,F]}class GC extends be{constructor(e){super(),ge(this,e,ZC,JC,_e,{field:0,key:1})}}function XC(n){let e,t,i,s,l;return{c(){e=y("hr"),t=D(),i=y("button"),i.innerHTML=` + New collection`,m(i,"type","button"),m(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=J(i,"click",n[17]),s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function QC(n){let e,t,i;function s(o){n[18](o)}let l={id:n[33],searchable:n[3].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[3],readonly:!n[34]||n[0].id,$$slots:{afterOptions:[XC]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Bi({props:l}),ne.push(()=>he(e,"keyOfSelected",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[0]&8&&(a.searchable=o[3].length>5),r[0]&8&&(a.items=o[3]),r[0]&1|r[1]&8&&(a.readonly=!o[34]||o[0].id),r[0]&16|r[1]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function xC(n){let e,t,i;function s(o){n[19](o)}let l={id:n[33],items:n[8],readonly:!n[34]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),ne.push(()=>he(e,"keyOfSelected",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[1]&8&&(a.readonly=!o[34]),!t&&r[0]&4&&(t=!0,a.keyOfSelected=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function e4(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field required "+(n[34]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[QC,({uniqueId:d})=>({33:d}),({uniqueId:d})=>[0,d?4:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[34]?"":"readonly"),inlineError:!0,$$slots:{default:[xC,({uniqueId:d})=>({33:d}),({uniqueId:d})=>[0,d?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=D(),B(i.$$.fragment),s=D(),l=y("div"),o=D(),B(r.$$.fragment),a=D(),u=y("div"),m(e,"class","separator"),m(l,"class","separator"),m(u,"class","separator")},m(d,p){S(d,e,p),S(d,t,p),z(i,d,p),S(d,s,p),S(d,l,p),S(d,o,p),z(r,d,p),S(d,a,p),S(d,u,p),f=!0},p(d,p){const h={};p[1]&8&&(h.class="form-field required "+(d[34]?"":"readonly")),p[0]&2&&(h.name="schema."+d[1]+".options.collectionId"),p[0]&25|p[1]&28&&(h.$$scope={dirty:p,ctx:d}),i.$set(h);const g={};p[1]&8&&(g.class="form-field form-field-single-multiple-select "+(d[34]?"":"readonly")),p[0]&4|p[1]&28&&(g.$$scope={dirty:p,ctx:d}),r.$set(g)},i(d){f||(I(i.$$.fragment,d),I(r.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(r.$$.fragment,d),f=!1},d(d){d&&w(e),d&&w(t),H(i,d),d&&w(s),d&&w(l),d&&w(o),H(r,d),d&&w(a),d&&w(u)}}}function Md(n){let e,t,i,s,l,o;return t=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[t4,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[n4,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),B(t.$$.fragment),i=D(),s=y("div"),B(l.$$.fragment),m(e,"class","col-sm-6"),m(s,"class","col-sm-6")},m(r,a){S(r,e,a),z(t,e,null),S(r,i,a),S(r,s,a),z(l,s,null),o=!0},p(r,a){const u={};a[0]&2&&(u.name="schema."+r[1]+".options.minSelect"),a[0]&1|a[1]&20&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&2&&(f.name="schema."+r[1]+".options.maxSelect"),a[0]&1|a[1]&20&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(I(t.$$.fragment,r),I(l.$$.fragment,r),o=!0)},o(r){P(t.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),H(t),r&&w(i),r&&w(s),H(l)}}}function t4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Min select"),s=D(),l=y("input"),m(e,"for",i=n[33]),m(l,"type","number"),m(l,"id",o=n[33]),m(l,"step","1"),m(l,"min","1"),m(l,"placeholder","No min limit")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.minSelect),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&4&&i!==(i=u[33])&&m(e,"for",i),f[1]&4&&o!==(o=u[33])&&m(l,"id",o),f[0]&1&&mt(l.value)!==u[0].options.minSelect&&re(l,u[0].options.minSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function n4(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Max select"),s=D(),l=y("input"),m(e,"for",i=n[33]),m(l,"type","number"),m(l,"id",o=n[33]),m(l,"step","1"),m(l,"placeholder","No max limit"),m(l,"min",r=n[0].options.minSelect||2)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),re(l,n[0].options.maxSelect),a||(u=J(l,"input",n[14]),a=!0)},p(f,d){d[1]&4&&i!==(i=f[33])&&m(e,"for",i),d[1]&4&&o!==(o=f[33])&&m(l,"id",o),d[0]&1&&r!==(r=f[0].options.minSelect||2)&&m(l,"min",r),d[0]&1&&mt(l.value)!==f[0].options.maxSelect&&re(l,f[0].options.maxSelect)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function i4(n){let e,t,i,s,l,o,r,a,u,f,d;function p(g){n[15](g)}let h={multiple:!0,searchable:!0,id:n[33],selectPlaceholder:"Auto",items:n[5]};return n[0].options.displayFields!==void 0&&(h.selected=n[0].options.displayFields),r=new fu({props:h}),ne.push(()=>he(r,"selected",p)),{c(){e=y("label"),t=y("span"),t.textContent="Display fields",i=D(),s=y("i"),o=D(),B(r.$$.fragment),m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[33])},m(g,_){S(g,e,_),v(e,t),v(e,i),v(e,s),S(g,o,_),z(r,g,_),u=!0,f||(d=Oe(Be.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(g,_){(!u||_[1]&4&&l!==(l=g[33]))&&m(e,"for",l);const b={};_[1]&4&&(b.id=g[33]),_[0]&32&&(b.items=g[5]),!a&&_[0]&1&&(a=!0,b.selected=g[0].options.displayFields,ye(()=>a=!1)),r.$set(b)},i(g){u||(I(r.$$.fragment,g),u=!0)},o(g){P(r.$$.fragment,g),u=!1},d(g){g&&w(e),g&&w(o),H(r,g),f=!1,d()}}}function s4(n){let e,t,i,s,l,o,r,a,u,f,d,p;function h(_){n[16](_)}let g={id:n[33],items:n[9]};return n[0].options.cascadeDelete!==void 0&&(g.keyOfSelected=n[0].options.cascadeDelete),a=new Bi({props:g}),ne.push(()=>he(a,"keyOfSelected",h)),{c(){e=y("label"),t=y("span"),t.textContent="Cascade delete",i=D(),s=y("i"),r=D(),B(a.$$.fragment),m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",o=n[33])},m(_,b){var k,$;S(_,e,b),v(e,t),v(e,i),v(e,s),S(_,r,b),z(a,_,b),f=!0,d||(p=Oe(l=Be.call(null,s,{text:`Whether on ${((k=n[6])==null?void 0:k.name)||"relation"} record deletion to delete also the ${(($=n[7])==null?void 0:$.name)||"field"} associated records.`,position:"top"})),d=!0)},p(_,b){var $,C;l&&jt(l.update)&&b[0]&192&&l.update.call(null,{text:`Whether on ${(($=_[6])==null?void 0:$.name)||"relation"} record deletion to delete also the ${((C=_[7])==null?void 0:C.name)||"field"} associated records.`,position:"top"}),(!f||b[1]&4&&o!==(o=_[33]))&&m(e,"for",o);const k={};b[1]&4&&(k.id=_[33]),!u&&b[0]&1&&(u=!0,k.keyOfSelected=_[0].options.cascadeDelete,ye(()=>u=!1)),a.$set(k)},i(_){f||(I(a.$$.fragment,_),f=!0)},o(_){P(a.$$.fragment,_),f=!1},d(_){_&&w(e),_&&w(r),H(a,_),d=!1,p()}}}function l4(n){let e,t,i,s,l,o,r,a,u=!n[2]&&Md(n);return s=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[i4,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[s4,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),u&&u.c(),t=D(),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),B(r.$$.fragment),m(i,"class","col-sm-6"),m(o,"class","col-sm-6"),m(e,"class","grid grid-sm")},m(f,d){S(f,e,d),u&&u.m(e,null),v(e,t),v(e,i),z(s,i,null),v(e,l),v(e,o),z(r,o,null),a=!0},p(f,d){f[2]?u&&(ue(),P(u,1,1,()=>{u=null}),fe()):u?(u.p(f,d),d[0]&4&&I(u,1)):(u=Md(f),u.c(),I(u,1),u.m(e,t));const p={};d[0]&2&&(p.name="schema."+f[1]+".options.displayFields"),d[0]&33|d[1]&20&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const h={};d[0]&2&&(h.name="schema."+f[1]+".options.cascadeDelete"),d[0]&193|d[1]&20&&(h.$$scope={dirty:d,ctx:f}),r.$set(h)},i(f){a||(I(u),I(s.$$.fragment,f),I(r.$$.fragment,f),a=!0)},o(f){P(u),P(s.$$.fragment,f),P(r.$$.fragment,f),a=!1},d(f){f&&w(e),u&&u.d(),H(s),H(r)}}}function o4(n){let e,t,i,s,l;const o=[{key:n[1]},n[10]];function r(f){n[20](f)}let a={$$slots:{options:[l4],default:[e4,({interactive:f})=>({34:f}),({interactive:f})=>[0,f?8:0]]},$$scope:{ctx:n}};for(let f=0;fhe(e,"field",r)),e.$on("rename",n[21]),e.$on("remove",n[22]),e.$on("drop",n[23]),e.$on("dragstart",n[24]),e.$on("dragenter",n[25]),e.$on("dragleave",n[26]);let u={};return s=new cu({props:u}),n[27](s),s.$on("save",n[28]),{c(){B(e.$$.fragment),i=D(),B(s.$$.fragment)},m(f,d){z(e,f,d),S(f,i,d),z(s,f,d),l=!0},p(f,d){const p=d[0]&1026?Et(o,[d[0]&2&&{key:f[1]},d[0]&1024&&Qt(f[10])]):{};d[0]&255|d[1]&24&&(p.$$scope={dirty:d,ctx:f}),!t&&d[0]&1&&(t=!0,p.field=f[0],ye(()=>t=!1)),e.$set(p);const h={};s.$set(h)},i(f){l||(I(e.$$.fragment,f),I(s.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),P(s.$$.fragment,f),l=!1},d(f){H(e,f),f&&w(i),n[27](null),H(s,f)}}}function r4(n,e,t){var Q;let i;const s=["field","key"];let l=tt(e,s),o,r;Ze(n,di,se=>t(3,o=se)),Ze(n,fi,se=>t(7,r=se));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],d=[{label:"False",value:!1},{label:"True",value:!0}],p=["id","created","updated"],h=["username","email","emailVisibility","verified"];let g=null,_=[],b=null,k=((Q=a.options)==null?void 0:Q.maxSelect)==1,$=k;function C(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]},a),t(2,k=!0),t(12,$=k)}function T(){var se,ve;if(t(5,_=p.slice(0)),!!i){i.isAuth&&t(5,_=_.concat(h));for(const $e of i.schema)_.push($e.name);if(((ve=(se=a.options)==null?void 0:se.displayFields)==null?void 0:ve.length)>0)for(let $e=a.options.displayFields.length-1;$e>=0;$e--)_.includes(a.options.displayFields[$e])||a.options.displayFields.splice($e,1)}}function E(){a.options.minSelect=mt(this.value),t(0,a),t(12,$),t(2,k)}function M(){a.options.maxSelect=mt(this.value),t(0,a),t(12,$),t(2,k)}function O(se){n.$$.not_equal(a.options.displayFields,se)&&(a.options.displayFields=se,t(0,a),t(12,$),t(2,k))}function A(se){n.$$.not_equal(a.options.cascadeDelete,se)&&(a.options.cascadeDelete=se,t(0,a),t(12,$),t(2,k))}const L=()=>g==null?void 0:g.show();function N(se){n.$$.not_equal(a.options.collectionId,se)&&(a.options.collectionId=se,t(0,a),t(12,$),t(2,k))}function q(se){k=se,t(2,k)}function R(se){a=se,t(0,a),t(12,$),t(2,k)}function F(se){me.call(this,n,se)}function j(se){me.call(this,n,se)}function V(se){me.call(this,n,se)}function W(se){me.call(this,n,se)}function te(se){me.call(this,n,se)}function X(se){me.call(this,n,se)}function G(se){ne[se?"unshift":"push"](()=>{g=se,t(4,g)})}const ae=se=>{var ve,$e;($e=(ve=se==null?void 0:se.detail)==null?void 0:ve.collection)!=null&&$e.id&&t(0,a.options.collectionId=se.detail.collection.id,a)};return n.$$set=se=>{e=je(je({},e),Gt(se)),t(10,l=tt(e,s)),"field"in se&&t(0,a=se.field),"key"in se&&t(1,u=se.key)},n.$$.update=()=>{n.$$.dirty[0]&4100&&$!=k&&(t(12,$=k),k?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty[0]&1&&U.isEmpty(a.options)&&C(),n.$$.dirty[0]&9&&t(6,i=o.find(se=>se.id==a.options.collectionId)||null),n.$$.dirty[0]&2049&&b!=a.options.collectionId&&(t(11,b=a.options.collectionId),T())},[a,u,k,o,g,_,i,r,f,d,l,b,$,E,M,O,A,L,N,q,R,F,j,V,W,te,X,G,ae]}class a4 extends be{constructor(e){super(),ge(this,e,r4,o4,_e,{field:0,key:1},null,[-1,-1])}}function Ed(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Od(n){let e,t,i,s,l,o,r,a;return{c(){e=Y(`, + `),t=y("code"),t.textContent="username",i=Y(` , + `),s=y("code"),s.textContent="email",l=Y(` , + `),o=y("code"),o.textContent="emailVisibility",r=Y(` , + `),a=y("code"),a.textContent="verified",m(t,"class","txt-sm"),m(s,"class","txt-sm"),m(o,"class","txt-sm"),m(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function Dd(n,e){let t,i,s,l,o;function r(h){e[7](h,e[17],e[18],e[19])}function a(){return e[8](e[19])}function u(...h){return e[10](e[19],...h)}function f(...h){return e[11](e[19],...h)}var d=e[1][e[17].type];function p(h){let g={key:h[4](h[17])};return h[17]!==void 0&&(g.field=h[17]),{props:g}}return d&&(i=Rt(d,p(e)),ne.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f)),{key:n,first:null,c(){t=Se(),i&&B(i.$$.fragment),l=Se(),this.first=t},m(h,g){S(h,t,g),i&&z(i,h,g),S(h,l,g),o=!0},p(h,g){e=h;const _={};if(g&1&&(_.key=e[4](e[17])),!s&&g&1&&(s=!0,_.field=e[17],ye(()=>s=!1)),g&1&&d!==(d=e[1][e[17].type])){if(i){ue();const b=i;P(b.$$.fragment,1,0,()=>{H(b,1)}),fe()}d?(i=Rt(d,p(e)),ne.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f),B(i.$$.fragment),I(i.$$.fragment,1),z(i,l.parentNode,l)):i=null}else d&&i.$set(_)},i(h){o||(i&&I(i.$$.fragment,h),o=!0)},o(h){i&&P(i.$$.fragment,h),o=!1},d(h){h&&w(t),h&&w(l),i&&H(i,h)}}}function u4(n){let e,t,i,s,l,o,r,a,u,f,d,p,h=[],g=new Map,_,b,k,$,C,T,E,M,O=n[0].$isAuth&&Od(),A=n[0].schema;const L=R=>R[17];for(let R=0;Rhe(T,"collection",N)),{c(){e=y("div"),t=y("p"),i=Y(`System fields: + `),s=y("code"),s.textContent="id",l=Y(` , + `),o=y("code"),o.textContent="created",r=Y(` , + `),a=y("code"),a.textContent="updated",u=D(),O&&O.c(),f=Y(` + .`),d=D(),p=y("div");for(let R=0;RE=!1)),T.$set(j)},i(R){if(!M){for(let F=0;FE.name===T)}function f(T){return i.findIndex(E=>E===T)}function d(T,E){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||T===E||!E||t(0,s.indexes=s.indexes.map(O=>U.replaceIndexColumn(O,T,E)),s)}function p(T,E){if(!T)return;T.dataTransfer.dropEffect="move";const M=parseInt(T.dataTransfer.getData("text/plain")),O=s.schema;Mo(T),_=T=>d(T.detail.oldName,T.detail.newName),b=(T,E)=>f4(E.detail,T),k=(T,E)=>p(E.detail,T),$=T=>r(T.detail);function C(T){s=T,t(0,s)}return n.$$set=T=>{"collection"in T&&t(0,s=T.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new kn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter(T=>!T.toDelete)||[])},[s,l,o,r,f,d,p,h,g,_,b,k,$,C]}class d4 extends be{constructor(e){super(),ge(this,e,c4,u4,_e,{collection:0})}}const p4=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]}),m4=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]}),h4=n=>({isAdminOnly:n&512}),Ld=n=>({isAdminOnly:n[9]});function _4(n){let e,t;return e=new pe({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[b4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function g4(n){let e;return{c(){e=y("div"),e.innerHTML='',m(e,"class","txt-center")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function Pd(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Set Admins only`,m(e,"type","button"),m(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function Fd(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=`Unlock and set custom rule +
    `,m(e,"type","button"),m(e,"class","unlock-overlay svelte-1akuazq"),m(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:ee,i(o){i||(o&&et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Jt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function b4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,d,p,h,g,_,b,k,$;const C=n[12].beforeLabel,T=kt(C,n,n[15],Ld),E=n[12].afterLabel,M=kt(E,n,n[15],Id);let O=!n[9]&&Pd(n);function A(j){n[14](j)}var L=n[7];function N(j){let V={id:j[18],baseCollection:j[1],disabled:j[9],placeholder:j[9]?"":j[5]};return j[0]!==void 0&&(V.value=j[0]),{props:V}}L&&(h=Rt(L,N(n)),n[13](h),ne.push(()=>he(h,"value",A)));let q=n[9]&&Fd(n);const R=n[12].default,F=kt(R,n,n[15],Ad);return{c(){e=y("div"),t=y("label"),T&&T.c(),i=D(),s=y("span"),l=Y(n[2]),o=D(),a=Y(r),u=D(),M&&M.c(),f=D(),O&&O.c(),p=D(),h&&B(h.$$.fragment),_=D(),q&&q.c(),b=D(),k=y("div"),F&&F.c(),m(s,"class","txt"),x(s,"txt-hint",n[9]),m(t,"for",d=n[18]),m(e,"class","input-wrapper svelte-1akuazq"),m(k,"class","help-block")},m(j,V){S(j,e,V),v(e,t),T&&T.m(t,null),v(t,i),v(t,s),v(s,l),v(s,o),v(s,a),v(t,u),M&&M.m(t,null),v(t,f),O&&O.m(t,null),v(e,p),h&&z(h,e,null),v(e,_),q&&q.m(e,null),S(j,b,V),S(j,k,V),F&&F.m(k,null),$=!0},p(j,V){T&&T.p&&(!$||V&33280)&&St(T,C,j,j[15],$?wt(C,j[15],V,h4):$t(j[15]),Ld),(!$||V&4)&&le(l,j[2]),(!$||V&512)&&r!==(r=j[9]?"- Admins only":"")&&le(a,r),(!$||V&512)&&x(s,"txt-hint",j[9]),M&&M.p&&(!$||V&33280)&&St(M,E,j,j[15],$?wt(E,j[15],V,m4):$t(j[15]),Id),j[9]?O&&(O.d(1),O=null):O?O.p(j,V):(O=Pd(j),O.c(),O.m(t,null)),(!$||V&262144&&d!==(d=j[18]))&&m(t,"for",d);const W={};if(V&262144&&(W.id=j[18]),V&2&&(W.baseCollection=j[1]),V&512&&(W.disabled=j[9]),V&544&&(W.placeholder=j[9]?"":j[5]),!g&&V&1&&(g=!0,W.value=j[0],ye(()=>g=!1)),V&128&&L!==(L=j[7])){if(h){ue();const te=h;P(te.$$.fragment,1,0,()=>{H(te,1)}),fe()}L?(h=Rt(L,N(j)),j[13](h),ne.push(()=>he(h,"value",A)),B(h.$$.fragment),I(h.$$.fragment,1),z(h,e,_)):h=null}else L&&h.$set(W);j[9]?q?(q.p(j,V),V&512&&I(q,1)):(q=Fd(j),q.c(),I(q,1),q.m(e,null)):q&&(ue(),P(q,1,1,()=>{q=null}),fe()),F&&F.p&&(!$||V&33280)&&St(F,R,j,j[15],$?wt(R,j[15],V,p4):$t(j[15]),Ad)},i(j){$||(I(T,j),I(M,j),h&&I(h.$$.fragment,j),I(q),I(F,j),$=!0)},o(j){P(T,j),P(M,j),h&&P(h.$$.fragment,j),P(q),P(F,j),$=!1},d(j){j&&w(e),T&&T.d(j),M&&M.d(j),O&&O.d(),n[13](null),h&&H(h),q&&q.d(),j&&w(b),j&&w(k),F&&F.d(j)}}}function v4(n){let e,t,i,s;const l=[g4,_4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ue(),P(o[f],1,1,()=>{o[f]=null}),fe(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),I(t,1),t.m(i.parentNode,i))},i(a){s||(I(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Nd;function y4(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,h=null,g=Nd,_=!1;b();async function b(){g||_||(t(8,_=!0),t(7,g=(await ut(()=>import("./FilterAutocompleteInput-e9273c93.js"),["./FilterAutocompleteInput-e9273c93.js","./index-03b6b7de.js"],import.meta.url)).default),Nd=g,t(8,_=!1))}async function k(){t(0,r=h||""),await cn(),p==null||p.focus()}async function $(){h=r,t(0,r=null)}function C(E){ne[E?"unshift":"push"](()=>{p=E,t(6,p)})}function T(E){r=E,t(0,r)}return n.$$set=E=>{"collection"in E&&t(1,o=E.collection),"rule"in E&&t(0,r=E.rule),"label"in E&&t(2,a=E.label),"formKey"in E&&t(3,u=E.formKey),"required"in E&&t(4,f=E.required),"placeholder"in E&&t(5,d=E.placeholder),"$$scope"in E&&t(15,l=E.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,g,_,i,k,$,s,C,T,l]}class Os extends be{constructor(e){super(),ge(this,e,y4,v4,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Rd(n,e,t){const i=n.slice();return i[11]=e[t],i}function qd(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O,A,L=n[2],N=[];for(let q=0;q@request filter:",d=D(),p=y("div"),p.innerHTML=`@request.headers.* + @request.query.* + @request.data.* + @request.auth.*`,h=D(),g=y("hr"),_=D(),b=y("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=D(),$=y("div"),$.innerHTML="@collection.ANY_COLLECTION_NAME.*",C=D(),T=y("hr"),E=D(),M=y("p"),M.innerHTML=`Example rule: +
    + @request.auth.id != "" && created > "2022-01-01 00:00:00"`,m(s,"class","m-b-0"),m(o,"class","inline-flex flex-gap-5"),m(a,"class","m-t-10 m-b-5"),m(f,"class","m-b-0"),m(p,"class","inline-flex flex-gap-5"),m(g,"class","m-t-10 m-b-5"),m(b,"class","m-b-0"),m($,"class","inline-flex flex-gap-5"),m(T,"class","m-t-10 m-b-5"),m(i,"class","content"),m(t,"class","alert alert-warning m-0")},m(q,R){S(q,e,R),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o);for(let F=0;F{A&&(O||(O=Ve(e,rt,{duration:150},!0)),O.run(1))}),A=!0)},o(q){q&&(O||(O=Ve(e,rt,{duration:150},!1)),O.run(0)),A=!1},d(q){q&&w(e),pt(N,q),q&&O&&O.end()}}}function jd(n){let e,t=n[11]+"",i;return{c(){e=y("code"),i=Y(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&le(i,t)},d(s){s&&w(e)}}}function Vd(n){let e,t,i,s,l,o,r,a,u;function f(b){n[6](b)}let d={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[k4,({isAdminOnly:b})=>({10:b}),({isAdminOnly:b})=>b?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(d.rule=n[0].createRule),e=new Os({props:d}),ne.push(()=>he(e,"rule",f));function p(b){n[7](b)}let h={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(h.rule=n[0].updateRule),s=new Os({props:h}),ne.push(()=>he(s,"rule",p));function g(b){n[8](b)}let _={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(_.rule=n[0].deleteRule),r=new Os({props:_}),ne.push(()=>he(r,"rule",g)),{c(){B(e.$$.fragment),i=D(),B(s.$$.fragment),o=D(),B(r.$$.fragment)},m(b,k){z(e,b,k),S(b,i,k),z(s,b,k),S(b,o,k),z(r,b,k),u=!0},p(b,k){const $={};k&1&&($.collection=b[0]),k&17408&&($.$$scope={dirty:k,ctx:b}),!t&&k&1&&(t=!0,$.rule=b[0].createRule,ye(()=>t=!1)),e.$set($);const C={};k&1&&(C.collection=b[0]),!l&&k&1&&(l=!0,C.rule=b[0].updateRule,ye(()=>l=!1)),s.$set(C);const T={};k&1&&(T.collection=b[0]),!a&&k&1&&(a=!0,T.rule=b[0].deleteRule,ye(()=>a=!1)),r.$set(T)},i(b){u||(I(e.$$.fragment,b),I(s.$$.fragment,b),I(r.$$.fragment,b),u=!0)},o(b){P(e.$$.fragment,b),P(s.$$.fragment,b),P(r.$$.fragment,b),u=!1},d(b){H(e,b),b&&w(i),H(s,b),b&&w(o),H(r,b)}}}function zd(n){let e,t,i;return{c(){e=y("i"),m(e,"class","ri-information-line link-hint")},m(s,l){S(s,e,l),t||(i=Oe(Be.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&w(e),t=!1,i()}}}function k4(n){let e,t=!n[10]&&zd();return{c(){t&&t.c(),e=Se()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=zd(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&w(e)}}}function Hd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[w4]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Os({props:l}),ne.push(()=>he(e,"rule",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function w4(n){let e,t,i;return{c(){e=y("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. + changing the password without requiring to enter the old one, directly updating the verified + state or email, etc.`,t=D(),i=y("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:ee,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function S4(n){var R,F;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,d,p,h,g,_,b,k,$,C,T,E=n[1]&&qd(n);function M(j){n[4](j)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),f=new Os({props:O}),ne.push(()=>he(f,"rule",M));function A(j){n[5](j)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),h=new Os({props:L}),ne.push(()=>he(h,"rule",A));let N=!((R=n[0])!=null&&R.$isView)&&Vd(n),q=((F=n[0])==null?void 0:F.$isAuth)&&Hd(n);return{c(){e=y("div"),t=y("div"),i=y("p"),i.innerHTML=`All rules follow the +
    PocketBase filter syntax and operators + .`,s=D(),l=y("button"),r=Y(o),a=D(),E&&E.c(),u=D(),B(f.$$.fragment),p=D(),B(h.$$.fragment),_=D(),N&&N.c(),b=D(),q&&q.c(),k=Se(),m(l,"type","button"),m(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),m(t,"class","flex txt-sm txt-hint m-b-5"),m(e,"class","block m-b-sm handle")},m(j,V){S(j,e,V),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),E&&E.m(e,null),S(j,u,V),z(f,j,V),S(j,p,V),z(h,j,V),S(j,_,V),N&&N.m(j,V),S(j,b,V),q&&q.m(j,V),S(j,k,V),$=!0,C||(T=J(l,"click",n[3]),C=!0)},p(j,[V]){var X,G;(!$||V&2)&&o!==(o=j[1]?"Hide available fields":"Show available fields")&&le(r,o),j[1]?E?(E.p(j,V),V&2&&I(E,1)):(E=qd(j),E.c(),I(E,1),E.m(e,null)):E&&(ue(),P(E,1,1,()=>{E=null}),fe());const W={};V&1&&(W.collection=j[0]),!d&&V&1&&(d=!0,W.rule=j[0].listRule,ye(()=>d=!1)),f.$set(W);const te={};V&1&&(te.collection=j[0]),!g&&V&1&&(g=!0,te.rule=j[0].viewRule,ye(()=>g=!1)),h.$set(te),(X=j[0])!=null&&X.$isView?N&&(ue(),P(N,1,1,()=>{N=null}),fe()):N?(N.p(j,V),V&1&&I(N,1)):(N=Vd(j),N.c(),I(N,1),N.m(b.parentNode,b)),(G=j[0])!=null&&G.$isAuth?q?(q.p(j,V),V&1&&I(q,1)):(q=Hd(j),q.c(),I(q,1),q.m(k.parentNode,k)):q&&(ue(),P(q,1,1,()=>{q=null}),fe())},i(j){$||(I(E),I(f.$$.fragment,j),I(h.$$.fragment,j),I(N),I(q),$=!0)},o(j){P(E),P(f.$$.fragment,j),P(h.$$.fragment,j),P(N),P(q),$=!1},d(j){j&&w(e),E&&E.d(),j&&w(u),H(f,j),j&&w(p),H(h,j),j&&w(_),N&&N.d(j),j&&w(b),q&&q.d(j),j&&w(k),C=!1,T()}}}function $4(n,e,t){let i,{collection:s=new kn}=e,l=!1;const o=()=>t(1,l=!l);function r(h){n.$$.not_equal(s.listRule,h)&&(s.listRule=h,t(0,s))}function a(h){n.$$.not_equal(s.viewRule,h)&&(s.viewRule=h,t(0,s))}function u(h){n.$$.not_equal(s.createRule,h)&&(s.createRule=h,t(0,s))}function f(h){n.$$.not_equal(s.updateRule,h)&&(s.updateRule=h,t(0,s))}function d(h){n.$$.not_equal(s.deleteRule,h)&&(s.deleteRule=h,t(0,s))}function p(h){n.$$.not_equal(s.options.manageRule,h)&&(s.options.manageRule=h,t(0,s))}return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=U.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,d,p]}class T4 extends be{constructor(e){super(),ge(this,e,$4,S4,_e,{collection:0})}}function Bd(n,e,t){const i=n.slice();return i[9]=e[t],i}function C4(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=Rt(o,r(n)),ne.push(()=>he(e,"value",l)),e.$on("change",n[6])),{c(){e&&B(e.$$.fragment),i=Se()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,ye(()=>t=!1)),u&2&&o!==(o=a[1])){if(e){ue();const d=e;P(d.$$.fragment,1,0,()=>{H(d,1)}),fe()}o?(e=Rt(o,r(a)),ne.push(()=>he(e,"value",l)),e.$on("change",a[6]),B(e.$$.fragment),I(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&I(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function M4(n){let e;return{c(){e=y("textarea"),e.disabled=!0,m(e,"rows","7"),m(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function Ud(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • +
  • The query must have a unique id column. +
    + If your query doesn't have a suitable one, you can use the universal + (ROW_NUMBER() OVER()) as id.
  • +
  • Expressions must be aliased with a valid formatted field name (eg. + MAX(balance) as maxBalance).
  • `,u=D(),_&&_.c(),f=Se(),m(t,"class","txt"),m(e,"for",i=n[8]),m(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),h[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),_&&_.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&m(e,"for",i);let $=l;l=g(b),l===$?h[l].p(b,k):(ue(),P(h[$],1,1,()=>{h[$]=null}),fe(),o=h[l],o?o.p(b,k):(o=h[l]=p[l](b),o.c()),I(o,1),o.m(r.parentNode,r)),b[3].length?_?_.p(b,k):(_=Ud(b),_.c(),_.m(f.parentNode,f)):_&&(_.d(1),_=null)},i(b){d||(I(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),h[l].d(b),b&&w(r),b&&w(a),b&&w(u),_&&_.d(b),b&&w(f)}}}function O4(n){let e,t;return e=new pe({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[E4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function D4(n,e,t){let i;Ze(n,Ti,d=>t(4,i=d));let{collection:s=new kn}=e,l,o=!1,r=[];function a(d){var g;t(3,r=[]);const p=U.getNestedVal(d,"schema",null);if(U.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const h=U.extractColumnsFromQuery((g=s==null?void 0:s.options)==null?void 0:g.query);U.removeByValue(h,"id"),U.removeByValue(h,"created"),U.removeByValue(h,"updated");for(let _ in p)for(let b in p[_]){const k=p[_][b].message,$=h[_]||_;r.push(U.sentenize($+": "+k))}}Xt(async()=>{t(2,o=!0);try{t(1,l=(await ut(()=>import("./CodeEditor-761096ff.js"),["./CodeEditor-761096ff.js","./index-03b6b7de.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&ui("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class A4 extends be{constructor(e){super(),ge(this,e,D4,O4,_e,{collection:0})}}const I4=n=>({active:n&1}),Yd=n=>({active:n[0]});function Kd(n){let e,t,i;const s=n[15].default,l=kt(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),m(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&St(l,s,o,o[14],i?wt(s,o[14],r,null):$t(o[14]),null)},i(o){i||(I(l,o),o&&et(()=>{i&&(t||(t=Ve(e,rt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=Ve(e,rt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function L4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=kt(a,n,n[14],Yd);let f=n[0]&&Kd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=D(),f&&f.c(),m(t,"type","button"),m(t,"class","accordion-header"),m(t,"draggable",n[2]),x(t,"interactive",n[3]),m(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",xe(n[17])),J(t,"drop",xe(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",xe(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&St(u,a,d,d[14],l?wt(a,d[14],p,I4):$t(d[14]),Yd),(!l||p&4)&&m(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&I(f,1)):(f=Kd(d),f.c(),I(f,1),f.m(e,null)):f&&(ue(),P(f,1,1,()=>{f=null}),fe()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&m(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(I(u,d),I(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,De(r)}}}function P4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,h=!1;function g(){return!!f}function _(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():_()}function $(){if(p&&o.closest(".accordions")){const N=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const q of N)q.click()}}Xt(()=>()=>clearTimeout(r));function C(N){me.call(this,n,N)}const T=()=>d&&k(),E=N=>{u&&(t(7,h=!1),$(),l("drop",N))},M=N=>u&&l("dragstart",N),O=N=>{u&&(t(7,h=!0),l("dragenter",N))},A=N=>{u&&(t(7,h=!1),l("dragleave",N))};function L(N){ne[N?"unshift":"push"](()=>{o=N,t(6,o)})}return n.$$set=N=>{"class"in N&&t(1,a=N.class),"draggable"in N&&t(2,u=N.draggable),"active"in N&&t(0,f=N.active),"interactive"in N&&t(3,d=N.interactive),"single"in N&&t(9,p=N.single),"$$scope"in N&&t(14,s=N.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,h,l,p,g,_,b,r,s,i,C,T,E,M,O,A,L]}class co extends be{constructor(e){super(),ge(this,e,P4,L4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function F4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Enable"),m(e,"type","checkbox"),m(e,"id",t=n[12]),m(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&m(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function N4(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[F4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function R4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",m(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function q4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",m(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jd(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Oe(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=Ve(e,Jt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function j4(n){let e,t,i,s,l,o,r;function a(p,h){return p[0].options.allowUsernameAuth?q4:R4}let u=a(n),f=u(n),d=n[3]&&Jd();return{c(){e=y("div"),e.innerHTML=` + Username/Password`,t=D(),i=y("div"),s=D(),f.c(),l=D(),d&&d.c(),o=Se(),m(e,"class","inline-flex"),m(i,"class","flex-fill")},m(p,h){S(p,e,h),S(p,t,h),S(p,i,h),S(p,s,h),f.m(p,h),S(p,l,h),d&&d.m(p,h),S(p,o,h),r=!0},p(p,h){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[3]?d?h&8&&I(d,1):(d=Jd(),d.c(),I(d,1),d.m(o.parentNode,o)):d&&(ue(),P(d,1,1,()=>{d=null}),fe())},i(p){r||(I(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function V4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Enable"),m(e,"type","checkbox"),m(e,"id",t=n[12]),m(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&m(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Zd(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field "+(U.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[z4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field "+(U.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[H4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),m(t,"class","col-lg-6"),m(l,"class","col-lg-6"),m(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),a=!0},p(u,f){const d={};f&1&&(d.class="form-field "+(U.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(U.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(I(i.$$.fragment,u),I(o.$$.fragment,u),u&&et(()=>{a&&(r||(r=Ve(e,rt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=Ve(e,rt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),H(i),H(o),u&&r&&r.end()}}}function z4(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;function g(b){n[7](b)}let _={id:n[12],disabled:!U.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(_.value=n[0].options.exceptEmailDomains),r=new zs({props:_}),ne.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=D(),s=y("i"),o=D(),B(r.$$.fragment),u=D(),f=y("div"),f.textContent="Use comma as separator.",m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[12]),m(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(h=Oe(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. + This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&m(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!U.isEmpty(b[0].options.onlyEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptEmailDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(I(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),p=!1,h()}}}function H4(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;function g(b){n[8](b)}let _={id:n[12],disabled:!U.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(_.value=n[0].options.onlyEmailDomains),r=new zs({props:_}),ne.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=D(),s=y("i"),o=D(),B(r.$$.fragment),u=D(),f=y("div"),f.textContent="Use comma as separator.",m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[12]),m(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(h=Oe(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up. + This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&m(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!U.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyEmailDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(I(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),p=!1,h()}}}function B4(n){let e,t,i,s;e=new pe({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[V4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Zd(n);return{c(){B(e.$$.fragment),t=D(),l&&l.c(),i=Se()},m(o,r){z(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&I(l,1)):(l=Zd(o),l.c(),I(l,1),l.m(i.parentNode,i)):l&&(ue(),P(l,1,1,()=>{l=null}),fe())},i(o){s||(I(e.$$.fragment,o),I(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function U4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",m(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function W4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",m(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gd(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Oe(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=Ve(e,Jt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Y4(n){let e,t,i,s,l,o,r;function a(p,h){return p[0].options.allowEmailAuth?W4:U4}let u=a(n),f=u(n),d=n[2]&&Gd();return{c(){e=y("div"),e.innerHTML=` + Email/Password`,t=D(),i=y("div"),s=D(),f.c(),l=D(),d&&d.c(),o=Se(),m(e,"class","inline-flex"),m(i,"class","flex-fill")},m(p,h){S(p,e,h),S(p,t,h),S(p,i,h),S(p,s,h),f.m(p,h),S(p,l,h),d&&d.m(p,h),S(p,o,h),r=!0},p(p,h){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[2]?d?h&4&&I(d,1):(d=Gd(),d.c(),I(d,1),d.m(o.parentNode,o)):d&&(ue(),P(d,1,1,()=>{d=null}),fe())},i(p){r||(I(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function K4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Enable"),m(e,"type","checkbox"),m(e,"id",t=n[12]),m(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&m(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Xd(n){let e,t,i;return{c(){e=y("div"),e.innerHTML='',m(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&et(()=>{i&&(t||(t=Ve(e,rt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Ve(e,rt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function J4(n){let e,t,i,s;e=new pe({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[K4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Xd();return{c(){B(e.$$.fragment),t=D(),l&&l.c(),i=Se()},m(o,r){z(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&I(l,1):(l=Xd(),l.c(),I(l,1),l.m(i.parentNode,i)):l&&(ue(),P(l,1,1,()=>{l=null}),fe())},i(o){s||(I(e.$$.fragment,o),I(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function Z4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",m(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function G4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",m(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Qd(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Oe(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=Ve(e,Jt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function X4(n){let e,t,i,s,l,o,r;function a(p,h){return p[0].options.allowOAuth2Auth?G4:Z4}let u=a(n),f=u(n),d=n[1]&&Qd();return{c(){e=y("div"),e.innerHTML=` + OAuth2`,t=D(),i=y("div"),s=D(),f.c(),l=D(),d&&d.c(),o=Se(),m(e,"class","inline-flex"),m(i,"class","flex-fill")},m(p,h){S(p,e,h),S(p,t,h),S(p,i,h),S(p,s,h),f.m(p,h),S(p,l,h),d&&d.m(p,h),S(p,o,h),r=!0},p(p,h){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[1]?d?h&2&&I(d,1):(d=Qd(),d.c(),I(d,1),d.m(o.parentNode,o)):d&&(ue(),P(d,1,1,()=>{d=null}),fe())},i(p){r||(I(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function Q4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Minimum password length"),s=D(),l=y("input"),m(e,"for",i=n[12]),m(l,"type","number"),m(l,"id",o=n[12]),l.required=!0,m(l,"min","6"),m(l,"max","72")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].options.minPasswordLength),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&m(e,"for",i),f&4096&&o!==(o=u[12])&&m(l,"id",o),f&1&&mt(l.value)!==u[0].options.minPasswordLength&&re(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function x4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=D(),s=y("label"),l=y("span"),l.textContent="Always require email",o=D(),r=y("i"),m(e,"type","checkbox"),m(e,"id",t=n[12]),m(l,"class","txt"),m(r,"class","ri-information-line txt-sm link-hint"),m(s,"for",a=n[12])},m(d,p){S(d,e,p),e.checked=n[0].options.requireEmail,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),Oe(Be.call(null,r,{text:`The constraint is applied only for new records. +Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(d,p){p&4096&&t!==(t=d[12])&&m(e,"id",t),p&1&&(e.checked=d[0].options.requireEmail),p&4096&&a!==(a=d[12])&&m(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function eM(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k;return s=new co({props:{single:!0,$$slots:{header:[j4],default:[N4]},$$scope:{ctx:n}}}),o=new co({props:{single:!0,$$slots:{header:[Y4],default:[B4]},$$scope:{ctx:n}}}),a=new co({props:{single:!0,$$slots:{header:[X4],default:[J4]},$$scope:{ctx:n}}}),g=new pe({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[Q4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),b=new pe({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[x4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("h4"),e.textContent="Auth methods",t=D(),i=y("div"),B(s.$$.fragment),l=D(),B(o.$$.fragment),r=D(),B(a.$$.fragment),u=D(),f=y("hr"),d=D(),p=y("h4"),p.textContent="General",h=D(),B(g.$$.fragment),_=D(),B(b.$$.fragment),m(e,"class","section-title"),m(i,"class","accordions"),m(p,"class","section-title")},m($,C){S($,e,C),S($,t,C),S($,i,C),z(s,i,null),v(i,l),z(o,i,null),v(i,r),z(a,i,null),S($,u,C),S($,f,C),S($,d,C),S($,p,C),S($,h,C),z(g,$,C),S($,_,C),z(b,$,C),k=!0},p($,[C]){const T={};C&8201&&(T.$$scope={dirty:C,ctx:$}),s.$set(T);const E={};C&8197&&(E.$$scope={dirty:C,ctx:$}),o.$set(E);const M={};C&8195&&(M.$$scope={dirty:C,ctx:$}),a.$set(M);const O={};C&12289&&(O.$$scope={dirty:C,ctx:$}),g.$set(O);const A={};C&12289&&(A.$$scope={dirty:C,ctx:$}),b.$set(A)},i($){k||(I(s.$$.fragment,$),I(o.$$.fragment,$),I(a.$$.fragment,$),I(g.$$.fragment,$),I(b.$$.fragment,$),k=!0)},o($){P(s.$$.fragment,$),P(o.$$.fragment,$),P(a.$$.fragment,$),P(g.$$.fragment,$),P(b.$$.fragment,$),k=!1},d($){$&&w(e),$&&w(t),$&&w(i),H(s),H(o),H(a),$&&w(u),$&&w(f),$&&w(d),$&&w(p),$&&w(h),H(g,$),$&&w(_),H(b,$)}}}function tM(n,e,t){let i,s,l,o;Ze(n,Ti,_=>t(4,o=_));let{collection:r=new kn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(_){n.$$.not_equal(r.options.exceptEmailDomains,_)&&(r.options.exceptEmailDomains=_,t(0,r))}function d(_){n.$$.not_equal(r.options.onlyEmailDomains,_)&&(r.options.onlyEmailDomains=_,t(0,r))}function p(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=mt(this.value),t(0,r)}function g(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=_=>{"collection"in _&&t(0,r=_.collection)},n.$$.update=()=>{var _,b,k,$;n.$$.dirty&1&&r.$isAuth&&U.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!U.isEmpty((_=o==null?void 0:o.options)==null?void 0:_.allowEmailAuth)||!U.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!U.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!U.isEmpty(($=o==null?void 0:o.options)==null?void 0:$.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,d,p,h,g]}class nM extends be{constructor(e){super(),ge(this,e,tM,eM,_e,{collection:0})}}function xd(n,e,t){const i=n.slice();return i[17]=e[t],i}function ep(n,e,t){const i=n.slice();return i[17]=e[t],i}function tp(n,e,t){const i=n.slice();return i[17]=e[t],i}function np(n){let e;return{c(){e=y("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ip(n){var r;let e,t,i,s,l=n[3]&&sp(n),o=!((r=n[2])!=null&&r.$isView)&&lp(n);return{c(){e=y("h6"),e.textContent="Changes:",t=D(),i=y("ul"),l&&l.c(),s=D(),o&&o.c(),m(i,"class","changes-list svelte-xqpcsf")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),l&&l.m(i,null),v(i,s),o&&o.m(i,null)},p(a,u){var f;a[3]?l?l.p(a,u):(l=sp(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[2])!=null&&f.$isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=lp(a),o.c(),o.m(i,null))},d(a){a&&w(e),a&&w(t),a&&w(i),l&&l.d(),o&&o.d()}}}function sp(n){var h,g;let e,t,i,s,l=((h=n[1])==null?void 0:h.name)+"",o,r,a,u,f,d=((g=n[2])==null?void 0:g.name)+"",p;return{c(){e=y("li"),t=y("div"),i=Y(`Renamed collection + `),s=y("strong"),o=Y(l),r=D(),a=y("i"),u=D(),f=y("strong"),p=Y(d),m(s,"class","txt-strikethrough txt-hint"),m(a,"class","ri-arrow-right-line txt-sm"),m(f,"class","txt"),m(t,"class","inline-flex"),m(e,"class","svelte-xqpcsf")},m(_,b){S(_,e,b),v(e,t),v(t,i),v(t,s),v(s,o),v(t,r),v(t,a),v(t,u),v(t,f),v(f,p)},p(_,b){var k,$;b&2&&l!==(l=((k=_[1])==null?void 0:k.name)+"")&&le(o,l),b&4&&d!==(d=(($=_[2])==null?void 0:$.name)+"")&&le(p,d)},d(_){_&&w(e)}}}function lp(n){let e,t,i,s=n[5],l=[];for(let f=0;f
    ',i=D(),s=y("div"),l=y("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, + you'll have to update it manually!`,o=D(),u&&u.c(),r=D(),f&&f.c(),a=Se(),m(t,"class","icon"),m(s,"class","content txt-bold"),m(e,"class","alert alert-warning")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),u&&u.m(s,null),S(d,r,p),f&&f.m(d,p),S(d,a,p)},p(d,p){d[6].length?u||(u=np(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),d[8]?f?f.p(d,p):(f=ip(d),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(d){d&&w(e),u&&u.d(),d&&w(r),f&&f.d(d),d&&w(a)}}}function sM(n){let e;return{c(){e=y("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function lM(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Cancel',t=D(),i=y("button"),i.innerHTML='Confirm',e.autofocus=!0,m(e,"type","button"),m(e,"class","btn btn-transparent"),m(i,"type","button"),m(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,De(l)}}}function oM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[lM],header:[sM],default:[iM]},$$scope:{ctx:n}};return e=new on({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[13](null),H(e,s)}}}function rM(n,e,t){let i,s,l,o,r;const a=Tt();let u,f,d;async function p(T,E){t(1,f=T),t(2,d=E),await cn(),i||s.length||l.length||o.length?u==null||u.show():g()}function h(){u==null||u.hide()}function g(){h(),a("confirm")}const _=()=>h(),b=()=>g();function k(T){ne[T?"unshift":"push"](()=>{u=T,t(4,u)})}function $(T){me.call(this,n,T)}function C(T){me.call(this,n,T)}return n.$$.update=()=>{var T,E,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(7,s=((T=d==null?void 0:d.schema)==null?void 0:T.filter(O=>O.id&&!O.toDelete&&O.originalName!=O.name))||[]),n.$$.dirty&4&&t(6,l=((E=d==null?void 0:d.schema)==null?void 0:E.filter(O=>O.id&&O.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(O=>{var L,N,q;const A=(L=f==null?void 0:f.schema)==null?void 0:L.find(R=>R.id==O.id);return A?((N=A.options)==null?void 0:N.maxSelect)!=1&&((q=O.options)==null?void 0:q.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(d!=null&&d.$isView)||i)},[h,f,d,i,u,o,l,s,r,g,p,_,b,k,$,C]}class aM extends be{constructor(e){super(),ge(this,e,rM,oM,_e,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function up(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function uM(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new d4({props:l}),ne.push(()=>he(e,"collection",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fM(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new A4({props:l}),ne.push(()=>he(e,"collection",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fp(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new T4({props:o}),ne.push(()=>he(t,"collection",l)),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","tab-item active")},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ye(()=>i=!1)),t.$set(u)},i(r){s||(I(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function cp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new nM({props:o}),ne.push(()=>he(t,"collection",l)),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","tab-item"),x(e,"active",n[3]===Ns)},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ye(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Ns)},i(r){s||(I(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function cM(n){let e,t,i,s,l,o,r;const a=[fM,uM],u=[];function f(h,g){return h[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let d=n[3]===wl&&fp(n),p=n[2].$isAuth&&cp(n);return{c(){e=y("div"),t=y("div"),s.c(),l=D(),d&&d.c(),o=D(),p&&p.c(),m(t,"class","tab-item"),x(t,"active",n[3]===Fi),m(e,"class","tabs-content svelte-12y0yzb")},m(h,g){S(h,e,g),v(e,t),u[i].m(t,null),v(e,l),d&&d.m(e,null),v(e,o),p&&p.m(e,null),r=!0},p(h,g){let _=i;i=f(h),i===_?u[i].p(h,g):(ue(),P(u[_],1,1,()=>{u[_]=null}),fe(),s=u[i],s?s.p(h,g):(s=u[i]=a[i](h),s.c()),I(s,1),s.m(t,null)),(!r||g[0]&8)&&x(t,"active",h[3]===Fi),h[3]===wl?d?(d.p(h,g),g[0]&8&&I(d,1)):(d=fp(h),d.c(),I(d,1),d.m(e,o)):d&&(ue(),P(d,1,1,()=>{d=null}),fe()),h[2].$isAuth?p?(p.p(h,g),g[0]&4&&I(p,1)):(p=cp(h),p.c(),I(p,1),p.m(e,null)):p&&(ue(),P(p,1,1,()=>{p=null}),fe())},i(h){r||(I(s),I(d),I(p),r=!0)},o(h){P(s),P(d),P(p),r=!1},d(h){h&&w(e),u[i].d(),d&&d.d(),p&&p.d()}}}function dp(n){let e,t,i,s,l,o,r;return o=new Jn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[dM]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=D(),i=y("button"),s=y("i"),l=D(),B(o.$$.fragment),m(e,"class","flex-fill"),m(s,"class","ri-more-line"),m(i,"type","button"),m(i,"aria-label","More"),m(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),v(i,s),v(i,l),z(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(I(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(o)}}}function dM(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=` + Duplicate`,t=D(),i=y("button"),i.innerHTML=` + Delete`,m(e,"type","button"),m(e,"class","dropdown-item closable"),m(i,"type","button"),m(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",In(xe(n[25])))],s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,De(l)}}}function pp(n){let e,t,i,s;return i=new Jn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[pM]},$$scope:{ctx:n}}}),{c(){e=y("i"),t=D(),B(i.$$.fragment),m(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function mp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,d;function p(){return n[27](n[47])}return{c(){e=y("button"),t=y("i"),s=D(),l=y("span"),r=Y(o),a=Y(" collection"),u=D(),m(t,"class",i=os(U.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),m(l,"class","txt"),m(e,"type","button"),m(e,"class","dropdown-item closable"),x(e,"selected",n[47]==n[2].type)},m(h,g){S(h,e,g),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),v(e,u),f||(d=J(e,"click",p),f=!0)},p(h,g){n=h,g[0]&64&&i!==(i=os(U.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&m(t,"class",i),g[0]&64&&o!==(o=n[48]+"")&&le(r,o),g[0]&68&&x(e,"selected",n[47]==n[2].type)},d(h){h&&w(e),f=!1,d()}}}function pM(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{q=null}),fe()),(!A||j[0]&4&&T!==(T="btn btn-sm p-r-10 p-l-10 "+(F[2].$isNew?"btn-outline":"btn-transparent")))&&m(p,"class",T),(!A||j[0]&4&&E!==(E=!F[2].$isNew))&&(p.disabled=E),F[2].system?R||(R=hp(),R.c(),R.m(O.parentNode,O)):R&&(R.d(1),R=null)},i(F){A||(I(q),A=!0)},o(F){P(q),A=!1},d(F){F&&w(e),F&&w(s),F&&w(l),F&&w(f),F&&w(d),q&&q.d(),F&&w(M),R&&R.d(F),F&&w(O),L=!1,N()}}}function _p(n){let e,t,i,s,l,o;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Oe(t=Be.call(null,e,n[11])),l=!0)},p(r,a){t&&jt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&et(()=>{s&&(i||(i=Ve(e,Jt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=Ve(e,Jt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function gp(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Oe(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function bp(n){var a,u,f;let e,t,i,s=!U.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&vp();return{c(){e=y("button"),t=y("span"),t.textContent="Options",i=D(),r&&r.c(),m(t,"class","txt"),m(e,"type","button"),m(e,"class","tab-item"),x(e,"active",n[3]===Ns)},m(d,p){S(d,e,p),v(e,t),v(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(d,p){var h,g,_;p[0]&32&&(s=!U.isEmpty((h=d[5])==null?void 0:h.options)&&!((_=(g=d[5])==null?void 0:g.options)!=null&&_.manageRule)),s?r?p[0]&32&&I(r,1):(r=vp(),r.c(),I(r,1),r.m(e,null)):r&&(ue(),P(r,1,1,()=>{r=null}),fe()),p[0]&8&&x(e,"active",d[3]===Ns)},d(d){d&&w(e),r&&r.d(),l=!1,o()}}}function vp(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Oe(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function hM(n){var V,W,te,X,G,ae,Q,se;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,d,p,h,g=(V=n[2])!=null&&V.$isView?"Query":"Fields",_,b,k=!U.isEmpty(n[11]),$,C,T,E,M=!U.isEmpty((W=n[5])==null?void 0:W.listRule)||!U.isEmpty((te=n[5])==null?void 0:te.viewRule)||!U.isEmpty((X=n[5])==null?void 0:X.createRule)||!U.isEmpty((G=n[5])==null?void 0:G.updateRule)||!U.isEmpty((ae=n[5])==null?void 0:ae.deleteRule)||!U.isEmpty((se=(Q=n[5])==null?void 0:Q.options)==null?void 0:se.manageRule),O,A,L,N,q=!n[2].$isNew&&!n[2].system&&dp(n);r=new pe({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[mM,({uniqueId:ve})=>({46:ve}),({uniqueId:ve})=>[0,ve?32768:0]]},$$scope:{ctx:n}}});let R=k&&_p(n),F=M&&gp(),j=n[2].$isAuth&&bp(n);return{c(){e=y("h4"),i=Y(t),s=D(),q&&q.c(),l=D(),o=y("form"),B(r.$$.fragment),a=D(),u=y("input"),f=D(),d=y("div"),p=y("button"),h=y("span"),_=Y(g),b=D(),R&&R.c(),$=D(),C=y("button"),T=y("span"),T.textContent="API Rules",E=D(),F&&F.c(),O=D(),j&&j.c(),m(e,"class","upsert-panel-title svelte-12y0yzb"),m(u,"type","submit"),m(u,"class","hidden"),m(u,"tabindex","-1"),m(o,"class","block"),m(h,"class","txt"),m(p,"type","button"),m(p,"class","tab-item"),x(p,"active",n[3]===Fi),m(T,"class","txt"),m(C,"type","button"),m(C,"class","tab-item"),x(C,"active",n[3]===wl),m(d,"class","tabs-header stretched")},m(ve,$e){S(ve,e,$e),v(e,i),S(ve,s,$e),q&&q.m(ve,$e),S(ve,l,$e),S(ve,o,$e),z(r,o,null),v(o,a),v(o,u),S(ve,f,$e),S(ve,d,$e),v(d,p),v(p,h),v(h,_),v(p,b),R&&R.m(p,null),v(d,$),v(d,C),v(C,T),v(C,E),F&&F.m(C,null),v(d,O),j&&j.m(d,null),A=!0,L||(N=[J(o,"submit",xe(n[28])),J(p,"click",n[29]),J(C,"click",n[30])],L=!0)},p(ve,$e){var Ue,we,Ee,Ge,_t,Xe,Ke,Te;(!A||$e[0]&4)&&t!==(t=ve[2].$isNew?"New collection":"Edit collection")&&le(i,t),!ve[2].$isNew&&!ve[2].system?q?(q.p(ve,$e),$e[0]&4&&I(q,1)):(q=dp(ve),q.c(),I(q,1),q.m(l.parentNode,l)):q&&(ue(),P(q,1,1,()=>{q=null}),fe());const ze={};$e[0]&8192&&(ze.class="form-field collection-field-name required m-b-0 "+(ve[13]?"disabled":"")),$e[0]&8260|$e[1]&1081344&&(ze.$$scope={dirty:$e,ctx:ve}),r.$set(ze),(!A||$e[0]&4)&&g!==(g=(Ue=ve[2])!=null&&Ue.$isView?"Query":"Fields")&&le(_,g),$e[0]&2048&&(k=!U.isEmpty(ve[11])),k?R?(R.p(ve,$e),$e[0]&2048&&I(R,1)):(R=_p(ve),R.c(),I(R,1),R.m(p,null)):R&&(ue(),P(R,1,1,()=>{R=null}),fe()),(!A||$e[0]&8)&&x(p,"active",ve[3]===Fi),$e[0]&32&&(M=!U.isEmpty((we=ve[5])==null?void 0:we.listRule)||!U.isEmpty((Ee=ve[5])==null?void 0:Ee.viewRule)||!U.isEmpty((Ge=ve[5])==null?void 0:Ge.createRule)||!U.isEmpty((_t=ve[5])==null?void 0:_t.updateRule)||!U.isEmpty((Xe=ve[5])==null?void 0:Xe.deleteRule)||!U.isEmpty((Te=(Ke=ve[5])==null?void 0:Ke.options)==null?void 0:Te.manageRule)),M?F?$e[0]&32&&I(F,1):(F=gp(),F.c(),I(F,1),F.m(C,null)):F&&(ue(),P(F,1,1,()=>{F=null}),fe()),(!A||$e[0]&8)&&x(C,"active",ve[3]===wl),ve[2].$isAuth?j?j.p(ve,$e):(j=bp(ve),j.c(),j.m(d,null)):j&&(j.d(1),j=null)},i(ve){A||(I(q),I(r.$$.fragment,ve),I(R),I(F),A=!0)},o(ve){P(q),P(r.$$.fragment,ve),P(R),P(F),A=!1},d(ve){ve&&w(e),ve&&w(s),q&&q.d(ve),ve&&w(l),ve&&w(o),H(r),ve&&w(f),ve&&w(d),R&&R.d(),F&&F.d(),j&&j.d(),L=!1,De(N)}}}function _M(n){let e,t,i,s,l,o=n[2].$isNew?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=D(),s=y("button"),l=y("span"),r=Y(o),m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[9],m(l,"class","txt"),m(s,"type","button"),m(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],x(s,"btn-loading",n[9])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(d,p){p[0]&512&&(e.disabled=d[9]),p[0]&4&&o!==(o=d[2].$isNew?"Create":"Save changes")&&le(r,o),p[0]&4608&&a!==(a=!d[12]||d[9])&&(s.disabled=a),p[0]&512&&x(s,"btn-loading",d[9])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function gM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[_M],header:[hM],default:[cM]},$$scope:{ctx:n}};e=new on({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new aM({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(I(e.$$.fragment,r),I(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[37](null),H(e,r),r&&w(t),n[40](null),H(i,r)}}}const Fi="schema",wl="api_rules",Ns="options",bM="base",yp="auth",kp="view";function Fr(n){return JSON.stringify(n)}function vM(n,e,t){let i,s,l,o;Ze(n,Ti,Te=>t(5,o=Te));const r={};r[bM]="Base",r[kp]="View",r[yp]="Auth";const a=Tt();let u,f,d=null,p=new kn,h=!1,g=!1,_=Fi,b=Fr(p),k="";function $(Te){t(3,_=Te)}function C(Te){return E(Te),t(10,g=!0),$(Fi),u==null?void 0:u.show()}function T(){return u==null?void 0:u.hide()}async function E(Te){tn({}),typeof Te<"u"?(t(20,d=Te),t(2,p=Te.$clone())):(t(20,d=null),t(2,p=new kn)),t(2,p.schema=p.schema||[],p),t(2,p.originalName=p.name||"",p),await cn(),t(21,b=Fr(p))}function M(){p.$isNew?O():f==null||f.show(d,p)}function O(){if(h)return;t(9,h=!0);const Te=A();let ce;p.$isNew?ce=de.collections.create(Te):ce=de.collections.update(p.id,Te),ce.then(He=>{Fa(),Iy(He),t(10,g=!1),T(),Ht(p.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:p.$isNew,collection:He})}).catch(He=>{de.error(He)}).finally(()=>{t(9,h=!1)})}function A(){const Te=p.$export();Te.schema=Te.schema.slice(0);for(let ce=Te.schema.length-1;ce>=0;ce--)Te.schema[ce].toDelete&&Te.schema.splice(ce,1);return Te}function L(){d!=null&&d.id&&mn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>de.collections.delete(d==null?void 0:d.id).then(()=>{T(),Ht(`Successfully deleted collection "${d==null?void 0:d.name}".`),a("delete",d),Ly(d)}).catch(Te=>{de.error(Te)}))}function N(Te){t(2,p.type=Te,p),ui("schema")}function q(){s?mn("You have unsaved changes. Do you really want to discard them?",()=>{R()}):R()}async function R(){const Te=d==null?void 0:d.$clone();if(Te){if(Te.id="",Te.created="",Te.updated="",Te.name+="_duplicate",!U.isEmpty(Te.schema))for(const ce of Te.schema)ce.id="";if(!U.isEmpty(Te.indexes))for(let ce=0;ceT(),j=()=>M(),V=()=>q(),W=()=>L(),te=Te=>{t(2,p.name=U.slugify(Te.target.value),p),Te.target.value=p.name},X=Te=>N(Te),G=()=>{l&&M()},ae=()=>$(Fi),Q=()=>$(wl),se=()=>$(Ns);function ve(Te){p=Te,t(2,p),t(20,d)}function $e(Te){p=Te,t(2,p),t(20,d)}function ze(Te){p=Te,t(2,p),t(20,d)}function Ue(Te){p=Te,t(2,p),t(20,d)}const we=()=>s&&g?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,g=!1),T()}),!1):!0;function Ee(Te){ne[Te?"unshift":"push"](()=>{u=Te,t(7,u)})}function Ge(Te){me.call(this,n,Te)}function _t(Te){me.call(this,n,Te)}function Xe(Te){ne[Te?"unshift":"push"](()=>{f=Te,t(8,f)})}const Ke=()=>O();return n.$$.update=()=>{var Te,ce;n.$$.dirty[0]&32&&(o.schema||(Te=o.options)!=null&&Te.query?t(11,k=U.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&p.type===kp&&(t(2,p.createRule=null,p),t(2,p.updateRule=null,p),t(2,p.deleteRule=null,p),t(2,p.indexes=[],p)),n.$$.dirty[0]&1048580&&p!=null&&p.name&&(d==null?void 0:d.name)!=(p==null?void 0:p.name)&&t(2,p.indexes=(ce=p.indexes)==null?void 0:ce.map(He=>U.replaceIndexTableName(He,p.name)),p),n.$$.dirty[0]&4&&t(13,i=!p.$isNew&&p.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Fr(p)),n.$$.dirty[0]&20&&t(12,l=p.$isNew||s),n.$$.dirty[0]&12&&_===Ns&&p.type!==yp&&$(Fi)},[$,T,p,_,s,o,r,u,f,h,g,k,l,i,M,O,L,N,q,C,d,b,F,j,V,W,te,X,G,ae,Q,se,ve,$e,ze,Ue,we,Ee,Ge,_t,Xe,Ke]}class cu extends be{constructor(e){super(),ge(this,e,vM,gM,_e,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function wp(n,e,t){const i=n.slice();return i[15]=e[t],i}function Sp(n){let e,t=n[1].length&&$p();return{c(){t&&t.c(),e=Se()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=$p(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function $p(n){let e;return{c(){e=y("p"),e.textContent="No collections found.",m(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Tp(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,d,p;return{key:n,first:null,c(){var h;t=y("a"),i=y("i"),l=D(),o=y("span"),a=Y(r),u=D(),m(i,"class",s=U.getCollectionTypeIcon(e[15].type)),m(o,"class","txt"),m(t,"href",f="/collections?collectionId="+e[15].id),m(t,"class","sidebar-list-item"),x(t,"active",((h=e[5])==null?void 0:h.id)===e[15].id),this.first=t},m(h,g){S(h,t,g),v(t,i),v(t,l),v(t,o),v(o,a),v(t,u),d||(p=Oe(rn.call(null,t)),d=!0)},p(h,g){var _;e=h,g&8&&s!==(s=U.getCollectionTypeIcon(e[15].type))&&m(i,"class",s),g&8&&r!==(r=e[15].name+"")&&le(a,r),g&8&&f!==(f="/collections?collectionId="+e[15].id)&&m(t,"href",f),g&40&&x(t,"active",((_=e[5])==null?void 0:_.id)===e[15].id)},d(h){h&&w(t),d=!1,p()}}}function Cp(n){let e,t,i,s;return{c(){e=y("footer"),t=y("button"),t.innerHTML=` + New collection`,m(t,"type","button"),m(t,"class","btn btn-block btn-outline"),m(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:ee,d(l){l&&w(e),i=!1,s()}}}function yM(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],h=new Map,g,_,b,k,$,C,T=n[3];const E=L=>L[15].id;for(let L=0;L',o=D(),r=y("input"),a=D(),u=y("hr"),f=D(),d=y("div");for(let L=0;L20),m(e,"class","page-sidebar collection-sidebar")},m(L,N){S(L,e,N),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),re(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let q=0;q20),L[7]?O&&(O.d(1),O=null):O?O.p(L,N):(O=Cp(L),O.c(),O.m(e,null));const q={};b.$set(q)},i(L){k||(I(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let N=0;N{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function wM(n,e,t){let i,s,l,o,r,a,u;Ze(n,fi,$=>t(5,o=$)),Ze(n,di,$=>t(9,r=$)),Ze(n,ko,$=>t(6,a=$)),Ze(n,Is,$=>t(7,u=$));let f,d="";function p($){ln(fi,o=$,o)}const h=()=>t(0,d="");function g(){d=this.value,t(0,d)}const _=()=>f==null?void 0:f.show();function b($){ne[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var C;(C=$.detail)!=null&&C.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&kM(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,h,g,_,b,k]}class SM extends be{constructor(e){super(),ge(this,e,wM,yM,_e,{})}}function Mp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Ep(n){n[18]=n[19].default}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Dp(n){let e;return{c(){e=y("hr"),m(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ap(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Dp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=Se(),d&&d.c(),s=D(),l=y("button"),r=Y(o),a=D(),m(l,"type","button"),m(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(h,g){S(h,t,g),d&&d.m(h,g),S(h,s,g),S(h,l,g),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(h,g){e=h,g&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Dp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),g&8&&o!==(o=e[15].label+"")&&le(r,o),g&40&&x(l,"active",e[5]===e[14])},d(h){h&&w(t),d&&d.d(h),h&&w(s),h&&w(l),u=!1,f()}}}function Ip(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:CM,then:TM,catch:$M,value:19,blocks:[,,,]};return gu(t=n[15].component,s),{c(){e=Se(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&gu(t,s)||t0(s,n,o)},i(l){i||(I(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function $M(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function TM(n){Ep(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){B(e.$$.fragment),t=D()},m(s,l){z(e,s,l),S(s,t,l),i=!0},p(s,l){Ep(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(I(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function CM(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function Lp(n,e){let t,i,s,l=e[5]===e[14]&&Ip(e);return{key:n,first:null,c(){t=Se(),l&&l.c(),i=Se(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&I(l,1)):(l=Ip(e),l.c(),I(l,1),l.m(i.parentNode,i)):l&&(ue(),P(l,1,1,()=>{l=null}),fe())},i(o){s||(I(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function MM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=_=>_[14];for(let _=0;__[14];for(let _=0;_Close',m(e,"type","button"),m(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function OM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[EM],default:[MM]},$$scope:{ctx:n}};return e=new on({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function DM(n,e,t){const i={list:{label:"List/Search",component:ut(()=>import("./ListApiDocs-f0f237f6.js"),["./ListApiDocs-f0f237f6.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ut(()=>import("./ViewApiDocs-9b9dc672.js"),["./ViewApiDocs-9b9dc672.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:ut(()=>import("./CreateApiDocs-3cd84573.js"),["./CreateApiDocs-3cd84573.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:ut(()=>import("./UpdateApiDocs-67bd0657.js"),["./UpdateApiDocs-67bd0657.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:ut(()=>import("./DeleteApiDocs-07a7af86.js"),["./DeleteApiDocs-07a7af86.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ut(()=>import("./RealtimeApiDocs-e134c079.js"),["./RealtimeApiDocs-e134c079.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ut(()=>import("./AuthWithPasswordDocs-fe5fd2fa.js"),["./AuthWithPasswordDocs-fe5fd2fa.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ut(()=>import("./AuthWithOAuth2Docs-6ac303d9.js"),["./AuthWithOAuth2Docs-6ac303d9.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:ut(()=>import("./AuthRefreshDocs-7e8df999.js"),["./AuthRefreshDocs-7e8df999.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:ut(()=>import("./RequestVerificationDocs-4c733f64.js"),["./RequestVerificationDocs-4c733f64.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ut(()=>import("./ConfirmVerificationDocs-9803d138.js"),["./ConfirmVerificationDocs-9803d138.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ut(()=>import("./RequestPasswordResetDocs-85cec4fc.js"),["./RequestPasswordResetDocs-85cec4fc.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ut(()=>import("./ConfirmPasswordResetDocs-1d1931c0.js"),["./ConfirmPasswordResetDocs-1d1931c0.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ut(()=>import("./RequestEmailChangeDocs-ab29fae1.js"),["./RequestEmailChangeDocs-ab29fae1.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ut(()=>import("./ConfirmEmailChangeDocs-12e0a458.js"),["./ConfirmEmailChangeDocs-12e0a458.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ut(()=>import("./AuthMethodsDocs-9cb92810.js"),["./AuthMethodsDocs-9cb92810.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ut(()=>import("./ListExternalAuthsDocs-92bdae8f.js"),["./ListExternalAuthsDocs-92bdae8f.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ut(()=>import("./UnlinkExternalAuthDocs-0e4f3037.js"),["./UnlinkExternalAuthDocs-0e4f3037.js","./SdkTabs-9bbe3355.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new kn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),h=k=>d(k);function g(k){ne[k?"unshift":"push"](()=>{l=k,t(4,l)})}function _(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$.update=()=>{n.$$.dirty&12&&(o.$isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,h,g,_,b]}class AM extends be{constructor(e){super(),ge(this,e,DM,OM,_e,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function IM(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Username",o=D(),r=y("input"),m(t,"class",U.getFieldTypeIcon("user")),m(s,"class","txt"),m(e,"for",l=n[13]),m(r,"type","text"),m(r,"requried",a=!n[2]),m(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),m(r,"id",f=n[13])},m(h,g){S(h,e,g),v(e,t),v(e,i),v(e,s),S(h,o,g),S(h,r,g),re(r,n[0].username),d||(p=J(r,"input",n[5]),d=!0)},p(h,g){g&8192&&l!==(l=h[13])&&m(e,"for",l),g&4&&a!==(a=!h[2])&&m(r,"requried",a),g&4&&u!==(u=h[2]?"Leave empty to auto generate...":h[4])&&m(r,"placeholder",u),g&8192&&f!==(f=h[13])&&m(r,"id",f),g&1&&r.value!==h[0].username&&re(r,h[0].username)},d(h){h&&w(e),h&&w(o),h&&w(r),d=!1,p()}}}function LM(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,h,g,_,b,k,$,C;return{c(){var T;e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Email",o=D(),r=y("div"),a=y("button"),u=y("span"),f=Y("Public: "),p=Y(d),g=D(),_=y("input"),m(t,"class",U.getFieldTypeIcon("email")),m(s,"class","txt"),m(e,"for",l=n[13]),m(u,"class","txt"),m(a,"type","button"),m(a,"class",h="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),m(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),m(_,"type","email"),_.autofocus=n[2],m(_,"autocomplete","off"),m(_,"id",b=n[13]),_.required=k=(T=n[1].options)==null?void 0:T.requireEmail,m(_,"class","svelte-1751a4d")},m(T,E){S(T,e,E),v(e,t),v(e,i),v(e,s),S(T,o,E),S(T,r,E),v(r,a),v(a,u),v(u,f),v(u,p),S(T,g,E),S(T,_,E),re(_,n[0].email),n[2]&&_.focus(),$||(C=[Oe(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(_,"input",n[7])],$=!0)},p(T,E){var M;E&8192&&l!==(l=T[13])&&m(e,"for",l),E&1&&d!==(d=T[0].emailVisibility?"On":"Off")&&le(p,d),E&1&&h!==(h="btn btn-sm btn-transparent "+(T[0].emailVisibility?"btn-success":"btn-hint"))&&m(a,"class",h),E&4&&(_.autofocus=T[2]),E&8192&&b!==(b=T[13])&&m(_,"id",b),E&2&&k!==(k=(M=T[1].options)==null?void 0:M.requireEmail)&&(_.required=k),E&1&&_.value!==T[0].email&&re(_,T[0].email)},d(T){T&&w(e),T&&w(o),T&&w(r),T&&w(g),T&&w(_),$=!1,De(C)}}}function Pp(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[PM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function PM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Change password"),m(e,"type","checkbox"),m(e,"id",t=n[13]),m(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[3],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&m(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Fp(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[FM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[NM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),B(r.$$.fragment),m(i,"class","col-sm-6"),m(o,"class","col-sm-6"),m(t,"class","grid"),x(t,"p-t-xs",n[3]),m(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d&24577&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const h={};d&24577&&(h.$$scope={dirty:d,ctx:f}),r.$set(h),(!u||d&8)&&x(t,"p-t-xs",f[3])},i(f){u||(I(s.$$.fragment,f),I(r.$$.fragment,f),f&&et(()=>{u&&(a||(a=Ve(e,rt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Ve(e,rt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function FM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Password",o=D(),r=y("input"),m(t,"class","ri-lock-line"),m(s,"class","txt"),m(e,"for",l=n[13]),m(r,"type","password"),m(r,"autocomplete","new-password"),m(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),re(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&m(e,"for",l),p&8192&&a!==(a=d[13])&&m(r,"id",a),p&1&&r.value!==d[0].password&&re(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function NM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Password confirm",o=D(),r=y("input"),m(t,"class","ri-lock-line"),m(s,"class","txt"),m(e,"for",l=n[13]),m(r,"type","password"),m(r,"autocomplete","new-password"),m(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),re(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&m(e,"for",l),p&8192&&a!==(a=d[13])&&m(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&re(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function RM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Verified"),m(e,"type","checkbox"),m(e,"id",t=n[13]),m(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",xe(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&m(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,De(a)}}}function qM(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,h;i=new pe({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[IM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[LM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}});let g=!n[2]&&Pp(n),_=(n[2]||n[3])&&Fp(n);return p=new pe({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[RM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),r=D(),a=y("div"),g&&g.c(),u=D(),_&&_.c(),f=D(),d=y("div"),B(p.$$.fragment),m(t,"class","col-lg-6"),m(l,"class","col-lg-6"),m(a,"class","col-lg-12"),m(d,"class","col-lg-12"),m(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),g&&g.m(a,null),v(a,u),_&&_.m(a,null),v(e,f),v(e,d),z(p,d,null),h=!0},p(k,[$]){var M;const C={};$&4&&(C.class="form-field "+(k[2]?"":"required")),$&24581&&(C.$$scope={dirty:$,ctx:k}),i.$set(C);const T={};$&2&&(T.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&24583&&(T.$$scope={dirty:$,ctx:k}),o.$set(T),k[2]?g&&(ue(),P(g,1,1,()=>{g=null}),fe()):g?(g.p(k,$),$&4&&I(g,1)):(g=Pp(k),g.c(),I(g,1),g.m(a,u)),k[2]||k[3]?_?(_.p(k,$),$&12&&I(_,1)):(_=Fp(k),_.c(),I(_,1),_.m(a,null)):_&&(ue(),P(_,1,1,()=>{_=null}),fe());const E={};$&24581&&(E.$$scope={dirty:$,ctx:k}),p.$set(E)},i(k){h||(I(i.$$.fragment,k),I(o.$$.fragment,k),I(g),I(_),I(p.$$.fragment,k),h=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(g),P(_),P(p.$$.fragment,k),h=!1},d(k){k&&w(e),H(i),H(o),g&&g.d(),_&&_.d(),H(p)}}}function jM(n,e,t){let{collection:i=new kn}=e,{record:s=new wi}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function d(){r=this.checked,t(3,r)}function p(){s.password=this.value,t(0,s),t(3,r)}function h(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function g(){s.verified=this.checked,t(0,s),t(3,r)}const _=b=>{l||mn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),ui("password"),ui("passwordConfirm")))},[s,i,l,r,o,a,u,f,d,p,h,g,_]}class VM extends be{constructor(e){super(),ge(this,e,jM,qM,_e,{collection:1,record:0,isNew:2})}}function zM(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)&&!(h!=null&&h.isComposing)){h.preventDefault();const g=r.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}Xt(()=>(u(),()=>clearTimeout(a)));function d(h){ne[h?"unshift":"push"](()=>{r=h,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=h=>{e=je(je({},e),Gt(h)),t(3,s=tt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class BM extends be{constructor(e){super(),ge(this,e,HM,zM,_e,{value:0,maxHeight:4})}}function UM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function h(_){n[2](_)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new BM({props:g}),ne.push(()=>he(f,"value",h)),{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),B(f.$$.fragment),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[3])},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),z(f,_,b),p=!0},p(_,b){(!p||b&2&&i!==(i=U.getFieldTypeIcon(_[1].type)))&&m(t,"class",i),(!p||b&2)&&o!==(o=_[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=_[3]))&&m(e,"for",a);const k={};b&8&&(k.id=_[3]),b&2&&(k.required=_[1].required),!d&&b&1&&(d=!0,k.value=_[0],ye(()=>d=!1)),f.$set(k)},i(_){p||(I(f.$$.fragment,_),p=!0)},o(_){P(f.$$.fragment,_),p=!1},d(_){_&&w(e),_&&w(u),H(f,_)}}}function WM(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[UM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function YM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class KM extends be{constructor(e){super(),ge(this,e,YM,WM,_e,{field:1,value:0})}}function JM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,h,g,_,b;return{c(){var k,$;e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),f=y("input"),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[3]),m(f,"type","number"),m(f,"id",d=n[3]),f.required=p=n[1].required,m(f,"min",h=(k=n[1].options)==null?void 0:k.min),m(f,"max",g=($=n[1].options)==null?void 0:$.max),m(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),re(f,n[0]),_||(b=J(f,"input",n[2]),_=!0)},p(k,$){var C,T;$&2&&i!==(i=U.getFieldTypeIcon(k[1].type))&&m(t,"class",i),$&2&&o!==(o=k[1].name+"")&&le(r,o),$&8&&a!==(a=k[3])&&m(e,"for",a),$&8&&d!==(d=k[3])&&m(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&h!==(h=(C=k[1].options)==null?void 0:C.min)&&m(f,"min",h),$&2&&g!==(g=(T=k[1].options)==null?void 0:T.max)&&m(f,"max",g),$&1&&mt(f.value)!==k[0]&&re(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),_=!1,b()}}}function ZM(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[JM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function GM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=mt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class XM extends be{constructor(e){super(),ge(this,e,GM,ZM,_e,{field:1,value:0})}}function QM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=D(),s=y("label"),o=Y(l),m(e,"type","checkbox"),m(e,"id",t=n[3]),m(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&m(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&le(o,l),d&8&&r!==(r=f[3])&&m(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function xM(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[QM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function e6(n,e,t){let{field:i=new wn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class t6 extends be{constructor(e){super(),ge(this,e,e6,xM,_e,{field:1,value:0})}}function n6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,h,g;return{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),f=y("input"),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[3]),m(f,"type","email"),m(f,"id",d=n[3]),f.required=p=n[1].required},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),S(_,f,b),re(f,n[0]),h||(g=J(f,"input",n[2]),h=!0)},p(_,b){b&2&&i!==(i=U.getFieldTypeIcon(_[1].type))&&m(t,"class",i),b&2&&o!==(o=_[1].name+"")&&le(r,o),b&8&&a!==(a=_[3])&&m(e,"for",a),b&8&&d!==(d=_[3])&&m(f,"id",d),b&2&&p!==(p=_[1].required)&&(f.required=p),b&1&&f.value!==_[0]&&re(f,_[0])},d(_){_&&w(e),_&&w(u),_&&w(f),h=!1,g()}}}function i6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function s6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class l6 extends be{constructor(e){super(),ge(this,e,s6,i6,_e,{field:1,value:0})}}function o6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,h,g;return{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),f=y("input"),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[3]),m(f,"type","url"),m(f,"id",d=n[3]),f.required=p=n[1].required},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),S(_,f,b),re(f,n[0]),h||(g=J(f,"input",n[2]),h=!0)},p(_,b){b&2&&i!==(i=U.getFieldTypeIcon(_[1].type))&&m(t,"class",i),b&2&&o!==(o=_[1].name+"")&&le(r,o),b&8&&a!==(a=_[3])&&m(e,"for",a),b&8&&d!==(d=_[3])&&m(f,"id",d),b&2&&p!==(p=_[1].required)&&(f.required=p),b&1&&f.value!==_[0]&&re(f,_[0])},d(_){_&&w(e),_&&w(u),_&&w(f),h=!1,g()}}}function r6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[o6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function a6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class u6 extends be{constructor(e){super(),ge(this,e,a6,r6,_e,{field:1,value:0})}}function Np(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',m(t,"type","button"),m(t,"class","link-hint clear-btn svelte-11df51y"),m(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[Oe(Be.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:ee,d(l){l&&w(e),i=!1,De(s)}}}function f6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,h,g,_,b=n[0]&&!n[1].required&&Np(n);function k(T){n[6](T)}function $(T){n[7](T)}let C={id:n[8],options:U.defaultFlatpickrOptions()};return n[2]!==void 0&&(C.value=n[2]),n[0]!==void 0&&(C.formattedValue=n[0]),p=new uu({props:C}),ne.push(()=>he(p,"value",k)),ne.push(()=>he(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),a=Y(" (UTC)"),f=D(),b&&b.c(),d=D(),B(p.$$.fragment),m(t,"class",i=os(U.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),m(l,"class","txt"),m(e,"for",u=n[8])},m(T,E){S(T,e,E),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(T,f,E),b&&b.m(T,E),S(T,d,E),z(p,T,E),_=!0},p(T,E){(!_||E&2&&i!==(i=os(U.getFieldTypeIcon(T[1].type))+" svelte-11df51y"))&&m(t,"class",i),(!_||E&2)&&o!==(o=T[1].name+"")&&le(r,o),(!_||E&256&&u!==(u=T[8]))&&m(e,"for",u),T[0]&&!T[1].required?b?b.p(T,E):(b=Np(T),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};E&256&&(M.id=T[8]),!h&&E&4&&(h=!0,M.value=T[2],ye(()=>h=!1)),!g&&E&1&&(g=!0,M.formattedValue=T[0],ye(()=>g=!1)),p.$set(M)},i(T){_||(I(p.$$.fragment,T),_=!0)},o(T){P(p.$$.fragment,T),_=!1},d(T){T&&w(e),T&&w(f),b&&b.d(T),T&&w(d),H(p,T)}}}function c6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[f6,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function d6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class p6 extends be{constructor(e){super(),ge(this,e,d6,c6,_e,{field:1,value:0})}}function Rp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=Y("Select up to "),s=Y(i),l=Y(" items."),m(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&w(e)}}}function m6(n){var $,C,T,E,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,h,g;function _(O){n[3](O)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((C=n[1].options)==null?void 0:C.maxSelect),items:(T=n[1].options)==null?void 0:T.values,searchable:((E=n[1].options)==null?void 0:E.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new fu({props:b}),ne.push(()=>he(f,"selected",_));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Rp(n);return{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),B(f.$$.fragment),p=D(),k&&k.c(),h=Se(),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[4])},m(O,A){S(O,e,A),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,A),z(f,O,A),S(O,p,A),k&&k.m(O,A),S(O,h,A),g=!0},p(O,A){var N,q,R,F,j;(!g||A&2&&i!==(i=U.getFieldTypeIcon(O[1].type)))&&m(t,"class",i),(!g||A&2)&&o!==(o=O[1].name+"")&&le(r,o),(!g||A&16&&a!==(a=O[4]))&&m(e,"for",a);const L={};A&16&&(L.id=O[4]),A&6&&(L.toggle=!O[1].required||O[2]),A&4&&(L.multiple=O[2]),A&7&&(L.closable=!O[2]||((N=O[0])==null?void 0:N.length)>=((q=O[1].options)==null?void 0:q.maxSelect)),A&2&&(L.items=(R=O[1].options)==null?void 0:R.values),A&2&&(L.searchable=((F=O[1].options)==null?void 0:F.values)>5),!d&&A&1&&(d=!0,L.selected=O[0],ye(()=>d=!1)),f.$set(L),((j=O[1].options)==null?void 0:j.maxSelect)>1?k?k.p(O,A):(k=Rp(O),k.c(),k.m(h.parentNode,h)):k&&(k.d(1),k=null)},i(O){g||(I(f.$$.fragment,O),g=!0)},o(O){P(f.$$.fragment,O),g=!1},d(O){O&&w(e),O&&w(u),H(f,O),O&&w(p),k&&k.d(O),O&&w(h)}}}function h6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[m6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function _6(n,e,t){let i,{field:s=new wn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class g6 extends be{constructor(e){super(),ge(this,e,_6,h6,_e,{field:1,value:0})}}function b6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,h,g;return{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),f=y("textarea"),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[4]),m(f,"id",d=n[4]),m(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),S(_,f,b),h||(g=J(f,"input",n[3]),h=!0)},p(_,b){b&2&&i!==(i=U.getFieldTypeIcon(_[1].type))&&m(t,"class",i),b&2&&o!==(o=_[1].name+"")&&le(r,o),b&16&&a!==(a=_[4])&&m(e,"for",a),b&16&&d!==(d=_[4])&&m(f,"id",d),b&2&&p!==(p=_[1].required)&&(f.required=p),b&4&&(f.value=_[2])},d(_){_&&w(e),_&&w(u),_&&w(f),h=!1,g()}}}function v6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[b6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function y6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class k6 extends be{constructor(e){super(),ge(this,e,y6,v6,_e,{field:1,value:0})}}function w6(n){let e,t;return{c(){e=y("i"),m(e,"class","ri-file-line"),m(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&m(e,"alt",t)},d(i){i&&w(e)}}}function S6(n){let e,t,i;return{c(){e=y("img"),_n(e.src,t=n[2])||m(e,"src",t),m(e,"width",n[1]),m(e,"height",n[1]),m(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!_n(e.src,t=s[2])&&m(e,"src",t),l&2&&m(e,"width",s[1]),l&2&&m(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&m(e,"alt",i)},d(s){s&&w(e)}}}function $6(n){let e;function t(l,o){return l[2]?S6:w6}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function T6(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),U.hasImageExtension(s==null?void 0:s.name)&&U.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class C6 extends be{constructor(e){super(),ge(this,e,T6,$6,_e,{file:0,size:1})}}function qp(n){let e;function t(l,o){return l[4]==="image"?E6:M6}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function M6(n){let e,t;return{c(){e=y("object"),t=Y("Cannot preview the file."),m(e,"title",n[2]),m(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&m(e,"title",i[2]),s&2&&m(e,"data",i[1])},d(i){i&&w(e)}}}function E6(n){let e,t,i;return{c(){e=y("img"),_n(e.src,t=n[1])||m(e,"src",t),m(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!_n(e.src,t=s[1])&&m(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&m(e,"alt",i)},d(s){s&&w(e)}}}function O6(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&qp(n);return{c(){i&&i.c(),t=Se()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=qp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function D6(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",xe(n[0])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function A6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=Y(n[2]),i=D(),s=y("i"),l=D(),o=y("div"),r=D(),a=y("button"),a.textContent="Close",m(s,"class","ri-external-link-line"),m(e,"href",n[1]),m(e,"title",n[2]),m(e,"target","_blank"),m(e,"rel","noreferrer noopener"),m(e,"class","link-hint txt-ellipsis inline-flex"),m(o,"class","flex-fill"),m(a,"type","button"),m(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&le(t,d[2]),p&2&&m(e,"href",d[1]),p&4&&m(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function I6(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[A6],header:[D6],default:[O6]},$$scope:{ctx:n}};return e=new on({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),H(e,s)}}}function L6(n,e,t){let i,s,l,o,r="";function a(h){h!==""&&(t(1,r=h),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(h){ne[h?"unshift":"push"](()=>{o=h,t(3,o)})}function d(h){me.call(this,n,h)}function p(h){me.call(this,n,h)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=U.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class P6 extends be{constructor(e){super(),ge(this,e,L6,I6,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function F6(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?j6:u[3]==="video"||u[3]==="audio"?q6:R6}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),m(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),m(e,"href",n[6]),m(e,"target","_blank"),m(e,"rel","noreferrer"),m(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",In(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&m(e,"class",t),f&64&&m(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&m(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function N6(n){let e,t;return{c(){e=y("div"),m(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&m(e,"class",t)},d(i){i&&w(e)}}}function R6(n){let e;return{c(){e=y("i"),m(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function q6(n){let e;return{c(){e=y("i"),m(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function j6(n){let e,t,i,s,l;return{c(){e=y("img"),_n(e.src,t=n[5])||m(e,"src",t),m(e,"alt",n[0]),m(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!_n(e.src,t=o[5])&&m(e,"src",t),r&1&&m(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&m(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function V6(n){let e,t,i;function s(a,u){return a[2]?N6:F6}let l=s(n),o=l(n),r={};return t=new P6({props:r}),n[12](t),{c(){o.c(),e=D(),B(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),z(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(I(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[12](null),H(t,a)}}}function z6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",d="",p=!1;h();async function h(){t(2,p=!0);try{t(10,d=await de.getAdminFileToken(l.collectionId))}catch(k){console.warn("File token failure:",k)}t(2,p=!1)}function g(){t(5,u="")}const _=k=>{s&&(k.preventDefault(),a==null||a.show(f))};function b(k){ne[k?"unshift":"push"](()=>{a=k,t(4,a)})}return n.$$set=k=>{"record"in k&&t(9,l=k.record),"filename"in k&&t(0,o=k.filename),"size"in k&&t(1,r=k.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=U.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=p?"":de.files.getUrl(l,o,{token:d})),n.$$.dirty&1541&&t(5,u=p?"":de.files.getUrl(l,o,{thumb:"100x100",token:d}))},[o,r,p,i,a,u,f,s,g,l,d,_,b]}class du extends be{constructor(e){super(),ge(this,e,z6,V6,_e,{record:9,filename:0,size:1})}}function jp(n,e,t){const i=n.slice();return i[27]=e[t],i[29]=t,i}function Vp(n,e,t){const i=n.slice();i[30]=e[t],i[29]=t;const s=i[1].includes(i[29]);return i[31]=s,i}function H6(n){let e,t,i;function s(){return n[17](n[29])}return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Oe(Be.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,De(i)}}}function B6(n){let e,t,i;function s(){return n[16](n[29])}return{c(){e=y("button"),e.innerHTML='Restore',m(e,"type","button"),m(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function zp(n,e){let t,i,s,l,o,r,a=e[30]+"",u,f,d,p,h,g,_;s=new du({props:{record:e[2],filename:e[30]}});function b(C,T){return T[0]&18&&(g=null),g==null&&(g=!!C[1].includes(C[29])),g?B6:H6}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),r=y("a"),u=Y(a),p=D(),h=y("div"),$.c(),x(i,"fade",e[1].includes(e[29])),m(r,"href",f=de.files.getUrl(e[2],e[30],{token:e[9]})),m(r,"class",d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")),m(r,"title","Download"),m(r,"target","_blank"),m(r,"rel","noopener noreferrer"),m(o,"class","content"),m(h,"class","actions"),m(t,"class","list-item"),this.first=t},m(C,T){S(C,t,T),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,h),$.m(h,null),_=!0},p(C,T){e=C;const E={};T[0]&4&&(E.record=e[2]),T[0]&16&&(E.filename=e[30]),s.$set(E),(!_||T[0]&18)&&x(i,"fade",e[1].includes(e[29])),(!_||T[0]&16)&&a!==(a=e[30]+"")&&le(u,a),(!_||T[0]&532&&f!==(f=de.files.getUrl(e[2],e[30],{token:e[9]})))&&m(r,"href",f),(!_||T[0]&18&&d!==(d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")))&&m(r,"class",d),k===(k=b(e,T))&&$?$.p(e,T):($.d(1),$=k(e),$&&($.c(),$.m(h,null)))},i(C){_||(I(s.$$.fragment,C),_=!0)},o(C){P(s.$$.fragment,C),_=!1},d(C){C&&w(t),H(s),$.d()}}}function Hp(n){let e,t,i,s,l,o,r,a,u=n[27].name+"",f,d,p,h,g,_,b;i=new C6({props:{file:n[27]}});function k(){return n[18](n[29])}return{c(){e=y("div"),t=y("figure"),B(i.$$.fragment),s=D(),l=y("div"),o=y("small"),o.textContent="New",r=D(),a=y("span"),f=Y(u),p=D(),h=y("button"),h.innerHTML='',m(t,"class","thumb"),m(o,"class","label label-success m-r-5"),m(a,"class","txt"),m(l,"class","filename m-r-auto"),m(l,"title",d=n[27].name),m(h,"type","button"),m(h,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),m(e,"class","list-item")},m($,C){S($,e,C),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,h),g=!0,_||(b=[Oe(Be.call(null,h,"Remove file")),J(h,"click",k)],_=!0)},p($,C){n=$;const T={};C[0]&1&&(T.file=n[27]),i.$set(T),(!g||C[0]&1)&&u!==(u=n[27].name+"")&&le(f,u),(!g||C[0]&1&&d!==(d=n[27].name))&&m(l,"title",d)},i($){g||(I(i.$$.fragment,$),g=!0)},o($){P(i.$$.fragment,$),g=!1},d($){$&&w(e),H(i),_=!1,De(b)}}}function U6(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,h,g,_,b,k,$,C,T,E,M,O,A,L=n[4];const N=j=>j[30]+j[2].id;for(let j=0;jP(R[j],1,1,()=>{R[j]=null});return{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),f=y("div");for(let j=0;j({26:o}),({uniqueId:o})=>[o?67108864:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","block")},m(o,r){S(o,e,r),z(t,e,null),i=!0,s||(l=[J(e,"dragover",xe(n[23])),J(e,"dragleave",n[24]),J(e,"drop",n[14])],s=!0)},p(o,r){const a={};r[0]&264&&(a.class=` + form-field form-field-list form-field-file + `+(o[3].required?"required":"")+` + `+(o[8]?"dragover":"")+` + `),r[0]&8&&(a.name=o[3].name),r[0]&67110655|r[1]&4&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(I(t.$$.fragment,o),i=!0)},o(o){P(t.$$.fragment,o),i=!1},d(o){o&&w(e),H(t),s=!1,De(l)}}}function Y6(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,d,p,h=!1,g="";function _(F){U.removeByValue(u,F),t(1,u)}function b(F){U.pushUnique(u,F),t(1,u)}function k(F){U.isEmpty(a[F])||a.splice(F,1),t(0,a)}function $(){p==null||p.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}function C(F){var V,W;F.preventDefault(),t(8,h=!1);const j=((V=F.dataTransfer)==null?void 0:V.files)||[];if(!(l||!j.length)){for(const te of j){const X=s.length+a.length-u.length;if(((W=f.options)==null?void 0:W.maxSelect)<=X)break;a.push(te)}t(0,a)}}Xt(async()=>{t(9,g=await de.getAdminFileToken(o.collectionId))});const T=F=>_(F),E=F=>b(F),M=F=>k(F);function O(F){ne[F?"unshift":"push"](()=>{d=F,t(6,d)})}const A=()=>{for(let F of d.files)a.push(F);t(0,a),t(6,d.value=null,d)},L=()=>d==null?void 0:d.click();function N(F){ne[F?"unshift":"push"](()=>{p=F,t(7,p)})}const q=()=>{t(8,h=!0)},R=()=>{t(8,h=!1)};return n.$$set=F=>{"record"in F&&t(2,o=F.record),"value"in F&&t(15,r=F.value),"uploadedFiles"in F&&t(0,a=F.uploadedFiles),"deletedFileIndexes"in F&&t(1,u=F.deletedFileIndexes),"field"in F&&t(3,f=F.field)},n.$$.update=()=>{var F,j;n.$$.dirty[0]&1&&(Array.isArray(a)||t(0,a=U.toArray(a))),n.$$.dirty[0]&2&&(Array.isArray(u)||t(1,u=U.toArray(u))),n.$$.dirty[0]&8&&t(5,i=((F=f.options)==null?void 0:F.maxSelect)>1),n.$$.dirty[0]&32800&&U.isEmpty(r)&&t(15,r=i?[]:""),n.$$.dirty[0]&32768&&t(4,s=U.toArray(r)),n.$$.dirty[0]&27&&t(10,l=(s.length||a.length)&&((j=f.options)==null?void 0:j.maxSelect)<=s.length+a.length-u.length),n.$$.dirty[0]&3&&(a!==-1||u!==-1)&&$()},[a,u,o,f,s,i,d,p,h,g,l,_,b,k,C,r,T,E,M,O,A,L,N,q,R]}class K6 extends be{constructor(e){super(),ge(this,e,Y6,W6,_e,{record:2,value:15,uploadedFiles:0,deletedFileIndexes:1,field:3},null,[-1,-1])}}function Bp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function J6(n,e){e=Bp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=Bp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const Z6=n=>({dragging:n&2,dragover:n&4}),Up=n=>({dragging:n[1],dragover:n[2]});function G6(n){let e,t,i,s;const l=n[8].default,o=kt(l,n,n[7],Up);return{c(){e=y("div"),o&&o.c(),m(e,"draggable",!0),m(e,"class","draggable svelte-28orm4"),x(e,"dragging",n[1]),x(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[J(e,"dragover",xe(n[9])),J(e,"dragleave",xe(n[10])),J(e,"dragend",n[11]),J(e,"dragstart",n[12]),J(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&St(o,l,r,r[7],t?wt(l,r[7],a,Z6):$t(r[7]),Up),(!t||a&2)&&x(e,"dragging",r[1]),(!t||a&4)&&x(e,"dragover",r[2])},i(r){t||(I(o,r),t=!0)},o(r){P(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,De(s)}}}function X6(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function d($,C){!$&&!a||(t(1,u=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",C))}function p($,C){if(!$&&!a)return;t(2,f=!1),t(1,u=!1),$.dataTransfer.dropEffect="move";const T=parseInt($.dataTransfer.getData("text/plain"));T{t(2,f=!0)},g=()=>{t(2,f=!1)},_=()=>{t(2,f=!1),t(1,u=!1)},b=$=>d($,o),k=$=>p($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(5,r=$.list),"disabled"in $&&t(6,a=$.disabled),"$$scope"in $&&t(7,s=$.$$scope)},[o,u,f,d,p,r,a,s,i,h,g,_,b,k]}class Q6 extends be{constructor(e){super(),ge(this,e,X6,G6,_e,{index:0,list:5,disabled:6})}}function Wp(n,e,t){const i=n.slice();i[6]=e[t];const s=U.toArray(i[0][i[6]]).slice(0,5);return i[7]=s,i}function Yp(n,e,t){const i=n.slice();return i[10]=e[t],i}function Kp(n){let e,t;return e=new du({props:{record:n[0],filename:n[10],size:"xs"}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[10]),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Jp(n){let e=!U.isEmpty(n[10]),t,i,s=e&&Kp(n);return{c(){s&&s.c(),t=Se()},m(l,o){s&&s.m(l,o),S(l,t,o),i=!0},p(l,o){o&3&&(e=!U.isEmpty(l[10])),e?s?(s.p(l,o),o&3&&I(s,1)):(s=Kp(l),s.c(),I(s,1),s.m(t.parentNode,t)):s&&(ue(),P(s,1,1,()=>{s=null}),fe())},i(l){i||(I(s),i=!0)},o(l){P(s),i=!1},d(l){s&&s.d(l),l&&w(t)}}}function Zp(n){let e,t,i=n[7],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oP(h[_],1,1,()=>{h[_]=null});return{c(){e=y("div"),t=y("i"),s=D();for(let _=0;_t(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(d=>d.name==u&&d.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class nr extends be{constructor(e){super(),ge(this,e,e5,x6,_e,{record:0,displayFields:3})}}function Gp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Xp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function Qp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='
    New record
    ',m(e,"type","button"),m(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function xp(n){let e,t;function i(o,r){return o[12]?n5:t5}let s=i(n),l=s(n);return{c(){e=y("div"),l.c(),t=D(),m(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),v(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function t5(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&em(n);return{c(){e=y("span"),e.textContent="No records found.",t=D(),s&&s.c(),i=Se(),m(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=em(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function n5(n){let e;return{c(){e=y("div"),e.innerHTML='',m(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function em(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',m(e,"type","button"),m(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[35]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function i5(n){let e;return{c(){e=y("i"),m(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function s5(n){let e;return{c(){e=y("i"),m(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function tm(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=y("div"),t=y("button"),t.innerHTML='',m(t,"type","button"),m(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),m(e,"class","actions nonintrusive")},m(o,r){S(o,e,r),v(e,t),i||(s=[Oe(Be.call(null,t,"Edit")),J(t,"keydown",In(n[27])),J(t,"click",In(l))],i=!0)},p(o,r){n=o},d(o){o&&w(e),i=!1,De(s)}}}function nm(n,e){var k;let t,i,s,l,o,r,a,u,f;function d($,C){return $[6]?s5:i5}let p=d(e),h=p(e);l=new nr({props:{record:e[49],displayFields:e[13]}});let g=!((k=e[10])!=null&&k.$isView)&&tm(e);function _(){return e[33](e[49])}function b(...$){return e[34](e[49],...$)}return{key:n,first:null,c(){t=y("div"),h.c(),i=D(),s=y("div"),B(l.$$.fragment),o=D(),g&&g.c(),r=D(),m(s,"class","content"),m(t,"tabindex","0"),m(t,"class","list-item handle"),x(t,"selected",e[6]),x(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m($,C){S($,t,C),h.m(t,null),v(t,i),v(t,s),z(l,s,null),v(t,o),g&&g.m(t,null),v(t,r),a=!0,u||(f=[J(t,"click",_),J(t,"keydown",b)],u=!0)},p($,C){var E;e=$,p!==(p=d(e))&&(h.d(1),h=p(e),h&&(h.c(),h.m(t,i)));const T={};C[0]&8&&(T.record=e[49]),C[0]&8192&&(T.displayFields=e[13]),l.$set(T),(E=e[10])!=null&&E.$isView?g&&(g.d(1),g=null):g?g.p(e,C):(g=tm(e),g.c(),g.m(t,r)),(!a||C[0]&264)&&x(t,"selected",e[6]),(!a||C[0]&808)&&x(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i($){a||(I(l.$$.fragment,$),a=!0)},o($){P(l.$$.fragment,$),a=!1},d($){$&&w(t),h.d(),H(l),g&&g.d(),u=!1,De(f)}}}function im(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=Y("("),i=Y(t),s=Y(" of MAX "),l=Y(n[5]),o=Y(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&le(i,t),a[0]&32&&le(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function l5(n){let e;return{c(){e=y("p"),e.textContent="No selected records.",m(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function o5(n){let e,t,i=n[6],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){e=y("div");for(let o=0;o',l=D(),m(s,"type","button"),m(s,"title","Remove"),m(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),m(e,"class","label"),x(e,"label-danger",n[52]),x(e,"label-warning",n[53])},m(f,d){S(f,e,d),z(t,e,null),v(e,i),v(e,s),S(f,l,d),o=!0,r||(a=J(s,"click",u),r=!0)},p(f,d){n=f;const p={};d[0]&64&&(p.record=n[49]),d[0]&8192&&(p.displayFields=n[13]),t.$set(p),(!o||d[1]&2097152)&&x(e,"label-danger",n[52]),(!o||d[1]&4194304)&&x(e,"label-warning",n[53])},i(f){o||(I(t.$$.fragment,f),o=!0)},o(f){P(t.$$.fragment,f),o=!1},d(f){f&&w(e),H(t),f&&w(l),r=!1,a()}}}function sm(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[r5,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new Q6({props:l}),ne.push(()=>he(e,"list",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function a5(n){var q;let e,t,i,s,l,o=[],r=new Map,a,u,f,d,p,h,g,_,b,k,$;t=new Jo({props:{value:n[2],autocompleteCollection:n[10]}}),t.$on("submit",n[30]);let C=!((q=n[10])!=null&&q.$isView)&&Qp(n),T=n[3];const E=R=>R[49].id;for(let R=0;R1&&im(n);const A=[o5,l5],L=[];function N(R,F){return R[6].length?0:1}return h=N(n),g=L[h]=A[h](n),{c(){e=y("div"),B(t.$$.fragment),i=D(),C&&C.c(),s=D(),l=y("div");for(let R=0;R1?O?O.p(R,F):(O=im(R),O.c(),O.m(f,null)):O&&(O.d(1),O=null);let V=h;h=N(R),h===V?L[h].p(R,F):(ue(),P(L[V],1,1,()=>{L[V]=null}),fe(),g=L[h],g?g.p(R,F):(g=L[h]=A[h](R),g.c()),I(g,1),g.m(_.parentNode,_))},i(R){if(!b){I(t.$$.fragment,R);for(let F=0;FCancel',t=D(),i=y("button"),i.innerHTML='Set selection',m(e,"type","button"),m(e,"class","btn btn-transparent"),m(i,"type","button"),m(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[28]),J(i,"click",n[29])],s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,De(l)}}}function c5(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[f5],header:[u5],default:[a5]},$$scope:{ctx:n}};for(let a=0;at(26,h=Fe));const g=Tt(),_="picker_"+U.randomString(5);let{value:b}=e,{field:k}=e,$,C,T="",E=[],M=[],O=1,A=0,L=!1,N=!1;function q(){return t(2,T=""),t(3,E=[]),t(6,M=[]),F(),j(!0),$==null?void 0:$.show()}function R(){return $==null?void 0:$.hide()}async function F(){const Fe=U.toArray(b);if(!s||!Fe.length)return;t(24,N=!0);let Ce=[];const it=Fe.slice(),It=[];for(;it.length>0;){const Vt=[];for(const Ut of it.splice(0,Nr))Vt.push(`id="${Ut}"`);It.push(de.collection(s).getFullList(Nr,{filter:Vt.join("||"),$autoCancel:!1}))}try{await Promise.all(It).then(Vt=>{Ce=Ce.concat(...Vt)}),t(6,M=[]);for(const Vt of Fe){const Ut=U.findByKey(Ce,"id",Vt);Ut&&M.push(Ut)}T.trim()||t(3,E=U.filterDuplicatesByKey(M.concat(E)))}catch(Vt){de.error(Vt)}t(24,N=!1)}async function j(Fe=!1){if(s){t(4,L=!0),Fe&&(T.trim()?t(3,E=[]):t(3,E=U.toArray(M).slice()));try{const Ce=Fe?1:O+1,it=U.getAllCollectionIdentifiers(o),It=await de.collection(s).getList(Ce,Nr,{filter:U.normalizeSearchFilter(T,it),sort:o!=null&&o.$isView?"":"-created",$cancelKey:_+"loadList"});t(3,E=U.filterDuplicatesByKey(E.concat(It.items))),O=It.page,t(23,A=It.totalItems)}catch(Ce){de.error(Ce)}t(4,L=!1)}}function V(Fe){i==1?t(6,M=[Fe]):u&&(U.pushOrReplaceByKey(M,Fe),t(6,M))}function W(Fe){U.removeByKey(M,"id",Fe.id),t(6,M)}function te(Fe){f(Fe)?W(Fe):V(Fe)}function X(){var Fe;i!=1?t(20,b=M.map(Ce=>Ce.id)):t(20,b=((Fe=M==null?void 0:M[0])==null?void 0:Fe.id)||""),g("save",M),R()}function G(Fe){me.call(this,n,Fe)}const ae=()=>R(),Q=()=>X(),se=Fe=>t(2,T=Fe.detail),ve=()=>C==null?void 0:C.show(),$e=Fe=>C==null?void 0:C.show(Fe),ze=Fe=>te(Fe),Ue=(Fe,Ce)=>{(Ce.code==="Enter"||Ce.code==="Space")&&(Ce.preventDefault(),Ce.stopPropagation(),te(Fe))},we=()=>t(2,T=""),Ee=()=>{a&&!L&&j()},Ge=Fe=>W(Fe);function _t(Fe){M=Fe,t(6,M)}function Xe(Fe){ne[Fe?"unshift":"push"](()=>{$=Fe,t(1,$)})}function Ke(Fe){me.call(this,n,Fe)}function Te(Fe){me.call(this,n,Fe)}function ce(Fe){ne[Fe?"unshift":"push"](()=>{C=Fe,t(7,C)})}const He=Fe=>{U.removeByKey(E,"id",Fe.detail.id),E.unshift(Fe.detail),t(3,E),V(Fe.detail)},At=Fe=>{U.removeByKey(E,"id",Fe.detail.id),t(3,E),W(Fe.detail)};return n.$$set=Fe=>{e=je(je({},e),Gt(Fe)),t(19,p=tt(e,d)),"value"in Fe&&t(20,b=Fe.value),"field"in Fe&&t(21,k=Fe.field)},n.$$.update=()=>{var Fe,Ce,it;n.$$.dirty[0]&2097152&&t(5,i=((Fe=k==null?void 0:k.options)==null?void 0:Fe.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(Ce=k==null?void 0:k.options)==null?void 0:Ce.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(it=k==null?void 0:k.options)==null?void 0:it.displayFields),n.$$.dirty[0]&100663296&&t(10,o=h.find(It=>It.id==s)||null),n.$$.dirty[0]&16777222&&typeof T<"u"&&!N&&$!=null&&$.isActive()&&j(!0),n.$$.dirty[0]&16777232&&t(12,r=L||N),n.$$.dirty[0]&8388616&&t(11,a=A>E.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>M.length),n.$$.dirty[0]&64&&t(8,f=function(It){return U.findByKey(M,"id",It.id)})},[R,$,T,E,L,i,M,C,f,u,o,a,r,l,j,V,W,te,X,p,b,k,q,A,N,s,h,G,ae,Q,se,ve,$e,ze,Ue,we,Ee,Ge,_t,Xe,Ke,Te,ce,He,At]}class p5 extends be{constructor(e){super(),ge(this,e,d5,c5,_e,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function lm(n,e,t){const i=n.slice();return i[17]=e[t],i}function om(n,e,t){const i=n.slice();return i[20]=e[t],i}function rm(n){let e,t=n[5]&&am(n);return{c(){t&&t.c(),e=Se()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=am(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function am(n){let e,t=U.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    + `,m(e,"class","list-item")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function fm(n,e){var h;let t,i,s,l,o,r,a,u,f,d;s=new nr({props:{record:e[17],displayFields:(h=e[2].options)==null?void 0:h.displayFields}});function p(){return e[9](e[17])}return{key:n,first:null,c(){t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),r=y("button"),r.innerHTML='',a=D(),m(i,"class","content"),m(r,"type","button"),m(r,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),m(o,"class","actions"),m(t,"class","list-item"),this.first=t},m(g,_){S(g,t,_),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(t,a),u=!0,f||(d=[Oe(Be.call(null,r,"Remove")),J(r,"click",p)],f=!0)},p(g,_){var k;e=g;const b={};_&16&&(b.record=e[17]),_&4&&(b.displayFields=(k=e[2].options)==null?void 0:k.displayFields),s.$set(b)},i(g){u||(I(s.$$.fragment,g),u=!0)},o(g){P(s.$$.fragment,g),u=!1},d(g){g&&w(t),H(s),f=!1,De(d)}}}function m5(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p=[],h=new Map,g,_,b,k,$,C,T=n[4];const E=O=>O[17].id;for(let O=0;O + + Open picker`,m(t,"class",i=os(U.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),m(l,"class","txt"),m(e,"for",a=n[16]),m(d,"class","relations-list svelte-1ynw0pc"),m(b,"type","button"),m(b,"class","btn btn-transparent btn-sm btn-block"),m(_,"class","list-item list-item-btn"),m(f,"class","list")},m(O,A){S(O,e,A),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,A),S(O,f,A),v(f,d);for(let L=0;L({16:r}),({uniqueId:r})=>r?65536:0]},$$scope:{ctx:n}};e=new pe({props:l}),n[11](e);let o={value:n[0],field:n[2]};return i=new p5({props:o}),n[12](i),i.$on("save",n[13]),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&8454199&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(I(e.$$.fragment,r),I(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[11](null),H(e,r),r&&w(t),n[12](null),H(i,r)}}}const cm=100;function _5(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new wn}=e,r,a=[],u=!1,f;function d(){if(u)return!1;const C=U.toArray(s);return t(4,a=a.filter(T=>C.includes(T.id))),C.length!=a.length}async function p(){var M,O;const C=U.toArray(s);if(t(4,a=[]),!((M=o==null?void 0:o.options)!=null&&M.collectionId)||!C.length){t(5,u=!1);return}t(5,u=!0);const T=C.slice(),E=[];for(;T.length>0;){const A=[];for(const L of T.splice(0,cm))A.push(`id="${L}"`);E.push(de.collection((O=o==null?void 0:o.options)==null?void 0:O.collectionId).getFullList(cm,{filter:A.join("||"),$autoCancel:!1}))}try{let A=[];await Promise.all(E).then(L=>{A=A.concat(...L)});for(const L of C){const N=U.findByKey(A,"id",L);N&&a.push(N)}t(4,a)}catch(A){de.error(A)}t(5,u=!1)}function h(C){var T;U.removeByKey(a,"id",C.id),t(4,a),i?t(0,s=a.map(E=>E.id)):t(0,s=((T=a[0])==null?void 0:T.id)||"")}jo(()=>{clearTimeout(f)});const g=C=>h(C),_=()=>l==null?void 0:l.show();function b(C){ne[C?"unshift":"push"](()=>{r=C,t(3,r)})}function k(C){ne[C?"unshift":"push"](()=>{l=C,t(1,l)})}const $=C=>{var T;t(4,a=C.detail||[]),t(0,s=i?a.map(E=>E.id):((T=a[0])==null?void 0:T.id)||"")};return n.$$set=C=>{"value"in C&&t(0,s=C.value),"picker"in C&&t(1,l=C.picker),"field"in C&&t(2,o=C.field)},n.$$.update=()=>{var C;n.$$.dirty&4&&t(6,i=((C=o.options)==null?void 0:C.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed()),n.$$.dirty&273&&d()&&(clearTimeout(f),t(8,f=setTimeout(p,0)))},[s,l,o,r,a,u,i,h,f,g,_,b,k,$]}class g5 extends be{constructor(e){super(),ge(this,e,_5,h5,_e,{value:0,picker:1,field:2})}}const b5=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],v5=(n,e)=>{b5.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function y5(n){let e;return{c(){e=y("textarea"),m(e,"id",n[0]),zr(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&m(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function k5(n){let e;return{c(){e=y("div"),m(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&m(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function w5(n){let e;function t(l,o){return l[1]?k5:y5}let i=t(n),s=i(n);return{c(){e=y("div"),s.c(),m(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&m(e,"class",l[2])},i:ee,o:ee,d(l){l&&w(e),s.d(),n[19](null)}}}const S1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),S5=()=>{let n={listeners:[],scriptId:S1("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let $5=S5();function T5(n,e,t){var i;let{id:s=S1("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:d="change input undo redo"}=e,{value:p=""}=e,{text:h=""}=e,{cssClass:g="tinymce-wrapper"}=e,_,b,k,$=p,C=o;const T=Tt(),E=()=>{const q=(()=>typeof window<"u"?window:global)();return q&&q.tinymce?q.tinymce:null},M=()=>{const N=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:q=>{t(14,k=q),q.on("init",()=>{q.setContent(p),q.on(d,()=>{t(15,$=q.getContent()),$!==p&&(t(5,p=$),t(6,h=q.getContent({format:"text"})))})}),v5(q,T),typeof f.setup=="function"&&f.setup(q)}});t(4,b.style.visibility="",b),E().init(N)};Xt(()=>{if(E()!==null)M();else{const N=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;$5.load(_.ownerDocument,N,()=>{M()})}}),jo(()=>{var N;k&&((N=E())===null||N===void 0||N.remove(k))});function O(N){ne[N?"unshift":"push"](()=>{b=N,t(4,b)})}function A(N){ne[N?"unshift":"push"](()=>{b=N,t(4,b)})}function L(N){ne[N?"unshift":"push"](()=>{_=N,t(3,_)})}return n.$$set=N=>{"id"in N&&t(0,s=N.id),"inline"in N&&t(1,l=N.inline),"disabled"in N&&t(7,o=N.disabled),"apiKey"in N&&t(8,r=N.apiKey),"channel"in N&&t(9,a=N.channel),"scriptSrc"in N&&t(10,u=N.scriptSrc),"conf"in N&&t(11,f=N.conf),"modelEvents"in N&&t(12,d=N.modelEvents),"value"in N&&t(5,p=N.value),"text"in N&&t(6,h=N.text),"cssClass"in N&&t(2,g=N.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(k&&$!==p&&(k.setContent(p),t(6,h=k.getContent({format:"text"}))),k&&o!==C&&(t(16,C=o),typeof(t(13,i=k.mode)===null||i===void 0?void 0:i.set)=="function"?k.mode.set(o?"readonly":"design"):k.setMode(o?"readonly":"design")))},[s,l,g,_,b,p,h,o,r,a,u,f,d,i,k,$,C,O,A,L]}class pu extends be{constructor(e){super(),ge(this,e,T5,w5,_e,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function C5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function h(_){n[2](_)}let g={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:U.defaultEditorOptions()};return n[0]!==void 0&&(g.value=n[0]),f=new pu({props:g}),ne.push(()=>he(f,"value",h)),{c(){e=y("label"),t=y("i"),s=D(),l=y("span"),r=Y(o),u=D(),B(f.$$.fragment),m(t,"class",i=U.getFieldTypeIcon(n[1].type)),m(l,"class","txt"),m(e,"for",a=n[3])},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),z(f,_,b),p=!0},p(_,b){(!p||b&2&&i!==(i=U.getFieldTypeIcon(_[1].type)))&&m(t,"class",i),(!p||b&2)&&o!==(o=_[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=_[3]))&&m(e,"for",a);const k={};b&8&&(k.id=_[3]),!d&&b&1&&(d=!0,k.value=_[0],ye(()=>d=!1)),f.$set(k)},i(_){p||(I(f.$$.fragment,_),p=!0)},o(_){P(f.$$.fragment,_),p=!1},d(_){_&&w(e),_&&w(u),H(f,_)}}}function M5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[C5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function E5(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class O5 extends be{constructor(e){super(),ge(this,e,E5,M5,_e,{field:1,value:0})}}function D5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Auth URL"),s=D(),l=y("input"),m(e,"for",i=n[5]),m(l,"type","url"),m(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].authUrl),r||(a=J(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&m(e,"for",i),f&32&&o!==(o=u[5])&&m(l,"id",o),f&1&&l.value!==u[0].authUrl&&re(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function A5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Token URL"),s=D(),l=y("input"),m(e,"for",i=n[5]),m(l,"type","url"),m(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].tokenUrl),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&m(e,"for",i),f&32&&o!==(o=u[5])&&m(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&re(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function I5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("User API URL"),s=D(),l=y("input"),m(e,"for",i=n[5]),m(l,"type","url"),m(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].userApiUrl),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&m(e,"for",i),f&32&&o!==(o=u[5])&&m(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&re(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function L5(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[D5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[A5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[I5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Selfhosted endpoints (optional)",t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment),o=D(),B(r.$$.fragment),m(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const h={};f&2&&(h.name=u[1]+".userApiUrl"),f&97&&(h.$$scope={dirty:f,ctx:u}),r.$set(h)},i(u){a||(I(i.$$.fragment,u),I(l.$$.fragment,u),I(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),H(i,u),u&&w(s),H(l,u),u&&w(o),H(r,u)}}}function P5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class dm extends be{constructor(e){super(),ge(this,e,P5,L5,_e,{key:1,config:0})}}function F5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Auth URL"),s=D(),l=y("input"),a=D(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",m(e,"for",i=n[4]),m(l,"type","url"),m(l,"id",o=n[4]),l.required=r=n[0].enabled,m(u,"class","help-block")},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[0].authUrl),S(p,a,h),S(p,u,h),f||(d=J(l,"input",n[2]),f=!0)},p(p,h){h&16&&i!==(i=p[4])&&m(e,"for",i),h&16&&o!==(o=p[4])&&m(l,"id",o),h&1&&r!==(r=p[0].enabled)&&(l.required=r),h&1&&l.value!==p[0].authUrl&&re(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function N5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Token URL"),s=D(),l=y("input"),a=D(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",m(e,"for",i=n[4]),m(l,"type","url"),m(l,"id",o=n[4]),l.required=r=n[0].enabled,m(u,"class","help-block")},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[0].tokenUrl),S(p,a,h),S(p,u,h),f||(d=J(l,"input",n[3]),f=!0)},p(p,h){h&16&&i!==(i=p[4])&&m(e,"for",i),h&16&&o!==(o=p[4])&&m(l,"id",o),h&1&&r!==(r=p[0].enabled)&&(l.required=r),h&1&&l.value!==p[0].tokenUrl&&re(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function R5(n){let e,t,i,s,l,o;return i=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[F5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[N5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Azure AD endpoints",t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment),m(e,"class","section-title")},m(r,a){S(r,e,a),S(r,t,a),z(i,r,a),S(r,s,a),z(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(I(i.$$.fragment,r),I(l.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function q5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class j5 extends be{constructor(e){super(),ge(this,e,q5,R5,_e,{key:1,config:0})}}function V5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Auth URL"),s=D(),l=y("input"),a=D(),u=y("div"),u.textContent="Eg. https://example.com/authorize/",m(e,"for",i=n[5]),m(l,"type","url"),m(l,"id",o=n[5]),l.required=r=n[0].enabled,m(u,"class","help-block")},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[0].authUrl),S(p,a,h),S(p,u,h),f||(d=J(l,"input",n[2]),f=!0)},p(p,h){h&32&&i!==(i=p[5])&&m(e,"for",i),h&32&&o!==(o=p[5])&&m(l,"id",o),h&1&&r!==(r=p[0].enabled)&&(l.required=r),h&1&&l.value!==p[0].authUrl&&re(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function z5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Token URL"),s=D(),l=y("input"),a=D(),u=y("div"),u.textContent="Eg. https://example.com/token/",m(e,"for",i=n[5]),m(l,"type","url"),m(l,"id",o=n[5]),l.required=r=n[0].enabled,m(u,"class","help-block")},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[0].tokenUrl),S(p,a,h),S(p,u,h),f||(d=J(l,"input",n[3]),f=!0)},p(p,h){h&32&&i!==(i=p[5])&&m(e,"for",i),h&32&&o!==(o=p[5])&&m(l,"id",o),h&1&&r!==(r=p[0].enabled)&&(l.required=r),h&1&&l.value!==p[0].tokenUrl&&re(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function H5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("User API URL"),s=D(),l=y("input"),a=D(),u=y("div"),u.textContent="Eg. https://example.com/userinfo/",m(e,"for",i=n[5]),m(l,"type","url"),m(l,"id",o=n[5]),l.required=r=n[0].enabled,m(u,"class","help-block")},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[0].userApiUrl),S(p,a,h),S(p,u,h),f||(d=J(l,"input",n[4]),f=!0)},p(p,h){h&32&&i!==(i=p[5])&&m(e,"for",i),h&32&&o!==(o=p[5])&&m(l,"id",o),h&1&&r!==(r=p[0].enabled)&&(l.required=r),h&1&&l.value!==p[0].userApiUrl&&re(l,p[0].userApiUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function B5(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[V5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[z5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[H5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Endpoints",t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment),o=D(),B(r.$$.fragment),m(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(u[0].enabled?"required":"")),f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const h={};f&1&&(h.class="form-field "+(u[0].enabled?"required":"")),f&2&&(h.name=u[1]+".userApiUrl"),f&97&&(h.$$scope={dirty:f,ctx:u}),r.$set(h)},i(u){a||(I(i.$$.fragment,u),I(l.$$.fragment,u),I(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),H(i,u),u&&w(s),H(l,u),u&&w(o),H(r,u)}}}function U5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Rr extends be{constructor(e){super(),ge(this,e,U5,B5,_e,{key:1,config:0})}}function W5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Client ID"),s=D(),l=y("input"),m(e,"for",i=n[23]),m(l,"type","text"),m(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[2]),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&m(e,"for",i),f&8388608&&o!==(o=u[23])&&m(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Y5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Team ID"),s=D(),l=y("input"),m(e,"for",i=n[23]),m(l,"type","text"),m(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[3]),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&m(e,"for",i),f&8388608&&o!==(o=u[23])&&m(l,"id",o),f&8&&l.value!==u[3]&&re(l,u[3])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function K5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Key ID"),s=D(),l=y("input"),m(e,"for",i=n[23]),m(l,"type","text"),m(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[4]),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&m(e,"for",i),f&8388608&&o!==(o=u[23])&&m(l,"id",o),f&16&&l.value!==u[4]&&re(l,u[4])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function J5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("span"),t.textContent="Duration (in seconds)",i=D(),s=y("i"),o=D(),r=y("input"),m(t,"class","txt"),m(s,"class","ri-information-line link-hint"),m(e,"for",l=n[23]),m(r,"type","text"),m(r,"id",a=n[23]),m(r,"max",po),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),re(r,n[6]),u||(f=[Oe(Be.call(null,s,{text:`Max ${po} seconds (~${po/(60*60*24*30)<<0} months).`,position:"top"})),J(r,"input",n[15])],u=!0)},p(d,p){p&8388608&&l!==(l=d[23])&&m(e,"for",l),p&8388608&&a!==(a=d[23])&&m(r,"id",a),p&64&&r.value!==d[6]&&re(r,d[6])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,De(f)}}}function Z5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Private key"),s=D(),l=y("textarea"),r=D(),a=y("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",m(e,"for",i=n[23]),m(l,"id",o=n[23]),l.required=!0,m(l,"rows","8"),m(l,"placeholder",`-----BEGIN PRIVATE KEY----- +... +-----END PRIVATE KEY-----`),m(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),re(l,n[5]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[16]),u=!0)},p(d,p){p&8388608&&i!==(i=d[23])&&m(e,"for",i),p&8388608&&o!==(o=d[23])&&m(l,"id",o),p&32&&re(l,d[5])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function G5(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$;return s=new pe({props:{class:"form-field required",name:"clientId",$$slots:{default:[W5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"teamId",$$slots:{default:[Y5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field required",name:"keyId",$$slots:{default:[K5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field required",name:"duration",$$slots:{default:[J5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),_=new pe({props:{class:"form-field required",name:"privateKey",$$slots:{default:[Z5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),B(r.$$.fragment),a=D(),u=y("div"),B(f.$$.fragment),d=D(),p=y("div"),B(h.$$.fragment),g=D(),B(_.$$.fragment),m(i,"class","col-lg-6"),m(o,"class","col-lg-6"),m(u,"class","col-lg-6"),m(p,"class","col-lg-6"),m(t,"class","grid"),m(e,"id",n[9]),m(e,"autocomplete","off")},m(C,T){S(C,e,T),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),v(t,a),v(t,u),z(f,u,null),v(t,d),v(t,p),z(h,p,null),v(t,g),z(_,t,null),b=!0,k||($=J(e,"submit",xe(n[17])),k=!0)},p(C,T){const E={};T&25165828&&(E.$$scope={dirty:T,ctx:C}),s.$set(E);const M={};T&25165832&&(M.$$scope={dirty:T,ctx:C}),r.$set(M);const O={};T&25165840&&(O.$$scope={dirty:T,ctx:C}),f.$set(O);const A={};T&25165888&&(A.$$scope={dirty:T,ctx:C}),h.$set(A);const L={};T&25165856&&(L.$$scope={dirty:T,ctx:C}),_.$set(L)},i(C){b||(I(s.$$.fragment,C),I(r.$$.fragment,C),I(f.$$.fragment,C),I(h.$$.fragment,C),I(_.$$.fragment,C),b=!0)},o(C){P(s.$$.fragment,C),P(r.$$.fragment,C),P(f.$$.fragment,C),P(h.$$.fragment,C),P(_.$$.fragment,C),b=!1},d(C){C&&w(e),H(s),H(r),H(f),H(h),H(_),k=!1,$()}}}function X5(n){let e;return{c(){e=y("h4"),e.textContent="Generate Apple client secret",m(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Q5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=Y("Close"),i=D(),s=y("button"),l=y("i"),o=D(),r=y("span"),r.textContent="Generate and set secret",m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[7],m(l,"class","ri-key-line"),m(r,"class","txt"),m(s,"type","submit"),m(s,"form",n[9]),m(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],x(s,"btn-loading",n[7])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&128&&(e.disabled=d[7]),p&384&&a!==(a=!d[8]||d[7])&&(s.disabled=a),p&128&&x(s,"btn-loading",d[7])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function x5(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[Q5],header:[X5],default:[G5]},$$scope:{ctx:n}};return e=new on({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[19](null),H(e,s)}}}const po=15777e3;function eE(n,e,t){let i;const s=Tt(),l="apple_secret_"+U.randomString(5);let o,r,a,u,f,d,p=!1;function h(N={}){t(2,r=N.clientId||""),t(3,a=N.teamId||""),t(4,u=N.keyId||""),t(5,f=N.privateKey||""),t(6,d=N.duration||po),tn({}),o==null||o.show()}function g(){return o==null?void 0:o.hide()}async function _(){t(7,p=!0);try{const N=await de.settings.generateAppleClientSecret(r,a,u,f.trim(),d);t(7,p=!1),Ht("Successfully generated client secret."),s("submit",N),o==null||o.hide()}catch(N){de.error(N)}t(7,p=!1)}function b(){r=this.value,t(2,r)}function k(){a=this.value,t(3,a)}function $(){u=this.value,t(4,u)}function C(){d=this.value,t(6,d)}function T(){f=this.value,t(5,f)}const E=()=>_(),M=()=>!p;function O(N){ne[N?"unshift":"push"](()=>{o=N,t(1,o)})}function A(N){me.call(this,n,N)}function L(N){me.call(this,n,N)}return t(8,i=!0),[g,o,r,a,u,f,d,p,i,l,_,h,b,k,$,C,T,E,M,O,A,L]}class tE extends be{constructor(e){super(),ge(this,e,eE,x5,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function nE(n){let e,t,i,s,l,o,r,a,u,f,d={};return r=new tE({props:d}),n[4](r),r.$on("submit",n[5]),{c(){e=y("button"),t=y("i"),i=D(),s=y("span"),s.textContent="Generate secret",o=D(),B(r.$$.fragment),m(t,"class","ri-key-line"),m(s,"class","txt"),m(e,"type","button"),m(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(p,h){S(p,e,h),v(e,t),v(e,i),v(e,s),S(p,o,h),z(r,p,h),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(p,[h]){(!a||h&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+p[1]))&&m(e,"class",l);const g={};r.$set(g)},i(p){a||(I(r.$$.fragment,p),a=!0)},o(p){P(r.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(o),n[4](null),H(r,p),u=!1,f()}}}function iE(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){ne[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class sE extends be{constructor(e){super(),ge(this,e,iE,nE,_e,{key:1,config:0})}}const mo=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:sE},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:j5},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:dm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:dm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Rr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Rr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Rr}];function pm(n,e,t){const i=n.slice();return i[9]=e[t],i}function lE(n){let e;return{c(){e=y("h6"),e.textContent="No linked OAuth2 providers.",m(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function oE(n){let e,t=n[1],i=[];for(let s=0;s',m(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function mm(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,d,p=n[9].providerId+"",h,g,_,b,k,$;function C(){return n[6](n[9])}return{c(){var T;e=y("div"),t=y("figure"),i=y("img"),l=D(),o=y("span"),a=Y(r),u=D(),f=y("div"),d=Y("ID: "),h=Y(p),g=D(),_=y("button"),_.innerHTML='',b=D(),_n(i.src,s="./images/oauth2/"+((T=n[3](n[9].provider))==null?void 0:T.logo))||m(i,"src",s),m(i,"alt","Provider logo"),m(t,"class","provider-logo"),m(o,"class","txt"),m(f,"class","txt-hint"),m(_,"type","button"),m(_,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),m(e,"class","list-item")},m(T,E){S(T,e,E),v(e,t),v(t,i),v(e,l),v(e,o),v(o,a),v(e,u),v(e,f),v(f,d),v(f,h),v(e,g),v(e,_),v(e,b),k||($=J(_,"click",C),k=!0)},p(T,E){var M;n=T,E&2&&!_n(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&m(i,"src",s),E&2&&r!==(r=n[4](n[9].provider)+"")&&le(a,r),E&2&&p!==(p=n[9].providerId+"")&&le(h,p)},d(T){T&&w(e),k=!1,$()}}}function aE(n){let e;function t(l,o){var r;return l[2]?rE:(r=l[0])!=null&&r.id&&l[1].length?oE:lE}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function uE(n,e,t){const i=Tt();let{record:s}=e,l=[],o=!1;function r(p){return mo.find(h=>h.key==p+"Auth")||{}}function a(p){var h;return((h=r(p))==null?void 0:h.title)||U.sentenize(p,!1)}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await de.collection(s.collectionId).listExternalAuths(s.id))}catch(p){de.error(p)}t(2,o=!1)}function f(p){!(s!=null&&s.id)||!p||mn(`Do you really want to unlink the ${a(p)} provider?`,()=>de.collection(s.collectionId).unlinkExternalAuth(s.id,p).then(()=>{Ht(`Successfully unlinked the ${a(p)} provider.`),i("unlink",p),u()}).catch(h=>{de.error(h)}))}u();const d=p=>f(p.provider);return n.$$set=p=>{"record"in p&&t(0,s=p.record)},[s,l,o,r,a,f,d]}class fE extends be{constructor(e){super(),ge(this,e,uE,aE,_e,{record:0})}}function hm(n,e,t){const i=n.slice();return i[66]=e[t],i[67]=e,i[68]=t,i}function _m(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=D(),l=y("div"),o=Y(`The record has previous unsaved changes. + `),r=y("button"),r.textContent="Restore draft",a=D(),u=y("button"),u.innerHTML='',f=D(),d=y("div"),m(i,"class","icon"),m(r,"type","button"),m(r,"class","btn btn-sm btn-secondary"),m(l,"class","content"),m(u,"type","button"),m(u,"class","close"),m(u,"aria-label","Discard draft"),m(t,"class","alert alert-info m-0"),m(d,"class","clearfix p-b-base"),m(e,"class","block")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(t,a),v(t,u),v(e,f),v(e,d),h=!0,g||(_=[J(r,"click",n[36]),Oe(Be.call(null,u,"Discard draft")),J(u,"click",xe(n[37]))],g=!0)},p:ee,i(b){h||(p&&p.end(1),h=!0)},o(b){p=$a(e,rt,{duration:150}),h=!1},d(b){b&&w(e),b&&p&&p.end(),g=!1,De(_)}}}function gm(n){let e,t,i,s,l;return{c(){e=y("div"),t=y("i"),m(t,"class","ri-calendar-event-line txt-disabled"),m(e,"class","form-field-addon")},m(o,r){S(o,e,r),v(e,t),s||(l=Oe(i=Be.call(null,t,{text:`Created: ${n[3].created} +Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&jt(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created} +Updated: ${o[3].updated}`,position:"left"})},d(o){o&&w(e),s=!1,l()}}}function cE(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_=!n[6]&&gm(n);return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="id",l=D(),o=y("span"),a=D(),_&&_.c(),u=D(),f=y("input"),m(t,"class",os(U.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),m(s,"class","txt"),m(o,"class","flex-fill"),m(e,"for",r=n[69]),m(f,"type","text"),m(f,"id",d=n[69]),m(f,"placeholder","Leave empty to auto generate..."),m(f,"minlength","15"),f.readOnly=p=!n[6]},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),S(b,a,k),_&&_.m(b,k),S(b,u,k),S(b,f,k),re(f,n[3].id),h||(g=J(f,"input",n[38]),h=!0)},p(b,k){k[2]&128&&r!==(r=b[69])&&m(e,"for",r),b[6]?_&&(_.d(1),_=null):_?_.p(b,k):(_=gm(b),_.c(),_.m(u.parentNode,u)),k[2]&128&&d!==(d=b[69])&&m(f,"id",d),k[0]&64&&p!==(p=!b[6])&&(f.readOnly=p),k[0]&8&&f.value!==b[3].id&&re(f,b[3].id)},d(b){b&&w(e),b&&w(a),_&&_.d(b),b&&w(u),b&&w(f),h=!1,g()}}}function bm(n){var u,f;let e,t,i,s,l;function o(d){n[39](d)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new VM({props:r}),ne.push(()=>he(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&vm();return{c(){B(e.$$.fragment),i=D(),a&&a.c(),s=Se()},m(d,p){z(e,d,p),S(d,i,p),a&&a.m(d,p),S(d,s,p),l=!0},p(d,p){var g,_;const h={};p[0]&64&&(h.isNew=d[6]),p[0]&1&&(h.collection=d[0]),!t&&p[0]&8&&(t=!0,h.record=d[3],ye(()=>t=!1)),e.$set(h),(_=(g=d[0])==null?void 0:g.schema)!=null&&_.length?a||(a=vm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(d){l||(I(e.$$.fragment,d),l=!0)},o(d){P(e.$$.fragment,d),l=!1},d(d){H(e,d),d&&w(i),a&&a.d(d),d&&w(s)}}}function vm(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function dE(n){let e,t,i;function s(o){n[52](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new g5({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function pE(n){let e,t,i,s,l;function o(f){n[49](f,n[66])}function r(f){n[50](f,n[66])}function a(f){n[51](f,n[66])}let u={field:n[66],record:n[3]};return n[3][n[66].name]!==void 0&&(u.value=n[3][n[66].name]),n[4][n[66].name]!==void 0&&(u.uploadedFiles=n[4][n[66].name]),n[5][n[66].name]!==void 0&&(u.deletedFileIndexes=n[5][n[66].name]),e=new K6({props:u}),ne.push(()=>he(e,"value",o)),ne.push(()=>he(e,"uploadedFiles",r)),ne.push(()=>he(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,d){z(e,f,d),l=!0},p(f,d){n=f;const p={};d[0]&1&&(p.field=n[66]),d[0]&8&&(p.record=n[3]),!t&&d[0]&9&&(t=!0,p.value=n[3][n[66].name],ye(()=>t=!1)),!i&&d[0]&17&&(i=!0,p.uploadedFiles=n[4][n[66].name],ye(()=>i=!1)),!s&&d[0]&33&&(s=!0,p.deletedFileIndexes=n[5][n[66].name],ye(()=>s=!1)),e.$set(p)},i(f){l||(I(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function mE(n){let e,t,i;function s(o){n[48](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new k6({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function hE(n){let e,t,i;function s(o){n[47](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new g6({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _E(n){let e,t,i;function s(o){n[46](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new p6({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function gE(n){let e,t,i;function s(o){n[45](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new O5({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function bE(n){let e,t,i;function s(o){n[44](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new u6({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function vE(n){let e,t,i;function s(o){n[43](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new l6({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function yE(n){let e,t,i;function s(o){n[42](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new t6({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function kE(n){let e,t,i;function s(o){n[41](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new XM({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function wE(n){let e,t,i;function s(o){n[40](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new KM({props:l}),ne.push(()=>he(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function ym(n,e){let t,i,s,l,o;const r=[wE,kE,yE,vE,bE,gE,_E,hE,mE,pE,dE],a=[];function u(f,d){return f[66].type==="text"?0:f[66].type==="number"?1:f[66].type==="bool"?2:f[66].type==="email"?3:f[66].type==="url"?4:f[66].type==="editor"?5:f[66].type==="date"?6:f[66].type==="select"?7:f[66].type==="json"?8:f[66].type==="file"?9:f[66].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Se(),s&&s.c(),l=Se(),this.first=t},m(f,d){S(f,t,d),~i&&a[i].m(f,d),S(f,l,d),o=!0},p(f,d){e=f;let p=i;i=u(e),i===p?~i&&a[i].p(e,d):(s&&(ue(),P(a[p],1,1,()=>{a[p]=null}),fe()),~i?(s=a[i],s?s.p(e,d):(s=a[i]=r[i](e),s.c()),I(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(I(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function km(n){let e,t,i;return t=new fE({props:{record:n[3]}}),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","tab-item"),x(e,"active",n[12]===Sl)},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&x(e,"active",s[12]===Sl)},i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function SE(n){var $,C;let e,t,i,s,l,o,r=[],a=new Map,u,f,d,p,h=!n[7]&&n[9]&&_m(n);s=new pe({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[cE,({uniqueId:T})=>({69:T}),({uniqueId:T})=>[0,0,T?128:0]]},$$scope:{ctx:n}}});let g=(($=n[0])==null?void 0:$.isAuth)&&bm(n),_=((C=n[0])==null?void 0:C.schema)||[];const b=T=>T[66].name;for(let T=0;T<_.length;T+=1){let E=hm(n,_,T),M=b(E);a.set(M,r[T]=ym(M,E))}let k=n[0].$isAuth&&!n[6]&&km(n);return{c(){e=y("div"),t=y("form"),h&&h.c(),i=D(),B(s.$$.fragment),l=D(),g&&g.c(),o=D();for(let T=0;T{h=null}),fe());const M={};E[0]&64&&(M.class="form-field "+(T[6]?"":"readonly")),E[0]&72|E[2]&384&&(M.$$scope={dirty:E,ctx:T}),s.$set(M),(O=T[0])!=null&&O.isAuth?g?(g.p(T,E),E[0]&1&&I(g,1)):(g=bm(T),g.c(),I(g,1),g.m(t,o)):g&&(ue(),P(g,1,1,()=>{g=null}),fe()),E[0]&57&&(_=((A=T[0])==null?void 0:A.schema)||[],ue(),r=yt(r,E,b,1,T,_,a,t,Kt,ym,null,hm),fe()),(!f||E[0]&4096)&&x(t,"active",T[12]===ls),T[0].$isAuth&&!T[6]?k?(k.p(T,E),E[0]&65&&I(k,1)):(k=km(T),k.c(),I(k,1),k.m(e,null)):k&&(ue(),P(k,1,1,()=>{k=null}),fe())},i(T){if(!f){I(h),I(s.$$.fragment,T),I(g);for(let E=0;E<_.length;E+=1)I(r[E]);I(k),f=!0}},o(T){P(h),P(s.$$.fragment,T),P(g);for(let E=0;E + Send verification email`,m(e,"type","button"),m(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[30]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function $m(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Send password reset email`,m(e,"type","button"),m(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function $E(n){let e,t,i,s,l,o,r,a=n[0].$isAuth&&!n[2].verified&&n[2].email&&Sm(n),u=n[0].$isAuth&&n[2].email&&$m(n);return{c(){a&&a.c(),e=D(),u&&u.c(),t=D(),i=y("button"),i.innerHTML=` + Duplicate`,s=D(),l=y("button"),l.innerHTML=` + Delete`,m(i,"type","button"),m(i,"class","dropdown-item closable"),m(l,"type","button"),m(l,"class","dropdown-item txt-danger closable")},m(f,d){a&&a.m(f,d),S(f,e,d),u&&u.m(f,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),o||(r=[J(i,"click",n[32]),J(l,"click",In(xe(n[33])))],o=!0)},p(f,d){f[0].$isAuth&&!f[2].verified&&f[2].email?a?a.p(f,d):(a=Sm(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].$isAuth&&f[2].email?u?u.p(f,d):(u=$m(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,De(r)}}}function Tm(n){let e,t,i,s,l,o;return{c(){e=y("div"),t=y("button"),t.textContent="Account",i=D(),s=y("button"),s.textContent="Authorized providers",m(t,"type","button"),m(t,"class","tab-item"),x(t,"active",n[12]===ls),m(s,"type","button"),m(s,"class","tab-item"),x(s,"active",n[12]===Sl),m(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),l||(o=[J(t,"click",n[34]),J(s,"click",n[35])],l=!0)},p(r,a){a[0]&4096&&x(t,"active",r[12]===ls),a[0]&4096&&x(s,"active",r[12]===Sl)},d(r){r&&w(e),l=!1,De(o)}}}function TE(n){var _;let e,t=n[6]?"New":"Edit",i,s,l,o=((_=n[0])==null?void 0:_.name)+"",r,a,u,f,d,p,h=!n[6]&&wm(n),g=n[0].$isAuth&&!n[6]&&Tm(n);return{c(){e=y("h4"),i=Y(t),s=D(),l=y("strong"),r=Y(o),a=Y(" record"),u=D(),h&&h.c(),f=D(),g&&g.c(),d=Se(),m(e,"class","panel-title svelte-qc5ngu")},m(b,k){S(b,e,k),v(e,i),v(e,s),v(e,l),v(l,r),v(e,a),S(b,u,k),h&&h.m(b,k),S(b,f,k),g&&g.m(b,k),S(b,d,k),p=!0},p(b,k){var $;(!p||k[0]&64)&&t!==(t=b[6]?"New":"Edit")&&le(i,t),(!p||k[0]&1)&&o!==(o=(($=b[0])==null?void 0:$.name)+"")&&le(r,o),b[6]?h&&(ue(),P(h,1,1,()=>{h=null}),fe()):h?(h.p(b,k),k[0]&64&&I(h,1)):(h=wm(b),h.c(),I(h,1),h.m(f.parentNode,f)),b[0].$isAuth&&!b[6]?g?g.p(b,k):(g=Tm(b),g.c(),g.m(d.parentNode,d)):g&&(g.d(1),g=null)},i(b){p||(I(h),p=!0)},o(b){P(h),p=!1},d(b){b&&w(e),b&&w(u),h&&h.d(b),b&&w(f),g&&g.d(b),b&&w(d)}}}function CE(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=D(),s=y("button"),l=y("span"),r=Y(o),m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[10],m(l,"class","txt"),m(s,"type","submit"),m(s,"form",n[15]),m(s,"class","btn btn-expanded"),s.disabled=a=!n[13]||n[10],x(s,"btn-loading",n[10])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=J(e,"click",n[29]),u=!0)},p(d,p){p[0]&1024&&(e.disabled=d[10]),p[0]&64&&o!==(o=d[6]?"Create":"Save changes")&&le(r,o),p[0]&9216&&a!==(a=!d[13]||d[10])&&(s.disabled=a),p[0]&1024&&x(s,"btn-loading",d[10])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function ME(n){var s;let e,t,i={class:` + record-panel + `+(n[14]?"overlay-panel-xl":"overlay-panel-lg")+` + `+((s=n[0])!=null&&s.$isAuth&&!n[6]?"colored-header":"")+` + `,beforeHide:n[53],$$slots:{footer:[CE],header:[TE],default:[SE]},$$scope:{ctx:n}};return e=new on({props:i}),n[54](e),e.$on("hide",n[55]),e.$on("show",n[56]),{c(){B(e.$$.fragment)},m(l,o){z(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&16449&&(r.class=` + record-panel + `+(l[14]?"overlay-panel-xl":"overlay-panel-lg")+` + `+((a=l[0])!=null&&a.$isAuth&&!l[6]?"colored-header":"")+` + `),o[0]&2176&&(r.beforeHide=l[53]),o[0]&14077|o[2]&256&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(I(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[54](null),H(e,l)}}}const ls="form",Sl="providers";function EE(n,e,t){let i,s,l,o;const r=Tt(),a="record_"+U.randomString(5);let{collection:u}=e,f,d=null,p=null,h=null,g=!1,_=!1,b={},k={},$=JSON.stringify(null),C=$,T=ls,E=!0,M=!1;function O(ke){return L(ke),t(11,_=!0),t(12,T=ls),f==null?void 0:f.show()}function A(){return f==null?void 0:f.hide()}async function L(ke){t(27,M=!1),tn({}),t(2,d=ke||new wi),t(3,p=d.$clone()),t(4,b={}),t(5,k={}),await cn(),t(9,h=R()),!h||V(p,h)?t(9,h=null):(delete h.password,delete h.passwordConfirm),t(25,$=JSON.stringify(p)),t(27,M=!0)}async function N(ke){var Re,Qe;tn({}),t(2,d=ke||new wi),t(4,b={}),t(5,k={});const Ie=((Qe=(Re=u==null?void 0:u.schema)==null?void 0:Re.filter(Ot=>Ot.type!="file"))==null?void 0:Qe.map(Ot=>Ot.name))||[];for(let Ot in ke.$export())Ie.includes(Ot)||t(3,p[Ot]=ke[Ot],p);await cn(),t(25,$=JSON.stringify(p)),W()}function q(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function R(ke){try{const Ie=window.localStorage.getItem(q());if(Ie)return new wi(JSON.parse(Ie))}catch{}return ke}function F(ke){window.localStorage.setItem(q(),ke)}function j(){h&&(t(3,p=h),t(9,h=null))}function V(ke,Ie){var Tn;const Re=ke==null?void 0:ke.$clone(),Qe=Ie==null?void 0:Ie.$clone(),Ot=(Tn=u==null?void 0:u.schema)==null?void 0:Tn.filter(Nn=>Nn.type==="file");for(let Nn of Ot)Re==null||delete Re[Nn.name],Qe==null||delete Qe[Nn.name];return Re==null||delete Re.password,Re==null||delete Re.passwordConfirm,Qe==null||delete Qe.password,Qe==null||delete Qe.passwordConfirm,JSON.stringify(Re)==JSON.stringify(Qe)}function W(){t(9,h=null),window.localStorage.removeItem(q())}function te(ke=!0){if(g||!o||!(u!=null&&u.id))return;t(10,g=!0);const Ie=G();let Re;E?Re=de.collection(u.id).create(Ie):Re=de.collection(u.id).update(p.id,Ie),Re.then(Qe=>{Ht(E?"Successfully created record.":"Successfully updated record."),W(),ke?(t(11,_=!1),A()):N(Qe),r("save",Qe)}).catch(Qe=>{de.error(Qe)}).finally(()=>{t(10,g=!1)})}function X(){d!=null&&d.id&&mn("Do you really want to delete the selected record?",()=>de.collection(d.collectionId).delete(d.id).then(()=>{A(),Ht("Successfully deleted record."),r("delete",d)}).catch(ke=>{de.error(ke)}))}function G(){const ke=(p==null?void 0:p.$export())||{},Ie=new FormData,Re={id:ke.id};for(const Qe of(u==null?void 0:u.schema)||[])Re[Qe.name]=!0;u!=null&&u.isAuth&&(Re.username=!0,Re.email=!0,Re.emailVisibility=!0,Re.password=!0,Re.passwordConfirm=!0,Re.verified=!0);for(const Qe in ke)Re[Qe]&&(typeof ke[Qe]>"u"&&(ke[Qe]=null),U.addValueToFormData(Ie,Qe,ke[Qe]));for(const Qe in b){const Ot=U.toArray(b[Qe]);for(const Tn of Ot)Ie.append(Qe,Tn)}for(const Qe in k){const Ot=U.toArray(k[Qe]);for(const Tn of Ot)Ie.append(Qe+"."+Tn,"")}return Ie}function ae(){!(u!=null&&u.id)||!(d!=null&&d.email)||mn(`Do you really want to sent verification email to ${d.email}?`,()=>de.collection(u.id).requestVerification(d.email).then(()=>{Ht(`Successfully sent verification email to ${d.email}.`)}).catch(ke=>{de.error(ke)}))}function Q(){!(u!=null&&u.id)||!(d!=null&&d.email)||mn(`Do you really want to sent password reset email to ${d.email}?`,()=>de.collection(u.id).requestPasswordReset(d.email).then(()=>{Ht(`Successfully sent password reset email to ${d.email}.`)}).catch(ke=>{de.error(ke)}))}function se(){l?mn("You have unsaved changes. Do you really want to discard them?",()=>{ve()}):ve()}async function ve(){const ke=d==null?void 0:d.$clone();if(ke){ke.id="",ke.created="",ke.updated="";const Ie=(u==null?void 0:u.schema)||[];for(const Re of Ie)Re.type==="file"&&delete ke[Re.name]}W(),O(ke),await cn(),t(25,$="")}function $e(ke){(ke.ctrlKey||ke.metaKey)&&ke.code=="KeyS"&&(ke.preventDefault(),ke.stopPropagation(),te(!1))}const ze=()=>A(),Ue=()=>ae(),we=()=>Q(),Ee=()=>se(),Ge=()=>X(),_t=()=>t(12,T=ls),Xe=()=>t(12,T=Sl),Ke=()=>j(),Te=()=>W();function ce(){p.id=this.value,t(3,p)}function He(ke){p=ke,t(3,p)}function At(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function Fe(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function Ce(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function it(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function It(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function Vt(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function Ut(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function Pn(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function ti(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function $n(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}function gt(ke,Ie){n.$$.not_equal(b[Ie.name],ke)&&(b[Ie.name]=ke,t(4,b))}function Fn(ke,Ie){n.$$.not_equal(k[Ie.name],ke)&&(k[Ie.name]=ke,t(5,k))}function ps(ke,Ie){n.$$.not_equal(p[Ie.name],ke)&&(p[Ie.name]=ke,t(3,p))}const ni=()=>l&&_?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,_=!1),A()}),!1):(tn({}),W(),!0);function Ei(ke){ne[ke?"unshift":"push"](()=>{f=ke,t(8,f)})}function ms(ke){me.call(this,n,ke)}function mi(ke){me.call(this,n,ke)}return n.$$set=ke=>{"collection"in ke&&t(0,u=ke.collection)},n.$$.update=()=>{var ke;n.$$.dirty[0]&1&&t(14,i=!!((ke=u==null?void 0:u.schema)!=null&&ke.find(Ie=>Ie.type==="editor"))),n.$$.dirty[0]&48&&t(28,s=U.hasNonEmptyProps(b)||U.hasNonEmptyProps(k)),n.$$.dirty[0]&8&&t(26,C=JSON.stringify(p)),n.$$.dirty[0]&369098752&&t(7,l=s||$!=C),n.$$.dirty[0]&4&&t(6,E=!d||d.$isNew),n.$$.dirty[0]&192&&t(13,o=E||l),n.$$.dirty[0]&201326592&&M&&F(C)},[u,A,d,p,b,k,E,l,f,h,g,_,T,o,i,a,j,W,te,X,ae,Q,se,$e,O,$,C,M,s,ze,Ue,we,Ee,Ge,_t,Xe,Ke,Te,ce,He,At,Fe,Ce,it,It,Vt,Ut,Pn,ti,$n,gt,Fn,ps,ni,Ei,ms,mi]}class $1 extends be{constructor(e){super(),ge(this,e,EE,ME,_e,{collection:0,show:24,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[1]}}function OE(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Oe(i=Be.call(null,e,n[2]?"":"Copy")),J(e,"click",In(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&m(e,"class",t),i&&jt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:ee,o:ee,d(o){o&&w(e),s=!1,De(l)}}}function DE(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(U.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Xt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class Nl extends be{constructor(e){super(),ge(this,e,DE,OE,_e,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Cm(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Mm(n,e,t){const i=n.slice();return i[13]=e[t],i}function Em(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Om(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function AE(n){const e=n.slice(),t=U.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function IE(n){const e=n.slice(),t=U.toArray(e[3]);e[9]=t;const i=U.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function LE(n){const e=n.slice(),t=U.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function PE(n){let e,t;return{c(){e=y("div"),t=Y(n[3]),m(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&le(t,i[3])},i:ee,o:ee,d(i){i&&w(e)}}}function FE(n){let e,t=U.truncate(n[3])+"",i,s;return{c(){e=y("span"),i=Y(t),m(e,"class","txt txt-ellipsis"),m(e,"title",s=U.truncate(n[3]))},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&8&&t!==(t=U.truncate(l[3])+"")&&le(i,t),o&8&&s!==(s=U.truncate(l[3]))&&m(e,"title",s)},i:ee,o:ee,d(l){l&&w(e)}}}function NE(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=u=>u[8]+u[18];for(let u=0;un[17]&&Am();return{c(){e=y("div");for(let u=0;uu[17]?a||(a=Am(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Pm();return{c(){e=y("div"),i.c(),s=D(),u&&u.c(),m(e,"class","inline-flex")},m(f,d){S(f,e,d),r[t].m(e,null),v(e,s),u&&u.m(e,null),l=!0},p(f,d){let p=t;t=a(f),t===p?r[t].p(f,d):(ue(),P(r[p],1,1,()=>{r[p]=null}),fe(),i=r[t],i?i.p(f,d):(i=r[t]=o[t](f),i.c()),I(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Pm(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(I(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function qE(n){let e,t=[],i=new Map,s=U.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),fe(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),I(t,1),t.m(i.parentNode,i))},i(a){s||(I(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function zE(n){let e,t=U.truncate(n[3])+"",i,s,l;return{c(){e=y("a"),i=Y(t),m(e,"class","txt-ellipsis"),m(e,"href",n[3]),m(e,"target","_blank"),m(e,"rel","noopener noreferrer")},m(o,r){S(o,e,r),v(e,i),s||(l=[Oe(Be.call(null,e,"Open in new tab")),J(e,"click",In(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=U.truncate(o[3])+"")&&le(i,t),r&8&&m(e,"href",o[3])},i:ee,o:ee,d(o){o&&w(e),s=!1,De(l)}}}function HE(n){let e,t;return{c(){e=y("span"),t=Y(n[3]),m(e,"class","txt")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&le(t,i[3])},i:ee,o:ee,d(i){i&&w(e)}}}function BE(n){let e,t=n[3]?"True":"False",i;return{c(){e=y("span"),i=Y(t),m(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&le(i,t)},i:ee,o:ee,d(s){s&&w(e)}}}function UE(n){let e;return{c(){e=y("span"),e.textContent="N/A",m(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function WE(n){let e,t,i,s;const l=[XE,GE],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(ue(),P(o[f],1,1,()=>{o[f]=null}),fe(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),I(t,1),t.m(i.parentNode,i))},i(a){s||(I(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Dm(n,e){let t,i,s;return i=new du({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=Se(),B(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(I(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function Am(n){let e;return{c(){e=Y("...")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function YE(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Nm(n);return{c(){e=y("span"),i=Y(t),s=D(),r&&r.c(),l=Se(),m(e,"class","txt")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=U.truncate(a[5],500,!0)+"")&&le(i,t),a[5].length>500?r?(r.p(a,u),u&8&&I(r,1)):(r=Nm(a),r.c(),I(r,1),r.m(l.parentNode,l)):r&&(ue(),P(r,1,1,()=>{r=null}),fe())},i(a){o||(I(r),o=!0)},o(a){P(r),o=!1},d(a){a&&w(e),a&&w(s),r&&r.d(a),a&&w(l)}}}function XE(n){let e,t=U.truncate(n[5])+"",i;return{c(){e=y("span"),i=Y(t),m(e,"class","txt txt-ellipsis")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=U.truncate(s[5])+"")&&le(i,t)},i:ee,o:ee,d(s){s&&w(e)}}}function Nm(n){let e,t;return e=new Nl({props:{value:JSON.stringify(n[3],null,2)}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function QE(n){let e,t,i,s,l;const o=[WE,UE,BE,HE,zE,VE,jE,qE,RE,NE,FE,PE],r=[];function a(f,d){return d&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!U.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,d){return d===0?LE(f):d===8?IE(f):d===9?AE(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=Se()},m(f,d){r[t].m(f,d),S(f,s,d),l=!0},p(f,[d]){let p=t;t=a(f,d),t===p?r[t].p(u(f,t),d):(ue(),P(r[p],1,1,()=>{r[p]=null}),fe(),i=r[t],i?i.p(u(f,t),d):(i=r[t]=o[t](u(f,t)),i.c()),I(i,1),i.m(s.parentNode,s))},i(f){l||(I(i),l=!0)},o(f){P(i),l=!1},d(f){r[t].d(f),f&&w(s)}}}function xE(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){me.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class T1 extends be{constructor(e){super(),ge(this,e,xE,QE,_e,{record:0,field:1,short:2})}}function Rm(n,e,t){const i=n.slice();return i[10]=e[t],i}function qm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new T1({props:{field:n[10],record:n[3]}}),{c(){e=y("tr"),t=y("td"),s=Y(i),l=D(),o=y("td"),B(r.$$.fragment),m(t,"class","min-width txt-hint txt-bold"),m(o,"class","col-field svelte-1nt58f7")},m(u,f){S(u,e,f),v(e,t),v(t,s),v(e,l),v(e,o),z(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&le(s,i);const d={};f&1&&(d.field=u[10]),f&8&&(d.record=u[3]),r.$set(d)},i(u){a||(I(r.$$.fragment,u),a=!0)},o(u){P(r.$$.fragment,u),a=!1},d(u){u&&w(e),H(r)}}}function jm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].created}}),{c(){e=y("tr"),t=y("td"),t.textContent="created",i=D(),s=y("td"),B(l.$$.fragment),m(t,"class","min-width txt-hint txt-bold"),m(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(I(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),H(l)}}}function Vm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].updated}}),{c(){e=y("tr"),t=y("td"),t.textContent="updated",i=D(),s=y("td"),B(l.$$.fragment),m(t,"class","min-width txt-hint txt-bold"),m(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(I(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),H(l)}}}function eO(n){var M;let e,t,i,s,l,o,r,a,u,f,d=n[3].id+"",p,h,g,_,b;a=new Nl({props:{value:n[3].id}});let k=(M=n[0])==null?void 0:M.schema,$=[];for(let O=0;OP($[O],1,1,()=>{$[O]=null});let T=n[3].created&&jm(n),E=n[3].updated&&Vm(n);return{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="id",l=D(),o=y("td"),r=y("div"),B(a.$$.fragment),u=D(),f=y("span"),p=Y(d),h=D();for(let O=0;O<$.length;O+=1)$[O].c();g=D(),T&&T.c(),_=D(),E&&E.c(),m(s,"class","min-width txt-hint txt-bold"),m(f,"class","txt"),m(r,"class","label"),m(o,"class","col-field svelte-1nt58f7"),m(e,"class","table-border preview-table")},m(O,A){S(O,e,A),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,r),z(a,r,null),v(r,u),v(r,f),v(f,p),v(t,h);for(let L=0;L<$.length;L+=1)$[L]&&$[L].m(t,null);v(t,g),T&&T.m(t,null),v(t,_),E&&E.m(t,null),b=!0},p(O,A){var N;const L={};if(A&8&&(L.value=O[3].id),a.$set(L),(!b||A&8)&&d!==(d=O[3].id+"")&&le(p,d),A&9){k=(N=O[0])==null?void 0:N.schema;let q;for(q=0;q{T=null}),fe()),O[3].updated?E?(E.p(O,A),A&8&&I(E,1)):(E=Vm(O),E.c(),I(E,1),E.m(t,null)):E&&(ue(),P(E,1,1,()=>{E=null}),fe())},i(O){if(!b){I(a.$$.fragment,O);for(let A=0;AClose',m(e,"type","button"),m(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[6]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function iO(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[nO],header:[tO],default:[eO]},$$scope:{ctx:n}};return e=new on({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),H(e,s)}}}function sO(n,e,t){let i,{collection:s}=e,l,o=new wi;function r(h){return t(3,o=h),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(h){ne[h?"unshift":"push"](()=>{l=h,t(2,l)})}function d(h){me.call(this,n,h)}function p(h){me.call(this,n,h)}return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},n.$$.update=()=>{var h;n.$$.dirty&1&&t(4,i=!!((h=s==null?void 0:s.schema)!=null&&h.find(g=>g.type==="editor")))},[s,a,l,o,i,r,u,f,d,p]}class lO extends be{constructor(e){super(),ge(this,e,sO,iO,_e,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function zm(n,e,t){const i=n.slice();return i[55]=e[t],i}function Hm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Bm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Um(n,e,t){const i=n.slice();return i[51]=e[t],i}function Wm(n){let e;function t(l,o){return l[12]?rO:oO}let i=t(n),s=i(n);return{c(){e=y("th"),s.c(),m(e,"class","bulk-select-col min-width")},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function oO(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("input"),s=D(),l=y("label"),m(t,"type","checkbox"),m(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],m(l,"for","checkbox_0"),m(e,"class","form-field")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),o||(r=J(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&w(e),o=!1,r()}}}function rO(n){let e;return{c(){e=y("span"),m(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Ym(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[aO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>he(e,"sort",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function aO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="id",m(t,"class",U.getFieldTypeIcon("primary")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function Km(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Jm(n),r=i&&Zm(n);return{c(){o&&o.c(),t=D(),r&&r.c(),s=Se()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&I(o,1)):(o=Jm(a),o.c(),I(o,1),o.m(t.parentNode,t)):o&&(ue(),P(o,1,1,()=>{o=null}),fe()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&I(r,1)):(r=Zm(a),r.c(),I(r,1),r.m(s.parentNode,s)):r&&(ue(),P(r,1,1,()=>{r=null}),fe())},i(a){l||(I(o),I(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function Jm(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[uO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>he(e,"sort",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function uO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="username",m(t,"class",U.getFieldTypeIcon("user")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function Zm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[fO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>he(e,"sort",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="email",m(t,"class",U.getFieldTypeIcon("email")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function cO(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=y("div"),t=y("i"),s=D(),l=y("span"),r=Y(o),m(t,"class",i=U.getFieldTypeIcon(n[58].type)),m(l,"class","txt"),m(e,"class","col-header-content")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),v(l,r)},p(a,u){u[0]&262144&&i!==(i=U.getFieldTypeIcon(a[58].type))&&m(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&le(r,o)},d(a){a&&w(e)}}}function Gm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[cO]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new un({props:r}),ne.push(()=>he(i,"sort",o)),{key:n,first:null,c(){t=Se(),B(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),z(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ye(()=>s=!1)),i.$set(f)},i(a){l||(I(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),H(i,a)}}}function Xm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[dO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>he(e,"sort",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function dO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="created",m(t,"class",U.getFieldTypeIcon("date")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function Qm(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[pO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>he(e,"sort",s)),{c(){B(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ye(()=>t=!1)),e.$set(a)},i(o){i||(I(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function pO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="updated",m(t,"class",U.getFieldTypeIcon("date")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function xm(n){let e;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"aria-label","Toggle columns"),m(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){S(t,e,i),n[35](e)},p:ee,d(t){t&&w(e),n[35](null)}}}function eh(n){let e;function t(l,o){return l[12]?hO:mO}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function mO(n){let e,t,i,s,l;function o(u,f){var d,p;if((d=u[1])!=null&&d.length)return gO;if(!((p=u[2])!=null&&p.$isView))return _O}let r=o(n),a=r&&r(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No records found.",s=D(),a&&a.c(),l=D(),m(t,"colspan","99"),m(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),v(e,t),v(t,i),v(t,s),a&&a.m(t,null),v(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a&&a.d()}}}function hO(n){let e;return{c(){e=y("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function _O(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + New record`,m(e,"type","button"),m(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[40]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function gO(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',m(e,"type","button"),m(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[39]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function th(n){let e,t,i,s,l,o,r,a,u,f;function d(){return n[36](n[55])}return{c(){e=y("td"),t=y("div"),i=y("input"),o=D(),r=y("label"),m(i,"type","checkbox"),m(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],m(r,"for",a="checkbox_"+n[55].id),m(t,"class","form-field"),m(e,"class","bulk-select-col min-width")},m(p,h){S(p,e,h),v(e,t),v(t,i),v(t,o),v(t,r),u||(f=[J(i,"change",d),J(t,"click",In(n[26]))],u=!0)},p(p,h){n=p,h[0]&16&&s!==(s="checkbox_"+n[55].id)&&m(i,"id",s),h[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),h[0]&16&&a!==(a="checkbox_"+n[55].id)&&m(r,"for",a)},d(p){p&&w(e),u=!1,De(f)}}}function nh(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new Nl({props:{value:n[55].id}});let d=n[2].$isAuth&&ih(n);return{c(){e=y("td"),t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),a=Y(r),u=D(),d&&d.c(),m(o,"class","txt"),m(i,"class","label"),m(t,"class","flex flex-gap-5"),m(e,"class","col-type-text col-field-id")},m(p,h){S(p,e,h),v(e,t),v(t,i),z(s,i,null),v(i,l),v(i,o),v(o,a),v(t,u),d&&d.m(t,null),f=!0},p(p,h){const g={};h[0]&16&&(g.value=p[55].id),s.$set(g),(!f||h[0]&16)&&r!==(r=p[55].id+"")&&le(a,r),p[2].$isAuth?d?d.p(p,h):(d=ih(p),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},i(p){f||(I(s.$$.fragment,p),f=!0)},o(p){P(s.$$.fragment,p),f=!1},d(p){p&&w(e),H(s),d&&d.d()}}}function ih(n){let e;function t(l,o){return l[55].verified?vO:bO}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function bO(n){let e,t,i;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Oe(Be.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function vO(n){let e,t,i;return{c(){e=y("i"),m(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Oe(Be.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function sh(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&lh(n),o=i&&oh(n);return{c(){l&&l.c(),t=D(),o&&o.c(),s=Se()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=lh(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=oh(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function lh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!U.isEmpty(o[55].username)),t?kO:yO}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),m(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function yO(n){let e,t=n[55].username+"",i,s;return{c(){e=y("span"),i=Y(t),m(e,"class","txt txt-ellipsis"),m(e,"title",s=n[55].username)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&le(i,t),o[0]&16&&s!==(s=l[55].username)&&m(e,"title",s)},d(l){l&&w(e)}}}function kO(n){let e;return{c(){e=y("span"),e.textContent="N/A",m(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function oh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!U.isEmpty(o[55].email)),t?SO:wO}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),m(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function wO(n){let e,t=n[55].email+"",i,s;return{c(){e=y("span"),i=Y(t),m(e,"class","txt txt-ellipsis"),m(e,"title",s=n[55].email)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&le(i,t),o[0]&16&&s!==(s=l[55].email)&&m(e,"title",s)},d(l){l&&w(e)}}}function SO(n){let e;return{c(){e=y("span"),e.textContent="N/A",m(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function rh(n,e){let t,i,s,l;return i=new T1({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=y("td"),B(i.$$.fragment),m(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){S(o,t,r),z(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&m(t,"class",s)},i(o){l||(I(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&w(t),H(i)}}}function ah(n){let e,t,i;return t=new $i({props:{date:n[55].created}}),{c(){e=y("td"),B(t.$$.fragment),m(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function uh(n){let e,t,i;return t=new $i({props:{date:n[55].updated}}),{c(){e=y("td"),B(t.$$.fragment),m(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function fh(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),d,p=e[9]&&!e[7].includes("@updated"),h,g,_,b,k,$,C=!e[2].$isView&&th(e),T=s&&nh(e),E=e[2].$isAuth&&sh(e),M=e[18];const O=R=>R[58].name;for(let R=0;R',_=D(),m(g,"class","col-type-action min-width"),m(t,"tabindex","0"),m(t,"class","row-handle"),this.first=t},m(R,F){S(R,t,F),C&&C.m(t,null),v(t,i),T&&T.m(t,null),v(t,l),E&&E.m(t,null),v(t,o);for(let j=0;j{T=null}),fe()),e[2].$isAuth?E?E.p(e,F):(E=sh(e),E.c(),E.m(t,o)):E&&(E.d(1),E=null),F[0]&262160&&(M=e[18],ue(),r=yt(r,F,O,1,e,M,a,t,Kt,rh,u,Hm),fe()),F[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?A?(A.p(e,F),F[0]&1152&&I(A,1)):(A=ah(e),A.c(),I(A,1),A.m(t,d)):A&&(ue(),P(A,1,1,()=>{A=null}),fe()),F[0]&640&&(p=e[9]&&!e[7].includes("@updated")),p?L?(L.p(e,F),F[0]&640&&I(L,1)):(L=uh(e),L.c(),I(L,1),L.m(t,h)):L&&(ue(),P(L,1,1,()=>{L=null}),fe())},i(R){if(!b){I(T);for(let F=0;FW[58].name;for(let W=0;WW[2].$isView?W[55]:W[55].id;for(let W=0;W{M=null}),fe()),W[2].$isAuth?O?(O.p(W,te),te[0]&4&&I(O,1)):(O=Km(W),O.c(),I(O,1),O.m(i,r)):O&&(ue(),P(O,1,1,()=>{O=null}),fe()),te[0]&262145&&(A=W[18],ue(),a=yt(a,te,L,1,W,A,u,i,Kt,Gm,f,Bm),fe()),te[0]&1152&&(d=W[10]&&!W[7].includes("@created")),d?N?(N.p(W,te),te[0]&1152&&I(N,1)):(N=Xm(W),N.c(),I(N,1),N.m(i,p)):N&&(ue(),P(N,1,1,()=>{N=null}),fe()),te[0]&640&&(h=W[9]&&!W[7].includes("@updated")),h?q?(q.p(W,te),te[0]&640&&I(q,1)):(q=Qm(W),q.c(),I(q,1),q.m(i,g)):q&&(ue(),P(q,1,1,()=>{q=null}),fe()),W[15].length?R?R.p(W,te):(R=xm(W),R.c(),R.m(_,null)):R&&(R.d(1),R=null),te[0]&4986582&&(F=W[4],ue(),$=yt($,te,j,1,W,F,C,k,Kt,fh,null,zm),fe(),!F.length&&V?V.p(W,te):F.length?V&&(V.d(1),V=null):(V=eh(W),V.c(),V.m(k,null))),(!T||te[0]&4096)&&x(e,"table-loading",W[12])},i(W){if(!T){I(M),I(O);for(let te=0;te({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Se(),B(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(I(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function CO(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),fe())},i(s){t||(I(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function ph(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=y("small"),t=Y("Showing "),s=Y(i),l=Y(" of "),o=Y(n[5]),m(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){S(r,e,a),v(e,t),v(e,s),v(e,l),v(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&le(s,i),a[0]&32&&le(o,r[5])},d(r){r&&w(e)}}}function mh(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=y("div"),t=y("button"),i=y("span"),s=Y("Load more ("),o=Y(l),r=Y(")"),m(i,"class","txt"),m(t,"type","button"),m(t,"class","btn btn-lg btn-secondary btn-expanded"),x(t,"btn-loading",n[12]),x(t,"btn-disabled",n[12]),m(e,"class","block txt-center m-t-xs")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(i,s),v(i,o),v(i,r),a||(u=J(t,"click",n[41]),a=!0)},p(f,d){d[0]&48&&l!==(l=f[5]-f[4].length+"")&&le(o,l),d[0]&4096&&x(t,"btn-loading",f[12]),d[0]&4096&&x(t,"btn-disabled",f[12])},d(f){f&&w(e),a=!1,u()}}}function hh(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,d,p,h,g,_,b,k,$;return{c(){e=y("div"),t=y("div"),i=Y("Selected "),s=y("strong"),l=Y(n[8]),o=D(),a=Y(r),u=D(),f=y("button"),f.innerHTML='Reset',d=D(),p=y("div"),h=D(),g=y("button"),g.innerHTML='Delete selected',m(t,"class","txt"),m(f,"type","button"),m(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),x(f,"btn-disabled",n[13]),m(p,"class","flex-fill"),m(g,"type","button"),m(g,"class","btn btn-sm btn-transparent btn-danger"),x(g,"btn-loading",n[13]),x(g,"btn-disabled",n[13]),m(e,"class","bulkbar")},m(C,T){S(C,e,T),v(e,t),v(t,i),v(t,s),v(s,l),v(t,o),v(t,a),v(e,u),v(e,f),v(e,d),v(e,p),v(e,h),v(e,g),b=!0,k||($=[J(f,"click",n[42]),J(g,"click",n[43])],k=!0)},p(C,T){(!b||T[0]&256)&&le(l,C[8]),(!b||T[0]&256)&&r!==(r=C[8]===1?"record":"records")&&le(a,r),(!b||T[0]&8192)&&x(f,"btn-disabled",C[13]),(!b||T[0]&8192)&&x(g,"btn-loading",C[13]),(!b||T[0]&8192)&&x(g,"btn-disabled",C[13])},i(C){b||(C&&et(()=>{b&&(_||(_=Ve(e,ci,{duration:150,y:5},!0)),_.run(1))}),b=!0)},o(C){C&&(_||(_=Ve(e,ci,{duration:150,y:5},!1)),_.run(0)),b=!1},d(C){C&&w(e),C&&_&&_.end(),k=!1,De($)}}}function EO(n){let e,t,i,s,l,o;e=new ja({props:{class:"table-wrapper",$$slots:{before:[MO],default:[$O]},$$scope:{ctx:n}}});let r=n[4].length&&ph(n),a=n[4].length&&n[17]&&mh(n),u=n[8]&&hh(n);return{c(){B(e.$$.fragment),t=D(),r&&r.c(),i=D(),a&&a.c(),s=D(),u&&u.c(),l=Se()},m(f,d){z(e,f,d),S(f,t,d),r&&r.m(f,d),S(f,i,d),a&&a.m(f,d),S(f,s,d),u&&u.m(f,d),S(f,l,d),o=!0},p(f,d){const p={};d[0]&382679|d[2]&2&&(p.$$scope={dirty:d,ctx:f}),e.$set(p),f[4].length?r?r.p(f,d):(r=ph(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,d):(a=mh(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,d),d[0]&256&&I(u,1)):(u=hh(f),u.c(),I(u,1),u.m(l.parentNode,l)):u&&(ue(),P(u,1,1,()=>{u=null}),fe())},i(f){o||(I(e.$$.fragment,f),I(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){H(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}const OO=/^([\+\-])?(\w+)$/;function DO(n,e,t){let i,s,l,o,r,a,u,f;const d=Tt();let{collection:p}=e,{sort:h=""}=e,{filter:g=""}=e,_=[],b=1,k=0,$={},C=!0,T=!1,E=0,M,O=[],A=[];function L(){p!=null&&p.id&&localStorage.setItem((p==null?void 0:p.id)+"@hiddenCollumns",JSON.stringify(O))}function N(){if(t(7,O=[]),!!(p!=null&&p.id))try{const Ce=localStorage.getItem(p.id+"@hiddenCollumns");Ce&&t(7,O=JSON.parse(Ce)||[])}catch{}}async function q(){const Ce=b;for(let it=1;it<=Ce;it++)(it===1||o)&&await R(it,!1)}async function R(Ce=1,it=!0){var ti,$n;if(!(p!=null&&p.id))return;t(12,C=!0);let It=h;const Vt=It.match(OO),Ut=Vt?s.find(gt=>gt.name===Vt[2]):null;if(Vt&&(($n=(ti=Ut==null?void 0:Ut.options)==null?void 0:ti.displayFields)==null?void 0:$n.length)>0){const gt=[];for(const Fn of Ut.options.displayFields)gt.push((Vt[1]||"")+Vt[2]+"."+Fn);It=gt.join(",")}const Pn=U.getAllCollectionIdentifiers(p);return de.collection(p.id).getList(Ce,30,{sort:It,filter:U.normalizeSearchFilter(g,Pn),expand:s.map(gt=>gt.name).join(","),$cancelKey:"records_list"}).then(async gt=>{if(Ce<=1&&F(),t(12,C=!1),t(11,b=gt.page),t(5,k=gt.totalItems),d("load",_.concat(gt.items)),it){const Fn=++E;for(;gt.items.length&&E==Fn;)t(4,_=_.concat(gt.items.splice(0,15))),await U.yieldToMain()}else t(4,_=_.concat(gt.items))}).catch(gt=>{gt!=null&>.isAbort||(t(12,C=!1),console.warn(gt),F(),de.error(gt,!1))})}function F(){t(4,_=[]),t(11,b=1),t(5,k=0),t(6,$={})}function j(){a?V():W()}function V(){t(6,$={})}function W(){for(const Ce of _)t(6,$[Ce.id]=Ce,$);t(6,$)}function te(Ce){$[Ce.id]?delete $[Ce.id]:t(6,$[Ce.id]=Ce,$),t(6,$)}function X(){mn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,G)}async function G(){if(T||!r||!(p!=null&&p.id))return;let Ce=[];for(const it of Object.keys($))Ce.push(de.collection(p.id).delete(it));return t(13,T=!0),Promise.all(Ce).then(()=>{Ht(`Successfully deleted the selected ${r===1?"record":"records"}.`),V()}).catch(it=>{de.error(it)}).finally(()=>(t(13,T=!1),q()))}function ae(Ce){me.call(this,n,Ce)}const Q=(Ce,it)=>{it.target.checked?U.removeByValue(O,Ce.id):U.pushUnique(O,Ce.id),t(7,O)},se=()=>j();function ve(Ce){h=Ce,t(0,h)}function $e(Ce){h=Ce,t(0,h)}function ze(Ce){h=Ce,t(0,h)}function Ue(Ce){h=Ce,t(0,h)}function we(Ce){h=Ce,t(0,h)}function Ee(Ce){h=Ce,t(0,h)}function Ge(Ce){ne[Ce?"unshift":"push"](()=>{M=Ce,t(14,M)})}const _t=Ce=>te(Ce),Xe=Ce=>d("select",Ce),Ke=(Ce,it)=>{it.code==="Enter"&&(it.preventDefault(),d("select",Ce))},Te=()=>t(1,g=""),ce=()=>d("new"),He=()=>R(b+1),At=()=>V(),Fe=()=>X();return n.$$set=Ce=>{"collection"in Ce&&t(2,p=Ce.collection),"sort"in Ce&&t(0,h=Ce.sort),"filter"in Ce&&t(1,g=Ce.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&p!=null&&p.id&&(N(),F()),n.$$.dirty[0]&4&&t(25,i=(p==null?void 0:p.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter(Ce=>Ce.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter(Ce=>!O.includes(Ce.id))),n.$$.dirty[0]&7&&p!=null&&p.id&&h!==-1&&g!==-1&&R(1),n.$$.dirty[0]&48&&t(17,o=k>_.length),n.$$.dirty[0]&64&&t(8,r=Object.keys($).length),n.$$.dirty[0]&272&&t(16,a=_.length&&r===_.length),n.$$.dirty[0]&128&&O!==-1&&L(),n.$$.dirty[0]&20&&t(10,u=!(p!=null&&p.$isView)||_.length>0&&_[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(p!=null&&p.$isView)||_.length>0&&_[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,A=[].concat(p.$isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Ce=>({id:Ce.id,name:Ce.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[h,g,p,R,_,k,$,O,r,f,u,b,C,T,M,A,a,o,l,d,j,V,te,X,q,i,ae,Q,se,ve,$e,ze,Ue,we,Ee,Ge,_t,Xe,Ke,Te,ce,He,At,Fe]}class AO extends be{constructor(e){super(),ge(this,e,DO,EO,_e,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function IO(n){let e,t,i,s;return e=new SM({}),i=new Sn({props:{$$slots:{default:[FO]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&8&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function LO(n){let e,t;return e=new Sn({props:{center:!0,$$slots:{default:[qO]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function PO(n){let e,t;return e=new Sn({props:{center:!0,$$slots:{default:[jO]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function _h(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',m(e,"type","button"),m(e,"aria-label","Edit collection"),m(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[Oe(Be.call(null,e,{text:"Edit collection",position:"right"})),J(e,"click",n[15])],t=!0)},p:ee,d(s){s&&w(e),t=!1,De(i)}}}function gh(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + New record`,m(e,"type","button"),m(e,"class","btn btn-expanded")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function FO(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O,A,L,N,q=!n[10]&&_h(n);d=new Zo({}),d.$on("refresh",n[16]);let R=!n[2].$isView&&gh(n);k=new Jo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[19]);function F(W){n[21](W)}function j(W){n[22](W)}let V={collection:n[2]};return n[0]!==void 0&&(V.filter=n[0]),n[1]!==void 0&&(V.sort=n[1]),E=new AO({props:V}),n[20](E),ne.push(()=>he(E,"filter",F)),ne.push(()=>he(E,"sort",j)),E.$on("select",n[23]),E.$on("new",n[24]),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Collections",s=D(),l=y("div"),r=Y(o),a=D(),u=y("div"),q&&q.c(),f=D(),B(d.$$.fragment),p=D(),h=y("div"),g=y("button"),g.innerHTML=` + API Preview`,_=D(),R&&R.c(),b=D(),B(k.$$.fragment),$=D(),C=y("div"),T=D(),B(E.$$.fragment),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(u,"class","inline-flex gap-5"),m(g,"type","button"),m(g,"class","btn btn-outline"),m(h,"class","btns-group"),m(e,"class","page-header"),m(C,"class","clearfix m-b-base")},m(W,te){S(W,e,te),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),v(e,u),q&&q.m(u,null),v(u,f),z(d,u,null),v(e,p),v(e,h),v(h,g),v(h,_),R&&R.m(h,null),S(W,b,te),z(k,W,te),S(W,$,te),S(W,C,te),S(W,T,te),z(E,W,te),A=!0,L||(N=J(g,"click",n[17]),L=!0)},p(W,te){(!A||te[0]&4)&&o!==(o=W[2].name+"")&&le(r,o),W[10]?q&&(q.d(1),q=null):q?q.p(W,te):(q=_h(W),q.c(),q.m(u,f)),W[2].$isView?R&&(R.d(1),R=null):R?R.p(W,te):(R=gh(W),R.c(),R.m(h,null));const X={};te[0]&1&&(X.value=W[0]),te[0]&4&&(X.autocompleteCollection=W[2]),k.$set(X);const G={};te[0]&4&&(G.collection=W[2]),!M&&te[0]&1&&(M=!0,G.filter=W[0],ye(()=>M=!1)),!O&&te[0]&2&&(O=!0,G.sort=W[1],ye(()=>O=!1)),E.$set(G)},i(W){A||(I(d.$$.fragment,W),I(k.$$.fragment,W),I(E.$$.fragment,W),A=!0)},o(W){P(d.$$.fragment,W),P(k.$$.fragment,W),P(E.$$.fragment,W),A=!1},d(W){W&&w(e),q&&q.d(),H(d),R&&R.d(),W&&w(b),H(k,W),W&&w($),W&&w(C),W&&w(T),n[20](null),H(E,W),L=!1,N()}}}function NO(n){let e,t,i,s,l;return{c(){e=y("h1"),e.textContent="Create your first collection to add records!",t=D(),i=y("button"),i.innerHTML=` + Create new collection`,m(e,"class","m-b-10"),m(i,"type","button"),m(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=J(i,"click",n[14]),s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function RO(n){let e;return{c(){e=y("h1"),e.textContent="You don't have any collections yet.",m(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function qO(n){let e,t,i;function s(r,a){return r[10]?RO:NO}let l=s(n),o=l(n);return{c(){e=y("div"),t=y("div"),t.innerHTML='',i=D(),o.c(),m(t,"class","icon"),m(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),v(e,t),v(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function jO(n){let e;return{c(){e=y("div"),e.innerHTML=` +

    Loading collections...

    `,m(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function VO(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[PO,LO,IO],h=[];function g(C,T){return C[3]&&!C[9].length?0:C[9].length?2:1}e=g(n),t=h[e]=p[e](n);let _={};s=new cu({props:_}),n[25](s);let b={};o=new AM({props:b}),n[26](o);let k={collection:n[2]};a=new $1({props:k}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let $={collection:n[2]};return f=new lO({props:$}),n[30](f),{c(){t.c(),i=D(),B(s.$$.fragment),l=D(),B(o.$$.fragment),r=D(),B(a.$$.fragment),u=D(),B(f.$$.fragment)},m(C,T){h[e].m(C,T),S(C,i,T),z(s,C,T),S(C,l,T),z(o,C,T),S(C,r,T),z(a,C,T),S(C,u,T),z(f,C,T),d=!0},p(C,T){let E=e;e=g(C),e===E?h[e].p(C,T):(ue(),P(h[E],1,1,()=>{h[E]=null}),fe(),t=h[e],t?t.p(C,T):(t=h[e]=p[e](C),t.c()),I(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const A={};T[0]&4&&(A.collection=C[2]),a.$set(A);const L={};T[0]&4&&(L.collection=C[2]),f.$set(L)},i(C){d||(I(t),I(s.$$.fragment,C),I(o.$$.fragment,C),I(a.$$.fragment,C),I(f.$$.fragment,C),d=!0)},o(C){P(t),P(s.$$.fragment,C),P(o.$$.fragment,C),P(a.$$.fragment,C),P(f.$$.fragment,C),d=!1},d(C){h[e].d(C),C&&w(i),n[25](null),H(s,C),C&&w(l),n[26](null),H(o,C),C&&w(r),n[27](null),H(a,C),C&&w(u),n[30](null),H(f,C)}}}function zO(n,e,t){let i,s,l,o,r,a,u;Ze(n,fi,Q=>t(2,s=Q)),Ze(n,Mt,Q=>t(31,l=Q)),Ze(n,ko,Q=>t(3,o=Q)),Ze(n,Ta,Q=>t(13,r=Q)),Ze(n,di,Q=>t(9,a=Q)),Ze(n,Is,Q=>t(10,u=Q));const f=new URLSearchParams(r);let d,p,h,g,_,b=f.get("filter")||"",k=f.get("sort")||"",$=f.get("collectionId")||(s==null?void 0:s.id);function C(){t(11,$=s==null?void 0:s.id),t(0,b=""),t(1,k="-created"),s!=null&&s.$isView&&!U.extractColumnsFromQuery(s.options.query).includes("created")&&t(1,k="")}Py($);const T=()=>d==null?void 0:d.show(),E=()=>d==null?void 0:d.show(s),M=()=>_==null?void 0:_.load(),O=()=>p==null?void 0:p.show(s),A=()=>h==null?void 0:h.show(),L=Q=>t(0,b=Q.detail);function N(Q){ne[Q?"unshift":"push"](()=>{_=Q,t(8,_)})}function q(Q){b=Q,t(0,b)}function R(Q){k=Q,t(1,k)}const F=Q=>{s.$isView?g.show(Q==null?void 0:Q.detail):h==null||h.show(Q==null?void 0:Q.detail)},j=()=>h==null?void 0:h.show();function V(Q){ne[Q?"unshift":"push"](()=>{d=Q,t(4,d)})}function W(Q){ne[Q?"unshift":"push"](()=>{p=Q,t(5,p)})}function te(Q){ne[Q?"unshift":"push"](()=>{h=Q,t(6,h)})}const X=()=>_==null?void 0:_.reloadLoadedPages(),G=()=>_==null?void 0:_.reloadLoadedPages();function ae(Q){ne[Q?"unshift":"push"](()=>{g=Q,t(7,g)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=$&&Ay(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&$!=s.id&&C(),n.$$.dirty[0]&7&&(k||b||s!=null&&s.id)){const Q=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:k}).toString();Vi("/collections?"+Q)}n.$$.dirty[0]&4&&ln(Mt,l=(s==null?void 0:s.name)||"Collections",l)},[b,k,s,o,d,p,h,g,_,a,u,$,i,r,T,E,M,O,A,L,N,q,R,F,j,V,W,te,X,G,ae]}class HO extends be{constructor(e){super(),ge(this,e,zO,VO,_e,{},null,[-1,-1])}}function BO(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O,A,L,N,q;return{c(){e=y("aside"),t=y("div"),i=y("div"),i.textContent="System",s=D(),l=y("a"),l.innerHTML=` + Application`,o=D(),r=y("a"),r.innerHTML=` + Mail settings`,a=D(),u=y("a"),u.innerHTML=` + Files storage`,f=D(),d=y("a"),d.innerHTML=` + Backups`,p=D(),h=y("div"),h.innerHTML='Sync',g=D(),_=y("a"),_.innerHTML=` + Export collections`,b=D(),k=y("a"),k.innerHTML=` + Import collections`,$=D(),C=y("div"),C.textContent="Authentication",T=D(),E=y("a"),E.innerHTML=` + Auth providers`,M=D(),O=y("a"),O.innerHTML=` + Token options`,A=D(),L=y("a"),L.innerHTML=` + Admins`,m(i,"class","sidebar-title"),m(l,"href","/settings"),m(l,"class","sidebar-list-item"),m(r,"href","/settings/mail"),m(r,"class","sidebar-list-item"),m(u,"href","/settings/storage"),m(u,"class","sidebar-list-item"),m(d,"href","/settings/backups"),m(d,"class","sidebar-list-item"),m(h,"class","sidebar-title"),m(_,"href","/settings/export-collections"),m(_,"class","sidebar-list-item"),m(k,"href","/settings/import-collections"),m(k,"class","sidebar-list-item"),m(C,"class","sidebar-title"),m(E,"href","/settings/auth-providers"),m(E,"class","sidebar-list-item"),m(O,"href","/settings/tokens"),m(O,"class","sidebar-list-item"),m(L,"href","/settings/admins"),m(L,"class","sidebar-list-item"),m(t,"class","sidebar-content"),m(e,"class","page-sidebar settings-sidebar")},m(R,F){S(R,e,F),v(e,t),v(t,i),v(t,s),v(t,l),v(t,o),v(t,r),v(t,a),v(t,u),v(t,f),v(t,d),v(t,p),v(t,h),v(t,g),v(t,_),v(t,b),v(t,k),v(t,$),v(t,C),v(t,T),v(t,E),v(t,M),v(t,O),v(t,A),v(t,L),N||(q=[Oe(zn.call(null,l,{path:"/settings"})),Oe(rn.call(null,l)),Oe(zn.call(null,r,{path:"/settings/mail/?.*"})),Oe(rn.call(null,r)),Oe(zn.call(null,u,{path:"/settings/storage/?.*"})),Oe(rn.call(null,u)),Oe(zn.call(null,d,{path:"/settings/backups/?.*"})),Oe(rn.call(null,d)),Oe(zn.call(null,_,{path:"/settings/export-collections/?.*"})),Oe(rn.call(null,_)),Oe(zn.call(null,k,{path:"/settings/import-collections/?.*"})),Oe(rn.call(null,k)),Oe(zn.call(null,E,{path:"/settings/auth-providers/?.*"})),Oe(rn.call(null,E)),Oe(zn.call(null,O,{path:"/settings/tokens/?.*"})),Oe(rn.call(null,O)),Oe(zn.call(null,L,{path:"/settings/admins/?.*"})),Oe(rn.call(null,L))],N=!0)},p:ee,i:ee,o:ee,d(R){R&&w(e),N=!1,De(q)}}}class Mi extends be{constructor(e){super(),ge(this,e,null,BO,_e,{})}}function bh(n,e,t){const i=n.slice();return i[30]=e[t],i}function vh(n){let e,t;return e=new pe({props:{class:"form-field readonly",name:"id",$$slots:{default:[UO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function UO(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="id",o=D(),r=y("div"),a=y("i"),f=D(),d=y("input"),m(t,"class",U.getFieldTypeIcon("primary")),m(s,"class","txt"),m(e,"for",l=n[29]),m(a,"class","ri-calendar-event-line txt-disabled"),m(r,"class","form-field-addon"),m(d,"type","text"),m(d,"id",p=n[29]),d.value=h=n[1].id,d.readOnly=!0},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),S(b,r,k),v(r,a),S(b,f,k),S(b,d,k),g||(_=Oe(u=Be.call(null,a,{text:`Created: ${n[1].created} +Updated: ${n[1].updated}`,position:"left"})),g=!0)},p(b,k){k[0]&536870912&&l!==(l=b[29])&&m(e,"for",l),u&&jt(u.update)&&k[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} +Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&m(d,"id",p),k[0]&2&&h!==(h=b[1].id)&&d.value!==h&&(d.value=h)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(d),g=!1,_()}}}function yh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=y("button"),t=y("img"),s=D(),_n(t.src,i="./images/avatars/avatar"+n[30]+".svg")||m(t,"src",i),m(t,"alt","Avatar "+n[30]),m(e,"type","button"),m(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),v(e,t),v(e,s),o||(r=J(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&m(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function WO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Email",o=D(),r=y("input"),m(t,"class",U.getFieldTypeIcon("email")),m(s,"class","txt"),m(e,"for",l=n[29]),m(r,"type","email"),m(r,"autocomplete","off"),m(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),re(r,n[3]),u||(f=J(r,"input",n[18]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&m(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&m(r,"id",a),p[0]&8&&r.value!==d[3]&&re(r,d[3])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function kh(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle",$$slots:{default:[YO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function YO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Change password"),m(e,"type","checkbox"),m(e,"id",t=n[29]),m(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&m(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function wh(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[KO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[JO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),B(r.$$.fragment),m(i,"class","col-sm-6"),m(o,"class","col-sm-6"),m(t,"class","grid"),m(e,"class","col-12")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d[0]&536871168|d[1]&4&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const h={};d[0]&536871424|d[1]&4&&(h.$$scope={dirty:d,ctx:f}),r.$set(h)},i(f){u||(I(s.$$.fragment,f),I(r.$$.fragment,f),f&&et(()=>{u&&(a||(a=Ve(t,rt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Ve(t,rt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function KO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Password",o=D(),r=y("input"),m(t,"class","ri-lock-line"),m(s,"class","txt"),m(e,"for",l=n[29]),m(r,"type","password"),m(r,"autocomplete","new-password"),m(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),re(r,n[8]),u||(f=J(r,"input",n[20]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&m(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&m(r,"id",a),p[0]&256&&r.value!==d[8]&&re(r,d[8])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function JO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=D(),s=y("span"),s.textContent="Password confirm",o=D(),r=y("input"),m(t,"class","ri-lock-line"),m(s,"class","txt"),m(e,"for",l=n[29]),m(r,"type","password"),m(r,"autocomplete","new-password"),m(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),re(r,n[9]),u||(f=J(r,"input",n[21]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&m(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&m(r,"id",a),p[0]&512&&r.value!==d[9]&&re(r,d[9])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function ZO(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g=!n[1].$isNew&&vh(n),_=[0,1,2,3,4,5,6,7,8,9],b=[];for(let C=0;C<10;C+=1)b[C]=yh(bh(n,_,C));a=new pe({props:{class:"form-field required",name:"email",$$slots:{default:[WO,({uniqueId:C})=>({29:C}),({uniqueId:C})=>[C?536870912:0]]},$$scope:{ctx:n}}});let k=!n[1].$isNew&&kh(n),$=(n[1].$isNew||n[4])&&wh(n);return{c(){e=y("form"),g&&g.c(),t=D(),i=y("div"),s=y("p"),s.textContent="Avatar",l=D(),o=y("div");for(let C=0;C<10;C+=1)b[C].c();r=D(),B(a.$$.fragment),u=D(),k&&k.c(),f=D(),$&&$.c(),m(s,"class","section-title"),m(o,"class","flex flex-gap-xs flex-wrap"),m(i,"class","content"),m(e,"id",n[11]),m(e,"class","grid"),m(e,"autocomplete","off")},m(C,T){S(C,e,T),g&&g.m(e,null),v(e,t),v(e,i),v(i,s),v(i,l),v(i,o);for(let E=0;E<10;E+=1)b[E]&&b[E].m(o,null);v(e,r),z(a,e,null),v(e,u),k&&k.m(e,null),v(e,f),$&&$.m(e,null),d=!0,p||(h=J(e,"submit",xe(n[12])),p=!0)},p(C,T){if(C[1].$isNew?g&&(ue(),P(g,1,1,()=>{g=null}),fe()):g?(g.p(C,T),T[0]&2&&I(g,1)):(g=vh(C),g.c(),I(g,1),g.m(e,t)),T[0]&4){_=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const O=bh(C,_,M);b[M]?b[M].p(O,T):(b[M]=yh(O),b[M].c(),b[M].m(o,null))}for(;M<10;M+=1)b[M].d(1)}const E={};T[0]&536870920|T[1]&4&&(E.$$scope={dirty:T,ctx:C}),a.$set(E),C[1].$isNew?k&&(ue(),P(k,1,1,()=>{k=null}),fe()):k?(k.p(C,T),T[0]&2&&I(k,1)):(k=kh(C),k.c(),I(k,1),k.m(e,f)),C[1].$isNew||C[4]?$?($.p(C,T),T[0]&18&&I($,1)):($=wh(C),$.c(),I($,1),$.m(e,null)):$&&(ue(),P($,1,1,()=>{$=null}),fe())},i(C){d||(I(g),I(a.$$.fragment,C),I(k),I($),d=!0)},o(C){P(g),P(a.$$.fragment,C),P(k),P($),d=!1},d(C){C&&w(e),g&&g.d(),pt(b,C),H(a),k&&k.d(),$&&$.d(),p=!1,h()}}}function GO(n){let e,t=n[1].$isNew?"New admin":"Edit admin",i;return{c(){e=y("h4"),i=Y(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].$isNew?"New admin":"Edit admin")&&le(i,t)},d(s){s&&w(e)}}}function Sh(n){let e,t,i,s,l,o,r,a,u;return o=new Jn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[XO]},$$scope:{ctx:n}}}),{c(){e=y("button"),t=y("span"),i=D(),s=y("i"),l=D(),B(o.$$.fragment),r=D(),a=y("div"),m(s,"class","ri-more-line"),m(e,"type","button"),m(e,"aria-label","More"),m(e,"class","btn btn-sm btn-circle btn-transparent"),m(a,"class","flex-fill")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(e,l),z(o,e,null),S(f,r,d),S(f,a,d),u=!0},p(f,d){const p={};d[1]&4&&(p.$$scope={dirty:d,ctx:f}),o.$set(p)},i(f){u||(I(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),H(o),f&&w(r),f&&w(a)}}}function XO(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Delete`,m(e,"type","button"),m(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function QO(n){let e,t,i,s,l,o,r=n[1].$isNew?"Create":"Save changes",a,u,f,d,p,h=!n[1].$isNew&&Sh(n);return{c(){h&&h.c(),e=D(),t=y("button"),i=y("span"),i.textContent="Cancel",s=D(),l=y("button"),o=y("span"),a=Y(r),m(i,"class","txt"),m(t,"type","button"),m(t,"class","btn btn-transparent"),t.disabled=n[6],m(o,"class","txt"),m(l,"type","submit"),m(l,"form",n[11]),m(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],x(l,"btn-loading",n[6])},m(g,_){h&&h.m(g,_),S(g,e,_),S(g,t,_),v(t,i),S(g,s,_),S(g,l,_),v(l,o),v(o,a),f=!0,d||(p=J(t,"click",n[16]),d=!0)},p(g,_){g[1].$isNew?h&&(ue(),P(h,1,1,()=>{h=null}),fe()):h?(h.p(g,_),_[0]&2&&I(h,1)):(h=Sh(g),h.c(),I(h,1),h.m(e.parentNode,e)),(!f||_[0]&64)&&(t.disabled=g[6]),(!f||_[0]&2)&&r!==(r=g[1].$isNew?"Create":"Save changes")&&le(a,r),(!f||_[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),(!f||_[0]&64)&&x(l,"btn-loading",g[6])},i(g){f||(I(h),f=!0)},o(g){P(h),f=!1},d(g){h&&h.d(g),g&&w(e),g&&w(t),g&&w(s),g&&w(l),d=!1,p()}}}function xO(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[QO],header:[GO],default:[ZO]},$$scope:{ctx:n}};return e=new on({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),H(e,s)}}}function eD(n,e,t){let i;const s=Tt(),l="admin_"+U.randomString(5);let o,r=new rs,a=!1,u=!1,f=0,d="",p="",h="",g=!1;function _(W){return k(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function k(W){t(1,r=W!=null&&W.$clone?W.$clone():new rs),$()}function $(){t(4,g=!1),t(3,d=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,p=""),t(9,h=""),tn({})}function C(){if(a||!i)return;t(6,a=!0);const W={email:d,avatar:f};(r.$isNew||g)&&(W.password=p,W.passwordConfirm=h);let te;r.$isNew?te=de.admins.create(W):te=de.admins.update(r.id,W),te.then(async X=>{var G;t(7,u=!1),b(),Ht(r.$isNew?"Successfully created admin.":"Successfully updated admin."),((G=de.authStore.model)==null?void 0:G.id)===X.id&&de.authStore.save(de.authStore.token,X),s("save",X)}).catch(X=>{de.error(X)}).finally(()=>{t(6,a=!1)})}function T(){r!=null&&r.id&&mn("Do you really want to delete the selected admin?",()=>de.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Ht("Successfully deleted admin."),s("delete",r)}).catch(W=>{de.error(W)}))}const E=()=>T(),M=()=>b(),O=W=>t(2,f=W);function A(){d=this.value,t(3,d)}function L(){g=this.checked,t(4,g)}function N(){p=this.value,t(8,p)}function q(){h=this.value,t(9,h)}const R=()=>i&&u?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function F(W){ne[W?"unshift":"push"](()=>{o=W,t(5,o)})}function j(W){me.call(this,n,W)}function V(W){me.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.$isNew&&d!=""||g||d!==r.email||f!==r.avatar)},[b,r,f,d,g,o,a,u,p,h,i,l,C,T,_,E,M,O,A,L,N,q,R,F,j,V]}class tD extends be{constructor(e){super(),ge(this,e,eD,xO,_e,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function $h(n,e,t){const i=n.slice();return i[24]=e[t],i}function nD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="id",m(t,"class",U.getFieldTypeIcon("primary")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function iD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="email",m(t,"class",U.getFieldTypeIcon("email")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function sD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="created",m(t,"class",U.getFieldTypeIcon("date")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function lD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),s.textContent="updated",m(t,"class",U.getFieldTypeIcon("date")),m(s,"class","txt"),m(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:ee,d(l){l&&w(e)}}}function Th(n){let e;function t(l,o){return l[5]?rD:oD}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function oD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Ch(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),m(t,"colspan","99"),m(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Ch(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function rD(n){let e;return{c(){e=y("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Ch(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',m(e,"type","button"),m(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function Mh(n){let e;return{c(){e=y("span"),e.textContent="You",m(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Eh(n,e){let t,i,s,l,o,r,a,u,f,d,p,h=e[24].id+"",g,_,b,k,$,C=e[24].email+"",T,E,M,O,A,L,N,q,R,F,j,V,W,te;f=new Nl({props:{value:e[24].id}});let X=e[24].id===e[7].id&&Mh();A=new $i({props:{date:e[24].created}}),q=new $i({props:{date:e[24].updated}});function G(){return e[15](e[24])}function ae(...Q){return e[16](e[24],...Q)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("figure"),l=y("img"),r=D(),a=y("td"),u=y("div"),B(f.$$.fragment),d=D(),p=y("span"),g=Y(h),_=D(),X&&X.c(),b=D(),k=y("td"),$=y("span"),T=Y(C),M=D(),O=y("td"),B(A.$$.fragment),L=D(),N=y("td"),B(q.$$.fragment),R=D(),F=y("td"),F.innerHTML='',j=D(),_n(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||m(l,"src",o),m(l,"alt","Admin avatar"),m(s,"class","thumb thumb-sm thumb-circle"),m(i,"class","min-width"),m(p,"class","txt"),m(u,"class","label"),m(a,"class","col-type-text col-field-id"),m($,"class","txt txt-ellipsis"),m($,"title",E=e[24].email),m(k,"class","col-type-email col-field-email"),m(O,"class","col-type-date col-field-created"),m(N,"class","col-type-date col-field-updated"),m(F,"class","col-type-action min-width"),m(t,"tabindex","0"),m(t,"class","row-handle"),this.first=t},m(Q,se){S(Q,t,se),v(t,i),v(i,s),v(s,l),v(t,r),v(t,a),v(a,u),z(f,u,null),v(u,d),v(u,p),v(p,g),v(a,_),X&&X.m(a,null),v(t,b),v(t,k),v(k,$),v($,T),v(t,M),v(t,O),z(A,O,null),v(t,L),v(t,N),z(q,N,null),v(t,R),v(t,F),v(t,j),V=!0,W||(te=[J(t,"click",G),J(t,"keydown",ae)],W=!0)},p(Q,se){e=Q,(!V||se&16&&!_n(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&m(l,"src",o);const ve={};se&16&&(ve.value=e[24].id),f.$set(ve),(!V||se&16)&&h!==(h=e[24].id+"")&&le(g,h),e[24].id===e[7].id?X||(X=Mh(),X.c(),X.m(a,null)):X&&(X.d(1),X=null),(!V||se&16)&&C!==(C=e[24].email+"")&&le(T,C),(!V||se&16&&E!==(E=e[24].email))&&m($,"title",E);const $e={};se&16&&($e.date=e[24].created),A.$set($e);const ze={};se&16&&(ze.date=e[24].updated),q.$set(ze)},i(Q){V||(I(f.$$.fragment,Q),I(A.$$.fragment,Q),I(q.$$.fragment,Q),V=!0)},o(Q){P(f.$$.fragment,Q),P(A.$$.fragment,Q),P(q.$$.fragment,Q),V=!1},d(Q){Q&&w(t),H(f),X&&X.d(),H(A),H(q),W=!1,De(te)}}}function aD(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E=[],M=new Map,O;function A(G){n[11](G)}let L={class:"col-type-text",name:"id",$$slots:{default:[nD]},$$scope:{ctx:n}};n[2]!==void 0&&(L.sort=n[2]),o=new un({props:L}),ne.push(()=>he(o,"sort",A));function N(G){n[12](G)}let q={class:"col-type-email col-field-email",name:"email",$$slots:{default:[iD]},$$scope:{ctx:n}};n[2]!==void 0&&(q.sort=n[2]),u=new un({props:q}),ne.push(()=>he(u,"sort",N));function R(G){n[13](G)}let F={class:"col-type-date col-field-created",name:"created",$$slots:{default:[sD]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),p=new un({props:F}),ne.push(()=>he(p,"sort",R));function j(G){n[14](G)}let V={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[lD]},$$scope:{ctx:n}};n[2]!==void 0&&(V.sort=n[2]),_=new un({props:V}),ne.push(()=>he(_,"sort",j));let W=n[4];const te=G=>G[24].id;for(let G=0;Gr=!1)),o.$set(Q);const se={};ae&134217728&&(se.$$scope={dirty:ae,ctx:G}),!f&&ae&4&&(f=!0,se.sort=G[2],ye(()=>f=!1)),u.$set(se);const ve={};ae&134217728&&(ve.$$scope={dirty:ae,ctx:G}),!h&&ae&4&&(h=!0,ve.sort=G[2],ye(()=>h=!1)),p.$set(ve);const $e={};ae&134217728&&($e.$$scope={dirty:ae,ctx:G}),!b&&ae&4&&(b=!0,$e.sort=G[2],ye(()=>b=!1)),_.$set($e),ae&186&&(W=G[4],ue(),E=yt(E,ae,te,1,G,W,M,T,Kt,Eh,null,$h),fe(),!W.length&&X?X.p(G,ae):W.length?X&&(X.d(1),X=null):(X=Th(G),X.c(),X.m(T,null))),(!O||ae&32)&&x(e,"table-loading",G[5])},i(G){if(!O){I(o.$$.fragment,G),I(u.$$.fragment,G),I(p.$$.fragment,G),I(_.$$.fragment,G);for(let ae=0;ae + New admin`,h=D(),B(g.$$.fragment),_=D(),b=y("div"),k=D(),B($.$$.fragment),C=D(),A&&A.c(),T=Se(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(f,"class","flex-fill"),m(p,"type","button"),m(p,"class","btn btn-expanded"),m(e,"class","page-header"),m(b,"class","clearfix m-b-base")},m(L,N){S(L,e,N),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(e,r),z(a,e,null),v(e,u),v(e,f),v(e,d),v(e,p),S(L,h,N),z(g,L,N),S(L,_,N),S(L,b,N),S(L,k,N),z($,L,N),S(L,C,N),A&&A.m(L,N),S(L,T,N),E=!0,M||(O=J(p,"click",n[9]),M=!0)},p(L,N){(!E||N&64)&&le(o,L[6]);const q={};N&2&&(q.value=L[1]),g.$set(q);const R={};N&134217918&&(R.$$scope={dirty:N,ctx:L}),$.$set(R),L[4].length?A?A.p(L,N):(A=Oh(L),A.c(),A.m(T.parentNode,T)):A&&(A.d(1),A=null)},i(L){E||(I(a.$$.fragment,L),I(g.$$.fragment,L),I($.$$.fragment,L),E=!0)},o(L){P(a.$$.fragment,L),P(g.$$.fragment,L),P($.$$.fragment,L),E=!1},d(L){L&&w(e),H(a),L&&w(h),H(g,L),L&&w(_),L&&w(b),L&&w(k),H($,L),L&&w(C),A&&A.d(L),L&&w(T),M=!1,O()}}}function fD(n){let e,t,i,s,l,o;e=new Mi({}),i=new Sn({props:{$$slots:{default:[uD]},$$scope:{ctx:n}}});let r={};return l=new tD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function cD(n,e,t){let i,s,l;Ze(n,Ta,q=>t(21,i=q)),Ze(n,Mt,q=>t(6,s=q)),Ze(n,Ra,q=>t(7,l=q)),ln(Mt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",d=o.get("sort")||"-created";function p(){t(5,u=!0),t(4,a=[]);const q=U.normalizeSearchFilter(f,["id","email","created","updated"]);return de.admins.getFullList(100,{sort:d||"-created",filter:q}).then(R=>{t(4,a=R),t(5,u=!1)}).catch(R=>{R!=null&&R.isAbort||(t(5,u=!1),console.warn(R),h(),de.error(R,!1))})}function h(){t(4,a=[])}const g=()=>p(),_=()=>r==null?void 0:r.show(),b=q=>t(1,f=q.detail);function k(q){d=q,t(2,d)}function $(q){d=q,t(2,d)}function C(q){d=q,t(2,d)}function T(q){d=q,t(2,d)}const E=q=>r==null?void 0:r.show(q),M=(q,R)=>{(R.code==="Enter"||R.code==="Space")&&(R.preventDefault(),r==null||r.show(q))},O=()=>t(1,f="");function A(q){ne[q?"unshift":"push"](()=>{r=q,t(3,r)})}const L=()=>p(),N=()=>p();return n.$$.update=()=>{if(n.$$.dirty&6&&d!==-1&&f!==-1){const q=new URLSearchParams({filter:f,sort:d}).toString();Vi("/settings/admins?"+q),p()}},[p,f,d,r,a,u,s,l,g,_,b,k,$,C,T,E,M,O,A,L,N]}class dD extends be{constructor(e){super(),ge(this,e,cD,fD,_e,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Email"),s=D(),l=y("input"),m(e,"for",i=n[8]),m(l,"type","email"),m(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0]),l.focus(),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&m(e,"for",i),f&256&&o!==(o=u[8])&&m(l,"id",o),f&1&&l.value!==u[0]&&re(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Password"),s=D(),l=y("input"),r=D(),a=y("div"),u=y("a"),u.textContent="Forgotten password?",m(e,"for",i=n[8]),m(l,"type","password"),m(l,"id",o=n[8]),l.required=!0,m(u,"href","/request-password-reset"),m(u,"class","link-hint"),m(a,"class","help-block")},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[1]),S(p,r,h),S(p,a,h),v(a,u),f||(d=[J(l,"input",n[5]),Oe(rn.call(null,u))],f=!0)},p(p,h){h&256&&i!==(i=p[8])&&m(e,"for",i),h&256&&o!==(o=p[8])&&m(l,"id",o),h&2&&l.value!==p[1]&&re(l,p[1])},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),p&&w(a),f=!1,De(d)}}}function hD(n){let e,t,i,s,l,o,r,a,u,f,d;return s=new pe({props:{class:"form-field required",name:"identity",$$slots:{default:[pD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[mD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

    Admin sign in

    ",i=D(),B(s.$$.fragment),l=D(),B(o.$$.fragment),r=D(),a=y("button"),a.innerHTML=`Login + `,m(t,"class","content txt-center m-b-base"),m(a,"type","submit"),m(a,"class","btn btn-lg btn-block btn-next"),x(a,"btn-disabled",n[2]),x(a,"btn-loading",n[2]),m(e,"class","block")},m(p,h){S(p,e,h),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),v(e,a),u=!0,f||(d=J(e,"submit",xe(n[3])),f=!0)},p(p,h){const g={};h&769&&(g.$$scope={dirty:h,ctx:p}),s.$set(g);const _={};h&770&&(_.$$scope={dirty:h,ctx:p}),o.$set(_),(!u||h&4)&&x(a,"btn-disabled",p[2]),(!u||h&4)&&x(a,"btn-loading",p[2])},i(p){u||(I(s.$$.fragment,p),I(o.$$.fragment,p),u=!0)},o(p){P(s.$$.fragment,p),P(o.$$.fragment,p),u=!1},d(p){p&&w(e),H(s),H(o),f=!1,d()}}}function _D(n){let e,t;return e=new gb({props:{$$slots:{default:[hD]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function gD(n,e,t){let i;Ze(n,Ta,d=>t(6,i=d));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),de.admins.authWithPassword(l,o).then(()=>{Fa(),Vi("/")}).catch(()=>{As("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class bD extends be{constructor(e){super(),ge(this,e,gD,_D,_e,{})}}function vD(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E;i=new pe({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[kD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[wD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new pe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[SD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[$D,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Dh(n);return{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),r=D(),B(a.$$.fragment),u=D(),B(f.$$.fragment),d=D(),p=y("div"),h=y("div"),g=D(),M&&M.c(),_=D(),b=y("button"),k=y("span"),k.textContent="Save changes",m(t,"class","col-lg-6"),m(l,"class","col-lg-6"),m(h,"class","flex-fill"),m(k,"class","txt"),m(b,"type","submit"),m(b,"class","btn btn-expanded"),b.disabled=$=!n[3]||n[2],x(b,"btn-loading",n[2]),m(p,"class","col-lg-12 flex"),m(e,"class","grid")},m(O,A){S(O,e,A),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),z(a,e,null),v(e,u),z(f,e,null),v(e,d),v(e,p),v(p,h),v(p,g),M&&M.m(p,null),v(p,_),v(p,b),v(b,k),C=!0,T||(E=J(b,"click",n[13]),T=!0)},p(O,A){const L={};A&1572865&&(L.$$scope={dirty:A,ctx:O}),i.$set(L);const N={};A&1572865&&(N.$$scope={dirty:A,ctx:O}),o.$set(N);const q={};A&1572865&&(q.$$scope={dirty:A,ctx:O}),a.$set(q);const R={};A&1572865&&(R.$$scope={dirty:A,ctx:O}),f.$set(R),O[3]?M?M.p(O,A):(M=Dh(O),M.c(),M.m(p,_)):M&&(M.d(1),M=null),(!C||A&12&&$!==($=!O[3]||O[2]))&&(b.disabled=$),(!C||A&4)&&x(b,"btn-loading",O[2])},i(O){C||(I(i.$$.fragment,O),I(o.$$.fragment,O),I(a.$$.fragment,O),I(f.$$.fragment,O),C=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),C=!1},d(O){O&&w(e),H(i),H(o),H(a),H(f),M&&M.d(),T=!1,E()}}}function yD(n){let e;return{c(){e=y("div"),m(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function kD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Application name"),s=D(),l=y("input"),m(e,"for",i=n[19]),m(l,"type","text"),m(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].meta.appName),r||(a=J(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&m(e,"for",i),f&524288&&o!==(o=u[19])&&m(l,"id",o),f&1&&l.value!==u[0].meta.appName&&re(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function wD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Application url"),s=D(),l=y("input"),m(e,"for",i=n[19]),m(l,"type","text"),m(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].meta.appUrl),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&m(e,"for",i),f&524288&&o!==(o=u[19])&&m(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&re(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Logs max days retention"),s=D(),l=y("input"),m(e,"for",i=n[19]),m(l,"type","number"),m(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].logs.maxDays),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&m(e,"for",i),f&524288&&o!==(o=u[19])&&m(l,"id",o),f&1&&mt(l.value)!==u[0].logs.maxDays&&re(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $D(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=D(),s=y("label"),l=y("span"),l.textContent="Hide collection create and edit controls",o=D(),r=y("i"),m(e,"type","checkbox"),m(e,"id",t=n[19]),m(l,"class","txt"),m(r,"class","ri-information-line link-hint"),m(s,"for",a=n[19])},m(d,p){S(d,e,p),e.checked=n[0].meta.hideControls,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),Oe(Be.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(d,p){p&524288&&t!==(t=d[19])&&m(e,"id",t),p&1&&(e.checked=d[0].meta.hideControls),p&524288&&a!==(a=d[19])&&m(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function Dh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function TD(n){let e,t,i,s,l,o,r,a,u;const f=[yD,vD],d=[];function p(h,g){return h[1]?0:1}return l=p(n),o=d[l]=f[l](n),{c(){e=y("header"),e.innerHTML=``,t=D(),i=y("div"),s=y("form"),o.c(),m(e,"class","page-header"),m(s,"class","panel"),m(s,"autocomplete","off"),m(i,"class","wrapper")},m(h,g){S(h,e,g),S(h,t,g),S(h,i,g),v(i,s),d[l].m(s,null),r=!0,a||(u=J(s,"submit",xe(n[4])),a=!0)},p(h,g){let _=l;l=p(h),l===_?d[l].p(h,g):(ue(),P(d[_],1,1,()=>{d[_]=null}),fe(),o=d[l],o?o.p(h,g):(o=d[l]=f[l](h),o.c()),I(o,1),o.m(s,null))},i(h){r||(I(o),r=!0)},o(h){P(o),r=!1},d(h){h&&w(e),h&&w(t),h&&w(i),d[l].d(),a=!1,u()}}}function CD(n){let e,t,i,s;return e=new Mi({}),i=new Sn({props:{$$slots:{default:[TD]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function MD(n,e,t){let i,s,l,o;Ze(n,Is,M=>t(14,s=M)),Ze(n,So,M=>t(15,l=M)),Ze(n,Mt,M=>t(16,o=M)),ln(Mt,o="Application settings",o);let r={},a={},u=!1,f=!1,d="";p();async function p(){t(1,u=!0);try{const M=await de.settings.getAll()||{};g(M)}catch(M){de.error(M)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const M=await de.settings.update(U.filterRedactedProps(a));g(M),Ht("Successfully saved application settings.")}catch(M){de.error(M)}t(2,f=!1)}}function g(M={}){var O,A;ln(So,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),ln(Is,s=!!((A=M==null?void 0:M.meta)!=null&&A.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function _(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function k(){a.meta.appUrl=this.value,t(0,a)}function $(){a.logs.maxDays=mt(this.value),t(0,a)}function C(){a.meta.hideControls=this.checked,t(0,a)}const T=()=>_(),E=()=>h();return n.$$.update=()=>{n.$$.dirty&64&&t(7,d=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=d!=JSON.stringify(a))},[a,u,f,i,h,_,r,d,b,k,$,C,T,E]}class ED extends be{constructor(e){super(),ge(this,e,MD,CD,_e,{})}}function OD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=D(),s=y("input"),m(t,"type","button"),m(t,"class","btn btn-transparent btn-circle"),m(e,"class","form-field-addon"),ai(s,a)},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Oe(Be.call(null,t,{position:"left",text:"Set new value"})),J(t,"click",n[6])],l=!0)},p(u,f){ai(s,a=Et(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,De(o)}}}function AD(n){let e;function t(l,o){return l[3]?DD:OD}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function ID(n,e,t){const i=["value","mask"];let s=tt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await cn(),r==null||r.focus()}const f=()=>u();function d(h){ne[h?"unshift":"push"](()=>{r=h,t(2,r)})}function p(){l=this.value,t(0,l)}return n.$$set=h=>{e=je(je({},e),Gt(h)),t(5,s=tt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,d,p]}class mu extends be{constructor(e){super(),ge(this,e,ID,AD,_e,{value:0,mask:1})}}function LD(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_;return{c(){e=y("label"),t=Y("Subject"),s=D(),l=y("input"),r=D(),a=y("div"),u=Y(`Available placeholder parameters: + `),f=y("button"),f.textContent=`{APP_NAME} + `,d=Y(`, + `),p=y("button"),p.textContent=`{APP_URL} + `,h=Y("."),m(e,"for",i=n[31]),m(l,"type","text"),m(l,"id",o=n[31]),m(l,"spellcheck","false"),l.required=!0,m(f,"type","button"),m(f,"class","label label-sm link-primary txt-mono"),m(p,"type","button"),m(p,"class","label label-sm link-primary txt-mono"),m(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),S(b,l,k),re(l,n[0].subject),S(b,r,k),S(b,a,k),v(a,u),v(a,f),v(a,d),v(a,p),v(a,h),g||(_=[J(l,"input",n[13]),J(f,"click",n[14]),J(p,"click",n[15])],g=!0)},p(b,k){k[1]&1&&i!==(i=b[31])&&m(e,"for",i),k[1]&1&&o!==(o=b[31])&&m(l,"id",o),k[0]&1&&l.value!==b[0].subject&&re(l,b[0].subject)},d(b){b&&w(e),b&&w(s),b&&w(l),b&&w(r),b&&w(a),g=!1,De(_)}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k;return{c(){e=y("label"),t=Y("Action URL"),s=D(),l=y("input"),r=D(),a=y("div"),u=Y(`Available placeholder parameters: + `),f=y("button"),f.textContent=`{APP_NAME} + `,d=Y(`, + `),p=y("button"),p.textContent=`{APP_URL} + `,h=Y(`, + `),g=y("button"),g.textContent=`{TOKEN} + `,_=Y("."),m(e,"for",i=n[31]),m(l,"type","text"),m(l,"id",o=n[31]),m(l,"spellcheck","false"),l.required=!0,m(f,"type","button"),m(f,"class","label label-sm link-primary txt-mono"),m(p,"type","button"),m(p,"class","label label-sm link-primary txt-mono"),m(g,"type","button"),m(g,"class","label label-sm link-primary txt-mono"),m(g,"title","Required parameter"),m(a,"class","help-block")},m($,C){S($,e,C),v(e,t),S($,s,C),S($,l,C),re(l,n[0].actionUrl),S($,r,C),S($,a,C),v(a,u),v(a,f),v(a,d),v(a,p),v(a,h),v(a,g),v(a,_),b||(k=[J(l,"input",n[16]),J(f,"click",n[17]),J(p,"click",n[18]),J(g,"click",n[19])],b=!0)},p($,C){C[1]&1&&i!==(i=$[31])&&m(e,"for",i),C[1]&1&&o!==(o=$[31])&&m(l,"id",o),C[0]&1&&l.value!==$[0].actionUrl&&re(l,$[0].actionUrl)},d($){$&&w(e),$&&w(s),$&&w(l),$&&w(r),$&&w(a),b=!1,De(k)}}}function FD(n){let e,t,i,s;return{c(){e=y("textarea"),m(e,"id",t=n[31]),m(e,"class","txt-mono"),m(e,"spellcheck","false"),m(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),re(e,n[0].body),i||(s=J(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&m(e,"id",t),o[0]&1&&re(e,l[0].body)},i:ee,o:ee,d(l){l&&w(e),i=!1,s()}}}function ND(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Rt(o,r(n)),ne.push(()=>he(e,"value",l))),{c(){e&&B(e.$$.fragment),i=Se()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,ye(()=>t=!1)),u[0]&16&&o!==(o=a[4])){if(e){ue();const d=e;P(d.$$.fragment,1,0,()=>{H(d,1)}),fe()}o?(e=Rt(o,r(a)),ne.push(()=>he(e,"value",l)),B(e.$$.fragment),I(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&I(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function RD(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T;const E=[ND,FD],M=[];function O(A,L){return A[4]&&!A[5]?0:1}return l=O(n),o=M[l]=E[l](n),{c(){e=y("label"),t=Y("Body (HTML)"),s=D(),o.c(),r=D(),a=y("div"),u=Y(`Available placeholder parameters: + `),f=y("button"),f.textContent=`{APP_NAME} + `,d=Y(`, + `),p=y("button"),p.textContent=`{APP_URL} + `,h=Y(`, + `),g=y("button"),g.textContent=`{TOKEN} + `,_=Y(`, + `),b=y("button"),b.textContent=`{ACTION_URL} + `,k=Y("."),m(e,"for",i=n[31]),m(f,"type","button"),m(f,"class","label label-sm link-primary txt-mono"),m(p,"type","button"),m(p,"class","label label-sm link-primary txt-mono"),m(g,"type","button"),m(g,"class","label label-sm link-primary txt-mono"),m(b,"type","button"),m(b,"class","label label-sm link-primary txt-mono"),m(b,"title","Required parameter"),m(a,"class","help-block")},m(A,L){S(A,e,L),v(e,t),S(A,s,L),M[l].m(A,L),S(A,r,L),S(A,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,h),v(a,g),v(a,_),v(a,b),v(a,k),$=!0,C||(T=[J(f,"click",n[22]),J(p,"click",n[23]),J(g,"click",n[24]),J(b,"click",n[25])],C=!0)},p(A,L){(!$||L[1]&1&&i!==(i=A[31]))&&m(e,"for",i);let N=l;l=O(A),l===N?M[l].p(A,L):(ue(),P(M[N],1,1,()=>{M[N]=null}),fe(),o=M[l],o?o.p(A,L):(o=M[l]=E[l](A),o.c()),I(o,1),o.m(r.parentNode,r))},i(A){$||(I(o),$=!0)},o(A){P(o),$=!1},d(A){A&&w(e),A&&w(s),M[l].d(A),A&&w(r),A&&w(a),C=!1,De(T)}}}function qD(n){let e,t,i,s,l,o;return e=new pe({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[LD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new pe({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[PD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[RD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),S(r,s,a),z(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function Ah(n){let e,t,i,s,l;return{c(){e=y("i"),m(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Oe(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&et(()=>{i&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function jD(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Ah();return{c(){e=y("div"),t=y("i"),i=D(),s=y("span"),l=Y(n[2]),o=D(),r=y("div"),a=D(),f&&f.c(),u=Se(),m(t,"class","ri-draft-line"),m(s,"class","txt"),m(e,"class","inline-flex"),m(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&le(l,d[2]),d[6]?f?p[0]&64&&I(f,1):(f=Ah(),f.c(),I(f,1),f.m(u.parentNode,u)):f&&(ue(),P(f,1,1,()=>{f=null}),fe())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function VD(n){let e,t;const i=[n[8]];let s={$$slots:{header:[jD],default:[qD]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=Ih,p=!1;function h(){f==null||f.expand()}function g(){f==null||f.collapse()}function _(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await ut(()=>import("./CodeEditor-761096ff.js"),["./CodeEditor-761096ff.js","./index-03b6b7de.js"],import.meta.url)).default),Ih=d,t(5,p=!1))}function k(G){U.copyToClipboard(G),yo(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const C=()=>k("{APP_NAME}"),T=()=>k("{APP_URL}");function E(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),O=()=>k("{APP_URL}"),A=()=>k("{TOKEN}");function L(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function N(){u.body=this.value,t(0,u)}const q=()=>k("{APP_NAME}"),R=()=>k("{APP_URL}"),F=()=>k("{TOKEN}"),j=()=>k("{ACTION_URL}");function V(G){ne[G?"unshift":"push"](()=>{f=G,t(3,f)})}function W(G){me.call(this,n,G)}function te(G){me.call(this,n,G)}function X(G){me.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),Gt(G)),t(8,l=tt(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!U.isEmpty(U.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||ui(r))},[u,r,a,f,d,p,i,k,l,h,g,_,o,$,C,T,E,M,O,A,L,N,q,R,F,j,V,W,te,X]}class qr extends be{constructor(e){super(),ge(this,e,zD,VD,_e,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Lh(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ph(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,h;return d=W1(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=D(),o=y("label"),a=Y(r),f=D(),m(i,"type","radio"),m(i,"name","template"),m(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,m(o,"for",u=e[20]+e[21].value),m(t,"class","form-field-block"),d.p(i),this.first=t},m(g,_){S(g,t,_),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(h=J(i,"change",e[10]),p=!0)},p(g,_){e=g,_&1048576&&s!==(s=e[20]+e[21].value)&&m(i,"id",s),_&4&&(i.checked=i.__value===e[2]),_&1048576&&u!==(u=e[20]+e[21].value)&&m(o,"for",u)},d(g){g&&w(t),d.r(),p=!1,h()}}}function HD(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new pe({props:{class:"form-field required m-0",name:"email",$$slots:{default:[BD,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),B(t.$$.fragment),i=D(),B(s.$$.fragment),m(e,"id",n[6]),m(e,"autocomplete","off")},m(a,u){S(a,e,u),z(t,e,null),v(e,i),z(s,e,null),l=!0,o||(r=J(e,"submit",xe(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(I(t.$$.fragment,a),I(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function WD(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",m(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function YD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=Y("Close"),i=D(),s=y("button"),l=y("i"),o=D(),r=y("span"),r.textContent="Send",m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[4],m(l,"class","ri-mail-send-line"),m(r,"class","txt"),m(s,"type","submit"),m(s,"form",n[6]),m(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function KD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[YD],header:[WD],default:[UD]},$$scope:{ctx:n}};return e=new on({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),H(e,s)}}}const jr="last_email_test",Fh="email_test_request";function JD(n,e,t){let i;const s=Tt(),l="email_test_"+U.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(jr),u=o[0].value,f=!1,d=null;function p(O="",A=""){t(1,a=O||localStorage.getItem(jr)),t(2,u=A||o[0].value),tn({}),r==null||r.show()}function h(){return clearTimeout(d),r==null?void 0:r.hide()}async function g(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(jr,a),clearTimeout(d),d=setTimeout(()=>{de.cancelRequest(Fh),As("Test email send timeout.")},3e4);try{await de.settings.testEmail(a,u,{$cancelKey:Fh}),Ht("Successfully sent test email."),s("submit"),t(4,f=!1),await cn(),h()}catch(O){t(4,f=!1),de.error(O)}clearTimeout(d)}}const _=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>g(),C=()=>!f;function T(O){ne[O?"unshift":"push"](()=>{r=O,t(3,r)})}function E(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,g,p,b,_,k,$,C,T,E,M]}class ZD extends be{constructor(e){super(),ge(this,e,JD,KD,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function GD(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O,A,L,N;i=new pe({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[QD,({uniqueId:Q})=>({31:Q}),({uniqueId:Q})=>[0,Q?1:0]]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[xD,({uniqueId:Q})=>({31:Q}),({uniqueId:Q})=>[0,Q?1:0]]},$$scope:{ctx:n}}});function q(Q){n[14](Q)}let R={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(R.config=n[0].meta.verificationTemplate),u=new qr({props:R}),ne.push(()=>he(u,"config",q));function F(Q){n[15](Q)}let j={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(j.config=n[0].meta.resetPasswordTemplate),p=new qr({props:j}),ne.push(()=>he(p,"config",F));function V(Q){n[16](Q)}let W={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(W.config=n[0].meta.confirmEmailChangeTemplate),_=new qr({props:W}),ne.push(()=>he(_,"config",V)),T=new pe({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[eA,({uniqueId:Q})=>({31:Q}),({uniqueId:Q})=>[0,Q?1:0]]},$$scope:{ctx:n}}});let te=n[0].smtp.enabled&&Nh(n);function X(Q,se){return Q[4]?aA:rA}let G=X(n),ae=G(n);return{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),r=D(),a=y("div"),B(u.$$.fragment),d=D(),B(p.$$.fragment),g=D(),B(_.$$.fragment),k=D(),$=y("hr"),C=D(),B(T.$$.fragment),E=D(),te&&te.c(),M=D(),O=y("div"),A=y("div"),L=D(),ae.c(),m(t,"class","col-lg-6"),m(l,"class","col-lg-6"),m(e,"class","grid m-b-base"),m(a,"class","accordions"),m(A,"class","flex-fill"),m(O,"class","flex")},m(Q,se){S(Q,e,se),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),S(Q,r,se),S(Q,a,se),z(u,a,null),v(a,d),z(p,a,null),v(a,g),z(_,a,null),S(Q,k,se),S(Q,$,se),S(Q,C,se),z(T,Q,se),S(Q,E,se),te&&te.m(Q,se),S(Q,M,se),S(Q,O,se),v(O,A),v(O,L),ae.m(O,null),N=!0},p(Q,se){const ve={};se[0]&1|se[1]&3&&(ve.$$scope={dirty:se,ctx:Q}),i.$set(ve);const $e={};se[0]&1|se[1]&3&&($e.$$scope={dirty:se,ctx:Q}),o.$set($e);const ze={};!f&&se[0]&1&&(f=!0,ze.config=Q[0].meta.verificationTemplate,ye(()=>f=!1)),u.$set(ze);const Ue={};!h&&se[0]&1&&(h=!0,Ue.config=Q[0].meta.resetPasswordTemplate,ye(()=>h=!1)),p.$set(Ue);const we={};!b&&se[0]&1&&(b=!0,we.config=Q[0].meta.confirmEmailChangeTemplate,ye(()=>b=!1)),_.$set(we);const Ee={};se[0]&1|se[1]&3&&(Ee.$$scope={dirty:se,ctx:Q}),T.$set(Ee),Q[0].smtp.enabled?te?(te.p(Q,se),se[0]&1&&I(te,1)):(te=Nh(Q),te.c(),I(te,1),te.m(M.parentNode,M)):te&&(ue(),P(te,1,1,()=>{te=null}),fe()),G===(G=X(Q))&&ae?ae.p(Q,se):(ae.d(1),ae=G(Q),ae&&(ae.c(),ae.m(O,null)))},i(Q){N||(I(i.$$.fragment,Q),I(o.$$.fragment,Q),I(u.$$.fragment,Q),I(p.$$.fragment,Q),I(_.$$.fragment,Q),I(T.$$.fragment,Q),I(te),N=!0)},o(Q){P(i.$$.fragment,Q),P(o.$$.fragment,Q),P(u.$$.fragment,Q),P(p.$$.fragment,Q),P(_.$$.fragment,Q),P(T.$$.fragment,Q),P(te),N=!1},d(Q){Q&&w(e),H(i),H(o),Q&&w(r),Q&&w(a),H(u),H(p),H(_),Q&&w(k),Q&&w($),Q&&w(C),H(T,Q),Q&&w(E),te&&te.d(Q),Q&&w(M),Q&&w(O),ae.d()}}}function XD(n){let e;return{c(){e=y("div"),m(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function QD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Sender name"),s=D(),l=y("input"),m(e,"for",i=n[31]),m(l,"type","text"),m(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&m(e,"for",i),f[1]&1&&o!==(o=u[31])&&m(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&re(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Sender address"),s=D(),l=y("input"),m(e,"for",i=n[31]),m(l,"type","email"),m(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&m(e,"for",i),f[1]&1&&o!==(o=u[31])&&m(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&re(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function eA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=D(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=D(),r=y("i"),m(e,"type","checkbox"),m(e,"id",t=n[31]),e.required=!0,m(l,"class","txt"),m(r,"class","ri-information-line link-hint"),m(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),Oe(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(d,p){p[1]&1&&t!==(t=d[31])&&m(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&m(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M;return i=new pe({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[tA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[nA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[iA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),p=new pe({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[sA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),_=new pe({props:{class:"form-field",name:"smtp.username",$$slots:{default:[lA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),$=new pe({props:{class:"form-field",name:"smtp.password",$$slots:{default:[oA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),r=D(),a=y("div"),B(u.$$.fragment),f=D(),d=y("div"),B(p.$$.fragment),h=D(),g=y("div"),B(_.$$.fragment),b=D(),k=y("div"),B($.$$.fragment),C=D(),T=y("div"),m(t,"class","col-lg-4"),m(l,"class","col-lg-2"),m(a,"class","col-lg-3"),m(d,"class","col-lg-3"),m(g,"class","col-lg-6"),m(k,"class","col-lg-6"),m(T,"class","col-lg-12"),m(e,"class","grid")},m(O,A){S(O,e,A),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,h),v(e,g),z(_,g,null),v(e,b),v(e,k),z($,k,null),v(e,C),v(e,T),M=!0},p(O,A){const L={};A[0]&1|A[1]&3&&(L.$$scope={dirty:A,ctx:O}),i.$set(L);const N={};A[0]&1|A[1]&3&&(N.$$scope={dirty:A,ctx:O}),o.$set(N);const q={};A[0]&1|A[1]&3&&(q.$$scope={dirty:A,ctx:O}),u.$set(q);const R={};A[0]&1|A[1]&3&&(R.$$scope={dirty:A,ctx:O}),p.$set(R);const F={};A[0]&1|A[1]&3&&(F.$$scope={dirty:A,ctx:O}),_.$set(F);const j={};A[0]&1|A[1]&3&&(j.$$scope={dirty:A,ctx:O}),$.$set(j)},i(O){M||(I(i.$$.fragment,O),I(o.$$.fragment,O),I(u.$$.fragment,O),I(p.$$.fragment,O),I(_.$$.fragment,O),I($.$$.fragment,O),O&&et(()=>{M&&(E||(E=Ve(e,rt,{duration:150},!0)),E.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(_.$$.fragment,O),P($.$$.fragment,O),O&&(E||(E=Ve(e,rt,{duration:150},!1)),E.run(0)),M=!1},d(O){O&&w(e),H(i),H(o),H(u),H(p),H(_),H($),O&&E&&E.end()}}}function tA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("SMTP server host"),s=D(),l=y("input"),m(e,"for",i=n[31]),m(l,"type","text"),m(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&m(e,"for",i),f[1]&1&&o!==(o=u[31])&&m(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&re(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function nA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Port"),s=D(),l=y("input"),m(e,"for",i=n[31]),m(l,"type","number"),m(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&m(e,"for",i),f[1]&1&&o!==(o=u[31])&&m(l,"id",o),f[0]&1&&mt(l.value)!==u[0].smtp.port&&re(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function iA(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Bi({props:u}),ne.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=Y("TLS encryption"),s=D(),B(l.$$.fragment),m(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&m(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ye(()=>o=!1)),l.$set(p)},i(f){r||(I(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function sA(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Bi({props:u}),ne.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=Y("AUTH method"),s=D(),B(l.$$.fragment),m(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&m(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ye(()=>o=!1)),l.$set(p)},i(f){r||(I(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function lA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Username"),s=D(),l=y("input"),m(e,"for",i=n[31]),m(l,"type","text"),m(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&m(e,"for",i),f[1]&1&&o!==(o=u[31])&&m(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&re(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function oA(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new mu({props:u}),ne.push(()=>he(l,"value",a)),{c(){e=y("label"),t=Y("Password"),s=D(),B(l.$$.fragment),m(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&m(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ye(()=>o=!1)),l.$set(p)},i(f){r||(I(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function rA(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Send test email`,m(e,"type","button"),m(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function aA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=D(),s=y("button"),l=y("span"),l.textContent="Save changes",m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],m(l,"class","txt"),m(s,"type","submit"),m(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"click",n[24]),J(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,De(a)}}}function uA(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b;const k=[XD,GD],$=[];function C(T,E){return T[2]?0:1}return p=C(n),h=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[5]),r=D(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",d=D(),h.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(f,"class","content txt-xl m-b-base"),m(u,"class","panel"),m(u,"autocomplete","off"),m(a,"class","wrapper")},m(T,E){S(T,e,E),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(T,r,E),S(T,a,E),v(a,u),v(u,f),v(u,d),$[p].m(u,null),g=!0,_||(b=J(u,"submit",xe(n[27])),_=!0)},p(T,E){(!g||E[0]&32)&&le(o,T[5]);let M=p;p=C(T),p===M?$[p].p(T,E):(ue(),P($[M],1,1,()=>{$[M]=null}),fe(),h=$[p],h?h.p(T,E):(h=$[p]=k[p](T),h.c()),I(h,1),h.m(u,null))},i(T){g||(I(h),g=!0)},o(T){P(h),g=!1},d(T){T&&w(e),T&&w(r),T&&w(a),$[p].d(),_=!1,b()}}}function fA(n){let e,t,i,s,l,o;e=new Mi({}),i=new Sn({props:{$$slots:{default:[uA]},$$scope:{ctx:n}}});let r={};return l=new ZD({props:r}),n[28](l),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[28](null),H(l,a)}}}function cA(n,e,t){let i,s,l;Ze(n,Mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];ln(Mt,l="Mail settings",l);let a,u={},f={},d=!1,p=!1;h();async function h(){t(2,d=!0);try{const X=await de.settings.getAll()||{};_(X)}catch(X){de.error(X)}t(2,d=!1)}async function g(){if(!(p||!s)){t(3,p=!0);try{const X=await de.settings.update(U.filterRedactedProps(f));_(X),tn({}),Ht("Successfully saved mail settings.")}catch(X){de.error(X)}t(3,p=!1)}}function _(X={}){t(0,f={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function k(){f.meta.senderName=this.value,t(0,f)}function $(){f.meta.senderAddress=this.value,t(0,f)}function C(X){n.$$.not_equal(f.meta.verificationTemplate,X)&&(f.meta.verificationTemplate=X,t(0,f))}function T(X){n.$$.not_equal(f.meta.resetPasswordTemplate,X)&&(f.meta.resetPasswordTemplate=X,t(0,f))}function E(X){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,X)&&(f.meta.confirmEmailChangeTemplate=X,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function A(){f.smtp.port=mt(this.value),t(0,f)}function L(X){n.$$.not_equal(f.smtp.tls,X)&&(f.smtp.tls=X,t(0,f))}function N(X){n.$$.not_equal(f.smtp.authMethod,X)&&(f.smtp.authMethod=X,t(0,f))}function q(){f.smtp.username=this.value,t(0,f)}function R(X){n.$$.not_equal(f.smtp.password,X)&&(f.smtp.password=X,t(0,f))}const F=()=>b(),j=()=>g(),V=()=>a==null?void 0:a.show(),W=()=>g();function te(X){ne[X?"unshift":"push"](()=>{a=X,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,d,p,s,l,o,r,g,b,u,i,k,$,C,T,E,M,O,A,L,N,q,R,F,j,V,W,te]}class dA extends be{constructor(e){super(),ge(this,e,cA,fA,_e,{},null,[-1,-1])}}const pA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),Rh=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function mA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y(n[4]),m(e,"type","checkbox"),m(e,"id",t=n[20]),e.required=!0,m(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&m(e,"id",t),f&1&&(e.checked=u[0].enabled),f&16&&le(l,u[4]),f&1048576&&o!==(o=u[20])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function qh(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M;return i=new pe({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[hA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[_A,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[gA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),p=new pe({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[bA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),_=new pe({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[vA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),$=new pe({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[yA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),B(i.$$.fragment),s=D(),l=y("div"),B(o.$$.fragment),r=D(),a=y("div"),B(u.$$.fragment),f=D(),d=y("div"),B(p.$$.fragment),h=D(),g=y("div"),B(_.$$.fragment),b=D(),k=y("div"),B($.$$.fragment),C=D(),T=y("div"),m(t,"class","col-lg-6"),m(l,"class","col-lg-3"),m(a,"class","col-lg-3"),m(d,"class","col-lg-6"),m(g,"class","col-lg-6"),m(k,"class","col-lg-12"),m(T,"class","col-lg-12"),m(e,"class","grid")},m(O,A){S(O,e,A),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,h),v(e,g),z(_,g,null),v(e,b),v(e,k),z($,k,null),v(e,C),v(e,T),M=!0},p(O,A){const L={};A&8&&(L.name=O[3]+".endpoint"),A&1081345&&(L.$$scope={dirty:A,ctx:O}),i.$set(L);const N={};A&8&&(N.name=O[3]+".bucket"),A&1081345&&(N.$$scope={dirty:A,ctx:O}),o.$set(N);const q={};A&8&&(q.name=O[3]+".region"),A&1081345&&(q.$$scope={dirty:A,ctx:O}),u.$set(q);const R={};A&8&&(R.name=O[3]+".accessKey"),A&1081345&&(R.$$scope={dirty:A,ctx:O}),p.$set(R);const F={};A&8&&(F.name=O[3]+".secret"),A&1081345&&(F.$$scope={dirty:A,ctx:O}),_.$set(F);const j={};A&8&&(j.name=O[3]+".forcePathStyle"),A&1081345&&(j.$$scope={dirty:A,ctx:O}),$.$set(j)},i(O){M||(I(i.$$.fragment,O),I(o.$$.fragment,O),I(u.$$.fragment,O),I(p.$$.fragment,O),I(_.$$.fragment,O),I($.$$.fragment,O),O&&et(()=>{M&&(E||(E=Ve(e,rt,{duration:150},!0)),E.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(_.$$.fragment,O),P($.$$.fragment,O),O&&(E||(E=Ve(e,rt,{duration:150},!1)),E.run(0)),M=!1},d(O){O&&w(e),H(i),H(o),H(u),H(p),H(_),H($),O&&E&&E.end()}}}function hA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Endpoint"),s=D(),l=y("input"),m(e,"for",i=n[20]),m(l,"type","text"),m(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].endpoint),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&m(e,"for",i),f&1048576&&o!==(o=u[20])&&m(l,"id",o),f&1&&l.value!==u[0].endpoint&&re(l,u[0].endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _A(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Bucket"),s=D(),l=y("input"),m(e,"for",i=n[20]),m(l,"type","text"),m(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].bucket),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&m(e,"for",i),f&1048576&&o!==(o=u[20])&&m(l,"id",o),f&1&&l.value!==u[0].bucket&&re(l,u[0].bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function gA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Region"),s=D(),l=y("input"),m(e,"for",i=n[20]),m(l,"type","text"),m(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].region),r||(a=J(l,"input",n[11]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&m(e,"for",i),f&1048576&&o!==(o=u[20])&&m(l,"id",o),f&1&&l.value!==u[0].region&&re(l,u[0].region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function bA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Access key"),s=D(),l=y("input"),m(e,"for",i=n[20]),m(l,"type","text"),m(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[0].accessKey),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&m(e,"for",i),f&1048576&&o!==(o=u[20])&&m(l,"id",o),f&1&&l.value!==u[0].accessKey&&re(l,u[0].accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function vA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new mu({props:u}),ne.push(()=>he(l,"value",a)),{c(){e=y("label"),t=Y("Secret"),s=D(),B(l.$$.fragment),m(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&m(e,"for",i);const p={};d&1048576&&(p.id=f[20]),!o&&d&1&&(o=!0,p.value=f[0].secret,ye(()=>o=!1)),l.$set(p)},i(f){r||(I(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function yA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=D(),s=y("label"),l=y("span"),l.textContent="Force path-style addressing",o=D(),r=y("i"),m(e,"type","checkbox"),m(e,"id",t=n[20]),m(l,"class","txt"),m(r,"class","ri-information-line link-hint"),m(s,"for",a=n[20])},m(d,p){S(d,e,p),e.checked=n[0].forcePathStyle,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[14]),Oe(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(d,p){p&1048576&&t!==(t=d[20])&&m(e,"id",t),p&1&&(e.checked=d[0].forcePathStyle),p&1048576&&a!==(a=d[20])&&m(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function kA(n){let e,t,i,s,l;e=new pe({props:{class:"form-field form-field-toggle",$$slots:{default:[mA,({uniqueId:u})=>({20:u}),({uniqueId:u})=>u?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=kt(o,n,n[15],Rh);let a=n[0].enabled&&qh(n);return{c(){B(e.$$.fragment),t=D(),r&&r.c(),i=D(),a&&a.c(),s=Se()},m(u,f){z(e,u,f),S(u,t,f),r&&r.m(u,f),S(u,i,f),a&&a.m(u,f),S(u,s,f),l=!0},p(u,[f]){const d={};f&1081361&&(d.$$scope={dirty:f,ctx:u}),e.$set(d),r&&r.p&&(!l||f&32775)&&St(r,o,u,u[15],l?wt(o,u[15],f,pA):$t(u[15]),Rh),u[0].enabled?a?(a.p(u,f),f&1&&I(a,1)):(a=qh(u),a.c(),I(a,1),a.m(s.parentNode,s)):a&&(ue(),P(a,1,1,()=>{a=null}),fe())},i(u){l||(I(e.$$.fragment,u),I(r,u),I(a),l=!0)},o(u){P(e.$$.fragment,u),P(r,u),P(a),l=!1},d(u){H(e,u),u&&w(t),r&&r.d(u),u&&w(i),a&&a.d(u),u&&w(s)}}}const Vr="s3_test_request";function wA(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:u="storage"}=e,{testError:f=null}=e,{isTesting:d=!1}=e,p=null,h=null;function g(O){t(2,d=!0),clearTimeout(h),h=setTimeout(()=>{_()},O)}async function _(){if(t(1,f=null),!o.enabled)return t(2,d=!1),f;de.cancelRequest(Vr),clearTimeout(p),p=setTimeout(()=>{de.cancelRequest(Vr),t(1,f=new Error("S3 test connection timeout.")),t(2,d=!1)},3e4),t(2,d=!0);let O;try{await de.settings.testS3(u,{$cancelKey:Vr})}catch(A){O=A}return O!=null&&O.isAbort||(t(1,f=O),t(2,d=!1),clearTimeout(p)),f}Xt(()=>()=>{clearTimeout(p),clearTimeout(h)});function b(){o.enabled=this.checked,t(0,o)}function k(){o.endpoint=this.value,t(0,o)}function $(){o.bucket=this.value,t(0,o)}function C(){o.region=this.value,t(0,o)}function T(){o.accessKey=this.value,t(0,o)}function E(O){n.$$.not_equal(o.secret,O)&&(o.secret=O,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=O=>{"originalConfig"in O&&t(5,l=O.originalConfig),"config"in O&&t(0,o=O.config),"configKey"in O&&t(3,r=O.configKey),"toggleLabel"in O&&t(4,a=O.toggleLabel),"testFilesystem"in O&&t(6,u=O.testFilesystem),"testError"in O&&t(1,f=O.testError),"isTesting"in O&&t(2,d=O.isTesting),"$$scope"in O&&t(15,s=O.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&g(100),n.$$.dirty&9&&(o.enabled||ui(r))},[o,f,d,r,a,l,u,i,b,k,$,C,T,E,M,s]}class C1 extends be{constructor(e){super(),ge(this,e,wA,kA,_e,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function SA(n){var O;let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b;function k(A){n[11](A)}function $(A){n[12](A)}function C(A){n[13](A)}let T={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[TA]},$$scope:{ctx:n}};n[1].s3!==void 0&&(T.config=n[1].s3),n[4]!==void 0&&(T.isTesting=n[4]),n[5]!==void 0&&(T.testError=n[5]),e=new C1({props:T}),ne.push(()=>he(e,"config",k)),ne.push(()=>he(e,"isTesting",$)),ne.push(()=>he(e,"testError",C));let E=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&Vh(n),M=n[6]&&zh(n);return{c(){B(e.$$.fragment),l=D(),o=y("div"),r=y("div"),a=D(),E&&E.c(),u=D(),M&&M.c(),f=D(),d=y("button"),p=y("span"),p.textContent="Save changes",m(r,"class","flex-fill"),m(p,"class","txt"),m(d,"type","submit"),m(d,"class","btn btn-expanded"),d.disabled=h=!n[6]||n[3],x(d,"btn-loading",n[3]),m(o,"class","flex")},m(A,L){z(e,A,L),S(A,l,L),S(A,o,L),v(o,r),v(o,a),E&&E.m(o,null),v(o,u),M&&M.m(o,null),v(o,f),v(o,d),v(d,p),g=!0,_||(b=J(d,"click",n[15]),_=!0)},p(A,L){var q;const N={};L&1&&(N.originalConfig=A[0].s3),L&524291&&(N.$$scope={dirty:L,ctx:A}),!t&&L&2&&(t=!0,N.config=A[1].s3,ye(()=>t=!1)),!i&&L&16&&(i=!0,N.isTesting=A[4],ye(()=>i=!1)),!s&&L&32&&(s=!0,N.testError=A[5],ye(()=>s=!1)),e.$set(N),(q=A[1].s3)!=null&&q.enabled&&!A[6]&&!A[3]?E?E.p(A,L):(E=Vh(A),E.c(),E.m(o,u)):E&&(E.d(1),E=null),A[6]?M?M.p(A,L):(M=zh(A),M.c(),M.m(o,f)):M&&(M.d(1),M=null),(!g||L&72&&h!==(h=!A[6]||A[3]))&&(d.disabled=h),(!g||L&8)&&x(d,"btn-loading",A[3])},i(A){g||(I(e.$$.fragment,A),g=!0)},o(A){P(e.$$.fragment,A),g=!1},d(A){H(e,A),A&&w(l),A&&w(o),E&&E.d(),M&&M.d(),_=!1,b()}}}function $A(n){let e;return{c(){e=y("div"),m(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function jh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,d,p=n[1].s3.enabled?"S3 storage":"local file system",h,g,_,b,k,$,C,T,E,M,O,A;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=D(),l=y("div"),o=Y(`If you have existing uploaded files, you'll have to migrate them manually + from the + `),r=y("strong"),u=Y(a),f=Y(` + to the + `),d=y("strong"),h=Y(p),g=Y(`. + `),_=y("br"),b=Y(` + There are numerous command line tools that can help you, such as: + `),k=y("a"),k.textContent=`rclone + `,$=Y(`, + `),C=y("a"),C.textContent=`s5cmd + `,T=Y(", etc."),E=D(),M=y("div"),m(i,"class","icon"),m(k,"href","https://github.com/rclone/rclone"),m(k,"target","_blank"),m(k,"rel","noopener noreferrer"),m(k,"class","txt-bold"),m(C,"href","https://github.com/peak/s5cmd"),m(C,"target","_blank"),m(C,"rel","noopener noreferrer"),m(C,"class","txt-bold"),m(l,"class","content"),m(t,"class","alert alert-warning m-0"),m(M,"class","clearfix m-t-base")},m(N,q){S(N,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(r,u),v(l,f),v(l,d),v(d,h),v(l,g),v(l,_),v(l,b),v(l,k),v(l,$),v(l,C),v(l,T),v(e,E),v(e,M),A=!0},p(N,q){var R;(!A||q&1)&&a!==(a=(R=N[0].s3)!=null&&R.enabled?"S3 storage":"local file system")&&le(u,a),(!A||q&2)&&p!==(p=N[1].s3.enabled?"S3 storage":"local file system")&&le(h,p)},i(N){A||(N&&et(()=>{A&&(O||(O=Ve(e,rt,{duration:150},!0)),O.run(1))}),A=!0)},o(N){N&&(O||(O=Ve(e,rt,{duration:150},!1)),O.run(0)),A=!1},d(N){N&&w(e),N&&O&&O.end()}}}function TA(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&jh(n);return{c(){t&&t.c(),e=Se()},m(s,l){t&&t.m(s,l),S(s,e,l)},p(s,l){var o;((o=s[0].s3)==null?void 0:o.enabled)!=s[1].s3.enabled?t?(t.p(s,l),l&3&&I(t,1)):(t=jh(s),t.c(),I(t,1),t.m(e.parentNode,e)):t&&(ue(),P(t,1,1,()=>{t=null}),fe())},d(s){t&&t.d(s),s&&w(e)}}}function Vh(n){let e;function t(l,o){return l[4]?EA:l[5]?MA:CA}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function CA(n){let e;return{c(){e=y("div"),e.innerHTML=` + S3 connected successfully`,m(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function MA(n){let e,t,i,s;return{c(){e=y("div"),e.innerHTML=` + Failed to establish S3 connection`,m(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Oe(t=Be.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&jt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function EA(n){let e;return{c(){e=y("span"),m(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function zh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Reset",m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[14]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function OA(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b;const k=[$A,SA],$=[];function C(T,E){return T[2]?0:1}return p=C(n),h=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[7]),r=D(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    +

    If you have limited disk space, you could optionally connect to a S3 compatible storage.

    `,d=D(),h.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(f,"class","content txt-xl m-b-base"),m(u,"class","panel"),m(u,"autocomplete","off"),m(a,"class","wrapper")},m(T,E){S(T,e,E),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(T,r,E),S(T,a,E),v(a,u),v(u,f),v(u,d),$[p].m(u,null),g=!0,_||(b=J(u,"submit",xe(n[16])),_=!0)},p(T,E){(!g||E&128)&&le(o,T[7]);let M=p;p=C(T),p===M?$[p].p(T,E):(ue(),P($[M],1,1,()=>{$[M]=null}),fe(),h=$[p],h?h.p(T,E):(h=$[p]=k[p](T),h.c()),I(h,1),h.m(u,null))},i(T){g||(I(h),g=!0)},o(T){P(h),g=!1},d(T){T&&w(e),T&&w(r),T&&w(a),$[p].d(),_=!1,b()}}}function DA(n){let e,t,i,s;return e=new Mi({}),i=new Sn({props:{$$slots:{default:[OA]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const AA="s3_test_request";function IA(n,e,t){let i,s,l;Ze(n,Mt,M=>t(7,l=M)),ln(Mt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,d=null;p();async function p(){t(2,a=!0);try{const M=await de.settings.getAll()||{};g(M)}catch(M){de.error(M)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{de.cancelRequest(AA);const M=await de.settings.update(U.filterRedactedProps(r));tn({}),await g(M),Fa(),d?Dy("Successfully saved but failed to establish S3 connection."):Ht("Successfully saved files storage settings.")}catch(M){de.error(M)}t(3,u=!1)}}async function g(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function _(){t(1,r=JSON.parse(JSON.stringify(o||{})))}function b(M){n.$$.not_equal(r.s3,M)&&(r.s3=M,t(1,r))}function k(M){f=M,t(4,f)}function $(M){d=M,t(5,d)}const C=()=>_(),T=()=>h(),E=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,d,s,l,h,_,i,b,k,$,C,T,E]}class LA extends be{constructor(e){super(),ge(this,e,IA,DA,_e,{})}}function PA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Enable"),m(e,"type","checkbox"),m(e,"id",t=n[20]),m(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[1].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&m(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function FA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Client ID"),s=D(),l=y("input"),m(e,"for",i=n[20]),m(l,"type","text"),m(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),re(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,d){d&1048576&&i!==(i=f[20])&&m(e,"for",i),d&1048576&&o!==(o=f[20])&&m(l,"id",o),d&2&&r!==(r=f[1].enabled)&&(l.required=r),d&2&&l.value!==f[1].clientId&&re(l,f[1].clientId)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function NA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new mu({props:u}),ne.push(()=>he(l,"value",a)),{c(){e=y("label"),t=Y("Client secret"),s=D(),B(l.$$.fragment),m(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&m(e,"for",i);const p={};d&1048576&&(p.id=f[20]),d&2&&(p.required=f[1].enabled),!o&&d&2&&(o=!0,p.value=f[1].clientSecret,ye(()=>o=!1)),l.$set(p)},i(f){r||(I(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function Hh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Rt(o,r(n)),ne.push(()=>he(t,"config",l))),{c(){e=y("div"),t&&B(t.$$.fragment),m(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&z(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],ye(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){ue();const d=t;P(d.$$.fragment,1,0,()=>{H(d,1)}),fe()}o?(t=Rt(o,r(a)),ne.push(()=>he(t,"config",l)),B(t.$$.fragment),I(t.$$.fragment,1),z(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&I(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function RA(n){let e,t,i,s,l,o,r,a,u,f,d,p,h;i=new pe({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[PA,({uniqueId:_})=>({20:_}),({uniqueId:_})=>_?1048576:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[FA,({uniqueId:_})=>({20:_}),({uniqueId:_})=>_?1048576:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[NA,({uniqueId:_})=>({20:_}),({uniqueId:_})=>_?1048576:0]},$$scope:{ctx:n}}});let g=n[3].optionsComponent&&Hh(n);return{c(){e=y("form"),t=y("div"),B(i.$$.fragment),s=D(),l=y("button"),l.innerHTML='Clear all fields',o=D(),B(r.$$.fragment),a=D(),B(u.$$.fragment),f=D(),g&&g.c(),m(l,"type","button"),m(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),m(t,"class","flex m-b-base"),m(e,"id",n[6]),m(e,"autocomplete","off")},m(_,b){S(_,e,b),v(e,t),z(i,t,null),v(t,s),v(t,l),v(e,o),z(r,e,null),v(e,a),z(u,e,null),v(e,f),g&&g.m(e,null),d=!0,p||(h=[J(l,"click",n[8]),J(e,"submit",xe(n[15]))],p=!0)},p(_,b){const k={};b&8&&(k.name=_[3].key+".enabled"),b&3145730&&(k.$$scope={dirty:b,ctx:_}),i.$set(k);const $={};b&2&&($.class="form-field "+(_[1].enabled?"required":"")),b&8&&($.name=_[3].key+".clientId"),b&3145730&&($.$$scope={dirty:b,ctx:_}),r.$set($);const C={};b&2&&(C.class="form-field "+(_[1].enabled?"required":"")),b&8&&(C.name=_[3].key+".clientSecret"),b&3145730&&(C.$$scope={dirty:b,ctx:_}),u.$set(C),_[3].optionsComponent?g?(g.p(_,b),b&8&&I(g,1)):(g=Hh(_),g.c(),I(g,1),g.m(e,null)):g&&(ue(),P(g,1,1,()=>{g=null}),fe())},i(_){d||(I(i.$$.fragment,_),I(r.$$.fragment,_),I(u.$$.fragment,_),I(g),d=!0)},o(_){P(i.$$.fragment,_),P(r.$$.fragment,_),P(u.$$.fragment,_),P(g),d=!1},d(_){_&&w(e),H(i),H(r),H(u),g&&g.d(),p=!1,De(h)}}}function qA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=y("h4"),i=Y(t),s=Y(" provider"),m(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&le(i,t)},d(l){l&&w(e)}}}function jA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=Y("Close"),i=D(),s=y("button"),l=y("span"),l.textContent="Save changes",m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[4],m(l,"class","txt"),m(s,"type","submit"),m(s,"form",n[6]),m(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function VA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[jA],header:[qA],default:[RA]},$$scope:{ctx:n}};return e=new on({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}function zA(n,e,t){let i;const s=Tt(),l="provider_popup_"+U.randomString(5);let o,r={},a={},u=!1,f="";function d(O,A){tn({}),t(3,r=Object.assign({},O)),t(1,a=Object.assign({enabled:!0},A)),t(10,f=JSON.stringify(a)),o==null||o.show()}function p(){return o==null?void 0:o.hide()}async function h(){t(4,u=!0);try{const O={};O[r.key]=U.filterRedactedProps(a);const A=await de.settings.update(O);tn({}),Ht("Successfully updated provider settings."),s("submit",A),p()}catch(O){de.error(O)}t(4,u=!1)}function g(){for(let O in a)t(1,a[O]="",a);t(1,a.enabled=!1,a)}function _(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function k(O){n.$$.not_equal(a.clientSecret,O)&&(a.clientSecret=O,t(1,a))}function $(O){a=O,t(1,a)}const C=()=>h();function T(O){ne[O?"unshift":"push"](()=>{o=O,t(2,o)})}function E(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[p,a,o,r,u,i,l,h,g,d,f,_,b,k,$,C,T,E,M]}class HA extends be{constructor(e){super(),ge(this,e,zA,VA,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Bh(n){let e,t,i;return{c(){e=y("img"),_n(e.src,t="./images/oauth2/"+n[1].logo)||m(e,"src",t),m(e,"alt",i=n[1].title+" logo")},m(s,l){S(s,e,l)},p(s,l){l&2&&!_n(e.src,t="./images/oauth2/"+s[1].logo)&&m(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&m(e,"alt",i)},d(s){s&&w(e)}}}function Uh(n){let e;return{c(){e=y("div"),e.textContent="Enabled",m(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function BA(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",d,p,h,g,_,b,k,$,C,T,E=n[1].logo&&Bh(n),M=n[0].enabled&&Uh(),O={};return k=new HA({props:O}),n[4](k),k.$on("submit",n[5]),{c(){e=y("div"),t=y("figure"),E&&E.c(),i=D(),s=y("div"),o=Y(l),r=D(),a=y("em"),u=Y("("),d=Y(f),p=Y(")"),h=D(),M&&M.c(),g=D(),_=y("button"),_.innerHTML='',b=D(),B(k.$$.fragment),m(t,"class","provider-logo"),m(s,"class","title"),m(a,"class","txt-hint txt-sm m-r-auto"),m(_,"type","button"),m(_,"class","btn btn-circle btn-hint btn-transparent"),m(_,"aria-label","Provider settings"),m(e,"class","provider-card")},m(A,L){S(A,e,L),v(e,t),E&&E.m(t,null),v(e,i),v(e,s),v(s,o),v(e,r),v(e,a),v(a,u),v(a,d),v(a,p),v(e,h),M&&M.m(e,null),v(e,g),v(e,_),S(A,b,L),z(k,A,L),$=!0,C||(T=J(_,"click",n[3]),C=!0)},p(A,[L]){A[1].logo?E?E.p(A,L):(E=Bh(A),E.c(),E.m(t,null)):E&&(E.d(1),E=null),(!$||L&2)&&l!==(l=A[1].title+"")&&le(o,l),(!$||L&2)&&f!==(f=A[1].key.slice(0,-4)+"")&&le(d,f),A[0].enabled?M||(M=Uh(),M.c(),M.m(e,g)):M&&(M.d(1),M=null);const N={};k.$set(N)},i(A){$||(I(k.$$.fragment,A),$=!0)},o(A){P(k.$$.fragment,A),$=!1},d(A){A&&w(e),E&&E.d(),M&&M.d(),A&&w(b),n[4](null),H(k,A),C=!1,T()}}}function UA(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){ne[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class M1 extends be{constructor(e){super(),ge(this,e,UA,BA,_e,{provider:1,config:0})}}function Wh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Yh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function WA(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const d=_=>_[9].key;for(let _=0;_0&&n[2].length>0&&Jh(),h=n[2];const g=_=>_[9].key;for(let _=0;_0&&_[2].length>0?p||(p=Jh(),p.c(),p.m(l.parentNode,l)):p&&(p.d(1),p=null),b&5&&(h=_[2],ue(),r=yt(r,b,g,1,_,h,a,o,Kt,Zh,null,Wh),fe())},i(_){if(!u){for(let b=0;bhe(i,"config",r)),{key:n,first:null,c(){t=y("div"),B(i.$$.fragment),l=D(),m(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&8&&(d.provider=e[9]),!s&&f&9&&(s=!0,d.config=e[0][e[9].key],ye(()=>s=!1)),i.$set(d)},i(u){o||(I(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),H(i)}}}function Jh(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Zh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new M1({props:a}),ne.push(()=>he(i,"config",r)),{key:n,first:null,c(){t=y("div"),B(i.$$.fragment),l=D(),m(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&4&&(d.provider=e[9]),!s&&f&5&&(s=!0,d.config=e[0][e[9].key],ye(()=>s=!1)),i.$set(d)},i(u){o||(I(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),H(i)}}}function KA(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g;const _=[YA,WA],b=[];function k($,C){return $[1]?0:1}return p=k(n),h=b[p]=_[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[4]),r=D(),a=y("div"),u=y("div"),f=y("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",d=D(),h.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(f,"class","m-b-base"),m(u,"class","panel"),m(a,"class","wrapper")},m($,C){S($,e,C),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S($,r,C),S($,a,C),v(a,u),v(u,f),v(u,d),b[p].m(u,null),g=!0},p($,C){(!g||C&16)&&le(o,$[4]);let T=p;p=k($),p===T?b[p].p($,C):(ue(),P(b[T],1,1,()=>{b[T]=null}),fe(),h=b[p],h?h.p($,C):(h=b[p]=_[p]($),h.c()),I(h,1),h.m(u,null))},i($){g||(I(h),g=!0)},o($){P(h),g=!1},d($){$&&w(e),$&&w(r),$&&w(a),b[p].d()}}}function JA(n){let e,t,i,s;return e=new Mi({}),i=new Sn({props:{$$slots:{default:[KA]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function ZA(n,e,t){let i,s,l;Ze(n,Mt,p=>t(4,l=p)),ln(Mt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const p=await de.settings.getAll()||{};u(p)}catch(p){de.error(p)}t(1,o=!1)}function u(p){p=p||{},t(0,r={});for(const h of mo)t(0,r[h.key]=Object.assign({enabled:!1},p[h.key]),r)}function f(p,h){n.$$.not_equal(r[h.key],p)&&(r[h.key]=p,t(0,r))}function d(p,h){n.$$.not_equal(r[h.key],p)&&(r[h.key]=p,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=mo.filter(p=>{var h;return(h=r[p.key])==null?void 0:h.enabled})),n.$$.dirty&1&&t(2,s=mo.filter(p=>{var h;return!((h=r[p.key])!=null&&h.enabled)}))},[r,o,s,i,l,f,d]}class GA extends be{constructor(e){super(),ge(this,e,ZA,JA,_e,{})}}function XA(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=Y(n[3]),i=Y(" duration (in seconds)"),l=D(),o=y("input"),a=D(),u=y("div"),f=y("span"),f.textContent="Invalidate all previously issued tokens",m(e,"for",s=n[6]),m(o,"type","number"),m(o,"id",r=n[6]),o.required=!0,m(f,"class","link-primary"),x(f,"txt-success",!!n[1]),m(u,"class","help-block")},m(h,g){S(h,e,g),v(e,t),v(e,i),S(h,l,g),S(h,o,g),re(o,n[0]),S(h,a,g),S(h,u,g),v(u,f),d||(p=[J(o,"input",n[4]),J(f,"click",n[5])],d=!0)},p(h,g){g&8&&le(t,h[3]),g&64&&s!==(s=h[6])&&m(e,"for",s),g&64&&r!==(r=h[6])&&m(o,"id",r),g&1&&mt(o.value)!==h[0]&&re(o,h[0]),g&2&&x(f,"txt-success",!!h[1])},d(h){h&&w(e),h&&w(l),h&&w(o),h&&w(a),h&&w(u),d=!1,De(p)}}}function QA(n){let e,t;return e=new pe({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[XA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function xA(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=mt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=U.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class E1 extends be{constructor(e){super(),ge(this,e,xA,QA,_e,{key:2,label:3,duration:0,secret:1})}}function Gh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Xh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function eI(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],d=new Map,p,h,g,_,b,k,$,C,T,E,M,O=n[5];const A=R=>R[19].key;for(let R=0;RR[19].key;for(let R=0;Rhe(i,"duration",r)),ne.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=Se(),B(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&33&&(s=!0,p.duration=e[0][e[19].key].duration,ye(()=>s=!1)),!l&&d&33&&(l=!0,p.secret=e[0][e[19].key].secret,ye(()=>l=!1)),i.$set(p)},i(f){o||(I(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),H(i,f)}}}function xh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new E1({props:u}),ne.push(()=>he(i,"duration",r)),ne.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=Se(),B(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&65&&(s=!0,p.duration=e[0][e[19].key].duration,ye(()=>s=!1)),!l&&d&65&&(l=!0,p.secret=e[0][e[19].key].secret,ye(()=>l=!1)),i.$set(p)},i(f){o||(I(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),H(i,f)}}}function e_(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function nI(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b;const k=[tI,eI],$=[];function C(T,E){return T[1]?0:1}return p=C(n),h=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[4]),r=D(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Adjust common token options.

    ",d=D(),h.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(f,"class","content m-b-sm txt-xl"),m(u,"class","panel"),m(u,"autocomplete","off"),m(a,"class","wrapper")},m(T,E){S(T,e,E),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(T,r,E),S(T,a,E),v(a,u),v(u,f),v(u,d),$[p].m(u,null),g=!0,_||(b=J(u,"submit",xe(n[7])),_=!0)},p(T,E){(!g||E&16)&&le(o,T[4]);let M=p;p=C(T),p===M?$[p].p(T,E):(ue(),P($[M],1,1,()=>{$[M]=null}),fe(),h=$[p],h?h.p(T,E):(h=$[p]=k[p](T),h.c()),I(h,1),h.m(u,null))},i(T){g||(I(h),g=!0)},o(T){P(h),g=!1},d(T){T&&w(e),T&&w(r),T&&w(a),$[p].d(),_=!1,b()}}}function iI(n){let e,t,i,s;return e=new Mi({}),i=new Sn({props:{$$slots:{default:[nI]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function sI(n,e,t){let i,s,l;Ze(n,Mt,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];ln(Mt,l="Token options",l);let a={},u={},f=!1,d=!1;p();async function p(){t(1,f=!0);try{const M=await de.settings.getAll()||{};g(M)}catch(M){de.error(M)}t(1,f=!1)}async function h(){if(!(d||!s)){t(2,d=!0);try{const M=await de.settings.update(U.filterRedactedProps(u));g(M),Ht("Successfully saved tokens options.")}catch(M){de.error(M)}t(2,d=!1)}}function g(M){var A;M=M||{},t(0,u={});const O=o.concat(r);for(const L of O)t(0,u[L.key]={duration:((A=M[L.key])==null?void 0:A.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function _(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function k(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}function $(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function C(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}const T=()=>_(),E=()=>h();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,d,s,l,o,r,h,_,a,i,b,k,$,C,T,E]}class lI extends be{constructor(e){super(),ge(this,e,sI,iI,_e,{})}}function oI(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g;return o=new g1({props:{content:n[2]}}),{c(){e=y("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in + another PocketBase environment.

    `,t=D(),i=y("div"),s=y("button"),s.innerHTML='Copy',l=D(),B(o.$$.fragment),r=D(),a=y("div"),u=y("div"),f=D(),d=y("button"),d.innerHTML=` + Download as JSON`,m(e,"class","content txt-xl m-b-base"),m(s,"type","button"),m(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),m(i,"tabindex","0"),m(i,"class","export-preview svelte-jm5c4z"),m(u,"class","flex-fill"),m(d,"type","button"),m(d,"class","btn btn-expanded"),m(a,"class","flex m-t-base")},m(_,b){S(_,e,b),S(_,t,b),S(_,i,b),v(i,s),v(i,l),z(o,i,null),n[8](i),S(_,r,b),S(_,a,b),v(a,u),v(a,f),v(a,d),p=!0,h||(g=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(d,"click",n[10])],h=!0)},p(_,b){const k={};b&4&&(k.content=_[2]),o.$set(k)},i(_){p||(I(o.$$.fragment,_),p=!0)},o(_){P(o.$$.fragment,_),p=!1},d(_){_&&w(e),_&&w(t),_&&w(i),H(o),n[8](null),_&&w(r),_&&w(a),h=!1,De(g)}}}function rI(n){let e;return{c(){e=y("div"),m(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function aI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const h=[rI,oI],g=[];function _(b,k){return b[1]?0:1}return f=_(n),d=g[f]=h[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[3]),r=D(),a=y("div"),u=y("div"),d.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(u,"class","panel"),m(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),g[f].m(u,null),p=!0},p(b,k){(!p||k&8)&&le(o,b[3]);let $=f;f=_(b),f===$?g[f].p(b,k):(ue(),P(g[$],1,1,()=>{g[$]=null}),fe(),d=g[f],d?d.p(b,k):(d=g[f]=h[f](b),d.c()),I(d,1),d.m(u,null))},i(b){p||(I(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),g[f].d()}}}function uI(n){let e,t,i,s;return e=new Mi({}),i=new Sn({props:{$$slots:{default:[aI]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function fI(n,e,t){let i,s;Ze(n,Mt,b=>t(3,s=b)),ln(Mt,s="Export collections",s);const l="export_"+U.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await de.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){de.error(b)}t(1,a=!1)}function f(){U.downloadJson(r,"pb_schema")}function d(){U.copyToClipboard(i),yo("The configuration was copied to your clipboard!",3e3)}const p=()=>d();function h(b){ne[b?"unshift":"push"](()=>{o=b,t(0,o)})}const g=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const k=window.getSelection(),$=document.createRange();$.selectNodeContents(o),k.removeAllRanges(),k.addRange($)}},_=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,d,r,p,h,g,_]}class cI extends be{constructor(e){super(),ge(this,e,fI,uI,_e,{})}}function t_(n,e,t){const i=n.slice();return i[14]=e[t],i}function n_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function i_(n,e,t){const i=n.slice();return i[14]=e[t],i}function s_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function l_(n,e,t){const i=n.slice();return i[14]=e[t],i}function o_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function r_(n,e,t){const i=n.slice();return i[30]=e[t],i}function dI(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&a_(),a=n[0].name!==n[1].name&&u_(n);return{c(){e=y("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=y("strong"),o=Y(l),m(s,"class","txt"),m(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),v(e,t),a&&a.m(e,null),v(e,i),v(e,s),v(s,o)},p(u,f){u[9]?r||(r=a_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=u_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&le(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function pI(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Deleted",t=D(),i=y("strong"),l=Y(s),m(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function mI(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Added",t=D(),i=y("strong"),l=Y(s),m(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function a_(n){let e;return{c(){e=y("span"),e.textContent="Changed",m(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function u_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=y("strong"),i=Y(t),s=D(),l=y("i"),m(e,"class","txt-strikethrough txt-hint"),m(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),v(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&le(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function f_(n){var b,k;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,d,p,h,g=n[12]((k=n[1])==null?void 0:k[n[30]])+"",_;return{c(){var $,C,T,E,M,O;e=y("tr"),t=y("td"),i=y("span"),l=Y(s),o=D(),r=y("td"),a=y("pre"),f=Y(u),d=D(),p=y("td"),h=y("pre"),_=Y(g),m(t,"class","min-width svelte-lmkr38"),m(a,"class","txt"),m(r,"class","svelte-lmkr38"),x(r,"changed-old-col",!n[10]&&bn(($=n[0])==null?void 0:$[n[30]],(C=n[1])==null?void 0:C[n[30]])),x(r,"changed-none-col",n[10]),m(h,"class","txt"),m(p,"class","svelte-lmkr38"),x(p,"changed-new-col",!n[5]&&bn((T=n[0])==null?void 0:T[n[30]],(E=n[1])==null?void 0:E[n[30]])),x(p,"changed-none-col",n[5]),m(e,"class","svelte-lmkr38"),x(e,"txt-primary",bn((M=n[0])==null?void 0:M[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m($,C){S($,e,C),v(e,t),v(t,i),v(i,l),v(e,o),v(e,r),v(r,a),v(a,f),v(e,d),v(e,p),v(p,h),v(h,_)},p($,C){var T,E,M,O,A,L,N,q;C[0]&1&&u!==(u=$[12]((T=$[0])==null?void 0:T[$[30]])+"")&&le(f,u),C[0]&3075&&x(r,"changed-old-col",!$[10]&&bn((E=$[0])==null?void 0:E[$[30]],(M=$[1])==null?void 0:M[$[30]])),C[0]&1024&&x(r,"changed-none-col",$[10]),C[0]&2&&g!==(g=$[12]((O=$[1])==null?void 0:O[$[30]])+"")&&le(_,g),C[0]&2083&&x(p,"changed-new-col",!$[5]&&bn((A=$[0])==null?void 0:A[$[30]],(L=$[1])==null?void 0:L[$[30]])),C[0]&32&&x(p,"changed-none-col",$[5]),C[0]&2051&&x(e,"txt-primary",bn((N=$[0])==null?void 0:N[$[30]],(q=$[1])==null?void 0:q[$[30]]))},d($){$&&w(e)}}}function c_(n){let e,t=n[6],i=[];for(let s=0;sProps + Old + New`,l=D(),o=y("tbody");for(let T=0;T!["schema","created","updated"].includes(k));function _(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(k=>!f.find($=>k.id==$.id))))}function b(k){return typeof k>"u"?"":U.isObject(k)?JSON.stringify(k,null,4):k}return n.$$set=k=>{"collectionA"in k&&t(0,o=k.collectionA),"collectionB"in k&&t(1,r=k.collectionB),"deleteMissing"in k&&t(2,a=k.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&_(),n.$$.dirty[0]&24&&t(6,d=u.filter(k=>!f.find($=>k.id==$.id))),n.$$.dirty[0]&24&&t(7,p=f.filter(k=>u.find($=>$.id==k.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(k=>!u.find($=>$.id==k.id))),n.$$.dirty[0]&7&&t(9,l=U.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,d,p,h,l,s,g,b]}class gI extends be{constructor(e){super(),ge(this,e,_I,hI,_e,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function v_(n,e,t){const i=n.slice();return i[17]=e[t],i}function y_(n){let e,t;return e=new gI({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){B(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(I(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function bI(n){let e,t,i=n[2],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{g()}):g()}async function g(){if(!u){t(4,u=!0);try{await de.collections.import(o,a),Ht("Successfully imported collections configuration."),i("submit")}catch(T){de.error(T)}t(4,u=!1),d()}}const _=()=>h(),b=()=>!u;function k(T){ne[T?"unshift":"push"](()=>{s=T,t(1,s)})}function $(T){me.call(this,n,T)}function C(T){me.call(this,n,T)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&p()},[d,s,r,a,u,h,f,l,o,_,b,k,$,C]}class SI extends be{constructor(e){super(),ge(this,e,wI,kI,_e,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function k_(n,e,t){const i=n.slice();return i[32]=e[t],i}function w_(n,e,t){const i=n.slice();return i[35]=e[t],i}function S_(n,e,t){const i=n.slice();return i[32]=e[t],i}function $I(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O;a=new pe({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[CI,({uniqueId:F})=>({40:F}),({uniqueId:F})=>[0,F?512:0]]},$$scope:{ctx:n}}});let A=!1,L=n[6]&&n[1].length&&!n[7]&&T_(),N=n[6]&&n[1].length&&n[7]&&C_(n),q=n[13].length&&R_(n),R=!!n[0]&&q_(n);return{c(){e=y("input"),t=D(),i=y("div"),s=y("p"),l=Y(`Paste below the collections configuration you want to import or + `),o=y("button"),o.innerHTML='Load from JSON file',r=D(),B(a.$$.fragment),u=D(),f=D(),L&&L.c(),d=D(),N&&N.c(),p=D(),q&&q.c(),h=D(),g=y("div"),R&&R.c(),_=D(),b=y("div"),k=D(),$=y("button"),C=y("span"),C.textContent="Review",m(e,"type","file"),m(e,"class","hidden"),m(e,"accept",".json"),m(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),m(i,"class","content txt-xl m-b-base"),m(b,"class","flex-fill"),m(C,"class","txt"),m($,"type","button"),m($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=T=!n[14],m(g,"class","flex m-t-base")},m(F,j){S(F,e,j),n[19](e),S(F,t,j),S(F,i,j),v(i,s),v(s,l),v(s,o),S(F,r,j),z(a,F,j),S(F,u,j),S(F,f,j),L&&L.m(F,j),S(F,d,j),N&&N.m(F,j),S(F,p,j),q&&q.m(F,j),S(F,h,j),S(F,g,j),R&&R.m(g,null),v(g,_),v(g,b),v(g,k),v(g,$),v($,C),E=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(F,j){(!E||j[0]&4096)&&x(o,"btn-loading",F[12]);const V={};j[0]&64&&(V.class="form-field "+(F[6]?"":"field-error")),j[0]&65|j[1]&1536&&(V.$$scope={dirty:j,ctx:F}),a.$set(V),F[6]&&F[1].length&&!F[7]?L||(L=T_(),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),F[6]&&F[1].length&&F[7]?N?N.p(F,j):(N=C_(F),N.c(),N.m(p.parentNode,p)):N&&(N.d(1),N=null),F[13].length?q?q.p(F,j):(q=R_(F),q.c(),q.m(h.parentNode,h)):q&&(q.d(1),q=null),F[0]?R?R.p(F,j):(R=q_(F),R.c(),R.m(g,_)):R&&(R.d(1),R=null),(!E||j[0]&16384&&T!==(T=!F[14]))&&($.disabled=T)},i(F){E||(I(a.$$.fragment,F),I(A),E=!0)},o(F){P(a.$$.fragment,F),P(A),E=!1},d(F){F&&w(e),n[19](null),F&&w(t),F&&w(i),F&&w(r),H(a,F),F&&w(u),F&&w(f),L&&L.d(F),F&&w(d),N&&N.d(F),F&&w(p),q&&q.d(F),F&&w(h),F&&w(g),R&&R.d(),M=!1,De(O)}}}function TI(n){let e;return{c(){e=y("div"),m(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function $_(n){let e;return{c(){e=y("div"),e.textContent="Invalid collections configuration.",m(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function CI(n){let e,t,i,s,l,o,r,a,u,f,d=!!n[0]&&!n[6]&&$_();return{c(){e=y("label"),t=Y("Collections"),s=D(),l=y("textarea"),r=D(),d&&d.c(),a=Se(),m(e,"for",i=n[40]),m(e,"class","p-b-10"),m(l,"id",o=n[40]),m(l,"class","code"),m(l,"spellcheck","false"),m(l,"rows","15"),l.required=!0},m(p,h){S(p,e,h),v(e,t),S(p,s,h),S(p,l,h),re(l,n[0]),S(p,r,h),d&&d.m(p,h),S(p,a,h),u||(f=J(l,"input",n[22]),u=!0)},p(p,h){h[1]&512&&i!==(i=p[40])&&m(e,"for",i),h[1]&512&&o!==(o=p[40])&&m(l,"id",o),h[0]&1&&re(l,p[0]),p[0]&&!p[6]?d||(d=$_(),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),d&&d.d(p),p&&w(a),u=!1,f()}}}function T_(n){let e;return{c(){e=y("div"),e.innerHTML=`
    +
    Your collections configuration is already up-to-date!
    `,m(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function C_(n){let e,t,i,s,l,o=n[9].length&&M_(n),r=n[4].length&&D_(n),a=n[8].length&&P_(n);return{c(){e=y("h5"),e.textContent="Detected changes",t=D(),i=y("div"),o&&o.c(),s=D(),r&&r.c(),l=D(),a&&a.c(),m(e,"class","section-title"),m(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),v(i,s),r&&r.m(i,null),v(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=M_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=D_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=P_(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function M_(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=D(),s=y("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are + imported with different IDs. You can replace them in the import if you want + to.`,l=D(),o=y("button"),o.innerHTML='Replace with original ids',m(t,"class","icon"),m(s,"class","content"),m(o,"type","button"),m(o,"class","btn btn-warning btn-sm btn-outline"),m(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:ee,d(u){u&&w(e),r=!1,a()}}}function q_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',m(e,"type","button"),m(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function MI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const h=[TI,$I],g=[];function _(b,k){return b[5]?0:1}return f=_(n),d=g[f]=h[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[15]),r=D(),a=y("div"),u=y("div"),d.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(u,"class","panel"),m(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),g[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&le(o,b[15]);let $=f;f=_(b),f===$?g[f].p(b,k):(ue(),P(g[$],1,1,()=>{g[$]=null}),fe(),d=g[f],d?d.p(b,k):(d=g[f]=h[f](b),d.c()),I(d,1),d.m(u,null))},i(b){p||(I(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),g[f].d()}}}function EI(n){let e,t,i,s,l,o;e=new Mi({}),i=new Sn({props:{$$slots:{default:[MI]},$$scope:{ctx:n}}});let r={};return l=new SI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment),s=D(),B(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function OI(n,e,t){let i,s,l,o,r,a,u;Ze(n,Mt,G=>t(15,u=G)),ln(Mt,u="Import collections",u);let f,d,p="",h=!1,g=[],_=[],b=!0,k=[],$=!1;C();async function C(){t(5,$=!0);try{t(2,_=await de.collections.getFullList(200));for(let G of _)delete G.created,delete G.updated}catch(G){de.error(G)}t(5,$=!1)}function T(){if(t(4,k=[]),!!i)for(let G of g){const ae=U.findByKey(_,"id",G.id);!(ae!=null&&ae.id)||!U.hasCollectionChanges(ae,G,b)||k.push({new:G,old:ae})}}function E(){t(1,g=[]);try{t(1,g=JSON.parse(p))}catch{}Array.isArray(g)?t(1,g=U.filterDuplicatesByKey(g)):t(1,g=[]);for(let G of g)delete G.created,delete G.updated,G.schema=U.filterDuplicatesByKey(G.schema)}function M(){var G,ae;for(let Q of g){const se=U.findByKey(_,"name",Q.name)||U.findByKey(_,"id",Q.id);if(!se)continue;const ve=Q.id,$e=se.id;Q.id=$e;const ze=Array.isArray(se.schema)?se.schema:[],Ue=Array.isArray(Q.schema)?Q.schema:[];for(const we of Ue){const Ee=U.findByKey(ze,"name",we.name);Ee&&Ee.id&&(we.id=Ee.id)}for(let we of g)if(Array.isArray(we.schema))for(let Ee of we.schema)(G=Ee.options)!=null&&G.collectionId&&((ae=Ee.options)==null?void 0:ae.collectionId)===ve&&(Ee.options.collectionId=$e)}t(0,p=JSON.stringify(g,null,4))}function O(G){t(12,h=!0);const ae=new FileReader;ae.onload=async Q=>{t(12,h=!1),t(10,f.value="",f),t(0,p=Q.target.result),await cn(),g.length||(As("Invalid collections configuration."),A())},ae.onerror=Q=>{console.warn(Q),As("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},ae.readAsText(G)}function A(){t(0,p=""),t(10,f.value="",f),tn({})}function L(G){ne[G?"unshift":"push"](()=>{f=G,t(10,f)})}const N=()=>{f.files.length&&O(f.files[0])},q=()=>{f.click()};function R(){p=this.value,t(0,p)}function F(){b=this.checked,t(3,b)}const j=()=>M(),V=()=>A(),W=()=>d==null?void 0:d.show(_,g,b);function te(G){ne[G?"unshift":"push"](()=>{d=G,t(11,d)})}const X=()=>A();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&E(),n.$$.dirty[0]&3&&t(6,i=!!p&&g.length&&g.length===g.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=_.filter(G=>i&&b&&!U.findByKey(g,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=g.filter(G=>i&&!U.findByKey(_,"id",G.id))),n.$$.dirty[0]&10&&(typeof g<"u"||typeof b<"u")&&T(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=g.filter(G=>{let ae=U.findByKey(_,"name",G.name)||U.findByKey(_,"id",G.id);if(!ae)return!1;if(ae.id!=G.id)return!0;const Q=Array.isArray(ae.schema)?ae.schema:[],se=Array.isArray(G.schema)?G.schema:[];for(const ve of se){if(U.findByKey(Q,"id",ve.id))continue;const ze=U.findByKey(Q,"name",ve.name);if(ze&&ve.id!=ze.id)return!0}return!1}))},[p,g,_,b,k,$,i,o,l,s,f,d,h,a,r,u,M,O,A,L,N,q,R,F,j,V,W,te,X]}class DI extends be{constructor(e){super(),ge(this,e,OI,EI,_e,{},null,[-1,-1])}}function AI(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Backup name"),s=D(),l=y("input"),r=D(),a=y("em"),a.textContent="Must be in the format [a-z0-9_-].zip",m(e,"for",i=n[15]),m(l,"type","text"),m(l,"id",o=n[15]),m(l,"placeholder","Leave empty to autogenerate"),m(l,"pattern","^[a-z0-9_-]+\\.zip$"),m(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),re(l,n[2]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[7]),u=!0)},p(d,p){p&32768&&i!==(i=d[15])&&m(e,"for",i),p&32768&&o!==(o=d[15])&&m(l,"id",o),p&4&&l.value!==d[2]&&re(l,d[2])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function II(n){let e,t,i,s,l,o,r;return s=new pe({props:{class:"form-field m-0",name:"name",$$slots:{default:[AI,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.innerHTML=`
    +

    Please note that during the backup other concurrent write requrests may fail since the + database will be temporary "locked" (this usually happens only during the ZIP generation).

    +

    If you are using S3 storage for the collections file upload, you'll have to backup them + separately since they are not locally stored and will not be included in the final backup!

    `,t=D(),i=y("form"),B(s.$$.fragment),m(e,"class","alert alert-info"),m(i,"id",n[4]),m(i,"autocomplete","off")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),z(s,i,null),l=!0,o||(r=J(i,"submit",xe(n[5])),o=!0)},p(a,u){const f={};u&98308&&(f.$$scope={dirty:u,ctx:a}),s.$set(f)},i(a){l||(I(s.$$.fragment,a),l=!0)},o(a){P(s.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(s),o=!1,r()}}}function LI(n){let e;return{c(){e=y("h4"),e.textContent="Initialize new backup",m(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function PI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=D(),s=y("button"),l=y("span"),l.textContent="Start backup",m(t,"class","txt"),m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[3],m(l,"class","txt"),m(s,"type","submit"),m(s,"form",n[4]),m(s,"class","btn btn-expanded"),s.disabled=n[3],x(s,"btn-loading",n[3])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),o||(r=J(e,"click",n[0]),o=!0)},p(a,u){u&8&&(e.disabled=a[3]),u&8&&(s.disabled=a[3]),u&8&&x(s,"btn-loading",a[3])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,r()}}}function FI(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[PI],header:[LI],default:[II]},$$scope:{ctx:n}};return e=new on({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&8&&(o.beforeOpen=s[8]),l&8&&(o.beforeHide=s[9]),l&65548&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function NI(n,e,t){const i=Tt(),s="backup_create_"+U.randomString(5);let l,o="",r=!1,a;function u($){tn({}),t(3,r=!1),t(2,o=$||""),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function d(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{f()},1500);try{await de.backups.create(o,{$cancelKey:s}),t(3,r=!1),f(),i("submit"),Ht("Successfully generated new backup.")}catch($){$.isAbort||de.error($)}clearTimeout(a),t(3,r=!1)}}jo(()=>{clearTimeout(a)});function p(){o=this.value,t(2,o)}const h=()=>r?(yo("A backup has already been started, please wait."),!1):!0,g=()=>(r&&yo("The backup was started but may take a while to complete. You can come back later.",4500),!0);function _($){ne[$?"unshift":"push"](()=>{l=$,t(1,l)})}function b($){me.call(this,n,$)}function k($){me.call(this,n,$)}return[f,l,o,r,s,d,u,p,h,g,_,b,k]}class RI extends be{constructor(e){super(),ge(this,e,NI,FI,_e,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function qI(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Backup name"),s=D(),l=y("input"),m(e,"for",i=n[14]),m(l,"type","text"),m(l,"id",o=n[14]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[2]),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&m(e,"for",i),f&16384&&o!==(o=u[14])&&m(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function jI(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b;return u=new Nl({props:{value:n[1]}}),h=new pe({props:{class:"form-field required m-0",name:"name",$$slots:{default:[qI,({uniqueId:k})=>({14:k}),({uniqueId:k})=>k?16384:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.innerHTML=`
    +

    Please proceed with caution.

    +

    The restore operation will replace your existing pb_data with the one from the backup + and will restart the application process!

    +

    Backup restore is still experimental and currently works only on UNIX based systems.

    `,t=D(),i=y("div"),s=Y(`Type the backup name + `),l=y("div"),o=y("span"),r=Y(n[1]),a=D(),B(u.$$.fragment),f=Y(` + to confirm:`),d=D(),p=y("form"),B(h.$$.fragment),m(e,"class","alert alert-danger"),m(o,"class","txt"),m(l,"class","label"),m(i,"class","content m-b-sm"),m(p,"id",n[6]),m(p,"autocomplete","off")},m(k,$){S(k,e,$),S(k,t,$),S(k,i,$),v(i,s),v(i,l),v(l,o),v(o,r),v(l,a),z(u,l,null),v(i,f),S(k,d,$),S(k,p,$),z(h,p,null),g=!0,_||(b=J(p,"submit",xe(n[7])),_=!0)},p(k,$){(!g||$&2)&&le(r,k[1]);const C={};$&2&&(C.value=k[1]),u.$set(C);const T={};$&49156&&(T.$$scope={dirty:$,ctx:k}),h.$set(T)},i(k){g||(I(u.$$.fragment,k),I(h.$$.fragment,k),g=!0)},o(k){P(u.$$.fragment,k),P(h.$$.fragment,k),g=!1},d(k){k&&w(e),k&&w(t),k&&w(i),H(u),k&&w(d),k&&w(p),H(h),_=!1,b()}}}function VI(n){let e,t,i,s;return{c(){e=y("h4"),t=Y("Restore "),i=y("strong"),s=Y(n[1]),m(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(i,s)},p(l,o){o&2&&le(s,l[1])},d(l){l&&w(e)}}}function zI(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=Y("Cancel"),i=D(),s=y("button"),l=y("span"),l.textContent="Restore backup",m(e,"type","button"),m(e,"class","btn btn-transparent"),e.disabled=n[4],m(l,"class","txt"),m(s,"type","submit"),m(s,"form",n[6]),m(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function HI(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[zI],header:[VI],default:[jI]},$$scope:{ctx:n}};return e=new on({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&32822&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[11](null),H(e,s)}}}function BI(n,e,t){let i;const s="backup_restore_"+U.randomString(5);let l,o="",r="",a=!1;function u(k){tn({}),t(2,r=""),t(1,o=k),t(4,a=!1),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function d(){var k;if(!(!i||a)){t(4,a=!0);try{await de.backups.restore(o),setTimeout(()=>{window.location.reload()},1e3)}catch($){$!=null&&$.isAbort||(t(4,a=!1),As(((k=$.response)==null?void 0:k.message)||$.message))}}}function p(){r=this.value,t(2,r)}const h=()=>!a;function g(k){ne[k?"unshift":"push"](()=>{l=k,t(3,l)})}function _(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[f,o,r,l,a,i,s,d,u,p,h,g,_,b]}class UI extends be{constructor(e){super(),ge(this,e,BI,HI,_e,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function j_(n,e,t){const i=n.slice();return i[22]=e[t],i}function V_(n,e,t){const i=n.slice();return i[19]=e[t],i}function WI(n){let e=[],t=new Map,i,s,l=n[3];const o=a=>a[22].key;for(let a=0;aNo backups yet. + `,m(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function H_(n,e){let t,i,s,l,o,r=e[22].key+"",a,u,f,d,p=U.formattedFileSize(e[22].size)+"",h,g,_,b,k,$,C,T,E,M,O,A,L,N,q,R,F,j,V,W;function te(){return e[10](e[22])}function X(){return e[11](e[22])}function G(){return e[12](e[22])}return{key:n,first:null,c(){t=y("div"),i=y("i"),s=D(),l=y("div"),o=y("span"),a=Y(r),u=D(),f=y("span"),d=Y("("),h=Y(p),g=Y(")"),_=D(),b=y("div"),k=y("button"),$=y("i"),T=D(),E=y("button"),M=y("i"),A=D(),L=y("button"),N=y("i"),R=D(),m(i,"class","ri-folder-zip-line"),m(o,"class","name backup-name svelte-1ulbkf5"),m(f,"class","size txt-hint txt-nowrap"),m(l,"class","content"),m($,"class","ri-download-line"),m(k,"type","button"),m(k,"class","btn btn-sm btn-circle btn-hint btn-transparent"),k.disabled=C=e[6][e[22].key]||e[5][e[22].key],m(k,"aria-label","Download"),x(k,"btn-loading",e[5][e[22].key]),m(M,"class","ri-restart-line"),m(E,"type","button"),m(E,"class","btn btn-sm btn-circle btn-hint btn-transparent"),E.disabled=O=e[6][e[22].key],m(E,"aria-label","Restore"),m(N,"class","ri-delete-bin-7-line"),m(L,"type","button"),m(L,"class","btn btn-sm btn-circle btn-hint btn-transparent"),L.disabled=q=e[6][e[22].key],m(L,"aria-label","Delete"),x(L,"btn-loading",e[6][e[22].key]),m(b,"class","actions nonintrusive"),m(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(ae,Q){S(ae,t,Q),v(t,i),v(t,s),v(t,l),v(l,o),v(o,a),v(l,u),v(l,f),v(f,d),v(f,h),v(f,g),v(t,_),v(t,b),v(b,k),v(k,$),v(b,T),v(b,E),v(E,M),v(b,A),v(b,L),v(L,N),v(t,R),j=!0,V||(W=[Oe(Be.call(null,k,"Download")),J(k,"click",xe(te)),Oe(Be.call(null,E,"Restore")),J(E,"click",xe(X)),Oe(Be.call(null,L,"Delete")),J(L,"click",xe(G))],V=!0)},p(ae,Q){e=ae,(!j||Q&8)&&r!==(r=e[22].key+"")&&le(a,r),(!j||Q&8)&&p!==(p=U.formattedFileSize(e[22].size)+"")&&le(h,p),(!j||Q&104&&C!==(C=e[6][e[22].key]||e[5][e[22].key]))&&(k.disabled=C),(!j||Q&40)&&x(k,"btn-loading",e[5][e[22].key]),(!j||Q&72&&O!==(O=e[6][e[22].key]))&&(E.disabled=O),(!j||Q&72&&q!==(q=e[6][e[22].key]))&&(L.disabled=q),(!j||Q&72)&&x(L,"btn-loading",e[6][e[22].key])},i(ae){j||(ae&&et(()=>{j&&(F||(F=Ve(t,rt,{duration:150},!0)),F.run(1))}),j=!0)},o(ae){ae&&(F||(F=Ve(t,rt,{duration:150},!1)),F.run(0)),j=!1},d(ae){ae&&w(t),ae&&F&&F.end(),V=!1,De(W)}}}function B_(n){let e;return{c(){e=y("div"),e.innerHTML=` + `,m(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function KI(n){let e,t,i;return{c(){e=y("span"),t=D(),i=y("span"),i.textContent="Backup/restore operation is in process",m(e,"class","loader loader-sm"),m(i,"class","txt")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function JI(n){let e,t,i;return{c(){e=y("i"),t=D(),i=y("span"),i.textContent="Initialize new backup",m(e,"class","ri-play-circle-line"),m(i,"class","txt")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function ZI(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_;const b=[YI,WI],k=[];function $(A,L){return A[4]?0:1}i=$(n),s=k[i]=b[i](n);function C(A,L){return A[7]?JI:KI}let T=C(n),E=T(n),M={};f=new RI({props:M}),n[14](f),f.$on("submit",n[15]);let O={};return p=new UI({props:O}),n[16](p),{c(){e=y("div"),t=y("div"),s.c(),l=D(),o=y("div"),r=y("button"),E.c(),u=D(),B(f.$$.fragment),d=D(),B(p.$$.fragment),m(t,"class","list-content svelte-1ulbkf5"),m(r,"type","button"),m(r,"class","btn btn-block btn-transparent"),r.disabled=a=n[4]||!n[7],m(o,"class","list-item list-item-btn"),m(e,"class","list list-compact")},m(A,L){S(A,e,L),v(e,t),k[i].m(t,null),v(e,l),v(e,o),v(o,r),E.m(r,null),S(A,u,L),z(f,A,L),S(A,d,L),z(p,A,L),h=!0,g||(_=J(r,"click",n[13]),g=!0)},p(A,[L]){let N=i;i=$(A),i===N?k[i].p(A,L):(ue(),P(k[N],1,1,()=>{k[N]=null}),fe(),s=k[i],s?s.p(A,L):(s=k[i]=b[i](A),s.c()),I(s,1),s.m(t,null)),T!==(T=C(A))&&(E.d(1),E=T(A),E&&(E.c(),E.m(r,null))),(!h||L&144&&a!==(a=A[4]||!A[7]))&&(r.disabled=a);const q={};f.$set(q);const R={};p.$set(R)},i(A){h||(I(s),I(f.$$.fragment,A),I(p.$$.fragment,A),h=!0)},o(A){P(s),P(f.$$.fragment,A),P(p.$$.fragment,A),h=!1},d(A){A&&w(e),k[i].d(),E.d(),A&&w(u),n[14](null),H(f,A),A&&w(d),n[16](null),H(p,A),g=!1,_()}}}function GI(n,e,t){let i,s,l=[],o=!1,r={},a={},u=!0;f(),g();async function f(){t(4,o=!0);try{t(3,l=await de.backups.getFullList()),l.sort((M,O)=>M.modifiedO.modified?-1:0),t(4,o=!1)}catch(M){M.isAbort||(de.error(M),t(4,o=!1))}}async function d(M){if(!r[M]){t(5,r[M]=!0,r);try{const O=await de.getAdminFileToken(),A=de.backups.getDownloadUrl(O,M);U.download(A)}catch(O){O.isAbort||de.error(O)}delete r[M],t(5,r)}}function p(M){mn(`Do you really want to delete ${M}?`,()=>h(M))}async function h(M){if(!a[M]){t(6,a[M]=!0,a);try{await de.backups.delete(M),U.removeByKey(l,"name",M),f(),Ht(`Successfully deleted ${M}.`)}catch(O){O.isAbort||de.error(O)}delete a[M],t(6,a)}}async function g(){var M;try{const O=await de.health.check({$autoCancel:!1}),A=u;t(7,u=((M=O==null?void 0:O.data)==null?void 0:M.canBackup)||!1),A!=u&&u&&f()}catch{}}Xt(()=>{let M=setInterval(()=>{g()},3e3);return()=>{clearInterval(M)}});const _=M=>d(M.key),b=M=>s.show(M.key),k=M=>p(M.key),$=()=>i==null?void 0:i.show();function C(M){ne[M?"unshift":"push"](()=>{i=M,t(1,i)})}const T=()=>{f()};function E(M){ne[M?"unshift":"push"](()=>{s=M,t(2,s)})}return[f,i,s,l,o,r,a,u,d,p,_,b,k,$,C,T,E]}class XI extends be{constructor(e){super(),ge(this,e,GI,ZI,_e,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function QI(n){let e;return{c(){e=y("i"),m(e,"class","ri-arrow-down-s-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xI(n){let e;return{c(){e=y("i"),m(e,"class","ri-arrow-up-s-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function U_(n){var V,W,te;let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O;t=new pe({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[e8,({uniqueId:X})=>({32:X}),({uniqueId:X})=>[0,X?2:0]]},$$scope:{ctx:n}}});let A=n[2]&&W_(n);function L(X){n[25](X)}function N(X){n[26](X)}function q(X){n[27](X)}let R={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(V=n[0].backups)==null?void 0:V.s3};n[1].backups.s3!==void 0&&(R.config=n[1].backups.s3),n[7]!==void 0&&(R.isTesting=n[7]),n[8]!==void 0&&(R.testError=n[8]),r=new C1({props:R}),ne.push(()=>he(r,"config",L)),ne.push(()=>he(r,"isTesting",N)),ne.push(()=>he(r,"testError",q));let F=((te=(W=n[1].backups)==null?void 0:W.s3)==null?void 0:te.enabled)&&!n[9]&&!n[5]&&Y_(n),j=n[9]&&K_(n);return{c(){e=y("form"),B(t.$$.fragment),i=D(),A&&A.c(),s=D(),l=y("div"),o=D(),B(r.$$.fragment),d=D(),p=y("div"),h=y("div"),g=D(),F&&F.c(),_=D(),j&&j.c(),b=D(),k=y("button"),$=y("span"),$.textContent="Save changes",m(l,"class","clearfix m-b-base"),m(h,"class","flex-fill"),m($,"class","txt"),m(k,"type","submit"),m(k,"class","btn btn-expanded"),k.disabled=C=!n[9]||n[5],x(k,"btn-loading",n[5]),m(p,"class","flex"),m(e,"class","block"),m(e,"autocomplete","off")},m(X,G){S(X,e,G),z(t,e,null),v(e,i),A&&A.m(e,null),v(e,s),v(e,l),v(e,o),z(r,e,null),v(e,d),v(e,p),v(p,h),v(p,g),F&&F.m(p,null),v(p,_),j&&j.m(p,null),v(p,b),v(p,k),v(k,$),E=!0,M||(O=[J(k,"click",n[29]),J(e,"submit",xe(n[11]))],M=!0)},p(X,G){var se,ve,$e;const ae={};G[0]&4|G[1]&6&&(ae.$$scope={dirty:G,ctx:X}),t.$set(ae),X[2]?A?(A.p(X,G),G[0]&4&&I(A,1)):(A=W_(X),A.c(),I(A,1),A.m(e,s)):A&&(ue(),P(A,1,1,()=>{A=null}),fe());const Q={};G[0]&1&&(Q.originalConfig=(se=X[0].backups)==null?void 0:se.s3),!a&&G[0]&2&&(a=!0,Q.config=X[1].backups.s3,ye(()=>a=!1)),!u&&G[0]&128&&(u=!0,Q.isTesting=X[7],ye(()=>u=!1)),!f&&G[0]&256&&(f=!0,Q.testError=X[8],ye(()=>f=!1)),r.$set(Q),($e=(ve=X[1].backups)==null?void 0:ve.s3)!=null&&$e.enabled&&!X[9]&&!X[5]?F?F.p(X,G):(F=Y_(X),F.c(),F.m(p,_)):F&&(F.d(1),F=null),X[9]?j?j.p(X,G):(j=K_(X),j.c(),j.m(p,b)):j&&(j.d(1),j=null),(!E||G[0]&544&&C!==(C=!X[9]||X[5]))&&(k.disabled=C),(!E||G[0]&32)&&x(k,"btn-loading",X[5])},i(X){E||(I(t.$$.fragment,X),I(A),I(r.$$.fragment,X),X&&et(()=>{E&&(T||(T=Ve(e,rt,{duration:150},!0)),T.run(1))}),E=!0)},o(X){P(t.$$.fragment,X),P(A),P(r.$$.fragment,X),X&&(T||(T=Ve(e,rt,{duration:150},!1)),T.run(0)),E=!1},d(X){X&&w(e),H(t),A&&A.d(),H(r),F&&F.d(),j&&j.d(),X&&T&&T.end(),M=!1,De(O)}}}function e8(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=D(),s=y("label"),l=Y("Enable auto backups"),m(e,"type","checkbox"),m(e,"id",t=n[32]),e.required=!0,m(s,"for",o=n[32])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[18]),r=!0)},p(u,f){f[1]&2&&t!==(t=u[32])&&m(e,"id",t),f[0]&4&&(e.checked=u[2]),f[1]&2&&o!==(o=u[32])&&m(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function W_(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"backups.cron",$$slots:{default:[n8,({uniqueId:f})=>({32:f}),({uniqueId:f})=>[0,f?2:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"backups.cronMaxKeep",$$slots:{default:[i8,({uniqueId:f})=>({32:f}),({uniqueId:f})=>[0,f?2:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),B(s.$$.fragment),l=D(),o=y("div"),B(r.$$.fragment),m(i,"class","col-lg-6"),m(o,"class","col-lg-6"),m(t,"class","grid p-t-base p-b-sm"),m(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d[0]&3|d[1]&6&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const h={};d[0]&2|d[1]&6&&(h.$$scope={dirty:d,ctx:f}),r.$set(h)},i(f){u||(I(s.$$.fragment,f),I(r.$$.fragment,f),f&&et(()=>{u&&(a||(a=Ve(e,rt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Ve(e,rt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function t8(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("button"),e.innerHTML='Every day at 00:00h',t=D(),i=y("button"),i.innerHTML='Every sunday at 00:00h',s=D(),l=y("button"),l.innerHTML='Every Mon and Wed at 00:00h',o=D(),r=y("button"),r.innerHTML='Every first day of the month at 00:00h',m(e,"type","button"),m(e,"class","dropdown-item closable"),m(i,"type","button"),m(i,"class","dropdown-item closable"),m(l,"type","button"),m(l,"class","dropdown-item closable"),m(r,"type","button"),m(r,"class","dropdown-item closable")},m(f,d){S(f,e,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),S(f,o,d),S(f,r,d),a||(u=[J(e,"click",n[20]),J(i,"click",n[21]),J(l,"click",n[22]),J(r,"click",n[23])],a=!0)},p:ee,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,De(u)}}}function n8(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T;return _=new Jn({props:{class:"dropdown dropdown-nowrap dropdown-right",$$slots:{default:[t8]},$$scope:{ctx:n}}}),{c(){var E,M;e=y("label"),t=Y("Cron expression"),s=D(),l=y("input"),a=D(),u=y("div"),f=y("button"),d=y("span"),d.textContent="Presets",p=D(),h=y("i"),g=D(),B(_.$$.fragment),b=D(),k=y("div"),k.textContent="Only numeric list, steps or ranges are supported.",m(e,"for",i=n[32]),l.required=!0,m(l,"type","text"),m(l,"id",o=n[32]),m(l,"class","txt-lg txt-mono"),m(l,"placeholder","* * * * *"),l.autofocus=r=!((M=(E=n[0])==null?void 0:E.backups)!=null&&M.cron),m(d,"class","txt"),m(h,"class","ri-arrow-drop-down-fill"),m(f,"type","button"),m(f,"class","btn btn-sm btn-outline p-r-0"),m(u,"class","form-field-addon"),m(k,"class","help-block")},m(E,M){var O,A;S(E,e,M),v(e,t),S(E,s,M),S(E,l,M),re(l,n[1].backups.cron),S(E,a,M),S(E,u,M),v(u,f),v(f,d),v(f,p),v(f,h),v(f,g),z(_,f,null),S(E,b,M),S(E,k,M),$=!0,(A=(O=n[0])==null?void 0:O.backups)!=null&&A.cron||l.focus(),C||(T=J(l,"input",n[19]),C=!0)},p(E,M){var A,L;(!$||M[1]&2&&i!==(i=E[32]))&&m(e,"for",i),(!$||M[1]&2&&o!==(o=E[32]))&&m(l,"id",o),(!$||M[0]&1&&r!==(r=!((L=(A=E[0])==null?void 0:A.backups)!=null&&L.cron)))&&(l.autofocus=r),M[0]&2&&l.value!==E[1].backups.cron&&re(l,E[1].backups.cron);const O={};M[0]&2|M[1]&4&&(O.$$scope={dirty:M,ctx:E}),_.$set(O)},i(E){$||(I(_.$$.fragment,E),$=!0)},o(E){P(_.$$.fragment,E),$=!1},d(E){E&&w(e),E&&w(s),E&&w(l),E&&w(a),E&&w(u),H(_),E&&w(b),E&&w(k),C=!1,T()}}}function i8(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Max @auto backups to keep"),s=D(),l=y("input"),m(e,"for",i=n[32]),m(l,"type","number"),m(l,"id",o=n[32]),m(l,"min","1")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),re(l,n[1].backups.cronMaxKeep),r||(a=J(l,"input",n[24]),r=!0)},p(u,f){f[1]&2&&i!==(i=u[32])&&m(e,"for",i),f[1]&2&&o!==(o=u[32])&&m(l,"id",o),f[0]&2&&mt(l.value)!==u[1].backups.cronMaxKeep&&re(l,u[1].backups.cronMaxKeep)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Y_(n){let e;function t(l,o){return l[7]?o8:l[8]?l8:s8}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function s8(n){let e;return{c(){e=y("div"),e.innerHTML=` + S3 connected successfully`,m(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function l8(n){let e,t,i,s;return{c(){e=y("div"),e.innerHTML=` + Failed to establish S3 connection`,m(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Oe(t=Be.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&jt(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function o8(n){let e;return{c(){e=y("span"),m(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function K_(n){let e,t,i,s,l;return{c(){e=y("button"),t=y("span"),t.textContent="Reset",m(t,"class","txt"),m(e,"type","submit"),m(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){S(o,e,r),v(e,t),s||(l=J(e,"click",n[28]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&w(e),s=!1,l()}}}function r8(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$,C,T,E,M,O,A,L;h=new Zo({props:{class:"btn-sm",tooltip:"Reload backups list"}}),h.$on("refresh",n[15]);let N={};_=new XI({props:N}),n[16](_);function q(V,W){return V[6]?xI:QI}let R=q(n),F=R(n),j=n[6]&&!n[4]&&U_(n);return{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=D(),l=y("div"),o=Y(n[10]),r=D(),a=y("div"),u=y("div"),f=y("div"),d=y("span"),d.textContent="Backup and restore your PocketBase data",p=D(),B(h.$$.fragment),g=D(),B(_.$$.fragment),b=D(),k=y("hr"),$=D(),C=y("button"),T=y("span"),T.textContent="Backups options",E=D(),F.c(),M=D(),j&&j.c(),m(i,"class","breadcrumb-item"),m(l,"class","breadcrumb-item"),m(t,"class","breadcrumbs"),m(e,"class","page-header"),m(d,"class","txt-xl"),m(f,"class","flex m-b-sm flex-gap-5"),m(T,"class","txt"),m(C,"type","button"),m(C,"class","btn btn-secondary"),C.disabled=n[4],x(C,"btn-loading",n[4]),m(u,"class","panel"),m(u,"autocomplete","off"),m(a,"class","wrapper")},m(V,W){S(V,e,W),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(V,r,W),S(V,a,W),v(a,u),v(u,f),v(f,d),v(f,p),z(h,f,null),v(u,g),z(_,u,null),v(u,b),v(u,k),v(u,$),v(u,C),v(C,T),v(C,E),F.m(C,null),v(u,M),j&&j.m(u,null),O=!0,A||(L=[J(C,"click",n[17]),J(u,"submit",xe(n[11]))],A=!0)},p(V,W){(!O||W[0]&1024)&&le(o,V[10]);const te={};_.$set(te),R!==(R=q(V))&&(F.d(1),F=R(V),F&&(F.c(),F.m(C,null))),(!O||W[0]&16)&&(C.disabled=V[4]),(!O||W[0]&16)&&x(C,"btn-loading",V[4]),V[6]&&!V[4]?j?(j.p(V,W),W[0]&80&&I(j,1)):(j=U_(V),j.c(),I(j,1),j.m(u,null)):j&&(ue(),P(j,1,1,()=>{j=null}),fe())},i(V){O||(I(h.$$.fragment,V),I(_.$$.fragment,V),I(j),O=!0)},o(V){P(h.$$.fragment,V),P(_.$$.fragment,V),P(j),O=!1},d(V){V&&w(e),V&&w(r),V&&w(a),H(h),n[16](null),H(_),F.d(),j&&j.d(),A=!1,De(L)}}}function a8(n){let e,t,i,s;return e=new Mi({}),i=new Sn({props:{$$slots:{default:[r8]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=D(),B(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&4&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(I(e.$$.fragment,l),I(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function u8(n,e,t){let i,s;Ze(n,Mt,G=>t(10,s=G)),ln(Mt,s="Backups",s);let l,o={},r={},a=!1,u=!1,f="",d=!1,p=!1,h=!1,g=null;_();async function _(){t(4,a=!0);try{const G=await de.settings.getAll()||{};k(G)}catch(G){de.error(G)}t(4,a=!1)}async function b(){if(!(u||!i)){t(5,u=!0);try{const G=await de.settings.update(U.filterRedactedProps(r));await C(),k(G),Ht("Successfully saved application settings.")}catch(G){de.error(G)}t(5,u=!1)}}function k(G={}){t(1,r={backups:(G==null?void 0:G.backups)||{}}),t(2,d=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function $(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,d=r.backups.cron!="")}async function C(){await(l==null?void 0:l.loadBackups())}const T=()=>C();function E(G){ne[G?"unshift":"push"](()=>{l=G,t(3,l)})}const M=()=>t(6,p=!p);function O(){d=this.checked,t(2,d)}function A(){r.backups.cron=this.value,t(1,r),t(2,d)}const L=()=>{t(1,r.backups.cron="0 0 * * *",r)},N=()=>{t(1,r.backups.cron="0 0 * * 0",r)},q=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},R=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function F(){r.backups.cronMaxKeep=mt(this.value),t(1,r),t(2,d)}function j(G){n.$$.not_equal(r.backups.s3,G)&&(r.backups.s3=G,t(1,r),t(2,d))}function V(G){h=G,t(7,h)}function W(G){g=G,t(8,g)}const te=()=>$(),X=()=>b();return n.$$.update=()=>{var G;n.$$.dirty[0]&1&&t(14,f=JSON.stringify(o)),n.$$.dirty[0]&6&&!d&&(G=r==null?void 0:r.backups)!=null&&G.cron&&(ui("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=f!=JSON.stringify(r))},[o,r,d,l,a,u,p,h,g,i,s,b,$,C,f,T,E,M,O,A,L,N,q,R,F,j,V,W,te,X]}class f8 extends be{constructor(e){super(),ge(this,e,u8,a8,_e,{},null,[-1,-1])}}const zt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Vi("/"):!0}],c8={"/login":Lt({component:bD,conditions:zt.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Lt({asyncComponent:()=>ut(()=>import("./PageAdminRequestPasswordReset-0320e30a.js"),[],import.meta.url),conditions:zt.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Lt({asyncComponent:()=>ut(()=>import("./PageAdminConfirmPasswordReset-283a47f4.js"),[],import.meta.url),conditions:zt.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Lt({component:HO,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Lt({component:F$,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Lt({component:ED,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Lt({component:dD,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Lt({component:dA,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Lt({component:LA,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Lt({component:GA,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Lt({component:lI,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Lt({component:cI,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Lt({component:DI,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":Lt({component:f8,conditions:zt.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Lt({asyncComponent:()=>ut(()=>import("./PageRecordConfirmPasswordReset-c981e373.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Lt({asyncComponent:()=>ut(()=>import("./PageRecordConfirmPasswordReset-c981e373.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Lt({asyncComponent:()=>ut(()=>import("./PageRecordConfirmVerification-63d735a5.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Lt({asyncComponent:()=>ut(()=>import("./PageRecordConfirmVerification-63d735a5.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Lt({asyncComponent:()=>ut(()=>import("./PageRecordConfirmEmailChange-18d5209b.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Lt({asyncComponent:()=>ut(()=>import("./PageRecordConfirmEmailChange-18d5209b.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":Lt({asyncComponent:()=>ut(()=>import("./PageOAuth2Redirect-455a84f6.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"*":Lt({component:nk,userData:{showAppSidebar:!1}})};function d8(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:d=h=>Math.sqrt(h)*120,easing:p=Ko}=i;return{delay:f,duration:jt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(h,g)=>{const _=g*a,b=g*u,k=h+g*e.width/t.width,$=h+g*e.height/t.height;return`transform: ${l} translate(${_}px, ${b}px) scale(${k}, ${$});`}}}function J_(n,e,t){const i=n.slice();return i[2]=e[t],i}function p8(n){let e;return{c(){e=y("i"),m(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function m8(n){let e;return{c(){e=y("i"),m(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function h8(n){let e;return{c(){e=y("i"),m(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function _8(n){let e;return{c(){e=y("i"),m(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Z_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,h,g=ee,_,b,k;function $(M,O){return M[2].type==="info"?_8:M[2].type==="success"?h8:M[2].type==="warning"?m8:p8}let C=$(e),T=C(e);function E(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),T.c(),s=D(),l=y("div"),r=Y(o),a=D(),u=y("button"),u.innerHTML='',f=D(),m(i,"class","icon"),m(l,"class","content"),m(u,"type","button"),m(u,"class","close"),m(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){S(M,t,O),v(t,i),T.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),_=!0,b||(k=J(u,"click",xe(E)),b=!0)},p(M,O){e=M,C!==(C=$(e))&&(T.d(1),T=C(e),T&&(T.c(),T.m(i,null))),(!_||O&1)&&o!==(o=e[2].message+"")&&le(r,o),(!_||O&1)&&x(t,"alert-info",e[2].type=="info"),(!_||O&1)&&x(t,"alert-success",e[2].type=="success"),(!_||O&1)&&x(t,"alert-danger",e[2].type=="error"),(!_||O&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){h=t.getBoundingClientRect()},f(){X1(t),g(),sg(t,h)},a(){g(),g=G1(t,h,d8,{duration:150})},i(M){_||(et(()=>{_&&(p&&p.end(1),d=rg(t,rt,{duration:150}),d.start())}),_=!0)},o(M){d&&d.invalidate(),p=$a(t,ta,{duration:150}),_=!1},d(M){M&&w(t),T.d(),M&&p&&p.end(),b=!1,k()}}}function g8(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>hb(l)]}class v8 extends be{constructor(e){super(),ge(this,e,b8,g8,_e,{})}}function y8(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=Y(t),m(e,"class","block center txt-break"),m(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&w(e)}}}function k8(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=D(),s=y("button"),l=y("span"),l.textContent="Yes",m(t,"class","txt"),e.autofocus=!0,m(e,"type","button"),m(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],m(l,"class","txt"),m(s,"type","button"),m(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,De(r)}}}function w8(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[k8],header:[y8]},$$scope:{ctx:n}};return e=new on({props:i}),n[6](e),e.$on("hide",n[7]),{c(){B(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(I(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function S8(n,e,t){let i;Ze(n,au,d=>t(1,i=d));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(d){ne[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await cn(),t(3,o=!1),v1()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class $8 extends be{constructor(e){super(),ge(this,e,S8,w8,_e,{})}}function G_(n){let e,t,i,s,l,o,r,a,u,f,d,p,h,g,_,b,k,$;return _=new Jn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[T8]},$$scope:{ctx:n}}}),{c(){var C;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=D(),s=y("nav"),l=y("a"),l.innerHTML='',o=D(),r=y("a"),r.innerHTML='',a=D(),u=y("a"),u.innerHTML='',f=D(),d=y("figure"),p=y("img"),g=D(),B(_.$$.fragment),m(t,"href","/"),m(t,"class","logo logo-sm"),m(l,"href","/collections"),m(l,"class","menu-item"),m(l,"aria-label","Collections"),m(r,"href","/logs"),m(r,"class","menu-item"),m(r,"aria-label","Logs"),m(u,"href","/settings"),m(u,"class","menu-item"),m(u,"aria-label","Settings"),m(s,"class","main-menu"),_n(p.src,h="./images/avatars/avatar"+(((C=n[0])==null?void 0:C.avatar)||0)+".svg")||m(p,"src",h),m(p,"alt","Avatar"),m(d,"class","thumb thumb-circle link-hint closable"),m(e,"class","app-sidebar")},m(C,T){S(C,e,T),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,g),z(_,d,null),b=!0,k||($=[Oe(rn.call(null,t)),Oe(rn.call(null,l)),Oe(zn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Oe(Be.call(null,l,{text:"Collections",position:"right"})),Oe(rn.call(null,r)),Oe(zn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Oe(Be.call(null,r,{text:"Logs",position:"right"})),Oe(rn.call(null,u)),Oe(zn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Oe(Be.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(C,T){var M;(!b||T&1&&!_n(p.src,h="./images/avatars/avatar"+(((M=C[0])==null?void 0:M.avatar)||0)+".svg"))&&m(p,"src",h);const E={};T&4096&&(E.$$scope={dirty:T,ctx:C}),_.$set(E)},i(C){b||(I(_.$$.fragment,C),b=!0)},o(C){P(_.$$.fragment,C),b=!1},d(C){C&&w(e),H(_),k=!1,De($)}}}function T8(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` + Manage admins`,t=D(),i=y("hr"),s=D(),l=y("button"),l.innerHTML=` + Logout`,m(e,"href","/settings/admins"),m(e,"class","dropdown-item closable"),m(l,"type","button"),m(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Oe(rn.call(null,e)),J(l,"click",n[7])],o=!0)},p:ee,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,De(r)}}}function X_(n){let e,t,i;return t=new pu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:U.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=y("div"),B(t.$$.fragment),m(e,"class","tinymce-preloader hidden")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p:ee,i(s){i||(I(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function C8(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,h;document.title=e=U.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let g=((b=n[0])==null?void 0:b.id)&&n[1]&&G_(n);o=new c0({props:{routes:c8}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new v8({}),f=new $8({});let _=n[1]&&!n[2]&&X_(n);return{c(){t=D(),i=y("div"),g&&g.c(),s=D(),l=y("div"),B(o.$$.fragment),r=D(),B(a.$$.fragment),u=D(),B(f.$$.fragment),d=D(),_&&_.c(),p=Se(),m(l,"class","app-body"),m(i,"class","app-layout")},m(k,$){S(k,t,$),S(k,i,$),g&&g.m(i,null),v(i,s),v(i,l),z(o,l,null),v(l,r),z(a,l,null),S(k,u,$),z(f,k,$),S(k,d,$),_&&_.m(k,$),S(k,p,$),h=!0},p(k,[$]){var C;(!h||$&24)&&e!==(e=U.joinNonEmpty([k[4],k[3],"PocketBase"]," - "))&&(document.title=e),(C=k[0])!=null&&C.id&&k[1]?g?(g.p(k,$),$&3&&I(g,1)):(g=G_(k),g.c(),I(g,1),g.m(i,s)):g&&(ue(),P(g,1,1,()=>{g=null}),fe()),k[1]&&!k[2]?_?(_.p(k,$),$&6&&I(_,1)):(_=X_(k),_.c(),I(_,1),_.m(p.parentNode,p)):_&&(ue(),P(_,1,1,()=>{_=null}),fe())},i(k){h||(I(g),I(o.$$.fragment,k),I(a.$$.fragment,k),I(f.$$.fragment,k),I(_),h=!0)},o(k){P(g),P(o.$$.fragment,k),P(a.$$.fragment,k),P(f.$$.fragment,k),P(_),h=!1},d(k){k&&w(t),k&&w(i),g&&g.d(),H(o),H(a),k&&w(u),H(f,k),k&&w(d),_&&_.d(k),k&&w(p)}}}function M8(n,e,t){let i,s,l,o;Ze(n,Is,_=>t(10,i=_)),Ze(n,So,_=>t(3,s=_)),Ze(n,Ra,_=>t(0,l=_)),Ze(n,Mt,_=>t(4,o=_));let r,a=!1,u=!1;function f(_){var b,k,$,C;((b=_==null?void 0:_.detail)==null?void 0:b.location)!==r&&(t(1,a=!!(($=(k=_==null?void 0:_.detail)==null?void 0:k.userData)!=null&&$.showAppSidebar)),r=(C=_==null?void 0:_.detail)==null?void 0:C.location,ln(Mt,o="",o),tn({}),v1())}function d(){Vi("/")}async function p(){var _,b;if(l!=null&&l.id)try{const k=await de.settings.getAll({$cancelKey:"initialAppSettings"});ln(So,s=((_=k==null?void 0:k.meta)==null?void 0:_.appName)||"",s),ln(Is,i=!!((b=k==null?void 0:k.meta)!=null&&b.hideControls),i)}catch(k){k!=null&&k.isAbort||console.warn("Failed to load app settings.",k)}}function h(){de.logout()}const g=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&p()},[l,a,u,s,o,f,d,h,g]}class E8 extends be{constructor(e){super(),ge(this,e,M8,C8,_e,{})}}new E8({target:document.getElementById("app")});export{De as A,Ht as B,U as C,Vi as D,Se as E,gb as F,mg as G,Xt as H,Ze as I,di as J,Tt as K,ne as L,g1 as M,yt as N,zo as O,us as P,Kt as Q,pt as R,be as S,kn as T,zr as U,P as a,D as b,B as c,H as d,y as e,m as f,S as g,v as h,ge as i,Oe as j,ue as k,rn as l,z as m,fe as n,w as o,de as p,pe as q,x as r,_e as s,I as t,J as u,xe as v,Y as w,le as x,ee as y,re as z}; diff --git a/ui/dist/assets/index-6fa20e53.css b/ui/dist/assets/index-2420ec1a.css similarity index 50% rename from ui/dist/assets/index-6fa20e53.css rename to ui/dist/assets/index-2420ec1a.css index 6ca927516..1f2938595 100644 --- a/ui/dist/assets/index-6fa20e53.css +++ b/ui/dist/assets/index-2420ec1a.css @@ -1 +1 @@ -@charset "UTF-8";@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #a0a6ac;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #e4e9ec;--baseAlt2Color: #d7dde4;--baseAlt3Color: #c6cdd7;--baseAlt4Color: #a5b0c0;--infoColor: #5499e8;--infoAltColor: #cee2f8;--successColor: #32ad84;--successAltColor: #c4eedc;--dangerColor: #e34562;--dangerAltColor: #f7cad2;--warningColor: #ff944d;--warningAltColor: #ffd4b8;--overlayColor: rgba(53, 71, 104, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .06);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 22px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--entranceAnimationSpeed: .25s;--baseRadius: 4px;--lgRadius: 12px;--btnRadius: 4px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:""}.ri-24-hours-line:before{content:""}.ri-4k-fill:before{content:""}.ri-4k-line:before{content:""}.ri-a-b:before{content:""}.ri-account-box-fill:before{content:""}.ri-account-box-line:before{content:""}.ri-account-circle-fill:before{content:""}.ri-account-circle-line:before{content:""}.ri-account-pin-box-fill:before{content:""}.ri-account-pin-box-line:before{content:""}.ri-account-pin-circle-fill:before{content:""}.ri-account-pin-circle-line:before{content:""}.ri-add-box-fill:before{content:""}.ri-add-box-line:before{content:""}.ri-add-circle-fill:before{content:""}.ri-add-circle-line:before{content:""}.ri-add-fill:before{content:""}.ri-add-line:before{content:""}.ri-admin-fill:before{content:""}.ri-admin-line:before{content:""}.ri-advertisement-fill:before{content:""}.ri-advertisement-line:before{content:""}.ri-airplay-fill:before{content:""}.ri-airplay-line:before{content:""}.ri-alarm-fill:before{content:""}.ri-alarm-line:before{content:""}.ri-alarm-warning-fill:before{content:""}.ri-alarm-warning-line:before{content:""}.ri-album-fill:before{content:""}.ri-album-line:before{content:""}.ri-alert-fill:before{content:""}.ri-alert-line:before{content:""}.ri-aliens-fill:before{content:""}.ri-aliens-line:before{content:""}.ri-align-bottom:before{content:""}.ri-align-center:before{content:""}.ri-align-justify:before{content:""}.ri-align-left:before{content:""}.ri-align-right:before{content:""}.ri-align-top:before{content:""}.ri-align-vertically:before{content:""}.ri-alipay-fill:before{content:""}.ri-alipay-line:before{content:""}.ri-amazon-fill:before{content:""}.ri-amazon-line:before{content:""}.ri-anchor-fill:before{content:""}.ri-anchor-line:before{content:""}.ri-ancient-gate-fill:before{content:""}.ri-ancient-gate-line:before{content:""}.ri-ancient-pavilion-fill:before{content:""}.ri-ancient-pavilion-line:before{content:""}.ri-android-fill:before{content:""}.ri-android-line:before{content:""}.ri-angularjs-fill:before{content:""}.ri-angularjs-line:before{content:""}.ri-anticlockwise-2-fill:before{content:""}.ri-anticlockwise-2-line:before{content:""}.ri-anticlockwise-fill:before{content:""}.ri-anticlockwise-line:before{content:""}.ri-app-store-fill:before{content:""}.ri-app-store-line:before{content:""}.ri-apple-fill:before{content:""}.ri-apple-line:before{content:""}.ri-apps-2-fill:before{content:""}.ri-apps-2-line:before{content:""}.ri-apps-fill:before{content:""}.ri-apps-line:before{content:""}.ri-archive-drawer-fill:before{content:""}.ri-archive-drawer-line:before{content:""}.ri-archive-fill:before{content:""}.ri-archive-line:before{content:""}.ri-arrow-down-circle-fill:before{content:""}.ri-arrow-down-circle-line:before{content:""}.ri-arrow-down-fill:before{content:""}.ri-arrow-down-line:before{content:""}.ri-arrow-down-s-fill:before{content:""}.ri-arrow-down-s-line:before{content:""}.ri-arrow-drop-down-fill:before{content:""}.ri-arrow-drop-down-line:before{content:""}.ri-arrow-drop-left-fill:before{content:""}.ri-arrow-drop-left-line:before{content:""}.ri-arrow-drop-right-fill:before{content:""}.ri-arrow-drop-right-line:before{content:""}.ri-arrow-drop-up-fill:before{content:""}.ri-arrow-drop-up-line:before{content:""}.ri-arrow-go-back-fill:before{content:""}.ri-arrow-go-back-line:before{content:""}.ri-arrow-go-forward-fill:before{content:""}.ri-arrow-go-forward-line:before{content:""}.ri-arrow-left-circle-fill:before{content:""}.ri-arrow-left-circle-line:before{content:""}.ri-arrow-left-down-fill:before{content:""}.ri-arrow-left-down-line:before{content:""}.ri-arrow-left-fill:before{content:""}.ri-arrow-left-line:before{content:""}.ri-arrow-left-right-fill:before{content:""}.ri-arrow-left-right-line:before{content:""}.ri-arrow-left-s-fill:before{content:""}.ri-arrow-left-s-line:before{content:""}.ri-arrow-left-up-fill:before{content:""}.ri-arrow-left-up-line:before{content:""}.ri-arrow-right-circle-fill:before{content:""}.ri-arrow-right-circle-line:before{content:""}.ri-arrow-right-down-fill:before{content:""}.ri-arrow-right-down-line:before{content:""}.ri-arrow-right-fill:before{content:""}.ri-arrow-right-line:before{content:""}.ri-arrow-right-s-fill:before{content:""}.ri-arrow-right-s-line:before{content:""}.ri-arrow-right-up-fill:before{content:""}.ri-arrow-right-up-line:before{content:""}.ri-arrow-up-circle-fill:before{content:""}.ri-arrow-up-circle-line:before{content:""}.ri-arrow-up-down-fill:before{content:""}.ri-arrow-up-down-line:before{content:""}.ri-arrow-up-fill:before{content:""}.ri-arrow-up-line:before{content:""}.ri-arrow-up-s-fill:before{content:""}.ri-arrow-up-s-line:before{content:""}.ri-artboard-2-fill:before{content:""}.ri-artboard-2-line:before{content:""}.ri-artboard-fill:before{content:""}.ri-artboard-line:before{content:""}.ri-article-fill:before{content:""}.ri-article-line:before{content:""}.ri-aspect-ratio-fill:before{content:""}.ri-aspect-ratio-line:before{content:""}.ri-asterisk:before{content:""}.ri-at-fill:before{content:""}.ri-at-line:before{content:""}.ri-attachment-2:before{content:""}.ri-attachment-fill:before{content:""}.ri-attachment-line:before{content:""}.ri-auction-fill:before{content:""}.ri-auction-line:before{content:""}.ri-award-fill:before{content:""}.ri-award-line:before{content:""}.ri-baidu-fill:before{content:""}.ri-baidu-line:before{content:""}.ri-ball-pen-fill:before{content:""}.ri-ball-pen-line:before{content:""}.ri-bank-card-2-fill:before{content:""}.ri-bank-card-2-line:before{content:""}.ri-bank-card-fill:before{content:""}.ri-bank-card-line:before{content:""}.ri-bank-fill:before{content:""}.ri-bank-line:before{content:""}.ri-bar-chart-2-fill:before{content:""}.ri-bar-chart-2-line:before{content:""}.ri-bar-chart-box-fill:before{content:""}.ri-bar-chart-box-line:before{content:""}.ri-bar-chart-fill:before{content:""}.ri-bar-chart-grouped-fill:before{content:""}.ri-bar-chart-grouped-line:before{content:""}.ri-bar-chart-horizontal-fill:before{content:""}.ri-bar-chart-horizontal-line:before{content:""}.ri-bar-chart-line:before{content:""}.ri-barcode-box-fill:before{content:""}.ri-barcode-box-line:before{content:""}.ri-barcode-fill:before{content:""}.ri-barcode-line:before{content:""}.ri-barricade-fill:before{content:""}.ri-barricade-line:before{content:""}.ri-base-station-fill:before{content:""}.ri-base-station-line:before{content:""}.ri-basketball-fill:before{content:""}.ri-basketball-line:before{content:""}.ri-battery-2-charge-fill:before{content:""}.ri-battery-2-charge-line:before{content:""}.ri-battery-2-fill:before{content:""}.ri-battery-2-line:before{content:""}.ri-battery-charge-fill:before{content:""}.ri-battery-charge-line:before{content:""}.ri-battery-fill:before{content:""}.ri-battery-line:before{content:""}.ri-battery-low-fill:before{content:""}.ri-battery-low-line:before{content:""}.ri-battery-saver-fill:before{content:""}.ri-battery-saver-line:before{content:""}.ri-battery-share-fill:before{content:""}.ri-battery-share-line:before{content:""}.ri-bear-smile-fill:before{content:""}.ri-bear-smile-line:before{content:""}.ri-behance-fill:before{content:""}.ri-behance-line:before{content:""}.ri-bell-fill:before{content:""}.ri-bell-line:before{content:""}.ri-bike-fill:before{content:""}.ri-bike-line:before{content:""}.ri-bilibili-fill:before{content:""}.ri-bilibili-line:before{content:""}.ri-bill-fill:before{content:""}.ri-bill-line:before{content:""}.ri-billiards-fill:before{content:""}.ri-billiards-line:before{content:""}.ri-bit-coin-fill:before{content:""}.ri-bit-coin-line:before{content:""}.ri-blaze-fill:before{content:""}.ri-blaze-line:before{content:""}.ri-bluetooth-connect-fill:before{content:""}.ri-bluetooth-connect-line:before{content:""}.ri-bluetooth-fill:before{content:""}.ri-bluetooth-line:before{content:""}.ri-blur-off-fill:before{content:""}.ri-blur-off-line:before{content:""}.ri-body-scan-fill:before{content:""}.ri-body-scan-line:before{content:""}.ri-bold:before{content:""}.ri-book-2-fill:before{content:""}.ri-book-2-line:before{content:""}.ri-book-3-fill:before{content:""}.ri-book-3-line:before{content:""}.ri-book-fill:before{content:""}.ri-book-line:before{content:""}.ri-book-mark-fill:before{content:""}.ri-book-mark-line:before{content:""}.ri-book-open-fill:before{content:""}.ri-book-open-line:before{content:""}.ri-book-read-fill:before{content:""}.ri-book-read-line:before{content:""}.ri-booklet-fill:before{content:""}.ri-booklet-line:before{content:""}.ri-bookmark-2-fill:before{content:""}.ri-bookmark-2-line:before{content:""}.ri-bookmark-3-fill:before{content:""}.ri-bookmark-3-line:before{content:""}.ri-bookmark-fill:before{content:""}.ri-bookmark-line:before{content:""}.ri-boxing-fill:before{content:""}.ri-boxing-line:before{content:""}.ri-braces-fill:before{content:""}.ri-braces-line:before{content:""}.ri-brackets-fill:before{content:""}.ri-brackets-line:before{content:""}.ri-briefcase-2-fill:before{content:""}.ri-briefcase-2-line:before{content:""}.ri-briefcase-3-fill:before{content:""}.ri-briefcase-3-line:before{content:""}.ri-briefcase-4-fill:before{content:""}.ri-briefcase-4-line:before{content:""}.ri-briefcase-5-fill:before{content:""}.ri-briefcase-5-line:before{content:""}.ri-briefcase-fill:before{content:""}.ri-briefcase-line:before{content:""}.ri-bring-forward:before{content:""}.ri-bring-to-front:before{content:""}.ri-broadcast-fill:before{content:""}.ri-broadcast-line:before{content:""}.ri-brush-2-fill:before{content:""}.ri-brush-2-line:before{content:""}.ri-brush-3-fill:before{content:""}.ri-brush-3-line:before{content:""}.ri-brush-4-fill:before{content:""}.ri-brush-4-line:before{content:""}.ri-brush-fill:before{content:""}.ri-brush-line:before{content:""}.ri-bubble-chart-fill:before{content:""}.ri-bubble-chart-line:before{content:""}.ri-bug-2-fill:before{content:""}.ri-bug-2-line:before{content:""}.ri-bug-fill:before{content:""}.ri-bug-line:before{content:""}.ri-building-2-fill:before{content:""}.ri-building-2-line:before{content:""}.ri-building-3-fill:before{content:""}.ri-building-3-line:before{content:""}.ri-building-4-fill:before{content:""}.ri-building-4-line:before{content:""}.ri-building-fill:before{content:""}.ri-building-line:before{content:""}.ri-bus-2-fill:before{content:""}.ri-bus-2-line:before{content:""}.ri-bus-fill:before{content:""}.ri-bus-line:before{content:""}.ri-bus-wifi-fill:before{content:""}.ri-bus-wifi-line:before{content:""}.ri-cactus-fill:before{content:""}.ri-cactus-line:before{content:""}.ri-cake-2-fill:before{content:""}.ri-cake-2-line:before{content:""}.ri-cake-3-fill:before{content:""}.ri-cake-3-line:before{content:""}.ri-cake-fill:before{content:""}.ri-cake-line:before{content:""}.ri-calculator-fill:before{content:""}.ri-calculator-line:before{content:""}.ri-calendar-2-fill:before{content:""}.ri-calendar-2-line:before{content:""}.ri-calendar-check-fill:before{content:""}.ri-calendar-check-line:before{content:""}.ri-calendar-event-fill:before{content:""}.ri-calendar-event-line:before{content:""}.ri-calendar-fill:before{content:""}.ri-calendar-line:before{content:""}.ri-calendar-todo-fill:before{content:""}.ri-calendar-todo-line:before{content:""}.ri-camera-2-fill:before{content:""}.ri-camera-2-line:before{content:""}.ri-camera-3-fill:before{content:""}.ri-camera-3-line:before{content:""}.ri-camera-fill:before{content:""}.ri-camera-lens-fill:before{content:""}.ri-camera-lens-line:before{content:""}.ri-camera-line:before{content:""}.ri-camera-off-fill:before{content:""}.ri-camera-off-line:before{content:""}.ri-camera-switch-fill:before{content:""}.ri-camera-switch-line:before{content:""}.ri-capsule-fill:before{content:""}.ri-capsule-line:before{content:""}.ri-car-fill:before{content:""}.ri-car-line:before{content:""}.ri-car-washing-fill:before{content:""}.ri-car-washing-line:before{content:""}.ri-caravan-fill:before{content:""}.ri-caravan-line:before{content:""}.ri-cast-fill:before{content:""}.ri-cast-line:before{content:""}.ri-cellphone-fill:before{content:""}.ri-cellphone-line:before{content:""}.ri-celsius-fill:before{content:""}.ri-celsius-line:before{content:""}.ri-centos-fill:before{content:""}.ri-centos-line:before{content:""}.ri-character-recognition-fill:before{content:""}.ri-character-recognition-line:before{content:""}.ri-charging-pile-2-fill:before{content:""}.ri-charging-pile-2-line:before{content:""}.ri-charging-pile-fill:before{content:""}.ri-charging-pile-line:before{content:""}.ri-chat-1-fill:before{content:""}.ri-chat-1-line:before{content:""}.ri-chat-2-fill:before{content:""}.ri-chat-2-line:before{content:""}.ri-chat-3-fill:before{content:""}.ri-chat-3-line:before{content:""}.ri-chat-4-fill:before{content:""}.ri-chat-4-line:before{content:""}.ri-chat-check-fill:before{content:""}.ri-chat-check-line:before{content:""}.ri-chat-delete-fill:before{content:""}.ri-chat-delete-line:before{content:""}.ri-chat-download-fill:before{content:""}.ri-chat-download-line:before{content:""}.ri-chat-follow-up-fill:before{content:""}.ri-chat-follow-up-line:before{content:""}.ri-chat-forward-fill:before{content:""}.ri-chat-forward-line:before{content:""}.ri-chat-heart-fill:before{content:""}.ri-chat-heart-line:before{content:""}.ri-chat-history-fill:before{content:""}.ri-chat-history-line:before{content:""}.ri-chat-new-fill:before{content:""}.ri-chat-new-line:before{content:""}.ri-chat-off-fill:before{content:""}.ri-chat-off-line:before{content:""}.ri-chat-poll-fill:before{content:""}.ri-chat-poll-line:before{content:""}.ri-chat-private-fill:before{content:""}.ri-chat-private-line:before{content:""}.ri-chat-quote-fill:before{content:""}.ri-chat-quote-line:before{content:""}.ri-chat-settings-fill:before{content:""}.ri-chat-settings-line:before{content:""}.ri-chat-smile-2-fill:before{content:""}.ri-chat-smile-2-line:before{content:""}.ri-chat-smile-3-fill:before{content:""}.ri-chat-smile-3-line:before{content:""}.ri-chat-smile-fill:before{content:""}.ri-chat-smile-line:before{content:""}.ri-chat-upload-fill:before{content:""}.ri-chat-upload-line:before{content:""}.ri-chat-voice-fill:before{content:""}.ri-chat-voice-line:before{content:""}.ri-check-double-fill:before{content:""}.ri-check-double-line:before{content:""}.ri-check-fill:before{content:""}.ri-check-line:before{content:""}.ri-checkbox-blank-circle-fill:before{content:""}.ri-checkbox-blank-circle-line:before{content:""}.ri-checkbox-blank-fill:before{content:""}.ri-checkbox-blank-line:before{content:""}.ri-checkbox-circle-fill:before{content:""}.ri-checkbox-circle-line:before{content:""}.ri-checkbox-fill:before{content:""}.ri-checkbox-indeterminate-fill:before{content:""}.ri-checkbox-indeterminate-line:before{content:""}.ri-checkbox-line:before{content:""}.ri-checkbox-multiple-blank-fill:before{content:""}.ri-checkbox-multiple-blank-line:before{content:""}.ri-checkbox-multiple-fill:before{content:""}.ri-checkbox-multiple-line:before{content:""}.ri-china-railway-fill:before{content:""}.ri-china-railway-line:before{content:""}.ri-chrome-fill:before{content:""}.ri-chrome-line:before{content:""}.ri-clapperboard-fill:before{content:""}.ri-clapperboard-line:before{content:""}.ri-clipboard-fill:before{content:""}.ri-clipboard-line:before{content:""}.ri-clockwise-2-fill:before{content:""}.ri-clockwise-2-line:before{content:""}.ri-clockwise-fill:before{content:""}.ri-clockwise-line:before{content:""}.ri-close-circle-fill:before{content:""}.ri-close-circle-line:before{content:""}.ri-close-fill:before{content:""}.ri-close-line:before{content:""}.ri-closed-captioning-fill:before{content:""}.ri-closed-captioning-line:before{content:""}.ri-cloud-fill:before{content:""}.ri-cloud-line:before{content:""}.ri-cloud-off-fill:before{content:""}.ri-cloud-off-line:before{content:""}.ri-cloud-windy-fill:before{content:""}.ri-cloud-windy-line:before{content:""}.ri-cloudy-2-fill:before{content:""}.ri-cloudy-2-line:before{content:""}.ri-cloudy-fill:before{content:""}.ri-cloudy-line:before{content:""}.ri-code-box-fill:before{content:""}.ri-code-box-line:before{content:""}.ri-code-fill:before{content:""}.ri-code-line:before{content:""}.ri-code-s-fill:before{content:""}.ri-code-s-line:before{content:""}.ri-code-s-slash-fill:before{content:""}.ri-code-s-slash-line:before{content:""}.ri-code-view:before{content:""}.ri-codepen-fill:before{content:""}.ri-codepen-line:before{content:""}.ri-coin-fill:before{content:""}.ri-coin-line:before{content:""}.ri-coins-fill:before{content:""}.ri-coins-line:before{content:""}.ri-collage-fill:before{content:""}.ri-collage-line:before{content:""}.ri-command-fill:before{content:""}.ri-command-line:before{content:""}.ri-community-fill:before{content:""}.ri-community-line:before{content:""}.ri-compass-2-fill:before{content:""}.ri-compass-2-line:before{content:""}.ri-compass-3-fill:before{content:""}.ri-compass-3-line:before{content:""}.ri-compass-4-fill:before{content:""}.ri-compass-4-line:before{content:""}.ri-compass-discover-fill:before{content:""}.ri-compass-discover-line:before{content:""}.ri-compass-fill:before{content:""}.ri-compass-line:before{content:""}.ri-compasses-2-fill:before{content:""}.ri-compasses-2-line:before{content:""}.ri-compasses-fill:before{content:""}.ri-compasses-line:before{content:""}.ri-computer-fill:before{content:""}.ri-computer-line:before{content:""}.ri-contacts-book-2-fill:before{content:""}.ri-contacts-book-2-line:before{content:""}.ri-contacts-book-fill:before{content:""}.ri-contacts-book-line:before{content:""}.ri-contacts-book-upload-fill:before{content:""}.ri-contacts-book-upload-line:before{content:""}.ri-contacts-fill:before{content:""}.ri-contacts-line:before{content:""}.ri-contrast-2-fill:before{content:""}.ri-contrast-2-line:before{content:""}.ri-contrast-drop-2-fill:before{content:""}.ri-contrast-drop-2-line:before{content:""}.ri-contrast-drop-fill:before{content:""}.ri-contrast-drop-line:before{content:""}.ri-contrast-fill:before{content:""}.ri-contrast-line:before{content:""}.ri-copper-coin-fill:before{content:""}.ri-copper-coin-line:before{content:""}.ri-copper-diamond-fill:before{content:""}.ri-copper-diamond-line:before{content:""}.ri-copyleft-fill:before{content:""}.ri-copyleft-line:before{content:""}.ri-copyright-fill:before{content:""}.ri-copyright-line:before{content:""}.ri-coreos-fill:before{content:""}.ri-coreos-line:before{content:""}.ri-coupon-2-fill:before{content:""}.ri-coupon-2-line:before{content:""}.ri-coupon-3-fill:before{content:""}.ri-coupon-3-line:before{content:""}.ri-coupon-4-fill:before{content:""}.ri-coupon-4-line:before{content:""}.ri-coupon-5-fill:before{content:""}.ri-coupon-5-line:before{content:""}.ri-coupon-fill:before{content:""}.ri-coupon-line:before{content:""}.ri-cpu-fill:before{content:""}.ri-cpu-line:before{content:""}.ri-creative-commons-by-fill:before{content:""}.ri-creative-commons-by-line:before{content:""}.ri-creative-commons-fill:before{content:""}.ri-creative-commons-line:before{content:""}.ri-creative-commons-nc-fill:before{content:""}.ri-creative-commons-nc-line:before{content:""}.ri-creative-commons-nd-fill:before{content:""}.ri-creative-commons-nd-line:before{content:""}.ri-creative-commons-sa-fill:before{content:""}.ri-creative-commons-sa-line:before{content:""}.ri-creative-commons-zero-fill:before{content:""}.ri-creative-commons-zero-line:before{content:""}.ri-criminal-fill:before{content:""}.ri-criminal-line:before{content:""}.ri-crop-2-fill:before{content:""}.ri-crop-2-line:before{content:""}.ri-crop-fill:before{content:""}.ri-crop-line:before{content:""}.ri-css3-fill:before{content:""}.ri-css3-line:before{content:""}.ri-cup-fill:before{content:""}.ri-cup-line:before{content:""}.ri-currency-fill:before{content:""}.ri-currency-line:before{content:""}.ri-cursor-fill:before{content:""}.ri-cursor-line:before{content:""}.ri-customer-service-2-fill:before{content:""}.ri-customer-service-2-line:before{content:""}.ri-customer-service-fill:before{content:""}.ri-customer-service-line:before{content:""}.ri-dashboard-2-fill:before{content:""}.ri-dashboard-2-line:before{content:""}.ri-dashboard-3-fill:before{content:""}.ri-dashboard-3-line:before{content:""}.ri-dashboard-fill:before{content:""}.ri-dashboard-line:before{content:""}.ri-database-2-fill:before{content:""}.ri-database-2-line:before{content:""}.ri-database-fill:before{content:""}.ri-database-line:before{content:""}.ri-delete-back-2-fill:before{content:""}.ri-delete-back-2-line:before{content:""}.ri-delete-back-fill:before{content:""}.ri-delete-back-line:before{content:""}.ri-delete-bin-2-fill:before{content:""}.ri-delete-bin-2-line:before{content:""}.ri-delete-bin-3-fill:before{content:""}.ri-delete-bin-3-line:before{content:""}.ri-delete-bin-4-fill:before{content:""}.ri-delete-bin-4-line:before{content:""}.ri-delete-bin-5-fill:before{content:""}.ri-delete-bin-5-line:before{content:""}.ri-delete-bin-6-fill:before{content:""}.ri-delete-bin-6-line:before{content:""}.ri-delete-bin-7-fill:before{content:""}.ri-delete-bin-7-line:before{content:""}.ri-delete-bin-fill:before{content:""}.ri-delete-bin-line:before{content:""}.ri-delete-column:before{content:""}.ri-delete-row:before{content:""}.ri-device-fill:before{content:""}.ri-device-line:before{content:""}.ri-device-recover-fill:before{content:""}.ri-device-recover-line:before{content:""}.ri-dingding-fill:before{content:""}.ri-dingding-line:before{content:""}.ri-direction-fill:before{content:""}.ri-direction-line:before{content:""}.ri-disc-fill:before{content:""}.ri-disc-line:before{content:""}.ri-discord-fill:before{content:""}.ri-discord-line:before{content:""}.ri-discuss-fill:before{content:""}.ri-discuss-line:before{content:""}.ri-dislike-fill:before{content:""}.ri-dislike-line:before{content:""}.ri-disqus-fill:before{content:""}.ri-disqus-line:before{content:""}.ri-divide-fill:before{content:""}.ri-divide-line:before{content:""}.ri-donut-chart-fill:before{content:""}.ri-donut-chart-line:before{content:""}.ri-door-closed-fill:before{content:""}.ri-door-closed-line:before{content:""}.ri-door-fill:before{content:""}.ri-door-line:before{content:""}.ri-door-lock-box-fill:before{content:""}.ri-door-lock-box-line:before{content:""}.ri-door-lock-fill:before{content:""}.ri-door-lock-line:before{content:""}.ri-door-open-fill:before{content:""}.ri-door-open-line:before{content:""}.ri-dossier-fill:before{content:""}.ri-dossier-line:before{content:""}.ri-douban-fill:before{content:""}.ri-douban-line:before{content:""}.ri-double-quotes-l:before{content:""}.ri-double-quotes-r:before{content:""}.ri-download-2-fill:before{content:""}.ri-download-2-line:before{content:""}.ri-download-cloud-2-fill:before{content:""}.ri-download-cloud-2-line:before{content:""}.ri-download-cloud-fill:before{content:""}.ri-download-cloud-line:before{content:""}.ri-download-fill:before{content:""}.ri-download-line:before{content:""}.ri-draft-fill:before{content:""}.ri-draft-line:before{content:""}.ri-drag-drop-fill:before{content:""}.ri-drag-drop-line:before{content:""}.ri-drag-move-2-fill:before{content:""}.ri-drag-move-2-line:before{content:""}.ri-drag-move-fill:before{content:""}.ri-drag-move-line:before{content:""}.ri-dribbble-fill:before{content:""}.ri-dribbble-line:before{content:""}.ri-drive-fill:before{content:""}.ri-drive-line:before{content:""}.ri-drizzle-fill:before{content:""}.ri-drizzle-line:before{content:""}.ri-drop-fill:before{content:""}.ri-drop-line:before{content:""}.ri-dropbox-fill:before{content:""}.ri-dropbox-line:before{content:""}.ri-dual-sim-1-fill:before{content:""}.ri-dual-sim-1-line:before{content:""}.ri-dual-sim-2-fill:before{content:""}.ri-dual-sim-2-line:before{content:""}.ri-dv-fill:before{content:""}.ri-dv-line:before{content:""}.ri-dvd-fill:before{content:""}.ri-dvd-line:before{content:""}.ri-e-bike-2-fill:before{content:""}.ri-e-bike-2-line:before{content:""}.ri-e-bike-fill:before{content:""}.ri-e-bike-line:before{content:""}.ri-earth-fill:before{content:""}.ri-earth-line:before{content:""}.ri-earthquake-fill:before{content:""}.ri-earthquake-line:before{content:""}.ri-edge-fill:before{content:""}.ri-edge-line:before{content:""}.ri-edit-2-fill:before{content:""}.ri-edit-2-line:before{content:""}.ri-edit-box-fill:before{content:""}.ri-edit-box-line:before{content:""}.ri-edit-circle-fill:before{content:""}.ri-edit-circle-line:before{content:""}.ri-edit-fill:before{content:""}.ri-edit-line:before{content:""}.ri-eject-fill:before{content:""}.ri-eject-line:before{content:""}.ri-emotion-2-fill:before{content:""}.ri-emotion-2-line:before{content:""}.ri-emotion-fill:before{content:""}.ri-emotion-happy-fill:before{content:""}.ri-emotion-happy-line:before{content:""}.ri-emotion-laugh-fill:before{content:""}.ri-emotion-laugh-line:before{content:""}.ri-emotion-line:before{content:""}.ri-emotion-normal-fill:before{content:""}.ri-emotion-normal-line:before{content:""}.ri-emotion-sad-fill:before{content:""}.ri-emotion-sad-line:before{content:""}.ri-emotion-unhappy-fill:before{content:""}.ri-emotion-unhappy-line:before{content:""}.ri-empathize-fill:before{content:""}.ri-empathize-line:before{content:""}.ri-emphasis-cn:before{content:""}.ri-emphasis:before{content:""}.ri-english-input:before{content:""}.ri-equalizer-fill:before{content:""}.ri-equalizer-line:before{content:""}.ri-eraser-fill:before{content:""}.ri-eraser-line:before{content:""}.ri-error-warning-fill:before{content:""}.ri-error-warning-line:before{content:""}.ri-evernote-fill:before{content:""}.ri-evernote-line:before{content:""}.ri-exchange-box-fill:before{content:""}.ri-exchange-box-line:before{content:""}.ri-exchange-cny-fill:before{content:""}.ri-exchange-cny-line:before{content:""}.ri-exchange-dollar-fill:before{content:""}.ri-exchange-dollar-line:before{content:""}.ri-exchange-fill:before{content:""}.ri-exchange-funds-fill:before{content:""}.ri-exchange-funds-line:before{content:""}.ri-exchange-line:before{content:""}.ri-external-link-fill:before{content:""}.ri-external-link-line:before{content:""}.ri-eye-2-fill:before{content:""}.ri-eye-2-line:before{content:""}.ri-eye-close-fill:before{content:""}.ri-eye-close-line:before{content:""}.ri-eye-fill:before{content:""}.ri-eye-line:before{content:""}.ri-eye-off-fill:before{content:""}.ri-eye-off-line:before{content:""}.ri-facebook-box-fill:before{content:""}.ri-facebook-box-line:before{content:""}.ri-facebook-circle-fill:before{content:""}.ri-facebook-circle-line:before{content:""}.ri-facebook-fill:before{content:""}.ri-facebook-line:before{content:""}.ri-fahrenheit-fill:before{content:""}.ri-fahrenheit-line:before{content:""}.ri-feedback-fill:before{content:""}.ri-feedback-line:before{content:""}.ri-file-2-fill:before{content:""}.ri-file-2-line:before{content:""}.ri-file-3-fill:before{content:""}.ri-file-3-line:before{content:""}.ri-file-4-fill:before{content:""}.ri-file-4-line:before{content:""}.ri-file-add-fill:before{content:""}.ri-file-add-line:before{content:""}.ri-file-chart-2-fill:before{content:""}.ri-file-chart-2-line:before{content:""}.ri-file-chart-fill:before{content:""}.ri-file-chart-line:before{content:""}.ri-file-cloud-fill:before{content:""}.ri-file-cloud-line:before{content:""}.ri-file-code-fill:before{content:""}.ri-file-code-line:before{content:""}.ri-file-copy-2-fill:before{content:""}.ri-file-copy-2-line:before{content:""}.ri-file-copy-fill:before{content:""}.ri-file-copy-line:before{content:""}.ri-file-damage-fill:before{content:""}.ri-file-damage-line:before{content:""}.ri-file-download-fill:before{content:""}.ri-file-download-line:before{content:""}.ri-file-edit-fill:before{content:""}.ri-file-edit-line:before{content:""}.ri-file-excel-2-fill:before{content:""}.ri-file-excel-2-line:before{content:""}.ri-file-excel-fill:before{content:""}.ri-file-excel-line:before{content:""}.ri-file-fill:before{content:""}.ri-file-forbid-fill:before{content:""}.ri-file-forbid-line:before{content:""}.ri-file-gif-fill:before{content:""}.ri-file-gif-line:before{content:""}.ri-file-history-fill:before{content:""}.ri-file-history-line:before{content:""}.ri-file-hwp-fill:before{content:""}.ri-file-hwp-line:before{content:""}.ri-file-info-fill:before{content:""}.ri-file-info-line:before{content:""}.ri-file-line:before{content:""}.ri-file-list-2-fill:before{content:""}.ri-file-list-2-line:before{content:""}.ri-file-list-3-fill:before{content:""}.ri-file-list-3-line:before{content:""}.ri-file-list-fill:before{content:""}.ri-file-list-line:before{content:""}.ri-file-lock-fill:before{content:""}.ri-file-lock-line:before{content:""}.ri-file-mark-fill:before{content:""}.ri-file-mark-line:before{content:""}.ri-file-music-fill:before{content:""}.ri-file-music-line:before{content:""}.ri-file-paper-2-fill:before{content:""}.ri-file-paper-2-line:before{content:""}.ri-file-paper-fill:before{content:""}.ri-file-paper-line:before{content:""}.ri-file-pdf-fill:before{content:""}.ri-file-pdf-line:before{content:""}.ri-file-ppt-2-fill:before{content:""}.ri-file-ppt-2-line:before{content:""}.ri-file-ppt-fill:before{content:""}.ri-file-ppt-line:before{content:""}.ri-file-reduce-fill:before{content:""}.ri-file-reduce-line:before{content:""}.ri-file-search-fill:before{content:""}.ri-file-search-line:before{content:""}.ri-file-settings-fill:before{content:""}.ri-file-settings-line:before{content:""}.ri-file-shield-2-fill:before{content:""}.ri-file-shield-2-line:before{content:""}.ri-file-shield-fill:before{content:""}.ri-file-shield-line:before{content:""}.ri-file-shred-fill:before{content:""}.ri-file-shred-line:before{content:""}.ri-file-text-fill:before{content:""}.ri-file-text-line:before{content:""}.ri-file-transfer-fill:before{content:""}.ri-file-transfer-line:before{content:""}.ri-file-unknow-fill:before{content:""}.ri-file-unknow-line:before{content:""}.ri-file-upload-fill:before{content:""}.ri-file-upload-line:before{content:""}.ri-file-user-fill:before{content:""}.ri-file-user-line:before{content:""}.ri-file-warning-fill:before{content:""}.ri-file-warning-line:before{content:""}.ri-file-word-2-fill:before{content:""}.ri-file-word-2-line:before{content:""}.ri-file-word-fill:before{content:""}.ri-file-word-line:before{content:""}.ri-file-zip-fill:before{content:""}.ri-file-zip-line:before{content:""}.ri-film-fill:before{content:""}.ri-film-line:before{content:""}.ri-filter-2-fill:before{content:""}.ri-filter-2-line:before{content:""}.ri-filter-3-fill:before{content:""}.ri-filter-3-line:before{content:""}.ri-filter-fill:before{content:""}.ri-filter-line:before{content:""}.ri-filter-off-fill:before{content:""}.ri-filter-off-line:before{content:""}.ri-find-replace-fill:before{content:""}.ri-find-replace-line:before{content:""}.ri-finder-fill:before{content:""}.ri-finder-line:before{content:""}.ri-fingerprint-2-fill:before{content:""}.ri-fingerprint-2-line:before{content:""}.ri-fingerprint-fill:before{content:""}.ri-fingerprint-line:before{content:""}.ri-fire-fill:before{content:""}.ri-fire-line:before{content:""}.ri-firefox-fill:before{content:""}.ri-firefox-line:before{content:""}.ri-first-aid-kit-fill:before{content:""}.ri-first-aid-kit-line:before{content:""}.ri-flag-2-fill:before{content:""}.ri-flag-2-line:before{content:""}.ri-flag-fill:before{content:""}.ri-flag-line:before{content:""}.ri-flashlight-fill:before{content:""}.ri-flashlight-line:before{content:""}.ri-flask-fill:before{content:""}.ri-flask-line:before{content:""}.ri-flight-land-fill:before{content:""}.ri-flight-land-line:before{content:""}.ri-flight-takeoff-fill:before{content:""}.ri-flight-takeoff-line:before{content:""}.ri-flood-fill:before{content:""}.ri-flood-line:before{content:""}.ri-flow-chart:before{content:""}.ri-flutter-fill:before{content:""}.ri-flutter-line:before{content:""}.ri-focus-2-fill:before{content:""}.ri-focus-2-line:before{content:""}.ri-focus-3-fill:before{content:""}.ri-focus-3-line:before{content:""}.ri-focus-fill:before{content:""}.ri-focus-line:before{content:""}.ri-foggy-fill:before{content:""}.ri-foggy-line:before{content:""}.ri-folder-2-fill:before{content:""}.ri-folder-2-line:before{content:""}.ri-folder-3-fill:before{content:""}.ri-folder-3-line:before{content:""}.ri-folder-4-fill:before{content:""}.ri-folder-4-line:before{content:""}.ri-folder-5-fill:before{content:""}.ri-folder-5-line:before{content:""}.ri-folder-add-fill:before{content:""}.ri-folder-add-line:before{content:""}.ri-folder-chart-2-fill:before{content:""}.ri-folder-chart-2-line:before{content:""}.ri-folder-chart-fill:before{content:""}.ri-folder-chart-line:before{content:""}.ri-folder-download-fill:before{content:""}.ri-folder-download-line:before{content:""}.ri-folder-fill:before{content:""}.ri-folder-forbid-fill:before{content:""}.ri-folder-forbid-line:before{content:""}.ri-folder-history-fill:before{content:""}.ri-folder-history-line:before{content:""}.ri-folder-info-fill:before{content:""}.ri-folder-info-line:before{content:""}.ri-folder-keyhole-fill:before{content:""}.ri-folder-keyhole-line:before{content:""}.ri-folder-line:before{content:""}.ri-folder-lock-fill:before{content:""}.ri-folder-lock-line:before{content:""}.ri-folder-music-fill:before{content:""}.ri-folder-music-line:before{content:""}.ri-folder-open-fill:before{content:""}.ri-folder-open-line:before{content:""}.ri-folder-received-fill:before{content:""}.ri-folder-received-line:before{content:""}.ri-folder-reduce-fill:before{content:""}.ri-folder-reduce-line:before{content:""}.ri-folder-settings-fill:before{content:""}.ri-folder-settings-line:before{content:""}.ri-folder-shared-fill:before{content:""}.ri-folder-shared-line:before{content:""}.ri-folder-shield-2-fill:before{content:""}.ri-folder-shield-2-line:before{content:""}.ri-folder-shield-fill:before{content:""}.ri-folder-shield-line:before{content:""}.ri-folder-transfer-fill:before{content:""}.ri-folder-transfer-line:before{content:""}.ri-folder-unknow-fill:before{content:""}.ri-folder-unknow-line:before{content:""}.ri-folder-upload-fill:before{content:""}.ri-folder-upload-line:before{content:""}.ri-folder-user-fill:before{content:""}.ri-folder-user-line:before{content:""}.ri-folder-warning-fill:before{content:""}.ri-folder-warning-line:before{content:""}.ri-folder-zip-fill:before{content:""}.ri-folder-zip-line:before{content:""}.ri-folders-fill:before{content:""}.ri-folders-line:before{content:""}.ri-font-color:before{content:""}.ri-font-size-2:before{content:""}.ri-font-size:before{content:""}.ri-football-fill:before{content:""}.ri-football-line:before{content:""}.ri-footprint-fill:before{content:""}.ri-footprint-line:before{content:""}.ri-forbid-2-fill:before{content:""}.ri-forbid-2-line:before{content:""}.ri-forbid-fill:before{content:""}.ri-forbid-line:before{content:""}.ri-format-clear:before{content:""}.ri-fridge-fill:before{content:""}.ri-fridge-line:before{content:""}.ri-fullscreen-exit-fill:before{content:""}.ri-fullscreen-exit-line:before{content:""}.ri-fullscreen-fill:before{content:""}.ri-fullscreen-line:before{content:""}.ri-function-fill:before{content:""}.ri-function-line:before{content:""}.ri-functions:before{content:""}.ri-funds-box-fill:before{content:""}.ri-funds-box-line:before{content:""}.ri-funds-fill:before{content:""}.ri-funds-line:before{content:""}.ri-gallery-fill:before{content:""}.ri-gallery-line:before{content:""}.ri-gallery-upload-fill:before{content:""}.ri-gallery-upload-line:before{content:""}.ri-game-fill:before{content:""}.ri-game-line:before{content:""}.ri-gamepad-fill:before{content:""}.ri-gamepad-line:before{content:""}.ri-gas-station-fill:before{content:""}.ri-gas-station-line:before{content:""}.ri-gatsby-fill:before{content:""}.ri-gatsby-line:before{content:""}.ri-genderless-fill:before{content:""}.ri-genderless-line:before{content:""}.ri-ghost-2-fill:before{content:""}.ri-ghost-2-line:before{content:""}.ri-ghost-fill:before{content:""}.ri-ghost-line:before{content:""}.ri-ghost-smile-fill:before{content:""}.ri-ghost-smile-line:before{content:""}.ri-gift-2-fill:before{content:""}.ri-gift-2-line:before{content:""}.ri-gift-fill:before{content:""}.ri-gift-line:before{content:""}.ri-git-branch-fill:before{content:""}.ri-git-branch-line:before{content:""}.ri-git-commit-fill:before{content:""}.ri-git-commit-line:before{content:""}.ri-git-merge-fill:before{content:""}.ri-git-merge-line:before{content:""}.ri-git-pull-request-fill:before{content:""}.ri-git-pull-request-line:before{content:""}.ri-git-repository-commits-fill:before{content:""}.ri-git-repository-commits-line:before{content:""}.ri-git-repository-fill:before{content:""}.ri-git-repository-line:before{content:""}.ri-git-repository-private-fill:before{content:""}.ri-git-repository-private-line:before{content:""}.ri-github-fill:before{content:""}.ri-github-line:before{content:""}.ri-gitlab-fill:before{content:""}.ri-gitlab-line:before{content:""}.ri-global-fill:before{content:""}.ri-global-line:before{content:""}.ri-globe-fill:before{content:""}.ri-globe-line:before{content:""}.ri-goblet-fill:before{content:""}.ri-goblet-line:before{content:""}.ri-google-fill:before{content:""}.ri-google-line:before{content:""}.ri-google-play-fill:before{content:""}.ri-google-play-line:before{content:""}.ri-government-fill:before{content:""}.ri-government-line:before{content:""}.ri-gps-fill:before{content:""}.ri-gps-line:before{content:""}.ri-gradienter-fill:before{content:""}.ri-gradienter-line:before{content:""}.ri-grid-fill:before{content:""}.ri-grid-line:before{content:""}.ri-group-2-fill:before{content:""}.ri-group-2-line:before{content:""}.ri-group-fill:before{content:""}.ri-group-line:before{content:""}.ri-guide-fill:before{content:""}.ri-guide-line:before{content:""}.ri-h-1:before{content:""}.ri-h-2:before{content:""}.ri-h-3:before{content:""}.ri-h-4:before{content:""}.ri-h-5:before{content:""}.ri-h-6:before{content:""}.ri-hail-fill:before{content:""}.ri-hail-line:before{content:""}.ri-hammer-fill:before{content:""}.ri-hammer-line:before{content:""}.ri-hand-coin-fill:before{content:""}.ri-hand-coin-line:before{content:""}.ri-hand-heart-fill:before{content:""}.ri-hand-heart-line:before{content:""}.ri-hand-sanitizer-fill:before{content:""}.ri-hand-sanitizer-line:before{content:""}.ri-handbag-fill:before{content:""}.ri-handbag-line:before{content:""}.ri-hard-drive-2-fill:before{content:""}.ri-hard-drive-2-line:before{content:""}.ri-hard-drive-fill:before{content:""}.ri-hard-drive-line:before{content:""}.ri-hashtag:before{content:""}.ri-haze-2-fill:before{content:""}.ri-haze-2-line:before{content:""}.ri-haze-fill:before{content:""}.ri-haze-line:before{content:""}.ri-hd-fill:before{content:""}.ri-hd-line:before{content:""}.ri-heading:before{content:""}.ri-headphone-fill:before{content:""}.ri-headphone-line:before{content:""}.ri-health-book-fill:before{content:""}.ri-health-book-line:before{content:""}.ri-heart-2-fill:before{content:""}.ri-heart-2-line:before{content:""}.ri-heart-3-fill:before{content:""}.ri-heart-3-line:before{content:""}.ri-heart-add-fill:before{content:""}.ri-heart-add-line:before{content:""}.ri-heart-fill:before{content:""}.ri-heart-line:before{content:""}.ri-heart-pulse-fill:before{content:""}.ri-heart-pulse-line:before{content:""}.ri-hearts-fill:before{content:""}.ri-hearts-line:before{content:""}.ri-heavy-showers-fill:before{content:""}.ri-heavy-showers-line:before{content:""}.ri-history-fill:before{content:""}.ri-history-line:before{content:""}.ri-home-2-fill:before{content:""}.ri-home-2-line:before{content:""}.ri-home-3-fill:before{content:""}.ri-home-3-line:before{content:""}.ri-home-4-fill:before{content:""}.ri-home-4-line:before{content:""}.ri-home-5-fill:before{content:""}.ri-home-5-line:before{content:""}.ri-home-6-fill:before{content:""}.ri-home-6-line:before{content:""}.ri-home-7-fill:before{content:""}.ri-home-7-line:before{content:""}.ri-home-8-fill:before{content:""}.ri-home-8-line:before{content:""}.ri-home-fill:before{content:""}.ri-home-gear-fill:before{content:""}.ri-home-gear-line:before{content:""}.ri-home-heart-fill:before{content:""}.ri-home-heart-line:before{content:""}.ri-home-line:before{content:""}.ri-home-smile-2-fill:before{content:""}.ri-home-smile-2-line:before{content:""}.ri-home-smile-fill:before{content:""}.ri-home-smile-line:before{content:""}.ri-home-wifi-fill:before{content:""}.ri-home-wifi-line:before{content:""}.ri-honor-of-kings-fill:before{content:""}.ri-honor-of-kings-line:before{content:""}.ri-honour-fill:before{content:""}.ri-honour-line:before{content:""}.ri-hospital-fill:before{content:""}.ri-hospital-line:before{content:""}.ri-hotel-bed-fill:before{content:""}.ri-hotel-bed-line:before{content:""}.ri-hotel-fill:before{content:""}.ri-hotel-line:before{content:""}.ri-hotspot-fill:before{content:""}.ri-hotspot-line:before{content:""}.ri-hq-fill:before{content:""}.ri-hq-line:before{content:""}.ri-html5-fill:before{content:""}.ri-html5-line:before{content:""}.ri-ie-fill:before{content:""}.ri-ie-line:before{content:""}.ri-image-2-fill:before{content:""}.ri-image-2-line:before{content:""}.ri-image-add-fill:before{content:""}.ri-image-add-line:before{content:""}.ri-image-edit-fill:before{content:""}.ri-image-edit-line:before{content:""}.ri-image-fill:before{content:""}.ri-image-line:before{content:""}.ri-inbox-archive-fill:before{content:""}.ri-inbox-archive-line:before{content:""}.ri-inbox-fill:before{content:""}.ri-inbox-line:before{content:""}.ri-inbox-unarchive-fill:before{content:""}.ri-inbox-unarchive-line:before{content:""}.ri-increase-decrease-fill:before{content:""}.ri-increase-decrease-line:before{content:""}.ri-indent-decrease:before{content:""}.ri-indent-increase:before{content:""}.ri-indeterminate-circle-fill:before{content:""}.ri-indeterminate-circle-line:before{content:""}.ri-information-fill:before{content:""}.ri-information-line:before{content:""}.ri-infrared-thermometer-fill:before{content:""}.ri-infrared-thermometer-line:before{content:""}.ri-ink-bottle-fill:before{content:""}.ri-ink-bottle-line:before{content:""}.ri-input-cursor-move:before{content:""}.ri-input-method-fill:before{content:""}.ri-input-method-line:before{content:""}.ri-insert-column-left:before{content:""}.ri-insert-column-right:before{content:""}.ri-insert-row-bottom:before{content:""}.ri-insert-row-top:before{content:""}.ri-instagram-fill:before{content:""}.ri-instagram-line:before{content:""}.ri-install-fill:before{content:""}.ri-install-line:before{content:""}.ri-invision-fill:before{content:""}.ri-invision-line:before{content:""}.ri-italic:before{content:""}.ri-kakao-talk-fill:before{content:""}.ri-kakao-talk-line:before{content:""}.ri-key-2-fill:before{content:""}.ri-key-2-line:before{content:""}.ri-key-fill:before{content:""}.ri-key-line:before{content:""}.ri-keyboard-box-fill:before{content:""}.ri-keyboard-box-line:before{content:""}.ri-keyboard-fill:before{content:""}.ri-keyboard-line:before{content:""}.ri-keynote-fill:before{content:""}.ri-keynote-line:before{content:""}.ri-knife-blood-fill:before{content:""}.ri-knife-blood-line:before{content:""}.ri-knife-fill:before{content:""}.ri-knife-line:before{content:""}.ri-landscape-fill:before{content:""}.ri-landscape-line:before{content:""}.ri-layout-2-fill:before{content:""}.ri-layout-2-line:before{content:""}.ri-layout-3-fill:before{content:""}.ri-layout-3-line:before{content:""}.ri-layout-4-fill:before{content:""}.ri-layout-4-line:before{content:""}.ri-layout-5-fill:before{content:""}.ri-layout-5-line:before{content:""}.ri-layout-6-fill:before{content:""}.ri-layout-6-line:before{content:""}.ri-layout-bottom-2-fill:before{content:""}.ri-layout-bottom-2-line:before{content:""}.ri-layout-bottom-fill:before{content:""}.ri-layout-bottom-line:before{content:""}.ri-layout-column-fill:before{content:""}.ri-layout-column-line:before{content:""}.ri-layout-fill:before{content:""}.ri-layout-grid-fill:before{content:""}.ri-layout-grid-line:before{content:""}.ri-layout-left-2-fill:before{content:""}.ri-layout-left-2-line:before{content:""}.ri-layout-left-fill:before{content:""}.ri-layout-left-line:before{content:""}.ri-layout-line:before{content:""}.ri-layout-masonry-fill:before{content:""}.ri-layout-masonry-line:before{content:""}.ri-layout-right-2-fill:before{content:""}.ri-layout-right-2-line:before{content:""}.ri-layout-right-fill:before{content:""}.ri-layout-right-line:before{content:""}.ri-layout-row-fill:before{content:""}.ri-layout-row-line:before{content:""}.ri-layout-top-2-fill:before{content:""}.ri-layout-top-2-line:before{content:""}.ri-layout-top-fill:before{content:""}.ri-layout-top-line:before{content:""}.ri-leaf-fill:before{content:""}.ri-leaf-line:before{content:""}.ri-lifebuoy-fill:before{content:""}.ri-lifebuoy-line:before{content:""}.ri-lightbulb-fill:before{content:""}.ri-lightbulb-flash-fill:before{content:""}.ri-lightbulb-flash-line:before{content:""}.ri-lightbulb-line:before{content:""}.ri-line-chart-fill:before{content:""}.ri-line-chart-line:before{content:""}.ri-line-fill:before{content:""}.ri-line-height:before{content:""}.ri-line-line:before{content:""}.ri-link-m:before{content:""}.ri-link-unlink-m:before{content:""}.ri-link-unlink:before{content:""}.ri-link:before{content:""}.ri-linkedin-box-fill:before{content:""}.ri-linkedin-box-line:before{content:""}.ri-linkedin-fill:before{content:""}.ri-linkedin-line:before{content:""}.ri-links-fill:before{content:""}.ri-links-line:before{content:""}.ri-list-check-2:before{content:""}.ri-list-check:before{content:""}.ri-list-ordered:before{content:""}.ri-list-settings-fill:before{content:""}.ri-list-settings-line:before{content:""}.ri-list-unordered:before{content:""}.ri-live-fill:before{content:""}.ri-live-line:before{content:""}.ri-loader-2-fill:before{content:""}.ri-loader-2-line:before{content:""}.ri-loader-3-fill:before{content:""}.ri-loader-3-line:before{content:""}.ri-loader-4-fill:before{content:""}.ri-loader-4-line:before{content:""}.ri-loader-5-fill:before{content:""}.ri-loader-5-line:before{content:""}.ri-loader-fill:before{content:""}.ri-loader-line:before{content:""}.ri-lock-2-fill:before{content:""}.ri-lock-2-line:before{content:""}.ri-lock-fill:before{content:""}.ri-lock-line:before{content:""}.ri-lock-password-fill:before{content:""}.ri-lock-password-line:before{content:""}.ri-lock-unlock-fill:before{content:""}.ri-lock-unlock-line:before{content:""}.ri-login-box-fill:before{content:""}.ri-login-box-line:before{content:""}.ri-login-circle-fill:before{content:""}.ri-login-circle-line:before{content:""}.ri-logout-box-fill:before{content:""}.ri-logout-box-line:before{content:""}.ri-logout-box-r-fill:before{content:""}.ri-logout-box-r-line:before{content:""}.ri-logout-circle-fill:before{content:""}.ri-logout-circle-line:before{content:""}.ri-logout-circle-r-fill:before{content:""}.ri-logout-circle-r-line:before{content:""}.ri-luggage-cart-fill:before{content:""}.ri-luggage-cart-line:before{content:""}.ri-luggage-deposit-fill:before{content:""}.ri-luggage-deposit-line:before{content:""}.ri-lungs-fill:before{content:""}.ri-lungs-line:before{content:""}.ri-mac-fill:before{content:""}.ri-mac-line:before{content:""}.ri-macbook-fill:before{content:""}.ri-macbook-line:before{content:""}.ri-magic-fill:before{content:""}.ri-magic-line:before{content:""}.ri-mail-add-fill:before{content:""}.ri-mail-add-line:before{content:""}.ri-mail-check-fill:before{content:""}.ri-mail-check-line:before{content:""}.ri-mail-close-fill:before{content:""}.ri-mail-close-line:before{content:""}.ri-mail-download-fill:before{content:""}.ri-mail-download-line:before{content:""}.ri-mail-fill:before{content:""}.ri-mail-forbid-fill:before{content:""}.ri-mail-forbid-line:before{content:""}.ri-mail-line:before{content:""}.ri-mail-lock-fill:before{content:""}.ri-mail-lock-line:before{content:""}.ri-mail-open-fill:before{content:""}.ri-mail-open-line:before{content:""}.ri-mail-send-fill:before{content:""}.ri-mail-send-line:before{content:""}.ri-mail-settings-fill:before{content:""}.ri-mail-settings-line:before{content:""}.ri-mail-star-fill:before{content:""}.ri-mail-star-line:before{content:""}.ri-mail-unread-fill:before{content:""}.ri-mail-unread-line:before{content:""}.ri-mail-volume-fill:before{content:""}.ri-mail-volume-line:before{content:""}.ri-map-2-fill:before{content:""}.ri-map-2-line:before{content:""}.ri-map-fill:before{content:""}.ri-map-line:before{content:""}.ri-map-pin-2-fill:before{content:""}.ri-map-pin-2-line:before{content:""}.ri-map-pin-3-fill:before{content:""}.ri-map-pin-3-line:before{content:""}.ri-map-pin-4-fill:before{content:""}.ri-map-pin-4-line:before{content:""}.ri-map-pin-5-fill:before{content:""}.ri-map-pin-5-line:before{content:""}.ri-map-pin-add-fill:before{content:""}.ri-map-pin-add-line:before{content:""}.ri-map-pin-fill:before{content:""}.ri-map-pin-line:before{content:""}.ri-map-pin-range-fill:before{content:""}.ri-map-pin-range-line:before{content:""}.ri-map-pin-time-fill:before{content:""}.ri-map-pin-time-line:before{content:""}.ri-map-pin-user-fill:before{content:""}.ri-map-pin-user-line:before{content:""}.ri-mark-pen-fill:before{content:""}.ri-mark-pen-line:before{content:""}.ri-markdown-fill:before{content:""}.ri-markdown-line:before{content:""}.ri-markup-fill:before{content:""}.ri-markup-line:before{content:""}.ri-mastercard-fill:before{content:""}.ri-mastercard-line:before{content:""}.ri-mastodon-fill:before{content:""}.ri-mastodon-line:before{content:""}.ri-medal-2-fill:before{content:""}.ri-medal-2-line:before{content:""}.ri-medal-fill:before{content:""}.ri-medal-line:before{content:""}.ri-medicine-bottle-fill:before{content:""}.ri-medicine-bottle-line:before{content:""}.ri-medium-fill:before{content:""}.ri-medium-line:before{content:""}.ri-men-fill:before{content:""}.ri-men-line:before{content:""}.ri-mental-health-fill:before{content:""}.ri-mental-health-line:before{content:""}.ri-menu-2-fill:before{content:""}.ri-menu-2-line:before{content:""}.ri-menu-3-fill:before{content:""}.ri-menu-3-line:before{content:""}.ri-menu-4-fill:before{content:""}.ri-menu-4-line:before{content:""}.ri-menu-5-fill:before{content:""}.ri-menu-5-line:before{content:""}.ri-menu-add-fill:before{content:""}.ri-menu-add-line:before{content:""}.ri-menu-fill:before{content:""}.ri-menu-fold-fill:before{content:""}.ri-menu-fold-line:before{content:""}.ri-menu-line:before{content:""}.ri-menu-unfold-fill:before{content:""}.ri-menu-unfold-line:before{content:""}.ri-merge-cells-horizontal:before{content:""}.ri-merge-cells-vertical:before{content:""}.ri-message-2-fill:before{content:""}.ri-message-2-line:before{content:""}.ri-message-3-fill:before{content:""}.ri-message-3-line:before{content:""}.ri-message-fill:before{content:""}.ri-message-line:before{content:""}.ri-messenger-fill:before{content:""}.ri-messenger-line:before{content:""}.ri-meteor-fill:before{content:""}.ri-meteor-line:before{content:""}.ri-mic-2-fill:before{content:""}.ri-mic-2-line:before{content:""}.ri-mic-fill:before{content:""}.ri-mic-line:before{content:""}.ri-mic-off-fill:before{content:""}.ri-mic-off-line:before{content:""}.ri-mickey-fill:before{content:""}.ri-mickey-line:before{content:""}.ri-microscope-fill:before{content:""}.ri-microscope-line:before{content:""}.ri-microsoft-fill:before{content:""}.ri-microsoft-line:before{content:""}.ri-mind-map:before{content:""}.ri-mini-program-fill:before{content:""}.ri-mini-program-line:before{content:""}.ri-mist-fill:before{content:""}.ri-mist-line:before{content:""}.ri-money-cny-box-fill:before{content:""}.ri-money-cny-box-line:before{content:""}.ri-money-cny-circle-fill:before{content:""}.ri-money-cny-circle-line:before{content:""}.ri-money-dollar-box-fill:before{content:""}.ri-money-dollar-box-line:before{content:""}.ri-money-dollar-circle-fill:before{content:""}.ri-money-dollar-circle-line:before{content:""}.ri-money-euro-box-fill:before{content:""}.ri-money-euro-box-line:before{content:""}.ri-money-euro-circle-fill:before{content:""}.ri-money-euro-circle-line:before{content:""}.ri-money-pound-box-fill:before{content:""}.ri-money-pound-box-line:before{content:""}.ri-money-pound-circle-fill:before{content:""}.ri-money-pound-circle-line:before{content:""}.ri-moon-clear-fill:before{content:""}.ri-moon-clear-line:before{content:""}.ri-moon-cloudy-fill:before{content:""}.ri-moon-cloudy-line:before{content:""}.ri-moon-fill:before{content:""}.ri-moon-foggy-fill:before{content:""}.ri-moon-foggy-line:before{content:""}.ri-moon-line:before{content:""}.ri-more-2-fill:before{content:""}.ri-more-2-line:before{content:""}.ri-more-fill:before{content:""}.ri-more-line:before{content:""}.ri-motorbike-fill:before{content:""}.ri-motorbike-line:before{content:""}.ri-mouse-fill:before{content:""}.ri-mouse-line:before{content:""}.ri-movie-2-fill:before{content:""}.ri-movie-2-line:before{content:""}.ri-movie-fill:before{content:""}.ri-movie-line:before{content:""}.ri-music-2-fill:before{content:""}.ri-music-2-line:before{content:""}.ri-music-fill:before{content:""}.ri-music-line:before{content:""}.ri-mv-fill:before{content:""}.ri-mv-line:before{content:""}.ri-navigation-fill:before{content:""}.ri-navigation-line:before{content:""}.ri-netease-cloud-music-fill:before{content:""}.ri-netease-cloud-music-line:before{content:""}.ri-netflix-fill:before{content:""}.ri-netflix-line:before{content:""}.ri-newspaper-fill:before{content:""}.ri-newspaper-line:before{content:""}.ri-node-tree:before{content:""}.ri-notification-2-fill:before{content:""}.ri-notification-2-line:before{content:""}.ri-notification-3-fill:before{content:""}.ri-notification-3-line:before{content:""}.ri-notification-4-fill:before{content:""}.ri-notification-4-line:before{content:""}.ri-notification-badge-fill:before{content:""}.ri-notification-badge-line:before{content:""}.ri-notification-fill:before{content:""}.ri-notification-line:before{content:""}.ri-notification-off-fill:before{content:""}.ri-notification-off-line:before{content:""}.ri-npmjs-fill:before{content:""}.ri-npmjs-line:before{content:""}.ri-number-0:before{content:""}.ri-number-1:before{content:""}.ri-number-2:before{content:""}.ri-number-3:before{content:""}.ri-number-4:before{content:""}.ri-number-5:before{content:""}.ri-number-6:before{content:""}.ri-number-7:before{content:""}.ri-number-8:before{content:""}.ri-number-9:before{content:""}.ri-numbers-fill:before{content:""}.ri-numbers-line:before{content:""}.ri-nurse-fill:before{content:""}.ri-nurse-line:before{content:""}.ri-oil-fill:before{content:""}.ri-oil-line:before{content:""}.ri-omega:before{content:""}.ri-open-arm-fill:before{content:""}.ri-open-arm-line:before{content:""}.ri-open-source-fill:before{content:""}.ri-open-source-line:before{content:""}.ri-opera-fill:before{content:""}.ri-opera-line:before{content:""}.ri-order-play-fill:before{content:""}.ri-order-play-line:before{content:""}.ri-organization-chart:before{content:""}.ri-outlet-2-fill:before{content:""}.ri-outlet-2-line:before{content:""}.ri-outlet-fill:before{content:""}.ri-outlet-line:before{content:""}.ri-page-separator:before{content:""}.ri-pages-fill:before{content:""}.ri-pages-line:before{content:""}.ri-paint-brush-fill:before{content:""}.ri-paint-brush-line:before{content:""}.ri-paint-fill:before{content:""}.ri-paint-line:before{content:""}.ri-palette-fill:before{content:""}.ri-palette-line:before{content:""}.ri-pantone-fill:before{content:""}.ri-pantone-line:before{content:""}.ri-paragraph:before{content:""}.ri-parent-fill:before{content:""}.ri-parent-line:before{content:""}.ri-parentheses-fill:before{content:""}.ri-parentheses-line:before{content:""}.ri-parking-box-fill:before{content:""}.ri-parking-box-line:before{content:""}.ri-parking-fill:before{content:""}.ri-parking-line:before{content:""}.ri-passport-fill:before{content:""}.ri-passport-line:before{content:""}.ri-patreon-fill:before{content:""}.ri-patreon-line:before{content:""}.ri-pause-circle-fill:before{content:""}.ri-pause-circle-line:before{content:""}.ri-pause-fill:before{content:""}.ri-pause-line:before{content:""}.ri-pause-mini-fill:before{content:""}.ri-pause-mini-line:before{content:""}.ri-paypal-fill:before{content:""}.ri-paypal-line:before{content:""}.ri-pen-nib-fill:before{content:""}.ri-pen-nib-line:before{content:""}.ri-pencil-fill:before{content:""}.ri-pencil-line:before{content:""}.ri-pencil-ruler-2-fill:before{content:""}.ri-pencil-ruler-2-line:before{content:""}.ri-pencil-ruler-fill:before{content:""}.ri-pencil-ruler-line:before{content:""}.ri-percent-fill:before{content:""}.ri-percent-line:before{content:""}.ri-phone-camera-fill:before{content:""}.ri-phone-camera-line:before{content:""}.ri-phone-fill:before{content:""}.ri-phone-find-fill:before{content:""}.ri-phone-find-line:before{content:""}.ri-phone-line:before{content:""}.ri-phone-lock-fill:before{content:""}.ri-phone-lock-line:before{content:""}.ri-picture-in-picture-2-fill:before{content:""}.ri-picture-in-picture-2-line:before{content:""}.ri-picture-in-picture-exit-fill:before{content:""}.ri-picture-in-picture-exit-line:before{content:""}.ri-picture-in-picture-fill:before{content:""}.ri-picture-in-picture-line:before{content:""}.ri-pie-chart-2-fill:before{content:""}.ri-pie-chart-2-line:before{content:""}.ri-pie-chart-box-fill:before{content:""}.ri-pie-chart-box-line:before{content:""}.ri-pie-chart-fill:before{content:""}.ri-pie-chart-line:before{content:""}.ri-pin-distance-fill:before{content:""}.ri-pin-distance-line:before{content:""}.ri-ping-pong-fill:before{content:""}.ri-ping-pong-line:before{content:""}.ri-pinterest-fill:before{content:""}.ri-pinterest-line:before{content:""}.ri-pinyin-input:before{content:""}.ri-pixelfed-fill:before{content:""}.ri-pixelfed-line:before{content:""}.ri-plane-fill:before{content:""}.ri-plane-line:before{content:""}.ri-plant-fill:before{content:""}.ri-plant-line:before{content:""}.ri-play-circle-fill:before{content:""}.ri-play-circle-line:before{content:""}.ri-play-fill:before{content:""}.ri-play-line:before{content:""}.ri-play-list-2-fill:before{content:""}.ri-play-list-2-line:before{content:""}.ri-play-list-add-fill:before{content:""}.ri-play-list-add-line:before{content:""}.ri-play-list-fill:before{content:""}.ri-play-list-line:before{content:""}.ri-play-mini-fill:before{content:""}.ri-play-mini-line:before{content:""}.ri-playstation-fill:before{content:""}.ri-playstation-line:before{content:""}.ri-plug-2-fill:before{content:""}.ri-plug-2-line:before{content:""}.ri-plug-fill:before{content:""}.ri-plug-line:before{content:""}.ri-polaroid-2-fill:before{content:""}.ri-polaroid-2-line:before{content:""}.ri-polaroid-fill:before{content:""}.ri-polaroid-line:before{content:""}.ri-police-car-fill:before{content:""}.ri-police-car-line:before{content:""}.ri-price-tag-2-fill:before{content:""}.ri-price-tag-2-line:before{content:""}.ri-price-tag-3-fill:before{content:""}.ri-price-tag-3-line:before{content:""}.ri-price-tag-fill:before{content:""}.ri-price-tag-line:before{content:""}.ri-printer-cloud-fill:before{content:""}.ri-printer-cloud-line:before{content:""}.ri-printer-fill:before{content:""}.ri-printer-line:before{content:""}.ri-product-hunt-fill:before{content:""}.ri-product-hunt-line:before{content:""}.ri-profile-fill:before{content:""}.ri-profile-line:before{content:""}.ri-projector-2-fill:before{content:""}.ri-projector-2-line:before{content:""}.ri-projector-fill:before{content:""}.ri-projector-line:before{content:""}.ri-psychotherapy-fill:before{content:""}.ri-psychotherapy-line:before{content:""}.ri-pulse-fill:before{content:""}.ri-pulse-line:before{content:""}.ri-pushpin-2-fill:before{content:""}.ri-pushpin-2-line:before{content:""}.ri-pushpin-fill:before{content:""}.ri-pushpin-line:before{content:""}.ri-qq-fill:before{content:""}.ri-qq-line:before{content:""}.ri-qr-code-fill:before{content:""}.ri-qr-code-line:before{content:""}.ri-qr-scan-2-fill:before{content:""}.ri-qr-scan-2-line:before{content:""}.ri-qr-scan-fill:before{content:""}.ri-qr-scan-line:before{content:""}.ri-question-answer-fill:before{content:""}.ri-question-answer-line:before{content:""}.ri-question-fill:before{content:""}.ri-question-line:before{content:""}.ri-question-mark:before{content:""}.ri-questionnaire-fill:before{content:""}.ri-questionnaire-line:before{content:""}.ri-quill-pen-fill:before{content:""}.ri-quill-pen-line:before{content:""}.ri-radar-fill:before{content:""}.ri-radar-line:before{content:""}.ri-radio-2-fill:before{content:""}.ri-radio-2-line:before{content:""}.ri-radio-button-fill:before{content:""}.ri-radio-button-line:before{content:""}.ri-radio-fill:before{content:""}.ri-radio-line:before{content:""}.ri-rainbow-fill:before{content:""}.ri-rainbow-line:before{content:""}.ri-rainy-fill:before{content:""}.ri-rainy-line:before{content:""}.ri-reactjs-fill:before{content:""}.ri-reactjs-line:before{content:""}.ri-record-circle-fill:before{content:""}.ri-record-circle-line:before{content:""}.ri-record-mail-fill:before{content:""}.ri-record-mail-line:before{content:""}.ri-recycle-fill:before{content:""}.ri-recycle-line:before{content:""}.ri-red-packet-fill:before{content:""}.ri-red-packet-line:before{content:""}.ri-reddit-fill:before{content:""}.ri-reddit-line:before{content:""}.ri-refresh-fill:before{content:""}.ri-refresh-line:before{content:""}.ri-refund-2-fill:before{content:""}.ri-refund-2-line:before{content:""}.ri-refund-fill:before{content:""}.ri-refund-line:before{content:""}.ri-registered-fill:before{content:""}.ri-registered-line:before{content:""}.ri-remixicon-fill:before{content:""}.ri-remixicon-line:before{content:""}.ri-remote-control-2-fill:before{content:""}.ri-remote-control-2-line:before{content:""}.ri-remote-control-fill:before{content:""}.ri-remote-control-line:before{content:""}.ri-repeat-2-fill:before{content:""}.ri-repeat-2-line:before{content:""}.ri-repeat-fill:before{content:""}.ri-repeat-line:before{content:""}.ri-repeat-one-fill:before{content:""}.ri-repeat-one-line:before{content:""}.ri-reply-all-fill:before{content:""}.ri-reply-all-line:before{content:""}.ri-reply-fill:before{content:""}.ri-reply-line:before{content:""}.ri-reserved-fill:before{content:""}.ri-reserved-line:before{content:""}.ri-rest-time-fill:before{content:""}.ri-rest-time-line:before{content:""}.ri-restart-fill:before{content:""}.ri-restart-line:before{content:""}.ri-restaurant-2-fill:before{content:""}.ri-restaurant-2-line:before{content:""}.ri-restaurant-fill:before{content:""}.ri-restaurant-line:before{content:""}.ri-rewind-fill:before{content:""}.ri-rewind-line:before{content:""}.ri-rewind-mini-fill:before{content:""}.ri-rewind-mini-line:before{content:""}.ri-rhythm-fill:before{content:""}.ri-rhythm-line:before{content:""}.ri-riding-fill:before{content:""}.ri-riding-line:before{content:""}.ri-road-map-fill:before{content:""}.ri-road-map-line:before{content:""}.ri-roadster-fill:before{content:""}.ri-roadster-line:before{content:""}.ri-robot-fill:before{content:""}.ri-robot-line:before{content:""}.ri-rocket-2-fill:before{content:""}.ri-rocket-2-line:before{content:""}.ri-rocket-fill:before{content:""}.ri-rocket-line:before{content:""}.ri-rotate-lock-fill:before{content:""}.ri-rotate-lock-line:before{content:""}.ri-rounded-corner:before{content:""}.ri-route-fill:before{content:""}.ri-route-line:before{content:""}.ri-router-fill:before{content:""}.ri-router-line:before{content:""}.ri-rss-fill:before{content:""}.ri-rss-line:before{content:""}.ri-ruler-2-fill:before{content:""}.ri-ruler-2-line:before{content:""}.ri-ruler-fill:before{content:""}.ri-ruler-line:before{content:""}.ri-run-fill:before{content:""}.ri-run-line:before{content:""}.ri-safari-fill:before{content:""}.ri-safari-line:before{content:""}.ri-safe-2-fill:before{content:""}.ri-safe-2-line:before{content:""}.ri-safe-fill:before{content:""}.ri-safe-line:before{content:""}.ri-sailboat-fill:before{content:""}.ri-sailboat-line:before{content:""}.ri-save-2-fill:before{content:""}.ri-save-2-line:before{content:""}.ri-save-3-fill:before{content:""}.ri-save-3-line:before{content:""}.ri-save-fill:before{content:""}.ri-save-line:before{content:""}.ri-scales-2-fill:before{content:""}.ri-scales-2-line:before{content:""}.ri-scales-3-fill:before{content:""}.ri-scales-3-line:before{content:""}.ri-scales-fill:before{content:""}.ri-scales-line:before{content:""}.ri-scan-2-fill:before{content:""}.ri-scan-2-line:before{content:""}.ri-scan-fill:before{content:""}.ri-scan-line:before{content:""}.ri-scissors-2-fill:before{content:""}.ri-scissors-2-line:before{content:""}.ri-scissors-cut-fill:before{content:""}.ri-scissors-cut-line:before{content:""}.ri-scissors-fill:before{content:""}.ri-scissors-line:before{content:""}.ri-screenshot-2-fill:before{content:""}.ri-screenshot-2-line:before{content:""}.ri-screenshot-fill:before{content:""}.ri-screenshot-line:before{content:""}.ri-sd-card-fill:before{content:""}.ri-sd-card-line:before{content:""}.ri-sd-card-mini-fill:before{content:""}.ri-sd-card-mini-line:before{content:""}.ri-search-2-fill:before{content:""}.ri-search-2-line:before{content:""}.ri-search-eye-fill:before{content:""}.ri-search-eye-line:before{content:""}.ri-search-fill:before{content:""}.ri-search-line:before{content:""}.ri-secure-payment-fill:before{content:""}.ri-secure-payment-line:before{content:""}.ri-seedling-fill:before{content:""}.ri-seedling-line:before{content:""}.ri-send-backward:before{content:""}.ri-send-plane-2-fill:before{content:""}.ri-send-plane-2-line:before{content:""}.ri-send-plane-fill:before{content:""}.ri-send-plane-line:before{content:""}.ri-send-to-back:before{content:""}.ri-sensor-fill:before{content:""}.ri-sensor-line:before{content:""}.ri-separator:before{content:""}.ri-server-fill:before{content:""}.ri-server-line:before{content:""}.ri-service-fill:before{content:""}.ri-service-line:before{content:""}.ri-settings-2-fill:before{content:""}.ri-settings-2-line:before{content:""}.ri-settings-3-fill:before{content:""}.ri-settings-3-line:before{content:""}.ri-settings-4-fill:before{content:""}.ri-settings-4-line:before{content:""}.ri-settings-5-fill:before{content:""}.ri-settings-5-line:before{content:""}.ri-settings-6-fill:before{content:""}.ri-settings-6-line:before{content:""}.ri-settings-fill:before{content:""}.ri-settings-line:before{content:""}.ri-shape-2-fill:before{content:""}.ri-shape-2-line:before{content:""}.ri-shape-fill:before{content:""}.ri-shape-line:before{content:""}.ri-share-box-fill:before{content:""}.ri-share-box-line:before{content:""}.ri-share-circle-fill:before{content:""}.ri-share-circle-line:before{content:""}.ri-share-fill:before{content:""}.ri-share-forward-2-fill:before{content:""}.ri-share-forward-2-line:before{content:""}.ri-share-forward-box-fill:before{content:""}.ri-share-forward-box-line:before{content:""}.ri-share-forward-fill:before{content:""}.ri-share-forward-line:before{content:""}.ri-share-line:before{content:""}.ri-shield-check-fill:before{content:""}.ri-shield-check-line:before{content:""}.ri-shield-cross-fill:before{content:""}.ri-shield-cross-line:before{content:""}.ri-shield-fill:before{content:""}.ri-shield-flash-fill:before{content:""}.ri-shield-flash-line:before{content:""}.ri-shield-keyhole-fill:before{content:""}.ri-shield-keyhole-line:before{content:""}.ri-shield-line:before{content:""}.ri-shield-star-fill:before{content:""}.ri-shield-star-line:before{content:""}.ri-shield-user-fill:before{content:""}.ri-shield-user-line:before{content:""}.ri-ship-2-fill:before{content:""}.ri-ship-2-line:before{content:""}.ri-ship-fill:before{content:""}.ri-ship-line:before{content:""}.ri-shirt-fill:before{content:""}.ri-shirt-line:before{content:""}.ri-shopping-bag-2-fill:before{content:""}.ri-shopping-bag-2-line:before{content:""}.ri-shopping-bag-3-fill:before{content:""}.ri-shopping-bag-3-line:before{content:""}.ri-shopping-bag-fill:before{content:""}.ri-shopping-bag-line:before{content:""}.ri-shopping-basket-2-fill:before{content:""}.ri-shopping-basket-2-line:before{content:""}.ri-shopping-basket-fill:before{content:""}.ri-shopping-basket-line:before{content:""}.ri-shopping-cart-2-fill:before{content:""}.ri-shopping-cart-2-line:before{content:""}.ri-shopping-cart-fill:before{content:""}.ri-shopping-cart-line:before{content:""}.ri-showers-fill:before{content:""}.ri-showers-line:before{content:""}.ri-shuffle-fill:before{content:""}.ri-shuffle-line:before{content:""}.ri-shut-down-fill:before{content:""}.ri-shut-down-line:before{content:""}.ri-side-bar-fill:before{content:""}.ri-side-bar-line:before{content:""}.ri-signal-tower-fill:before{content:""}.ri-signal-tower-line:before{content:""}.ri-signal-wifi-1-fill:before{content:""}.ri-signal-wifi-1-line:before{content:""}.ri-signal-wifi-2-fill:before{content:""}.ri-signal-wifi-2-line:before{content:""}.ri-signal-wifi-3-fill:before{content:""}.ri-signal-wifi-3-line:before{content:""}.ri-signal-wifi-error-fill:before{content:""}.ri-signal-wifi-error-line:before{content:""}.ri-signal-wifi-fill:before{content:""}.ri-signal-wifi-line:before{content:""}.ri-signal-wifi-off-fill:before{content:""}.ri-signal-wifi-off-line:before{content:""}.ri-sim-card-2-fill:before{content:""}.ri-sim-card-2-line:before{content:""}.ri-sim-card-fill:before{content:""}.ri-sim-card-line:before{content:""}.ri-single-quotes-l:before{content:""}.ri-single-quotes-r:before{content:""}.ri-sip-fill:before{content:""}.ri-sip-line:before{content:""}.ri-skip-back-fill:before{content:""}.ri-skip-back-line:before{content:""}.ri-skip-back-mini-fill:before{content:""}.ri-skip-back-mini-line:before{content:""}.ri-skip-forward-fill:before{content:""}.ri-skip-forward-line:before{content:""}.ri-skip-forward-mini-fill:before{content:""}.ri-skip-forward-mini-line:before{content:""}.ri-skull-2-fill:before{content:""}.ri-skull-2-line:before{content:""}.ri-skull-fill:before{content:""}.ri-skull-line:before{content:""}.ri-skype-fill:before{content:""}.ri-skype-line:before{content:""}.ri-slack-fill:before{content:""}.ri-slack-line:before{content:""}.ri-slice-fill:before{content:""}.ri-slice-line:before{content:""}.ri-slideshow-2-fill:before{content:""}.ri-slideshow-2-line:before{content:""}.ri-slideshow-3-fill:before{content:""}.ri-slideshow-3-line:before{content:""}.ri-slideshow-4-fill:before{content:""}.ri-slideshow-4-line:before{content:""}.ri-slideshow-fill:before{content:""}.ri-slideshow-line:before{content:""}.ri-smartphone-fill:before{content:""}.ri-smartphone-line:before{content:""}.ri-snapchat-fill:before{content:""}.ri-snapchat-line:before{content:""}.ri-snowy-fill:before{content:""}.ri-snowy-line:before{content:""}.ri-sort-asc:before{content:""}.ri-sort-desc:before{content:""}.ri-sound-module-fill:before{content:""}.ri-sound-module-line:before{content:""}.ri-soundcloud-fill:before{content:""}.ri-soundcloud-line:before{content:""}.ri-space-ship-fill:before{content:""}.ri-space-ship-line:before{content:""}.ri-space:before{content:""}.ri-spam-2-fill:before{content:""}.ri-spam-2-line:before{content:""}.ri-spam-3-fill:before{content:""}.ri-spam-3-line:before{content:""}.ri-spam-fill:before{content:""}.ri-spam-line:before{content:""}.ri-speaker-2-fill:before{content:""}.ri-speaker-2-line:before{content:""}.ri-speaker-3-fill:before{content:""}.ri-speaker-3-line:before{content:""}.ri-speaker-fill:before{content:""}.ri-speaker-line:before{content:""}.ri-spectrum-fill:before{content:""}.ri-spectrum-line:before{content:""}.ri-speed-fill:before{content:""}.ri-speed-line:before{content:""}.ri-speed-mini-fill:before{content:""}.ri-speed-mini-line:before{content:""}.ri-split-cells-horizontal:before{content:""}.ri-split-cells-vertical:before{content:""}.ri-spotify-fill:before{content:""}.ri-spotify-line:before{content:""}.ri-spy-fill:before{content:""}.ri-spy-line:before{content:""}.ri-stack-fill:before{content:""}.ri-stack-line:before{content:""}.ri-stack-overflow-fill:before{content:""}.ri-stack-overflow-line:before{content:""}.ri-stackshare-fill:before{content:""}.ri-stackshare-line:before{content:""}.ri-star-fill:before{content:""}.ri-star-half-fill:before{content:""}.ri-star-half-line:before{content:""}.ri-star-half-s-fill:before{content:""}.ri-star-half-s-line:before{content:""}.ri-star-line:before{content:""}.ri-star-s-fill:before{content:""}.ri-star-s-line:before{content:""}.ri-star-smile-fill:before{content:""}.ri-star-smile-line:before{content:""}.ri-steam-fill:before{content:""}.ri-steam-line:before{content:""}.ri-steering-2-fill:before{content:""}.ri-steering-2-line:before{content:""}.ri-steering-fill:before{content:""}.ri-steering-line:before{content:""}.ri-stethoscope-fill:before{content:""}.ri-stethoscope-line:before{content:""}.ri-sticky-note-2-fill:before{content:""}.ri-sticky-note-2-line:before{content:""}.ri-sticky-note-fill:before{content:""}.ri-sticky-note-line:before{content:""}.ri-stock-fill:before{content:""}.ri-stock-line:before{content:""}.ri-stop-circle-fill:before{content:""}.ri-stop-circle-line:before{content:""}.ri-stop-fill:before{content:""}.ri-stop-line:before{content:""}.ri-stop-mini-fill:before{content:""}.ri-stop-mini-line:before{content:""}.ri-store-2-fill:before{content:""}.ri-store-2-line:before{content:""}.ri-store-3-fill:before{content:""}.ri-store-3-line:before{content:""}.ri-store-fill:before{content:""}.ri-store-line:before{content:""}.ri-strikethrough-2:before{content:""}.ri-strikethrough:before{content:""}.ri-subscript-2:before{content:""}.ri-subscript:before{content:""}.ri-subtract-fill:before{content:""}.ri-subtract-line:before{content:""}.ri-subway-fill:before{content:""}.ri-subway-line:before{content:""}.ri-subway-wifi-fill:before{content:""}.ri-subway-wifi-line:before{content:""}.ri-suitcase-2-fill:before{content:""}.ri-suitcase-2-line:before{content:""}.ri-suitcase-3-fill:before{content:""}.ri-suitcase-3-line:before{content:""}.ri-suitcase-fill:before{content:""}.ri-suitcase-line:before{content:""}.ri-sun-cloudy-fill:before{content:""}.ri-sun-cloudy-line:before{content:""}.ri-sun-fill:before{content:""}.ri-sun-foggy-fill:before{content:""}.ri-sun-foggy-line:before{content:""}.ri-sun-line:before{content:""}.ri-superscript-2:before{content:""}.ri-superscript:before{content:""}.ri-surgical-mask-fill:before{content:""}.ri-surgical-mask-line:before{content:""}.ri-surround-sound-fill:before{content:""}.ri-surround-sound-line:before{content:""}.ri-survey-fill:before{content:""}.ri-survey-line:before{content:""}.ri-swap-box-fill:before{content:""}.ri-swap-box-line:before{content:""}.ri-swap-fill:before{content:""}.ri-swap-line:before{content:""}.ri-switch-fill:before{content:""}.ri-switch-line:before{content:""}.ri-sword-fill:before{content:""}.ri-sword-line:before{content:""}.ri-syringe-fill:before{content:""}.ri-syringe-line:before{content:""}.ri-t-box-fill:before{content:""}.ri-t-box-line:before{content:""}.ri-t-shirt-2-fill:before{content:""}.ri-t-shirt-2-line:before{content:""}.ri-t-shirt-air-fill:before{content:""}.ri-t-shirt-air-line:before{content:""}.ri-t-shirt-fill:before{content:""}.ri-t-shirt-line:before{content:""}.ri-table-2:before{content:""}.ri-table-alt-fill:before{content:""}.ri-table-alt-line:before{content:""}.ri-table-fill:before{content:""}.ri-table-line:before{content:""}.ri-tablet-fill:before{content:""}.ri-tablet-line:before{content:""}.ri-takeaway-fill:before{content:""}.ri-takeaway-line:before{content:""}.ri-taobao-fill:before{content:""}.ri-taobao-line:before{content:""}.ri-tape-fill:before{content:""}.ri-tape-line:before{content:""}.ri-task-fill:before{content:""}.ri-task-line:before{content:""}.ri-taxi-fill:before{content:""}.ri-taxi-line:before{content:""}.ri-taxi-wifi-fill:before{content:""}.ri-taxi-wifi-line:before{content:""}.ri-team-fill:before{content:""}.ri-team-line:before{content:""}.ri-telegram-fill:before{content:""}.ri-telegram-line:before{content:""}.ri-temp-cold-fill:before{content:""}.ri-temp-cold-line:before{content:""}.ri-temp-hot-fill:before{content:""}.ri-temp-hot-line:before{content:""}.ri-terminal-box-fill:before{content:""}.ri-terminal-box-line:before{content:""}.ri-terminal-fill:before{content:""}.ri-terminal-line:before{content:""}.ri-terminal-window-fill:before{content:""}.ri-terminal-window-line:before{content:""}.ri-test-tube-fill:before{content:""}.ri-test-tube-line:before{content:""}.ri-text-direction-l:before{content:""}.ri-text-direction-r:before{content:""}.ri-text-spacing:before{content:""}.ri-text-wrap:before{content:""}.ri-text:before{content:""}.ri-thermometer-fill:before{content:""}.ri-thermometer-line:before{content:""}.ri-thumb-down-fill:before{content:""}.ri-thumb-down-line:before{content:""}.ri-thumb-up-fill:before{content:""}.ri-thumb-up-line:before{content:""}.ri-thunderstorms-fill:before{content:""}.ri-thunderstorms-line:before{content:""}.ri-ticket-2-fill:before{content:""}.ri-ticket-2-line:before{content:""}.ri-ticket-fill:before{content:""}.ri-ticket-line:before{content:""}.ri-time-fill:before{content:""}.ri-time-line:before{content:""}.ri-timer-2-fill:before{content:""}.ri-timer-2-line:before{content:""}.ri-timer-fill:before{content:""}.ri-timer-flash-fill:before{content:""}.ri-timer-flash-line:before{content:""}.ri-timer-line:before{content:""}.ri-todo-fill:before{content:""}.ri-todo-line:before{content:""}.ri-toggle-fill:before{content:""}.ri-toggle-line:before{content:""}.ri-tools-fill:before{content:""}.ri-tools-line:before{content:""}.ri-tornado-fill:before{content:""}.ri-tornado-line:before{content:""}.ri-trademark-fill:before{content:""}.ri-trademark-line:before{content:""}.ri-traffic-light-fill:before{content:""}.ri-traffic-light-line:before{content:""}.ri-train-fill:before{content:""}.ri-train-line:before{content:""}.ri-train-wifi-fill:before{content:""}.ri-train-wifi-line:before{content:""}.ri-translate-2:before{content:""}.ri-translate:before{content:""}.ri-travesti-fill:before{content:""}.ri-travesti-line:before{content:""}.ri-treasure-map-fill:before{content:""}.ri-treasure-map-line:before{content:""}.ri-trello-fill:before{content:""}.ri-trello-line:before{content:""}.ri-trophy-fill:before{content:""}.ri-trophy-line:before{content:""}.ri-truck-fill:before{content:""}.ri-truck-line:before{content:""}.ri-tumblr-fill:before{content:""}.ri-tumblr-line:before{content:""}.ri-tv-2-fill:before{content:""}.ri-tv-2-line:before{content:""}.ri-tv-fill:before{content:""}.ri-tv-line:before{content:""}.ri-twitch-fill:before{content:""}.ri-twitch-line:before{content:""}.ri-twitter-fill:before{content:""}.ri-twitter-line:before{content:""}.ri-typhoon-fill:before{content:""}.ri-typhoon-line:before{content:""}.ri-u-disk-fill:before{content:""}.ri-u-disk-line:before{content:""}.ri-ubuntu-fill:before{content:""}.ri-ubuntu-line:before{content:""}.ri-umbrella-fill:before{content:""}.ri-umbrella-line:before{content:""}.ri-underline:before{content:""}.ri-uninstall-fill:before{content:""}.ri-uninstall-line:before{content:""}.ri-unsplash-fill:before{content:""}.ri-unsplash-line:before{content:""}.ri-upload-2-fill:before{content:""}.ri-upload-2-line:before{content:""}.ri-upload-cloud-2-fill:before{content:""}.ri-upload-cloud-2-line:before{content:""}.ri-upload-cloud-fill:before{content:""}.ri-upload-cloud-line:before{content:""}.ri-upload-fill:before{content:""}.ri-upload-line:before{content:""}.ri-usb-fill:before{content:""}.ri-usb-line:before{content:""}.ri-user-2-fill:before{content:""}.ri-user-2-line:before{content:""}.ri-user-3-fill:before{content:""}.ri-user-3-line:before{content:""}.ri-user-4-fill:before{content:""}.ri-user-4-line:before{content:""}.ri-user-5-fill:before{content:""}.ri-user-5-line:before{content:""}.ri-user-6-fill:before{content:""}.ri-user-6-line:before{content:""}.ri-user-add-fill:before{content:""}.ri-user-add-line:before{content:""}.ri-user-fill:before{content:""}.ri-user-follow-fill:before{content:""}.ri-user-follow-line:before{content:""}.ri-user-heart-fill:before{content:""}.ri-user-heart-line:before{content:""}.ri-user-line:before{content:""}.ri-user-location-fill:before{content:""}.ri-user-location-line:before{content:""}.ri-user-received-2-fill:before{content:""}.ri-user-received-2-line:before{content:""}.ri-user-received-fill:before{content:""}.ri-user-received-line:before{content:""}.ri-user-search-fill:before{content:""}.ri-user-search-line:before{content:""}.ri-user-settings-fill:before{content:""}.ri-user-settings-line:before{content:""}.ri-user-shared-2-fill:before{content:""}.ri-user-shared-2-line:before{content:""}.ri-user-shared-fill:before{content:""}.ri-user-shared-line:before{content:""}.ri-user-smile-fill:before{content:""}.ri-user-smile-line:before{content:""}.ri-user-star-fill:before{content:""}.ri-user-star-line:before{content:""}.ri-user-unfollow-fill:before{content:""}.ri-user-unfollow-line:before{content:""}.ri-user-voice-fill:before{content:""}.ri-user-voice-line:before{content:""}.ri-video-add-fill:before{content:""}.ri-video-add-line:before{content:""}.ri-video-chat-fill:before{content:""}.ri-video-chat-line:before{content:""}.ri-video-download-fill:before{content:""}.ri-video-download-line:before{content:""}.ri-video-fill:before{content:""}.ri-video-line:before{content:""}.ri-video-upload-fill:before{content:""}.ri-video-upload-line:before{content:""}.ri-vidicon-2-fill:before{content:""}.ri-vidicon-2-line:before{content:""}.ri-vidicon-fill:before{content:""}.ri-vidicon-line:before{content:""}.ri-vimeo-fill:before{content:""}.ri-vimeo-line:before{content:""}.ri-vip-crown-2-fill:before{content:""}.ri-vip-crown-2-line:before{content:""}.ri-vip-crown-fill:before{content:""}.ri-vip-crown-line:before{content:""}.ri-vip-diamond-fill:before{content:""}.ri-vip-diamond-line:before{content:""}.ri-vip-fill:before{content:""}.ri-vip-line:before{content:""}.ri-virus-fill:before{content:""}.ri-virus-line:before{content:""}.ri-visa-fill:before{content:""}.ri-visa-line:before{content:""}.ri-voice-recognition-fill:before{content:""}.ri-voice-recognition-line:before{content:""}.ri-voiceprint-fill:before{content:""}.ri-voiceprint-line:before{content:""}.ri-volume-down-fill:before{content:""}.ri-volume-down-line:before{content:""}.ri-volume-mute-fill:before{content:""}.ri-volume-mute-line:before{content:""}.ri-volume-off-vibrate-fill:before{content:""}.ri-volume-off-vibrate-line:before{content:""}.ri-volume-up-fill:before{content:""}.ri-volume-up-line:before{content:""}.ri-volume-vibrate-fill:before{content:""}.ri-volume-vibrate-line:before{content:""}.ri-vuejs-fill:before{content:""}.ri-vuejs-line:before{content:""}.ri-walk-fill:before{content:""}.ri-walk-line:before{content:""}.ri-wallet-2-fill:before{content:""}.ri-wallet-2-line:before{content:""}.ri-wallet-3-fill:before{content:""}.ri-wallet-3-line:before{content:""}.ri-wallet-fill:before{content:""}.ri-wallet-line:before{content:""}.ri-water-flash-fill:before{content:""}.ri-water-flash-line:before{content:""}.ri-webcam-fill:before{content:""}.ri-webcam-line:before{content:""}.ri-wechat-2-fill:before{content:""}.ri-wechat-2-line:before{content:""}.ri-wechat-fill:before{content:""}.ri-wechat-line:before{content:""}.ri-wechat-pay-fill:before{content:""}.ri-wechat-pay-line:before{content:""}.ri-weibo-fill:before{content:""}.ri-weibo-line:before{content:""}.ri-whatsapp-fill:before{content:""}.ri-whatsapp-line:before{content:""}.ri-wheelchair-fill:before{content:""}.ri-wheelchair-line:before{content:""}.ri-wifi-fill:before{content:""}.ri-wifi-line:before{content:""}.ri-wifi-off-fill:before{content:""}.ri-wifi-off-line:before{content:""}.ri-window-2-fill:before{content:""}.ri-window-2-line:before{content:""}.ri-window-fill:before{content:""}.ri-window-line:before{content:""}.ri-windows-fill:before{content:""}.ri-windows-line:before{content:""}.ri-windy-fill:before{content:""}.ri-windy-line:before{content:""}.ri-wireless-charging-fill:before{content:""}.ri-wireless-charging-line:before{content:""}.ri-women-fill:before{content:""}.ri-women-line:before{content:""}.ri-wubi-input:before{content:""}.ri-xbox-fill:before{content:""}.ri-xbox-line:before{content:""}.ri-xing-fill:before{content:""}.ri-xing-line:before{content:""}.ri-youtube-fill:before{content:""}.ri-youtube-line:before{content:""}.ri-zcool-fill:before{content:""}.ri-zcool-line:before{content:""}.ri-zhihu-fill:before{content:""}.ri-zhihu-line:before{content:""}.ri-zoom-in-fill:before{content:""}.ri-zoom-in-line:before{content:""}.ri-zoom-out-fill:before{content:""}.ri-zoom-out-line:before{content:""}.ri-zzz-fill:before{content:""}.ri-zzz-line:before{content:""}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes expand{0%{transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shine{to{background-position-x:-200%}}@keyframes loaderShow{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes entranceLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceRight{0%{opacity:0;transform:translate(5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceTop{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes entranceBottom{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media screen and (min-width: 550px){::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}::-webkit-scrollbar-thumb{background-color:var(--baseAlt2Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt3Color)}html{scrollbar-color:var(--baseAlt2Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}html *{scrollbar-width:inherit}}:focus-visible{outline-color:var(--primaryColor);outline-style:solid}html,body{line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);font-size:var(--baseFontSize);color:var(--txtPrimaryColor);background:var(--bodyColor)}#app{overflow:auto;display:block;width:100%;height:100vh}.schema-field,.flatpickr-inline-container,.accordion .accordion-content,.accordion,.tabs,.tabs-content,.select .txt-missing,.form-field .form-field-block,.list,.skeleton-loader,.clearfix,.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel,.block,.code-block,blockquote,p{display:block;width:100%}h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6{margin:0;font-weight:400}h1{font-size:22px;line-height:28px}h2,.breadcrumbs .breadcrumb-item{font-size:20px;line-height:26px}h3{font-size:19px;line-height:24px}h4{font-size:18px;line-height:24px}h5{font-size:17px;line-height:24px}h6{font-size:16px;line-height:22px}em{font-style:italic}ins{color:var(--txtPrimaryColor);background:var(--successAltColor);text-decoration:none}del{color:var(--txtPrimaryColor);background:var(--dangerAltColor);text-decoration:none}strong{font-weight:600}small{font-size:var(--smFontSize);line-height:var(--smLineHeight)}sub,sup{position:relative;font-size:.75em;line-height:1}sup{vertical-align:top}sub{vertical-align:bottom}p{margin:5px 0}blockquote{position:relative;padding-left:var(--smSpacing);font-style:italic;color:var(--txtHintColor)}blockquote:before{content:"";position:absolute;top:0;left:0;width:2px;height:100%;background:var(--baseColor)}code{display:inline-block;font-family:var(--monospaceFontFamily);font-style:normal;font-size:1em;line-height:1.379rem;padding:0 4px;white-space:nowrap;color:var(--txtPrimaryColor);background:var(--baseAlt2Color);border-radius:var(--baseRadius)}.code-block{overflow:auto;padding:var(--xsSpacing);white-space:pre-wrap;background:var(--baseAlt1Color)}ol,ul{margin:10px 0;list-style:decimal;padding-left:var(--baseSpacing)}ol li,ul li{margin-top:5px;margin-bottom:5px}ul{list-style:disc}img{max-width:100%;vertical-align:top}hr{display:block;border:0;height:1px;width:100%;background:var(--baseAlt1Color);margin:var(--baseSpacing) 0}hr.dark{background:var(--baseAlt2Color)}a{color:inherit}a:hover{text-decoration:none}a i,a .txt{display:inline-block;vertical-align:top}.txt-mono{font-family:var(--monospaceFontFamily)}.txt-nowrap{white-space:nowrap}.txt-ellipsis{display:inline-block;vertical-align:top;flex-shrink:1;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.txt-base{font-size:var(--baseFontSize)!important}.txt-xs{font-size:var(--xsFontSize)!important;line-height:var(--smLineHeight)}.txt-sm{font-size:var(--smFontSize)!important;line-height:var(--smLineHeight)}.txt-lg{font-size:var(--lgFontSize)!important}.txt-xl{font-size:var(--xlFontSize)!important}.txt-bold{font-weight:600!important}.txt-strikethrough{text-decoration:line-through!important}.txt-break{white-space:pre-wrap!important}.txt-center{text-align:center!important}.txt-justify{text-align:justify!important}.txt-left{text-align:left!important}.txt-right{text-align:right!important}.txt-main{color:var(--txtPrimaryColor)!important}.txt-hint{color:var(--txtHintColor)!important}.txt-disabled{color:var(--txtDisabledColor)!important}.link-hint{user-select:none;cursor:pointer;color:var(--txtHintColor)!important;text-decoration:none;transition:color var(--baseAnimationSpeed)}.link-hint:hover,.link-hint:focus-visible,.link-hint:active{color:var(--txtPrimaryColor)!important}.link-fade{opacity:1;user-select:none;cursor:pointer;text-decoration:none;color:var(--txtPrimaryColor);transition:opacity var(--baseAnimationSpeed)}.link-fade:focus-visible,.link-fade:hover,.link-fade:active{opacity:.8}.txt-primary{color:var(--primaryColor)!important}.bg-primary{background:var(--primaryColor)!important}.link-primary{cursor:pointer;color:var(--primaryColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-primary:focus-visible,.link-primary:hover,.link-primary:active{opacity:.8}.txt-info{color:var(--infoColor)!important}.bg-info{background:var(--infoColor)!important}.link-info{cursor:pointer;color:var(--infoColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info:focus-visible,.link-info:hover,.link-info:active{opacity:.8}.txt-info-alt{color:var(--infoAltColor)!important}.bg-info-alt{background:var(--infoAltColor)!important}.link-info-alt{cursor:pointer;color:var(--infoAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info-alt:focus-visible,.link-info-alt:hover,.link-info-alt:active{opacity:.8}.txt-success{color:var(--successColor)!important}.bg-success{background:var(--successColor)!important}.link-success{cursor:pointer;color:var(--successColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success:focus-visible,.link-success:hover,.link-success:active{opacity:.8}.txt-success-alt{color:var(--successAltColor)!important}.bg-success-alt{background:var(--successAltColor)!important}.link-success-alt{cursor:pointer;color:var(--successAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success-alt:focus-visible,.link-success-alt:hover,.link-success-alt:active{opacity:.8}.txt-danger{color:var(--dangerColor)!important}.bg-danger{background:var(--dangerColor)!important}.link-danger{cursor:pointer;color:var(--dangerColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger:focus-visible,.link-danger:hover,.link-danger:active{opacity:.8}.txt-danger-alt{color:var(--dangerAltColor)!important}.bg-danger-alt{background:var(--dangerAltColor)!important}.link-danger-alt{cursor:pointer;color:var(--dangerAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger-alt:focus-visible,.link-danger-alt:hover,.link-danger-alt:active{opacity:.8}.txt-warning{color:var(--warningColor)!important}.bg-warning{background:var(--warningColor)!important}.link-warning{cursor:pointer;color:var(--warningColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning:focus-visible,.link-warning:hover,.link-warning:active{opacity:.8}.txt-warning-alt{color:var(--warningAltColor)!important}.bg-warning-alt{background:var(--warningAltColor)!important}.link-warning-alt{cursor:pointer;color:var(--warningAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning-alt:focus-visible,.link-warning-alt:hover,.link-warning-alt:active{opacity:.8}.fade{opacity:.6}a.fade,.btn.fade,[tabindex].fade,[class*=link-].fade,.handle.fade{transition:all var(--baseAnimationSpeed)}a.fade:hover,.btn.fade:hover,[tabindex].fade:hover,[class*=link-].fade:hover,.handle.fade:hover{opacity:1}.noborder{border:0px!important}.hidden{display:none!important}.hidden-empty:empty{display:none!important}.no-pointer-events{pointer-events:none}.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel{min-width:0}.content>:first-child,.form-field .help-block>:first-child,.overlay-panel .panel-content>:first-child,.sub-panel>:first-child,.panel>:first-child{margin-top:0}.content>:last-child,.form-field .help-block>:last-child,.overlay-panel .panel-content>:last-child,.sub-panel>:last-child,.panel>:last-child{margin-bottom:0}.panel{background:var(--baseColor);border-radius:var(--lgRadius);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);box-shadow:0 2px 5px 0 var(--shadowColor)}.sub-panel{background:var(--baseColor);border-radius:var(--baseRadius);padding:calc(var(--smSpacing) - 5px) var(--smSpacing);border:1px solid var(--baseAlt1Color)}.shadowize{box-shadow:0 2px 5px 0 var(--shadowColor)}.clearfix{clear:both}.clearfix:after{content:"";display:table;clear:both}.flex{position:relative;display:flex;align-items:center;width:100%;min-width:0;gap:var(--smSpacing)}.flex-fill{flex:1 1 auto!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.inline-flex{position:relative;display:inline-flex;vertical-align:top;align-items:center;flex-wrap:wrap;min-width:0;gap:10px}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-gap-base{gap:var(--baseSpacing)!important}.flex-gap-xs{gap:var(--xsSpacing)!important}.flex-gap-sm{gap:var(--smSpacing)!important}.flex-gap-lg{gap:var(--lgSpacing)!important}.flex-gap-xl{gap:var(--xlSpacing)!important}.flex-gap-0{gap:0px!important}.flex-gap-5{gap:5px!important}.flex-gap-10{gap:10px!important}.flex-gap-15{gap:15px!important}.flex-gap-20{gap:20px!important}.flex-gap-25{gap:25px!important}.flex-gap-30{gap:30px!important}.flex-gap-35{gap:35px!important}.flex-gap-40{gap:40px!important}.flex-gap-45{gap:45px!important}.flex-gap-50{gap:50px!important}.flex-gap-55{gap:55px!important}.flex-gap-60{gap:60px!important}.m-base{margin:var(--baseSpacing)!important}.p-base{padding:var(--baseSpacing)!important}.m-xs{margin:var(--xsSpacing)!important}.p-xs{padding:var(--xsSpacing)!important}.m-sm{margin:var(--smSpacing)!important}.p-sm{padding:var(--smSpacing)!important}.m-lg{margin:var(--lgSpacing)!important}.p-lg{padding:var(--lgSpacing)!important}.m-xl{margin:var(--xlSpacing)!important}.p-xl{padding:var(--xlSpacing)!important}.m-t-auto{margin-top:auto!important}.p-t-auto{padding-top:auto!important}.m-t-base{margin-top:var(--baseSpacing)!important}.p-t-base{padding-top:var(--baseSpacing)!important}.m-t-xs{margin-top:var(--xsSpacing)!important}.p-t-xs{padding-top:var(--xsSpacing)!important}.m-t-sm{margin-top:var(--smSpacing)!important}.p-t-sm{padding-top:var(--smSpacing)!important}.m-t-lg{margin-top:var(--lgSpacing)!important}.p-t-lg{padding-top:var(--lgSpacing)!important}.m-t-xl{margin-top:var(--xlSpacing)!important}.p-t-xl{padding-top:var(--xlSpacing)!important}.m-r-auto{margin-right:auto!important}.p-r-auto{padding-right:auto!important}.m-r-base{margin-right:var(--baseSpacing)!important}.p-r-base{padding-right:var(--baseSpacing)!important}.m-r-xs{margin-right:var(--xsSpacing)!important}.p-r-xs{padding-right:var(--xsSpacing)!important}.m-r-sm{margin-right:var(--smSpacing)!important}.p-r-sm{padding-right:var(--smSpacing)!important}.m-r-lg{margin-right:var(--lgSpacing)!important}.p-r-lg{padding-right:var(--lgSpacing)!important}.m-r-xl{margin-right:var(--xlSpacing)!important}.p-r-xl{padding-right:var(--xlSpacing)!important}.m-b-auto{margin-bottom:auto!important}.p-b-auto{padding-bottom:auto!important}.m-b-base{margin-bottom:var(--baseSpacing)!important}.p-b-base{padding-bottom:var(--baseSpacing)!important}.m-b-xs{margin-bottom:var(--xsSpacing)!important}.p-b-xs{padding-bottom:var(--xsSpacing)!important}.m-b-sm{margin-bottom:var(--smSpacing)!important}.p-b-sm{padding-bottom:var(--smSpacing)!important}.m-b-lg{margin-bottom:var(--lgSpacing)!important}.p-b-lg{padding-bottom:var(--lgSpacing)!important}.m-b-xl{margin-bottom:var(--xlSpacing)!important}.p-b-xl{padding-bottom:var(--xlSpacing)!important}.m-l-auto{margin-left:auto!important}.p-l-auto{padding-left:auto!important}.m-l-base{margin-left:var(--baseSpacing)!important}.p-l-base{padding-left:var(--baseSpacing)!important}.m-l-xs{margin-left:var(--xsSpacing)!important}.p-l-xs{padding-left:var(--xsSpacing)!important}.m-l-sm{margin-left:var(--smSpacing)!important}.p-l-sm{padding-left:var(--smSpacing)!important}.m-l-lg{margin-left:var(--lgSpacing)!important}.p-l-lg{padding-left:var(--lgSpacing)!important}.m-l-xl{margin-left:var(--xlSpacing)!important}.p-l-xl{padding-left:var(--xlSpacing)!important}.m-0{margin:0!important}.p-0{padding:0!important}.m-t-0{margin-top:0!important}.p-t-0{padding-top:0!important}.m-r-0{margin-right:0!important}.p-r-0{padding-right:0!important}.m-b-0{margin-bottom:0!important}.p-b-0{padding-bottom:0!important}.m-l-0{margin-left:0!important}.p-l-0{padding-left:0!important}.m-5{margin:5px!important}.p-5{padding:5px!important}.m-t-5{margin-top:5px!important}.p-t-5{padding-top:5px!important}.m-r-5{margin-right:5px!important}.p-r-5{padding-right:5px!important}.m-b-5{margin-bottom:5px!important}.p-b-5{padding-bottom:5px!important}.m-l-5{margin-left:5px!important}.p-l-5{padding-left:5px!important}.m-10{margin:10px!important}.p-10{padding:10px!important}.m-t-10{margin-top:10px!important}.p-t-10{padding-top:10px!important}.m-r-10{margin-right:10px!important}.p-r-10{padding-right:10px!important}.m-b-10{margin-bottom:10px!important}.p-b-10{padding-bottom:10px!important}.m-l-10{margin-left:10px!important}.p-l-10{padding-left:10px!important}.m-15{margin:15px!important}.p-15{padding:15px!important}.m-t-15{margin-top:15px!important}.p-t-15{padding-top:15px!important}.m-r-15{margin-right:15px!important}.p-r-15{padding-right:15px!important}.m-b-15{margin-bottom:15px!important}.p-b-15{padding-bottom:15px!important}.m-l-15{margin-left:15px!important}.p-l-15{padding-left:15px!important}.m-20{margin:20px!important}.p-20{padding:20px!important}.m-t-20{margin-top:20px!important}.p-t-20{padding-top:20px!important}.m-r-20{margin-right:20px!important}.p-r-20{padding-right:20px!important}.m-b-20{margin-bottom:20px!important}.p-b-20{padding-bottom:20px!important}.m-l-20{margin-left:20px!important}.p-l-20{padding-left:20px!important}.m-25{margin:25px!important}.p-25{padding:25px!important}.m-t-25{margin-top:25px!important}.p-t-25{padding-top:25px!important}.m-r-25{margin-right:25px!important}.p-r-25{padding-right:25px!important}.m-b-25{margin-bottom:25px!important}.p-b-25{padding-bottom:25px!important}.m-l-25{margin-left:25px!important}.p-l-25{padding-left:25px!important}.m-30{margin:30px!important}.p-30{padding:30px!important}.m-t-30{margin-top:30px!important}.p-t-30{padding-top:30px!important}.m-r-30{margin-right:30px!important}.p-r-30{padding-right:30px!important}.m-b-30{margin-bottom:30px!important}.p-b-30{padding-bottom:30px!important}.m-l-30{margin-left:30px!important}.p-l-30{padding-left:30px!important}.m-35{margin:35px!important}.p-35{padding:35px!important}.m-t-35{margin-top:35px!important}.p-t-35{padding-top:35px!important}.m-r-35{margin-right:35px!important}.p-r-35{padding-right:35px!important}.m-b-35{margin-bottom:35px!important}.p-b-35{padding-bottom:35px!important}.m-l-35{margin-left:35px!important}.p-l-35{padding-left:35px!important}.m-40{margin:40px!important}.p-40{padding:40px!important}.m-t-40{margin-top:40px!important}.p-t-40{padding-top:40px!important}.m-r-40{margin-right:40px!important}.p-r-40{padding-right:40px!important}.m-b-40{margin-bottom:40px!important}.p-b-40{padding-bottom:40px!important}.m-l-40{margin-left:40px!important}.p-l-40{padding-left:40px!important}.m-45{margin:45px!important}.p-45{padding:45px!important}.m-t-45{margin-top:45px!important}.p-t-45{padding-top:45px!important}.m-r-45{margin-right:45px!important}.p-r-45{padding-right:45px!important}.m-b-45{margin-bottom:45px!important}.p-b-45{padding-bottom:45px!important}.m-l-45{margin-left:45px!important}.p-l-45{padding-left:45px!important}.m-50{margin:50px!important}.p-50{padding:50px!important}.m-t-50{margin-top:50px!important}.p-t-50{padding-top:50px!important}.m-r-50{margin-right:50px!important}.p-r-50{padding-right:50px!important}.m-b-50{margin-bottom:50px!important}.p-b-50{padding-bottom:50px!important}.m-l-50{margin-left:50px!important}.p-l-50{padding-left:50px!important}.m-55{margin:55px!important}.p-55{padding:55px!important}.m-t-55{margin-top:55px!important}.p-t-55{padding-top:55px!important}.m-r-55{margin-right:55px!important}.p-r-55{padding-right:55px!important}.m-b-55{margin-bottom:55px!important}.p-b-55{padding-bottom:55px!important}.m-l-55{margin-left:55px!important}.p-l-55{padding-left:55px!important}.m-60{margin:60px!important}.p-60{padding:60px!important}.m-t-60{margin-top:60px!important}.p-t-60{padding-top:60px!important}.m-r-60{margin-right:60px!important}.p-r-60{padding-right:60px!important}.m-b-60{margin-bottom:60px!important}.p-b-60{padding-bottom:60px!important}.m-l-60{margin-left:60px!important}.p-l-60{padding-left:60px!important}.no-min-width{min-width:0!important}.wrapper{position:relative;width:var(--wrapperWidth);margin:0 auto;max-width:100%}.wrapper.wrapper-sm{width:var(--smWrapperWidth)}.wrapper.wrapper-lg{width:var(--lgWrapperWidth)}.label{--labelVPadding: 3px;--labelHPadding: 9px;display:inline-flex;align-items:center;justify-content:center;vertical-align:top;gap:5px;padding:var(--labelVPadding) var(--labelHPadding);min-height:24px;max-width:100%;text-align:center;line-height:var(--smLineHeight);font-size:var(--smFontSize);background:var(--baseAlt2Color);color:var(--txtPrimaryColor);white-space:nowrap;border-radius:30px}.label .btn:last-child{margin-right:calc(-.5 * var(--labelHPadding))}.label .btn:first-child{margin-left:calc(-.5 * var(--labelHPadding))}.label.label-sm{--labelHPadding: 5px;font-size:var(--xsFontSize);min-height:18px;line-height:1}.label.label-primary{color:var(--baseColor);background:var(--primaryColor)}.label.label-info{background:var(--infoAltColor)}.label.label-success{background:var(--successAltColor)}.label.label-danger{background:var(--dangerAltColor)}.label.label-warning{background:var(--warningAltColor)}.thumb{--thumbSize: 40px;flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:1;width:var(--thumbSize);height:var(--thumbSize);background:var(--baseAlt2Color);border-radius:var(--baseRadius);color:var(--txtPrimaryColor);box-shadow:0 2px 5px 0 var(--shadowColor)}.thumb i{font-size:inherit}.thumb img{width:100%;height:100%;border-radius:inherit;overflow:hidden}.thumb.thumb-xs{--thumbSize: 24px;font-size:.85rem}.thumb.thumb-sm{--thumbSize: 32px;font-size:.92rem}.thumb.thumb-lg{--thumbSize: 60px;font-size:1.3rem}.thumb.thumb-xl{--thumbSize: 80px;font-size:1.5rem}.thumb.thumb-circle{border-radius:50%}.thumb.thumb-active{box-shadow:0 0 0 2px var(--primaryColor)}a.thumb:not(.thumb-active){transition:box-shadow var(--baseAnimationSpeed)}a.thumb:not(.thumb-active):hover,a.thumb:not(.thumb-active):focus{box-shadow:0 2px 5px 0 var(--shadowColor),0 2px 4px 1px var(--shadowColor)}.section-title{display:flex;align-items:center;width:100%;column-gap:10px;row-gap:5px;margin:0 0 var(--xsSpacing);font-weight:600;font-size:var(--baseFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor)}.logo{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:10px;font-size:23px;text-decoration:none;color:inherit;user-select:none}.logo strong{font-weight:700}.logo .version{position:absolute;right:0;top:-5px;line-height:1;font-size:10px;font-weight:400;padding:2px 4px;border-radius:var(--baseRadius);background:var(--dangerAltColor);color:var(--txtPrimaryColor)}.logo.logo-sm{font-size:20px}.drag-handle{position:relative;display:inline-flex;align-items:center;justify-content:center;text-align:center;flex-shrink:0;color:var(--txtDisabledColor);user-select:none;cursor:pointer;transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed)}.drag-handle:before{content:"";line-height:1;font-family:var(--iconFontFamily);padding-right:5px;text-shadow:5px 0px currentColor}.drag-handle:hover,.drag-handle:focus-visible{color:var(--txtHintColor)}.drag-handle:active{transition-duration:var(--activeAnimationSpeed);color:var(--txtPrimaryColor)}.loader{--loaderSize: 32px;position:relative;display:inline-flex;vertical-align:top;flex-direction:column;align-items:center;justify-content:center;row-gap:10px;margin:0;color:var(--txtDisabledColor);text-align:center;font-weight:400}.loader:before{content:"";display:inline-block;vertical-align:top;clear:both;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);font-weight:400;font-family:var(--iconFontFamily);color:inherit;text-align:center;animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.loader.loader-primary{color:var(--primaryColor)}.loader.loader-info{color:var(--infoColor)}.loader.loader-info-alt{color:var(--infoAltColor)}.loader.loader-success{color:var(--successColor)}.loader.loader-success-alt{color:var(--successAltColor)}.loader.loader-danger{color:var(--dangerColor)}.loader.loader-danger-alt{color:var(--dangerAltColor)}.loader.loader-warning{color:var(--warningColor)}.loader.loader-warning-alt{color:var(--warningAltColor)}.loader.loader-xs{--loaderSize: 18px}.loader.loader-sm{--loaderSize: 24px}.loader.loader-lg{--loaderSize: 42px}.skeleton-loader{position:relative;height:12px;margin:5px 0;border-radius:var(--baseRadius);background:var(--baseAlt1Color);animation:fadeIn .4s}.skeleton-loader:before{content:"";width:100%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--baseAlt1Color) 8%,var(--bodyColor) 18%,var(--baseAlt1Color) 33%);background-size:200% 100%;animation:shine 1s linear infinite}.placeholder-section{display:flex;width:100%;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:var(--smSpacing);color:var(--txtHintColor)}.placeholder-section .icon{font-size:50px;height:50px;line-height:1;opacity:.3}.placeholder-section .icon i{font-size:inherit;vertical-align:top}.list{position:relative;overflow:auto;overflow:overlay;border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}.list .list-item{word-break:break-word;position:relative;display:flex;align-items:center;width:100%;gap:var(--xsSpacing);outline:0;padding:10px var(--xsSpacing);min-height:50px;border-top:1px solid var(--baseAlt2Color);transition:background var(--baseAnimationSpeed)}.list .list-item:first-child{border-top:0}.list .list-item:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.list .list-item .content,.list .list-item .form-field .help-block,.form-field .list .list-item .help-block,.list .list-item .overlay-panel .panel-content,.overlay-panel .list .list-item .panel-content,.list .list-item .panel,.list .list-item .sub-panel{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%;user-select:text}.list .list-item .actions{gap:10px;flex-shrink:0;display:inline-flex;align-items:center;margin:-1px -5px -1px 0}.list .list-item .actions.nonintrusive{opacity:0;visibility:hidden;transform:translate(5px);transition:transform var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed)}.list .list-item:hover .actions.nonintrusive,.list .list-item:active .actions.nonintrusive{opacity:1;visibility:visible;transform:translate(0)}.list .list-item.selected{background:var(--bodyColor)}.list .list-item.handle:not(.disabled){cursor:pointer;user-select:none}.list .list-item.handle:not(.disabled):hover,.list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt1Color)}.list .list-item.handle:not(.disabled):active{background:var(--baseAlt2Color)}.list .list-item.disabled:not(.selected){cursor:default;opacity:.6}.list .list-item-btn{padding:5px;min-height:auto}.list.list-compact .list-item{min-height:40px}.entrance-top{animation:entranceTop var(--entranceAnimationSpeed)}.entrance-bottom{animation:entranceBottom var(--entranceAnimationSpeed)}.entrance-left{animation:entranceLeft var(--entranceAnimationSpeed)}.entrance-right{animation:entranceRight var(--entranceAnimationSpeed)}.provider-logo{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;border-radius:var(--baseRadius);background:var(--bodyColor);padding:0;gap:0}.provider-logo img{max-width:20px;max-height:20px;height:auto;flex-shrink:0}.provider-card{display:flex;align-items:center;width:100%;height:100%;gap:10px;padding:10px;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.grid{--gridGap: var(--baseSpacing);position:relative;display:flex;flex-grow:1;flex-wrap:wrap;row-gap:var(--gridGap);margin:0 calc(-.5 * var(--gridGap))}.grid.grid-center{align-items:center}.grid.grid-sm{--gridGap: var(--smSpacing)}.grid .form-field{margin-bottom:0}.grid>*{margin:0 calc(.5 * var(--gridGap))}.col-xxl-1,.col-xxl-2,.col-xxl-3,.col-xxl-4,.col-xxl-5,.col-xxl-6,.col-xxl-7,.col-xxl-8,.col-xxl-9,.col-xxl-10,.col-xxl-11,.col-xxl-12,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{position:relative;width:100%;min-height:1px}.col-auto{flex:0 0 auto;width:auto}.col-12{width:calc(100% - var(--gridGap))}.col-11{width:calc(91.6666666667% - var(--gridGap))}.col-10{width:calc(83.3333333333% - var(--gridGap))}.col-9{width:calc(75% - var(--gridGap))}.col-8{width:calc(66.6666666667% - var(--gridGap))}.col-7{width:calc(58.3333333333% - var(--gridGap))}.col-6{width:calc(50% - var(--gridGap))}.col-5{width:calc(41.6666666667% - var(--gridGap))}.col-4{width:calc(33.3333333333% - var(--gridGap))}.col-3{width:calc(25% - var(--gridGap))}.col-2{width:calc(16.6666666667% - var(--gridGap))}.col-1{width:calc(8.3333333333% - var(--gridGap))}@media (min-width: 576px){.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-12{width:calc(100% - var(--gridGap))}.col-sm-11{width:calc(91.6666666667% - var(--gridGap))}.col-sm-10{width:calc(83.3333333333% - var(--gridGap))}.col-sm-9{width:calc(75% - var(--gridGap))}.col-sm-8{width:calc(66.6666666667% - var(--gridGap))}.col-sm-7{width:calc(58.3333333333% - var(--gridGap))}.col-sm-6{width:calc(50% - var(--gridGap))}.col-sm-5{width:calc(41.6666666667% - var(--gridGap))}.col-sm-4{width:calc(33.3333333333% - var(--gridGap))}.col-sm-3{width:calc(25% - var(--gridGap))}.col-sm-2{width:calc(16.6666666667% - var(--gridGap))}.col-sm-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 768px){.col-md-auto{flex:0 0 auto;width:auto}.col-md-12{width:calc(100% - var(--gridGap))}.col-md-11{width:calc(91.6666666667% - var(--gridGap))}.col-md-10{width:calc(83.3333333333% - var(--gridGap))}.col-md-9{width:calc(75% - var(--gridGap))}.col-md-8{width:calc(66.6666666667% - var(--gridGap))}.col-md-7{width:calc(58.3333333333% - var(--gridGap))}.col-md-6{width:calc(50% - var(--gridGap))}.col-md-5{width:calc(41.6666666667% - var(--gridGap))}.col-md-4{width:calc(33.3333333333% - var(--gridGap))}.col-md-3{width:calc(25% - var(--gridGap))}.col-md-2{width:calc(16.6666666667% - var(--gridGap))}.col-md-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 992px){.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-12{width:calc(100% - var(--gridGap))}.col-lg-11{width:calc(91.6666666667% - var(--gridGap))}.col-lg-10{width:calc(83.3333333333% - var(--gridGap))}.col-lg-9{width:calc(75% - var(--gridGap))}.col-lg-8{width:calc(66.6666666667% - var(--gridGap))}.col-lg-7{width:calc(58.3333333333% - var(--gridGap))}.col-lg-6{width:calc(50% - var(--gridGap))}.col-lg-5{width:calc(41.6666666667% - var(--gridGap))}.col-lg-4{width:calc(33.3333333333% - var(--gridGap))}.col-lg-3{width:calc(25% - var(--gridGap))}.col-lg-2{width:calc(16.6666666667% - var(--gridGap))}.col-lg-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1200px){.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-12{width:calc(100% - var(--gridGap))}.col-xl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xl-9{width:calc(75% - var(--gridGap))}.col-xl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xl-6{width:calc(50% - var(--gridGap))}.col-xl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xl-3{width:calc(25% - var(--gridGap))}.col-xl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xl-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1400px){.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-12{width:calc(100% - var(--gridGap))}.col-xxl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xxl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xxl-9{width:calc(75% - var(--gridGap))}.col-xxl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xxl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xxl-6{width:calc(50% - var(--gridGap))}.col-xxl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xxl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xxl-3{width:calc(25% - var(--gridGap))}.col-xxl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xxl-1{width:calc(8.3333333333% - var(--gridGap))}}.app-tooltip{position:fixed;z-index:999999;top:0;left:0;display:inline-block;vertical-align:top;max-width:275px;padding:3px 5px;color:#fff;text-align:center;font-family:var(--baseFontFamily);font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:var(--baseRadius);background:var(--tooltipColor);pointer-events:none;user-select:none;transition:opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed),transform var(--baseAnimationSpeed);transform:translateY(1px);backface-visibility:hidden;white-space:pre-line;word-break:break-word;opacity:0;visibility:hidden}.app-tooltip.code{font-family:monospace;white-space:pre-wrap;text-align:left;min-width:150px;max-width:340px}.app-tooltip.active{transform:scale(1);opacity:1;visibility:visible}.dropdown{position:absolute;z-index:99;right:0;left:auto;top:100%;cursor:default;display:inline-block;vertical-align:top;padding:5px;margin:5px 0 0;width:auto;min-width:140px;max-width:450px;max-height:330px;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);border-radius:var(--baseRadius);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.dropdown hr{margin:5px 0}.dropdown .dropdown-item{border:0;background:none;position:relative;outline:0;display:flex;align-items:center;column-gap:8px;width:100%;height:auto;min-height:0;text-align:left;padding:8px 10px;margin:0 0 5px;cursor:pointer;color:var(--txtPrimaryColor);font-weight:400;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);line-height:var(--baseLineHeight);border-radius:var(--baseRadius);text-decoration:none;word-break:break-word;user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.dropdown .dropdown-item:last-child{margin-bottom:0}.dropdown .dropdown-item.selected{background:var(--baseAlt2Color)}.dropdown .dropdown-item:focus-visible,.dropdown .dropdown-item:hover{background:var(--baseAlt1Color)}.dropdown .dropdown-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.dropdown .dropdown-item.disabled{color:var(--txtDisabledColor);background:none;pointer-events:none}.dropdown .dropdown-item.separator{cursor:default;background:none;text-transform:uppercase;padding-top:0;padding-bottom:0;margin-top:15px;color:var(--txtDisabledColor);font-weight:600;font-size:var(--smFontSize)}.dropdown.dropdown-upside{top:auto;bottom:100%;margin:0 0 5px}.dropdown.dropdown-left{right:auto;left:0}.dropdown.dropdown-center{right:auto;left:50%;transform:translate(-50%)}.dropdown.dropdown-sm{margin-top:5px;min-width:100px}.dropdown.dropdown-sm .dropdown-item{column-gap:7px;font-size:var(--smFontSize);margin:0 0 2px;padding:5px 7px}.dropdown.dropdown-sm .dropdown-item:last-child{margin-bottom:0}.dropdown.dropdown-sm.dropdown-upside{margin-top:0;margin-bottom:5px}.dropdown.dropdown-block{width:100%;min-width:130px;max-width:100%}.dropdown.dropdown-nowrap{white-space:nowrap}.overlay-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-self:flex-end;margin-left:auto;background:var(--baseColor);height:100%;width:580px;max-width:100%;word-wrap:break-word;box-shadow:0 2px 5px 0 var(--shadowColor)}.overlay-panel .overlay-panel-section{position:relative;width:100%;margin:0;padding:var(--baseSpacing);transition:box-shadow var(--baseAnimationSpeed)}.overlay-panel .overlay-panel-section:empty{display:none}.overlay-panel .overlay-panel-section:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.overlay-panel .overlay-panel-section:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.overlay-panel .overlay-panel-section .btn{flex-grow:0}.overlay-panel img{max-width:100%}.overlay-panel .panel-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:var(--baseSpacing);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel .panel-header>*{margin-top:0;margin-bottom:0}.overlay-panel .panel-header .btn-back{margin-left:-10px}.overlay-panel .panel-header .overlay-close{z-index:3;outline:0;position:absolute;right:100%;top:20px;margin:0;display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;text-align:center;font-size:1.6rem;line-height:1;border-radius:50% 0 0 50%;color:#fff;background:var(--primaryColor);opacity:.5;transition:opacity var(--baseAnimationSpeed);user-select:none}.overlay-panel .panel-header .overlay-close i{font-size:inherit}.overlay-panel .panel-header .overlay-close:hover,.overlay-panel .panel-header .overlay-close:focus-visible,.overlay-panel .panel-header .overlay-close:active{opacity:.7}.overlay-panel .panel-header .overlay-close:active{transition-duration:var(--activeAnimationSpeed);opacity:1}.overlay-panel .panel-header .btn-close{margin-right:-10px}.overlay-panel .panel-header .tabs-header{margin-bottom:-24px}.overlay-panel .panel-content{z-index:auto;flex-grow:1;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.tox-fullscreen .overlay-panel .panel-content{z-index:9}.overlay-panel .panel-header~.panel-content{padding-top:5px}.overlay-panel .panel-footer{z-index:2;column-gap:var(--smSpacing);display:flex;align-items:center;justify-content:flex-end;border-top:1px solid var(--baseAlt2Color);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel.scrollable .panel-header{box-shadow:0 4px 5px #0000000d}.overlay-panel.scrollable .panel-footer{box-shadow:0 -4px 5px #0000000d}.overlay-panel.scrollable.scroll-top-reached .panel-header,.overlay-panel.scrollable.scroll-bottom-reached .panel-footer{box-shadow:none}.overlay-panel.overlay-panel-xl{width:850px}.overlay-panel.overlay-panel-lg{width:700px}.overlay-panel.overlay-panel-sm{width:460px}.overlay-panel.popup{height:auto;max-height:100%;align-self:center;border-radius:var(--baseRadius);margin:0 auto}.overlay-panel.popup .panel-footer{background:var(--bodyColor)}.overlay-panel.hide-content .panel-content{display:none}.overlay-panel.colored-header .panel-header{background:var(--bodyColor);border-bottom:1px solid var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header{border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item{border:1px solid transparent;border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:hover,.overlay-panel.colored-header .panel-header .tabs-header .tab-item:focus-visible{background:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:after{content:none;display:none}.overlay-panel.colored-header .panel-header .tabs-header .tab-item.active{background:var(--baseColor);border-color:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header~.panel-content{padding-top:calc(var(--baseSpacing) - 5px)}.overlay-panel.compact-header .panel-header{row-gap:var(--smSpacing)}.overlay-panel.full-width-popup{width:100%}.overlay-panel.preview .panel-header{position:absolute;z-index:99;box-shadow:none}.overlay-panel.preview .panel-header .overlay-close{left:100%;right:auto;border-radius:0 50% 50% 0}.overlay-panel.preview .panel-header .overlay-close i{margin-right:5px}.overlay-panel.preview .panel-header,.overlay-panel.preview .panel-footer{padding:10px 15px}.overlay-panel.preview .panel-content{padding:0;text-align:center;display:flex;align-items:center;justify-content:center}.overlay-panel.preview img{max-width:100%;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.overlay-panel.preview object{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%}.overlay-panel.preview.preview-image{width:auto;min-width:320px;min-height:300px;max-width:75%;max-height:90%}.overlay-panel.preview.preview-document,.overlay-panel.preview.preview-video{width:75%;height:90%}.overlay-panel.preview.preview-audio{min-width:320px;min-height:300px;max-width:90%;max-height:90%}@media (max-width: 900px){.overlay-panel .overlay-panel-section{padding:var(--smSpacing)}}.overlay-panel-container{display:flex;position:fixed;z-index:1000;flex-direction:row;align-items:center;top:0;left:0;width:100%;height:100%;overflow:hidden;margin:0;padding:0;outline:0}.overlay-panel-container .overlay{position:absolute;z-index:0;left:0;top:0;width:100%;height:100%;user-select:none;background:var(--overlayColor)}.overlay-panel-container.padded{padding:10px}.overlay-panel-wrapper{position:relative;z-index:1000;outline:0}.alert{position:relative;display:flex;column-gap:15px;align-items:center;width:100%;min-height:50px;max-width:100%;word-break:break-word;margin:0 0 var(--baseSpacing);border-radius:var(--baseRadius);padding:12px 15px;background:var(--baseAlt1Color);color:var(--txtAltColor)}.alert .content,.alert .form-field .help-block,.form-field .alert .help-block,.alert .panel,.alert .sub-panel,.alert .overlay-panel .panel-content,.overlay-panel .alert .panel-content{flex-grow:1}.alert .icon,.alert .close{display:inline-flex;align-items:center;justify-content:center;flex-grow:0;flex-shrink:0;text-align:center}.alert .icon{align-self:stretch;font-size:1.2em;padding-right:15px;font-weight:400;border-right:1px solid rgba(0,0,0,.05);color:var(--txtHintColor)}.alert .close{display:inline-flex;margin-right:-5px;width:28px;height:28px;outline:0;cursor:pointer;text-align:center;font-size:var(--smFontSize);line-height:28px;border-radius:28px;text-decoration:none;color:inherit;opacity:.5;transition:opacity var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.alert .close:hover,.alert .close:focus{opacity:1;background:rgba(255,255,255,.2)}.alert .close:active{opacity:1;background:rgba(255,255,255,.3);transition-duration:var(--activeAnimationSpeed)}.alert code,.alert hr{background:rgba(0,0,0,.1)}.alert.alert-info{background:var(--infoAltColor)}.alert.alert-info .icon{color:var(--infoColor)}.alert.alert-warning{background:var(--warningAltColor)}.alert.alert-warning .icon{color:var(--warningColor)}.alert.alert-success{background:var(--successAltColor)}.alert.alert-success .icon{color:var(--successColor)}.alert.alert-danger{background:var(--dangerAltColor)}.alert.alert-danger .icon{color:var(--dangerColor)}.toasts-wrapper{position:fixed;z-index:999999;bottom:0;left:0;right:0;padding:0 var(--smSpacing);width:auto;display:block;text-align:center;pointer-events:none}.toasts-wrapper .alert{text-align:left;pointer-events:auto;width:var(--smWrapperWidth);margin:var(--baseSpacing) auto;box-shadow:0 2px 5px 0 var(--shadowColor)}body:not(.overlay-active) .app-sidebar~.app-body .toasts-wrapper{left:var(--appSidebarWidth)}body:not(.overlay-active) .app-sidebar~.app-body .page-sidebar~.toasts-wrapper{left:calc(var(--appSidebarWidth) + var(--pageSidebarWidth))}button{outline:0;border:0;background:none;padding:0;text-align:left;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.btn{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;outline:0;border:0;margin:0;flex-shrink:0;cursor:pointer;padding:5px 20px;column-gap:7px;user-select:none;min-width:var(--btnHeight);min-height:var(--btnHeight);text-align:center;text-decoration:none;line-height:1;font-weight:600;color:#fff;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);border-radius:var(--btnRadius);background:none;transition:color var(--baseAnimationSpeed)}.btn i{font-size:1.1428em;vertical-align:middle;display:inline-block}.btn:before{content:"";border-radius:inherit;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;pointer-events:none;user-select:none;backface-visibility:hidden;background:var(--primaryColor);transition:filter var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.btn:hover:before,.btn:focus-visible:before{opacity:.9}.btn.active,.btn:active{z-index:999}.btn.active:before,.btn:active:before{opacity:.8;transition-duration:var(--activeAnimationSpeed)}.btn.btn-info:before{background:var(--infoColor)}.btn.btn-info:hover:before,.btn.btn-info:focus-visible:before{opacity:.8}.btn.btn-info:active:before{opacity:.7}.btn.btn-success:before{background:var(--successColor)}.btn.btn-success:hover:before,.btn.btn-success:focus-visible:before{opacity:.8}.btn.btn-success:active:before{opacity:.7}.btn.btn-danger:before{background:var(--dangerColor)}.btn.btn-danger:hover:before,.btn.btn-danger:focus-visible:before{opacity:.8}.btn.btn-danger:active:before{opacity:.7}.btn.btn-warning:before{background:var(--warningColor)}.btn.btn-warning:hover:before,.btn.btn-warning:focus-visible:before{opacity:.8}.btn.btn-warning:active:before{opacity:.7}.btn.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-hint:hover:before,.btn.btn-hint:focus-visible:before{opacity:.8}.btn.btn-hint:active:before{opacity:.7}.btn.btn-outline{border:2px solid currentColor;background:#fff}.btn.btn-secondary,.btn.btn-transparent,.btn.btn-outline{box-shadow:none;color:var(--txtPrimaryColor)}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{opacity:0}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before,.btn.btn-transparent:focus-visible:before,.btn.btn-transparent:hover:before,.btn.btn-outline:focus-visible:before,.btn.btn-outline:hover:before{opacity:.3}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before,.btn.btn-transparent.active:before,.btn.btn-transparent:active:before,.btn.btn-outline.active:before,.btn.btn-outline:active:before{opacity:.45}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{background:var(--baseAlt3Color)}.btn.btn-secondary.btn-info,.btn.btn-transparent.btn-info,.btn.btn-outline.btn-info{color:var(--infoColor)}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{opacity:0}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before,.btn.btn-transparent.btn-info:focus-visible:before,.btn.btn-transparent.btn-info:hover:before,.btn.btn-outline.btn-info:focus-visible:before,.btn.btn-outline.btn-info:hover:before{opacity:.15}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before,.btn.btn-transparent.btn-info.active:before,.btn.btn-transparent.btn-info:active:before,.btn.btn-outline.btn-info.active:before,.btn.btn-outline.btn-info:active:before{opacity:.25}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{background:var(--infoColor)}.btn.btn-secondary.btn-success,.btn.btn-transparent.btn-success,.btn.btn-outline.btn-success{color:var(--successColor)}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{opacity:0}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before,.btn.btn-transparent.btn-success:focus-visible:before,.btn.btn-transparent.btn-success:hover:before,.btn.btn-outline.btn-success:focus-visible:before,.btn.btn-outline.btn-success:hover:before{opacity:.15}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before,.btn.btn-transparent.btn-success.active:before,.btn.btn-transparent.btn-success:active:before,.btn.btn-outline.btn-success.active:before,.btn.btn-outline.btn-success:active:before{opacity:.25}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{background:var(--successColor)}.btn.btn-secondary.btn-danger,.btn.btn-transparent.btn-danger,.btn.btn-outline.btn-danger{color:var(--dangerColor)}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{opacity:0}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before,.btn.btn-transparent.btn-danger:focus-visible:before,.btn.btn-transparent.btn-danger:hover:before,.btn.btn-outline.btn-danger:focus-visible:before,.btn.btn-outline.btn-danger:hover:before{opacity:.15}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before,.btn.btn-transparent.btn-danger.active:before,.btn.btn-transparent.btn-danger:active:before,.btn.btn-outline.btn-danger.active:before,.btn.btn-outline.btn-danger:active:before{opacity:.25}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{background:var(--dangerColor)}.btn.btn-secondary.btn-warning,.btn.btn-transparent.btn-warning,.btn.btn-outline.btn-warning{color:var(--warningColor)}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{opacity:0}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before,.btn.btn-transparent.btn-warning:focus-visible:before,.btn.btn-transparent.btn-warning:hover:before,.btn.btn-outline.btn-warning:focus-visible:before,.btn.btn-outline.btn-warning:hover:before{opacity:.15}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before,.btn.btn-transparent.btn-warning.active:before,.btn.btn-transparent.btn-warning:active:before,.btn.btn-outline.btn-warning.active:before,.btn.btn-outline.btn-warning:active:before{opacity:.25}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{background:var(--warningColor)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{opacity:0}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before,.btn.btn-transparent.btn-hint:focus-visible:before,.btn.btn-transparent.btn-hint:hover:before,.btn.btn-outline.btn-hint:focus-visible:before,.btn.btn-outline.btn-hint:hover:before{opacity:.15}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before,.btn.btn-transparent.btn-hint.active:before,.btn.btn-transparent.btn-hint:active:before,.btn.btn-outline.btn-hint.active:before,.btn.btn-outline.btn-hint:active:before{opacity:.25}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--txtHintColor)}.btn.btn-secondary.btn-hint:focus-visible,.btn.btn-secondary.btn-hint:hover,.btn.btn-secondary.btn-hint:active,.btn.btn-secondary.btn-hint.active,.btn.btn-transparent.btn-hint:focus-visible,.btn.btn-transparent.btn-hint:hover,.btn.btn-transparent.btn-hint:active,.btn.btn-transparent.btn-hint.active,.btn.btn-outline.btn-hint:focus-visible,.btn.btn-outline.btn-hint:hover,.btn.btn-outline.btn-hint:active,.btn.btn-outline.btn-hint.active{color:var(--txtPrimaryColor)}.btn.btn-secondary:before{opacity:.35}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before{opacity:.5}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before{opacity:.7}.btn.btn-secondary.btn-info:before{opacity:.15}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before{opacity:.25}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before{opacity:.3}.btn.btn-secondary.btn-success:before{opacity:.15}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before{opacity:.25}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before{opacity:.3}.btn.btn-secondary.btn-danger:before{opacity:.15}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before{opacity:.25}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before{opacity:.3}.btn.btn-secondary.btn-warning:before{opacity:.15}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before{opacity:.25}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before{opacity:.3}.btn.btn-secondary.btn-hint:before{opacity:.15}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before{opacity:.25}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before{opacity:.3}.btn.btn-disabled,.btn[disabled]{box-shadow:none;cursor:default;background:var(--baseAlt1Color);color:var(--txtDisabledColor)!important}.btn.btn-disabled:before,.btn[disabled]:before{display:none}.btn.btn-disabled.btn-transparent,.btn[disabled].btn-transparent{background:none}.btn.btn-disabled.btn-outline,.btn[disabled].btn-outline{border-color:var(--baseAlt2Color)}.btn.btn-expanded{min-width:150px}.btn.btn-expanded-sm{min-width:90px}.btn.btn-expanded-lg{min-width:170px}.btn.btn-lg{column-gap:10px;font-size:var(--lgFontSize);min-height:var(--lgBtnHeight);min-width:var(--lgBtnHeight);padding-left:30px;padding-right:30px}.btn.btn-lg i{font-size:1.2666em}.btn.btn-lg.btn-expanded{min-width:240px}.btn.btn-lg.btn-expanded-sm{min-width:160px}.btn.btn-lg.btn-expanded-lg{min-width:300px}.btn.btn-sm,.btn.btn-xs{column-gap:5px;font-size:var(--smFontSize);min-height:var(--smBtnHeight);min-width:var(--smBtnHeight);padding-left:12px;padding-right:12px}.btn.btn-sm i,.btn.btn-xs i{font-size:1rem}.btn.btn-sm.btn-expanded,.btn.btn-xs.btn-expanded{min-width:100px}.btn.btn-sm.btn-expanded-sm,.btn.btn-xs.btn-expanded-sm{min-width:80px}.btn.btn-sm.btn-expanded-lg,.btn.btn-xs.btn-expanded-lg{min-width:130px}.btn.btn-xs{min-width:var(--xsBtnHeight);min-height:var(--xsBtnHeight)}.btn.btn-block{display:flex;width:100%}.btn.btn-pill{border-radius:30px}.btn.btn-circle{border-radius:50%;padding:0;gap:0}.btn.btn-circle i{font-size:1.2857rem;text-align:center;width:19px;height:19px;line-height:19px}.btn.btn-circle i:before{margin:0;display:block}.btn.btn-circle.btn-sm i{font-size:1.1rem}.btn.btn-circle.btn-xs i{font-size:1.05rem}.btn.btn-loading{--loaderSize: 24px;cursor:default;pointer-events:none}.btn.btn-loading:after{content:"";position:absolute;display:inline-block;vertical-align:top;left:50%;top:50%;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);color:inherit;text-align:center;font-weight:400;margin-left:calc(var(--loaderSize) * -.5);margin-top:calc(var(--loaderSize) * -.5);font-family:var(--iconFontFamily);animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.btn.btn-loading>*{opacity:0;transform:scale(.9)}.btn.btn-loading.btn-sm,.btn.btn-loading.btn-xs{--loaderSize: 20px}.btn.btn-loading.btn-lg{--loaderSize: 28px}.btn.btn-prev i,.btn.btn-next i{transition:transform var(--baseAnimationSpeed)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i,.btn.btn-next:hover i,.btn.btn-next:focus-within i{transform:translate(3px)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i{transform:translate(-3px)}.btns-group{display:inline-flex;align-items:center;gap:var(--xsSpacing)}.btns-group.no-gap{gap:0}.btns-group.no-gap>*{border-radius:0;min-width:0;box-shadow:-1px 0 #ffffff1a}.btns-group.no-gap>*:first-child{border-top-left-radius:var(--btnRadius);border-bottom-left-radius:var(--btnRadius);box-shadow:none}.btns-group.no-gap>*:last-child{border-top-right-radius:var(--btnRadius);border-bottom-right-radius:var(--btnRadius)}.tinymce-wrapper,.code-editor,.select .selected-container,input,select,textarea{display:block;width:100%;outline:0;border:0;margin:0;background:none;padding:5px 10px;line-height:20px;min-width:0;min-height:var(--inputHeight);background:var(--baseAlt1Color);color:var(--txtPrimaryColor);font-size:var(--baseFontSize);font-family:var(--baseFontFamily);font-weight:400;border-radius:var(--baseRadius);overflow:auto;overflow:overlay}.tinymce-wrapper::placeholder,.code-editor::placeholder,.select .selected-container::placeholder,input::placeholder,select::placeholder,textarea::placeholder{color:var(--txtDisabledColor)}@media screen and (min-width: 550px){.tinymce-wrapper:focus,.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.tinymce-wrapper:focus-within,.code-editor:focus-within,.select .selected-container:focus-within,input:focus-within,select:focus-within,textarea:focus-within{scrollbar-color:var(--baseAlt3Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}.tinymce-wrapper:focus::-webkit-scrollbar,.code-editor:focus::-webkit-scrollbar,.select .selected-container:focus::-webkit-scrollbar,input:focus::-webkit-scrollbar,select:focus::-webkit-scrollbar,textarea:focus::-webkit-scrollbar,.tinymce-wrapper:focus-within::-webkit-scrollbar,.code-editor:focus-within::-webkit-scrollbar,.select .selected-container:focus-within::-webkit-scrollbar,input:focus-within::-webkit-scrollbar,select:focus-within::-webkit-scrollbar,textarea:focus-within::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-track,.code-editor:focus::-webkit-scrollbar-track,.select .selected-container:focus::-webkit-scrollbar-track,input:focus::-webkit-scrollbar-track,select:focus::-webkit-scrollbar-track,textarea:focus::-webkit-scrollbar-track,.tinymce-wrapper:focus-within::-webkit-scrollbar-track,.code-editor:focus-within::-webkit-scrollbar-track,.select .selected-container:focus-within::-webkit-scrollbar-track,input:focus-within::-webkit-scrollbar-track,select:focus-within::-webkit-scrollbar-track,textarea:focus-within::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-thumb,.code-editor:focus::-webkit-scrollbar-thumb,.select .selected-container:focus::-webkit-scrollbar-thumb,input:focus::-webkit-scrollbar-thumb,select:focus::-webkit-scrollbar-thumb,textarea:focus::-webkit-scrollbar-thumb,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb,.code-editor:focus-within::-webkit-scrollbar-thumb,.select .selected-container:focus-within::-webkit-scrollbar-thumb,input:focus-within::-webkit-scrollbar-thumb,select:focus-within::-webkit-scrollbar-thumb,textarea:focus-within::-webkit-scrollbar-thumb{background-color:var(--baseAlt3Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}.tinymce-wrapper:focus::-webkit-scrollbar-thumb:hover,.code-editor:focus::-webkit-scrollbar-thumb:hover,.select .selected-container:focus::-webkit-scrollbar-thumb:hover,input:focus::-webkit-scrollbar-thumb:hover,select:focus::-webkit-scrollbar-thumb:hover,textarea:focus::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus::-webkit-scrollbar-thumb:active,.code-editor:focus::-webkit-scrollbar-thumb:active,.select .selected-container:focus::-webkit-scrollbar-thumb:active,input:focus::-webkit-scrollbar-thumb:active,select:focus::-webkit-scrollbar-thumb:active,textarea:focus::-webkit-scrollbar-thumb:active,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:hover,.code-editor:focus-within::-webkit-scrollbar-thumb:hover,.select .selected-container:focus-within::-webkit-scrollbar-thumb:hover,input:focus-within::-webkit-scrollbar-thumb:hover,select:focus-within::-webkit-scrollbar-thumb:hover,textarea:focus-within::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:active,.code-editor:focus-within::-webkit-scrollbar-thumb:active,.select .selected-container:focus-within::-webkit-scrollbar-thumb:active,input:focus-within::-webkit-scrollbar-thumb:active,select:focus-within::-webkit-scrollbar-thumb:active,textarea:focus-within::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt4Color)}}[readonly].tinymce-wrapper,[readonly].code-editor,.select [readonly].selected-container,input[readonly],select[readonly],textarea[readonly],.readonly.tinymce-wrapper,.readonly.code-editor,.select .readonly.selected-container,input.readonly,select.readonly,textarea.readonly{cursor:default;color:var(--txtHintColor)}[disabled].tinymce-wrapper,[disabled].code-editor,.select [disabled].selected-container,input[disabled],select[disabled],textarea[disabled],.disabled.tinymce-wrapper,.disabled.code-editor,.select .disabled.selected-container,input.disabled,select.disabled,textarea.disabled{cursor:default;color:var(--txtDisabledColor)}.txt-mono.tinymce-wrapper,.txt-mono.code-editor,.select .txt-mono.selected-container,input.txt-mono,select.txt-mono,textarea.txt-mono{line-height:var(--smLineHeight)}.code.tinymce-wrapper,.code.code-editor,.select .code.selected-container,input.code,select.code,textarea.code{font-size:15px;line-height:1.379rem;font-family:var(--monospaceFontFamily)}input{height:var(--inputHeight)}input:-webkit-autofill{-webkit-text-fill-color:var(--txtPrimaryColor);-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt1Color)}.form-field:focus-within input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt2Color)}input[type=file]{padding:9px}input[type=checkbox],input[type=radio]{width:auto;height:auto;display:inline}input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}textarea{min-height:80px;resize:vertical}select{padding-left:8px}.form-field{--hPadding: 15px;position:relative;display:block;width:100%;margin-bottom:var(--baseSpacing)}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea{z-index:0;padding-left:var(--hPadding);padding-right:var(--hPadding)}.form-field select{padding-left:8px}.form-field label{display:flex;width:100%;column-gap:5px;align-items:center;user-select:none;font-weight:600;font-size:var(--smFontSize);letter-spacing:.1px;color:var(--txtHintColor);line-height:1;padding-top:12px;padding-bottom:3px;padding-left:var(--hPadding);padding-right:var(--hPadding);border:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.form-field label~.tinymce-wrapper,.form-field label~.code-editor,.form-field .select label~.selected-container,.select .form-field label~.selected-container,.form-field label~input,.form-field label~select,.form-field label~textarea{border-top:0;padding-top:2px;padding-bottom:8px;border-top-left-radius:0;border-top-right-radius:0}.form-field label i{font-size:.96rem;margin-bottom:-1px}.form-field label i:before{margin:0}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea,.form-field label{background:var(--baseAlt1Color);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.form-field:focus-within .tinymce-wrapper,.form-field:focus-within .code-editor,.form-field:focus-within .select .selected-container,.select .form-field:focus-within .selected-container,.form-field:focus-within input,.form-field:focus-within select,.form-field:focus-within textarea,.form-field:focus-within label{background:var(--baseAlt2Color)}.form-field:focus-within label{color:var(--txtPrimaryColor)}.form-field .form-field-addon{position:absolute;display:inline-flex;align-items:center;z-index:1;top:0px;right:var(--hPadding);min-height:var(--inputHeight);color:var(--txtHintColor)}.form-field .form-field-addon .btn{margin-right:-5px}.form-field .form-field-addon:not(.prefix)~.tinymce-wrapper,.form-field .form-field-addon:not(.prefix)~.code-editor,.form-field .select .form-field-addon:not(.prefix)~.selected-container,.select .form-field .form-field-addon:not(.prefix)~.selected-container,.form-field .form-field-addon:not(.prefix)~input,.form-field .form-field-addon:not(.prefix)~select,.form-field .form-field-addon:not(.prefix)~textarea{padding-right:45px}.form-field .form-field-addon.prefix{right:auto;left:var(--hPadding)}.form-field .form-field-addon.prefix~.tinymce-wrapper,.form-field .form-field-addon.prefix~.code-editor,.form-field .select .form-field-addon.prefix~.selected-container,.select .form-field .form-field-addon.prefix~.selected-container,.form-field .form-field-addon.prefix~input,.form-field .form-field-addon.prefix~select,.form-field .form-field-addon.prefix~textarea{padding-left:45px}.form-field label~.form-field-addon{min-height:calc(26px + var(--inputHeight))}.form-field .help-block{margin-top:8px;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);word-break:break-word}.form-field .help-block pre{white-space:pre-wrap}.form-field .help-block-error{color:var(--dangerColor)}.form-field.error>label,.form-field.invalid>label{color:var(--dangerColor)}.form-field.invalid label,.form-field.invalid .tinymce-wrapper,.form-field.invalid .code-editor,.form-field.invalid .select .selected-container,.select .form-field.invalid .selected-container,.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{background:var(--dangerAltColor)}.form-field.required:not(.form-field-toggle)>label:after{content:"*";color:var(--dangerColor);margin-top:-2px;margin-left:-2px}.form-field.readonly label,.form-field.readonly .tinymce-wrapper,.form-field.readonly .code-editor,.form-field.readonly .select .selected-container,.select .form-field.readonly .selected-container,.form-field.readonly input,.form-field.readonly select,.form-field.readonly textarea,.form-field.disabled label,.form-field.disabled .tinymce-wrapper,.form-field.disabled .code-editor,.form-field.disabled .select .selected-container,.select .form-field.disabled .selected-container,.form-field.disabled input,.form-field.disabled select,.form-field.disabled textarea{background:var(--baseAlt1Color)}.form-field.readonly>label,.form-field.disabled>label{color:var(--txtHintColor)}.form-field.readonly.required>label:after,.form-field.disabled.required>label:after{opacity:.5}.form-field.disabled label,.form-field.disabled .tinymce-wrapper,.form-field.disabled .code-editor,.form-field.disabled .select .selected-container,.select .form-field.disabled .selected-container,.form-field.disabled input,.form-field.disabled select,.form-field.disabled textarea{box-shadow:inset 0 0 0 var(--btnHeight) #ffffff73}.form-field.disabled>label{color:var(--txtDisabledColor)}.form-field input[type=radio],.form-field input[type=checkbox]{position:absolute;z-index:-1;left:0;width:0;height:0;min-height:0;min-width:0;border:0;background:none;user-select:none;pointer-events:none;box-shadow:none;opacity:0}.form-field input[type=radio]~label,.form-field input[type=checkbox]~label{border:0;margin:0;outline:0;background:none;display:inline-flex;vertical-align:top;align-items:center;width:auto;column-gap:5px;user-select:none;padding:0 0 0 27px;line-height:20px;min-height:20px;font-weight:400;font-size:var(--baseFontSize);text-transform:none;color:var(--txtPrimaryColor)}.form-field input[type=radio]~label:before,.form-field input[type=checkbox]~label:before{content:"";display:inline-block;vertical-align:top;position:absolute;z-index:0;left:0;top:0;width:20px;height:20px;line-height:16px;font-family:var(--iconFontFamily);font-size:1.2rem;text-align:center;color:var(--baseColor);cursor:pointer;background:var(--baseColor);border-radius:var(--baseRadius);border:2px solid var(--baseAlt3Color);transition:transform var(--baseAnimationSpeed),border-color var(--baseAnimationSpeed),color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.form-field input[type=radio]~label:active:before,.form-field input[type=checkbox]~label:active:before{transform:scale(.9)}.form-field input[type=radio]:focus~label:before,.form-field input[type=radio]~label:hover:before,.form-field input[type=checkbox]:focus~label:before,.form-field input[type=checkbox]~label:hover:before{border-color:var(--baseAlt4Color)}.form-field input[type=radio]:checked~label:before,.form-field input[type=checkbox]:checked~label:before{content:"";box-shadow:none;mix-blend-mode:unset;background:var(--successColor);border-color:var(--successColor)}.form-field input[type=radio]:disabled~label,.form-field input[type=checkbox]:disabled~label{pointer-events:none;cursor:not-allowed;color:var(--txtDisabledColor)}.form-field input[type=radio]:disabled~label:before,.form-field input[type=checkbox]:disabled~label:before{opacity:.5}.form-field input[type=radio]~label:before{border-radius:50%;font-size:1rem}.form-field .form-field-block{position:relative;margin:0 0 var(--xsSpacing)}.form-field .form-field-block:last-child{margin-bottom:0}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{position:relative}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{content:"";border:0;box-shadow:none;background:var(--baseAlt3Color);transition:background var(--activeAnimationSpeed)}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{content:"";position:absolute;z-index:1;cursor:pointer;background:var(--baseColor);transition:left var(--activeAnimationSpeed),transform var(--activeAnimationSpeed),background var(--activeAnimationSpeed);box-shadow:0 2px 5px 0 var(--shadowColor)}.form-field.form-field-toggle input[type=radio]~label:active:before,.form-field.form-field-toggle input[type=checkbox]~label:active:before{transform:none}.form-field.form-field-toggle input[type=radio]~label:active:after,.form-field.form-field-toggle input[type=checkbox]~label:active:after{transform:scale(.9)}.form-field.form-field-toggle input[type=radio]:focus-visible~label:before,.form-field.form-field-toggle input[type=checkbox]:focus-visible~label:before{box-shadow:0 0 0 2px var(--baseAlt2Color)}.form-field.form-field-toggle input[type=radio]~label:hover:before,.form-field.form-field-toggle input[type=checkbox]~label:hover:before{background:var(--baseAlt4Color)}.form-field.form-field-toggle input[type=radio]:checked~label:before,.form-field.form-field-toggle input[type=checkbox]:checked~label:before{background:var(--successColor)}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{background:var(--baseColor)}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{min-height:24px;padding-left:47px}.form-field.form-field-toggle input[type=radio]~label:empty,.form-field.form-field-toggle input[type=checkbox]~label:empty{padding-left:40px}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{width:40px;height:24px;border-radius:24px}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{top:4px;left:4px;width:16px;height:16px;border-radius:16px}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{left:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label{min-height:20px;padding-left:39px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:empty,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:empty{padding-left:32px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:before,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:before{width:32px;height:20px;border-radius:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:after{top:4px;left:4px;width:12px;height:12px;border-radius:12px}.form-field.form-field-toggle.form-field-sm input[type=radio]:checked~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]:checked~label:after{left:16px}.form-field-group{display:flex;width:100%;align-items:center}.form-field-group>.form-field{flex-grow:1;border-left:1px solid var(--baseAlt2Color)}.form-field-group>.form-field:first-child{border-left:0}.form-field-group>.form-field:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.form-field-group>.form-field:not(:first-child)>label{border-top-left-radius:0}.form-field-group>.form-field:not(:first-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:first-child)>.code-editor,.select .form-field-group>.form-field:not(:first-child)>.selected-container,.form-field-group>.form-field:not(:first-child)>input,.form-field-group>.form-field:not(:first-child)>select,.form-field-group>.form-field:not(:first-child)>textarea,.form-field-group>.form-field:not(:first-child)>.select .selected-container{border-bottom-left-radius:0}.form-field-group>.form-field:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.form-field-group>.form-field:not(:last-child)>label{border-top-right-radius:0}.form-field-group>.form-field:not(:last-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:last-child)>.code-editor,.select .form-field-group>.form-field:not(:last-child)>.selected-container,.form-field-group>.form-field:not(:last-child)>input,.form-field-group>.form-field:not(:last-child)>select,.form-field-group>.form-field:not(:last-child)>textarea,.form-field-group>.form-field:not(:last-child)>.select .selected-container{border-bottom-right-radius:0}.form-field-group .form-field.col-12{width:100%}.form-field-group .form-field.col-11{width:91.6666666667%}.form-field-group .form-field.col-10{width:83.3333333333%}.form-field-group .form-field.col-9{width:75%}.form-field-group .form-field.col-8{width:66.6666666667%}.form-field-group .form-field.col-7{width:58.3333333333%}.form-field-group .form-field.col-6{width:50%}.form-field-group .form-field.col-5{width:41.6666666667%}.form-field-group .form-field.col-4{width:33.3333333333%}.form-field-group .form-field.col-3{width:25%}.form-field-group .form-field.col-2{width:16.6666666667%}.form-field-group .form-field.col-1{width:8.3333333333%}.select{position:relative;display:block;outline:0}.select .option{user-select:none;column-gap:5px}.select .option .icon{min-width:20px;text-align:center;line-height:inherit}.select .option .icon i{vertical-align:middle;line-height:inherit}.select .txt-placeholder{color:var(--txtHintColor)}label~.select .selected-container{border-top:0}.select .selected-container{position:relative;display:flex;flex-wrap:wrap;width:100%;align-items:center;padding-top:0;padding-bottom:0;padding-right:35px!important;user-select:none}.select .selected-container:after{content:"";position:absolute;right:5px;top:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-top:-10px;display:inline-block;vertical-align:top;font-size:1rem;font-family:var(--iconFontFamily);align-self:flex-end;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed)}.select .selected-container:active,.select .selected-container.active{border-bottom-left-radius:0;border-bottom-right-radius:0}.select .selected-container:active:after,.select .selected-container.active:after{color:var(--txtPrimaryColor);transform:rotate(180deg)}.select .selected-container .option{display:flex;width:100%;align-items:center;max-width:100%;user-select:text}.select .selected-container .clear{margin-left:auto;cursor:pointer;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed)}.select .selected-container .clear i{display:inline-block;vertical-align:middle;line-height:1}.select .selected-container .clear:hover{color:var(--txtPrimaryColor)}.select.multiple .selected-container{display:flex;align-items:center;padding-left:2px;row-gap:3px;column-gap:4px}.select.multiple .selected-container .txt-placeholder{margin-left:5px}.select.multiple .selected-container .option{display:inline-flex;width:auto;padding:3px 5px;line-height:1;border-radius:var(--baseRadius);background:var(--baseColor)}.select:not(.multiple) .selected-container .label{margin-left:-2px}.select:not(.multiple) .selected-container .option .txt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;line-height:normal}.select:not(.disabled) .selected-container:hover{cursor:pointer}.select.readonly,.select.disabled{color:var(--txtHintColor);pointer-events:none}.select.readonly .txt-placeholder,.select.disabled .txt-placeholder,.select.readonly .selected-container,.select.disabled .selected-container{color:inherit}.select.readonly .selected-container .link-hint,.select.disabled .selected-container .link-hint{pointer-events:auto}.select.readonly .selected-container *:not(.link-hint),.select.disabled .selected-container *:not(.link-hint){color:inherit!important}.select.readonly .selected-container:after,.select.readonly .selected-container .clear,.select.disabled .selected-container:after,.select.disabled .selected-container .clear{display:none}.select.readonly .selected-container:hover,.select.disabled .selected-container:hover{cursor:inherit}.select.disabled{color:var(--txtDisabledColor)}.select .txt-missing{color:var(--txtHintColor);padding:5px 12px;margin:0}.select .options-dropdown{max-height:none;border:0;overflow:auto;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px;box-shadow:0 2px 5px 0 var(--shadowColor),inset 0 0 0 2px var(--baseAlt2Color)}.select .options-dropdown .input-group:focus-within{box-shadow:none}.select .options-dropdown .form-field.options-search{margin:0 0 5px;padding:0 0 2px;color:var(--txtHintColor);border-bottom:1px solid var(--baseAlt2Color)}.select .options-dropdown .form-field.options-search .input-group{border-radius:0;padding:0 0 0 10px;margin:0;background:none;column-gap:0;border:0}.select .options-dropdown .form-field.options-search input{border:0;padding-left:9px;padding-right:9px;background:none}.select .options-dropdown .options-list{overflow:auto;max-height:240px;width:auto;margin-left:0;margin-right:-5px;padding-right:5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty){margin:5px -5px -5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty) .btn-block{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}label~.select .selected-container{padding-bottom:4px;border-top-left-radius:0;border-top-right-radius:0}label~.select.multiple .selected-container{padding-top:3px;padding-bottom:3px;padding-left:10px}.select.block-options.multiple .selected-container .option{width:100%;box-shadow:0 2px 5px 0 var(--shadowColor)}.field-type-select .options-dropdown{padding:2px 1px 1px 2px}.field-type-select .options-dropdown .form-field.options-search{margin:0}.field-type-select .options-dropdown .options-list{max-height:490px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0}.field-type-select .options-dropdown .dropdown-item{width:50%;margin:0;padding-left:12px;border-radius:0;border-bottom:1px solid var(--baseAlt2Color);border-right:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.form-field-list{border-radius:var(--baseRadius);transition:box-shadow var(--baseAnimationSpeed)}.form-field-list label{padding-bottom:10px}.form-field-list .list{background:var(--baseAlt1Color);border:0;border-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius);transition:background var(--baseAnimationSpeed)}.form-field-list .list .list-item{border-top:1px solid var(--baseAlt2Color)}.form-field-list .list .list-item.selected{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):hover,.form-field-list .list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):active{background:var(--baseAlt3Color)}.form-field-list:focus-within .list,.form-field-list:focus-within label{background:var(--baseAlt1Color)}.form-field-list.dragover{box-shadow:0 0 0 2px var(--warningColor)}.code-editor{display:flex;flex-direction:column;width:100%}.form-field label~.code-editor{padding-bottom:6px;padding-top:4px}.code-editor .cm-editor{flex-grow:1;border:0!important;outline:none!important}.code-editor .cm-editor .cm-line{padding-left:0;padding-right:0}.code-editor .cm-editor .cm-tooltip-autocomplete{box-shadow:0 2px 5px 0 var(--shadowColor);border-radius:var(--baseRadius);background:var(--baseColor);border:0;z-index:9999;padding:0 3px;font-size:.92rem}.code-editor .cm-editor .cm-tooltip-autocomplete ul{margin:0;border-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--infoColor)}.code-editor .cm-editor .cm-scroller{flex-grow:1;outline:0!important;font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-cursorLayer .cm-cursor{margin-left:0!important}.code-editor .cm-editor .cm-placeholder{color:var(--txtDisabledColor);font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-selectionMatch{background:var(--infoAltColor)}.code-editor .cm-editor.cm-focused .cm-matchingBracket{background-color:#328c821a}.code-editor .ͼf{color:var(--dangerColor)}.tinymce-wrapper{min-height:277px}.tinymce-wrapper .tox-tinymce{border-radius:var(--baseRadius);border:0}.form-field label~.tinymce-wrapper{position:relative;z-index:auto;padding:5px 2px 2px}.form-field label~.tinymce-wrapper:before{content:"";position:absolute;z-index:-1;top:5px;left:2px;right:2px;bottom:2px;background:#fff;border-radius:var(--baseRadius)}body .tox .tox-tbtn{height:30px}body .tox .tox-tbtn svg{transform:scale(.85)}body .tox .tox-tbtn:not(.tox-tbtn--select){width:30px}body .tox .tox-button,body .tox .tox-button--secondary{font-size:var(--smFontSize)}body .tox .tox-toolbar-overlord{box-shadow:0 2px 5px 0 var(--shadowColor)}body .tox .tox-listboxfield .tox-listbox--select,body .tox .tox-textarea,body .tox .tox-textfield,body .tox .tox-toolbar-textfield{padding:3px 5px}body .tox-swatch:not(.tox-swatch--remove):not(.tox-collection__item--enabled) svg{display:none}body.tox-fullscreen .overlay-panel-section{overflow:hidden}.main-menu{--menuItemSize: 45px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:var(--smSpacing);font-size:var(--xlFontSize);color:var(--txtPrimaryColor)}.main-menu i{font-size:24px;line-height:1}.main-menu .menu-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;text-align:center;justify-content:center;user-select:none;color:inherit;min-width:var(--menuItemSize);min-height:var(--menuItemSize);border:2px solid transparent;border-radius:var(--lgRadius);transition:background var(--baseAnimationSpeed),border var(--baseAnimationSpeed)}.main-menu .menu-item:focus-visible,.main-menu .menu-item:hover{background:var(--baseAlt1Color)}.main-menu .menu-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.main-menu .menu-item.active,.main-menu .menu-item.current-route{background:var(--baseColor);border-color:var(--primaryColor)}.app-sidebar{position:relative;z-index:1;display:flex;flex-grow:0;flex-shrink:0;flex-direction:column;align-items:center;width:var(--appSidebarWidth);padding:var(--smSpacing) 0px var(--smSpacing);background:var(--baseColor);border-right:1px solid var(--baseAlt2Color)}.app-sidebar .main-menu{flex-grow:1;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;margin-top:34px;margin-bottom:var(--baseSpacing)}.app-layout{display:flex;width:100%;height:100vh}.app-layout .app-body{flex-grow:1;min-width:0;height:100%;display:flex;align-items:stretch}.app-layout .app-sidebar~.app-body{min-width:650px}.page-sidebar{--sidebarListItemMargin: 10px;z-index:0;display:flex;flex-direction:column;width:var(--pageSidebarWidth);flex-shrink:0;flex-grow:0;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);padding:calc(var(--baseSpacing) - 5px) 0 var(--smSpacing);border-right:1px solid var(--baseAlt2Color)}.page-sidebar>*{padding:0 var(--smSpacing)}.page-sidebar .sidebar-content{overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.page-sidebar .sidebar-content>:first-child{margin-top:0}.page-sidebar .sidebar-content>:last-child{margin-bottom:0}.page-sidebar .sidebar-footer{margin-top:var(--smSpacing)}.page-sidebar .search{display:flex;align-items:center;width:auto;column-gap:5px;margin:0 0 var(--xsSpacing);color:var(--txtHintColor);opacity:.7;transition:opacity var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .search input{border:0;background:var(--baseColor);transition:box-shadow var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.page-sidebar .search .btn-clear{margin-right:-8px}.page-sidebar .search:hover,.page-sidebar .search:focus-within,.page-sidebar .search.active{opacity:1;color:var(--txtPrimaryColor)}.page-sidebar .search:hover input,.page-sidebar .search:focus-within input,.page-sidebar .search.active input{background:var(--baseAlt2Color)}.page-sidebar .sidebar-title{display:flex;align-items:center;gap:5px;width:100%;margin:var(--baseSpacing) 0 var(--xsSpacing);font-weight:600;font-size:1rem;line-height:var(--smLineHeight);color:var(--txtHintColor)}.page-sidebar .sidebar-title .label{font-weight:400}.page-sidebar .sidebar-list-item{cursor:pointer;outline:0;text-decoration:none;position:relative;display:flex;width:100%;align-items:center;column-gap:10px;margin:var(--sidebarListItemMargin) 0;padding:3px 10px;font-size:var(--xlFontSize);min-height:var(--btnHeight);min-width:0;color:var(--txtHintColor);border-radius:var(--baseRadius);user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .sidebar-list-item i{font-size:18px}.page-sidebar .sidebar-list-item .txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-sidebar .sidebar-list-item:focus-visible,.page-sidebar .sidebar-list-item:hover,.page-sidebar .sidebar-list-item:active,.page-sidebar .sidebar-list-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.page-sidebar .sidebar-list-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.page-sidebar .sidebar-content-compact .sidebar-list-item{--sidebarListItemMargin: 5px}@media screen and (max-height: 600px){.page-sidebar{--sidebarListItemMargin: 5px}}@media screen and (max-width: 1100px){.page-sidebar{--pageSidebarWidth: 190px}.page-sidebar>*{padding-left:10px;padding-right:10px}}.page-header{display:flex;align-items:center;width:100%;min-height:var(--btnHeight);gap:var(--xsSpacing);margin:0 0 var(--baseSpacing)}.page-header .btns-group{margin-left:auto;justify-content:end}@media screen and (max-width: 1050px){.page-header{flex-wrap:wrap}.page-header .btns-group{width:100%}.page-header .btns-group .btn{flex-grow:1;flex-basis:0}}.page-header-wrapper{background:var(--baseColor);width:auto;margin-top:calc(-1 * (var(--baseSpacing) - 5px));margin-left:calc(-1 * var(--baseSpacing));margin-right:calc(-1 * var(--baseSpacing));margin-bottom:var(--baseSpacing);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.breadcrumbs{display:flex;align-items:center;gap:30px;color:var(--txtDisabledColor)}.breadcrumbs .breadcrumb-item{position:relative;margin:0;line-height:1;font-weight:400}.breadcrumbs .breadcrumb-item:after{content:"/";position:absolute;right:-20px;top:0;width:10px;text-align:center;pointer-events:none;opacity:.4}.breadcrumbs .breadcrumb-item:last-child{word-break:break-word;color:var(--txtPrimaryColor)}.breadcrumbs .breadcrumb-item:last-child:after{content:none;display:none}.breadcrumbs a{text-decoration:none;color:inherit;transition:color var(--baseAnimationSpeed)}.breadcrumbs a:hover{color:var(--txtPrimaryColor)}.page-content{position:relative;display:block;width:100%;flex-grow:1;padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing)}.page-footer{display:flex;gap:5px;align-items:center;justify-content:right;text-align:right;padding:0px var(--baseSpacing) 15px;color:var(--txtDisabledColor);font-size:var(--xsFontSize);line-height:var(--smLineHeight)}.page-footer i{font-size:1.2em}.page-footer a{color:inherit;text-decoration:none;transition:color var(--baseAnimationSpeed)}.page-footer a:focus-visible,.page-footer a:hover,.page-footer a:active{color:var(--txtPrimaryColor)}.page-wrapper{display:flex;flex-direction:column;flex-grow:1;width:100%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.overlay-active .page-wrapper{overflow-y:hidden}.page-wrapper.full-page{background:var(--baseColor)}.page-wrapper.center-content .page-content{display:flex;align-items:center}@keyframes tabChange{0%{opacity:.7}to{opacity:1}}.tabs-header{display:flex;align-items:stretch;justify-content:flex-start;column-gap:10px;width:100%;min-height:50px;user-select:none;margin:0 0 var(--baseSpacing);border-bottom:2px solid var(--baseAlt2Color)}.tabs-header .tab-item{position:relative;outline:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-width:70px;gap:5px;padding:10px;margin:0;font-size:var(--lgFontSize);line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);color:var(--txtHintColor);text-align:center;text-decoration:none;cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.tabs-header .tab-item:after{content:"";position:absolute;display:block;left:0;bottom:-2px;width:100%;height:2px;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);background:var(--primaryColor);transform:rotateY(90deg);transition:transform .2s}.tabs-header .tab-item .txt,.tabs-header .tab-item i{display:inline-block;vertical-align:top}.tabs-header .tab-item:hover,.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{color:var(--txtPrimaryColor)}.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.tabs-header .tab-item.active{color:var(--txtPrimaryColor)}.tabs-header .tab-item.active:after{transform:rotateY(0)}.tabs-header .tab-item.disabled{pointer-events:none;color:var(--txtDisabledColor)}.tabs-header .tab-item.disabled:after{display:none}.tabs-header.right{justify-content:flex-end}.tabs-header.center{justify-content:center}.tabs-header.stretched .tab-item{flex-grow:1;flex-basis:0}.tabs-header.compact{min-height:30px;margin-bottom:var(--smSpacing)}.tabs-content{position:relative}.tabs-content>.tab-item{width:100%;display:none}.tabs-content>.tab-item.active{display:block;opacity:0;animation:tabChange .2s forwards}.tabs-content>.tab-item>:first-child{margin-top:0}.tabs-content>.tab-item>:last-child{margin-bottom:0}.tabs{position:relative}.accordion{outline:0;position:relative;border-radius:var(--baseRadius);background:var(--baseColor);border:1px solid var(--baseAlt2Color);transition:border-radius var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed),margin var(--baseAnimationSpeed)}.accordion .accordion-header{outline:0;position:relative;display:flex;min-height:52px;align-items:center;row-gap:10px;column-gap:var(--smSpacing);padding:12px 20px 10px;width:100%;user-select:none;color:var(--txtPrimaryColor);border-radius:inherit;transition:border-radius var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.accordion .accordion-header .icon{width:18px;text-align:center}.accordion .accordion-header .icon i{display:inline-block;vertical-align:top;font-size:1.1rem}.accordion .accordion-header.interactive{padding-right:50px;cursor:pointer}.accordion .accordion-header.interactive:after{content:"";position:absolute;right:15px;top:50%;margin-top:-12.5px;width:25px;height:25px;line-height:25px;color:var(--txtHintColor);font-family:var(--iconFontFamily);font-size:1.3em;text-align:center;transition:color var(--baseAnimationSpeed)}.accordion .accordion-header:hover:after,.accordion .accordion-header.focus:after,.accordion .accordion-header:focus-visible:after{color:var(--txtPrimaryColor)}.accordion .accordion-header:active{transition-duration:var(--activeAnimationSpeed)}.accordion .accordion-content{padding:20px}.accordion:hover,.accordion:focus-visible,.accordion.active{z-index:9}.accordion:hover .accordion-header.interactive,.accordion:focus-visible .accordion-header.interactive,.accordion.active .accordion-header.interactive{background:var(--baseAlt1Color)}.accordion.drag-over .accordion-header{background:var(--bodyColor)}.accordion.active{box-shadow:0 2px 5px 0 var(--shadowColor)}.accordion.active .accordion-header{position:relative;top:0;z-index:9;box-shadow:0 0 0 1px var(--baseAlt2Color);border-bottom-left-radius:0;border-bottom-right-radius:0;background:var(--bodyColor)}.accordion.active .accordion-header.interactive{background:var(--bodyColor)}.accordion.active .accordion-header.interactive:after{color:inherit;content:""}.accordion.disabled{z-index:0;border-color:var(--baseAlt1Color)}.accordion.disabled .accordion-header{color:var(--txtDisabledColor)}.accordions .accordion{border-radius:0;margin:-1px 0 0}.accordions .accordion:has(+ .accordion.active){border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}.accordions>.accordion.active,.accordions>.accordion-wrapper>.accordion.active{margin:var(--smSpacing) 0;border-radius:var(--baseRadius)}.accordions>.accordion.active+.accordion,.accordions>.accordion-wrapper>.accordion.active+.accordion{border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:first-child,.accordions>.accordion-wrapper:first-child>.accordion{margin-top:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:last-child,.accordions>.accordion-wrapper:last-child>.accordion{margin-bottom:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}table{--entranceAnimationSpeed: .3s;border-collapse:separate;min-width:100%;transition:opacity var(--baseAnimationSpeed)}table .form-field{margin:0;line-height:1;text-align:left}table .txt-ellipsis{flex-shrink:0}table td,table th{outline:0;vertical-align:middle;position:relative;text-align:left;padding:10px;border-bottom:1px solid var(--baseAlt2Color)}table td:first-child,table th:first-child{padding-left:20px}table td:last-child,table th:last-child{padding-right:20px}table th{color:var(--txtHintColor);font-weight:600;font-size:1rem;user-select:none;height:50px;line-height:var(--smLineHeight)}table th i{font-size:inherit}table td{height:60px;word-break:break-word}table .min-width{width:1%!important;white-space:nowrap}table .nowrap{white-space:nowrap}table .col-sort{cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);padding-right:30px;transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}table .col-sort:after{content:"";position:absolute;right:10px;top:50%;margin-top:-12.5px;line-height:25px;height:25px;font-family:var(--iconFontFamily);font-weight:400;color:var(--txtHintColor);opacity:0;transition:color var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed)}table .col-sort.sort-desc:after{content:""}table .col-sort.sort-asc:after{content:""}table .col-sort.sort-active:after{opacity:1}table .col-sort:hover,table .col-sort:focus-visible{background:var(--baseAlt1Color)}table .col-sort:hover:after,table .col-sort:focus-visible:after{opacity:1}table .col-sort:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}table .col-sort.col-sort-disabled{cursor:default;background:none}table .col-sort.col-sort-disabled:after{display:none}table .col-header-content{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px}table .col-header-content .txt{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table .col-field-created,table .col-field-updated,table .col-type-action{width:1%!important;white-space:nowrap}table .col-type-action{white-space:nowrap;text-align:right;color:var(--txtHintColor)}table .col-type-action i{display:inline-block;vertical-align:top;transition:transform var(--baseAnimationSpeed)}table td.col-type-json{font-family:monospace;font-size:var(--smFontSize);line-height:var(--smLineHeight);max-width:300px}table .col-type-text{max-width:300px}table .col-type-editor{min-width:250px}table .col-type-select{min-width:150px}table .col-type-email{min-width:120px;white-space:nowrap}table .col-type-file{min-width:100px}table td.col-field-id,table td.col-field-username{width:0;white-space:nowrap}table tr{outline:0;background:var(--bodyColor);transition:background var(--baseAnimationSpeed)}table tr.row-handle{cursor:pointer;user-select:none}table tr.row-handle:focus-visible,table tr.row-handle:hover,table tr.row-handle:active{background:var(--baseAlt1Color)}table tr.row-handle:focus-visible .action-col,table tr.row-handle:hover .action-col,table tr.row-handle:active .action-col{color:var(--txtPrimaryColor)}table tr.row-handle:focus-visible .action-col i,table tr.row-handle:hover .action-col i,table tr.row-handle:active .action-col i{transform:translate(3px)}table tr.row-handle:active{transition-duration:var(--activeAnimationSpeed)}table.table-border{border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}table.table-border tr{background:var(--baseColor)}table.table-border td,table.table-border th{height:45px}table.table-border th{background:var(--baseAlt1Color)}table.table-border>:last-child>:last-child th,table.table-border>:last-child>:last-child td{border-bottom:0}table.table-border>tr:first-child>:first-child,table.table-border>:first-child>tr:first-child>:first-child{border-top-left-radius:var(--baseRadius)}table.table-border>tr:first-child>:last-child,table.table-border>:first-child>tr:first-child>:last-child{border-top-right-radius:var(--baseRadius)}table.table-border>tr:last-child>:first-child,table.table-border>:last-child>tr:last-child>:first-child{border-bottom-left-radius:var(--baseRadius)}table.table-border>tr:last-child>:last-child,table.table-border>:last-child>tr:last-child>:last-child{border-bottom-right-radius:var(--baseRadius)}table.table-compact td,table.table-compact th{height:auto}table.table-animate tr{animation:entranceTop var(--entranceAnimationSpeed)}table.table-loading{pointer-events:none;opacity:.7}.table-wrapper{width:auto;padding:0;max-width:calc(100% + 2 * var(--baseSpacing));margin-left:calc(var(--baseSpacing) * -1);margin-right:calc(var(--baseSpacing) * -1)}.table-wrapper .bulk-select-col{min-width:70px}.table-wrapper td,.table-wrapper th{position:relative}.table-wrapper td:first-child,.table-wrapper th:first-child{padding-left:calc(var(--baseSpacing) + 3px)}.table-wrapper td:last-child,.table-wrapper th:last-child{padding-right:calc(var(--baseSpacing) + 3px)}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{position:sticky;z-index:99;transition:box-shadow var(--baseAnimationSpeed)}.table-wrapper .bulk-select-col{left:0px}.table-wrapper .col-type-action{right:0}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{background:inherit}.table-wrapper th.bulk-select-col,.table-wrapper th.col-type-action{background:var(--bodyColor)}.table-wrapper.scrollable .bulk-select-col{box-shadow:3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable .col-type-action{box-shadow:-3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable.scroll-start .bulk-select-col,.table-wrapper.scrollable.scroll-end .col-type-action{box-shadow:none}.searchbar{--searchHeight: 44px;outline:0;display:flex;align-items:center;min-height:var(--searchHeight);width:100%;flex-grow:1;padding:5px 7px;margin:0;white-space:nowrap;color:var(--txtHintColor);background:var(--baseAlt1Color);border-radius:var(--btnHeight);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.searchbar>:first-child{border-top-left-radius:var(--btnHeight);border-bottom-left-radius:var(--btnHeight)}.searchbar>:last-child{border-top-right-radius:var(--btnHeight);border-bottom-right-radius:var(--btnHeight)}.searchbar .btn{border-radius:var(--btnHeight)}.searchbar .code-editor,.searchbar input,.searchbar input:focus{font-size:var(--baseFontSize);font-family:var(--monospaceFontFamily);border:0;background:none;min-height:0;padding-top:0;padding-bottom:0}.searchbar label>i{line-height:inherit}.searchbar .search-options{flex-shrink:0;width:90px}.searchbar .search-options .selected-container{border-radius:inherit;background:none;padding-right:25px!important}.searchbar .search-options:not(:focus-within) .selected-container{color:var(--txtHintColor)}.searchbar:focus-within{color:var(--txtPrimaryColor);background:var(--baseAlt2Color)}.bulkbar{position:sticky;bottom:var(--baseSpacing);z-index:101;gap:10px;display:flex;justify-content:center;align-items:center;width:var(--smWrapperWidth);max-width:100%;margin:var(--smSpacing) auto;padding:10px var(--smSpacing);border-radius:var(--btnHeight);background:var(--baseColor);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.flatpickr-calendar{opacity:0;display:none;text-align:center;visibility:hidden;padding:0;animation:none;direction:ltr;border:0;font-size:1rem;line-height:24px;position:absolute;width:298px;box-sizing:border-box;user-select:none;color:var(--txtPrimaryColor);background:var(--baseColor);border-radius:var(--baseRadius);box-shadow:0 2px 5px 0 var(--shadowColor),0 0 0 1px var(--baseAlt2Color)}.flatpickr-calendar input,.flatpickr-calendar select{box-shadow:none;min-height:0;height:var(--smBtnHeight);padding-top:3px;padding-bottom:3px;background:none;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:0;width:100%}.flatpickr-calendar.static{position:absolute;top:100%;margin-top:2px;margin-bottom:10px;width:100%}.flatpickr-calendar.static .flatpickr-days{width:100%}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color);box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid var(--baseAlt2Color)}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowTop:after{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:after{border-top-color:var(--baseColor)}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative}.flatpickr-months{display:flex;align-items:center;padding:5px 0}.flatpickr-months .flatpickr-month{display:flex;align-items:center;justify-content:center;background:transparent;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor);line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{display:flex;align-items:center;text-decoration:none;cursor:pointer;height:34px;padding:5px 12px;z-index:3;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:var(--txtHintColor)}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto;border-radius:var(--baseRadius)}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:var(--baseAlt1Color)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{line-height:inherit;color:inherit;width:85%;padding:1px 0;line-height:1;display:flex;gap:10px;align-items:center;justify-content:center;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:var(--baseAlt1Color)}.flatpickr-current-month .numInputWrapper{display:inline-flex;align-items:center;justify-content:center;width:62px}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:text;margin:0;display:inline-block;font-size:inherit;font-family:inherit;line-height:inherit;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{color:var(--txtDisabledColor);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;line-height:inherit;outline:none;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:var(--baseAlt1Color)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{display:block;flex:1;margin:0;cursor:default;line-height:1;background:transparent;color:var(--txtHintColor);text-align:center;font-weight:bolder;font-size:var(--smFontSize)}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:100%;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 var(--baseAlt2Color);box-shadow:-1px 0 0 var(--baseAlt2Color)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:var(--baseRadius);box-sizing:border-box;color:var(--txtPrimaryColor);cursor:pointer;font-weight:400;width:calc(14.2857143% - 2px);flex-basis:calc(14.2857143% - 2px);height:39px;margin:1px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-align:center;flex-direction:column}.flatpickr-day.weekend,.flatpickr-day:nth-child(7n+6),.flatpickr-day:nth-child(7n+7){color:var(--dangerColor)}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:var(--baseAlt2Color);border-color:var(--baseAlt2Color)}.flatpickr-day.today{border-color:var(--baseColor)}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:var(--primaryColor);background:var(--primaryColor);color:var(--baseColor)}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:var(--primaryColor);-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:var(--primaryColor)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 var(--primaryColor);box-shadow:-10px 0 0 var(--primaryColor)}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;box-shadow:-5px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:var(--txtDisabledColor);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:var(--txtDisabledColor);background:var(--baseAlt2Color)}.flatpickr-day.week.selected{border-radius:0;box-shadow:-5px 0 0 var(--primaryColor),5px 0 0 var(--primaryColor)}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 var(--baseAlt2Color);box-shadow:1px 0 0 var(--baseAlt2Color)}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:var(--txtHintColor);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:flex;box-sizing:border-box;overflow:hidden;padding:5px}.flatpickr-rContainer{display:inline-block;padding:0;width:100%;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:var(--txtPrimaryColor);font-size:14px;position:relative;box-sizing:border-box;background:var(--baseColor);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:var(--txtPrimaryColor);font-weight:700;width:2%;user-select:none;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:var(--baseAlt1Color)}.flatpickr-input[readonly]{cursor:pointer}@keyframes fpFadeInDown{0%{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translateZ(0)}}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .prevMonthDay{visibility:hidden}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .nextMonthDay,.flatpickr-inline-container .flatpickr-input{display:none}.flatpickr-inline-container .flatpickr-calendar{margin:0;box-shadow:none;border:1px solid var(--baseAlt2Color)}.docs-sidebar{--itemsSpacing: 10px;--itemsHeight: 40px;position:relative;min-width:180px;max-width:300px;height:100%;flex-shrink:0;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;background:var(--bodyColor);padding:var(--smSpacing) var(--xsSpacing);border-right:1px solid var(--baseAlt1Color)}.docs-sidebar .sidebar-content{display:block;width:100%}.docs-sidebar .sidebar-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:flex;width:100%;gap:10px;align-items:center;text-align:right;justify-content:start;padding:5px 15px;margin:0 0 var(--itemsSpacing) 0;font-size:var(--lgFontSize);min-height:var(--itemsHeight);border-radius:var(--baseRadius);user-select:none;color:var(--txtHintColor);transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.docs-sidebar .sidebar-item:last-child{margin-bottom:0}.docs-sidebar .sidebar-item:focus-visible,.docs-sidebar .sidebar-item:hover,.docs-sidebar .sidebar-item:active,.docs-sidebar .sidebar-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.docs-sidebar .sidebar-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.docs-sidebar.compact .sidebar-item{--itemsSpacing: 7px}.docs-content{width:100%;display:block;padding:calc(var(--baseSpacing) - 3px) var(--baseSpacing);overflow:auto}.docs-content-wrapper{display:flex;width:100%;height:100%}.docs-panel{width:960px;height:100%}.docs-panel .overlay-panel-section.panel-header{padding:0;border:0;box-shadow:none}.docs-panel .overlay-panel-section.panel-content{padding:0!important}.docs-panel .overlay-panel-section.panel-footer{display:none}@media screen and (max-width: 1000px){.docs-panel .overlay-panel-section.panel-footer{display:flex}}.schema-field-header{position:relative;display:flex;width:100%;min-height:42px;gap:5px;padding:0 5px;align-items:center;justify-content:stretch;background:var(--baseAlt1Color);border-radius:var(--baseRadius);transition:border-radius var(--baseAnimationSpeed)}.schema-field-header .form-field{margin:0}.schema-field-header .form-field .form-field-addon.prefix{left:10px}.schema-field-header .form-field .form-field-addon.prefix~input,.schema-field-header .form-field .form-field-addon.prefix~select,.schema-field-header .form-field .form-field-addon.prefix~textarea,.schema-field-header .form-field .select .form-field-addon.prefix~.selected-container,.select .schema-field-header .form-field .form-field-addon.prefix~.selected-container,.schema-field-header .form-field .form-field-addon.prefix~.code-editor,.schema-field-header .form-field .form-field-addon.prefix~.tinymce-wrapper{padding-left:37px}.schema-field-header .options-trigger{padding:2px;margin:0 3px}.schema-field-header .options-trigger i{transition:transform var(--baseAnimationSpeed)}.schema-field-header .separator{flex-shrink:0;width:1px;height:42px;background:rgba(0,0,0,.05)}.schema-field-header .drag-handle-wrapper{position:absolute;top:0;left:auto;right:100%;height:100%;display:flex;align-items:center}.schema-field-header .drag-handle{padding:0 5px;transform:translate(5px);opacity:0;visibility:hidden}.schema-field-header .form-field-single-multiple-select{width:100px;flex-shrink:0}.schema-field-header .form-field-single-multiple-select .dropdown{min-width:0}.schema-field-header .markers{position:absolute;z-index:1;left:4px;top:4px;display:inline-flex;align-items:center;gap:5px}.schema-field-header .markers .marker{display:block;width:4px;height:4px;border-radius:4px;background:var(--baseAlt4Color)}.schema-field-options{background:#fff;padding:var(--xsSpacing);border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}.schema-field{position:relative;margin:0 0 var(--xsSpacing);border-radius:var(--baseRadius);background:var(--baseAlt1Color);transition:border var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed);border:2px solid var(--baseAlt1Color)}.schema-field:not(.deleted):hover .drag-handle{transform:translate(0);opacity:1;visibility:visible}.schema-field.drag-over{opacity:.5}.schema-field.expanded{box-shadow:0 2px 5px 0 var(--shadowColor);border-color:var(--baseAlt2Color)}.schema-field.expanded .schema-field-header{border-bottom-left-radius:0;border-bottom-right-radius:0}.schema-field.expanded .schema-field-header .options-trigger i{transform:rotate(-60deg)}.schema-field.expanded .schema-field-options{border-top:2px solid var(--baseAlt2Color)}.schema-field.deleted .schema-field-header{background:var(--bodyColor)}.schema-field.deleted .markers,.schema-field.deleted .separator{opacity:.5}.schema-field.deleted input,.schema-field.deleted select,.schema-field.deleted textarea,.schema-field.deleted .select .selected-container,.select .schema-field.deleted .selected-container,.schema-field.deleted .code-editor,.schema-field.deleted .tinymce-wrapper{background:none;box-shadow:none}.panel-wrapper.svelte-lxxzfu{animation:slideIn .2s}@keyframes svelte-1bvelc2-refresh{to{transform:rotate(180deg)}}.btn.refreshing.svelte-1bvelc2 i.svelte-1bvelc2{animation:svelte-1bvelc2-refresh .15s ease-out}.datetime.svelte-zdiknu{width:100%;display:block;line-height:var(--smLineHeight)}.time.svelte-zdiknu{font-size:var(--smFontSize);color:var(--txtHintColor)}.horizontal-scroller.svelte-wc2j9h{width:auto;overflow-x:auto}.horizontal-scroller-wrapper.svelte-wc2j9h{position:relative}.horizontal-scroller-wrapper .columns-dropdown{top:40px;z-index:100;max-height:340px}.chart-wrapper.svelte-vh4sl8.svelte-vh4sl8{position:relative;display:block;width:100%}.chart-wrapper.loading.svelte-vh4sl8 .chart-canvas.svelte-vh4sl8{pointer-events:none;opacity:.5}.chart-loader.svelte-vh4sl8.svelte-vh4sl8{position:absolute;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%)}.prism-light code[class*=language-],.prism-light pre[class*=language-]{color:#111b27;background:0 0;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.prism-light code[class*=language-] ::-moz-selection,.prism-light code[class*=language-]::-moz-selection,.prism-light pre[class*=language-] ::-moz-selection,.prism-light pre[class*=language-]::-moz-selection{background:#8da1b9}.prism-light code[class*=language-] ::selection,.prism-light code[class*=language-]::selection,.prism-light pre[class*=language-] ::selection,.prism-light pre[class*=language-]::selection{background:#8da1b9}.prism-light pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.prism-light :not(pre)>code[class*=language-],.prism-light pre[class*=language-]{background:#e3eaf2}.prism-light :not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal}.prism-light .token.cdata,.prism-light .token.comment,.prism-light .token.doctype,.prism-light .token.prolog{color:#3c526d}.prism-light .token.punctuation{color:#111b27}.prism-light .token.delimiter.important,.prism-light .token.selector .parent,.prism-light .token.tag,.prism-light .token.tag .token.punctuation{color:#006d6d}.prism-light .token.attr-name,.prism-light .token.boolean,.prism-light .token.boolean.important,.prism-light .token.constant,.prism-light .token.number,.prism-light .token.selector .token.attribute{color:#755f00}.prism-light .token.class-name,.prism-light .token.key,.prism-light .token.parameter,.prism-light .token.property,.prism-light .token.property-access,.prism-light .token.variable{color:#005a8e}.prism-light .token.attr-value,.prism-light .token.color,.prism-light .token.inserted,.prism-light .token.selector .token.value,.prism-light .token.string,.prism-light .token.string .token.url-link{color:#116b00}.prism-light .token.builtin,.prism-light .token.keyword-array,.prism-light .token.package,.prism-light .token.regex{color:#af00af}.prism-light .token.function,.prism-light .token.selector .token.class,.prism-light .token.selector .token.id{color:#7c00aa}.prism-light .token.atrule .token.rule,.prism-light .token.combinator,.prism-light .token.keyword,.prism-light .token.operator,.prism-light .token.pseudo-class,.prism-light .token.pseudo-element,.prism-light .token.selector,.prism-light .token.unit{color:#a04900}.prism-light .token.deleted,.prism-light .token.important{color:#c22f2e}.prism-light .token.keyword-this,.prism-light .token.this{color:#005a8e}.prism-light .token.bold,.prism-light .token.important,.prism-light .token.keyword-this,.prism-light .token.this{font-weight:700}.prism-light .token.delimiter.important{font-weight:inherit}.prism-light .token.italic{font-style:italic}.prism-light .token.entity{cursor:help}.prism-light .language-markdown .token.title,.prism-light .language-markdown .token.title .token.punctuation{color:#005a8e;font-weight:700}.prism-light .language-markdown .token.blockquote.punctuation{color:#af00af}.prism-light .language-markdown .token.code{color:#006d6d}.prism-light .language-markdown .token.hr.punctuation{color:#005a8e}.prism-light .language-markdown .token.url>.token.content{color:#116b00}.prism-light .language-markdown .token.url-link{color:#755f00}.prism-light .language-markdown .token.list.punctuation{color:#af00af}.prism-light .language-markdown .token.table-header,.prism-light .language-json .token.operator{color:#111b27}.prism-light .language-scss .token.variable{color:#006d6d}.prism-light .token.token.cr:before,.prism-light .token.token.lf:before,.prism-light .token.token.space:before,.prism-light .token.token.tab:not(:empty):before{color:#3c526d}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button{color:#e3eaf2;background:#005a8e}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover{color:#e3eaf2;background:rgba(0,90,142,.8549019608);text-decoration:none}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover{color:#e3eaf2;background:#3c526d}.prism-light .line-highlight.line-highlight{background:rgba(141,161,185,.1843137255);background:linear-gradient(to right,rgba(141,161,185,.1843137255) 70%,rgba(141,161,185,.1450980392))}.prism-light .line-highlight.line-highlight:before,.prism-light .line-highlight.line-highlight[data-end]:after{background-color:#3c526d;color:#e3eaf2;box-shadow:0 1px #8da1b9}.prism-light pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#3c526d1f}.prism-light .line-numbers.line-numbers .line-numbers-rows{border-right:1px solid rgba(141,161,185,.4784313725);background:rgba(208,218,231,.4784313725)}.prism-light .line-numbers .line-numbers-rows>span:before{color:#3c526dda}.prism-light .rainbow-braces .token.token.punctuation.brace-level-1,.prism-light .rainbow-braces .token.token.punctuation.brace-level-5,.prism-light .rainbow-braces .token.token.punctuation.brace-level-9{color:#755f00}.prism-light .rainbow-braces .token.token.punctuation.brace-level-10,.prism-light .rainbow-braces .token.token.punctuation.brace-level-2,.prism-light .rainbow-braces .token.token.punctuation.brace-level-6{color:#af00af}.prism-light .rainbow-braces .token.token.punctuation.brace-level-11,.prism-light .rainbow-braces .token.token.punctuation.brace-level-3,.prism-light .rainbow-braces .token.token.punctuation.brace-level-7{color:#005a8e}.prism-light .rainbow-braces .token.token.punctuation.brace-level-12,.prism-light .rainbow-braces .token.token.punctuation.brace-level-4,.prism-light .rainbow-braces .token.token.punctuation.brace-level-8{color:#7c00aa}.prism-light pre.diff-highlight>code .token.token.deleted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#c22f2e1f}.prism-light pre.diff-highlight>code .token.token.inserted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#116b001f}.prism-light .command-line .command-line-prompt{border-right:1px solid rgba(141,161,185,.4784313725)}.prism-light .command-line .command-line-prompt>span:before{color:#3c526dda}code.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;padding:10px 15px;white-space:pre-wrap;word-break:break-word}.code-wrapper.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;max-height:100%;overflow:auto;overflow:overlay}.prism-light.svelte-10s5tkd code.svelte-10s5tkd{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.indexes-list.svelte-167lbwu{display:flex;flex-wrap:wrap;width:100%;gap:10px}.label.svelte-167lbwu{overflow:hidden;min-width:50px}.field-types-btn.active.svelte-1gz9b6p{border-bottom-left-radius:0;border-bottom-right-radius:0}.field-types-dropdown{display:flex;flex-wrap:wrap;width:100%;max-width:none;padding:10px;margin-top:2px;border:0;box-shadow:0 0 0 2px var(--primaryColor);border-top-left-radius:0;border-top-right-radius:0}.field-types-dropdown .dropdown-item.svelte-1gz9b6p{width:25%}.form-field-file-max-select{width:100px;flex-shrink:0}.lock-toggle.svelte-1akuazq.svelte-1akuazq{position:absolute;right:0px;top:0px;min-width:135px;padding:10px;border-top-left-radius:0;border-bottom-right-radius:0;background:rgba(53,71,104,.09)}.rule-field .code-editor .cm-placeholder{font-family:var(--baseFontFamily)}.input-wrapper.svelte-1akuazq.svelte-1akuazq{position:relative}.unlock-overlay.svelte-1akuazq.svelte-1akuazq{--hoverAnimationSpeed:.2s;position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;display:flex;padding:20px;gap:10px;align-items:center;justify-content:end;text-align:center;border-radius:var(--baseRadius);background:rgba(255,255,255,.2);outline:0;cursor:pointer;text-decoration:none;color:var(--successColor);border:2px solid var(--baseAlt1Color);transition:border-color var(--baseAnimationSpeed)}.unlock-overlay.svelte-1akuazq i.svelte-1akuazq{font-size:inherit}.unlock-overlay.svelte-1akuazq .icon.svelte-1akuazq{color:var(--successColor);font-size:1.15rem;line-height:1;font-weight:400;transition:transform var(--hoverAnimationSpeed)}.unlock-overlay.svelte-1akuazq .txt.svelte-1akuazq{opacity:0;font-size:var(--xsFontSize);font-weight:600;line-height:var(--smLineHeight);transform:translate(5px);transition:transform var(--hoverAnimationSpeed),opacity var(--hoverAnimationSpeed)}.unlock-overlay.svelte-1akuazq.svelte-1akuazq:hover,.unlock-overlay.svelte-1akuazq.svelte-1akuazq:focus-visible,.unlock-overlay.svelte-1akuazq.svelte-1akuazq:active{border-color:var(--baseAlt3Color)}.unlock-overlay.svelte-1akuazq:hover .icon.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:focus-visible .icon.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:active .icon.svelte-1akuazq{transform:scale(1.1)}.unlock-overlay.svelte-1akuazq:hover .txt.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:focus-visible .txt.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:active .txt.svelte-1akuazq{opacity:1;transform:scale(1)}.unlock-overlay.svelte-1akuazq.svelte-1akuazq:active{transition-duration:var(--activeAnimationSpeed);border-color:var(--baseAlt3Color)}.changes-list.svelte-xqpcsf.svelte-xqpcsf{word-break:break-word;line-height:var(--smLineHeight)}.changes-list.svelte-xqpcsf li.svelte-xqpcsf{margin-top:10px;margin-bottom:10px}.upsert-panel-title.svelte-12y0yzb{display:inline-flex;align-items:center;min-height:var(--smBtnHeight)}.tabs-content.svelte-12y0yzb:focus-within{z-index:9}.email-visibility-addon.svelte-1751a4d~input.svelte-1751a4d{padding-right:100px}textarea.svelte-1x1pbts{resize:none;padding-top:4px!important;padding-bottom:5px!important;min-height:var(--inputHeight);height:var(--inputHeight)}.clear-btn.svelte-11df51y{margin-top:20px}.draggable.svelte-28orm4{user-select:none;outline:0;min-width:0}.record-info.svelte-fhw3qk.svelte-fhw3qk{display:inline-flex;vertical-align:top;align-items:center;max-width:100%;min-width:0;gap:5px;line-height:normal}.record-info.svelte-fhw3qk>.svelte-fhw3qk{line-height:inherit}.record-info.svelte-fhw3qk .thumb{box-shadow:none}.picker-list.svelte-1u8jhky{max-height:380px}.selected-list.svelte-1u8jhky{display:flex;flex-wrap:wrap;align-items:center;gap:10px;max-height:220px;overflow:auto}.relations-list.svelte-1ynw0pc{max-height:300px;overflow:auto;overflow:overlay}.panel-title.svelte-qc5ngu{line-height:var(--smBtnHeight)}.fallback-block.svelte-jdf51v{max-height:100px;overflow:auto}.col-field.svelte-1nt58f7{max-width:1px}.export-preview.svelte-jm5c4z.svelte-jm5c4z{position:relative;height:500px}.export-preview.svelte-jm5c4z .copy-schema.svelte-jm5c4z{position:absolute;right:15px;top:15px}.collections-diff-table.svelte-lmkr38.svelte-lmkr38{color:var(--txtHintColor);border:2px solid var(--primaryColor)}.collections-diff-table.svelte-lmkr38 tr.svelte-lmkr38{background:none}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38,.collections-diff-table.svelte-lmkr38 td.svelte-lmkr38{height:auto;padding:2px 15px;border-bottom:1px solid rgba(0,0,0,.07)}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38{height:35px;padding:4px 15px;color:var(--txtPrimaryColor)}.collections-diff-table.svelte-lmkr38 thead tr.svelte-lmkr38{background:var(--primaryColor)}.collections-diff-table.svelte-lmkr38 thead tr th.svelte-lmkr38{color:var(--baseColor);background:none}.collections-diff-table.svelte-lmkr38 .label.svelte-lmkr38{font-weight:400}.collections-diff-table.svelte-lmkr38 .changed-none-col.svelte-lmkr38{color:var(--txtDisabledColor);background:var(--baseAlt1Color)}.collections-diff-table.svelte-lmkr38 .changed-old-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--dangerAltColor)}.collections-diff-table.svelte-lmkr38 .changed-new-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--successAltColor)}.collections-diff-table.svelte-lmkr38 .field-key-col.svelte-lmkr38{padding-left:30px}.list-label.svelte-1jx20fl{min-width:65px} +@charset "UTF-8";@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #a0a6ac;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #e4e9ec;--baseAlt2Color: #d7dde4;--baseAlt3Color: #c6cdd7;--baseAlt4Color: #a5b0c0;--infoColor: #5499e8;--infoAltColor: #cee2f8;--successColor: #32ad84;--successAltColor: #c4eedc;--dangerColor: #e34562;--dangerAltColor: #f7cad2;--warningColor: #ff944d;--warningAltColor: #ffd4b8;--overlayColor: rgba(53, 71, 104, .28);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .06);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 22px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--entranceAnimationSpeed: .25s;--baseRadius: 4px;--lgRadius: 12px;--btnRadius: 4px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:""}.ri-24-hours-line:before{content:""}.ri-4k-fill:before{content:""}.ri-4k-line:before{content:""}.ri-a-b:before{content:""}.ri-account-box-fill:before{content:""}.ri-account-box-line:before{content:""}.ri-account-circle-fill:before{content:""}.ri-account-circle-line:before{content:""}.ri-account-pin-box-fill:before{content:""}.ri-account-pin-box-line:before{content:""}.ri-account-pin-circle-fill:before{content:""}.ri-account-pin-circle-line:before{content:""}.ri-add-box-fill:before{content:""}.ri-add-box-line:before{content:""}.ri-add-circle-fill:before{content:""}.ri-add-circle-line:before{content:""}.ri-add-fill:before{content:""}.ri-add-line:before{content:""}.ri-admin-fill:before{content:""}.ri-admin-line:before{content:""}.ri-advertisement-fill:before{content:""}.ri-advertisement-line:before{content:""}.ri-airplay-fill:before{content:""}.ri-airplay-line:before{content:""}.ri-alarm-fill:before{content:""}.ri-alarm-line:before{content:""}.ri-alarm-warning-fill:before{content:""}.ri-alarm-warning-line:before{content:""}.ri-album-fill:before{content:""}.ri-album-line:before{content:""}.ri-alert-fill:before{content:""}.ri-alert-line:before{content:""}.ri-aliens-fill:before{content:""}.ri-aliens-line:before{content:""}.ri-align-bottom:before{content:""}.ri-align-center:before{content:""}.ri-align-justify:before{content:""}.ri-align-left:before{content:""}.ri-align-right:before{content:""}.ri-align-top:before{content:""}.ri-align-vertically:before{content:""}.ri-alipay-fill:before{content:""}.ri-alipay-line:before{content:""}.ri-amazon-fill:before{content:""}.ri-amazon-line:before{content:""}.ri-anchor-fill:before{content:""}.ri-anchor-line:before{content:""}.ri-ancient-gate-fill:before{content:""}.ri-ancient-gate-line:before{content:""}.ri-ancient-pavilion-fill:before{content:""}.ri-ancient-pavilion-line:before{content:""}.ri-android-fill:before{content:""}.ri-android-line:before{content:""}.ri-angularjs-fill:before{content:""}.ri-angularjs-line:before{content:""}.ri-anticlockwise-2-fill:before{content:""}.ri-anticlockwise-2-line:before{content:""}.ri-anticlockwise-fill:before{content:""}.ri-anticlockwise-line:before{content:""}.ri-app-store-fill:before{content:""}.ri-app-store-line:before{content:""}.ri-apple-fill:before{content:""}.ri-apple-line:before{content:""}.ri-apps-2-fill:before{content:""}.ri-apps-2-line:before{content:""}.ri-apps-fill:before{content:""}.ri-apps-line:before{content:""}.ri-archive-drawer-fill:before{content:""}.ri-archive-drawer-line:before{content:""}.ri-archive-fill:before{content:""}.ri-archive-line:before{content:""}.ri-arrow-down-circle-fill:before{content:""}.ri-arrow-down-circle-line:before{content:""}.ri-arrow-down-fill:before{content:""}.ri-arrow-down-line:before{content:""}.ri-arrow-down-s-fill:before{content:""}.ri-arrow-down-s-line:before{content:""}.ri-arrow-drop-down-fill:before{content:""}.ri-arrow-drop-down-line:before{content:""}.ri-arrow-drop-left-fill:before{content:""}.ri-arrow-drop-left-line:before{content:""}.ri-arrow-drop-right-fill:before{content:""}.ri-arrow-drop-right-line:before{content:""}.ri-arrow-drop-up-fill:before{content:""}.ri-arrow-drop-up-line:before{content:""}.ri-arrow-go-back-fill:before{content:""}.ri-arrow-go-back-line:before{content:""}.ri-arrow-go-forward-fill:before{content:""}.ri-arrow-go-forward-line:before{content:""}.ri-arrow-left-circle-fill:before{content:""}.ri-arrow-left-circle-line:before{content:""}.ri-arrow-left-down-fill:before{content:""}.ri-arrow-left-down-line:before{content:""}.ri-arrow-left-fill:before{content:""}.ri-arrow-left-line:before{content:""}.ri-arrow-left-right-fill:before{content:""}.ri-arrow-left-right-line:before{content:""}.ri-arrow-left-s-fill:before{content:""}.ri-arrow-left-s-line:before{content:""}.ri-arrow-left-up-fill:before{content:""}.ri-arrow-left-up-line:before{content:""}.ri-arrow-right-circle-fill:before{content:""}.ri-arrow-right-circle-line:before{content:""}.ri-arrow-right-down-fill:before{content:""}.ri-arrow-right-down-line:before{content:""}.ri-arrow-right-fill:before{content:""}.ri-arrow-right-line:before{content:""}.ri-arrow-right-s-fill:before{content:""}.ri-arrow-right-s-line:before{content:""}.ri-arrow-right-up-fill:before{content:""}.ri-arrow-right-up-line:before{content:""}.ri-arrow-up-circle-fill:before{content:""}.ri-arrow-up-circle-line:before{content:""}.ri-arrow-up-down-fill:before{content:""}.ri-arrow-up-down-line:before{content:""}.ri-arrow-up-fill:before{content:""}.ri-arrow-up-line:before{content:""}.ri-arrow-up-s-fill:before{content:""}.ri-arrow-up-s-line:before{content:""}.ri-artboard-2-fill:before{content:""}.ri-artboard-2-line:before{content:""}.ri-artboard-fill:before{content:""}.ri-artboard-line:before{content:""}.ri-article-fill:before{content:""}.ri-article-line:before{content:""}.ri-aspect-ratio-fill:before{content:""}.ri-aspect-ratio-line:before{content:""}.ri-asterisk:before{content:""}.ri-at-fill:before{content:""}.ri-at-line:before{content:""}.ri-attachment-2:before{content:""}.ri-attachment-fill:before{content:""}.ri-attachment-line:before{content:""}.ri-auction-fill:before{content:""}.ri-auction-line:before{content:""}.ri-award-fill:before{content:""}.ri-award-line:before{content:""}.ri-baidu-fill:before{content:""}.ri-baidu-line:before{content:""}.ri-ball-pen-fill:before{content:""}.ri-ball-pen-line:before{content:""}.ri-bank-card-2-fill:before{content:""}.ri-bank-card-2-line:before{content:""}.ri-bank-card-fill:before{content:""}.ri-bank-card-line:before{content:""}.ri-bank-fill:before{content:""}.ri-bank-line:before{content:""}.ri-bar-chart-2-fill:before{content:""}.ri-bar-chart-2-line:before{content:""}.ri-bar-chart-box-fill:before{content:""}.ri-bar-chart-box-line:before{content:""}.ri-bar-chart-fill:before{content:""}.ri-bar-chart-grouped-fill:before{content:""}.ri-bar-chart-grouped-line:before{content:""}.ri-bar-chart-horizontal-fill:before{content:""}.ri-bar-chart-horizontal-line:before{content:""}.ri-bar-chart-line:before{content:""}.ri-barcode-box-fill:before{content:""}.ri-barcode-box-line:before{content:""}.ri-barcode-fill:before{content:""}.ri-barcode-line:before{content:""}.ri-barricade-fill:before{content:""}.ri-barricade-line:before{content:""}.ri-base-station-fill:before{content:""}.ri-base-station-line:before{content:""}.ri-basketball-fill:before{content:""}.ri-basketball-line:before{content:""}.ri-battery-2-charge-fill:before{content:""}.ri-battery-2-charge-line:before{content:""}.ri-battery-2-fill:before{content:""}.ri-battery-2-line:before{content:""}.ri-battery-charge-fill:before{content:""}.ri-battery-charge-line:before{content:""}.ri-battery-fill:before{content:""}.ri-battery-line:before{content:""}.ri-battery-low-fill:before{content:""}.ri-battery-low-line:before{content:""}.ri-battery-saver-fill:before{content:""}.ri-battery-saver-line:before{content:""}.ri-battery-share-fill:before{content:""}.ri-battery-share-line:before{content:""}.ri-bear-smile-fill:before{content:""}.ri-bear-smile-line:before{content:""}.ri-behance-fill:before{content:""}.ri-behance-line:before{content:""}.ri-bell-fill:before{content:""}.ri-bell-line:before{content:""}.ri-bike-fill:before{content:""}.ri-bike-line:before{content:""}.ri-bilibili-fill:before{content:""}.ri-bilibili-line:before{content:""}.ri-bill-fill:before{content:""}.ri-bill-line:before{content:""}.ri-billiards-fill:before{content:""}.ri-billiards-line:before{content:""}.ri-bit-coin-fill:before{content:""}.ri-bit-coin-line:before{content:""}.ri-blaze-fill:before{content:""}.ri-blaze-line:before{content:""}.ri-bluetooth-connect-fill:before{content:""}.ri-bluetooth-connect-line:before{content:""}.ri-bluetooth-fill:before{content:""}.ri-bluetooth-line:before{content:""}.ri-blur-off-fill:before{content:""}.ri-blur-off-line:before{content:""}.ri-body-scan-fill:before{content:""}.ri-body-scan-line:before{content:""}.ri-bold:before{content:""}.ri-book-2-fill:before{content:""}.ri-book-2-line:before{content:""}.ri-book-3-fill:before{content:""}.ri-book-3-line:before{content:""}.ri-book-fill:before{content:""}.ri-book-line:before{content:""}.ri-book-mark-fill:before{content:""}.ri-book-mark-line:before{content:""}.ri-book-open-fill:before{content:""}.ri-book-open-line:before{content:""}.ri-book-read-fill:before{content:""}.ri-book-read-line:before{content:""}.ri-booklet-fill:before{content:""}.ri-booklet-line:before{content:""}.ri-bookmark-2-fill:before{content:""}.ri-bookmark-2-line:before{content:""}.ri-bookmark-3-fill:before{content:""}.ri-bookmark-3-line:before{content:""}.ri-bookmark-fill:before{content:""}.ri-bookmark-line:before{content:""}.ri-boxing-fill:before{content:""}.ri-boxing-line:before{content:""}.ri-braces-fill:before{content:""}.ri-braces-line:before{content:""}.ri-brackets-fill:before{content:""}.ri-brackets-line:before{content:""}.ri-briefcase-2-fill:before{content:""}.ri-briefcase-2-line:before{content:""}.ri-briefcase-3-fill:before{content:""}.ri-briefcase-3-line:before{content:""}.ri-briefcase-4-fill:before{content:""}.ri-briefcase-4-line:before{content:""}.ri-briefcase-5-fill:before{content:""}.ri-briefcase-5-line:before{content:""}.ri-briefcase-fill:before{content:""}.ri-briefcase-line:before{content:""}.ri-bring-forward:before{content:""}.ri-bring-to-front:before{content:""}.ri-broadcast-fill:before{content:""}.ri-broadcast-line:before{content:""}.ri-brush-2-fill:before{content:""}.ri-brush-2-line:before{content:""}.ri-brush-3-fill:before{content:""}.ri-brush-3-line:before{content:""}.ri-brush-4-fill:before{content:""}.ri-brush-4-line:before{content:""}.ri-brush-fill:before{content:""}.ri-brush-line:before{content:""}.ri-bubble-chart-fill:before{content:""}.ri-bubble-chart-line:before{content:""}.ri-bug-2-fill:before{content:""}.ri-bug-2-line:before{content:""}.ri-bug-fill:before{content:""}.ri-bug-line:before{content:""}.ri-building-2-fill:before{content:""}.ri-building-2-line:before{content:""}.ri-building-3-fill:before{content:""}.ri-building-3-line:before{content:""}.ri-building-4-fill:before{content:""}.ri-building-4-line:before{content:""}.ri-building-fill:before{content:""}.ri-building-line:before{content:""}.ri-bus-2-fill:before{content:""}.ri-bus-2-line:before{content:""}.ri-bus-fill:before{content:""}.ri-bus-line:before{content:""}.ri-bus-wifi-fill:before{content:""}.ri-bus-wifi-line:before{content:""}.ri-cactus-fill:before{content:""}.ri-cactus-line:before{content:""}.ri-cake-2-fill:before{content:""}.ri-cake-2-line:before{content:""}.ri-cake-3-fill:before{content:""}.ri-cake-3-line:before{content:""}.ri-cake-fill:before{content:""}.ri-cake-line:before{content:""}.ri-calculator-fill:before{content:""}.ri-calculator-line:before{content:""}.ri-calendar-2-fill:before{content:""}.ri-calendar-2-line:before{content:""}.ri-calendar-check-fill:before{content:""}.ri-calendar-check-line:before{content:""}.ri-calendar-event-fill:before{content:""}.ri-calendar-event-line:before{content:""}.ri-calendar-fill:before{content:""}.ri-calendar-line:before{content:""}.ri-calendar-todo-fill:before{content:""}.ri-calendar-todo-line:before{content:""}.ri-camera-2-fill:before{content:""}.ri-camera-2-line:before{content:""}.ri-camera-3-fill:before{content:""}.ri-camera-3-line:before{content:""}.ri-camera-fill:before{content:""}.ri-camera-lens-fill:before{content:""}.ri-camera-lens-line:before{content:""}.ri-camera-line:before{content:""}.ri-camera-off-fill:before{content:""}.ri-camera-off-line:before{content:""}.ri-camera-switch-fill:before{content:""}.ri-camera-switch-line:before{content:""}.ri-capsule-fill:before{content:""}.ri-capsule-line:before{content:""}.ri-car-fill:before{content:""}.ri-car-line:before{content:""}.ri-car-washing-fill:before{content:""}.ri-car-washing-line:before{content:""}.ri-caravan-fill:before{content:""}.ri-caravan-line:before{content:""}.ri-cast-fill:before{content:""}.ri-cast-line:before{content:""}.ri-cellphone-fill:before{content:""}.ri-cellphone-line:before{content:""}.ri-celsius-fill:before{content:""}.ri-celsius-line:before{content:""}.ri-centos-fill:before{content:""}.ri-centos-line:before{content:""}.ri-character-recognition-fill:before{content:""}.ri-character-recognition-line:before{content:""}.ri-charging-pile-2-fill:before{content:""}.ri-charging-pile-2-line:before{content:""}.ri-charging-pile-fill:before{content:""}.ri-charging-pile-line:before{content:""}.ri-chat-1-fill:before{content:""}.ri-chat-1-line:before{content:""}.ri-chat-2-fill:before{content:""}.ri-chat-2-line:before{content:""}.ri-chat-3-fill:before{content:""}.ri-chat-3-line:before{content:""}.ri-chat-4-fill:before{content:""}.ri-chat-4-line:before{content:""}.ri-chat-check-fill:before{content:""}.ri-chat-check-line:before{content:""}.ri-chat-delete-fill:before{content:""}.ri-chat-delete-line:before{content:""}.ri-chat-download-fill:before{content:""}.ri-chat-download-line:before{content:""}.ri-chat-follow-up-fill:before{content:""}.ri-chat-follow-up-line:before{content:""}.ri-chat-forward-fill:before{content:""}.ri-chat-forward-line:before{content:""}.ri-chat-heart-fill:before{content:""}.ri-chat-heart-line:before{content:""}.ri-chat-history-fill:before{content:""}.ri-chat-history-line:before{content:""}.ri-chat-new-fill:before{content:""}.ri-chat-new-line:before{content:""}.ri-chat-off-fill:before{content:""}.ri-chat-off-line:before{content:""}.ri-chat-poll-fill:before{content:""}.ri-chat-poll-line:before{content:""}.ri-chat-private-fill:before{content:""}.ri-chat-private-line:before{content:""}.ri-chat-quote-fill:before{content:""}.ri-chat-quote-line:before{content:""}.ri-chat-settings-fill:before{content:""}.ri-chat-settings-line:before{content:""}.ri-chat-smile-2-fill:before{content:""}.ri-chat-smile-2-line:before{content:""}.ri-chat-smile-3-fill:before{content:""}.ri-chat-smile-3-line:before{content:""}.ri-chat-smile-fill:before{content:""}.ri-chat-smile-line:before{content:""}.ri-chat-upload-fill:before{content:""}.ri-chat-upload-line:before{content:""}.ri-chat-voice-fill:before{content:""}.ri-chat-voice-line:before{content:""}.ri-check-double-fill:before{content:""}.ri-check-double-line:before{content:""}.ri-check-fill:before{content:""}.ri-check-line:before{content:""}.ri-checkbox-blank-circle-fill:before{content:""}.ri-checkbox-blank-circle-line:before{content:""}.ri-checkbox-blank-fill:before{content:""}.ri-checkbox-blank-line:before{content:""}.ri-checkbox-circle-fill:before{content:""}.ri-checkbox-circle-line:before{content:""}.ri-checkbox-fill:before{content:""}.ri-checkbox-indeterminate-fill:before{content:""}.ri-checkbox-indeterminate-line:before{content:""}.ri-checkbox-line:before{content:""}.ri-checkbox-multiple-blank-fill:before{content:""}.ri-checkbox-multiple-blank-line:before{content:""}.ri-checkbox-multiple-fill:before{content:""}.ri-checkbox-multiple-line:before{content:""}.ri-china-railway-fill:before{content:""}.ri-china-railway-line:before{content:""}.ri-chrome-fill:before{content:""}.ri-chrome-line:before{content:""}.ri-clapperboard-fill:before{content:""}.ri-clapperboard-line:before{content:""}.ri-clipboard-fill:before{content:""}.ri-clipboard-line:before{content:""}.ri-clockwise-2-fill:before{content:""}.ri-clockwise-2-line:before{content:""}.ri-clockwise-fill:before{content:""}.ri-clockwise-line:before{content:""}.ri-close-circle-fill:before{content:""}.ri-close-circle-line:before{content:""}.ri-close-fill:before{content:""}.ri-close-line:before{content:""}.ri-closed-captioning-fill:before{content:""}.ri-closed-captioning-line:before{content:""}.ri-cloud-fill:before{content:""}.ri-cloud-line:before{content:""}.ri-cloud-off-fill:before{content:""}.ri-cloud-off-line:before{content:""}.ri-cloud-windy-fill:before{content:""}.ri-cloud-windy-line:before{content:""}.ri-cloudy-2-fill:before{content:""}.ri-cloudy-2-line:before{content:""}.ri-cloudy-fill:before{content:""}.ri-cloudy-line:before{content:""}.ri-code-box-fill:before{content:""}.ri-code-box-line:before{content:""}.ri-code-fill:before{content:""}.ri-code-line:before{content:""}.ri-code-s-fill:before{content:""}.ri-code-s-line:before{content:""}.ri-code-s-slash-fill:before{content:""}.ri-code-s-slash-line:before{content:""}.ri-code-view:before{content:""}.ri-codepen-fill:before{content:""}.ri-codepen-line:before{content:""}.ri-coin-fill:before{content:""}.ri-coin-line:before{content:""}.ri-coins-fill:before{content:""}.ri-coins-line:before{content:""}.ri-collage-fill:before{content:""}.ri-collage-line:before{content:""}.ri-command-fill:before{content:""}.ri-command-line:before{content:""}.ri-community-fill:before{content:""}.ri-community-line:before{content:""}.ri-compass-2-fill:before{content:""}.ri-compass-2-line:before{content:""}.ri-compass-3-fill:before{content:""}.ri-compass-3-line:before{content:""}.ri-compass-4-fill:before{content:""}.ri-compass-4-line:before{content:""}.ri-compass-discover-fill:before{content:""}.ri-compass-discover-line:before{content:""}.ri-compass-fill:before{content:""}.ri-compass-line:before{content:""}.ri-compasses-2-fill:before{content:""}.ri-compasses-2-line:before{content:""}.ri-compasses-fill:before{content:""}.ri-compasses-line:before{content:""}.ri-computer-fill:before{content:""}.ri-computer-line:before{content:""}.ri-contacts-book-2-fill:before{content:""}.ri-contacts-book-2-line:before{content:""}.ri-contacts-book-fill:before{content:""}.ri-contacts-book-line:before{content:""}.ri-contacts-book-upload-fill:before{content:""}.ri-contacts-book-upload-line:before{content:""}.ri-contacts-fill:before{content:""}.ri-contacts-line:before{content:""}.ri-contrast-2-fill:before{content:""}.ri-contrast-2-line:before{content:""}.ri-contrast-drop-2-fill:before{content:""}.ri-contrast-drop-2-line:before{content:""}.ri-contrast-drop-fill:before{content:""}.ri-contrast-drop-line:before{content:""}.ri-contrast-fill:before{content:""}.ri-contrast-line:before{content:""}.ri-copper-coin-fill:before{content:""}.ri-copper-coin-line:before{content:""}.ri-copper-diamond-fill:before{content:""}.ri-copper-diamond-line:before{content:""}.ri-copyleft-fill:before{content:""}.ri-copyleft-line:before{content:""}.ri-copyright-fill:before{content:""}.ri-copyright-line:before{content:""}.ri-coreos-fill:before{content:""}.ri-coreos-line:before{content:""}.ri-coupon-2-fill:before{content:""}.ri-coupon-2-line:before{content:""}.ri-coupon-3-fill:before{content:""}.ri-coupon-3-line:before{content:""}.ri-coupon-4-fill:before{content:""}.ri-coupon-4-line:before{content:""}.ri-coupon-5-fill:before{content:""}.ri-coupon-5-line:before{content:""}.ri-coupon-fill:before{content:""}.ri-coupon-line:before{content:""}.ri-cpu-fill:before{content:""}.ri-cpu-line:before{content:""}.ri-creative-commons-by-fill:before{content:""}.ri-creative-commons-by-line:before{content:""}.ri-creative-commons-fill:before{content:""}.ri-creative-commons-line:before{content:""}.ri-creative-commons-nc-fill:before{content:""}.ri-creative-commons-nc-line:before{content:""}.ri-creative-commons-nd-fill:before{content:""}.ri-creative-commons-nd-line:before{content:""}.ri-creative-commons-sa-fill:before{content:""}.ri-creative-commons-sa-line:before{content:""}.ri-creative-commons-zero-fill:before{content:""}.ri-creative-commons-zero-line:before{content:""}.ri-criminal-fill:before{content:""}.ri-criminal-line:before{content:""}.ri-crop-2-fill:before{content:""}.ri-crop-2-line:before{content:""}.ri-crop-fill:before{content:""}.ri-crop-line:before{content:""}.ri-css3-fill:before{content:""}.ri-css3-line:before{content:""}.ri-cup-fill:before{content:""}.ri-cup-line:before{content:""}.ri-currency-fill:before{content:""}.ri-currency-line:before{content:""}.ri-cursor-fill:before{content:""}.ri-cursor-line:before{content:""}.ri-customer-service-2-fill:before{content:""}.ri-customer-service-2-line:before{content:""}.ri-customer-service-fill:before{content:""}.ri-customer-service-line:before{content:""}.ri-dashboard-2-fill:before{content:""}.ri-dashboard-2-line:before{content:""}.ri-dashboard-3-fill:before{content:""}.ri-dashboard-3-line:before{content:""}.ri-dashboard-fill:before{content:""}.ri-dashboard-line:before{content:""}.ri-database-2-fill:before{content:""}.ri-database-2-line:before{content:""}.ri-database-fill:before{content:""}.ri-database-line:before{content:""}.ri-delete-back-2-fill:before{content:""}.ri-delete-back-2-line:before{content:""}.ri-delete-back-fill:before{content:""}.ri-delete-back-line:before{content:""}.ri-delete-bin-2-fill:before{content:""}.ri-delete-bin-2-line:before{content:""}.ri-delete-bin-3-fill:before{content:""}.ri-delete-bin-3-line:before{content:""}.ri-delete-bin-4-fill:before{content:""}.ri-delete-bin-4-line:before{content:""}.ri-delete-bin-5-fill:before{content:""}.ri-delete-bin-5-line:before{content:""}.ri-delete-bin-6-fill:before{content:""}.ri-delete-bin-6-line:before{content:""}.ri-delete-bin-7-fill:before{content:""}.ri-delete-bin-7-line:before{content:""}.ri-delete-bin-fill:before{content:""}.ri-delete-bin-line:before{content:""}.ri-delete-column:before{content:""}.ri-delete-row:before{content:""}.ri-device-fill:before{content:""}.ri-device-line:before{content:""}.ri-device-recover-fill:before{content:""}.ri-device-recover-line:before{content:""}.ri-dingding-fill:before{content:""}.ri-dingding-line:before{content:""}.ri-direction-fill:before{content:""}.ri-direction-line:before{content:""}.ri-disc-fill:before{content:""}.ri-disc-line:before{content:""}.ri-discord-fill:before{content:""}.ri-discord-line:before{content:""}.ri-discuss-fill:before{content:""}.ri-discuss-line:before{content:""}.ri-dislike-fill:before{content:""}.ri-dislike-line:before{content:""}.ri-disqus-fill:before{content:""}.ri-disqus-line:before{content:""}.ri-divide-fill:before{content:""}.ri-divide-line:before{content:""}.ri-donut-chart-fill:before{content:""}.ri-donut-chart-line:before{content:""}.ri-door-closed-fill:before{content:""}.ri-door-closed-line:before{content:""}.ri-door-fill:before{content:""}.ri-door-line:before{content:""}.ri-door-lock-box-fill:before{content:""}.ri-door-lock-box-line:before{content:""}.ri-door-lock-fill:before{content:""}.ri-door-lock-line:before{content:""}.ri-door-open-fill:before{content:""}.ri-door-open-line:before{content:""}.ri-dossier-fill:before{content:""}.ri-dossier-line:before{content:""}.ri-douban-fill:before{content:""}.ri-douban-line:before{content:""}.ri-double-quotes-l:before{content:""}.ri-double-quotes-r:before{content:""}.ri-download-2-fill:before{content:""}.ri-download-2-line:before{content:""}.ri-download-cloud-2-fill:before{content:""}.ri-download-cloud-2-line:before{content:""}.ri-download-cloud-fill:before{content:""}.ri-download-cloud-line:before{content:""}.ri-download-fill:before{content:""}.ri-download-line:before{content:""}.ri-draft-fill:before{content:""}.ri-draft-line:before{content:""}.ri-drag-drop-fill:before{content:""}.ri-drag-drop-line:before{content:""}.ri-drag-move-2-fill:before{content:""}.ri-drag-move-2-line:before{content:""}.ri-drag-move-fill:before{content:""}.ri-drag-move-line:before{content:""}.ri-dribbble-fill:before{content:""}.ri-dribbble-line:before{content:""}.ri-drive-fill:before{content:""}.ri-drive-line:before{content:""}.ri-drizzle-fill:before{content:""}.ri-drizzle-line:before{content:""}.ri-drop-fill:before{content:""}.ri-drop-line:before{content:""}.ri-dropbox-fill:before{content:""}.ri-dropbox-line:before{content:""}.ri-dual-sim-1-fill:before{content:""}.ri-dual-sim-1-line:before{content:""}.ri-dual-sim-2-fill:before{content:""}.ri-dual-sim-2-line:before{content:""}.ri-dv-fill:before{content:""}.ri-dv-line:before{content:""}.ri-dvd-fill:before{content:""}.ri-dvd-line:before{content:""}.ri-e-bike-2-fill:before{content:""}.ri-e-bike-2-line:before{content:""}.ri-e-bike-fill:before{content:""}.ri-e-bike-line:before{content:""}.ri-earth-fill:before{content:""}.ri-earth-line:before{content:""}.ri-earthquake-fill:before{content:""}.ri-earthquake-line:before{content:""}.ri-edge-fill:before{content:""}.ri-edge-line:before{content:""}.ri-edit-2-fill:before{content:""}.ri-edit-2-line:before{content:""}.ri-edit-box-fill:before{content:""}.ri-edit-box-line:before{content:""}.ri-edit-circle-fill:before{content:""}.ri-edit-circle-line:before{content:""}.ri-edit-fill:before{content:""}.ri-edit-line:before{content:""}.ri-eject-fill:before{content:""}.ri-eject-line:before{content:""}.ri-emotion-2-fill:before{content:""}.ri-emotion-2-line:before{content:""}.ri-emotion-fill:before{content:""}.ri-emotion-happy-fill:before{content:""}.ri-emotion-happy-line:before{content:""}.ri-emotion-laugh-fill:before{content:""}.ri-emotion-laugh-line:before{content:""}.ri-emotion-line:before{content:""}.ri-emotion-normal-fill:before{content:""}.ri-emotion-normal-line:before{content:""}.ri-emotion-sad-fill:before{content:""}.ri-emotion-sad-line:before{content:""}.ri-emotion-unhappy-fill:before{content:""}.ri-emotion-unhappy-line:before{content:""}.ri-empathize-fill:before{content:""}.ri-empathize-line:before{content:""}.ri-emphasis-cn:before{content:""}.ri-emphasis:before{content:""}.ri-english-input:before{content:""}.ri-equalizer-fill:before{content:""}.ri-equalizer-line:before{content:""}.ri-eraser-fill:before{content:""}.ri-eraser-line:before{content:""}.ri-error-warning-fill:before{content:""}.ri-error-warning-line:before{content:""}.ri-evernote-fill:before{content:""}.ri-evernote-line:before{content:""}.ri-exchange-box-fill:before{content:""}.ri-exchange-box-line:before{content:""}.ri-exchange-cny-fill:before{content:""}.ri-exchange-cny-line:before{content:""}.ri-exchange-dollar-fill:before{content:""}.ri-exchange-dollar-line:before{content:""}.ri-exchange-fill:before{content:""}.ri-exchange-funds-fill:before{content:""}.ri-exchange-funds-line:before{content:""}.ri-exchange-line:before{content:""}.ri-external-link-fill:before{content:""}.ri-external-link-line:before{content:""}.ri-eye-2-fill:before{content:""}.ri-eye-2-line:before{content:""}.ri-eye-close-fill:before{content:""}.ri-eye-close-line:before{content:""}.ri-eye-fill:before{content:""}.ri-eye-line:before{content:""}.ri-eye-off-fill:before{content:""}.ri-eye-off-line:before{content:""}.ri-facebook-box-fill:before{content:""}.ri-facebook-box-line:before{content:""}.ri-facebook-circle-fill:before{content:""}.ri-facebook-circle-line:before{content:""}.ri-facebook-fill:before{content:""}.ri-facebook-line:before{content:""}.ri-fahrenheit-fill:before{content:""}.ri-fahrenheit-line:before{content:""}.ri-feedback-fill:before{content:""}.ri-feedback-line:before{content:""}.ri-file-2-fill:before{content:""}.ri-file-2-line:before{content:""}.ri-file-3-fill:before{content:""}.ri-file-3-line:before{content:""}.ri-file-4-fill:before{content:""}.ri-file-4-line:before{content:""}.ri-file-add-fill:before{content:""}.ri-file-add-line:before{content:""}.ri-file-chart-2-fill:before{content:""}.ri-file-chart-2-line:before{content:""}.ri-file-chart-fill:before{content:""}.ri-file-chart-line:before{content:""}.ri-file-cloud-fill:before{content:""}.ri-file-cloud-line:before{content:""}.ri-file-code-fill:before{content:""}.ri-file-code-line:before{content:""}.ri-file-copy-2-fill:before{content:""}.ri-file-copy-2-line:before{content:""}.ri-file-copy-fill:before{content:""}.ri-file-copy-line:before{content:""}.ri-file-damage-fill:before{content:""}.ri-file-damage-line:before{content:""}.ri-file-download-fill:before{content:""}.ri-file-download-line:before{content:""}.ri-file-edit-fill:before{content:""}.ri-file-edit-line:before{content:""}.ri-file-excel-2-fill:before{content:""}.ri-file-excel-2-line:before{content:""}.ri-file-excel-fill:before{content:""}.ri-file-excel-line:before{content:""}.ri-file-fill:before{content:""}.ri-file-forbid-fill:before{content:""}.ri-file-forbid-line:before{content:""}.ri-file-gif-fill:before{content:""}.ri-file-gif-line:before{content:""}.ri-file-history-fill:before{content:""}.ri-file-history-line:before{content:""}.ri-file-hwp-fill:before{content:""}.ri-file-hwp-line:before{content:""}.ri-file-info-fill:before{content:""}.ri-file-info-line:before{content:""}.ri-file-line:before{content:""}.ri-file-list-2-fill:before{content:""}.ri-file-list-2-line:before{content:""}.ri-file-list-3-fill:before{content:""}.ri-file-list-3-line:before{content:""}.ri-file-list-fill:before{content:""}.ri-file-list-line:before{content:""}.ri-file-lock-fill:before{content:""}.ri-file-lock-line:before{content:""}.ri-file-mark-fill:before{content:""}.ri-file-mark-line:before{content:""}.ri-file-music-fill:before{content:""}.ri-file-music-line:before{content:""}.ri-file-paper-2-fill:before{content:""}.ri-file-paper-2-line:before{content:""}.ri-file-paper-fill:before{content:""}.ri-file-paper-line:before{content:""}.ri-file-pdf-fill:before{content:""}.ri-file-pdf-line:before{content:""}.ri-file-ppt-2-fill:before{content:""}.ri-file-ppt-2-line:before{content:""}.ri-file-ppt-fill:before{content:""}.ri-file-ppt-line:before{content:""}.ri-file-reduce-fill:before{content:""}.ri-file-reduce-line:before{content:""}.ri-file-search-fill:before{content:""}.ri-file-search-line:before{content:""}.ri-file-settings-fill:before{content:""}.ri-file-settings-line:before{content:""}.ri-file-shield-2-fill:before{content:""}.ri-file-shield-2-line:before{content:""}.ri-file-shield-fill:before{content:""}.ri-file-shield-line:before{content:""}.ri-file-shred-fill:before{content:""}.ri-file-shred-line:before{content:""}.ri-file-text-fill:before{content:""}.ri-file-text-line:before{content:""}.ri-file-transfer-fill:before{content:""}.ri-file-transfer-line:before{content:""}.ri-file-unknow-fill:before{content:""}.ri-file-unknow-line:before{content:""}.ri-file-upload-fill:before{content:""}.ri-file-upload-line:before{content:""}.ri-file-user-fill:before{content:""}.ri-file-user-line:before{content:""}.ri-file-warning-fill:before{content:""}.ri-file-warning-line:before{content:""}.ri-file-word-2-fill:before{content:""}.ri-file-word-2-line:before{content:""}.ri-file-word-fill:before{content:""}.ri-file-word-line:before{content:""}.ri-file-zip-fill:before{content:""}.ri-file-zip-line:before{content:""}.ri-film-fill:before{content:""}.ri-film-line:before{content:""}.ri-filter-2-fill:before{content:""}.ri-filter-2-line:before{content:""}.ri-filter-3-fill:before{content:""}.ri-filter-3-line:before{content:""}.ri-filter-fill:before{content:""}.ri-filter-line:before{content:""}.ri-filter-off-fill:before{content:""}.ri-filter-off-line:before{content:""}.ri-find-replace-fill:before{content:""}.ri-find-replace-line:before{content:""}.ri-finder-fill:before{content:""}.ri-finder-line:before{content:""}.ri-fingerprint-2-fill:before{content:""}.ri-fingerprint-2-line:before{content:""}.ri-fingerprint-fill:before{content:""}.ri-fingerprint-line:before{content:""}.ri-fire-fill:before{content:""}.ri-fire-line:before{content:""}.ri-firefox-fill:before{content:""}.ri-firefox-line:before{content:""}.ri-first-aid-kit-fill:before{content:""}.ri-first-aid-kit-line:before{content:""}.ri-flag-2-fill:before{content:""}.ri-flag-2-line:before{content:""}.ri-flag-fill:before{content:""}.ri-flag-line:before{content:""}.ri-flashlight-fill:before{content:""}.ri-flashlight-line:before{content:""}.ri-flask-fill:before{content:""}.ri-flask-line:before{content:""}.ri-flight-land-fill:before{content:""}.ri-flight-land-line:before{content:""}.ri-flight-takeoff-fill:before{content:""}.ri-flight-takeoff-line:before{content:""}.ri-flood-fill:before{content:""}.ri-flood-line:before{content:""}.ri-flow-chart:before{content:""}.ri-flutter-fill:before{content:""}.ri-flutter-line:before{content:""}.ri-focus-2-fill:before{content:""}.ri-focus-2-line:before{content:""}.ri-focus-3-fill:before{content:""}.ri-focus-3-line:before{content:""}.ri-focus-fill:before{content:""}.ri-focus-line:before{content:""}.ri-foggy-fill:before{content:""}.ri-foggy-line:before{content:""}.ri-folder-2-fill:before{content:""}.ri-folder-2-line:before{content:""}.ri-folder-3-fill:before{content:""}.ri-folder-3-line:before{content:""}.ri-folder-4-fill:before{content:""}.ri-folder-4-line:before{content:""}.ri-folder-5-fill:before{content:""}.ri-folder-5-line:before{content:""}.ri-folder-add-fill:before{content:""}.ri-folder-add-line:before{content:""}.ri-folder-chart-2-fill:before{content:""}.ri-folder-chart-2-line:before{content:""}.ri-folder-chart-fill:before{content:""}.ri-folder-chart-line:before{content:""}.ri-folder-download-fill:before{content:""}.ri-folder-download-line:before{content:""}.ri-folder-fill:before{content:""}.ri-folder-forbid-fill:before{content:""}.ri-folder-forbid-line:before{content:""}.ri-folder-history-fill:before{content:""}.ri-folder-history-line:before{content:""}.ri-folder-info-fill:before{content:""}.ri-folder-info-line:before{content:""}.ri-folder-keyhole-fill:before{content:""}.ri-folder-keyhole-line:before{content:""}.ri-folder-line:before{content:""}.ri-folder-lock-fill:before{content:""}.ri-folder-lock-line:before{content:""}.ri-folder-music-fill:before{content:""}.ri-folder-music-line:before{content:""}.ri-folder-open-fill:before{content:""}.ri-folder-open-line:before{content:""}.ri-folder-received-fill:before{content:""}.ri-folder-received-line:before{content:""}.ri-folder-reduce-fill:before{content:""}.ri-folder-reduce-line:before{content:""}.ri-folder-settings-fill:before{content:""}.ri-folder-settings-line:before{content:""}.ri-folder-shared-fill:before{content:""}.ri-folder-shared-line:before{content:""}.ri-folder-shield-2-fill:before{content:""}.ri-folder-shield-2-line:before{content:""}.ri-folder-shield-fill:before{content:""}.ri-folder-shield-line:before{content:""}.ri-folder-transfer-fill:before{content:""}.ri-folder-transfer-line:before{content:""}.ri-folder-unknow-fill:before{content:""}.ri-folder-unknow-line:before{content:""}.ri-folder-upload-fill:before{content:""}.ri-folder-upload-line:before{content:""}.ri-folder-user-fill:before{content:""}.ri-folder-user-line:before{content:""}.ri-folder-warning-fill:before{content:""}.ri-folder-warning-line:before{content:""}.ri-folder-zip-fill:before{content:""}.ri-folder-zip-line:before{content:""}.ri-folders-fill:before{content:""}.ri-folders-line:before{content:""}.ri-font-color:before{content:""}.ri-font-size-2:before{content:""}.ri-font-size:before{content:""}.ri-football-fill:before{content:""}.ri-football-line:before{content:""}.ri-footprint-fill:before{content:""}.ri-footprint-line:before{content:""}.ri-forbid-2-fill:before{content:""}.ri-forbid-2-line:before{content:""}.ri-forbid-fill:before{content:""}.ri-forbid-line:before{content:""}.ri-format-clear:before{content:""}.ri-fridge-fill:before{content:""}.ri-fridge-line:before{content:""}.ri-fullscreen-exit-fill:before{content:""}.ri-fullscreen-exit-line:before{content:""}.ri-fullscreen-fill:before{content:""}.ri-fullscreen-line:before{content:""}.ri-function-fill:before{content:""}.ri-function-line:before{content:""}.ri-functions:before{content:""}.ri-funds-box-fill:before{content:""}.ri-funds-box-line:before{content:""}.ri-funds-fill:before{content:""}.ri-funds-line:before{content:""}.ri-gallery-fill:before{content:""}.ri-gallery-line:before{content:""}.ri-gallery-upload-fill:before{content:""}.ri-gallery-upload-line:before{content:""}.ri-game-fill:before{content:""}.ri-game-line:before{content:""}.ri-gamepad-fill:before{content:""}.ri-gamepad-line:before{content:""}.ri-gas-station-fill:before{content:""}.ri-gas-station-line:before{content:""}.ri-gatsby-fill:before{content:""}.ri-gatsby-line:before{content:""}.ri-genderless-fill:before{content:""}.ri-genderless-line:before{content:""}.ri-ghost-2-fill:before{content:""}.ri-ghost-2-line:before{content:""}.ri-ghost-fill:before{content:""}.ri-ghost-line:before{content:""}.ri-ghost-smile-fill:before{content:""}.ri-ghost-smile-line:before{content:""}.ri-gift-2-fill:before{content:""}.ri-gift-2-line:before{content:""}.ri-gift-fill:before{content:""}.ri-gift-line:before{content:""}.ri-git-branch-fill:before{content:""}.ri-git-branch-line:before{content:""}.ri-git-commit-fill:before{content:""}.ri-git-commit-line:before{content:""}.ri-git-merge-fill:before{content:""}.ri-git-merge-line:before{content:""}.ri-git-pull-request-fill:before{content:""}.ri-git-pull-request-line:before{content:""}.ri-git-repository-commits-fill:before{content:""}.ri-git-repository-commits-line:before{content:""}.ri-git-repository-fill:before{content:""}.ri-git-repository-line:before{content:""}.ri-git-repository-private-fill:before{content:""}.ri-git-repository-private-line:before{content:""}.ri-github-fill:before{content:""}.ri-github-line:before{content:""}.ri-gitlab-fill:before{content:""}.ri-gitlab-line:before{content:""}.ri-global-fill:before{content:""}.ri-global-line:before{content:""}.ri-globe-fill:before{content:""}.ri-globe-line:before{content:""}.ri-goblet-fill:before{content:""}.ri-goblet-line:before{content:""}.ri-google-fill:before{content:""}.ri-google-line:before{content:""}.ri-google-play-fill:before{content:""}.ri-google-play-line:before{content:""}.ri-government-fill:before{content:""}.ri-government-line:before{content:""}.ri-gps-fill:before{content:""}.ri-gps-line:before{content:""}.ri-gradienter-fill:before{content:""}.ri-gradienter-line:before{content:""}.ri-grid-fill:before{content:""}.ri-grid-line:before{content:""}.ri-group-2-fill:before{content:""}.ri-group-2-line:before{content:""}.ri-group-fill:before{content:""}.ri-group-line:before{content:""}.ri-guide-fill:before{content:""}.ri-guide-line:before{content:""}.ri-h-1:before{content:""}.ri-h-2:before{content:""}.ri-h-3:before{content:""}.ri-h-4:before{content:""}.ri-h-5:before{content:""}.ri-h-6:before{content:""}.ri-hail-fill:before{content:""}.ri-hail-line:before{content:""}.ri-hammer-fill:before{content:""}.ri-hammer-line:before{content:""}.ri-hand-coin-fill:before{content:""}.ri-hand-coin-line:before{content:""}.ri-hand-heart-fill:before{content:""}.ri-hand-heart-line:before{content:""}.ri-hand-sanitizer-fill:before{content:""}.ri-hand-sanitizer-line:before{content:""}.ri-handbag-fill:before{content:""}.ri-handbag-line:before{content:""}.ri-hard-drive-2-fill:before{content:""}.ri-hard-drive-2-line:before{content:""}.ri-hard-drive-fill:before{content:""}.ri-hard-drive-line:before{content:""}.ri-hashtag:before{content:""}.ri-haze-2-fill:before{content:""}.ri-haze-2-line:before{content:""}.ri-haze-fill:before{content:""}.ri-haze-line:before{content:""}.ri-hd-fill:before{content:""}.ri-hd-line:before{content:""}.ri-heading:before{content:""}.ri-headphone-fill:before{content:""}.ri-headphone-line:before{content:""}.ri-health-book-fill:before{content:""}.ri-health-book-line:before{content:""}.ri-heart-2-fill:before{content:""}.ri-heart-2-line:before{content:""}.ri-heart-3-fill:before{content:""}.ri-heart-3-line:before{content:""}.ri-heart-add-fill:before{content:""}.ri-heart-add-line:before{content:""}.ri-heart-fill:before{content:""}.ri-heart-line:before{content:""}.ri-heart-pulse-fill:before{content:""}.ri-heart-pulse-line:before{content:""}.ri-hearts-fill:before{content:""}.ri-hearts-line:before{content:""}.ri-heavy-showers-fill:before{content:""}.ri-heavy-showers-line:before{content:""}.ri-history-fill:before{content:""}.ri-history-line:before{content:""}.ri-home-2-fill:before{content:""}.ri-home-2-line:before{content:""}.ri-home-3-fill:before{content:""}.ri-home-3-line:before{content:""}.ri-home-4-fill:before{content:""}.ri-home-4-line:before{content:""}.ri-home-5-fill:before{content:""}.ri-home-5-line:before{content:""}.ri-home-6-fill:before{content:""}.ri-home-6-line:before{content:""}.ri-home-7-fill:before{content:""}.ri-home-7-line:before{content:""}.ri-home-8-fill:before{content:""}.ri-home-8-line:before{content:""}.ri-home-fill:before{content:""}.ri-home-gear-fill:before{content:""}.ri-home-gear-line:before{content:""}.ri-home-heart-fill:before{content:""}.ri-home-heart-line:before{content:""}.ri-home-line:before{content:""}.ri-home-smile-2-fill:before{content:""}.ri-home-smile-2-line:before{content:""}.ri-home-smile-fill:before{content:""}.ri-home-smile-line:before{content:""}.ri-home-wifi-fill:before{content:""}.ri-home-wifi-line:before{content:""}.ri-honor-of-kings-fill:before{content:""}.ri-honor-of-kings-line:before{content:""}.ri-honour-fill:before{content:""}.ri-honour-line:before{content:""}.ri-hospital-fill:before{content:""}.ri-hospital-line:before{content:""}.ri-hotel-bed-fill:before{content:""}.ri-hotel-bed-line:before{content:""}.ri-hotel-fill:before{content:""}.ri-hotel-line:before{content:""}.ri-hotspot-fill:before{content:""}.ri-hotspot-line:before{content:""}.ri-hq-fill:before{content:""}.ri-hq-line:before{content:""}.ri-html5-fill:before{content:""}.ri-html5-line:before{content:""}.ri-ie-fill:before{content:""}.ri-ie-line:before{content:""}.ri-image-2-fill:before{content:""}.ri-image-2-line:before{content:""}.ri-image-add-fill:before{content:""}.ri-image-add-line:before{content:""}.ri-image-edit-fill:before{content:""}.ri-image-edit-line:before{content:""}.ri-image-fill:before{content:""}.ri-image-line:before{content:""}.ri-inbox-archive-fill:before{content:""}.ri-inbox-archive-line:before{content:""}.ri-inbox-fill:before{content:""}.ri-inbox-line:before{content:""}.ri-inbox-unarchive-fill:before{content:""}.ri-inbox-unarchive-line:before{content:""}.ri-increase-decrease-fill:before{content:""}.ri-increase-decrease-line:before{content:""}.ri-indent-decrease:before{content:""}.ri-indent-increase:before{content:""}.ri-indeterminate-circle-fill:before{content:""}.ri-indeterminate-circle-line:before{content:""}.ri-information-fill:before{content:""}.ri-information-line:before{content:""}.ri-infrared-thermometer-fill:before{content:""}.ri-infrared-thermometer-line:before{content:""}.ri-ink-bottle-fill:before{content:""}.ri-ink-bottle-line:before{content:""}.ri-input-cursor-move:before{content:""}.ri-input-method-fill:before{content:""}.ri-input-method-line:before{content:""}.ri-insert-column-left:before{content:""}.ri-insert-column-right:before{content:""}.ri-insert-row-bottom:before{content:""}.ri-insert-row-top:before{content:""}.ri-instagram-fill:before{content:""}.ri-instagram-line:before{content:""}.ri-install-fill:before{content:""}.ri-install-line:before{content:""}.ri-invision-fill:before{content:""}.ri-invision-line:before{content:""}.ri-italic:before{content:""}.ri-kakao-talk-fill:before{content:""}.ri-kakao-talk-line:before{content:""}.ri-key-2-fill:before{content:""}.ri-key-2-line:before{content:""}.ri-key-fill:before{content:""}.ri-key-line:before{content:""}.ri-keyboard-box-fill:before{content:""}.ri-keyboard-box-line:before{content:""}.ri-keyboard-fill:before{content:""}.ri-keyboard-line:before{content:""}.ri-keynote-fill:before{content:""}.ri-keynote-line:before{content:""}.ri-knife-blood-fill:before{content:""}.ri-knife-blood-line:before{content:""}.ri-knife-fill:before{content:""}.ri-knife-line:before{content:""}.ri-landscape-fill:before{content:""}.ri-landscape-line:before{content:""}.ri-layout-2-fill:before{content:""}.ri-layout-2-line:before{content:""}.ri-layout-3-fill:before{content:""}.ri-layout-3-line:before{content:""}.ri-layout-4-fill:before{content:""}.ri-layout-4-line:before{content:""}.ri-layout-5-fill:before{content:""}.ri-layout-5-line:before{content:""}.ri-layout-6-fill:before{content:""}.ri-layout-6-line:before{content:""}.ri-layout-bottom-2-fill:before{content:""}.ri-layout-bottom-2-line:before{content:""}.ri-layout-bottom-fill:before{content:""}.ri-layout-bottom-line:before{content:""}.ri-layout-column-fill:before{content:""}.ri-layout-column-line:before{content:""}.ri-layout-fill:before{content:""}.ri-layout-grid-fill:before{content:""}.ri-layout-grid-line:before{content:""}.ri-layout-left-2-fill:before{content:""}.ri-layout-left-2-line:before{content:""}.ri-layout-left-fill:before{content:""}.ri-layout-left-line:before{content:""}.ri-layout-line:before{content:""}.ri-layout-masonry-fill:before{content:""}.ri-layout-masonry-line:before{content:""}.ri-layout-right-2-fill:before{content:""}.ri-layout-right-2-line:before{content:""}.ri-layout-right-fill:before{content:""}.ri-layout-right-line:before{content:""}.ri-layout-row-fill:before{content:""}.ri-layout-row-line:before{content:""}.ri-layout-top-2-fill:before{content:""}.ri-layout-top-2-line:before{content:""}.ri-layout-top-fill:before{content:""}.ri-layout-top-line:before{content:""}.ri-leaf-fill:before{content:""}.ri-leaf-line:before{content:""}.ri-lifebuoy-fill:before{content:""}.ri-lifebuoy-line:before{content:""}.ri-lightbulb-fill:before{content:""}.ri-lightbulb-flash-fill:before{content:""}.ri-lightbulb-flash-line:before{content:""}.ri-lightbulb-line:before{content:""}.ri-line-chart-fill:before{content:""}.ri-line-chart-line:before{content:""}.ri-line-fill:before{content:""}.ri-line-height:before{content:""}.ri-line-line:before{content:""}.ri-link-m:before{content:""}.ri-link-unlink-m:before{content:""}.ri-link-unlink:before{content:""}.ri-link:before{content:""}.ri-linkedin-box-fill:before{content:""}.ri-linkedin-box-line:before{content:""}.ri-linkedin-fill:before{content:""}.ri-linkedin-line:before{content:""}.ri-links-fill:before{content:""}.ri-links-line:before{content:""}.ri-list-check-2:before{content:""}.ri-list-check:before{content:""}.ri-list-ordered:before{content:""}.ri-list-settings-fill:before{content:""}.ri-list-settings-line:before{content:""}.ri-list-unordered:before{content:""}.ri-live-fill:before{content:""}.ri-live-line:before{content:""}.ri-loader-2-fill:before{content:""}.ri-loader-2-line:before{content:""}.ri-loader-3-fill:before{content:""}.ri-loader-3-line:before{content:""}.ri-loader-4-fill:before{content:""}.ri-loader-4-line:before{content:""}.ri-loader-5-fill:before{content:""}.ri-loader-5-line:before{content:""}.ri-loader-fill:before{content:""}.ri-loader-line:before{content:""}.ri-lock-2-fill:before{content:""}.ri-lock-2-line:before{content:""}.ri-lock-fill:before{content:""}.ri-lock-line:before{content:""}.ri-lock-password-fill:before{content:""}.ri-lock-password-line:before{content:""}.ri-lock-unlock-fill:before{content:""}.ri-lock-unlock-line:before{content:""}.ri-login-box-fill:before{content:""}.ri-login-box-line:before{content:""}.ri-login-circle-fill:before{content:""}.ri-login-circle-line:before{content:""}.ri-logout-box-fill:before{content:""}.ri-logout-box-line:before{content:""}.ri-logout-box-r-fill:before{content:""}.ri-logout-box-r-line:before{content:""}.ri-logout-circle-fill:before{content:""}.ri-logout-circle-line:before{content:""}.ri-logout-circle-r-fill:before{content:""}.ri-logout-circle-r-line:before{content:""}.ri-luggage-cart-fill:before{content:""}.ri-luggage-cart-line:before{content:""}.ri-luggage-deposit-fill:before{content:""}.ri-luggage-deposit-line:before{content:""}.ri-lungs-fill:before{content:""}.ri-lungs-line:before{content:""}.ri-mac-fill:before{content:""}.ri-mac-line:before{content:""}.ri-macbook-fill:before{content:""}.ri-macbook-line:before{content:""}.ri-magic-fill:before{content:""}.ri-magic-line:before{content:""}.ri-mail-add-fill:before{content:""}.ri-mail-add-line:before{content:""}.ri-mail-check-fill:before{content:""}.ri-mail-check-line:before{content:""}.ri-mail-close-fill:before{content:""}.ri-mail-close-line:before{content:""}.ri-mail-download-fill:before{content:""}.ri-mail-download-line:before{content:""}.ri-mail-fill:before{content:""}.ri-mail-forbid-fill:before{content:""}.ri-mail-forbid-line:before{content:""}.ri-mail-line:before{content:""}.ri-mail-lock-fill:before{content:""}.ri-mail-lock-line:before{content:""}.ri-mail-open-fill:before{content:""}.ri-mail-open-line:before{content:""}.ri-mail-send-fill:before{content:""}.ri-mail-send-line:before{content:""}.ri-mail-settings-fill:before{content:""}.ri-mail-settings-line:before{content:""}.ri-mail-star-fill:before{content:""}.ri-mail-star-line:before{content:""}.ri-mail-unread-fill:before{content:""}.ri-mail-unread-line:before{content:""}.ri-mail-volume-fill:before{content:""}.ri-mail-volume-line:before{content:""}.ri-map-2-fill:before{content:""}.ri-map-2-line:before{content:""}.ri-map-fill:before{content:""}.ri-map-line:before{content:""}.ri-map-pin-2-fill:before{content:""}.ri-map-pin-2-line:before{content:""}.ri-map-pin-3-fill:before{content:""}.ri-map-pin-3-line:before{content:""}.ri-map-pin-4-fill:before{content:""}.ri-map-pin-4-line:before{content:""}.ri-map-pin-5-fill:before{content:""}.ri-map-pin-5-line:before{content:""}.ri-map-pin-add-fill:before{content:""}.ri-map-pin-add-line:before{content:""}.ri-map-pin-fill:before{content:""}.ri-map-pin-line:before{content:""}.ri-map-pin-range-fill:before{content:""}.ri-map-pin-range-line:before{content:""}.ri-map-pin-time-fill:before{content:""}.ri-map-pin-time-line:before{content:""}.ri-map-pin-user-fill:before{content:""}.ri-map-pin-user-line:before{content:""}.ri-mark-pen-fill:before{content:""}.ri-mark-pen-line:before{content:""}.ri-markdown-fill:before{content:""}.ri-markdown-line:before{content:""}.ri-markup-fill:before{content:""}.ri-markup-line:before{content:""}.ri-mastercard-fill:before{content:""}.ri-mastercard-line:before{content:""}.ri-mastodon-fill:before{content:""}.ri-mastodon-line:before{content:""}.ri-medal-2-fill:before{content:""}.ri-medal-2-line:before{content:""}.ri-medal-fill:before{content:""}.ri-medal-line:before{content:""}.ri-medicine-bottle-fill:before{content:""}.ri-medicine-bottle-line:before{content:""}.ri-medium-fill:before{content:""}.ri-medium-line:before{content:""}.ri-men-fill:before{content:""}.ri-men-line:before{content:""}.ri-mental-health-fill:before{content:""}.ri-mental-health-line:before{content:""}.ri-menu-2-fill:before{content:""}.ri-menu-2-line:before{content:""}.ri-menu-3-fill:before{content:""}.ri-menu-3-line:before{content:""}.ri-menu-4-fill:before{content:""}.ri-menu-4-line:before{content:""}.ri-menu-5-fill:before{content:""}.ri-menu-5-line:before{content:""}.ri-menu-add-fill:before{content:""}.ri-menu-add-line:before{content:""}.ri-menu-fill:before{content:""}.ri-menu-fold-fill:before{content:""}.ri-menu-fold-line:before{content:""}.ri-menu-line:before{content:""}.ri-menu-unfold-fill:before{content:""}.ri-menu-unfold-line:before{content:""}.ri-merge-cells-horizontal:before{content:""}.ri-merge-cells-vertical:before{content:""}.ri-message-2-fill:before{content:""}.ri-message-2-line:before{content:""}.ri-message-3-fill:before{content:""}.ri-message-3-line:before{content:""}.ri-message-fill:before{content:""}.ri-message-line:before{content:""}.ri-messenger-fill:before{content:""}.ri-messenger-line:before{content:""}.ri-meteor-fill:before{content:""}.ri-meteor-line:before{content:""}.ri-mic-2-fill:before{content:""}.ri-mic-2-line:before{content:""}.ri-mic-fill:before{content:""}.ri-mic-line:before{content:""}.ri-mic-off-fill:before{content:""}.ri-mic-off-line:before{content:""}.ri-mickey-fill:before{content:""}.ri-mickey-line:before{content:""}.ri-microscope-fill:before{content:""}.ri-microscope-line:before{content:""}.ri-microsoft-fill:before{content:""}.ri-microsoft-line:before{content:""}.ri-mind-map:before{content:""}.ri-mini-program-fill:before{content:""}.ri-mini-program-line:before{content:""}.ri-mist-fill:before{content:""}.ri-mist-line:before{content:""}.ri-money-cny-box-fill:before{content:""}.ri-money-cny-box-line:before{content:""}.ri-money-cny-circle-fill:before{content:""}.ri-money-cny-circle-line:before{content:""}.ri-money-dollar-box-fill:before{content:""}.ri-money-dollar-box-line:before{content:""}.ri-money-dollar-circle-fill:before{content:""}.ri-money-dollar-circle-line:before{content:""}.ri-money-euro-box-fill:before{content:""}.ri-money-euro-box-line:before{content:""}.ri-money-euro-circle-fill:before{content:""}.ri-money-euro-circle-line:before{content:""}.ri-money-pound-box-fill:before{content:""}.ri-money-pound-box-line:before{content:""}.ri-money-pound-circle-fill:before{content:""}.ri-money-pound-circle-line:before{content:""}.ri-moon-clear-fill:before{content:""}.ri-moon-clear-line:before{content:""}.ri-moon-cloudy-fill:before{content:""}.ri-moon-cloudy-line:before{content:""}.ri-moon-fill:before{content:""}.ri-moon-foggy-fill:before{content:""}.ri-moon-foggy-line:before{content:""}.ri-moon-line:before{content:""}.ri-more-2-fill:before{content:""}.ri-more-2-line:before{content:""}.ri-more-fill:before{content:""}.ri-more-line:before{content:""}.ri-motorbike-fill:before{content:""}.ri-motorbike-line:before{content:""}.ri-mouse-fill:before{content:""}.ri-mouse-line:before{content:""}.ri-movie-2-fill:before{content:""}.ri-movie-2-line:before{content:""}.ri-movie-fill:before{content:""}.ri-movie-line:before{content:""}.ri-music-2-fill:before{content:""}.ri-music-2-line:before{content:""}.ri-music-fill:before{content:""}.ri-music-line:before{content:""}.ri-mv-fill:before{content:""}.ri-mv-line:before{content:""}.ri-navigation-fill:before{content:""}.ri-navigation-line:before{content:""}.ri-netease-cloud-music-fill:before{content:""}.ri-netease-cloud-music-line:before{content:""}.ri-netflix-fill:before{content:""}.ri-netflix-line:before{content:""}.ri-newspaper-fill:before{content:""}.ri-newspaper-line:before{content:""}.ri-node-tree:before{content:""}.ri-notification-2-fill:before{content:""}.ri-notification-2-line:before{content:""}.ri-notification-3-fill:before{content:""}.ri-notification-3-line:before{content:""}.ri-notification-4-fill:before{content:""}.ri-notification-4-line:before{content:""}.ri-notification-badge-fill:before{content:""}.ri-notification-badge-line:before{content:""}.ri-notification-fill:before{content:""}.ri-notification-line:before{content:""}.ri-notification-off-fill:before{content:""}.ri-notification-off-line:before{content:""}.ri-npmjs-fill:before{content:""}.ri-npmjs-line:before{content:""}.ri-number-0:before{content:""}.ri-number-1:before{content:""}.ri-number-2:before{content:""}.ri-number-3:before{content:""}.ri-number-4:before{content:""}.ri-number-5:before{content:""}.ri-number-6:before{content:""}.ri-number-7:before{content:""}.ri-number-8:before{content:""}.ri-number-9:before{content:""}.ri-numbers-fill:before{content:""}.ri-numbers-line:before{content:""}.ri-nurse-fill:before{content:""}.ri-nurse-line:before{content:""}.ri-oil-fill:before{content:""}.ri-oil-line:before{content:""}.ri-omega:before{content:""}.ri-open-arm-fill:before{content:""}.ri-open-arm-line:before{content:""}.ri-open-source-fill:before{content:""}.ri-open-source-line:before{content:""}.ri-opera-fill:before{content:""}.ri-opera-line:before{content:""}.ri-order-play-fill:before{content:""}.ri-order-play-line:before{content:""}.ri-organization-chart:before{content:""}.ri-outlet-2-fill:before{content:""}.ri-outlet-2-line:before{content:""}.ri-outlet-fill:before{content:""}.ri-outlet-line:before{content:""}.ri-page-separator:before{content:""}.ri-pages-fill:before{content:""}.ri-pages-line:before{content:""}.ri-paint-brush-fill:before{content:""}.ri-paint-brush-line:before{content:""}.ri-paint-fill:before{content:""}.ri-paint-line:before{content:""}.ri-palette-fill:before{content:""}.ri-palette-line:before{content:""}.ri-pantone-fill:before{content:""}.ri-pantone-line:before{content:""}.ri-paragraph:before{content:""}.ri-parent-fill:before{content:""}.ri-parent-line:before{content:""}.ri-parentheses-fill:before{content:""}.ri-parentheses-line:before{content:""}.ri-parking-box-fill:before{content:""}.ri-parking-box-line:before{content:""}.ri-parking-fill:before{content:""}.ri-parking-line:before{content:""}.ri-passport-fill:before{content:""}.ri-passport-line:before{content:""}.ri-patreon-fill:before{content:""}.ri-patreon-line:before{content:""}.ri-pause-circle-fill:before{content:""}.ri-pause-circle-line:before{content:""}.ri-pause-fill:before{content:""}.ri-pause-line:before{content:""}.ri-pause-mini-fill:before{content:""}.ri-pause-mini-line:before{content:""}.ri-paypal-fill:before{content:""}.ri-paypal-line:before{content:""}.ri-pen-nib-fill:before{content:""}.ri-pen-nib-line:before{content:""}.ri-pencil-fill:before{content:""}.ri-pencil-line:before{content:""}.ri-pencil-ruler-2-fill:before{content:""}.ri-pencil-ruler-2-line:before{content:""}.ri-pencil-ruler-fill:before{content:""}.ri-pencil-ruler-line:before{content:""}.ri-percent-fill:before{content:""}.ri-percent-line:before{content:""}.ri-phone-camera-fill:before{content:""}.ri-phone-camera-line:before{content:""}.ri-phone-fill:before{content:""}.ri-phone-find-fill:before{content:""}.ri-phone-find-line:before{content:""}.ri-phone-line:before{content:""}.ri-phone-lock-fill:before{content:""}.ri-phone-lock-line:before{content:""}.ri-picture-in-picture-2-fill:before{content:""}.ri-picture-in-picture-2-line:before{content:""}.ri-picture-in-picture-exit-fill:before{content:""}.ri-picture-in-picture-exit-line:before{content:""}.ri-picture-in-picture-fill:before{content:""}.ri-picture-in-picture-line:before{content:""}.ri-pie-chart-2-fill:before{content:""}.ri-pie-chart-2-line:before{content:""}.ri-pie-chart-box-fill:before{content:""}.ri-pie-chart-box-line:before{content:""}.ri-pie-chart-fill:before{content:""}.ri-pie-chart-line:before{content:""}.ri-pin-distance-fill:before{content:""}.ri-pin-distance-line:before{content:""}.ri-ping-pong-fill:before{content:""}.ri-ping-pong-line:before{content:""}.ri-pinterest-fill:before{content:""}.ri-pinterest-line:before{content:""}.ri-pinyin-input:before{content:""}.ri-pixelfed-fill:before{content:""}.ri-pixelfed-line:before{content:""}.ri-plane-fill:before{content:""}.ri-plane-line:before{content:""}.ri-plant-fill:before{content:""}.ri-plant-line:before{content:""}.ri-play-circle-fill:before{content:""}.ri-play-circle-line:before{content:""}.ri-play-fill:before{content:""}.ri-play-line:before{content:""}.ri-play-list-2-fill:before{content:""}.ri-play-list-2-line:before{content:""}.ri-play-list-add-fill:before{content:""}.ri-play-list-add-line:before{content:""}.ri-play-list-fill:before{content:""}.ri-play-list-line:before{content:""}.ri-play-mini-fill:before{content:""}.ri-play-mini-line:before{content:""}.ri-playstation-fill:before{content:""}.ri-playstation-line:before{content:""}.ri-plug-2-fill:before{content:""}.ri-plug-2-line:before{content:""}.ri-plug-fill:before{content:""}.ri-plug-line:before{content:""}.ri-polaroid-2-fill:before{content:""}.ri-polaroid-2-line:before{content:""}.ri-polaroid-fill:before{content:""}.ri-polaroid-line:before{content:""}.ri-police-car-fill:before{content:""}.ri-police-car-line:before{content:""}.ri-price-tag-2-fill:before{content:""}.ri-price-tag-2-line:before{content:""}.ri-price-tag-3-fill:before{content:""}.ri-price-tag-3-line:before{content:""}.ri-price-tag-fill:before{content:""}.ri-price-tag-line:before{content:""}.ri-printer-cloud-fill:before{content:""}.ri-printer-cloud-line:before{content:""}.ri-printer-fill:before{content:""}.ri-printer-line:before{content:""}.ri-product-hunt-fill:before{content:""}.ri-product-hunt-line:before{content:""}.ri-profile-fill:before{content:""}.ri-profile-line:before{content:""}.ri-projector-2-fill:before{content:""}.ri-projector-2-line:before{content:""}.ri-projector-fill:before{content:""}.ri-projector-line:before{content:""}.ri-psychotherapy-fill:before{content:""}.ri-psychotherapy-line:before{content:""}.ri-pulse-fill:before{content:""}.ri-pulse-line:before{content:""}.ri-pushpin-2-fill:before{content:""}.ri-pushpin-2-line:before{content:""}.ri-pushpin-fill:before{content:""}.ri-pushpin-line:before{content:""}.ri-qq-fill:before{content:""}.ri-qq-line:before{content:""}.ri-qr-code-fill:before{content:""}.ri-qr-code-line:before{content:""}.ri-qr-scan-2-fill:before{content:""}.ri-qr-scan-2-line:before{content:""}.ri-qr-scan-fill:before{content:""}.ri-qr-scan-line:before{content:""}.ri-question-answer-fill:before{content:""}.ri-question-answer-line:before{content:""}.ri-question-fill:before{content:""}.ri-question-line:before{content:""}.ri-question-mark:before{content:""}.ri-questionnaire-fill:before{content:""}.ri-questionnaire-line:before{content:""}.ri-quill-pen-fill:before{content:""}.ri-quill-pen-line:before{content:""}.ri-radar-fill:before{content:""}.ri-radar-line:before{content:""}.ri-radio-2-fill:before{content:""}.ri-radio-2-line:before{content:""}.ri-radio-button-fill:before{content:""}.ri-radio-button-line:before{content:""}.ri-radio-fill:before{content:""}.ri-radio-line:before{content:""}.ri-rainbow-fill:before{content:""}.ri-rainbow-line:before{content:""}.ri-rainy-fill:before{content:""}.ri-rainy-line:before{content:""}.ri-reactjs-fill:before{content:""}.ri-reactjs-line:before{content:""}.ri-record-circle-fill:before{content:""}.ri-record-circle-line:before{content:""}.ri-record-mail-fill:before{content:""}.ri-record-mail-line:before{content:""}.ri-recycle-fill:before{content:""}.ri-recycle-line:before{content:""}.ri-red-packet-fill:before{content:""}.ri-red-packet-line:before{content:""}.ri-reddit-fill:before{content:""}.ri-reddit-line:before{content:""}.ri-refresh-fill:before{content:""}.ri-refresh-line:before{content:""}.ri-refund-2-fill:before{content:""}.ri-refund-2-line:before{content:""}.ri-refund-fill:before{content:""}.ri-refund-line:before{content:""}.ri-registered-fill:before{content:""}.ri-registered-line:before{content:""}.ri-remixicon-fill:before{content:""}.ri-remixicon-line:before{content:""}.ri-remote-control-2-fill:before{content:""}.ri-remote-control-2-line:before{content:""}.ri-remote-control-fill:before{content:""}.ri-remote-control-line:before{content:""}.ri-repeat-2-fill:before{content:""}.ri-repeat-2-line:before{content:""}.ri-repeat-fill:before{content:""}.ri-repeat-line:before{content:""}.ri-repeat-one-fill:before{content:""}.ri-repeat-one-line:before{content:""}.ri-reply-all-fill:before{content:""}.ri-reply-all-line:before{content:""}.ri-reply-fill:before{content:""}.ri-reply-line:before{content:""}.ri-reserved-fill:before{content:""}.ri-reserved-line:before{content:""}.ri-rest-time-fill:before{content:""}.ri-rest-time-line:before{content:""}.ri-restart-fill:before{content:""}.ri-restart-line:before{content:""}.ri-restaurant-2-fill:before{content:""}.ri-restaurant-2-line:before{content:""}.ri-restaurant-fill:before{content:""}.ri-restaurant-line:before{content:""}.ri-rewind-fill:before{content:""}.ri-rewind-line:before{content:""}.ri-rewind-mini-fill:before{content:""}.ri-rewind-mini-line:before{content:""}.ri-rhythm-fill:before{content:""}.ri-rhythm-line:before{content:""}.ri-riding-fill:before{content:""}.ri-riding-line:before{content:""}.ri-road-map-fill:before{content:""}.ri-road-map-line:before{content:""}.ri-roadster-fill:before{content:""}.ri-roadster-line:before{content:""}.ri-robot-fill:before{content:""}.ri-robot-line:before{content:""}.ri-rocket-2-fill:before{content:""}.ri-rocket-2-line:before{content:""}.ri-rocket-fill:before{content:""}.ri-rocket-line:before{content:""}.ri-rotate-lock-fill:before{content:""}.ri-rotate-lock-line:before{content:""}.ri-rounded-corner:before{content:""}.ri-route-fill:before{content:""}.ri-route-line:before{content:""}.ri-router-fill:before{content:""}.ri-router-line:before{content:""}.ri-rss-fill:before{content:""}.ri-rss-line:before{content:""}.ri-ruler-2-fill:before{content:""}.ri-ruler-2-line:before{content:""}.ri-ruler-fill:before{content:""}.ri-ruler-line:before{content:""}.ri-run-fill:before{content:""}.ri-run-line:before{content:""}.ri-safari-fill:before{content:""}.ri-safari-line:before{content:""}.ri-safe-2-fill:before{content:""}.ri-safe-2-line:before{content:""}.ri-safe-fill:before{content:""}.ri-safe-line:before{content:""}.ri-sailboat-fill:before{content:""}.ri-sailboat-line:before{content:""}.ri-save-2-fill:before{content:""}.ri-save-2-line:before{content:""}.ri-save-3-fill:before{content:""}.ri-save-3-line:before{content:""}.ri-save-fill:before{content:""}.ri-save-line:before{content:""}.ri-scales-2-fill:before{content:""}.ri-scales-2-line:before{content:""}.ri-scales-3-fill:before{content:""}.ri-scales-3-line:before{content:""}.ri-scales-fill:before{content:""}.ri-scales-line:before{content:""}.ri-scan-2-fill:before{content:""}.ri-scan-2-line:before{content:""}.ri-scan-fill:before{content:""}.ri-scan-line:before{content:""}.ri-scissors-2-fill:before{content:""}.ri-scissors-2-line:before{content:""}.ri-scissors-cut-fill:before{content:""}.ri-scissors-cut-line:before{content:""}.ri-scissors-fill:before{content:""}.ri-scissors-line:before{content:""}.ri-screenshot-2-fill:before{content:""}.ri-screenshot-2-line:before{content:""}.ri-screenshot-fill:before{content:""}.ri-screenshot-line:before{content:""}.ri-sd-card-fill:before{content:""}.ri-sd-card-line:before{content:""}.ri-sd-card-mini-fill:before{content:""}.ri-sd-card-mini-line:before{content:""}.ri-search-2-fill:before{content:""}.ri-search-2-line:before{content:""}.ri-search-eye-fill:before{content:""}.ri-search-eye-line:before{content:""}.ri-search-fill:before{content:""}.ri-search-line:before{content:""}.ri-secure-payment-fill:before{content:""}.ri-secure-payment-line:before{content:""}.ri-seedling-fill:before{content:""}.ri-seedling-line:before{content:""}.ri-send-backward:before{content:""}.ri-send-plane-2-fill:before{content:""}.ri-send-plane-2-line:before{content:""}.ri-send-plane-fill:before{content:""}.ri-send-plane-line:before{content:""}.ri-send-to-back:before{content:""}.ri-sensor-fill:before{content:""}.ri-sensor-line:before{content:""}.ri-separator:before{content:""}.ri-server-fill:before{content:""}.ri-server-line:before{content:""}.ri-service-fill:before{content:""}.ri-service-line:before{content:""}.ri-settings-2-fill:before{content:""}.ri-settings-2-line:before{content:""}.ri-settings-3-fill:before{content:""}.ri-settings-3-line:before{content:""}.ri-settings-4-fill:before{content:""}.ri-settings-4-line:before{content:""}.ri-settings-5-fill:before{content:""}.ri-settings-5-line:before{content:""}.ri-settings-6-fill:before{content:""}.ri-settings-6-line:before{content:""}.ri-settings-fill:before{content:""}.ri-settings-line:before{content:""}.ri-shape-2-fill:before{content:""}.ri-shape-2-line:before{content:""}.ri-shape-fill:before{content:""}.ri-shape-line:before{content:""}.ri-share-box-fill:before{content:""}.ri-share-box-line:before{content:""}.ri-share-circle-fill:before{content:""}.ri-share-circle-line:before{content:""}.ri-share-fill:before{content:""}.ri-share-forward-2-fill:before{content:""}.ri-share-forward-2-line:before{content:""}.ri-share-forward-box-fill:before{content:""}.ri-share-forward-box-line:before{content:""}.ri-share-forward-fill:before{content:""}.ri-share-forward-line:before{content:""}.ri-share-line:before{content:""}.ri-shield-check-fill:before{content:""}.ri-shield-check-line:before{content:""}.ri-shield-cross-fill:before{content:""}.ri-shield-cross-line:before{content:""}.ri-shield-fill:before{content:""}.ri-shield-flash-fill:before{content:""}.ri-shield-flash-line:before{content:""}.ri-shield-keyhole-fill:before{content:""}.ri-shield-keyhole-line:before{content:""}.ri-shield-line:before{content:""}.ri-shield-star-fill:before{content:""}.ri-shield-star-line:before{content:""}.ri-shield-user-fill:before{content:""}.ri-shield-user-line:before{content:""}.ri-ship-2-fill:before{content:""}.ri-ship-2-line:before{content:""}.ri-ship-fill:before{content:""}.ri-ship-line:before{content:""}.ri-shirt-fill:before{content:""}.ri-shirt-line:before{content:""}.ri-shopping-bag-2-fill:before{content:""}.ri-shopping-bag-2-line:before{content:""}.ri-shopping-bag-3-fill:before{content:""}.ri-shopping-bag-3-line:before{content:""}.ri-shopping-bag-fill:before{content:""}.ri-shopping-bag-line:before{content:""}.ri-shopping-basket-2-fill:before{content:""}.ri-shopping-basket-2-line:before{content:""}.ri-shopping-basket-fill:before{content:""}.ri-shopping-basket-line:before{content:""}.ri-shopping-cart-2-fill:before{content:""}.ri-shopping-cart-2-line:before{content:""}.ri-shopping-cart-fill:before{content:""}.ri-shopping-cart-line:before{content:""}.ri-showers-fill:before{content:""}.ri-showers-line:before{content:""}.ri-shuffle-fill:before{content:""}.ri-shuffle-line:before{content:""}.ri-shut-down-fill:before{content:""}.ri-shut-down-line:before{content:""}.ri-side-bar-fill:before{content:""}.ri-side-bar-line:before{content:""}.ri-signal-tower-fill:before{content:""}.ri-signal-tower-line:before{content:""}.ri-signal-wifi-1-fill:before{content:""}.ri-signal-wifi-1-line:before{content:""}.ri-signal-wifi-2-fill:before{content:""}.ri-signal-wifi-2-line:before{content:""}.ri-signal-wifi-3-fill:before{content:""}.ri-signal-wifi-3-line:before{content:""}.ri-signal-wifi-error-fill:before{content:""}.ri-signal-wifi-error-line:before{content:""}.ri-signal-wifi-fill:before{content:""}.ri-signal-wifi-line:before{content:""}.ri-signal-wifi-off-fill:before{content:""}.ri-signal-wifi-off-line:before{content:""}.ri-sim-card-2-fill:before{content:""}.ri-sim-card-2-line:before{content:""}.ri-sim-card-fill:before{content:""}.ri-sim-card-line:before{content:""}.ri-single-quotes-l:before{content:""}.ri-single-quotes-r:before{content:""}.ri-sip-fill:before{content:""}.ri-sip-line:before{content:""}.ri-skip-back-fill:before{content:""}.ri-skip-back-line:before{content:""}.ri-skip-back-mini-fill:before{content:""}.ri-skip-back-mini-line:before{content:""}.ri-skip-forward-fill:before{content:""}.ri-skip-forward-line:before{content:""}.ri-skip-forward-mini-fill:before{content:""}.ri-skip-forward-mini-line:before{content:""}.ri-skull-2-fill:before{content:""}.ri-skull-2-line:before{content:""}.ri-skull-fill:before{content:""}.ri-skull-line:before{content:""}.ri-skype-fill:before{content:""}.ri-skype-line:before{content:""}.ri-slack-fill:before{content:""}.ri-slack-line:before{content:""}.ri-slice-fill:before{content:""}.ri-slice-line:before{content:""}.ri-slideshow-2-fill:before{content:""}.ri-slideshow-2-line:before{content:""}.ri-slideshow-3-fill:before{content:""}.ri-slideshow-3-line:before{content:""}.ri-slideshow-4-fill:before{content:""}.ri-slideshow-4-line:before{content:""}.ri-slideshow-fill:before{content:""}.ri-slideshow-line:before{content:""}.ri-smartphone-fill:before{content:""}.ri-smartphone-line:before{content:""}.ri-snapchat-fill:before{content:""}.ri-snapchat-line:before{content:""}.ri-snowy-fill:before{content:""}.ri-snowy-line:before{content:""}.ri-sort-asc:before{content:""}.ri-sort-desc:before{content:""}.ri-sound-module-fill:before{content:""}.ri-sound-module-line:before{content:""}.ri-soundcloud-fill:before{content:""}.ri-soundcloud-line:before{content:""}.ri-space-ship-fill:before{content:""}.ri-space-ship-line:before{content:""}.ri-space:before{content:""}.ri-spam-2-fill:before{content:""}.ri-spam-2-line:before{content:""}.ri-spam-3-fill:before{content:""}.ri-spam-3-line:before{content:""}.ri-spam-fill:before{content:""}.ri-spam-line:before{content:""}.ri-speaker-2-fill:before{content:""}.ri-speaker-2-line:before{content:""}.ri-speaker-3-fill:before{content:""}.ri-speaker-3-line:before{content:""}.ri-speaker-fill:before{content:""}.ri-speaker-line:before{content:""}.ri-spectrum-fill:before{content:""}.ri-spectrum-line:before{content:""}.ri-speed-fill:before{content:""}.ri-speed-line:before{content:""}.ri-speed-mini-fill:before{content:""}.ri-speed-mini-line:before{content:""}.ri-split-cells-horizontal:before{content:""}.ri-split-cells-vertical:before{content:""}.ri-spotify-fill:before{content:""}.ri-spotify-line:before{content:""}.ri-spy-fill:before{content:""}.ri-spy-line:before{content:""}.ri-stack-fill:before{content:""}.ri-stack-line:before{content:""}.ri-stack-overflow-fill:before{content:""}.ri-stack-overflow-line:before{content:""}.ri-stackshare-fill:before{content:""}.ri-stackshare-line:before{content:""}.ri-star-fill:before{content:""}.ri-star-half-fill:before{content:""}.ri-star-half-line:before{content:""}.ri-star-half-s-fill:before{content:""}.ri-star-half-s-line:before{content:""}.ri-star-line:before{content:""}.ri-star-s-fill:before{content:""}.ri-star-s-line:before{content:""}.ri-star-smile-fill:before{content:""}.ri-star-smile-line:before{content:""}.ri-steam-fill:before{content:""}.ri-steam-line:before{content:""}.ri-steering-2-fill:before{content:""}.ri-steering-2-line:before{content:""}.ri-steering-fill:before{content:""}.ri-steering-line:before{content:""}.ri-stethoscope-fill:before{content:""}.ri-stethoscope-line:before{content:""}.ri-sticky-note-2-fill:before{content:""}.ri-sticky-note-2-line:before{content:""}.ri-sticky-note-fill:before{content:""}.ri-sticky-note-line:before{content:""}.ri-stock-fill:before{content:""}.ri-stock-line:before{content:""}.ri-stop-circle-fill:before{content:""}.ri-stop-circle-line:before{content:""}.ri-stop-fill:before{content:""}.ri-stop-line:before{content:""}.ri-stop-mini-fill:before{content:""}.ri-stop-mini-line:before{content:""}.ri-store-2-fill:before{content:""}.ri-store-2-line:before{content:""}.ri-store-3-fill:before{content:""}.ri-store-3-line:before{content:""}.ri-store-fill:before{content:""}.ri-store-line:before{content:""}.ri-strikethrough-2:before{content:""}.ri-strikethrough:before{content:""}.ri-subscript-2:before{content:""}.ri-subscript:before{content:""}.ri-subtract-fill:before{content:""}.ri-subtract-line:before{content:""}.ri-subway-fill:before{content:""}.ri-subway-line:before{content:""}.ri-subway-wifi-fill:before{content:""}.ri-subway-wifi-line:before{content:""}.ri-suitcase-2-fill:before{content:""}.ri-suitcase-2-line:before{content:""}.ri-suitcase-3-fill:before{content:""}.ri-suitcase-3-line:before{content:""}.ri-suitcase-fill:before{content:""}.ri-suitcase-line:before{content:""}.ri-sun-cloudy-fill:before{content:""}.ri-sun-cloudy-line:before{content:""}.ri-sun-fill:before{content:""}.ri-sun-foggy-fill:before{content:""}.ri-sun-foggy-line:before{content:""}.ri-sun-line:before{content:""}.ri-superscript-2:before{content:""}.ri-superscript:before{content:""}.ri-surgical-mask-fill:before{content:""}.ri-surgical-mask-line:before{content:""}.ri-surround-sound-fill:before{content:""}.ri-surround-sound-line:before{content:""}.ri-survey-fill:before{content:""}.ri-survey-line:before{content:""}.ri-swap-box-fill:before{content:""}.ri-swap-box-line:before{content:""}.ri-swap-fill:before{content:""}.ri-swap-line:before{content:""}.ri-switch-fill:before{content:""}.ri-switch-line:before{content:""}.ri-sword-fill:before{content:""}.ri-sword-line:before{content:""}.ri-syringe-fill:before{content:""}.ri-syringe-line:before{content:""}.ri-t-box-fill:before{content:""}.ri-t-box-line:before{content:""}.ri-t-shirt-2-fill:before{content:""}.ri-t-shirt-2-line:before{content:""}.ri-t-shirt-air-fill:before{content:""}.ri-t-shirt-air-line:before{content:""}.ri-t-shirt-fill:before{content:""}.ri-t-shirt-line:before{content:""}.ri-table-2:before{content:""}.ri-table-alt-fill:before{content:""}.ri-table-alt-line:before{content:""}.ri-table-fill:before{content:""}.ri-table-line:before{content:""}.ri-tablet-fill:before{content:""}.ri-tablet-line:before{content:""}.ri-takeaway-fill:before{content:""}.ri-takeaway-line:before{content:""}.ri-taobao-fill:before{content:""}.ri-taobao-line:before{content:""}.ri-tape-fill:before{content:""}.ri-tape-line:before{content:""}.ri-task-fill:before{content:""}.ri-task-line:before{content:""}.ri-taxi-fill:before{content:""}.ri-taxi-line:before{content:""}.ri-taxi-wifi-fill:before{content:""}.ri-taxi-wifi-line:before{content:""}.ri-team-fill:before{content:""}.ri-team-line:before{content:""}.ri-telegram-fill:before{content:""}.ri-telegram-line:before{content:""}.ri-temp-cold-fill:before{content:""}.ri-temp-cold-line:before{content:""}.ri-temp-hot-fill:before{content:""}.ri-temp-hot-line:before{content:""}.ri-terminal-box-fill:before{content:""}.ri-terminal-box-line:before{content:""}.ri-terminal-fill:before{content:""}.ri-terminal-line:before{content:""}.ri-terminal-window-fill:before{content:""}.ri-terminal-window-line:before{content:""}.ri-test-tube-fill:before{content:""}.ri-test-tube-line:before{content:""}.ri-text-direction-l:before{content:""}.ri-text-direction-r:before{content:""}.ri-text-spacing:before{content:""}.ri-text-wrap:before{content:""}.ri-text:before{content:""}.ri-thermometer-fill:before{content:""}.ri-thermometer-line:before{content:""}.ri-thumb-down-fill:before{content:""}.ri-thumb-down-line:before{content:""}.ri-thumb-up-fill:before{content:""}.ri-thumb-up-line:before{content:""}.ri-thunderstorms-fill:before{content:""}.ri-thunderstorms-line:before{content:""}.ri-ticket-2-fill:before{content:""}.ri-ticket-2-line:before{content:""}.ri-ticket-fill:before{content:""}.ri-ticket-line:before{content:""}.ri-time-fill:before{content:""}.ri-time-line:before{content:""}.ri-timer-2-fill:before{content:""}.ri-timer-2-line:before{content:""}.ri-timer-fill:before{content:""}.ri-timer-flash-fill:before{content:""}.ri-timer-flash-line:before{content:""}.ri-timer-line:before{content:""}.ri-todo-fill:before{content:""}.ri-todo-line:before{content:""}.ri-toggle-fill:before{content:""}.ri-toggle-line:before{content:""}.ri-tools-fill:before{content:""}.ri-tools-line:before{content:""}.ri-tornado-fill:before{content:""}.ri-tornado-line:before{content:""}.ri-trademark-fill:before{content:""}.ri-trademark-line:before{content:""}.ri-traffic-light-fill:before{content:""}.ri-traffic-light-line:before{content:""}.ri-train-fill:before{content:""}.ri-train-line:before{content:""}.ri-train-wifi-fill:before{content:""}.ri-train-wifi-line:before{content:""}.ri-translate-2:before{content:""}.ri-translate:before{content:""}.ri-travesti-fill:before{content:""}.ri-travesti-line:before{content:""}.ri-treasure-map-fill:before{content:""}.ri-treasure-map-line:before{content:""}.ri-trello-fill:before{content:""}.ri-trello-line:before{content:""}.ri-trophy-fill:before{content:""}.ri-trophy-line:before{content:""}.ri-truck-fill:before{content:""}.ri-truck-line:before{content:""}.ri-tumblr-fill:before{content:""}.ri-tumblr-line:before{content:""}.ri-tv-2-fill:before{content:""}.ri-tv-2-line:before{content:""}.ri-tv-fill:before{content:""}.ri-tv-line:before{content:""}.ri-twitch-fill:before{content:""}.ri-twitch-line:before{content:""}.ri-twitter-fill:before{content:""}.ri-twitter-line:before{content:""}.ri-typhoon-fill:before{content:""}.ri-typhoon-line:before{content:""}.ri-u-disk-fill:before{content:""}.ri-u-disk-line:before{content:""}.ri-ubuntu-fill:before{content:""}.ri-ubuntu-line:before{content:""}.ri-umbrella-fill:before{content:""}.ri-umbrella-line:before{content:""}.ri-underline:before{content:""}.ri-uninstall-fill:before{content:""}.ri-uninstall-line:before{content:""}.ri-unsplash-fill:before{content:""}.ri-unsplash-line:before{content:""}.ri-upload-2-fill:before{content:""}.ri-upload-2-line:before{content:""}.ri-upload-cloud-2-fill:before{content:""}.ri-upload-cloud-2-line:before{content:""}.ri-upload-cloud-fill:before{content:""}.ri-upload-cloud-line:before{content:""}.ri-upload-fill:before{content:""}.ri-upload-line:before{content:""}.ri-usb-fill:before{content:""}.ri-usb-line:before{content:""}.ri-user-2-fill:before{content:""}.ri-user-2-line:before{content:""}.ri-user-3-fill:before{content:""}.ri-user-3-line:before{content:""}.ri-user-4-fill:before{content:""}.ri-user-4-line:before{content:""}.ri-user-5-fill:before{content:""}.ri-user-5-line:before{content:""}.ri-user-6-fill:before{content:""}.ri-user-6-line:before{content:""}.ri-user-add-fill:before{content:""}.ri-user-add-line:before{content:""}.ri-user-fill:before{content:""}.ri-user-follow-fill:before{content:""}.ri-user-follow-line:before{content:""}.ri-user-heart-fill:before{content:""}.ri-user-heart-line:before{content:""}.ri-user-line:before{content:""}.ri-user-location-fill:before{content:""}.ri-user-location-line:before{content:""}.ri-user-received-2-fill:before{content:""}.ri-user-received-2-line:before{content:""}.ri-user-received-fill:before{content:""}.ri-user-received-line:before{content:""}.ri-user-search-fill:before{content:""}.ri-user-search-line:before{content:""}.ri-user-settings-fill:before{content:""}.ri-user-settings-line:before{content:""}.ri-user-shared-2-fill:before{content:""}.ri-user-shared-2-line:before{content:""}.ri-user-shared-fill:before{content:""}.ri-user-shared-line:before{content:""}.ri-user-smile-fill:before{content:""}.ri-user-smile-line:before{content:""}.ri-user-star-fill:before{content:""}.ri-user-star-line:before{content:""}.ri-user-unfollow-fill:before{content:""}.ri-user-unfollow-line:before{content:""}.ri-user-voice-fill:before{content:""}.ri-user-voice-line:before{content:""}.ri-video-add-fill:before{content:""}.ri-video-add-line:before{content:""}.ri-video-chat-fill:before{content:""}.ri-video-chat-line:before{content:""}.ri-video-download-fill:before{content:""}.ri-video-download-line:before{content:""}.ri-video-fill:before{content:""}.ri-video-line:before{content:""}.ri-video-upload-fill:before{content:""}.ri-video-upload-line:before{content:""}.ri-vidicon-2-fill:before{content:""}.ri-vidicon-2-line:before{content:""}.ri-vidicon-fill:before{content:""}.ri-vidicon-line:before{content:""}.ri-vimeo-fill:before{content:""}.ri-vimeo-line:before{content:""}.ri-vip-crown-2-fill:before{content:""}.ri-vip-crown-2-line:before{content:""}.ri-vip-crown-fill:before{content:""}.ri-vip-crown-line:before{content:""}.ri-vip-diamond-fill:before{content:""}.ri-vip-diamond-line:before{content:""}.ri-vip-fill:before{content:""}.ri-vip-line:before{content:""}.ri-virus-fill:before{content:""}.ri-virus-line:before{content:""}.ri-visa-fill:before{content:""}.ri-visa-line:before{content:""}.ri-voice-recognition-fill:before{content:""}.ri-voice-recognition-line:before{content:""}.ri-voiceprint-fill:before{content:""}.ri-voiceprint-line:before{content:""}.ri-volume-down-fill:before{content:""}.ri-volume-down-line:before{content:""}.ri-volume-mute-fill:before{content:""}.ri-volume-mute-line:before{content:""}.ri-volume-off-vibrate-fill:before{content:""}.ri-volume-off-vibrate-line:before{content:""}.ri-volume-up-fill:before{content:""}.ri-volume-up-line:before{content:""}.ri-volume-vibrate-fill:before{content:""}.ri-volume-vibrate-line:before{content:""}.ri-vuejs-fill:before{content:""}.ri-vuejs-line:before{content:""}.ri-walk-fill:before{content:""}.ri-walk-line:before{content:""}.ri-wallet-2-fill:before{content:""}.ri-wallet-2-line:before{content:""}.ri-wallet-3-fill:before{content:""}.ri-wallet-3-line:before{content:""}.ri-wallet-fill:before{content:""}.ri-wallet-line:before{content:""}.ri-water-flash-fill:before{content:""}.ri-water-flash-line:before{content:""}.ri-webcam-fill:before{content:""}.ri-webcam-line:before{content:""}.ri-wechat-2-fill:before{content:""}.ri-wechat-2-line:before{content:""}.ri-wechat-fill:before{content:""}.ri-wechat-line:before{content:""}.ri-wechat-pay-fill:before{content:""}.ri-wechat-pay-line:before{content:""}.ri-weibo-fill:before{content:""}.ri-weibo-line:before{content:""}.ri-whatsapp-fill:before{content:""}.ri-whatsapp-line:before{content:""}.ri-wheelchair-fill:before{content:""}.ri-wheelchair-line:before{content:""}.ri-wifi-fill:before{content:""}.ri-wifi-line:before{content:""}.ri-wifi-off-fill:before{content:""}.ri-wifi-off-line:before{content:""}.ri-window-2-fill:before{content:""}.ri-window-2-line:before{content:""}.ri-window-fill:before{content:""}.ri-window-line:before{content:""}.ri-windows-fill:before{content:""}.ri-windows-line:before{content:""}.ri-windy-fill:before{content:""}.ri-windy-line:before{content:""}.ri-wireless-charging-fill:before{content:""}.ri-wireless-charging-line:before{content:""}.ri-women-fill:before{content:""}.ri-women-line:before{content:""}.ri-wubi-input:before{content:""}.ri-xbox-fill:before{content:""}.ri-xbox-line:before{content:""}.ri-xing-fill:before{content:""}.ri-xing-line:before{content:""}.ri-youtube-fill:before{content:""}.ri-youtube-line:before{content:""}.ri-zcool-fill:before{content:""}.ri-zcool-line:before{content:""}.ri-zhihu-fill:before{content:""}.ri-zhihu-line:before{content:""}.ri-zoom-in-fill:before{content:""}.ri-zoom-in-line:before{content:""}.ri-zoom-out-fill:before{content:""}.ri-zoom-out-line:before{content:""}.ri-zzz-fill:before{content:""}.ri-zzz-line:before{content:""}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes expand{0%{transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shine{to{background-position-x:-200%}}@keyframes loaderShow{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes entranceLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceRight{0%{opacity:0;transform:translate(5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceTop{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes entranceBottom{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media screen and (min-width: 550px){::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}::-webkit-scrollbar-thumb{background-color:var(--baseAlt2Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt3Color)}html{scrollbar-color:var(--baseAlt2Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}html *{scrollbar-width:inherit}}:focus-visible{outline-color:var(--primaryColor);outline-style:solid}html,body{line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);font-size:var(--baseFontSize);color:var(--txtPrimaryColor);background:var(--bodyColor)}#app{overflow:auto;display:block;width:100%;height:100vh}.schema-field,.flatpickr-inline-container,.accordion .accordion-content,.accordion,.tabs,.tabs-content,.select .txt-missing,.form-field .form-field-block,.list,.skeleton-loader,.clearfix,.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel,.block,.code-block,blockquote,p{display:block;width:100%}h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6{margin:0;font-weight:400}h1{font-size:22px;line-height:28px}h2,.breadcrumbs .breadcrumb-item{font-size:20px;line-height:26px}h3{font-size:19px;line-height:24px}h4{font-size:18px;line-height:24px}h5{font-size:17px;line-height:24px}h6{font-size:16px;line-height:22px}em{font-style:italic}ins{color:var(--txtPrimaryColor);background:var(--successAltColor);text-decoration:none}del{color:var(--txtPrimaryColor);background:var(--dangerAltColor);text-decoration:none}strong{font-weight:600}small{font-size:var(--smFontSize);line-height:var(--smLineHeight)}sub,sup{position:relative;font-size:.75em;line-height:1}sup{vertical-align:top}sub{vertical-align:bottom}p{margin:5px 0}blockquote{position:relative;padding-left:var(--smSpacing);font-style:italic;color:var(--txtHintColor)}blockquote:before{content:"";position:absolute;top:0;left:0;width:2px;height:100%;background:var(--baseColor)}code{display:inline-block;font-family:var(--monospaceFontFamily);font-style:normal;font-size:1em;line-height:1.379rem;padding:0 4px;white-space:nowrap;color:var(--txtPrimaryColor);background:var(--baseAlt2Color);border-radius:var(--baseRadius)}.code-block{overflow:auto;padding:var(--xsSpacing);white-space:pre-wrap;background:var(--baseAlt1Color)}ol,ul{margin:10px 0;list-style:decimal;padding-left:var(--baseSpacing)}ol li,ul li{margin-top:5px;margin-bottom:5px}ul{list-style:disc}img{max-width:100%;vertical-align:top}hr{display:block;border:0;height:1px;width:100%;background:var(--baseAlt1Color);margin:var(--baseSpacing) 0}hr.dark{background:var(--baseAlt2Color)}a{color:inherit}a:hover{text-decoration:none}a i,a .txt{display:inline-block;vertical-align:top}.txt-mono{font-family:var(--monospaceFontFamily)}.txt-nowrap{white-space:nowrap}.txt-ellipsis{display:inline-block;vertical-align:top;flex-shrink:1;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.txt-base{font-size:var(--baseFontSize)!important}.txt-xs{font-size:var(--xsFontSize)!important;line-height:var(--smLineHeight)}.txt-sm{font-size:var(--smFontSize)!important;line-height:var(--smLineHeight)}.txt-lg{font-size:var(--lgFontSize)!important}.txt-xl{font-size:var(--xlFontSize)!important}.txt-bold{font-weight:600!important}.txt-strikethrough{text-decoration:line-through!important}.txt-break{white-space:pre-wrap!important}.txt-center{text-align:center!important}.txt-justify{text-align:justify!important}.txt-left{text-align:left!important}.txt-right{text-align:right!important}.txt-main{color:var(--txtPrimaryColor)!important}.txt-hint{color:var(--txtHintColor)!important}.txt-disabled{color:var(--txtDisabledColor)!important}.link-hint{user-select:none;cursor:pointer;color:var(--txtHintColor)!important;text-decoration:none;transition:color var(--baseAnimationSpeed)}.link-hint:hover,.link-hint:focus-visible,.link-hint:active{color:var(--txtPrimaryColor)!important}.link-fade{opacity:1;user-select:none;cursor:pointer;text-decoration:none;color:var(--txtPrimaryColor);transition:opacity var(--baseAnimationSpeed)}.link-fade:focus-visible,.link-fade:hover,.link-fade:active{opacity:.8}.txt-primary{color:var(--primaryColor)!important}.bg-primary{background:var(--primaryColor)!important}.link-primary{cursor:pointer;color:var(--primaryColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-primary:focus-visible,.link-primary:hover,.link-primary:active{opacity:.8}.txt-info{color:var(--infoColor)!important}.bg-info{background:var(--infoColor)!important}.link-info{cursor:pointer;color:var(--infoColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info:focus-visible,.link-info:hover,.link-info:active{opacity:.8}.txt-info-alt{color:var(--infoAltColor)!important}.bg-info-alt{background:var(--infoAltColor)!important}.link-info-alt{cursor:pointer;color:var(--infoAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info-alt:focus-visible,.link-info-alt:hover,.link-info-alt:active{opacity:.8}.txt-success{color:var(--successColor)!important}.bg-success{background:var(--successColor)!important}.link-success{cursor:pointer;color:var(--successColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success:focus-visible,.link-success:hover,.link-success:active{opacity:.8}.txt-success-alt{color:var(--successAltColor)!important}.bg-success-alt{background:var(--successAltColor)!important}.link-success-alt{cursor:pointer;color:var(--successAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success-alt:focus-visible,.link-success-alt:hover,.link-success-alt:active{opacity:.8}.txt-danger{color:var(--dangerColor)!important}.bg-danger{background:var(--dangerColor)!important}.link-danger{cursor:pointer;color:var(--dangerColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger:focus-visible,.link-danger:hover,.link-danger:active{opacity:.8}.txt-danger-alt{color:var(--dangerAltColor)!important}.bg-danger-alt{background:var(--dangerAltColor)!important}.link-danger-alt{cursor:pointer;color:var(--dangerAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger-alt:focus-visible,.link-danger-alt:hover,.link-danger-alt:active{opacity:.8}.txt-warning{color:var(--warningColor)!important}.bg-warning{background:var(--warningColor)!important}.link-warning{cursor:pointer;color:var(--warningColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning:focus-visible,.link-warning:hover,.link-warning:active{opacity:.8}.txt-warning-alt{color:var(--warningAltColor)!important}.bg-warning-alt{background:var(--warningAltColor)!important}.link-warning-alt{cursor:pointer;color:var(--warningAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning-alt:focus-visible,.link-warning-alt:hover,.link-warning-alt:active{opacity:.8}.fade{opacity:.6}a.fade,.btn.fade,[tabindex].fade,[class*=link-].fade,.handle.fade{transition:all var(--baseAnimationSpeed)}a.fade:hover,.btn.fade:hover,[tabindex].fade:hover,[class*=link-].fade:hover,.handle.fade:hover{opacity:1}.noborder{border:0px!important}.hidden{display:none!important}.hidden-empty:empty{display:none!important}.no-pointer-events{pointer-events:none}.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel{min-width:0}.content>:first-child,.form-field .help-block>:first-child,.overlay-panel .panel-content>:first-child,.sub-panel>:first-child,.panel>:first-child{margin-top:0}.content>:last-child,.form-field .help-block>:last-child,.overlay-panel .panel-content>:last-child,.sub-panel>:last-child,.panel>:last-child{margin-bottom:0}.panel{background:var(--baseColor);border-radius:var(--lgRadius);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);box-shadow:0 2px 5px 0 var(--shadowColor)}.sub-panel{background:var(--baseColor);border-radius:var(--baseRadius);padding:calc(var(--smSpacing) - 5px) var(--smSpacing);border:1px solid var(--baseAlt1Color)}.shadowize{box-shadow:0 2px 5px 0 var(--shadowColor)}.clearfix{clear:both}.clearfix:after{content:"";display:table;clear:both}.flex{position:relative;display:flex;align-items:center;width:100%;min-width:0;gap:var(--smSpacing)}.flex-fill{flex:1 1 auto!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.inline-flex{position:relative;display:inline-flex;vertical-align:top;align-items:center;flex-wrap:wrap;min-width:0;gap:10px}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-gap-base{gap:var(--baseSpacing)!important}.flex-gap-xs{gap:var(--xsSpacing)!important}.flex-gap-sm{gap:var(--smSpacing)!important}.flex-gap-lg{gap:var(--lgSpacing)!important}.flex-gap-xl{gap:var(--xlSpacing)!important}.flex-gap-0{gap:0px!important}.flex-gap-5{gap:5px!important}.flex-gap-10{gap:10px!important}.flex-gap-15{gap:15px!important}.flex-gap-20{gap:20px!important}.flex-gap-25{gap:25px!important}.flex-gap-30{gap:30px!important}.flex-gap-35{gap:35px!important}.flex-gap-40{gap:40px!important}.flex-gap-45{gap:45px!important}.flex-gap-50{gap:50px!important}.flex-gap-55{gap:55px!important}.flex-gap-60{gap:60px!important}.m-base{margin:var(--baseSpacing)!important}.p-base{padding:var(--baseSpacing)!important}.m-xs{margin:var(--xsSpacing)!important}.p-xs{padding:var(--xsSpacing)!important}.m-sm{margin:var(--smSpacing)!important}.p-sm{padding:var(--smSpacing)!important}.m-lg{margin:var(--lgSpacing)!important}.p-lg{padding:var(--lgSpacing)!important}.m-xl{margin:var(--xlSpacing)!important}.p-xl{padding:var(--xlSpacing)!important}.m-t-auto{margin-top:auto!important}.p-t-auto{padding-top:auto!important}.m-t-base{margin-top:var(--baseSpacing)!important}.p-t-base{padding-top:var(--baseSpacing)!important}.m-t-xs{margin-top:var(--xsSpacing)!important}.p-t-xs{padding-top:var(--xsSpacing)!important}.m-t-sm{margin-top:var(--smSpacing)!important}.p-t-sm{padding-top:var(--smSpacing)!important}.m-t-lg{margin-top:var(--lgSpacing)!important}.p-t-lg{padding-top:var(--lgSpacing)!important}.m-t-xl{margin-top:var(--xlSpacing)!important}.p-t-xl{padding-top:var(--xlSpacing)!important}.m-r-auto{margin-right:auto!important}.p-r-auto{padding-right:auto!important}.m-r-base{margin-right:var(--baseSpacing)!important}.p-r-base{padding-right:var(--baseSpacing)!important}.m-r-xs{margin-right:var(--xsSpacing)!important}.p-r-xs{padding-right:var(--xsSpacing)!important}.m-r-sm{margin-right:var(--smSpacing)!important}.p-r-sm{padding-right:var(--smSpacing)!important}.m-r-lg{margin-right:var(--lgSpacing)!important}.p-r-lg{padding-right:var(--lgSpacing)!important}.m-r-xl{margin-right:var(--xlSpacing)!important}.p-r-xl{padding-right:var(--xlSpacing)!important}.m-b-auto{margin-bottom:auto!important}.p-b-auto{padding-bottom:auto!important}.m-b-base{margin-bottom:var(--baseSpacing)!important}.p-b-base{padding-bottom:var(--baseSpacing)!important}.m-b-xs{margin-bottom:var(--xsSpacing)!important}.p-b-xs{padding-bottom:var(--xsSpacing)!important}.m-b-sm{margin-bottom:var(--smSpacing)!important}.p-b-sm{padding-bottom:var(--smSpacing)!important}.m-b-lg{margin-bottom:var(--lgSpacing)!important}.p-b-lg{padding-bottom:var(--lgSpacing)!important}.m-b-xl{margin-bottom:var(--xlSpacing)!important}.p-b-xl{padding-bottom:var(--xlSpacing)!important}.m-l-auto{margin-left:auto!important}.p-l-auto{padding-left:auto!important}.m-l-base{margin-left:var(--baseSpacing)!important}.p-l-base{padding-left:var(--baseSpacing)!important}.m-l-xs{margin-left:var(--xsSpacing)!important}.p-l-xs{padding-left:var(--xsSpacing)!important}.m-l-sm{margin-left:var(--smSpacing)!important}.p-l-sm{padding-left:var(--smSpacing)!important}.m-l-lg{margin-left:var(--lgSpacing)!important}.p-l-lg{padding-left:var(--lgSpacing)!important}.m-l-xl{margin-left:var(--xlSpacing)!important}.p-l-xl{padding-left:var(--xlSpacing)!important}.m-0{margin:0!important}.p-0{padding:0!important}.m-t-0{margin-top:0!important}.p-t-0{padding-top:0!important}.m-r-0{margin-right:0!important}.p-r-0{padding-right:0!important}.m-b-0{margin-bottom:0!important}.p-b-0{padding-bottom:0!important}.m-l-0{margin-left:0!important}.p-l-0{padding-left:0!important}.m-5{margin:5px!important}.p-5{padding:5px!important}.m-t-5{margin-top:5px!important}.p-t-5{padding-top:5px!important}.m-r-5{margin-right:5px!important}.p-r-5{padding-right:5px!important}.m-b-5{margin-bottom:5px!important}.p-b-5{padding-bottom:5px!important}.m-l-5{margin-left:5px!important}.p-l-5{padding-left:5px!important}.m-10{margin:10px!important}.p-10{padding:10px!important}.m-t-10{margin-top:10px!important}.p-t-10{padding-top:10px!important}.m-r-10{margin-right:10px!important}.p-r-10{padding-right:10px!important}.m-b-10{margin-bottom:10px!important}.p-b-10{padding-bottom:10px!important}.m-l-10{margin-left:10px!important}.p-l-10{padding-left:10px!important}.m-15{margin:15px!important}.p-15{padding:15px!important}.m-t-15{margin-top:15px!important}.p-t-15{padding-top:15px!important}.m-r-15{margin-right:15px!important}.p-r-15{padding-right:15px!important}.m-b-15{margin-bottom:15px!important}.p-b-15{padding-bottom:15px!important}.m-l-15{margin-left:15px!important}.p-l-15{padding-left:15px!important}.m-20{margin:20px!important}.p-20{padding:20px!important}.m-t-20{margin-top:20px!important}.p-t-20{padding-top:20px!important}.m-r-20{margin-right:20px!important}.p-r-20{padding-right:20px!important}.m-b-20{margin-bottom:20px!important}.p-b-20{padding-bottom:20px!important}.m-l-20{margin-left:20px!important}.p-l-20{padding-left:20px!important}.m-25{margin:25px!important}.p-25{padding:25px!important}.m-t-25{margin-top:25px!important}.p-t-25{padding-top:25px!important}.m-r-25{margin-right:25px!important}.p-r-25{padding-right:25px!important}.m-b-25{margin-bottom:25px!important}.p-b-25{padding-bottom:25px!important}.m-l-25{margin-left:25px!important}.p-l-25{padding-left:25px!important}.m-30{margin:30px!important}.p-30{padding:30px!important}.m-t-30{margin-top:30px!important}.p-t-30{padding-top:30px!important}.m-r-30{margin-right:30px!important}.p-r-30{padding-right:30px!important}.m-b-30{margin-bottom:30px!important}.p-b-30{padding-bottom:30px!important}.m-l-30{margin-left:30px!important}.p-l-30{padding-left:30px!important}.m-35{margin:35px!important}.p-35{padding:35px!important}.m-t-35{margin-top:35px!important}.p-t-35{padding-top:35px!important}.m-r-35{margin-right:35px!important}.p-r-35{padding-right:35px!important}.m-b-35{margin-bottom:35px!important}.p-b-35{padding-bottom:35px!important}.m-l-35{margin-left:35px!important}.p-l-35{padding-left:35px!important}.m-40{margin:40px!important}.p-40{padding:40px!important}.m-t-40{margin-top:40px!important}.p-t-40{padding-top:40px!important}.m-r-40{margin-right:40px!important}.p-r-40{padding-right:40px!important}.m-b-40{margin-bottom:40px!important}.p-b-40{padding-bottom:40px!important}.m-l-40{margin-left:40px!important}.p-l-40{padding-left:40px!important}.m-45{margin:45px!important}.p-45{padding:45px!important}.m-t-45{margin-top:45px!important}.p-t-45{padding-top:45px!important}.m-r-45{margin-right:45px!important}.p-r-45{padding-right:45px!important}.m-b-45{margin-bottom:45px!important}.p-b-45{padding-bottom:45px!important}.m-l-45{margin-left:45px!important}.p-l-45{padding-left:45px!important}.m-50{margin:50px!important}.p-50{padding:50px!important}.m-t-50{margin-top:50px!important}.p-t-50{padding-top:50px!important}.m-r-50{margin-right:50px!important}.p-r-50{padding-right:50px!important}.m-b-50{margin-bottom:50px!important}.p-b-50{padding-bottom:50px!important}.m-l-50{margin-left:50px!important}.p-l-50{padding-left:50px!important}.m-55{margin:55px!important}.p-55{padding:55px!important}.m-t-55{margin-top:55px!important}.p-t-55{padding-top:55px!important}.m-r-55{margin-right:55px!important}.p-r-55{padding-right:55px!important}.m-b-55{margin-bottom:55px!important}.p-b-55{padding-bottom:55px!important}.m-l-55{margin-left:55px!important}.p-l-55{padding-left:55px!important}.m-60{margin:60px!important}.p-60{padding:60px!important}.m-t-60{margin-top:60px!important}.p-t-60{padding-top:60px!important}.m-r-60{margin-right:60px!important}.p-r-60{padding-right:60px!important}.m-b-60{margin-bottom:60px!important}.p-b-60{padding-bottom:60px!important}.m-l-60{margin-left:60px!important}.p-l-60{padding-left:60px!important}.no-min-width{min-width:0!important}.wrapper{position:relative;width:var(--wrapperWidth);margin:0 auto;max-width:100%}.wrapper.wrapper-sm{width:var(--smWrapperWidth)}.wrapper.wrapper-lg{width:var(--lgWrapperWidth)}.label{--labelVPadding: 3px;--labelHPadding: 9px;display:inline-flex;align-items:center;justify-content:center;vertical-align:top;gap:5px;padding:var(--labelVPadding) var(--labelHPadding);min-height:24px;max-width:100%;text-align:center;line-height:var(--smLineHeight);font-size:var(--smFontSize);background:var(--baseAlt2Color);color:var(--txtPrimaryColor);white-space:nowrap;border-radius:30px}.label .btn:last-child{margin-right:calc(-.5 * var(--labelHPadding))}.label .btn:first-child{margin-left:calc(-.5 * var(--labelHPadding))}.label.label-sm{--labelHPadding: 5px;font-size:var(--xsFontSize);min-height:18px;line-height:1}.label.label-primary{color:var(--baseColor);background:var(--primaryColor)}.label.label-info{background:var(--infoAltColor)}.label.label-success{background:var(--successAltColor)}.label.label-danger{background:var(--dangerAltColor)}.label.label-warning{background:var(--warningAltColor)}.thumb{--thumbSize: 40px;display:inline-flex;vertical-align:top;position:relative;flex-shrink:0;align-items:center;justify-content:center;line-height:1;width:var(--thumbSize);height:var(--thumbSize);background:var(--baseAlt2Color);border-radius:var(--baseRadius);color:var(--txtPrimaryColor);box-shadow:0 2px 5px 0 var(--shadowColor)}.thumb i{font-size:inherit}.thumb img{width:100%;height:100%;border-radius:inherit;overflow:hidden}.thumb.thumb-xs{--thumbSize: 24px;font-size:.85rem}.thumb.thumb-sm{--thumbSize: 32px;font-size:.92rem}.thumb.thumb-lg{--thumbSize: 60px;font-size:1.3rem}.thumb.thumb-xl{--thumbSize: 80px;font-size:1.5rem}.thumb.thumb-circle{border-radius:50%}.thumb.thumb-active{box-shadow:0 0 0 2px var(--primaryColor)}a.thumb:not(.thumb-active){transition:box-shadow var(--baseAnimationSpeed)}a.thumb:not(.thumb-active):hover,a.thumb:not(.thumb-active):focus{box-shadow:0 2px 5px 0 var(--shadowColor),0 2px 4px 1px var(--shadowColor)}.section-title{display:flex;align-items:center;width:100%;column-gap:10px;row-gap:5px;margin:0 0 var(--xsSpacing);font-weight:600;font-size:var(--baseFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor)}.logo{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:10px;font-size:23px;text-decoration:none;color:inherit;user-select:none}.logo strong{font-weight:700}.logo .version{position:absolute;right:0;top:-5px;line-height:1;font-size:10px;font-weight:400;padding:2px 4px;border-radius:var(--baseRadius);background:var(--dangerAltColor);color:var(--txtPrimaryColor)}.logo.logo-sm{font-size:20px}.drag-handle{position:relative;display:inline-flex;align-items:center;justify-content:center;text-align:center;flex-shrink:0;color:var(--txtDisabledColor);user-select:none;cursor:pointer;transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed)}.drag-handle:before{content:"";line-height:1;font-family:var(--iconFontFamily);padding-right:5px;text-shadow:5px 0px currentColor}.drag-handle:hover,.drag-handle:focus-visible{color:var(--txtHintColor)}.drag-handle:active{transition-duration:var(--activeAnimationSpeed);color:var(--txtPrimaryColor)}.loader{--loaderSize: 32px;position:relative;display:inline-flex;vertical-align:top;flex-direction:column;align-items:center;justify-content:center;row-gap:10px;margin:0;color:var(--txtDisabledColor);text-align:center;font-weight:400}.loader:before{content:"";display:inline-block;vertical-align:top;clear:both;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);font-weight:400;font-family:var(--iconFontFamily);color:inherit;text-align:center;animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.loader.loader-primary{color:var(--primaryColor)}.loader.loader-info{color:var(--infoColor)}.loader.loader-info-alt{color:var(--infoAltColor)}.loader.loader-success{color:var(--successColor)}.loader.loader-success-alt{color:var(--successAltColor)}.loader.loader-danger{color:var(--dangerColor)}.loader.loader-danger-alt{color:var(--dangerAltColor)}.loader.loader-warning{color:var(--warningColor)}.loader.loader-warning-alt{color:var(--warningAltColor)}.loader.loader-xs{--loaderSize: 18px}.loader.loader-sm{--loaderSize: 24px}.loader.loader-lg{--loaderSize: 42px}.skeleton-loader{position:relative;height:12px;margin:5px 0;border-radius:var(--baseRadius);background:var(--baseAlt1Color);animation:fadeIn .4s}.skeleton-loader:before{content:"";width:100%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--baseAlt1Color) 8%,var(--bodyColor) 18%,var(--baseAlt1Color) 33%);background-size:200% 100%;animation:shine 1s linear infinite}.placeholder-section{display:flex;width:100%;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:var(--smSpacing);color:var(--txtHintColor)}.placeholder-section .icon{font-size:50px;height:50px;line-height:1;opacity:.3}.placeholder-section .icon i{font-size:inherit;vertical-align:top}.list{position:relative;overflow:auto;overflow:overlay;border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}.list .list-item{word-break:break-word;position:relative;display:flex;align-items:center;width:100%;gap:var(--xsSpacing);outline:0;padding:10px var(--xsSpacing);min-height:50px;border-top:1px solid var(--baseAlt2Color);transition:background var(--baseAnimationSpeed)}.list .list-item:first-child{border-top:0}.list .list-item:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.list .list-item .content,.list .list-item .form-field .help-block,.form-field .list .list-item .help-block,.list .list-item .overlay-panel .panel-content,.overlay-panel .list .list-item .panel-content,.list .list-item .panel,.list .list-item .sub-panel{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%;user-select:text}.list .list-item .actions{gap:10px;flex-shrink:0;display:inline-flex;align-items:center;margin:-1px -5px -1px 0}.list .list-item .actions.nonintrusive{opacity:0;transform:translate(5px);transition:transform var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed)}.list .list-item:hover,.list .list-item:focus-visible,.list .list-item:focus-within,.list .list-item:active{background:var(--bodyColor)}.list .list-item:hover .actions.nonintrusive,.list .list-item:focus-visible .actions.nonintrusive,.list .list-item:focus-within .actions.nonintrusive,.list .list-item:active .actions.nonintrusive{opacity:1;transform:translate(0)}.list .list-item.selected{background:var(--bodyColor)}.list .list-item.handle:not(.disabled){cursor:pointer;user-select:none}.list .list-item.handle:not(.disabled):hover,.list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt1Color)}.list .list-item.handle:not(.disabled):active{background:var(--baseAlt2Color)}.list .list-item.disabled:not(.selected){cursor:default;opacity:.6}.list .list-item-placeholder{color:var(--txtHintColor)}.list .list-item-btn{padding:5px;min-height:auto}.list .list-item-placeholder:hover,.list .list-item-placeholder:focus-visible,.list .list-item-placeholder:focus-within,.list .list-item-placeholder:active,.list .list-item-btn:hover,.list .list-item-btn:focus-visible,.list .list-item-btn:focus-within,.list .list-item-btn:active{background:none}.list.list-compact .list-item{gap:10px;min-height:40px}.entrance-top{animation:entranceTop var(--entranceAnimationSpeed)}.entrance-bottom{animation:entranceBottom var(--entranceAnimationSpeed)}.entrance-left{animation:entranceLeft var(--entranceAnimationSpeed)}.entrance-right{animation:entranceRight var(--entranceAnimationSpeed)}.provider-logo{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;border-radius:var(--baseRadius);background:var(--bodyColor);padding:0;gap:0}.provider-logo img{max-width:20px;max-height:20px;height:auto;flex-shrink:0}.provider-card{display:flex;align-items:center;width:100%;height:100%;gap:10px;padding:10px;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.grid{--gridGap: var(--baseSpacing);position:relative;display:flex;flex-grow:1;flex-wrap:wrap;row-gap:var(--gridGap);margin:0 calc(-.5 * var(--gridGap))}.grid.grid-center{align-items:center}.grid.grid-sm{--gridGap: var(--smSpacing)}.grid .form-field{margin-bottom:0}.grid>*{margin:0 calc(.5 * var(--gridGap))}.col-xxl-1,.col-xxl-2,.col-xxl-3,.col-xxl-4,.col-xxl-5,.col-xxl-6,.col-xxl-7,.col-xxl-8,.col-xxl-9,.col-xxl-10,.col-xxl-11,.col-xxl-12,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{position:relative;width:100%;min-height:1px}.col-auto{flex:0 0 auto;width:auto}.col-12{width:calc(100% - var(--gridGap))}.col-11{width:calc(91.6666666667% - var(--gridGap))}.col-10{width:calc(83.3333333333% - var(--gridGap))}.col-9{width:calc(75% - var(--gridGap))}.col-8{width:calc(66.6666666667% - var(--gridGap))}.col-7{width:calc(58.3333333333% - var(--gridGap))}.col-6{width:calc(50% - var(--gridGap))}.col-5{width:calc(41.6666666667% - var(--gridGap))}.col-4{width:calc(33.3333333333% - var(--gridGap))}.col-3{width:calc(25% - var(--gridGap))}.col-2{width:calc(16.6666666667% - var(--gridGap))}.col-1{width:calc(8.3333333333% - var(--gridGap))}@media (min-width: 576px){.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-12{width:calc(100% - var(--gridGap))}.col-sm-11{width:calc(91.6666666667% - var(--gridGap))}.col-sm-10{width:calc(83.3333333333% - var(--gridGap))}.col-sm-9{width:calc(75% - var(--gridGap))}.col-sm-8{width:calc(66.6666666667% - var(--gridGap))}.col-sm-7{width:calc(58.3333333333% - var(--gridGap))}.col-sm-6{width:calc(50% - var(--gridGap))}.col-sm-5{width:calc(41.6666666667% - var(--gridGap))}.col-sm-4{width:calc(33.3333333333% - var(--gridGap))}.col-sm-3{width:calc(25% - var(--gridGap))}.col-sm-2{width:calc(16.6666666667% - var(--gridGap))}.col-sm-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 768px){.col-md-auto{flex:0 0 auto;width:auto}.col-md-12{width:calc(100% - var(--gridGap))}.col-md-11{width:calc(91.6666666667% - var(--gridGap))}.col-md-10{width:calc(83.3333333333% - var(--gridGap))}.col-md-9{width:calc(75% - var(--gridGap))}.col-md-8{width:calc(66.6666666667% - var(--gridGap))}.col-md-7{width:calc(58.3333333333% - var(--gridGap))}.col-md-6{width:calc(50% - var(--gridGap))}.col-md-5{width:calc(41.6666666667% - var(--gridGap))}.col-md-4{width:calc(33.3333333333% - var(--gridGap))}.col-md-3{width:calc(25% - var(--gridGap))}.col-md-2{width:calc(16.6666666667% - var(--gridGap))}.col-md-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 992px){.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-12{width:calc(100% - var(--gridGap))}.col-lg-11{width:calc(91.6666666667% - var(--gridGap))}.col-lg-10{width:calc(83.3333333333% - var(--gridGap))}.col-lg-9{width:calc(75% - var(--gridGap))}.col-lg-8{width:calc(66.6666666667% - var(--gridGap))}.col-lg-7{width:calc(58.3333333333% - var(--gridGap))}.col-lg-6{width:calc(50% - var(--gridGap))}.col-lg-5{width:calc(41.6666666667% - var(--gridGap))}.col-lg-4{width:calc(33.3333333333% - var(--gridGap))}.col-lg-3{width:calc(25% - var(--gridGap))}.col-lg-2{width:calc(16.6666666667% - var(--gridGap))}.col-lg-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1200px){.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-12{width:calc(100% - var(--gridGap))}.col-xl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xl-9{width:calc(75% - var(--gridGap))}.col-xl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xl-6{width:calc(50% - var(--gridGap))}.col-xl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xl-3{width:calc(25% - var(--gridGap))}.col-xl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xl-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1400px){.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-12{width:calc(100% - var(--gridGap))}.col-xxl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xxl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xxl-9{width:calc(75% - var(--gridGap))}.col-xxl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xxl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xxl-6{width:calc(50% - var(--gridGap))}.col-xxl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xxl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xxl-3{width:calc(25% - var(--gridGap))}.col-xxl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xxl-1{width:calc(8.3333333333% - var(--gridGap))}}.app-tooltip{position:fixed;z-index:999999;top:0;left:0;display:inline-block;vertical-align:top;max-width:275px;padding:3px 5px;color:#fff;text-align:center;font-family:var(--baseFontFamily);font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:var(--baseRadius);background:var(--tooltipColor);pointer-events:none;user-select:none;transition:opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed),transform var(--baseAnimationSpeed);transform:translateY(1px);backface-visibility:hidden;white-space:pre-line;word-break:break-word;opacity:0;visibility:hidden}.app-tooltip.code{font-family:monospace;white-space:pre-wrap;text-align:left;min-width:150px;max-width:340px}.app-tooltip.active{transform:scale(1);opacity:1;visibility:visible}.dropdown{position:absolute;z-index:99;right:0;left:auto;top:100%;cursor:default;display:inline-block;vertical-align:top;padding:5px;margin:5px 0 0;width:auto;min-width:140px;max-width:450px;max-height:330px;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);border-radius:var(--baseRadius);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.dropdown hr{margin:5px 0}.dropdown .dropdown-item{border:0;background:none;position:relative;outline:0;display:flex;align-items:center;column-gap:8px;width:100%;height:auto;min-height:0;text-align:left;padding:8px 10px;margin:0 0 5px;cursor:pointer;color:var(--txtPrimaryColor);font-weight:400;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);line-height:var(--baseLineHeight);border-radius:var(--baseRadius);text-decoration:none;word-break:break-word;user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.dropdown .dropdown-item:last-child{margin-bottom:0}.dropdown .dropdown-item.selected{background:var(--baseAlt2Color)}.dropdown .dropdown-item:focus-visible,.dropdown .dropdown-item:hover{background:var(--baseAlt1Color)}.dropdown .dropdown-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.dropdown .dropdown-item.disabled{color:var(--txtDisabledColor);background:none;pointer-events:none}.dropdown .dropdown-item.separator{cursor:default;background:none;text-transform:uppercase;padding-top:0;padding-bottom:0;margin-top:15px;color:var(--txtDisabledColor);font-weight:600;font-size:var(--smFontSize)}.dropdown.dropdown-upside{top:auto;bottom:100%;margin:0 0 5px}.dropdown.dropdown-left{right:auto;left:0}.dropdown.dropdown-center{right:auto;left:50%;transform:translate(-50%)}.dropdown.dropdown-sm{margin-top:5px;min-width:100px}.dropdown.dropdown-sm .dropdown-item{column-gap:7px;font-size:var(--smFontSize);margin:0 0 2px;padding:5px 7px}.dropdown.dropdown-sm .dropdown-item:last-child{margin-bottom:0}.dropdown.dropdown-sm.dropdown-upside{margin-top:0;margin-bottom:5px}.dropdown.dropdown-block{width:100%;min-width:130px;max-width:100%}.dropdown.dropdown-nowrap{white-space:nowrap}.overlay-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-self:flex-end;margin-left:auto;background:var(--baseColor);height:100%;width:580px;max-width:100%;word-wrap:break-word;box-shadow:0 2px 5px 0 var(--shadowColor)}.overlay-panel .overlay-panel-section{position:relative;width:100%;margin:0;padding:var(--baseSpacing);transition:box-shadow var(--baseAnimationSpeed)}.overlay-panel .overlay-panel-section:empty{display:none}.overlay-panel .overlay-panel-section:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.overlay-panel .overlay-panel-section:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.overlay-panel .overlay-panel-section .btn{flex-grow:0}.overlay-panel img{max-width:100%}.overlay-panel .panel-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:var(--baseSpacing);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel .panel-header>*{margin-top:0;margin-bottom:0}.overlay-panel .panel-header .btn-back{margin-left:-10px}.overlay-panel .panel-header .overlay-close{z-index:3;outline:0;position:absolute;right:100%;top:20px;margin:0;display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;text-align:center;font-size:1.6rem;line-height:1;border-radius:50% 0 0 50%;color:#fff;background:var(--primaryColor);opacity:.5;transition:opacity var(--baseAnimationSpeed);user-select:none}.overlay-panel .panel-header .overlay-close i{font-size:inherit}.overlay-panel .panel-header .overlay-close:hover,.overlay-panel .panel-header .overlay-close:focus-visible,.overlay-panel .panel-header .overlay-close:active{opacity:.7}.overlay-panel .panel-header .overlay-close:active{transition-duration:var(--activeAnimationSpeed);opacity:1}.overlay-panel .panel-header .btn-close{margin-right:-10px}.overlay-panel .panel-header .tabs-header{margin-bottom:-24px}.overlay-panel .panel-content{z-index:auto;flex-grow:1;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.tox-fullscreen .overlay-panel .panel-content{z-index:9}.overlay-panel .panel-header~.panel-content{padding-top:5px}.overlay-panel .panel-footer{z-index:2;column-gap:var(--smSpacing);display:flex;align-items:center;justify-content:flex-end;border-top:1px solid var(--baseAlt2Color);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel.scrollable .panel-header{box-shadow:0 4px 5px #0000000d}.overlay-panel.scrollable .panel-footer{box-shadow:0 -4px 5px #0000000d}.overlay-panel.scrollable.scroll-top-reached .panel-header,.overlay-panel.scrollable.scroll-bottom-reached .panel-footer{box-shadow:none}.overlay-panel.overlay-panel-xl{width:850px}.overlay-panel.overlay-panel-lg{width:700px}.overlay-panel.overlay-panel-sm{width:460px}.overlay-panel.popup{height:auto;max-height:100%;align-self:center;border-radius:var(--baseRadius);margin:0 auto}.overlay-panel.popup .panel-footer{background:var(--bodyColor)}.overlay-panel.hide-content .panel-content{display:none}.overlay-panel.colored-header .panel-header{background:var(--bodyColor);border-bottom:1px solid var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header{border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item{border:1px solid transparent;border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:hover,.overlay-panel.colored-header .panel-header .tabs-header .tab-item:focus-visible{background:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:after{content:none;display:none}.overlay-panel.colored-header .panel-header .tabs-header .tab-item.active{background:var(--baseColor);border-color:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header~.panel-content{padding-top:calc(var(--baseSpacing) - 5px)}.overlay-panel.compact-header .panel-header{row-gap:var(--smSpacing)}.overlay-panel.full-width-popup{width:100%}.overlay-panel.preview .panel-header{position:absolute;z-index:99;box-shadow:none}.overlay-panel.preview .panel-header .overlay-close{left:100%;right:auto;border-radius:0 50% 50% 0}.overlay-panel.preview .panel-header .overlay-close i{margin-right:5px}.overlay-panel.preview .panel-header,.overlay-panel.preview .panel-footer{padding:10px 15px}.overlay-panel.preview .panel-content{padding:0;text-align:center;display:flex;align-items:center;justify-content:center}.overlay-panel.preview img{max-width:100%;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.overlay-panel.preview object{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%}.overlay-panel.preview.preview-image{width:auto;min-width:320px;min-height:300px;max-width:75%;max-height:90%}.overlay-panel.preview.preview-document,.overlay-panel.preview.preview-video{width:75%;height:90%}.overlay-panel.preview.preview-audio{min-width:320px;min-height:300px;max-width:90%;max-height:90%}@media (max-width: 900px){.overlay-panel .overlay-panel-section{padding:var(--smSpacing)}}.overlay-panel-container{display:flex;position:fixed;z-index:1000;flex-direction:row;align-items:center;top:0;left:0;width:100%;height:100%;overflow:hidden;margin:0;padding:0;outline:0}.overlay-panel-container .overlay{position:absolute;z-index:0;left:0;top:0;width:100%;height:100%;user-select:none;background:var(--overlayColor)}.overlay-panel-container.padded{padding:10px}.overlay-panel-wrapper{position:relative;z-index:1000;outline:0}.alert{position:relative;display:flex;column-gap:15px;align-items:center;width:100%;min-height:50px;max-width:100%;word-break:break-word;margin:0 0 var(--baseSpacing);border-radius:var(--baseRadius);padding:12px 15px;background:var(--baseAlt1Color);color:var(--txtAltColor)}.alert .content,.alert .form-field .help-block,.form-field .alert .help-block,.alert .panel,.alert .sub-panel,.alert .overlay-panel .panel-content,.overlay-panel .alert .panel-content{flex-grow:1}.alert .icon,.alert .close{display:inline-flex;align-items:center;justify-content:center;flex-grow:0;flex-shrink:0;text-align:center}.alert .icon{align-self:stretch;font-size:1.2em;padding-right:15px;font-weight:400;border-right:1px solid rgba(0,0,0,.05);color:var(--txtHintColor)}.alert .close{display:inline-flex;margin-right:-5px;width:28px;height:28px;outline:0;cursor:pointer;text-align:center;font-size:var(--smFontSize);line-height:28px;border-radius:28px;text-decoration:none;color:inherit;opacity:.5;transition:opacity var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.alert .close:hover,.alert .close:focus{opacity:1;background:rgba(255,255,255,.2)}.alert .close:active{opacity:1;background:rgba(255,255,255,.3);transition-duration:var(--activeAnimationSpeed)}.alert code,.alert hr{background:rgba(0,0,0,.1)}.alert.alert-info{background:var(--infoAltColor)}.alert.alert-info .icon{color:var(--infoColor)}.alert.alert-warning{background:var(--warningAltColor)}.alert.alert-warning .icon{color:var(--warningColor)}.alert.alert-success{background:var(--successAltColor)}.alert.alert-success .icon{color:var(--successColor)}.alert.alert-danger{background:var(--dangerAltColor)}.alert.alert-danger .icon{color:var(--dangerColor)}.toasts-wrapper{position:fixed;z-index:999999;bottom:0;left:0;right:0;padding:0 var(--smSpacing);width:auto;display:block;text-align:center;pointer-events:none}.toasts-wrapper .alert{text-align:left;pointer-events:auto;width:var(--smWrapperWidth);margin:var(--baseSpacing) auto;box-shadow:0 2px 5px 0 var(--shadowColor)}@media screen and (min-width: 980px){body:not(.overlay-active):has(.app-sidebar) .toasts-wrapper{left:var(--appSidebarWidth)}body:not(.overlay-active):has(.page-sidebar) .toasts-wrapper{left:calc(var(--appSidebarWidth) + var(--pageSidebarWidth))}}button{outline:0;border:0;background:none;padding:0;text-align:left;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.btn{position:relative;z-index:1;display:inline-flex;vertical-align:top;align-items:center;justify-content:center;outline:0;border:0;margin:0;flex-shrink:0;cursor:pointer;padding:5px 20px;column-gap:7px;user-select:none;min-width:var(--btnHeight);min-height:var(--btnHeight);text-align:center;text-decoration:none;line-height:1;font-weight:600;color:#fff;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);border-radius:var(--btnRadius);background:none;transition:color var(--baseAnimationSpeed)}.btn i{font-size:1.1428em;vertical-align:middle;display:inline-block}.btn:before{content:"";border-radius:inherit;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;pointer-events:none;user-select:none;backface-visibility:hidden;background:var(--primaryColor);transition:filter var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.btn:hover:before,.btn:focus-visible:before{opacity:.9}.btn.active,.btn:active{z-index:999}.btn.active:before,.btn:active:before{opacity:.8;transition-duration:var(--activeAnimationSpeed)}.btn.btn-info:before{background:var(--infoColor)}.btn.btn-info:hover:before,.btn.btn-info:focus-visible:before{opacity:.8}.btn.btn-info:active:before{opacity:.7}.btn.btn-success:before{background:var(--successColor)}.btn.btn-success:hover:before,.btn.btn-success:focus-visible:before{opacity:.8}.btn.btn-success:active:before{opacity:.7}.btn.btn-danger:before{background:var(--dangerColor)}.btn.btn-danger:hover:before,.btn.btn-danger:focus-visible:before{opacity:.8}.btn.btn-danger:active:before{opacity:.7}.btn.btn-warning:before{background:var(--warningColor)}.btn.btn-warning:hover:before,.btn.btn-warning:focus-visible:before{opacity:.8}.btn.btn-warning:active:before{opacity:.7}.btn.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-hint:hover:before,.btn.btn-hint:focus-visible:before{opacity:.8}.btn.btn-hint:active:before{opacity:.7}.btn.btn-outline{border:2px solid currentColor;background:#fff}.btn.btn-secondary,.btn.btn-transparent,.btn.btn-outline{box-shadow:none;color:var(--txtPrimaryColor)}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{opacity:0}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before,.btn.btn-transparent:focus-visible:before,.btn.btn-transparent:hover:before,.btn.btn-outline:focus-visible:before,.btn.btn-outline:hover:before{opacity:.3}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before,.btn.btn-transparent.active:before,.btn.btn-transparent:active:before,.btn.btn-outline.active:before,.btn.btn-outline:active:before{opacity:.45}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{background:var(--baseAlt3Color)}.btn.btn-secondary.btn-info,.btn.btn-transparent.btn-info,.btn.btn-outline.btn-info{color:var(--infoColor)}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{opacity:0}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before,.btn.btn-transparent.btn-info:focus-visible:before,.btn.btn-transparent.btn-info:hover:before,.btn.btn-outline.btn-info:focus-visible:before,.btn.btn-outline.btn-info:hover:before{opacity:.15}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before,.btn.btn-transparent.btn-info.active:before,.btn.btn-transparent.btn-info:active:before,.btn.btn-outline.btn-info.active:before,.btn.btn-outline.btn-info:active:before{opacity:.25}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{background:var(--infoColor)}.btn.btn-secondary.btn-success,.btn.btn-transparent.btn-success,.btn.btn-outline.btn-success{color:var(--successColor)}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{opacity:0}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before,.btn.btn-transparent.btn-success:focus-visible:before,.btn.btn-transparent.btn-success:hover:before,.btn.btn-outline.btn-success:focus-visible:before,.btn.btn-outline.btn-success:hover:before{opacity:.15}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before,.btn.btn-transparent.btn-success.active:before,.btn.btn-transparent.btn-success:active:before,.btn.btn-outline.btn-success.active:before,.btn.btn-outline.btn-success:active:before{opacity:.25}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{background:var(--successColor)}.btn.btn-secondary.btn-danger,.btn.btn-transparent.btn-danger,.btn.btn-outline.btn-danger{color:var(--dangerColor)}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{opacity:0}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before,.btn.btn-transparent.btn-danger:focus-visible:before,.btn.btn-transparent.btn-danger:hover:before,.btn.btn-outline.btn-danger:focus-visible:before,.btn.btn-outline.btn-danger:hover:before{opacity:.15}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before,.btn.btn-transparent.btn-danger.active:before,.btn.btn-transparent.btn-danger:active:before,.btn.btn-outline.btn-danger.active:before,.btn.btn-outline.btn-danger:active:before{opacity:.25}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{background:var(--dangerColor)}.btn.btn-secondary.btn-warning,.btn.btn-transparent.btn-warning,.btn.btn-outline.btn-warning{color:var(--warningColor)}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{opacity:0}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before,.btn.btn-transparent.btn-warning:focus-visible:before,.btn.btn-transparent.btn-warning:hover:before,.btn.btn-outline.btn-warning:focus-visible:before,.btn.btn-outline.btn-warning:hover:before{opacity:.15}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before,.btn.btn-transparent.btn-warning.active:before,.btn.btn-transparent.btn-warning:active:before,.btn.btn-outline.btn-warning.active:before,.btn.btn-outline.btn-warning:active:before{opacity:.25}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{background:var(--warningColor)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{opacity:0}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before,.btn.btn-transparent.btn-hint:focus-visible:before,.btn.btn-transparent.btn-hint:hover:before,.btn.btn-outline.btn-hint:focus-visible:before,.btn.btn-outline.btn-hint:hover:before{opacity:.15}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before,.btn.btn-transparent.btn-hint.active:before,.btn.btn-transparent.btn-hint:active:before,.btn.btn-outline.btn-hint.active:before,.btn.btn-outline.btn-hint:active:before{opacity:.25}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--txtHintColor)}.btn.btn-secondary.btn-hint:focus-visible,.btn.btn-secondary.btn-hint:hover,.btn.btn-secondary.btn-hint:active,.btn.btn-secondary.btn-hint.active,.btn.btn-transparent.btn-hint:focus-visible,.btn.btn-transparent.btn-hint:hover,.btn.btn-transparent.btn-hint:active,.btn.btn-transparent.btn-hint.active,.btn.btn-outline.btn-hint:focus-visible,.btn.btn-outline.btn-hint:hover,.btn.btn-outline.btn-hint:active,.btn.btn-outline.btn-hint.active{color:var(--txtPrimaryColor)}.btn.btn-secondary:before{opacity:.35}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before{opacity:.5}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before{opacity:.7}.btn.btn-secondary.btn-info:before{opacity:.15}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before{opacity:.25}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before{opacity:.3}.btn.btn-secondary.btn-success:before{opacity:.15}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before{opacity:.25}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before{opacity:.3}.btn.btn-secondary.btn-danger:before{opacity:.15}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before{opacity:.25}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before{opacity:.3}.btn.btn-secondary.btn-warning:before{opacity:.15}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before{opacity:.25}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before{opacity:.3}.btn.btn-secondary.btn-hint:before{opacity:.15}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before{opacity:.25}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before{opacity:.3}.btn.btn-disabled,.btn[disabled]{box-shadow:none;cursor:default;background:var(--baseAlt1Color);color:var(--txtDisabledColor)!important}.btn.btn-disabled:before,.btn[disabled]:before{display:none}.btn.btn-disabled.btn-transparent,.btn[disabled].btn-transparent{background:none}.btn.btn-disabled.btn-outline,.btn[disabled].btn-outline{border-color:var(--baseAlt2Color)}.btn.btn-expanded{min-width:150px}.btn.btn-expanded-sm{min-width:90px}.btn.btn-expanded-lg{min-width:170px}.btn.btn-lg{column-gap:10px;font-size:var(--lgFontSize);min-height:var(--lgBtnHeight);min-width:var(--lgBtnHeight);padding-left:30px;padding-right:30px}.btn.btn-lg i{font-size:1.2666em}.btn.btn-lg.btn-expanded{min-width:240px}.btn.btn-lg.btn-expanded-sm{min-width:160px}.btn.btn-lg.btn-expanded-lg{min-width:300px}.btn.btn-sm,.btn.btn-xs{column-gap:5px;font-size:var(--smFontSize);min-height:var(--smBtnHeight);min-width:var(--smBtnHeight);padding-left:12px;padding-right:12px}.btn.btn-sm i,.btn.btn-xs i{font-size:1rem}.btn.btn-sm.btn-expanded,.btn.btn-xs.btn-expanded{min-width:100px}.btn.btn-sm.btn-expanded-sm,.btn.btn-xs.btn-expanded-sm{min-width:80px}.btn.btn-sm.btn-expanded-lg,.btn.btn-xs.btn-expanded-lg{min-width:130px}.btn.btn-xs{padding-left:7px;padding-right:7px;min-width:var(--xsBtnHeight);min-height:var(--xsBtnHeight)}.btn.btn-block{display:flex;width:100%}.btn.btn-pill{border-radius:30px}.btn.btn-circle{border-radius:50%;padding:0;gap:0}.btn.btn-circle i{font-size:1.2857rem;text-align:center;width:19px;height:19px;line-height:19px}.btn.btn-circle i:before{margin:0;display:block}.btn.btn-circle.btn-sm i{font-size:1.1rem}.btn.btn-circle.btn-xs i{font-size:1.05rem}.btn.btn-loading{--loaderSize: 24px;cursor:default;pointer-events:none}.btn.btn-loading:after{content:"";position:absolute;display:inline-block;vertical-align:top;left:50%;top:50%;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);color:inherit;text-align:center;font-weight:400;margin-left:calc(var(--loaderSize) * -.5);margin-top:calc(var(--loaderSize) * -.5);font-family:var(--iconFontFamily);animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.btn.btn-loading>*{opacity:0;transform:scale(.9)}.btn.btn-loading.btn-sm,.btn.btn-loading.btn-xs{--loaderSize: 20px}.btn.btn-loading.btn-lg{--loaderSize: 28px}.btn.btn-prev i,.btn.btn-next i{transition:transform var(--baseAnimationSpeed)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i,.btn.btn-next:hover i,.btn.btn-next:focus-within i{transform:translate(3px)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i{transform:translate(-3px)}.btns-group{display:inline-flex;align-items:center;gap:var(--xsSpacing)}.btns-group.no-gap{gap:0}.btns-group.no-gap>*{border-radius:0;min-width:0;box-shadow:-1px 0 #ffffff1a}.btns-group.no-gap>*:first-child{border-top-left-radius:var(--btnRadius);border-bottom-left-radius:var(--btnRadius);box-shadow:none}.btns-group.no-gap>*:last-child{border-top-right-radius:var(--btnRadius);border-bottom-right-radius:var(--btnRadius)}.tinymce-wrapper,.code-editor,.select .selected-container,input,select,textarea{display:block;width:100%;outline:0;border:0;margin:0;background:none;padding:5px 10px;line-height:20px;min-width:0;min-height:var(--inputHeight);background:var(--baseAlt1Color);color:var(--txtPrimaryColor);font-size:var(--baseFontSize);font-family:var(--baseFontFamily);font-weight:400;border-radius:var(--baseRadius);overflow:auto;overflow:overlay}.tinymce-wrapper::placeholder,.code-editor::placeholder,.select .selected-container::placeholder,input::placeholder,select::placeholder,textarea::placeholder{color:var(--txtDisabledColor)}@media screen and (min-width: 550px){.tinymce-wrapper:focus,.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.tinymce-wrapper:focus-within,.code-editor:focus-within,.select .selected-container:focus-within,input:focus-within,select:focus-within,textarea:focus-within{scrollbar-color:var(--baseAlt3Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}.tinymce-wrapper:focus::-webkit-scrollbar,.code-editor:focus::-webkit-scrollbar,.select .selected-container:focus::-webkit-scrollbar,input:focus::-webkit-scrollbar,select:focus::-webkit-scrollbar,textarea:focus::-webkit-scrollbar,.tinymce-wrapper:focus-within::-webkit-scrollbar,.code-editor:focus-within::-webkit-scrollbar,.select .selected-container:focus-within::-webkit-scrollbar,input:focus-within::-webkit-scrollbar,select:focus-within::-webkit-scrollbar,textarea:focus-within::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-track,.code-editor:focus::-webkit-scrollbar-track,.select .selected-container:focus::-webkit-scrollbar-track,input:focus::-webkit-scrollbar-track,select:focus::-webkit-scrollbar-track,textarea:focus::-webkit-scrollbar-track,.tinymce-wrapper:focus-within::-webkit-scrollbar-track,.code-editor:focus-within::-webkit-scrollbar-track,.select .selected-container:focus-within::-webkit-scrollbar-track,input:focus-within::-webkit-scrollbar-track,select:focus-within::-webkit-scrollbar-track,textarea:focus-within::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-thumb,.code-editor:focus::-webkit-scrollbar-thumb,.select .selected-container:focus::-webkit-scrollbar-thumb,input:focus::-webkit-scrollbar-thumb,select:focus::-webkit-scrollbar-thumb,textarea:focus::-webkit-scrollbar-thumb,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb,.code-editor:focus-within::-webkit-scrollbar-thumb,.select .selected-container:focus-within::-webkit-scrollbar-thumb,input:focus-within::-webkit-scrollbar-thumb,select:focus-within::-webkit-scrollbar-thumb,textarea:focus-within::-webkit-scrollbar-thumb{background-color:var(--baseAlt3Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}.tinymce-wrapper:focus::-webkit-scrollbar-thumb:hover,.code-editor:focus::-webkit-scrollbar-thumb:hover,.select .selected-container:focus::-webkit-scrollbar-thumb:hover,input:focus::-webkit-scrollbar-thumb:hover,select:focus::-webkit-scrollbar-thumb:hover,textarea:focus::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus::-webkit-scrollbar-thumb:active,.code-editor:focus::-webkit-scrollbar-thumb:active,.select .selected-container:focus::-webkit-scrollbar-thumb:active,input:focus::-webkit-scrollbar-thumb:active,select:focus::-webkit-scrollbar-thumb:active,textarea:focus::-webkit-scrollbar-thumb:active,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:hover,.code-editor:focus-within::-webkit-scrollbar-thumb:hover,.select .selected-container:focus-within::-webkit-scrollbar-thumb:hover,input:focus-within::-webkit-scrollbar-thumb:hover,select:focus-within::-webkit-scrollbar-thumb:hover,textarea:focus-within::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:active,.code-editor:focus-within::-webkit-scrollbar-thumb:active,.select .selected-container:focus-within::-webkit-scrollbar-thumb:active,input:focus-within::-webkit-scrollbar-thumb:active,select:focus-within::-webkit-scrollbar-thumb:active,textarea:focus-within::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt4Color)}}[readonly].tinymce-wrapper,[readonly].code-editor,.select [readonly].selected-container,input[readonly],select[readonly],textarea[readonly],.readonly.tinymce-wrapper,.readonly.code-editor,.select .readonly.selected-container,input.readonly,select.readonly,textarea.readonly{cursor:default;color:var(--txtHintColor)}[disabled].tinymce-wrapper,[disabled].code-editor,.select [disabled].selected-container,input[disabled],select[disabled],textarea[disabled],.disabled.tinymce-wrapper,.disabled.code-editor,.select .disabled.selected-container,input.disabled,select.disabled,textarea.disabled{cursor:default;color:var(--txtDisabledColor)}.txt-mono.tinymce-wrapper,.txt-mono.code-editor,.select .txt-mono.selected-container,input.txt-mono,select.txt-mono,textarea.txt-mono{line-height:var(--smLineHeight)}.code.tinymce-wrapper,.code.code-editor,.select .code.selected-container,input.code,select.code,textarea.code{font-size:15px;line-height:1.379rem;font-family:var(--monospaceFontFamily)}input{height:var(--inputHeight)}input:-webkit-autofill{-webkit-text-fill-color:var(--txtPrimaryColor);-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt1Color)}.form-field:focus-within input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt2Color)}input[type=file]{padding:9px}input[type=checkbox],input[type=radio]{width:auto;height:auto;display:inline}input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}textarea{min-height:80px;resize:vertical}select{padding-left:8px}.form-field{--hPadding: 15px;position:relative;display:block;width:100%;margin-bottom:var(--baseSpacing)}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea{z-index:0;padding-left:var(--hPadding);padding-right:var(--hPadding)}.form-field select{padding-left:8px}.form-field label{display:flex;width:100%;column-gap:5px;align-items:center;user-select:none;font-weight:600;font-size:var(--smFontSize);letter-spacing:.1px;color:var(--txtHintColor);line-height:1;padding-top:12px;padding-bottom:3px;padding-left:var(--hPadding);padding-right:var(--hPadding);border:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.form-field label~.tinymce-wrapper,.form-field label~.code-editor,.form-field .select label~.selected-container,.select .form-field label~.selected-container,.form-field label~input,.form-field label~select,.form-field label~textarea{border-top:0;padding-top:2px;padding-bottom:8px;border-top-left-radius:0;border-top-right-radius:0}.form-field label i{font-size:.96rem;margin-bottom:-1px}.form-field label i:before{margin:0}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea,.form-field label{background:var(--baseAlt1Color);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.form-field:focus-within .tinymce-wrapper,.form-field:focus-within .code-editor,.form-field:focus-within .select .selected-container,.select .form-field:focus-within .selected-container,.form-field:focus-within input,.form-field:focus-within select,.form-field:focus-within textarea,.form-field:focus-within label{background:var(--baseAlt2Color)}.form-field:focus-within label{color:var(--txtPrimaryColor)}.form-field .form-field-addon{position:absolute;display:inline-flex;align-items:center;z-index:1;top:0px;right:var(--hPadding);min-height:var(--inputHeight);color:var(--txtHintColor)}.form-field .form-field-addon .btn{margin-right:-5px}.form-field .form-field-addon:not(.prefix)~.tinymce-wrapper,.form-field .form-field-addon:not(.prefix)~.code-editor,.form-field .select .form-field-addon:not(.prefix)~.selected-container,.select .form-field .form-field-addon:not(.prefix)~.selected-container,.form-field .form-field-addon:not(.prefix)~input,.form-field .form-field-addon:not(.prefix)~select,.form-field .form-field-addon:not(.prefix)~textarea{padding-right:45px}.form-field .form-field-addon.prefix{right:auto;left:var(--hPadding)}.form-field .form-field-addon.prefix~.tinymce-wrapper,.form-field .form-field-addon.prefix~.code-editor,.form-field .select .form-field-addon.prefix~.selected-container,.select .form-field .form-field-addon.prefix~.selected-container,.form-field .form-field-addon.prefix~input,.form-field .form-field-addon.prefix~select,.form-field .form-field-addon.prefix~textarea{padding-left:45px}.form-field label~.form-field-addon{min-height:calc(26px + var(--inputHeight))}.form-field .help-block{margin-top:8px;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);word-break:break-word}.form-field .help-block pre{white-space:pre-wrap}.form-field .help-block-error{color:var(--dangerColor)}.form-field.error>label,.form-field.invalid>label{color:var(--dangerColor)}.form-field.invalid label,.form-field.invalid .tinymce-wrapper,.form-field.invalid .code-editor,.form-field.invalid .select .selected-container,.select .form-field.invalid .selected-container,.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{background:var(--dangerAltColor)}.form-field.required:not(.form-field-toggle)>label:after{content:"*";color:var(--dangerColor);margin-top:-2px;margin-left:-2px}.form-field.readonly label,.form-field.readonly .tinymce-wrapper,.form-field.readonly .code-editor,.form-field.readonly .select .selected-container,.select .form-field.readonly .selected-container,.form-field.readonly input,.form-field.readonly select,.form-field.readonly textarea,.form-field.disabled label,.form-field.disabled .tinymce-wrapper,.form-field.disabled .code-editor,.form-field.disabled .select .selected-container,.select .form-field.disabled .selected-container,.form-field.disabled input,.form-field.disabled select,.form-field.disabled textarea{background:var(--baseAlt1Color)}.form-field.readonly>label,.form-field.disabled>label{color:var(--txtHintColor)}.form-field.readonly.required>label:after,.form-field.disabled.required>label:after{opacity:.5}.form-field.disabled label,.form-field.disabled .tinymce-wrapper,.form-field.disabled .code-editor,.form-field.disabled .select .selected-container,.select .form-field.disabled .selected-container,.form-field.disabled input,.form-field.disabled select,.form-field.disabled textarea{box-shadow:inset 0 0 0 var(--btnHeight) #ffffff73}.form-field.disabled>label{color:var(--txtDisabledColor)}.form-field input[type=radio],.form-field input[type=checkbox]{position:absolute;z-index:-1;left:0;width:0;height:0;min-height:0;min-width:0;border:0;background:none;user-select:none;pointer-events:none;box-shadow:none;opacity:0}.form-field input[type=radio]~label,.form-field input[type=checkbox]~label{border:0;margin:0;outline:0;background:none;display:inline-flex;vertical-align:top;align-items:center;width:auto;column-gap:5px;user-select:none;padding:0 0 0 27px;line-height:20px;min-height:20px;font-weight:400;font-size:var(--baseFontSize);text-transform:none;color:var(--txtPrimaryColor)}.form-field input[type=radio]~label:before,.form-field input[type=checkbox]~label:before{content:"";display:inline-block;vertical-align:top;position:absolute;z-index:0;left:0;top:0;width:20px;height:20px;line-height:16px;font-family:var(--iconFontFamily);font-size:1.2rem;text-align:center;color:var(--baseColor);cursor:pointer;background:var(--baseColor);border-radius:var(--baseRadius);border:2px solid var(--baseAlt3Color);transition:transform var(--baseAnimationSpeed),border-color var(--baseAnimationSpeed),color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.form-field input[type=radio]~label:active:before,.form-field input[type=checkbox]~label:active:before{transform:scale(.9)}.form-field input[type=radio]:focus~label:before,.form-field input[type=radio]~label:hover:before,.form-field input[type=checkbox]:focus~label:before,.form-field input[type=checkbox]~label:hover:before{border-color:var(--baseAlt4Color)}.form-field input[type=radio]:checked~label:before,.form-field input[type=checkbox]:checked~label:before{content:"";box-shadow:none;mix-blend-mode:unset;background:var(--successColor);border-color:var(--successColor)}.form-field input[type=radio]:disabled~label,.form-field input[type=checkbox]:disabled~label{pointer-events:none;cursor:not-allowed;color:var(--txtDisabledColor)}.form-field input[type=radio]:disabled~label:before,.form-field input[type=checkbox]:disabled~label:before{opacity:.5}.form-field input[type=radio]~label:before{border-radius:50%;font-size:1rem}.form-field .form-field-block{position:relative;margin:0 0 var(--xsSpacing)}.form-field .form-field-block:last-child{margin-bottom:0}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{position:relative}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{content:"";border:0;box-shadow:none;background:var(--baseAlt3Color);transition:background var(--activeAnimationSpeed)}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{content:"";position:absolute;z-index:1;cursor:pointer;background:var(--baseColor);transition:left var(--activeAnimationSpeed),transform var(--activeAnimationSpeed),background var(--activeAnimationSpeed);box-shadow:0 2px 5px 0 var(--shadowColor)}.form-field.form-field-toggle input[type=radio]~label:active:before,.form-field.form-field-toggle input[type=checkbox]~label:active:before{transform:none}.form-field.form-field-toggle input[type=radio]~label:active:after,.form-field.form-field-toggle input[type=checkbox]~label:active:after{transform:scale(.9)}.form-field.form-field-toggle input[type=radio]:focus-visible~label:before,.form-field.form-field-toggle input[type=checkbox]:focus-visible~label:before{box-shadow:0 0 0 2px var(--baseAlt2Color)}.form-field.form-field-toggle input[type=radio]~label:hover:before,.form-field.form-field-toggle input[type=checkbox]~label:hover:before{background:var(--baseAlt4Color)}.form-field.form-field-toggle input[type=radio]:checked~label:before,.form-field.form-field-toggle input[type=checkbox]:checked~label:before{background:var(--successColor)}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{background:var(--baseColor)}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{min-height:24px;padding-left:47px}.form-field.form-field-toggle input[type=radio]~label:empty,.form-field.form-field-toggle input[type=checkbox]~label:empty{padding-left:40px}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{width:40px;height:24px;border-radius:24px}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{top:4px;left:4px;width:16px;height:16px;border-radius:16px}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{left:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label{min-height:20px;padding-left:39px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:empty,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:empty{padding-left:32px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:before,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:before{width:32px;height:20px;border-radius:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:after{top:4px;left:4px;width:12px;height:12px;border-radius:12px}.form-field.form-field-toggle.form-field-sm input[type=radio]:checked~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]:checked~label:after{left:16px}.form-field-group{display:flex;width:100%;align-items:center}.form-field-group>.form-field{flex-grow:1;border-left:1px solid var(--baseAlt2Color)}.form-field-group>.form-field:first-child{border-left:0}.form-field-group>.form-field:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.form-field-group>.form-field:not(:first-child)>label{border-top-left-radius:0}.form-field-group>.form-field:not(:first-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:first-child)>.code-editor,.select .form-field-group>.form-field:not(:first-child)>.selected-container,.form-field-group>.form-field:not(:first-child)>input,.form-field-group>.form-field:not(:first-child)>select,.form-field-group>.form-field:not(:first-child)>textarea,.form-field-group>.form-field:not(:first-child)>.select .selected-container{border-bottom-left-radius:0}.form-field-group>.form-field:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.form-field-group>.form-field:not(:last-child)>label{border-top-right-radius:0}.form-field-group>.form-field:not(:last-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:last-child)>.code-editor,.select .form-field-group>.form-field:not(:last-child)>.selected-container,.form-field-group>.form-field:not(:last-child)>input,.form-field-group>.form-field:not(:last-child)>select,.form-field-group>.form-field:not(:last-child)>textarea,.form-field-group>.form-field:not(:last-child)>.select .selected-container{border-bottom-right-radius:0}.form-field-group .form-field.col-12{width:100%}.form-field-group .form-field.col-11{width:91.6666666667%}.form-field-group .form-field.col-10{width:83.3333333333%}.form-field-group .form-field.col-9{width:75%}.form-field-group .form-field.col-8{width:66.6666666667%}.form-field-group .form-field.col-7{width:58.3333333333%}.form-field-group .form-field.col-6{width:50%}.form-field-group .form-field.col-5{width:41.6666666667%}.form-field-group .form-field.col-4{width:33.3333333333%}.form-field-group .form-field.col-3{width:25%}.form-field-group .form-field.col-2{width:16.6666666667%}.form-field-group .form-field.col-1{width:8.3333333333%}.select{position:relative;display:block;outline:0}.select .option{user-select:none;column-gap:5px}.select .option .icon{min-width:20px;text-align:center;line-height:inherit}.select .option .icon i{vertical-align:middle;line-height:inherit}.select .txt-placeholder{color:var(--txtHintColor)}label~.select .selected-container{border-top:0}.select .selected-container{position:relative;display:flex;flex-wrap:wrap;width:100%;align-items:center;padding-top:0;padding-bottom:0;padding-right:35px!important;user-select:none}.select .selected-container:after{content:"";position:absolute;right:5px;top:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-top:-10px;display:inline-block;vertical-align:top;font-size:1rem;font-family:var(--iconFontFamily);align-self:flex-end;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed)}.select .selected-container:active,.select .selected-container.active{border-bottom-left-radius:0;border-bottom-right-radius:0}.select .selected-container:active:after,.select .selected-container.active:after{color:var(--txtPrimaryColor);transform:rotate(180deg)}.select .selected-container .option{display:flex;width:100%;align-items:center;max-width:100%;user-select:text}.select .selected-container .clear{margin-left:auto;cursor:pointer;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed)}.select .selected-container .clear i{display:inline-block;vertical-align:middle;line-height:1}.select .selected-container .clear:hover{color:var(--txtPrimaryColor)}.select.multiple .selected-container{display:flex;align-items:center;padding-left:2px;row-gap:3px;column-gap:4px}.select.multiple .selected-container .txt-placeholder{margin-left:5px}.select.multiple .selected-container .option{display:inline-flex;width:auto;padding:3px 5px;line-height:1;border-radius:var(--baseRadius);background:var(--baseColor)}.select:not(.multiple) .selected-container .label{margin-left:-2px}.select:not(.multiple) .selected-container .option .txt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;line-height:normal}.select:not(.disabled) .selected-container:hover{cursor:pointer}.select.readonly,.select.disabled{color:var(--txtHintColor);pointer-events:none}.select.readonly .txt-placeholder,.select.disabled .txt-placeholder,.select.readonly .selected-container,.select.disabled .selected-container{color:inherit}.select.readonly .selected-container .link-hint,.select.disabled .selected-container .link-hint{pointer-events:auto}.select.readonly .selected-container *:not(.link-hint),.select.disabled .selected-container *:not(.link-hint){color:inherit!important}.select.readonly .selected-container:after,.select.readonly .selected-container .clear,.select.disabled .selected-container:after,.select.disabled .selected-container .clear{display:none}.select.readonly .selected-container:hover,.select.disabled .selected-container:hover{cursor:inherit}.select.disabled{color:var(--txtDisabledColor)}.select .txt-missing{color:var(--txtHintColor);padding:5px 12px;margin:0}.select .options-dropdown{max-height:none;border:0;overflow:auto;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px;box-shadow:0 2px 5px 0 var(--shadowColor),inset 0 0 0 2px var(--baseAlt2Color)}.select .options-dropdown .input-group:focus-within{box-shadow:none}.select .options-dropdown .form-field.options-search{margin:0 0 5px;padding:0 0 2px;color:var(--txtHintColor);border-bottom:1px solid var(--baseAlt2Color)}.select .options-dropdown .form-field.options-search .input-group{border-radius:0;padding:0 0 0 10px;margin:0;background:none;column-gap:0;border:0}.select .options-dropdown .form-field.options-search input{border:0;padding-left:9px;padding-right:9px;background:none}.select .options-dropdown .options-list{overflow:auto;max-height:240px;width:auto;margin-left:0;margin-right:-5px;padding-right:5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty){margin:5px -5px -5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty) .btn-block{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}label~.select .selected-container{padding-bottom:4px;border-top-left-radius:0;border-top-right-radius:0}label~.select.multiple .selected-container{padding-top:3px;padding-bottom:3px;padding-left:10px}.select.block-options.multiple .selected-container .option{width:100%;box-shadow:0 2px 5px 0 var(--shadowColor)}.field-type-select .options-dropdown{padding:2px 1px 1px 2px}.field-type-select .options-dropdown .form-field.options-search{margin:0}.field-type-select .options-dropdown .options-list{max-height:490px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0}.field-type-select .options-dropdown .dropdown-item{width:50%;margin:0;padding-left:12px;border-radius:0;border-bottom:1px solid var(--baseAlt2Color);border-right:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.form-field-list{border-radius:var(--baseRadius);transition:box-shadow var(--baseAnimationSpeed)}.form-field-list label{padding-bottom:10px}.form-field-list .list{background:var(--baseAlt1Color);border:0;border-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius);transition:background var(--baseAnimationSpeed)}.form-field-list .list .list-item{border-top:1px solid var(--baseAlt2Color)}.form-field-list .list .list-item:hover,.form-field-list .list .list-item:focus-visible,.form-field-list .list .list-item:active{background:none}.form-field-list .list .list-item.selected{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):hover,.form-field-list .list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):active{background:var(--baseAlt3Color)}.form-field-list:focus-within .list,.form-field-list:focus-within label{background:var(--baseAlt1Color)}.form-field-list.dragover{box-shadow:0 0 0 2px var(--warningColor)}.code-editor{display:flex;flex-direction:column;width:100%}.form-field label~.code-editor{padding-bottom:6px;padding-top:4px}.code-editor .cm-editor{flex-grow:1;border:0!important;outline:none!important}.code-editor .cm-editor .cm-line{padding-left:0;padding-right:0}.code-editor .cm-editor .cm-tooltip-autocomplete{box-shadow:0 2px 5px 0 var(--shadowColor);border-radius:var(--baseRadius);background:var(--baseColor);border:0;z-index:9999;padding:0 3px;font-size:.92rem}.code-editor .cm-editor .cm-tooltip-autocomplete ul{margin:0;border-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--infoColor)}.code-editor .cm-editor .cm-scroller{flex-grow:1;outline:0!important;font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-cursorLayer .cm-cursor{margin-left:0!important}.code-editor .cm-editor .cm-placeholder{color:var(--txtDisabledColor);font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-selectionMatch{background:var(--infoAltColor)}.code-editor .cm-editor.cm-focused .cm-matchingBracket{background-color:#328c821a}.code-editor .ͼf{color:var(--dangerColor)}.tinymce-wrapper{min-height:277px}.tinymce-wrapper .tox-tinymce{border-radius:var(--baseRadius);border:0}.form-field label~.tinymce-wrapper{position:relative;z-index:auto;padding:5px 2px 2px}.form-field label~.tinymce-wrapper:before{content:"";position:absolute;z-index:-1;top:5px;left:2px;right:2px;bottom:2px;background:#fff;border-radius:var(--baseRadius)}body .tox .tox-tbtn{height:30px}body .tox .tox-tbtn svg{transform:scale(.85)}body .tox .tox-tbtn:not(.tox-tbtn--select){width:30px}body .tox .tox-button,body .tox .tox-button--secondary{font-size:var(--smFontSize)}body .tox .tox-toolbar-overlord{box-shadow:0 2px 5px 0 var(--shadowColor)}body .tox .tox-listboxfield .tox-listbox--select,body .tox .tox-textarea,body .tox .tox-textfield,body .tox .tox-toolbar-textfield{padding:3px 5px}body .tox-swatch:not(.tox-swatch--remove):not(.tox-collection__item--enabled) svg{display:none}body.tox-fullscreen .overlay-panel-section{overflow:hidden}.main-menu{--menuItemSize: 45px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:var(--smSpacing);font-size:var(--xlFontSize);color:var(--txtPrimaryColor)}.main-menu i{font-size:24px;line-height:1}.main-menu .menu-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;text-align:center;justify-content:center;user-select:none;color:inherit;min-width:var(--menuItemSize);min-height:var(--menuItemSize);border:2px solid transparent;border-radius:var(--lgRadius);transition:background var(--baseAnimationSpeed),border var(--baseAnimationSpeed)}.main-menu .menu-item:focus-visible,.main-menu .menu-item:hover{background:var(--baseAlt1Color)}.main-menu .menu-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.main-menu .menu-item.active,.main-menu .menu-item.current-route{background:var(--baseColor);border-color:var(--primaryColor)}.app-sidebar{position:relative;z-index:1;display:flex;flex-grow:0;flex-shrink:0;flex-direction:column;align-items:center;width:var(--appSidebarWidth);padding:var(--smSpacing) 0px var(--smSpacing);background:var(--baseColor);border-right:1px solid var(--baseAlt2Color)}.app-sidebar .main-menu{flex-grow:1;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;margin-top:34px;margin-bottom:var(--baseSpacing)}.app-layout{display:flex;width:100%;height:100vh}.app-layout .app-body{flex-grow:1;min-width:0;height:100%;display:flex;align-items:stretch}.app-layout .app-sidebar~.app-body{min-width:650px}.page-sidebar{--sidebarListItemMargin: 10px;z-index:0;display:flex;flex-direction:column;width:var(--pageSidebarWidth);flex-shrink:0;flex-grow:0;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);padding:calc(var(--baseSpacing) - 5px) 0 var(--smSpacing);border-right:1px solid var(--baseAlt2Color)}.page-sidebar>*{padding:0 var(--smSpacing)}.page-sidebar .sidebar-content{overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.page-sidebar .sidebar-content>:first-child{margin-top:0}.page-sidebar .sidebar-content>:last-child{margin-bottom:0}.page-sidebar .sidebar-footer{margin-top:var(--smSpacing)}.page-sidebar .search{display:flex;align-items:center;width:auto;column-gap:5px;margin:0 0 var(--xsSpacing);color:var(--txtHintColor);opacity:.7;transition:opacity var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .search input{border:0;background:var(--baseColor);transition:box-shadow var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.page-sidebar .search .btn-clear{margin-right:-8px}.page-sidebar .search:hover,.page-sidebar .search:focus-within,.page-sidebar .search.active{opacity:1;color:var(--txtPrimaryColor)}.page-sidebar .search:hover input,.page-sidebar .search:focus-within input,.page-sidebar .search.active input{background:var(--baseAlt2Color)}.page-sidebar .sidebar-title{display:flex;align-items:center;gap:5px;width:100%;margin:var(--baseSpacing) 0 var(--xsSpacing);font-weight:600;font-size:1rem;line-height:var(--smLineHeight);color:var(--txtHintColor)}.page-sidebar .sidebar-title .label{font-weight:400}.page-sidebar .sidebar-list-item{cursor:pointer;outline:0;text-decoration:none;position:relative;display:flex;width:100%;align-items:center;column-gap:10px;margin:var(--sidebarListItemMargin) 0;padding:3px 10px;font-size:var(--xlFontSize);min-height:var(--btnHeight);min-width:0;color:var(--txtHintColor);border-radius:var(--baseRadius);user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .sidebar-list-item i{font-size:18px}.page-sidebar .sidebar-list-item .txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-sidebar .sidebar-list-item:focus-visible,.page-sidebar .sidebar-list-item:hover,.page-sidebar .sidebar-list-item:active,.page-sidebar .sidebar-list-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.page-sidebar .sidebar-list-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.page-sidebar .sidebar-content-compact .sidebar-list-item{--sidebarListItemMargin: 5px}@media screen and (max-height: 600px){.page-sidebar{--sidebarListItemMargin: 5px}}@media screen and (max-width: 1100px){.page-sidebar{--pageSidebarWidth: 190px}.page-sidebar>*{padding-left:10px;padding-right:10px}}.page-header{display:flex;align-items:center;width:100%;min-height:var(--btnHeight);gap:var(--xsSpacing);margin:0 0 var(--baseSpacing)}.page-header .btns-group{margin-left:auto;justify-content:end}@media screen and (max-width: 1050px){.page-header{flex-wrap:wrap}.page-header .btns-group{width:100%}.page-header .btns-group .btn{flex-grow:1;flex-basis:0}}.page-header-wrapper{background:var(--baseColor);width:auto;margin-top:calc(-1 * (var(--baseSpacing) - 5px));margin-left:calc(-1 * var(--baseSpacing));margin-right:calc(-1 * var(--baseSpacing));margin-bottom:var(--baseSpacing);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.breadcrumbs{display:flex;align-items:center;gap:30px;color:var(--txtDisabledColor)}.breadcrumbs .breadcrumb-item{position:relative;margin:0;line-height:1;font-weight:400}.breadcrumbs .breadcrumb-item:after{content:"/";position:absolute;right:-20px;top:0;width:10px;text-align:center;pointer-events:none;opacity:.4}.breadcrumbs .breadcrumb-item:last-child{word-break:break-word;color:var(--txtPrimaryColor)}.breadcrumbs .breadcrumb-item:last-child:after{content:none;display:none}.breadcrumbs a{text-decoration:none;color:inherit;transition:color var(--baseAnimationSpeed)}.breadcrumbs a:hover{color:var(--txtPrimaryColor)}.page-content{position:relative;display:block;width:100%;flex-grow:1;padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing)}.page-footer{display:flex;gap:5px;align-items:center;justify-content:right;text-align:right;padding:0px var(--baseSpacing) 15px;color:var(--txtDisabledColor);font-size:var(--xsFontSize);line-height:var(--smLineHeight)}.page-footer i{font-size:1.2em}.page-footer a{color:inherit;text-decoration:none;transition:color var(--baseAnimationSpeed)}.page-footer a:focus-visible,.page-footer a:hover,.page-footer a:active{color:var(--txtPrimaryColor)}.page-wrapper{display:flex;flex-direction:column;flex-grow:1;width:100%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.overlay-active .page-wrapper{overflow-y:hidden}.page-wrapper.full-page{background:var(--baseColor)}.page-wrapper.center-content .page-content{display:flex;align-items:center}@keyframes tabChange{0%{opacity:.7}to{opacity:1}}.tabs-header{display:flex;align-items:stretch;justify-content:flex-start;column-gap:10px;width:100%;min-height:50px;user-select:none;margin:0 0 var(--baseSpacing);border-bottom:2px solid var(--baseAlt2Color)}.tabs-header .tab-item{position:relative;outline:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-width:70px;gap:5px;padding:10px;margin:0;font-size:var(--lgFontSize);line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);color:var(--txtHintColor);text-align:center;text-decoration:none;cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.tabs-header .tab-item:after{content:"";position:absolute;display:block;left:0;bottom:-2px;width:100%;height:2px;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);background:var(--primaryColor);transform:rotateY(90deg);transition:transform .2s}.tabs-header .tab-item .txt,.tabs-header .tab-item i{display:inline-block;vertical-align:top}.tabs-header .tab-item:hover,.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{color:var(--txtPrimaryColor)}.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.tabs-header .tab-item.active{color:var(--txtPrimaryColor)}.tabs-header .tab-item.active:after{transform:rotateY(0)}.tabs-header .tab-item.disabled{pointer-events:none;color:var(--txtDisabledColor)}.tabs-header .tab-item.disabled:after{display:none}.tabs-header.right{justify-content:flex-end}.tabs-header.center{justify-content:center}.tabs-header.stretched .tab-item{flex-grow:1;flex-basis:0}.tabs-header.compact{min-height:30px;margin-bottom:var(--smSpacing)}.tabs-content{position:relative}.tabs-content>.tab-item{width:100%;display:none}.tabs-content>.tab-item.active{display:block;opacity:0;animation:tabChange .2s forwards}.tabs-content>.tab-item>:first-child{margin-top:0}.tabs-content>.tab-item>:last-child{margin-bottom:0}.tabs{position:relative}.accordion{outline:0;position:relative;border-radius:var(--baseRadius);background:var(--baseColor);border:1px solid var(--baseAlt2Color);transition:border-radius var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed),margin var(--baseAnimationSpeed)}.accordion .accordion-header{outline:0;position:relative;display:flex;min-height:52px;align-items:center;row-gap:10px;column-gap:var(--smSpacing);padding:12px 20px 10px;width:100%;user-select:none;color:var(--txtPrimaryColor);border-radius:inherit;transition:border-radius var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.accordion .accordion-header .icon{width:18px;text-align:center}.accordion .accordion-header .icon i{display:inline-block;vertical-align:top;font-size:1.1rem}.accordion .accordion-header.interactive{padding-right:50px;cursor:pointer}.accordion .accordion-header.interactive:after{content:"";position:absolute;right:15px;top:50%;margin-top:-12.5px;width:25px;height:25px;line-height:25px;color:var(--txtHintColor);font-family:var(--iconFontFamily);font-size:1.3em;text-align:center;transition:color var(--baseAnimationSpeed)}.accordion .accordion-header:hover:after,.accordion .accordion-header.focus:after,.accordion .accordion-header:focus-visible:after{color:var(--txtPrimaryColor)}.accordion .accordion-header:active{transition-duration:var(--activeAnimationSpeed)}.accordion .accordion-content{padding:20px}.accordion:hover,.accordion:focus-visible,.accordion.active{z-index:9}.accordion:hover .accordion-header.interactive,.accordion:focus-visible .accordion-header.interactive,.accordion.active .accordion-header.interactive{background:var(--baseAlt1Color)}.accordion.drag-over .accordion-header{background:var(--bodyColor)}.accordion.active{box-shadow:0 2px 5px 0 var(--shadowColor)}.accordion.active .accordion-header{position:relative;top:0;z-index:9;box-shadow:0 0 0 1px var(--baseAlt2Color);border-bottom-left-radius:0;border-bottom-right-radius:0;background:var(--bodyColor)}.accordion.active .accordion-header.interactive{background:var(--bodyColor)}.accordion.active .accordion-header.interactive:after{color:inherit;content:""}.accordion.disabled{z-index:0;border-color:var(--baseAlt1Color)}.accordion.disabled .accordion-header{color:var(--txtDisabledColor)}.accordions .accordion{border-radius:0;margin:-1px 0 0}.accordions .accordion:has(+ .accordion.active){border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}.accordions>.accordion.active,.accordions>.accordion-wrapper>.accordion.active{margin:var(--smSpacing) 0;border-radius:var(--baseRadius)}.accordions>.accordion.active+.accordion,.accordions>.accordion-wrapper>.accordion.active+.accordion{border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:first-child,.accordions>.accordion-wrapper:first-child>.accordion{margin-top:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:last-child,.accordions>.accordion-wrapper:last-child>.accordion{margin-bottom:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}table{--entranceAnimationSpeed: .3s;border-collapse:separate;min-width:100%;transition:opacity var(--baseAnimationSpeed)}table .form-field{margin:0;line-height:1;text-align:left}table .txt-ellipsis{flex-shrink:0}table td,table th{outline:0;vertical-align:middle;position:relative;text-align:left;padding:10px;border-bottom:1px solid var(--baseAlt2Color)}table td:first-child,table th:first-child{padding-left:20px}table td:last-child,table th:last-child{padding-right:20px}table th{color:var(--txtHintColor);font-weight:600;font-size:1rem;user-select:none;height:50px;line-height:var(--smLineHeight)}table th i{font-size:inherit}table td{height:60px;word-break:break-word}table .min-width{width:1%!important;white-space:nowrap}table .nowrap{white-space:nowrap}table .col-sort{cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);padding-right:30px;transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}table .col-sort:after{content:"";position:absolute;right:10px;top:50%;margin-top:-12.5px;line-height:25px;height:25px;font-family:var(--iconFontFamily);font-weight:400;color:var(--txtHintColor);opacity:0;transition:color var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed)}table .col-sort.sort-desc:after{content:""}table .col-sort.sort-asc:after{content:""}table .col-sort.sort-active:after{opacity:1}table .col-sort:hover,table .col-sort:focus-visible{background:var(--baseAlt1Color)}table .col-sort:hover:after,table .col-sort:focus-visible:after{opacity:1}table .col-sort:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}table .col-sort.col-sort-disabled{cursor:default;background:none}table .col-sort.col-sort-disabled:after{display:none}table .col-header-content{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px}table .col-header-content .txt{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table .col-field-created,table .col-field-updated,table .col-type-action{width:1%!important;white-space:nowrap}table .col-type-action{white-space:nowrap;text-align:right;color:var(--txtHintColor)}table .col-type-action i{display:inline-block;vertical-align:top;transition:transform var(--baseAnimationSpeed)}table td.col-type-json{font-family:monospace;font-size:var(--smFontSize);line-height:var(--smLineHeight);max-width:300px}table .col-type-text{max-width:300px}table .col-type-editor{min-width:250px}table .col-type-select{min-width:150px}table .col-type-email{min-width:120px;white-space:nowrap}table .col-type-file{min-width:100px}table td.col-field-id,table td.col-field-username{width:0;white-space:nowrap}table tr{outline:0;background:var(--bodyColor);transition:background var(--baseAnimationSpeed)}table tr.row-handle{cursor:pointer;user-select:none}table tr.row-handle:focus-visible,table tr.row-handle:hover,table tr.row-handle:active{background:var(--baseAlt1Color)}table tr.row-handle:focus-visible .action-col,table tr.row-handle:hover .action-col,table tr.row-handle:active .action-col{color:var(--txtPrimaryColor)}table tr.row-handle:focus-visible .action-col i,table tr.row-handle:hover .action-col i,table tr.row-handle:active .action-col i{transform:translate(3px)}table tr.row-handle:active{transition-duration:var(--activeAnimationSpeed)}table.table-border{border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}table.table-border tr{background:var(--baseColor)}table.table-border td,table.table-border th{height:45px}table.table-border th{background:var(--baseAlt1Color)}table.table-border>:last-child>:last-child th,table.table-border>:last-child>:last-child td{border-bottom:0}table.table-border>tr:first-child>:first-child,table.table-border>:first-child>tr:first-child>:first-child{border-top-left-radius:var(--baseRadius)}table.table-border>tr:first-child>:last-child,table.table-border>:first-child>tr:first-child>:last-child{border-top-right-radius:var(--baseRadius)}table.table-border>tr:last-child>:first-child,table.table-border>:last-child>tr:last-child>:first-child{border-bottom-left-radius:var(--baseRadius)}table.table-border>tr:last-child>:last-child,table.table-border>:last-child>tr:last-child>:last-child{border-bottom-right-radius:var(--baseRadius)}table.table-compact td,table.table-compact th{height:auto}table.table-animate tr{animation:entranceTop var(--entranceAnimationSpeed)}table.table-loading{pointer-events:none;opacity:.7}.table-wrapper{width:auto;padding:0;max-width:calc(100% + 2 * var(--baseSpacing));margin-left:calc(var(--baseSpacing) * -1);margin-right:calc(var(--baseSpacing) * -1)}.table-wrapper .bulk-select-col{min-width:70px}.table-wrapper td,.table-wrapper th{position:relative}.table-wrapper td:first-child,.table-wrapper th:first-child{padding-left:calc(var(--baseSpacing) + 3px)}.table-wrapper td:last-child,.table-wrapper th:last-child{padding-right:calc(var(--baseSpacing) + 3px)}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{position:sticky;z-index:99;transition:box-shadow var(--baseAnimationSpeed)}.table-wrapper .bulk-select-col{left:0px}.table-wrapper .col-type-action{right:0}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{background:inherit}.table-wrapper th.bulk-select-col,.table-wrapper th.col-type-action{background:var(--bodyColor)}.table-wrapper.scrollable .bulk-select-col{box-shadow:3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable .col-type-action{box-shadow:-3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable.scroll-start .bulk-select-col,.table-wrapper.scrollable.scroll-end .col-type-action{box-shadow:none}.searchbar{--searchHeight: 44px;outline:0;display:flex;align-items:center;min-height:var(--searchHeight);width:100%;flex-grow:1;padding:5px 7px;margin:0;white-space:nowrap;color:var(--txtHintColor);background:var(--baseAlt1Color);border-radius:var(--btnHeight);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.searchbar>:first-child{border-top-left-radius:var(--btnHeight);border-bottom-left-radius:var(--btnHeight)}.searchbar>:last-child{border-top-right-radius:var(--btnHeight);border-bottom-right-radius:var(--btnHeight)}.searchbar .btn{border-radius:var(--btnHeight)}.searchbar .code-editor,.searchbar input,.searchbar input:focus{font-size:var(--baseFontSize);font-family:var(--monospaceFontFamily);border:0;background:none;min-height:0;padding-top:0;padding-bottom:0}.searchbar label>i{line-height:inherit}.searchbar .search-options{flex-shrink:0;width:90px}.searchbar .search-options .selected-container{border-radius:inherit;background:none;padding-right:25px!important}.searchbar .search-options:not(:focus-within) .selected-container{color:var(--txtHintColor)}.searchbar:focus-within{color:var(--txtPrimaryColor);background:var(--baseAlt2Color)}.bulkbar{position:sticky;bottom:var(--baseSpacing);z-index:101;gap:10px;display:flex;justify-content:center;align-items:center;width:var(--smWrapperWidth);max-width:100%;margin:var(--smSpacing) auto;padding:10px var(--smSpacing);border-radius:var(--btnHeight);background:var(--baseColor);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.flatpickr-calendar{opacity:0;display:none;text-align:center;visibility:hidden;padding:0;animation:none;direction:ltr;border:0;font-size:1rem;line-height:24px;position:absolute;width:298px;box-sizing:border-box;user-select:none;color:var(--txtPrimaryColor);background:var(--baseColor);border-radius:var(--baseRadius);box-shadow:0 2px 5px 0 var(--shadowColor),0 0 0 1px var(--baseAlt2Color)}.flatpickr-calendar input,.flatpickr-calendar select{box-shadow:none;min-height:0;height:var(--smBtnHeight);padding-top:3px;padding-bottom:3px;background:none;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:0;width:100%}.flatpickr-calendar.static{position:absolute;top:100%;margin-top:2px;margin-bottom:10px;width:100%}.flatpickr-calendar.static .flatpickr-days{width:100%}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color);box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid var(--baseAlt2Color)}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowTop:after{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:after{border-top-color:var(--baseColor)}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative}.flatpickr-months{display:flex;align-items:center;padding:5px 0}.flatpickr-months .flatpickr-month{display:flex;align-items:center;justify-content:center;background:transparent;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor);line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{display:flex;align-items:center;text-decoration:none;cursor:pointer;height:34px;padding:5px 12px;z-index:3;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:var(--txtHintColor)}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto;border-radius:var(--baseRadius)}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:var(--baseAlt1Color)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{line-height:inherit;color:inherit;width:85%;padding:1px 0;line-height:1;display:flex;gap:10px;align-items:center;justify-content:center;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:var(--baseAlt1Color)}.flatpickr-current-month .numInputWrapper{display:inline-flex;align-items:center;justify-content:center;width:62px}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:text;margin:0;display:inline-block;font-size:inherit;font-family:inherit;line-height:inherit;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{color:var(--txtDisabledColor);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;line-height:inherit;outline:none;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:var(--baseAlt1Color)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{display:block;flex:1;margin:0;cursor:default;line-height:1;background:transparent;color:var(--txtHintColor);text-align:center;font-weight:bolder;font-size:var(--smFontSize)}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:100%;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 var(--baseAlt2Color);box-shadow:-1px 0 0 var(--baseAlt2Color)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:var(--baseRadius);box-sizing:border-box;color:var(--txtPrimaryColor);cursor:pointer;font-weight:400;width:calc(14.2857143% - 2px);flex-basis:calc(14.2857143% - 2px);height:39px;margin:1px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-align:center;flex-direction:column}.flatpickr-day.weekend,.flatpickr-day:nth-child(7n+6),.flatpickr-day:nth-child(7n+7){color:var(--dangerColor)}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:var(--baseAlt2Color);border-color:var(--baseAlt2Color)}.flatpickr-day.today{border-color:var(--baseColor)}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:var(--primaryColor);background:var(--primaryColor);color:var(--baseColor)}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:var(--primaryColor);-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:var(--primaryColor)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 var(--primaryColor);box-shadow:-10px 0 0 var(--primaryColor)}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;box-shadow:-5px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:var(--txtDisabledColor);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:var(--txtDisabledColor);background:var(--baseAlt2Color)}.flatpickr-day.week.selected{border-radius:0;box-shadow:-5px 0 0 var(--primaryColor),5px 0 0 var(--primaryColor)}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 var(--baseAlt2Color);box-shadow:1px 0 0 var(--baseAlt2Color)}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:var(--txtHintColor);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:flex;box-sizing:border-box;overflow:hidden;padding:5px}.flatpickr-rContainer{display:inline-block;padding:0;width:100%;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:var(--txtPrimaryColor);font-size:14px;position:relative;box-sizing:border-box;background:var(--baseColor);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:var(--txtPrimaryColor);font-weight:700;width:2%;user-select:none;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:var(--baseAlt1Color)}.flatpickr-input[readonly]{cursor:pointer}@keyframes fpFadeInDown{0%{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translateZ(0)}}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .prevMonthDay{visibility:hidden}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .nextMonthDay,.flatpickr-inline-container .flatpickr-input{display:none}.flatpickr-inline-container .flatpickr-calendar{margin:0;box-shadow:none;border:1px solid var(--baseAlt2Color)}.docs-sidebar{--itemsSpacing: 10px;--itemsHeight: 40px;position:relative;min-width:180px;max-width:300px;height:100%;flex-shrink:0;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;background:var(--bodyColor);padding:var(--smSpacing) var(--xsSpacing);border-right:1px solid var(--baseAlt1Color)}.docs-sidebar .sidebar-content{display:block;width:100%}.docs-sidebar .sidebar-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:flex;width:100%;gap:10px;align-items:center;text-align:right;justify-content:start;padding:5px 15px;margin:0 0 var(--itemsSpacing) 0;font-size:var(--lgFontSize);min-height:var(--itemsHeight);border-radius:var(--baseRadius);user-select:none;color:var(--txtHintColor);transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.docs-sidebar .sidebar-item:last-child{margin-bottom:0}.docs-sidebar .sidebar-item:focus-visible,.docs-sidebar .sidebar-item:hover,.docs-sidebar .sidebar-item:active,.docs-sidebar .sidebar-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.docs-sidebar .sidebar-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.docs-sidebar.compact .sidebar-item{--itemsSpacing: 7px}.docs-content{width:100%;display:block;padding:calc(var(--baseSpacing) - 3px) var(--baseSpacing);overflow:auto}.docs-content-wrapper{display:flex;width:100%;height:100%}.docs-panel{width:960px;height:100%}.docs-panel .overlay-panel-section.panel-header{padding:0;border:0;box-shadow:none}.docs-panel .overlay-panel-section.panel-content{padding:0!important}.docs-panel .overlay-panel-section.panel-footer{display:none}@media screen and (max-width: 1000px){.docs-panel .overlay-panel-section.panel-footer{display:flex}}.schema-field-header{position:relative;display:flex;width:100%;min-height:42px;gap:5px;padding:0 5px;align-items:center;justify-content:stretch;background:var(--baseAlt1Color);border-radius:var(--baseRadius);transition:border-radius var(--baseAnimationSpeed)}.schema-field-header .form-field{margin:0}.schema-field-header .form-field .form-field-addon.prefix{left:10px}.schema-field-header .form-field .form-field-addon.prefix~input,.schema-field-header .form-field .form-field-addon.prefix~select,.schema-field-header .form-field .form-field-addon.prefix~textarea,.schema-field-header .form-field .select .form-field-addon.prefix~.selected-container,.select .schema-field-header .form-field .form-field-addon.prefix~.selected-container,.schema-field-header .form-field .form-field-addon.prefix~.code-editor,.schema-field-header .form-field .form-field-addon.prefix~.tinymce-wrapper{padding-left:37px}.schema-field-header .options-trigger{padding:2px;margin:0 3px}.schema-field-header .options-trigger i{transition:transform var(--baseAnimationSpeed)}.schema-field-header .separator{flex-shrink:0;width:1px;height:42px;background:rgba(0,0,0,.05)}.schema-field-header .drag-handle-wrapper{position:absolute;top:0;left:auto;right:100%;height:100%;display:flex;align-items:center}.schema-field-header .drag-handle{padding:0 5px;transform:translate(5px);opacity:0;visibility:hidden}.schema-field-header .form-field-single-multiple-select{width:100px;flex-shrink:0}.schema-field-header .form-field-single-multiple-select .dropdown{min-width:0}.schema-field-header .markers{position:absolute;z-index:1;left:4px;top:4px;display:inline-flex;align-items:center;gap:5px}.schema-field-header .markers .marker{display:block;width:4px;height:4px;border-radius:4px;background:var(--baseAlt4Color)}.schema-field-options{background:#fff;padding:var(--xsSpacing);border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}.schema-field{position:relative;margin:0 0 var(--xsSpacing);border-radius:var(--baseRadius);background:var(--baseAlt1Color);transition:border var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed);border:2px solid var(--baseAlt1Color)}.schema-field:not(.deleted):hover .drag-handle{transform:translate(0);opacity:1;visibility:visible}.schema-field.drag-over{opacity:.5}.schema-field.expanded{box-shadow:0 2px 5px 0 var(--shadowColor);border-color:var(--baseAlt2Color)}.schema-field.expanded .schema-field-header{border-bottom-left-radius:0;border-bottom-right-radius:0}.schema-field.expanded .schema-field-header .options-trigger i{transform:rotate(-60deg)}.schema-field.expanded .schema-field-options{border-top:2px solid var(--baseAlt2Color)}.schema-field.deleted .schema-field-header{background:var(--bodyColor)}.schema-field.deleted .markers,.schema-field.deleted .separator{opacity:.5}.schema-field.deleted input,.schema-field.deleted select,.schema-field.deleted textarea,.schema-field.deleted .select .selected-container,.select .schema-field.deleted .selected-container,.schema-field.deleted .code-editor,.schema-field.deleted .tinymce-wrapper{background:none;box-shadow:none}.panel-wrapper.svelte-lxxzfu{animation:slideIn .2s}@keyframes svelte-1bvelc2-refresh{to{transform:rotate(180deg)}}.btn.refreshing.svelte-1bvelc2 i.svelte-1bvelc2{animation:svelte-1bvelc2-refresh .15s ease-out}.datetime.svelte-zdiknu{width:100%;display:block;line-height:var(--smLineHeight)}.time.svelte-zdiknu{font-size:var(--smFontSize);color:var(--txtHintColor)}.horizontal-scroller.svelte-wc2j9h{width:auto;overflow-x:auto}.horizontal-scroller-wrapper.svelte-wc2j9h{position:relative}.horizontal-scroller-wrapper .columns-dropdown{top:40px;z-index:100;max-height:340px}.chart-wrapper.svelte-vh4sl8.svelte-vh4sl8{position:relative;display:block;width:100%}.chart-wrapper.loading.svelte-vh4sl8 .chart-canvas.svelte-vh4sl8{pointer-events:none;opacity:.5}.chart-loader.svelte-vh4sl8.svelte-vh4sl8{position:absolute;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%)}.prism-light code[class*=language-],.prism-light pre[class*=language-]{color:#111b27;background:0 0;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.prism-light code[class*=language-] ::-moz-selection,.prism-light code[class*=language-]::-moz-selection,.prism-light pre[class*=language-] ::-moz-selection,.prism-light pre[class*=language-]::-moz-selection{background:#8da1b9}.prism-light code[class*=language-] ::selection,.prism-light code[class*=language-]::selection,.prism-light pre[class*=language-] ::selection,.prism-light pre[class*=language-]::selection{background:#8da1b9}.prism-light pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.prism-light :not(pre)>code[class*=language-],.prism-light pre[class*=language-]{background:#e3eaf2}.prism-light :not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal}.prism-light .token.cdata,.prism-light .token.comment,.prism-light .token.doctype,.prism-light .token.prolog{color:#3c526d}.prism-light .token.punctuation{color:#111b27}.prism-light .token.delimiter.important,.prism-light .token.selector .parent,.prism-light .token.tag,.prism-light .token.tag .token.punctuation{color:#006d6d}.prism-light .token.attr-name,.prism-light .token.boolean,.prism-light .token.boolean.important,.prism-light .token.constant,.prism-light .token.number,.prism-light .token.selector .token.attribute{color:#755f00}.prism-light .token.class-name,.prism-light .token.key,.prism-light .token.parameter,.prism-light .token.property,.prism-light .token.property-access,.prism-light .token.variable{color:#005a8e}.prism-light .token.attr-value,.prism-light .token.color,.prism-light .token.inserted,.prism-light .token.selector .token.value,.prism-light .token.string,.prism-light .token.string .token.url-link{color:#116b00}.prism-light .token.builtin,.prism-light .token.keyword-array,.prism-light .token.package,.prism-light .token.regex{color:#af00af}.prism-light .token.function,.prism-light .token.selector .token.class,.prism-light .token.selector .token.id{color:#7c00aa}.prism-light .token.atrule .token.rule,.prism-light .token.combinator,.prism-light .token.keyword,.prism-light .token.operator,.prism-light .token.pseudo-class,.prism-light .token.pseudo-element,.prism-light .token.selector,.prism-light .token.unit{color:#a04900}.prism-light .token.deleted,.prism-light .token.important{color:#c22f2e}.prism-light .token.keyword-this,.prism-light .token.this{color:#005a8e}.prism-light .token.bold,.prism-light .token.important,.prism-light .token.keyword-this,.prism-light .token.this{font-weight:700}.prism-light .token.delimiter.important{font-weight:inherit}.prism-light .token.italic{font-style:italic}.prism-light .token.entity{cursor:help}.prism-light .language-markdown .token.title,.prism-light .language-markdown .token.title .token.punctuation{color:#005a8e;font-weight:700}.prism-light .language-markdown .token.blockquote.punctuation{color:#af00af}.prism-light .language-markdown .token.code{color:#006d6d}.prism-light .language-markdown .token.hr.punctuation{color:#005a8e}.prism-light .language-markdown .token.url>.token.content{color:#116b00}.prism-light .language-markdown .token.url-link{color:#755f00}.prism-light .language-markdown .token.list.punctuation{color:#af00af}.prism-light .language-markdown .token.table-header,.prism-light .language-json .token.operator{color:#111b27}.prism-light .language-scss .token.variable{color:#006d6d}.prism-light .token.token.cr:before,.prism-light .token.token.lf:before,.prism-light .token.token.space:before,.prism-light .token.token.tab:not(:empty):before{color:#3c526d}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button{color:#e3eaf2;background:#005a8e}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover{color:#e3eaf2;background:rgba(0,90,142,.8549019608);text-decoration:none}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover{color:#e3eaf2;background:#3c526d}.prism-light .line-highlight.line-highlight{background:rgba(141,161,185,.1843137255);background:linear-gradient(to right,rgba(141,161,185,.1843137255) 70%,rgba(141,161,185,.1450980392))}.prism-light .line-highlight.line-highlight:before,.prism-light .line-highlight.line-highlight[data-end]:after{background-color:#3c526d;color:#e3eaf2;box-shadow:0 1px #8da1b9}.prism-light pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#3c526d1f}.prism-light .line-numbers.line-numbers .line-numbers-rows{border-right:1px solid rgba(141,161,185,.4784313725);background:rgba(208,218,231,.4784313725)}.prism-light .line-numbers .line-numbers-rows>span:before{color:#3c526dda}.prism-light .rainbow-braces .token.token.punctuation.brace-level-1,.prism-light .rainbow-braces .token.token.punctuation.brace-level-5,.prism-light .rainbow-braces .token.token.punctuation.brace-level-9{color:#755f00}.prism-light .rainbow-braces .token.token.punctuation.brace-level-10,.prism-light .rainbow-braces .token.token.punctuation.brace-level-2,.prism-light .rainbow-braces .token.token.punctuation.brace-level-6{color:#af00af}.prism-light .rainbow-braces .token.token.punctuation.brace-level-11,.prism-light .rainbow-braces .token.token.punctuation.brace-level-3,.prism-light .rainbow-braces .token.token.punctuation.brace-level-7{color:#005a8e}.prism-light .rainbow-braces .token.token.punctuation.brace-level-12,.prism-light .rainbow-braces .token.token.punctuation.brace-level-4,.prism-light .rainbow-braces .token.token.punctuation.brace-level-8{color:#7c00aa}.prism-light pre.diff-highlight>code .token.token.deleted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#c22f2e1f}.prism-light pre.diff-highlight>code .token.token.inserted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#116b001f}.prism-light .command-line .command-line-prompt{border-right:1px solid rgba(141,161,185,.4784313725)}.prism-light .command-line .command-line-prompt>span:before{color:#3c526dda}code.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;padding:10px 15px;white-space:pre-wrap;word-break:break-word}.code-wrapper.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;max-height:100%;overflow:auto;overflow:overlay}.prism-light.svelte-10s5tkd code.svelte-10s5tkd{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.indexes-list.svelte-167lbwu{display:flex;flex-wrap:wrap;width:100%;gap:10px}.label.svelte-167lbwu{overflow:hidden;min-width:50px}.field-types-btn.active.svelte-1gz9b6p{border-bottom-left-radius:0;border-bottom-right-radius:0}.field-types-dropdown{display:flex;flex-wrap:wrap;width:100%;max-width:none;padding:10px;margin-top:2px;border:0;box-shadow:0 0 0 2px var(--primaryColor);border-top-left-radius:0;border-top-right-radius:0}.field-types-dropdown .dropdown-item.svelte-1gz9b6p{width:25%}.form-field-file-max-select{width:100px;flex-shrink:0}.lock-toggle.svelte-1akuazq.svelte-1akuazq{position:absolute;right:0px;top:0px;min-width:135px;padding:10px;border-top-left-radius:0;border-bottom-right-radius:0;background:rgba(53,71,104,.09)}.rule-field .code-editor .cm-placeholder{font-family:var(--baseFontFamily)}.input-wrapper.svelte-1akuazq.svelte-1akuazq{position:relative}.unlock-overlay.svelte-1akuazq.svelte-1akuazq{--hoverAnimationSpeed:.2s;position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;display:flex;padding:20px;gap:10px;align-items:center;justify-content:end;text-align:center;border-radius:var(--baseRadius);background:rgba(255,255,255,.2);outline:0;cursor:pointer;text-decoration:none;color:var(--successColor);border:2px solid var(--baseAlt1Color);transition:border-color var(--baseAnimationSpeed)}.unlock-overlay.svelte-1akuazq i.svelte-1akuazq{font-size:inherit}.unlock-overlay.svelte-1akuazq .icon.svelte-1akuazq{color:var(--successColor);font-size:1.15rem;line-height:1;font-weight:400;transition:transform var(--hoverAnimationSpeed)}.unlock-overlay.svelte-1akuazq .txt.svelte-1akuazq{opacity:0;font-size:var(--xsFontSize);font-weight:600;line-height:var(--smLineHeight);transform:translate(5px);transition:transform var(--hoverAnimationSpeed),opacity var(--hoverAnimationSpeed)}.unlock-overlay.svelte-1akuazq.svelte-1akuazq:hover,.unlock-overlay.svelte-1akuazq.svelte-1akuazq:focus-visible,.unlock-overlay.svelte-1akuazq.svelte-1akuazq:active{border-color:var(--baseAlt3Color)}.unlock-overlay.svelte-1akuazq:hover .icon.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:focus-visible .icon.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:active .icon.svelte-1akuazq{transform:scale(1.1)}.unlock-overlay.svelte-1akuazq:hover .txt.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:focus-visible .txt.svelte-1akuazq,.unlock-overlay.svelte-1akuazq:active .txt.svelte-1akuazq{opacity:1;transform:scale(1)}.unlock-overlay.svelte-1akuazq.svelte-1akuazq:active{transition-duration:var(--activeAnimationSpeed);border-color:var(--baseAlt3Color)}.changes-list.svelte-xqpcsf.svelte-xqpcsf{word-break:break-word;line-height:var(--smLineHeight)}.changes-list.svelte-xqpcsf li.svelte-xqpcsf{margin-top:10px;margin-bottom:10px}.upsert-panel-title.svelte-12y0yzb{display:inline-flex;align-items:center;min-height:var(--smBtnHeight)}.tabs-content.svelte-12y0yzb:focus-within{z-index:9}.email-visibility-addon.svelte-1751a4d~input.svelte-1751a4d{padding-right:100px}textarea.svelte-1x1pbts{resize:none;padding-top:4px!important;padding-bottom:5px!important;min-height:var(--inputHeight);height:var(--inputHeight)}.clear-btn.svelte-11df51y{margin-top:20px}.draggable.svelte-28orm4{user-select:none;outline:0;min-width:0}.record-info.svelte-fhw3qk.svelte-fhw3qk{display:inline-flex;vertical-align:top;align-items:center;max-width:100%;min-width:0;gap:5px;line-height:normal}.record-info.svelte-fhw3qk>.svelte-fhw3qk{line-height:inherit}.record-info.svelte-fhw3qk .thumb{box-shadow:none}.picker-list.svelte-1u8jhky{max-height:380px}.selected-list.svelte-1u8jhky{display:flex;flex-wrap:wrap;align-items:center;gap:10px;max-height:220px;overflow:auto}.relations-list.svelte-1ynw0pc{max-height:300px;overflow:auto;overflow:overlay}.panel-title.svelte-qc5ngu{line-height:var(--smBtnHeight)}.fallback-block.svelte-jdf51v{max-height:100px;overflow:auto}.col-field.svelte-1nt58f7{max-width:1px}.export-preview.svelte-jm5c4z.svelte-jm5c4z{position:relative;height:500px}.export-preview.svelte-jm5c4z .copy-schema.svelte-jm5c4z{position:absolute;right:15px;top:15px}.collections-diff-table.svelte-lmkr38.svelte-lmkr38{color:var(--txtHintColor);border:2px solid var(--primaryColor)}.collections-diff-table.svelte-lmkr38 tr.svelte-lmkr38{background:none}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38,.collections-diff-table.svelte-lmkr38 td.svelte-lmkr38{height:auto;padding:2px 15px;border-bottom:1px solid rgba(0,0,0,.07)}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38{height:35px;padding:4px 15px;color:var(--txtPrimaryColor)}.collections-diff-table.svelte-lmkr38 thead tr.svelte-lmkr38{background:var(--primaryColor)}.collections-diff-table.svelte-lmkr38 thead tr th.svelte-lmkr38{color:var(--baseColor);background:none}.collections-diff-table.svelte-lmkr38 .label.svelte-lmkr38{font-weight:400}.collections-diff-table.svelte-lmkr38 .changed-none-col.svelte-lmkr38{color:var(--txtDisabledColor);background:var(--baseAlt1Color)}.collections-diff-table.svelte-lmkr38 .changed-old-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--dangerAltColor)}.collections-diff-table.svelte-lmkr38 .changed-new-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--successAltColor)}.collections-diff-table.svelte-lmkr38 .field-key-col.svelte-lmkr38{padding-left:30px}.list-label.svelte-1jx20fl{min-width:65px}.list-content.svelte-1ulbkf5.svelte-1ulbkf5{overflow:auto;max-height:342px}.list-content.svelte-1ulbkf5 .list-item.svelte-1ulbkf5{min-height:49px}.backup-name.svelte-1ulbkf5.svelte-1ulbkf5{max-width:300px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis} diff --git a/ui/dist/assets/index-38223559.js b/ui/dist/assets/index-38223559.js deleted file mode 100644 index 53359ad89..000000000 --- a/ui/dist/assets/index-38223559.js +++ /dev/null @@ -1,211 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function X(){}const $l=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function Mb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function H_(n){return n()}function mu(){return Object.create(null)}function Ae(n){n.forEach(H_)}function Ht(n){return typeof n=="function"}function _e(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function mn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function Ob(n){return Object.keys(n).length===0}function _a(n,...e){if(n==null)return X;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Db(n){let e;return _a(n,t=>e=t)(),e}function Ze(n,e,t){n.$$.on_destroy.push(_a(e,t))}function wt(n,e,t,i){if(n){const s=z_(n,e,t,i);return n[0](s)}}function z_(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function St(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),ga=B_?n=>requestAnimationFrame(n):X;const ws=new Set;function U_(n){ws.forEach(e=>{e.c(n)||(ws.delete(e),e.f())}),ws.size!==0&&ga(U_)}function Ro(n){let e;return ws.size===0&&ga(U_),{promise:new Promise(t=>{ws.add(e={c:n,f:t})}),abort(){ws.delete(e)}}}function v(n,e){n.appendChild(e)}function W_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Eb(n){const e=y("style");return Ab(W_(n),e),e.sheet}function Ab(n,e){return v(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function pt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function at(n){return function(e){return e.preventDefault(),n.call(this,e)}}function An(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ai(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:h(n,i,e[i])}function Ib(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function gt(n){return n===""?null:+n}function Pb(n){return Array.from(n.childNodes)}function le(n,e){e=""+e,n.data!==e&&(n.data=e)}function fe(n,e){n.value=e??""}function qr(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function Y_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Nt(n,e){return new n(e)}const ho=new Map;let _o=0;function Lb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Nb(n,e){const t={stylesheet:Eb(e),rules:{}};return ho.set(n,t),t}function dl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ -`;for(let b=0;b<=1;b+=a){const k=e+(t-e)*l(b);u+=b*100+`%{${o(k,1-k)}} -`}const f=u+`100% {${o(t,1-t)}} -}`,d=`__svelte_${Lb(f)}_${r}`,p=W_(n),{stylesheet:m,rules:g}=ho.get(p)||Nb(p,n);g[d]||(g[d]=!0,m.insertRule(`@keyframes ${d} ${f}`,m.cssRules.length));const _=n.style.animation||"";return n.style.animation=`${_?`${_}, `:""}${d} ${i}ms linear ${s}ms 1 both`,_o+=1,d}function pl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),_o-=s,_o||Fb())}function Fb(){ga(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function Rb(n,e,t,i){if(!e)return X;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return X;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Fo()+l,end:u=a+o,tick:f=X,css:d}=t(n,{from:e,to:s},i);let p=!0,m=!1,g;function _(){d&&(g=dl(n,0,1,o,l,r,d)),l||(m=!0)}function b(){d&&pl(n,g),p=!1}return Ro(k=>{if(!m&&k>=a&&(m=!0),m&&k>=u&&(f(1,0),b()),!p)return!1;if(m){const $=k-a,T=0+1*r($/o);f(T,1-T)}return!0}),_(),f(0,1),b}function qb(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,K_(n,s)}}function K_(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ml;function bi(n){ml=n}function Cl(){if(!ml)throw new Error("Function called outside component initialization");return ml}function en(n){Cl().$$.on_mount.push(n)}function jb(n){Cl().$$.after_update.push(n)}function ba(n){Cl().$$.on_destroy.push(n)}function Tt(){const n=Cl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Y_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function me(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],ie=[];let Ss=[];const jr=[],J_=Promise.resolve();let Vr=!1;function Z_(){Vr||(Vr=!0,J_.then(va))}function an(){return Z_(),J_}function tt(n){Ss.push(n)}function ke(n){jr.push(n)}const nr=new Set;let hs=0;function va(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let zs;function ya(){return zs||(zs=Promise.resolve(),zs.then(()=>{zs=null})),zs}function ns(n,e,t){n.dispatchEvent(Y_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let li;function re(){li={r:0,c:[],p:li}}function ae(){li.r||Ae(li.c),li=li.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),li.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ka={duration:0};function G_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:p=0,duration:m=300,easing:g=$l,tick:_=X,css:b}=s||ka;b&&(o=dl(n,0,1,m,p,g,b,a++)),_(0,1);const k=Fo()+p,$=k+m;r&&r.abort(),l=!0,tt(()=>ns(n,!0,"start")),r=Ro(T=>{if(l){if(T>=$)return _(1,0),ns(n,!0,"end"),u(),l=!1;if(T>=k){const C=g((T-k)/m);_(C,1-C)}}return l})}let d=!1;return{start(){d||(d=!0,pl(n),Ht(s)?(s=s(i),ya().then(f)):f())},invalidate(){d=!1},end(){l&&(u(),l=!1)}}}function wa(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=li;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:d=$l,tick:p=X,css:m}=s||ka;m&&(o=dl(n,1,0,f,u,d,m));const g=Fo()+u,_=g+f;tt(()=>ns(n,!1,"start")),Ro(b=>{if(l){if(b>=_)return p(0,1),ns(n,!1,"end"),--r.r||Ae(r.c),!1;if(b>=g){const k=d((b-g)/f);p(1-k,k)}}return l})}return Ht(s)?ya().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function ze(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function d(m,g){const _=m.b-o;return g*=Math.abs(_),{a:o,b:m.b,d:_,duration:g,start:m.start,end:m.start+g,group:m.group}}function p(m){const{delay:g=0,duration:_=300,easing:b=$l,tick:k=X,css:$}=l||ka,T={start:Fo()+g,b:m};m||(T.group=li,li.r+=1),r||a?a=T:($&&(f(),u=dl(n,o,m,_,g,b,$)),m&&k(0,1),r=d(T,_),tt(()=>ns(n,m,"start")),Ro(C=>{if(a&&C>a.start&&(r=d(a,_),a=null,ns(n,r.b,"start"),$&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)k(o=r.b,1-o),ns(n,r.b,"end"),a||(r.b?f():--r.group.r||Ae(r.group.c)),r=null;else if(C>=r.start){const D=C-r.start;o=r.a+r.d*b(D/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(m){Ht(l)?ya().then(()=>{l=l(s),p(m)}):p(m)},end(){f(),r=a=null}}}function _u(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((d,p)=>{p!==l&&d&&(re(),P(d,1,1,()=>{e.blocks[p]===d&&(e.blocks[p]=null)}),ae())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&va()}if(Mb(n)){const s=Cl();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function zb(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function us(n,e){n.d(1),e.delete(n.key)}function Jt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Bb(n,e){n.f(),Jt(n,e)}function yt(n,e,t,i,s,l,o,r,a,u,f,d){let p=n.length,m=l.length,g=p;const _={};for(;g--;)_[n[g].key]=g;const b=[],k=new Map,$=new Map,T=[];for(g=m;g--;){const O=d(s,l,g),I=t(O);let L=o.get(I);L?i&&T.push(()=>L.p(O,e)):(L=u(I,O),L.c()),k.set(I,b[g]=L),I in _&&$.set(I,Math.abs(g-_[I]))}const C=new Set,D=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,m--}for(;p&&m;){const O=b[m-1],I=n[p-1],L=O.key,F=I.key;O===I?(f=O.first,p--,m--):k.has(F)?!o.has(L)||C.has(L)?M(O):D.has(F)?p--:$.get(L)>$.get(F)?(D.add(L),M(O)):(C.add(F),p--):(a(I,o),p--)}for(;p--;){const O=n[p];k.has(O.key)||a(O,o)}for(;m;)M(b[m-1]);return Ae(T),b}function Mt(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Gt(n){return typeof n=="object"&&n!==null?n:{}}function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function U(n){n&&n.c()}function z(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||tt(()=>{const o=n.$$.on_mount.map(H_).filter(Ht);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ae(o),n.$$.on_mount=[]}),l.forEach(tt)}function B(n,e){const t=n.$$;t.fragment!==null&&(Hb(t.after_update),Ae(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ub(n,e){n.$$.dirty[0]===-1&&(ks.push(n),Z_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const g=m.length?m[0]:p;return u.ctx&&s(u.ctx[d],u.ctx[d]=g)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](g),f&&Ub(n,d)),p}):[],u.update(),f=!0,Ae(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const d=Pb(e.target);u.fragment&&u.fragment.l(d),d.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),z(n,e.target,e.anchor,e.customElement),va()}bi(a)}class ye{$destroy(){B(this,1),this.$destroy=X}$on(e,t){if(!Ht(t))return X;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!Ob(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function jt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function Q_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return X_(t,o=>{let r=!1;const a=[];let u=0,f=X;const d=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Ht(m)?m:X},p=s.map((m,g)=>_a(m,_=>{a[g]=_,u&=~(1<{u|=1<{B(f,1)}),ae()}l?(e=Nt(l,o()),e.$on("routeEvent",r[7]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Yb(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{B(f,1)}),ae()}l?(e=Nt(l,o()),e.$on("routeEvent",r[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Kb(n){let e,t,i,s;const l=[Yb,Wb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ce()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function gu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const qo=X_(null,function(e){e(gu());const t=()=>{e(gu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Q_(qo,n=>n.location);const Sa=Q_(qo,n=>n.querystring),bu=In(void 0);async function ji(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await an();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function dn(n,e){if(e=yu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return vu(n,e),{update(t){t=yu(t),vu(n,t)}}}function Jb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function vu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||Zb(i.currentTarget.getAttribute("href"))})}function yu(n){return n&&typeof n=="string"?{href:n}:n||{}}function Zb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function Gb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(D,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!D||typeof D=="string"&&(D.length<1||D.charAt(0)!="/"&&D.charAt(0)!="*")||typeof D=="object"&&!(D instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:I}=x_(D);this.path=D,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=I}match(D){if(s){if(typeof s=="string")if(D.startsWith(s))D=D.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=D.match(s);if(L&&L[0])D=D.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(D);if(M===null)return null;if(this._keys===!1)return M;const O={};let I=0;for(;I{r.push(new o(D,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const d=Tt();async function p(C,D){await an(),d(C,D)}let m=null,g=null;l&&(g=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",g),jb(()=>{Jb(m)}));let _=null,b=null;const k=qo.subscribe(async C=>{_=C;let D=0;for(;D{bu.set(u)});return}t(0,a=null),b=null,bu.set(void 0)});ba(()=>{k(),g&&window.removeEventListener("popstate",g)});function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,$,T]}class Xb extends ye{constructor(e){super(),ve(this,e,Gb,Kb,_e,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let eg;function tg(n){const e=n.pattern.test(eg);ku(n,n.className,e),ku(n,n.inactiveClassName,!e)}function ku(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}qo.subscribe(n=>{eg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(tg)});function Zn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?x_(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),tg(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const Qb="modulepreload",xb=function(n,e){return new URL(n,e).href},wu={},rt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=xb(l,i),l in wu)return;wu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===l&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":Qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Hr=function(n,e){return Hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Hr(n,e)};function nn(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Hr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var zr=function(){return zr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||d[0]!==6&&d[0]!==2)){o=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}ng=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Tl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=Su(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},$a=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return Xt(l,void 0,void 0,function(){return Qt(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var d=f,p=d.items,m=d.totalItems;return o=o.concat(p),p.length&&m>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new vi(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,d){return Xt(a,void 0,void 0,function(){var p,m,g,_,b=this;return Qt(this,function(k){switch(k.label){case 0:return k.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function($){return Xt(b,void 0,void 0,function(){var T,C,D;return Qt(this,function(M){switch(M.label){case 0:T=this.client.realtime.clientId,M.label=1;case 1:if(M.trys.push([1,3,,4]),p(),!$.state||T!==$.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,$.code,o.codeVerifier,r,s.createData,s.body,s.query)];case 2:return C=M.sent(),f(C),[3,4];case 3:return D=M.sent(),d(new vi(D)),[3,4];case 4:return[2]}})})})];case 1:return p=k.sent(),(m=new URL(o.authUrl+r)).searchParams.set("state",this.client.realtime.clientId),!((_=s.scopes)===null||_===void 0)&&_.length&&m.searchParams.set("scope",s.scopes.join(" ")),[4,s.urlCallback?s.urlCallback(m.toString()):this._defaultUrlCallback(m.toString())];case 2:return k.sent(),[3,4];case 3:return g=k.sent(),d(new vi(g)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o"u"||!(window!=null&&window.open))throw new vi(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}($a),wn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},kn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Xt(t,void 0,void 0,function(){var l;return Qt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new vi({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new vi(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t,i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function is(n){return typeof n=="number"}function Vo(n){return typeof n=="number"&&n%1===0}function g0(n){return typeof n=="string"}function b0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Mg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function v0(n){return Array.isArray(n)?n:[n]}function Cu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function y0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ds(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yi(n,e,t){return Vo(n)&&n>=e&&n<=t}function k0(n,e){return n-e*Math.floor(n/e)}function Ut(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Di(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Wi(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function Ca(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Ta(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Ml(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Ml(n)?366:365}function go(n,e){const t=k0(e-1,12)+1,i=n+(e-t)/12;return t===2?Ml(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ma(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function bo(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Wr(n){return n>99?n:n>60?1900+n:2e3+n}function Og(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Ho(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Dg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new zn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Ds(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Dg(s)}return t}function ll(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Ut(t,2)}:${Ut(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ut(t,2)}${Ut(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function zo(n){return y0(n,["hour","minute","second","millisecond"])}const Eg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,w0=["January","February","March","April","May","June","July","August","September","October","November","December"],Ag=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],S0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ig(n){switch(n){case"narrow":return[...S0];case"short":return[...Ag];case"long":return[...w0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Pg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$0=["M","T","W","T","F","S","S"];function Ng(n){switch(n){case"narrow":return[...$0];case"short":return[...Lg];case"long":return[...Pg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Fg=["AM","PM"],C0=["Before Christ","Anno Domini"],T0=["BC","AD"],M0=["B","A"];function Rg(n){switch(n){case"narrow":return[...M0];case"short":return[...T0];case"long":return[...C0];default:return null}}function O0(n){return Fg[n.hour<12?0:1]}function D0(n,e){return Ng(e)[n.weekday-1]}function E0(n,e){return Ig(e)[n.month-1]}function A0(n,e){return Rg(e)[n.year<0?0:1]}function I0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${s[n][0]}`;case-1:return d?"yesterday":`last ${s[n][0]}`;case 0:return d?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function Tu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const P0={D:Ur,DD:ag,DDD:ug,DDDD:fg,t:cg,tt:dg,ttt:pg,tttt:mg,T:hg,TT:_g,TTT:gg,TTTT:bg,f:vg,ff:kg,fff:Sg,ffff:Cg,F:yg,FF:wg,FFF:$g,FFFF:Tg};class yn{static create(e,t={}){return new yn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return P0[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Ut(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,g)=>this.loc.extract(e,m,g),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?O0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,g)=>i?E0(e,m):l(g?{month:m}:{month:m,day:"numeric"},"month"),u=(m,g)=>i?D0(e,m):l(g?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const g=yn.macroTokenToFormatOpts(m);return g?this.formatWithSystemDefault(e,g):m},d=m=>i?A0(e,m):l({era:m},"era"),p=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return Tu(yn.parseFormat(t),p)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=yn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return Tu(l,s(r))}}class Gn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ol{get type(){throw new Mi}get name(){throw new Mi}get ianaName(){return this.name}get isUniversal(){throw new Mi}offsetName(e,t){throw new Mi}formatOffset(e,t){throw new Mi}offset(e){throw new Mi}equals(e){throw new Mi}get isValid(){throw new Mi}}let ir=null;class Oa extends Ol{static get instance(){return ir===null&&(ir=new Oa),ir}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Og(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function L0(n){return ao[n]||(ao[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),ao[n]}const N0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function F0(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function R0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?g:1e3+g,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let sr=null;class pn extends Ol{static get utcInstance(){return sr===null&&(sr=new pn(0)),sr}static instance(e){return e===0?pn.utcInstance:new pn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new pn(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class q0 extends Ol{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ei(n,e){if(it(n)||n===null)return e;if(n instanceof Ol)return n;if(g0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?pn.utcInstance:pn.parseSpecifier(t)||wi.create(n)}else return is(n)?pn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new q0(n)}let Mu=()=>Date.now(),Ou="system",Du=null,Eu=null,Au=null,Iu;class Kt{static get now(){return Mu}static set now(e){Mu=e}static set defaultZone(e){Ou=e}static get defaultZone(){return Ei(Ou,Oa.instance)}static get defaultLocale(){return Du}static set defaultLocale(e){Du=e}static get defaultNumberingSystem(){return Eu}static set defaultNumberingSystem(e){Eu=e}static get defaultOutputCalendar(){return Au}static set defaultOutputCalendar(e){Au=e}static get throwOnInvalid(){return Iu}static set throwOnInvalid(e){Iu=e}static resetCaches(){Dt.resetCache(),wi.resetCache()}}let Pu={};function j0(n,e={}){const t=JSON.stringify([n,e]);let i=Pu[t];return i||(i=new Intl.ListFormat(n,e),Pu[t]=i),i}let Yr={};function Kr(n,e={}){const t=JSON.stringify([n,e]);let i=Yr[t];return i||(i=new Intl.DateTimeFormat(n,e),Yr[t]=i),i}let Jr={};function V0(n,e={}){const t=JSON.stringify([n,e]);let i=Jr[t];return i||(i=new Intl.NumberFormat(n,e),Jr[t]=i),i}let Zr={};function H0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Zr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Zr[s]=l),l}let tl=null;function z0(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function B0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Kr(n).resolvedOptions()}catch{t=Kr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function U0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function W0(n){const e=[];for(let t=1;t<=12;t++){const i=Ue.utc(2016,t,1);e.push(n(i))}return e}function Y0(n){const e=[];for(let t=1;t<=7;t++){const i=Ue.utc(2016,11,13+t);e.push(n(i))}return e}function Vl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function K0(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class J0{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=V0(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Ta(e,3);return Ut(t,this.padTo)}}}class Z0{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&wi.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ue.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Kr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class G0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Mg()&&(this.rtf=H0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):I0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Dt{static fromOpts(e){return Dt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Kt.defaultLocale,o=l||(s?"en-US":z0()),r=t||Kt.defaultNumberingSystem,a=i||Kt.defaultOutputCalendar;return new Dt(o,r,a,l)}static resetCache(){tl=null,Yr={},Jr={},Zr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Dt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=B0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=U0(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=K0(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Dt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Vl(this,e,i,Ig,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=W0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Vl(this,e,i,Ng,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=Y0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Vl(this,void 0,e,()=>Fg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ue.utc(2016,11,13,9),Ue.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Vl(this,e,t,Rg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ue.utc(-40,1,1),Ue.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new J0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Z0(e,this.intl,t)}relFormatter(e={}){return new G0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return j0(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function qs(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function qg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(g||m&&f)?-m:m;return[{years:p(Wi(t)),months:p(Wi(i)),weeks:p(Wi(s)),days:p(Wi(l)),hours:p(Wi(o)),minutes:p(Wi(r)),seconds:p(Wi(a),a==="-0"),milliseconds:p(Ca(u),d)}]}const uv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Aa(n,e,t,i,s,l,o){const r={year:e.length===2?Wr(Di(e)):Di(e),month:Ag.indexOf(t)+1,day:Di(i),hour:Di(s),minute:Di(l)};return o&&(r.second=Di(o)),n&&(r.weekday=n.length>3?Pg.indexOf(n)+1:Lg.indexOf(n)+1),r}const fv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function cv(n){const[,e,t,i,s,l,o,r,a,u,f,d]=n,p=Aa(e,s,i,t,l,o,r);let m;return a?m=uv[a]:u?m=0:m=Ho(f,d),[p,new pn(m)]}function dv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,mv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,hv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Lu(n){const[,e,t,i,s,l,o,r]=n;return[Aa(e,s,i,t,l,o,r),pn.utcInstance]}function _v(n){const[,e,t,i,s,l,o,r]=n;return[Aa(e,r,t,i,s,l,o),pn.utcInstance]}const gv=Fs(Q0,Ea),bv=Fs(x0,Ea),vv=Fs(ev,Ea),yv=Fs(Vg),zg=Rs(lv,js,Dl,El),kv=Rs(tv,js,Dl,El),wv=Rs(nv,js,Dl,El),Sv=Rs(js,Dl,El);function $v(n){return qs(n,[gv,zg],[bv,kv],[vv,wv],[yv,Sv])}function Cv(n){return qs(dv(n),[fv,cv])}function Tv(n){return qs(n,[pv,Lu],[mv,Lu],[hv,_v])}function Mv(n){return qs(n,[rv,av])}const Ov=Rs(js);function Dv(n){return qs(n,[ov,Ov])}const Ev=Fs(iv,sv),Av=Fs(Hg),Iv=Rs(js,Dl,El);function Pv(n){return qs(n,[Ev,zg],[Av,Iv])}const Lv="Invalid Duration",Bg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Nv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Bg},Rn=146097/400,gs=146097/4800,Fv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...Bg},Xi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Rv=Xi.slice(0).reverse();function Yi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new ot(i)}function qv(n){return n<0?Math.floor(n):Math.ceil(n)}function Ug(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?qv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function jv(n,e){Rv.reduce((t,i)=>it(e[i])?t:(t&&Ug(n,e,t,e,i),i),null)}class ot{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Dt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Fv:Nv,this.isLuxonDuration=!0}static fromMillis(e,t){return ot.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new zn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ot({values:vo(e,ot.normalizeUnit),loc:Dt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(is(e))return ot.fromMillis(e);if(ot.isDuration(e))return e;if(typeof e=="object")return ot.fromObject(e);throw new zn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Mv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Dv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the Duration is invalid");const i=e instanceof Gn?e:new Gn(e,t);if(Kt.throwOnInvalid)throw new m0(i);return new ot({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new rg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?yn.create(this.loc,i).formatDurationFromString(this,e):Lv}toHuman(e={}){const t=Xi.map(i=>{const s=this.values[i];return it(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Ta(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e),i={};for(const s of Xi)(Ds(t.values,s)||Ds(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Yi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Dg(e(this.values[i],i));return Yi(this,{values:t},!0)}get(e){return this[ot.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,ot.normalizeUnit)};return Yi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Yi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jv(this.matrix,e),Yi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ot.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Xi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;is(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Xi.indexOf(u)>Xi.indexOf(o)&&Ug(this.matrix,s,u,t,o)}else is(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Yi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Yi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Xi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function Vv(n,e){return!n||!n.isValid?It.invalid("missing or invalid start"):!e||!e.isValid?It.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?It.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(It.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ot.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(It.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:It.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return It.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(It.fromDateTimes(t,a.time)),t=null);return It.merge(s)}difference(...e){return It.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)}mapEndpoints(e){return It.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Kt.defaultZone){const t=Ue.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return wi.isValidZone(e)}static normalizeZone(e){return Ei(e,Kt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Dt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Dt.create(t,null,"gregory").eras(e)}static features(){return{relative:Mg()}}}function Nu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ot.fromMillis(i).as("days"))}function Hv(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Nu(r,a);return(u-u%7)/7}],["days",Nu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function zv(n,e,t,i){let[s,l,o,r]=Hv(n,e,t);const a=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?ot.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ia={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Fu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Bv=Ia.hanidec.replace(/[\[|\]]/g,"").split("");function Uv(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Kn({numberingSystem:n},e=""){return new RegExp(`${Ia[n||"latn"]}${e}`)}const Wv="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(Uv(t))}}const Yv=String.fromCharCode(160),Wg=`[ ${Yv}]`,Yg=new RegExp(Wg,"g");function Kv(n){return n.replace(/\./g,"\\.?").replace(Yg,Wg)}function Ru(n){return n.replace(/\./g,"").replace(Yg," ").toLowerCase()}function Jn(n,e){return n===null?null:{regex:RegExp(n.map(Kv).join("|")),deser:([t])=>n.findIndex(i=>Ru(t)===Ru(i))+e}}function qu(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function lr(n){return{regex:n,deser:([e])=>e}}function Jv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zv(n,e){const t=Kn(e),i=Kn(e,"{2}"),s=Kn(e,"{3}"),l=Kn(e,"{4}"),o=Kn(e,"{6}"),r=Kn(e,"{1,2}"),a=Kn(e,"{1,3}"),u=Kn(e,"{1,6}"),f=Kn(e,"{1,9}"),d=Kn(e,"{2,4}"),p=Kn(e,"{4,6}"),m=b=>({regex:RegExp(Jv(b.val)),deser:([k])=>k,literal:!0}),_=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Jn(e.eras("short",!1),0);case"GG":return Jn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(d,Wr);case"yyyy":return ut(l);case"yyyyy":return ut(p);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Jn(e.months("short",!0,!1),1);case"MMMM":return Jn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Jn(e.months("short",!1,!1),1);case"LLLL":return Jn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return lr(f);case"uu":return lr(r);case"uuu":return ut(t);case"a":return Jn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(d,Wr);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Jn(e.weekdays("short",!1,!1),1);case"EEEE":return Jn(e.weekdays("long",!1,!1),1);case"ccc":return Jn(e.weekdays("short",!0,!1),1);case"cccc":return Jn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return qu(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return qu(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return lr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:Wv};return _.token=n,_}const Gv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function Xv(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Gv[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Qv(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function xv(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ds(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function ey(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return it(n.z)||(t=wi.create(n.z)),it(n.Z)||(t||(t=new pn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),it(n.u)||(n.S=Ca(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let or=null;function ty(){return or||(or=Ue.fromMillis(1555555555555)),or}function ny(n,e){if(n.literal)return n;const t=yn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=yn.create(e,t).formatDateTimeParts(ty()).map(o=>Xv(o,e,t));return l.includes(void 0)?n:l}function iy(n,e){return Array.prototype.concat(...n.map(t=>ny(t,e)))}function Kg(n,e,t){const i=iy(yn.parseFormat(t),n),s=i.map(o=>Zv(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Qv(s),a=RegExp(o,"i"),[u,f]=xv(e,a,r),[d,p,m]=f?ey(f):[null,null,void 0];if(Ds(f,"a")&&Ds(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:d,zone:p,specificOffset:m}}}function sy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Kg(n,e,t);return[i,s,l,o]}const Jg=[0,31,59,90,120,151,181,212,243,273,304,334],Zg=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Gn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Gg(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Xg(n,e,t){return t+(Ml(n)?Zg:Jg)[e-1]}function Qg(n,e){const t=Ml(n)?Zg:Jg,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...zo(n)}}function ju(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Gg(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=Qg(r,o);return{year:r,month:a,day:u,...zo(n)}}function rr(n){const{year:e,month:t,day:i}=n,s=Xg(e,t,i);return{year:e,ordinal:s,...zo(n)}}function Vu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Qg(e,t);return{year:e,month:i,day:s,...zo(n)}}function ly(n){const e=Vo(n.weekYear),t=yi(n.weekNumber,1,bo(n.weekYear)),i=yi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function oy(n){const e=Vo(n.year),t=yi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function xg(n){const e=Vo(n.year),t=yi(n.month,1,12),i=yi(n.day,1,go(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function e1(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=yi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=yi(t,0,59),r=yi(i,0,59),a=yi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const ar="Invalid DateTime",Hu=864e13;function zl(n){return new Gn("unsupported zone",`the zone "${n.name}" is not supported`)}function ur(n){return n.weekData===null&&(n.weekData=Gr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ue({...t,...e,old:t})}function t1(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function zu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function uo(n,e,t){return t1(Ma(n),e,t)}function Bu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,go(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=ot.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Ma(l);let[a,u]=t1(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ue.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ue.invalid(new Gn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?yn.create(Dt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function fr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Ut(n.c.year,t?6:4),e?(i+="-",i+=Ut(n.c.month),i+="-",i+=Ut(n.c.day)):(i+=Ut(n.c.month),i+=Ut(n.c.day)),i}function Uu(n,e,t,i,s,l){let o=Ut(n.c.hour);return e?(o+=":",o+=Ut(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Ut(n.c.minute),(n.c.second!==0||!t)&&(o+=Ut(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Ut(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Ut(Math.trunc(-n.o/60)),o+=":",o+=Ut(Math.trunc(-n.o%60))):(o+="+",o+=Ut(Math.trunc(n.o/60)),o+=":",o+=Ut(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const n1={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ry={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ay={ordinal:1,hour:0,minute:0,second:0,millisecond:0},i1=["year","month","day","hour","minute","second","millisecond"],uy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fy=["year","ordinal","hour","minute","second","millisecond"];function Wu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new rg(n);return e}function Yu(n,e){const t=Ei(e.zone,Kt.defaultZone),i=Dt.fromObject(e),s=Kt.now();let l,o;if(it(n.year))l=s;else{for(const u of i1)it(n[u])&&(n[u]=n1[u]);const r=xg(n)||e1(n);if(r)return Ue.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new Ue({ts:l,zone:t,loc:i,o})}function Ku(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=Ta(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Ju(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ue{constructor(e){const t=e.zone||Kt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Gn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=it(e.ts)?Kt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=zu(this.ts,r),i=Number.isNaN(s.year)?new Gn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Dt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ue({})}static local(){const[e,t]=Ju(arguments),[i,s,l,o,r,a,u]=t;return Yu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Ju(arguments),[i,s,l,o,r,a,u]=t;return e.zone=pn.utcInstance,Yu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=b0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ue.invalid("invalid input");const s=Ei(t.zone,Kt.defaultZone);return s.isValid?new Ue({ts:i,zone:s,loc:Dt.fromObject(t)}):Ue.invalid(zl(s))}static fromMillis(e,t={}){if(is(e))return e<-Hu||e>Hu?Ue.invalid("Timestamp out of range"):new Ue({ts:e,zone:Ei(t.zone,Kt.defaultZone),loc:Dt.fromObject(t)});throw new zn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(is(e))return new Ue({ts:e*1e3,zone:Ei(t.zone,Kt.defaultZone),loc:Dt.fromObject(t)});throw new zn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ei(t.zone,Kt.defaultZone);if(!i.isValid)return Ue.invalid(zl(i));const s=Kt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Wu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,d=o.weekYear||o.weekNumber,p=Dt.fromObject(t);if((f||r)&&d)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=d||o.weekday&&!f;let g,_,b=zu(s,l);m?(g=uy,_=ry,b=Gr(b)):r?(g=fy,_=ay,b=rr(b)):(g=i1,_=n1);let k=!1;for(const I of g){const L=o[I];it(L)?k?o[I]=_[I]:o[I]=b[I]:k=!0}const $=m?ly(o):r?oy(o):xg(o),T=$||e1(o);if(T)return Ue.invalid(T);const C=m?ju(o):r?Vu(o):o,[D,M]=uo(C,l,i),O=new Ue({ts:D,zone:i,o:M,loc:p});return o.weekday&&f&&e.weekday!==O.weekday?Ue.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=$v(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Cv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Tv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new zn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=sy(o,e,t);return f?Ue.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ue.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Pv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the DateTime is invalid");const i=e instanceof Gn?e:new Gn(e,t);if(Kt.throwOnInvalid)throw new d0(i);return new Ue({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ur(this).weekYear:NaN}get weekNumber(){return this.isValid?ur(this).weekNumber:NaN}get weekday(){return this.isValid?ur(this).weekday:NaN}get ordinal(){return this.isValid?rr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Ml(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=yn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(pn.instance(e),t)}toLocal(){return this.setZone(Kt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ei(e,Kt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=uo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Ue.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Wu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=ju({...Gr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=Vu({...rr(this.c),...t});const[f,d]=uo(u,this.o,this.zone);return Us(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return Us(this,Bu(this,t))}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e).negate();return Us(this,Bu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ot.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?yn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ar}toLocaleString(e=Ur,t={}){return this.isValid?yn.create(this.loc.clone(t),e).formatDateTime(this):ar}toLocaleParts(e={}){return this.isValid?yn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=fr(this,o);return r+="T",r+=Uu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?fr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Uu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?fr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ar}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return ot.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=v0(t).map(ot.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=zv(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ue.now(),e,t)}until(e){return this.isValid?It.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ue.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ue.isDateTime))throw new zn("max requires all arguments be DateTimes");return Cu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Kg(o,e,t)}static fromStringExplain(e,t,i={}){return Ue.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Ur}static get DATE_MED(){return ag}static get DATE_MED_WITH_WEEKDAY(){return h0}static get DATE_FULL(){return ug}static get DATE_HUGE(){return fg}static get TIME_SIMPLE(){return cg}static get TIME_WITH_SECONDS(){return dg}static get TIME_WITH_SHORT_OFFSET(){return pg}static get TIME_WITH_LONG_OFFSET(){return mg}static get TIME_24_SIMPLE(){return hg}static get TIME_24_WITH_SECONDS(){return _g}static get TIME_24_WITH_SHORT_OFFSET(){return gg}static get TIME_24_WITH_LONG_OFFSET(){return bg}static get DATETIME_SHORT(){return vg}static get DATETIME_SHORT_WITH_SECONDS(){return yg}static get DATETIME_MED(){return kg}static get DATETIME_MED_WITH_SECONDS(){return wg}static get DATETIME_MED_WITH_WEEKDAY(){return _0}static get DATETIME_FULL(){return Sg}static get DATETIME_FULL_WITH_SECONDS(){return $g}static get DATETIME_HUGE(){return Cg}static get DATETIME_HUGE_WITH_SECONDS(){return Tg}}function Ys(n){if(Ue.isDateTime(n))return n;if(n&&n.valueOf&&is(n.valueOf()))return Ue.fromJSDate(n);if(n&&typeof n=="object")return Ue.fromObject(n);throw new zn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],dy=[".mp4",".avi",".mov",".3gp",".wmv"],py=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],my=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class H{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||H.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return H.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!H.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!H.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){H.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=H.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!H.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!H.isObject(l)&&!Array.isArray(l)||!H.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!H.isObject(s)&&!Array.isArray(s)||!H.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):H.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||H.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||H.isObject(e)&&Object.keys(e).length>0)&&H.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return Ue.fromFormat(e,i,{zone:"UTC"})}return Ue.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!dy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!py.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!my.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return H.hasImageExtension(e)?"image":H.hasDocumentExtension(e)?"document":H.hasVideoExtension(e)?"video":H.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,d=r.height;return a.width=t,a.height=i,u.drawImage(r,f>d?(f-d)/2:0,0,f>d?d:f,f>d?d:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(H.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)H.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):H.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,d,p;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let g=null;m.type==="number"?g=123:m.type==="date"?g="2022-01-01 10:00:00.123Z":m.type==="bool"?g=!0:m.type==="email"?g="test@example.com":m.type==="url"?g="https://example.com":m.type==="json"?g="JSON":m.type==="file"?(g="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(g=[g])):m.type==="select"?(g=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((d=m.options)==null?void 0:d.maxSelect)!==1&&(g=[g])):m.type==="relation"?(g="RELATION_RECORD_ID",((p=m.options)==null?void 0:p.maxSelect)!==1&&(g=[g])):g="test",i[m.name]=g}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!H.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!H.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=H.isObject(u)&&H.findByKey(s,"id",u.id);if(!f)return!1;for(let d in f)if(JSON.stringify(u[d])!=JSON.stringify(f[d]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type==="auth"?t.push(l):l.type==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],d=u.create(a,o,f);u.add(d),e(d.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(H.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?H.plainText(r):r,s.push(H.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!H.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of H.extractColumnsFromQuery(e.options.query))H.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)H.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,d,p;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s+\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!H.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const _=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((_==null?void 0:_.length)!=4)continue;const b=(d=(f=_[1])==null?void 0:f.trim())==null?void 0:d.replace(l,"");b&&t.columns.push({name:b,collate:_[2]||"",sort:((p=_[3])==null?void 0:p.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+H.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` - `),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+c.sort.toUpperCase()),l}).join(`, - `),i.length>1&&(t+=` -`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=H.parseIndex(e);return i.tableName=t,H.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=H.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?H.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Bo=In([]);function s1(n,e=4e3){return Uo(n,"info",e)}function xt(n,e=3e3){return Uo(n,"success",e)}function hl(n,e=4500){return Uo(n,"error",e)}function hy(n,e=4500){return Uo(n,"warning",e)}function Uo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{l1(i)},t)};Bo.update(s=>(La(s,i.message),H.pushOrReplaceByKey(s,i,"message"),s))}function l1(n){Bo.update(e=>(La(e,n),e))}function Pa(){Bo.update(n=>{for(let e of n)La(n,e);return[]})}function La(n,e){let t;typeof e=="string"?t=H.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),H.removeByKey(n,"message",t.message))}const $i=In({});function un(n){$i.set(n||{})}function Fi(n){$i.update(e=>(H.deleteByPath(e,n),e))}const Na=In({});function Xr(n){Na.set(n||{})}const ci=In([]),ui=In({}),yo=In(!1),o1=In({});function _y(n){ci.update(e=>{const t=H.findByKey(e,"id",n);return t?ui.set(t):e.length&&ui.set(e[0]),e})}function gy(n){ui.update(e=>H.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ci.update(e=>(H.pushOrReplaceByKey(e,n,"id"),Fa(),H.sortCollections(e)))}function by(n){ci.update(e=>(H.removeByKey(e,"id",n.id),ui.update(t=>t.id===n.id?e[0]:t),Fa(),e))}async function vy(n=null){yo.set(!0);try{let e=await pe.collections.getFullList(200,{sort:"+name"});e=H.sortCollections(e),ci.set(e);const t=n&&H.findByKey(e,"id",n);t?ui.set(t):e.length&&ui.set(e[0]),Fa()}catch(e){pe.errorResponseHandler(e)}yo.set(!1)}function Fa(){o1.update(n=>(ci.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const cr="pb_admin_file_token";jo.prototype.logout=function(n=!0){this.authStore.clear(),n&&ji("/login")};jo.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&hl(l)}if(H.isEmpty(s.data)||un(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ji("/")};jo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=Db(o1);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(cr)||"";return(!t||sg(t,15))&&(t&&localStorage.removeItem(cr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(cr,t),this._adminFileTokenRequest=null),t};class yy extends lg{save(e,t){super.save(e,t),t instanceof rs&&Xr(t)}clear(){super.clear(),Xr(null)}}const pe=new jo("../",new yy("pb_admin_auth"));pe.authStore.model instanceof rs&&Xr(pe.authStore.model);function ky(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=n[3].default,g=wt(m,n,n[2],null);return{c(){e=y("div"),t=y("main"),g&&g.c(),i=E(),s=y("footer"),l=y("a"),l.innerHTML=` - Docs`,o=E(),r=y("span"),r.textContent="|",a=E(),u=y("a"),f=y("span"),f.textContent="PocketBase v0.15.3",h(t,"class","page-content"),h(l,"href","https://pocketbase.io/docs/"),h(l,"target","_blank"),h(l,"rel","noopener noreferrer"),h(r,"class","delimiter"),h(f,"class","txt"),h(u,"href","https://github.com/pocketbase/pocketbase/releases"),h(u,"target","_blank"),h(u,"rel","noopener noreferrer"),h(u,"title","Releases"),h(s,"class","page-footer"),h(e,"class",d="page-wrapper "+n[1]),x(e,"center-content",n[0])},m(_,b){S(_,e,b),v(e,t),g&&g.m(t,null),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(u,f),p=!0},p(_,[b]){g&&g.p&&(!p||b&4)&&$t(g,m,_,_[2],p?St(m,_[2],b,null):Ct(_[2]),null),(!p||b&2&&d!==(d="page-wrapper "+_[1]))&&h(e,"class",d),(!p||b&3)&&x(e,"center-content",_[0])},i(_){p||(A(g,_),p=!0)},o(_){P(g,_),p=!1},d(_){_&&w(e),g&&g.d(_)}}}function wy(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class Pn extends ye{constructor(e){super(),ve(this,e,wy,ky,_e,{center:0,class:1})}}function Zu(n){let e,t,i;return{c(){e=y("div"),e.innerHTML=``,t=E(),i=y("div"),h(e,"class","block txt-center m-b-lg"),h(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function Sy(n){let e,t,i,s=!n[0]&&Zu();const l=n[1].default,o=wt(l,n,n[2],null);return{c(){e=y("div"),s&&s.c(),t=E(),o&&o.c(),h(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),v(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Zu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&$t(o,l,r,r[2],i?St(l,r[2],a,null):Ct(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function $y(n){let e,t;return e=new Pn({props:{class:"full-page",center:!0,$$slots:{default:[Sy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Cy(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class r1 extends ye{constructor(e){super(),ve(this,e,Cy,$y,_e,{nobranding:0})}}function Wo(n){const e=n-1;return e*e*e+1}function Qr(n,{delay:e=0,duration:t=400,easing:i=$l}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function fi(n,{delay:e=0,duration:t=400,easing:i=Wo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o),[d,p]=hu(s),[m,g]=hu(l);return{delay:e,duration:t,easing:i,css:(_,b)=>` - transform: ${u} translate(${(1-_)*d}${p}, ${(1-_)*m}${g}); - opacity: ${a-f*b}`}}function bt(n,{delay:e=0,duration:t=400,easing:i=Wo,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),d=parseFloat(l[`padding${f[0]}`]),p=parseFloat(l[`padding${f[1]}`]),m=parseFloat(l[`margin${f[0]}`]),g=parseFloat(l[`margin${f[1]}`]),_=parseFloat(l[`border${f[0]}Width`]),b=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${r}: ${k*a}px;padding-${u[0]}: ${k*d}px;padding-${u[1]}: ${k*p}px;margin-${u[0]}: ${k*m}px;margin-${u[1]}: ${k*g}px;border-${u[0]}-width: ${k*_}px;border-${u[1]}-width: ${k*b}px;`}}function Yt(n,{delay:e=0,duration:t=400,easing:i=Wo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(d,p)=>` - transform: ${a} scale(${1-u*p}); - opacity: ${r-f*p} - `}}let xr,Ki;const ea="app-tooltip";function Gu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Li(){return Ki=Ki||document.querySelector("."+ea),Ki||(Ki=document.createElement("div"),Ki.classList.add(ea),document.body.appendChild(Ki)),Ki}function a1(n,e){let t=Li();if(!t.classList.contains("active")||!(e!=null&&e.text)){ta();return}t.textContent=e.text,t.className=ea+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function ta(){clearTimeout(xr),Li().classList.remove("active"),Li().activeNode=void 0}function Ty(n,e){Li().activeNode=n,clearTimeout(xr),xr=setTimeout(()=>{Li().classList.add("active"),a1(n,e)},isNaN(e.delay)?0:e.delay)}function Ye(n,e){let t=Gu(e);function i(){Ty(n,t)}function s(){ta()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&H.isFocusable(n))&&n.addEventListener("click",s),Li(),{update(l){var o,r;t=Gu(l),(r=(o=Li())==null?void 0:o.activeNode)!=null&&r.contains(n)&&a1(n,t)},destroy(){var l,o;(o=(l=Li())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ta(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Xu(n,e,t){const i=n.slice();return i[12]=e[t],i}const My=n=>({}),Qu=n=>({uniqueId:n[4]});function Oy(n){let e,t,i=n[3],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=ze(t,Yt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=ze(t,Yt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&w(e),a&&s&&s.end(),o=!1,r()}}}function xu(n){let e,t,i=ko(n[12])+"",s,l,o,r;return{c(){e=y("div"),t=y("pre"),s=Y(i),l=E(),h(e,"class","help-block help-block-error")},m(a,u){S(a,e,u),v(e,t),v(t,s),v(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=ko(a[12])+"")&&le(s,i)},i(a){r||(a&&tt(()=>{r&&(o||(o=ze(e,bt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=ze(e,bt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&w(e),a&&o&&o.end()}}}function Ey(n){let e,t,i,s,l,o,r;const a=n[9].default,u=wt(a,n,n[8],Qu),f=[Dy,Oy],d=[];function p(m,g){return m[0]&&m[3].length?0:1}return i=p(n),s=d[i]=f[i](n),{c(){e=y("div"),u&&u.c(),t=E(),s.c(),h(e,"class",n[1]),x(e,"error",n[3].length)},m(m,g){S(m,e,g),u&&u.m(e,null),v(e,t),d[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(m,[g]){u&&u.p&&(!l||g&256)&&$t(u,a,m,m[8],l?St(a,m[8],g,My):Ct(m[8]),Qu);let _=i;i=p(m),i===_?d[i].p(m,g):(re(),P(d[_],1,1,()=>{d[_]=null}),ae(),s=d[i],s?s.p(m,g):(s=d[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||g&2)&&h(e,"class",m[1]),(!l||g&10)&&x(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){P(u,m),P(s),l=!1},d(m){m&&w(e),u&&u.d(m),d[i].d(),n[11](null),o=!1,r()}}}const ef="Invalid value";function ko(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||ef:n||ef}function Ay(n,e,t){let i;Ze(n,$i,_=>t(7,i=_));let{$$slots:s={},$$scope:l}=e;const o="field_"+H.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,d=[];function p(){Fi(r)}en(()=>(f.addEventListener("input",p),f.addEventListener("change",p),()=>{f.removeEventListener("input",p),f.removeEventListener("change",p)}));function m(_){me.call(this,n,_)}function g(_){ie[_?"unshift":"push"](()=>{f=_,t(2,f)})}return n.$$set=_=>{"name"in _&&t(5,r=_.name),"inlineError"in _&&t(0,a=_.inlineError),"class"in _&&t(1,u=_.class),"$$scope"in _&&t(8,l=_.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,d=H.toArray(H.getNestedVal(i,r)))},[a,u,f,d,o,r,p,i,l,s,m,g]}class de extends ye{constructor(e){super(),ve(this,e,Ay,Ey,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Iy(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Email"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","email"),h(l,"autocomplete","off"),h(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Py(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Password"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Minimum 10 characters.",h(e,"for",i=n[9]),h(l,"type","password"),h(l,"autocomplete","new-password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0,h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[1]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[6]),u=!0)},p(d,p){p&512&&i!==(i=d[9])&&h(e,"for",i),p&512&&o!==(o=d[9])&&h(l,"id",o),p&2&&l.value!==d[1]&&fe(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Ly(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Password confirm"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Ny(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;return s=new de({props:{class:"form-field required",name:"email",$$slots:{default:[Iy,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[Py,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Ly,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

    Create your first admin account in order to continue

    ",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("button"),f.innerHTML=`Create and login - `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(g,_){S(g,e,_),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),z(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",at(n[4])),p=!0)},p(g,[_]){const b={};_&1537&&(b.$$scope={dirty:_,ctx:g}),s.$set(b);const k={};_&1538&&(k.$$scope={dirty:_,ctx:g}),o.$set(k);const $={};_&1540&&($.$$scope={dirty:_,ctx:g}),a.$set($),(!d||_&8)&&x(f,"btn-disabled",g[3]),(!d||_&8)&&x(f,"btn-loading",g[3])},i(g){d||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),d=!0)},o(g){P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),d=!1},d(g){g&&w(e),B(s),B(o),B(a),p=!1,m()}}}function Fy(n,e,t){const i=Tt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await pe.admins.create({email:s,password:l,passwordConfirm:o}),await pe.admins.authWithPassword(s,l),i("submit")}catch(p){pe.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class Ry extends ye{constructor(e){super(),ve(this,e,Fy,Ny,_e,{})}}function tf(n){let e,t;return e=new r1({props:{$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qy(n){let e,t;return e=new Ry({}),e.$on("submit",n[1]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p:X,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function jy(n){let e,t,i=n[0]&&tf(n);return{c(){i&&i.c(),e=Ce()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=tf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),P(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Vy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){pe.logout(!1),t(0,i=!0);return}pe.authStore.isValid?ji("/collections"):pe.logout()}return[i,async()=>{t(0,i=!1),await an(),window.location.search=""}]}class Hy extends ye{constructor(e){super(),ve(this,e,Vy,jy,_e,{})}}const Ft=In(""),wo=In(""),Es=In(!1);function zy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),fe(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&fe(e,l[7])},i:X,o:X,d(l){l&&w(e),n[13](null),i=!1,s()}}}function By(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Nt(o,r(n)),ie.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&U(e.$$.fragment),i=Ce()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ke(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){re();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ae()}o?(e=Nt(o,r(a)),ie.push(()=>he(e,"value",l)),e.$on("submit",a[10]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function nf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&tt(()=>{i&&(t||(t=ze(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=ze(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function sf(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:X,i(o){i||(o&&tt(()=>{i&&(t||(t=ze(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Uy(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[By,zy],m=[];function g(k,$){return k[4]&&!k[5]?0:1}l=g(n),o=m[l]=p[l](n);let _=(n[0].length||n[7].length)&&n[7]!=n[0]&&nf(),b=(n[0].length||n[7].length)&&sf(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),_&&_.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),_&&_.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",An(n[11])),J(e,"submit",at(n[10]))],f=!0)},p(k,[$]){let T=l;l=g(k),l===T?m[l].p(k,$):(re(),P(m[T],1,1,()=>{m[T]=null}),ae(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?_?$&129&&A(_,1):(_=nf(),_.c(),A(_,1),_.m(e,a)):_&&(re(),P(_,1,1,()=>{_=null}),ae()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=sf(k),b.c(),A(b,1),b.m(e,null)):b&&(re(),P(b,1,1,()=>{b=null}),ae())},i(k){u||(A(o),A(_),A(b),u=!0)},o(k){P(o),P(_),P(b),u=!1},d(k){k&&w(e),m[l].d(),_&&_.d(),b&&b.d(),f=!1,Ae(d)}}}function Wy(n,e,t){const i=Tt(),s="search_"+H.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new kn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(D=!0){t(7,p=""),D&&(d==null||d.focus()),i("clear")}function g(){t(0,l=p),i("submit",l)}async function _(){u||f||(t(5,f=!0),t(4,u=(await rt(()=>import("./FilterAutocompleteInput-141a3c4e.js"),["./FilterAutocompleteInput-141a3c4e.js","./index-be8a2174.js"],import.meta.url)).default),t(5,f=!1))}en(()=>{_()});function b(D){me.call(this,n,D)}function k(D){p=D,t(7,p),t(0,l)}function $(D){ie[D?"unshift":"push"](()=>{d=D,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),g()};return n.$$set=D=>{"value"in D&&t(0,l=D.value),"placeholder"in D&&t(1,o=D.placeholder),"autocompleteCollection"in D&&t(2,r=D.autocompleteCollection),"extraAutocompleteKeys"in D&&t(3,a=D.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,g,b,k,$,T,C]}class Yo extends ye{constructor(e){super(),ve(this,e,Wy,Uy,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Yy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ee(t=Ye.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&Ht(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:X,o:X,d(l){l&&w(e),i=!1,Ae(s)}}}function Ky(n,e,t){const i=Tt();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return en(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Ra extends ye{constructor(e){super(),ve(this,e,Ky,Yy,_e,{tooltip:0})}}function Jy(n){let e,t,i,s,l;const o=n[6].default,r=wt(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&$t(r,o,a,a[5],i?St(o,a[5],u,null):Ct(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Ae(l)}}}function Zy(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class ln extends ye{constructor(e){super(),ve(this,e,Zy,Jy,_e,{class:1,name:2,sort:0,disable:3})}}function Gy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Xy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=Y(n[2]),s=E(),l=y("div"),o=Y(n[1]),r=Y(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&le(i,a[2]),u&2&&le(o,a[1])},d(a){a&&w(e)}}}function Qy(n){let e;function t(l,o){return l[0]?Xy:Gy}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:X,o:X,d(l){s.d(l),l&&w(e)}}}function xy(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Si extends ye{constructor(e){super(),ve(this,e,xy,Qy,_e,{date:0})}}const e2=n=>({}),lf=n=>({}),t2=n=>({}),of=n=>({});function n2(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=wt(u,n,n[4],of),d=n[5].default,p=wt(d,n,n[4],null),m=n[5].after,g=wt(m,n,n[4],lf);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),g&&g.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(_,b){S(_,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),g&&g.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(_,[b]){f&&f.p&&(!o||b&16)&&$t(f,u,_,_[4],o?St(u,_[4],b,t2):Ct(_[4]),of),p&&p.p&&(!o||b&16)&&$t(p,d,_,_[4],o?St(d,_[4],b,null):Ct(_[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+_[0]+" "+_[3]+" svelte-wc2j9h"))&&h(i,"class",s),g&&g.p&&(!o||b&16)&&$t(g,m,_,_[4],o?St(m,_[4],b,e2):Ct(_[4]),lf)},i(_){o||(A(f,_),A(p,_),A(g,_),o=!0)},o(_){P(f,_),P(p,_),P(g,_),o=!1},d(_){_&&w(e),f&&f.d(_),p&&p.d(_),n[6](null),g&&g.d(_),r=!1,Ae(a)}}}function i2(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}en(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){ie[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class qa extends ye{constructor(e){super(),ve(this,e,i2,n2,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function rf(n,e,t){const i=n.slice();return i[23]=e[t],i}function s2(n){let e;return{c(){e=y("div"),e.innerHTML=` - Method`,h(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function l2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="URL",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function o2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Referer",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function r2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="User IP",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function a2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Status",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function u2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function af(n){let e;function t(l,o){return l[6]?c2:f2}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function f2(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&uf(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=uf(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function c2(n){let e;return{c(){e=y("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function uf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function ff(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function cf(n,e){var Oe,Ge,mt;let t,i,s,l=((Oe=e[23].method)==null?void 0:Oe.toUpperCase())+"",o,r,a,u,f,d=e[23].url+"",p,m,g,_,b,k,$=(e[23].referer||"N/A")+"",T,C,D,M,O,I=(e[23].userIp||"N/A")+"",L,F,q,N,R,j=e[23].status+"",V,W,ee,te,G,ce,Q,se,ge,$e,Ve=(((Ge=e[23].meta)==null?void 0:Ge.errorMessage)||((mt=e[23].meta)==null?void 0:mt.errorData))&&ff();te=new Si({props:{date:e[23].created}});function Be(){return e[17](e[23])}function we(...Xe){return e[18](e[23],...Xe)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("span"),o=Y(l),a=E(),u=y("td"),f=y("span"),p=Y(d),g=E(),Ve&&Ve.c(),_=E(),b=y("td"),k=y("span"),T=Y($),D=E(),M=y("td"),O=y("span"),L=Y(I),q=E(),N=y("td"),R=y("span"),V=Y(j),W=E(),ee=y("td"),U(te.$$.fragment),G=E(),ce=y("td"),ce.innerHTML='',Q=E(),h(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",m=e[23].url),h(u,"class","col-type-text col-field-url"),h(k,"class","txt txt-ellipsis"),h(k,"title",C=e[23].referer),x(k,"txt-hint",!e[23].referer),h(b,"class","col-type-text col-field-referer"),h(O,"class","txt txt-ellipsis"),h(O,"title",F=e[23].userIp),x(O,"txt-hint",!e[23].userIp),h(M,"class","col-type-number col-field-userIp"),h(R,"class","label"),x(R,"label-danger",e[23].status>=400),h(N,"class","col-type-number col-field-status"),h(ee,"class","col-type-date col-field-created"),h(ce,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Xe,Ke){S(Xe,t,Ke),v(t,i),v(i,s),v(s,o),v(t,a),v(t,u),v(u,f),v(f,p),v(u,g),Ve&&Ve.m(u,null),v(t,_),v(t,b),v(b,k),v(k,T),v(t,D),v(t,M),v(M,O),v(O,L),v(t,q),v(t,N),v(N,R),v(R,V),v(t,W),v(t,ee),z(te,ee,null),v(t,G),v(t,ce),v(t,Q),se=!0,ge||($e=[J(t,"click",Be),J(t,"keydown",we)],ge=!0)},p(Xe,Ke){var ue,He,Et;e=Xe,(!se||Ke&8)&&l!==(l=((ue=e[23].method)==null?void 0:ue.toUpperCase())+"")&&le(o,l),(!se||Ke&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&h(s,"class",r),(!se||Ke&8)&&d!==(d=e[23].url+"")&&le(p,d),(!se||Ke&8&&m!==(m=e[23].url))&&h(f,"title",m),(He=e[23].meta)!=null&&He.errorMessage||(Et=e[23].meta)!=null&&Et.errorData?Ve||(Ve=ff(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!se||Ke&8)&&$!==($=(e[23].referer||"N/A")+"")&&le(T,$),(!se||Ke&8&&C!==(C=e[23].referer))&&h(k,"title",C),(!se||Ke&8)&&x(k,"txt-hint",!e[23].referer),(!se||Ke&8)&&I!==(I=(e[23].userIp||"N/A")+"")&&le(L,I),(!se||Ke&8&&F!==(F=e[23].userIp))&&h(O,"title",F),(!se||Ke&8)&&x(O,"txt-hint",!e[23].userIp),(!se||Ke&8)&&j!==(j=e[23].status+"")&&le(V,j),(!se||Ke&8)&&x(R,"label-danger",e[23].status>=400);const Se={};Ke&8&&(Se.date=e[23].created),te.$set(Se)},i(Xe){se||(A(te.$$.fragment,Xe),se=!0)},o(Xe){P(te.$$.fragment,Xe),se=!1},d(Xe){Xe&&w(t),Ve&&Ve.d(),B(te),ge=!1,Ae($e)}}}function d2(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O,I,L=[],F=new Map,q;function N(we){n[11](we)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[s2]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new ln({props:R}),ie.push(()=>he(s,"sort",N));function j(we){n[12](we)}let V={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[l2]},$$scope:{ctx:n}};n[1]!==void 0&&(V.sort=n[1]),r=new ln({props:V}),ie.push(()=>he(r,"sort",j));function W(we){n[13](we)}let ee={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[o2]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),f=new ln({props:ee}),ie.push(()=>he(f,"sort",W));function te(we){n[14](we)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[r2]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),m=new ln({props:G}),ie.push(()=>he(m,"sort",te));function ce(we){n[15](we)}let Q={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[a2]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),b=new ln({props:Q}),ie.push(()=>he(b,"sort",ce));function se(we){n[16](we)}let ge={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[u2]},$$scope:{ctx:n}};n[1]!==void 0&&(ge.sort=n[1]),T=new ln({props:ge}),ie.push(()=>he(T,"sort",se));let $e=n[3];const Ve=we=>we[23].id;for(let we=0;we<$e.length;we+=1){let Oe=rf(n,$e,we),Ge=Ve(Oe);F.set(Ge,L[we]=cf(Ge,Oe))}let Be=null;return $e.length||(Be=af(n)),{c(){e=y("table"),t=y("thead"),i=y("tr"),U(s.$$.fragment),o=E(),U(r.$$.fragment),u=E(),U(f.$$.fragment),p=E(),U(m.$$.fragment),_=E(),U(b.$$.fragment),$=E(),U(T.$$.fragment),D=E(),M=y("th"),O=E(),I=y("tbody");for(let we=0;wel=!1)),s.$set(Ge);const mt={};Oe&67108864&&(mt.$$scope={dirty:Oe,ctx:we}),!a&&Oe&2&&(a=!0,mt.sort=we[1],ke(()=>a=!1)),r.$set(mt);const Xe={};Oe&67108864&&(Xe.$$scope={dirty:Oe,ctx:we}),!d&&Oe&2&&(d=!0,Xe.sort=we[1],ke(()=>d=!1)),f.$set(Xe);const Ke={};Oe&67108864&&(Ke.$$scope={dirty:Oe,ctx:we}),!g&&Oe&2&&(g=!0,Ke.sort=we[1],ke(()=>g=!1)),m.$set(Ke);const Se={};Oe&67108864&&(Se.$$scope={dirty:Oe,ctx:we}),!k&&Oe&2&&(k=!0,Se.sort=we[1],ke(()=>k=!1)),b.$set(Se);const ue={};Oe&67108864&&(ue.$$scope={dirty:Oe,ctx:we}),!C&&Oe&2&&(C=!0,ue.sort=we[1],ke(()=>C=!1)),T.$set(ue),Oe&841&&($e=we[3],re(),L=yt(L,Oe,Ve,1,we,$e,F,I,Jt,cf,null,rf),ae(),!$e.length&&Be?Be.p(we,Oe):$e.length?Be&&(Be.d(1),Be=null):(Be=af(we),Be.c(),Be.m(I,null))),(!q||Oe&64)&&x(e,"table-loading",we[6])},i(we){if(!q){A(s.$$.fragment,we),A(r.$$.fragment,we),A(f.$$.fragment,we),A(m.$$.fragment,we),A(b.$$.fragment,we),A(T.$$.fragment,we);for(let Oe=0;Oe<$e.length;Oe+=1)A(L[Oe]);q=!0}},o(we){P(s.$$.fragment,we),P(r.$$.fragment,we),P(f.$$.fragment,we),P(m.$$.fragment,we),P(b.$$.fragment,we),P(T.$$.fragment,we);for(let Oe=0;Oe{if(F<=1&&_(),t(6,p=!1),t(5,f=N.page),t(4,d=N.totalItems),s("load",u.concat(N.items)),q){const R=++m;for(;N.items.length&&m==R;)t(3,u=u.concat(N.items.splice(0,10))),await H.yieldToMain()}else t(3,u=u.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,p=!1),console.warn(N),_(),pe.errorResponseHandler(N,!1))})}function _(){t(3,u=[]),t(5,f=1),t(4,d=0)}function b(F){a=F,t(1,a)}function k(F){a=F,t(1,a)}function $(F){a=F,t(1,a)}function T(F){a=F,t(1,a)}function C(F){a=F,t(1,a)}function D(F){a=F,t(1,a)}const M=F=>s("select",F),O=(F,q)=>{q.code==="Enter"&&(q.preventDefault(),s("select",F))},I=()=>t(0,o=""),L=()=>g(f+1);return n.$$set=F=>{"filter"in F&&t(0,o=F.filter),"presets"in F&&t(10,r=F.presets),"sort"in F&&t(1,a=F.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(_(),g(1)),n.$$.dirty&24&&t(7,i=d>u.length)},[o,a,g,u,d,f,p,i,s,l,r,b,k,$,T,C,D,M,O,I,L]}class h2 extends ye{constructor(e){super(),ve(this,e,m2,p2,_e,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! - * Chart.js v3.9.1 - * https://www.chartjs.org - * (c) 2022 Chart.js Contributors - * Released under the MIT License - */function mi(){}const _2=function(){let n=0;return function(){return n++}}();function ct(n){return n===null||typeof n>"u"}function kt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function et(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Vt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return Vt(n)?n:e}function st(n,e){return typeof n>"u"?e:n}const g2=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,u1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Pt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function dt(n,e,t,i){let s,l,o;if(kt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function Ri(n,e){return(mf[e]||(mf[e]=y2(e)))(n)}function y2(n){const e=k2(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function k2(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function ja(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Wn=n=>typeof n<"u",qi=n=>typeof n=="function",hf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function w2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Rt=Math.PI,_t=2*Rt,S2=_t+Rt,Co=Number.POSITIVE_INFINITY,$2=Rt/180,Lt=Rt/2,Ks=Rt/4,_f=Rt*2/3,Bn=Math.log10,ri=Math.sign;function gf(n){const e=Math.round(n);n=rl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Bn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function C2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function As(n){return!isNaN(parseFloat(n))&&isFinite(n)}function rl(n,e,t){return Math.abs(n-e)=n}function c1(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ha(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const ts=(n,e,t,i)=>Ha(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ha(n,t,i=>n[i][e]>=t);function E2(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+ja(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function vf(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(p1.forEach(l=>{delete n[l]}),delete n._chartjs)}function m1(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function _1(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,h1.call(window,()=>{s=!1,n.apply(e,l)}))}}function I2(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const P2=n=>n==="start"?"left":n==="end"?"right":"center",yf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function g1(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:d,maxDefined:p}=o.getUserBounds();d&&(s=on(Math.min(ts(r,o.axis,u).lo,t?i:ts(e,a,o.getPixelForValue(u)).lo),0,i-1)),p?l=on(Math.max(ts(r,o.axis,f,!0).hi+1,t?0:ts(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function b1(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Ul=n=>n===0||n===1,kf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*_t/t)),wf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*_t/t)+1,al={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Lt)+1,easeOutSine:n=>Math.sin(n*Lt),easeInOutSine:n=>-.5*(Math.cos(Rt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ul(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ul(n)?n:kf(n,.075,.3),easeOutElastic:n=>Ul(n)?n:wf(n,.075,.3),easeInOutElastic(n){return Ul(n)?n:n<.5?.5*kf(n*2,.1125,.45):.5+.5*wf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-al.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?al.easeInBounce(n*2)*.5:al.easeOutBounce(n*2-1)*.5+.5};/*! - * @kurkle/color v0.2.1 - * https://github.com/kurkle/color#readme - * (c) 2022 Jukka Kurkela - * Released under the MIT License - */function Al(n){return n+.5|0}const Ai=(n,e,t)=>Math.max(Math.min(n,t),e);function nl(n){return Ai(Al(n*2.55),0,255)}function Ni(n){return Ai(Al(n*255),0,255)}function gi(n){return Ai(Al(n/2.55)/100,0,1)}function Sf(n){return Ai(Al(n*100),0,100)}const qn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ia=[..."0123456789ABCDEF"],L2=n=>ia[n&15],N2=n=>ia[(n&240)>>4]+ia[n&15],Wl=n=>(n&240)>>4===(n&15),F2=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function R2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&qn[n[1]]*17,g:255&qn[n[2]]*17,b:255&qn[n[3]]*17,a:e===5?qn[n[4]]*17:255}:(e===7||e===9)&&(t={r:qn[n[1]]<<4|qn[n[2]],g:qn[n[3]]<<4|qn[n[4]],b:qn[n[5]]<<4|qn[n[6]],a:e===9?qn[n[7]]<<4|qn[n[8]]:255})),t}const q2=(n,e)=>n<255?e(n):"";function j2(n){var e=F2(n)?L2:N2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+q2(n.a,e):void 0}const V2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v1(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function H2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function z2(n,e,t){const i=v1(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function B2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=B2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Ba(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ni)}function Ua(n,e,t){return Ba(v1,n,e,t)}function U2(n,e,t){return Ba(z2,n,e,t)}function W2(n,e,t){return Ba(H2,n,e,t)}function y1(n){return(n%360+360)%360}function Y2(n){const e=V2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?nl(+e[5]):Ni(+e[5]));const s=y1(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=U2(s,l,o):e[1]==="hsv"?i=W2(s,l,o):i=Ua(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function K2(n,e){var t=za(n);t[0]=y1(t[0]+e),t=Ua(t),n.r=t[0],n.g=t[1],n.b=t[2]}function J2(n){if(!n)return;const e=za(n),t=e[0],i=Sf(e[1]),s=Sf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${gi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const $f={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Cf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Z2(){const n={},e=Object.keys(Cf),t=Object.keys($f);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Yl;function G2(n){Yl||(Yl=Z2(),Yl.transparent=[0,0,0,0]);const e=Yl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const X2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Q2(n){const e=X2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?nl(o):Ai(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?nl(i):Ai(i,0,255)),s=255&(e[4]?nl(s):Ai(s,0,255)),l=255&(e[6]?nl(l):Ai(l,0,255)),{r:i,g:s,b:l,a:t}}}function x2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${gi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const dr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,bs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function ek(n,e,t){const i=bs(gi(n.r)),s=bs(gi(n.g)),l=bs(gi(n.b));return{r:Ni(dr(i+t*(bs(gi(e.r))-i))),g:Ni(dr(s+t*(bs(gi(e.g))-s))),b:Ni(dr(l+t*(bs(gi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Kl(n,e,t){if(n){let i=za(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Ua(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function k1(n,e){return n&&Object.assign(e||{},n)}function Tf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Ni(n[3]))):(e=k1(n,{r:0,g:0,b:0,a:1}),e.a=Ni(e.a)),e}function tk(n){return n.charAt(0)==="r"?Q2(n):Y2(n)}class To{constructor(e){if(e instanceof To)return e;const t=typeof e;let i;t==="object"?i=Tf(e):t==="string"&&(i=R2(e)||G2(e)||tk(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=k1(this._rgb);return e&&(e.a=gi(e.a)),e}set rgb(e){this._rgb=Tf(e)}rgbString(){return this._valid?x2(this._rgb):void 0}hexString(){return this._valid?j2(this._rgb):void 0}hslString(){return this._valid?J2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=ek(this._rgb,e._rgb,t)),this}clone(){return new To(this.rgb)}alpha(e){return this._rgb.a=Ni(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Al(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Kl(this._rgb,2,e),this}darken(e){return Kl(this._rgb,2,-e),this}saturate(e){return Kl(this._rgb,1,e),this}desaturate(e){return Kl(this._rgb,1,-e),this}rotate(e){return K2(this._rgb,e),this}}function w1(n){return new To(n)}function S1(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Mf(n){return S1(n)?n:w1(n)}function pr(n){return S1(n)?n:w1(n).saturate(.5).darken(.1).hexString()}const as=Object.create(null),sa=Object.create(null);function ul(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>pr(i.backgroundColor),this.hoverBorderColor=(t,i)=>pr(i.borderColor),this.hoverColor=(t,i)=>pr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return mr(this,e,t)}get(e){return ul(this,e)}describe(e,t){return mr(sa,e,t)}override(e,t){return mr(as,e,t)}route(e,t,i,s){const l=ul(this,e),o=ul(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return et(a)?Object.assign({},u,a):st(a,u)},set(a){this[r]=a}}})}}var lt=new nk({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ik(n){return!n||ct(n.size)||ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Mo(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function sk(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,d,p;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function vl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,ak(n,l),a=0;a+n||0;function Ka(n,e){const t={},i=et(e),s=i?Object.keys(e):e,l=et(n)?i?o=>st(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=pk(l(o));return t}function $1(n){return Ka(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Cs(n){return Ka(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Yn(n){const e=$1(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Dn(n,e){n=n||{},e=e||lt.font;let t=st(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=st(n.style,e.style);i&&!(""+i).match(ck)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:st(n.family,e.family),lineHeight:dk(st(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:st(n.weight,e.weight),string:""};return s.string=ik(s),s}function Jl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Vi(n,e){return Object.assign(Object.create(n),e)}function Ja(n,e=[""],t=n,i,s=()=>n[0]){Wn(i)||(i=O1("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Ja([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return T1(o,r,()=>wk(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Ef(o).includes(r)},ownKeys(o){return Ef(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Is(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:C1(n,i),setContext:l=>Is(n,l,t,i),override:l=>Is(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return T1(l,o,()=>_k(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function C1(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:qi(t)?t:()=>t,isIndexable:qi(i)?i:()=>i}}const hk=(n,e)=>n?n+ja(e):e,Za=(n,e)=>et(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function T1(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function _k(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return qi(r)&&o.isScriptable(e)&&(r=gk(e,r,n,t)),kt(r)&&r.length&&(r=bk(e,r,n,o.isIndexable)),Za(e,r)&&(r=Is(r,s,l&&l[e],o)),r}function gk(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Za(n,e)&&(e=Ga(s._scopes,s,n,e)),e}function bk(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Wn(l.index)&&i(n))e=e[l.index%e.length];else if(et(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const d=Ga(u,s,n,f);e.push(Is(d,l,o&&o[n],r))}}return e}function M1(n,e,t){return qi(n)?n(e,t):n}const vk=(n,e)=>n===!0?e:typeof n=="string"?Ri(e,n):void 0;function yk(n,e,t,i,s){for(const l of e){const o=vk(t,l);if(o){n.add(o);const r=M1(o._fallback,t,s);if(Wn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Wn(i)&&t!==i)return null}return!1}function Ga(n,e,t,i){const s=e._rootScopes,l=M1(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=Df(r,o,t,l||t,i);return a===null||Wn(l)&&l!==t&&(a=Df(r,o,l,a,i),a===null)?!1:Ja(Array.from(r),[""],s,l,()=>kk(e,t,i))}function Df(n,e,t,i,s){for(;t;)t=yk(n,e,t,i,s);return t}function kk(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return kt(s)&&et(t)?t:s}function wk(n,e,t,i){let s;for(const l of e)if(s=O1(hk(l,n),t),Wn(s))return Za(n,s)?Ga(t,i,n,s):s}function O1(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Wn(i))return i}}function Ef(n){let e=n._keys;return e||(e=n._keys=Sk(n._scopes)),e}function Sk(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function D1(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function Ck(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=na(l,s),a=na(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const d=i*u,p=i*f;return{previous:{x:l.x-d*(o.x-s.x),y:l.y-d*(o.y-s.y)},next:{x:l.x+p*(o.x-s.x),y:l.y+p*(o.y-s.y)}}}function Tk(n,e,t){const i=n.length;let s,l,o,r,a,u=Ps(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")Ok(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Ak(n,e){return Ko(n).getPropertyValue(e)}const Ik=["top","right","bottom","left"];function ss(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Ik[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Pk=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Lk(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Pk(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Qi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Ko(t),l=s.boxSizing==="border-box",o=ss(s,"padding"),r=ss(s,"border","width"),{x:a,y:u,box:f}=Lk(n,t),d=o.left+(f&&r.left),p=o.top+(f&&r.top);let{width:m,height:g}=e;return l&&(m-=o.width+r.width,g-=o.height+r.height),{x:Math.round((a-d)/m*t.width/i),y:Math.round((u-p)/g*t.height/i)}}function Nk(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Xa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Ko(l),a=ss(r,"border","width"),u=ss(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Eo(r.maxWidth,l,"clientWidth"),s=Eo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||Co,maxHeight:s||Co}}const hr=n=>Math.round(n*10)/10;function Fk(n,e,t,i){const s=Ko(n),l=ss(s,"margin"),o=Eo(s.maxWidth,n,"clientWidth")||Co,r=Eo(s.maxHeight,n,"clientHeight")||Co,a=Nk(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const d=ss(s,"border","width"),p=ss(s,"padding");u-=p.width+d.width,f-=p.height+d.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=hr(Math.min(u,o,a.maxWidth)),f=hr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=hr(u/2)),{width:u,height:f}}function Af(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Rk=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function If(n,e){const t=Ak(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function xi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function qk(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function jk(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=xi(n,s,t),r=xi(s,l,t),a=xi(l,e,t),u=xi(o,r,t),f=xi(r,a,t);return xi(u,f,t)}const Pf=new Map;function Vk(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Pf.get(t);return i||(i=new Intl.NumberFormat(n,e),Pf.set(t,i)),i}function Il(n,e,t){return Vk(e,t).format(n)}const Hk=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},zk=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function _r(n,e,t){return n?Hk(e,t):zk()}function Bk(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function Uk(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function I1(n){return n==="angle"?{between:gl,compare:M2,normalize:On}:{between:bl,compare:(e,t)=>e-t,normalize:e=>e}}function Lf({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function Wk(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=I1(i),a=e.length;let{start:u,end:f,loop:d}=n,p,m;if(d){for(u+=a,f+=a,p=0,m=a;pa(s,T,k)&&r(s,T)!==0,D=()=>r(l,k)===0||a(l,T,k),M=()=>_||C(),O=()=>!_||D();for(let I=f,L=f;I<=d;++I)$=e[I%o],!$.skip&&(k=u($[i]),k!==T&&(_=a(k,s,l),b===null&&M()&&(b=r(k,s)===0?I:L),b!==null&&O()&&(g.push(Lf({start:b,end:I,loop:p,count:o,style:m})),b=null),L=I,T=k));return b!==null&&g.push(Lf({start:b,end:d,loop:p,count:o,style:m})),g}function L1(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function Kk(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function Jk(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=Yk(t,s,l,i);if(i===!0)return Nf(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=h1.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var hi=new Xk;const Rf="transparent",Qk={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Mf(n||Rf),s=i.valid&&Mf(e||Rf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class xk{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||Qk[e.type||typeof o],this._easing=al[e.easing]||al.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Jl([e.to,t,s,e.from]),this._from=Jl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});lt.set("animations",{colors:{type:"color",properties:tw},numbers:{type:"number",properties:ew}});lt.describe("animations",{_fallback:"animation"});lt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class N1{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!et(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!et(s))return;const l={};for(const o of nw)l[o]=s[o];(kt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=sw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&iw(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let d=l[u];const p=i.get(u);if(d)if(p&&d.active()){d.update(p,f,r);continue}else d.cancel();if(!p||!p.duration){e[u]=f;continue}l[u]=d=new xk(p,e,u,f),s.push(d)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return hi.add(this._chart,i),!0}}function iw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function zf(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=aw(l,o,i),d=e.length;let p;for(let m=0;mt[i].axis===e).shift()}function cw(n,e){return Vi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function dw(n,e,t){return Vi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Js(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const br=n=>n==="reset"||n==="none",Bf=(n,e)=>e?n:Object.assign({},n),pw=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:F1(t,!0),values:null};class xn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Vf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Js(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(d,p,m,g)=>d==="x"?p:d==="r"?g:m,l=t.xAxisID=st(i.xAxisID,gr(e,"x")),o=t.yAxisID=st(i.yAxisID,gr(e,"y")),r=t.rAxisID=st(i.rAxisID,gr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&vf(this._data,this),e._stacked&&Js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(et(t))this._data=rw(t);else if(i!==t){if(i){vf(i,this);const s=this._cachedMeta;Js(s),s._parsed=[]}t&&Object.isExtensible(t)&&A2(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=Vf(t.vScale,t),t.stack!==i.stack&&(s=!0,Js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&zf(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,d,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{kt(s[e])?p=this.parseArrayData(i,s,e,t):et(s[e])?p=this.parseObjectData(i,s,e,t):p=this.parsePrimitiveData(i,s,e,t);const m=()=>d[r]===null||u&&d[r]_||d<_}for(p=0;p=0;--p)if(!g()){this.updateRangeFromParsed(u,e,m,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),_=u.resolveNamedOptions(p,m,g,d);return _.$shared&&(_.$shared=a,l[o]=Object.freeze(Bf(_,a))),_}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,t),p=f.getOptionScopes(this.getDataset(),d);a=f.createResolver(p,this.getContext(e,i,t))}const u=new N1(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||br(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){br(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!br(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function hw(n){const e=n.iScale,t=mw(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Wn(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function R1(n,e,t,i){return kt(n)?bw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Uf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,d,p;for(u=t,f=t+i;u=t?1:-1)}function yw(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,d=r.axis;for(let p=t;pgl(T,r,a,!0)?1:Math.max(C,C*t,D,D*t),g=(T,C,D)=>gl(T,r,a,!0)?-1:Math.min(C,C*t,D,D*t),_=m(0,u,d),b=m(Lt,f,p),k=g(Rt,u,d),$=g(Rt+Lt,f,p);i=(_-k)/2,s=(b-$)/2,l=-(_+k)/2,o=-(b+$)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Pl extends xn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(et(i[e])){const{key:a="value"}=this._parsing;l=u=>+Ri(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?_t*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Il(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Pl.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return kt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Jo extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=g1(t,s,o);this._drawStart=r,this._drawCount=a,b1(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(t,s),p=o.axis,m=r.axis,{spanGaps:g,segment:_}=this.options,b=As(g)?g:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||s==="none";let $=t>0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(D[p]-$[p])>b,_&&(M.parsed=D,M.raw=u.data[T]),d&&(M.options=f||this.resolveDataElementOptions(T,C.active?"active":s)),k||this.updateElement(C,T,M,s),$=D}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Jo.id="line";Jo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Jo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class eu extends xn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Il(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return D1.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,d=u.yCenter,p=u.getIndexAngle(0)-.5*Rt;let m=p,g;const _=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Xn(this.resolveDataElementOptions(e,t).angle||i):0}}eu.id="polarArea";eu.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};eu.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class q1 extends Pl{}q1.id="pie";q1.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class tu extends xn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return D1.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};Ci.defaults={};Ci.defaultRoutes=void 0;const j1={values(n){return kt(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=Cw(n,t)}const o=Bn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Il(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Bn(n)));return i===1||i===2||i===5?j1.numeric.call(this,n,e,t):""}};function Cw(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Zo={formatters:j1};lt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Zo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});lt.route("scale.ticks","color","","color");lt.route("scale.grid","color","","borderColor");lt.route("scale.grid","borderColor","","borderColor");lt.route("scale.title","color","","color");lt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});lt.describe("scales",{_fallback:"scale"});lt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function Tw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Mw(n),s=t.major.enabled?Dw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Ew(e,a,s,l/i),a;const u=Ow(s,e,i);if(l>0){let f,d;const p=l>1?Math.round((r-o)/(l-1)):null;for(Gl(e,a,u,ct(p)?0:o-p,o),f=0,d=l-1;fs)return a}return Math.max(s,1)}function Dw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Kf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Jf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Lw(n,e){dt(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:jn(t,jn(i,t)),max:jn(i,jn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Pt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=mk(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),d=f.widest.width,p=f.highest.height,m=on(this.chart.width-d,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),d+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Zs(e.grid)-t.padding-Zf(e.title,this.chart.options.font),u=Math.sqrt(d*d+p*p),o=Va(Math.min(Math.asin(on((f.highest.height+6)/r,-1,1)),Math.asin(on(a/u,-1,1))-Math.asin(on(p/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){Pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Zf(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Zs(l)+a):(e.height=this.maxHeight,e.width=Zs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:d,highest:p}=this._getLabelSizes(),m=i.padding*2,g=Xn(this.labelRotation),_=Math.cos(g),b=Math.sin(g);if(r){const k=i.mirror?0:b*d.width+_*p.height;e.height=Math.min(this.maxHeight,e.height+k+m)}else{const k=i.mirror?0:_*d.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+k+m)}this._calculatePadding(u,f,b,_)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;a?u?(p=s*e.width,m=i*t.height):(p=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?p=e.width:l!=="inner"&&(p=e.width/2,m=t.width/2),this.paddingLeft=Math.max((p-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-d+o)*this.width/(this.width-d),0)}else{let f=t.height/2,d=e.height/2;l==="start"?(f=0,d=e.height):l==="end"&&(f=t.height,d=0),this.paddingTop=f+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Pt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[O]||0,height:o[O]||0});return{first:M(0),last:M(t-1),widest:M(C),highest:M(D),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return O2(this._alignToPixels?Ji(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),d=Zs(l),p=[],m=l.setContext(this.getContext()),g=m.drawBorder?m.borderWidth:0,_=g/2,b=function(V){return Ji(i,V,g)};let k,$,T,C,D,M,O,I,L,F,q,N;if(o==="top")k=b(this.bottom),M=this.bottom-d,I=k-_,F=b(e.top)+_,N=e.bottom;else if(o==="bottom")k=b(this.top),F=e.top,N=b(e.bottom)-_,M=k+_,I=this.top+d;else if(o==="left")k=b(this.right),D=this.right-d,O=k-_,L=b(e.left)+_,q=e.right;else if(o==="right")k=b(this.left),L=e.left,q=b(e.right)-_,D=k+_,O=this.left+d;else if(t==="x"){if(o==="center")k=b((e.top+e.bottom)/2+.5);else if(et(o)){const V=Object.keys(o)[0],W=o[V];k=b(this.chart.scales[V].getPixelForValue(W))}F=e.top,N=e.bottom,M=k+_,I=M+d}else if(t==="y"){if(o==="center")k=b((e.left+e.right)/2);else if(et(o)){const V=Object.keys(o)[0],W=o[V];k=b(this.chart.scales[V].getPixelForValue(W))}D=k-_,O=D-d,L=e.left,q=e.right}const R=st(s.ticks.maxTicksLimit,f),j=Math.max(1,Math.ceil(f/R));for($=0;$l.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");lt.route(l,s,a,r)})}function Hw(n){return"id"in n&&"defaults"in n}class zw{constructor(){this.controllers=new Xl(xn,"datasets",!0),this.elements=new Xl(Ci,"elements"),this.plugins=new Xl(Object,"plugins"),this.scales=new Xl(cs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):dt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=ja(e);Pt(i["before"+s],[],i),t[e](i),Pt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(M[m]-T[m])>k,b&&(O.parsed=M,O.raw=u.data[C]),p&&(O.options=d||this.resolveDataElementOptions(C,D.active?"active":s)),$||this.updateElement(D,C,O,s),T=M}this.updateSharedOptions(d,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}nu.id="scatter";nu.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};nu.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Zi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class oa{constructor(e){this.options=e||{}}init(e){}formats(){return Zi()}parse(e,t){return Zi()}format(e,t){return Zi()}add(e,t,i){return Zi()}diff(e,t,i){return Zi()}startOf(e,t,i){return Zi()}endOf(e,t){return Zi()}}oa.override=function(n){Object.assign(oa.prototype,n)};var V1={_date:oa};function Bw(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?D2:ts;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const d=a(l,e,t-f),p=a(l,e,t+f);return{lo:d.lo,hi:p.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Ll(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var Kw={evaluateInteractionItems:Ll,modes:{index(n,e,t,i){const s=Qi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?yr(n,s,l,i,o):kr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,d=u.data[f];d&&!d.skip&&a.push({element:d,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Qi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?yr(n,s,l,i,o):kr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Xf(n,e){return n.filter(t=>H1.indexOf(t.pos)===-1&&t.box.axis===e)}function Xs(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function Jw(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Xs(Gs(e,"left"),!0),s=Xs(Gs(e,"right")),l=Xs(Gs(e,"top"),!0),o=Xs(Gs(e,"bottom")),r=Xf(e,"x"),a=Xf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Gs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Qf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function z1(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function Qw(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!et(s)){t.size&&(n[s]-=t.size);const d=i[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?l.height:l.width),t.size=d.size/d.count,n[s]+=t.size}l.getPadding&&z1(o,l.getPadding());const r=Math.max(0,e.outerWidth-Qf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Qf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function xw(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function e3(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function il(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof _.beforeLayout=="function"&&_.beforeLayout()});const f=a.reduce((_,b)=>b.box.options&&b.box.options.display===!1?_:_+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),p=Object.assign({},s);z1(p,Yn(i));const m=Object.assign({maxPadding:p,w:l,h:o,x:s.left,y:s.top},s),g=Gw(a.concat(u),d);il(r.fullSize,m,d,g),il(a,m,d,g),il(u,m,d,g)&&il(a,m,d,g),xw(m),xf(r.leftAndTop,m,d,g),m.x+=m.w,m.y+=m.h,xf(r.rightAndBottom,m,d,g),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},dt(r.chartArea,_=>{const b=_.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class B1{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class t3 extends B1{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const fo="$chartjs",n3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ec=n=>n===null||n==="";function i3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[fo]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",ec(s)){const l=If(n,"width");l!==void 0&&(n.width=l)}if(ec(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=If(n,"height");l!==void 0&&(n.height=l)}return n}const U1=Rk?{passive:!0}:!1;function s3(n,e,t){n.addEventListener(e,t,U1)}function l3(n,e,t){n.canvas.removeEventListener(e,t,U1)}function o3(n,e){const t=n3[n.type]||n.type,{x:i,y:s}=Qi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Ao(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function r3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Ao(r.addedNodes,i),o=o&&!Ao(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function a3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Ao(r.removedNodes,i),o=o&&!Ao(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const yl=new Map;let tc=0;function W1(){const n=window.devicePixelRatio;n!==tc&&(tc=n,yl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function u3(n,e){yl.size||window.addEventListener("resize",W1),yl.set(n,e)}function f3(n){yl.delete(n),yl.size||window.removeEventListener("resize",W1)}function c3(n,e,t){const i=n.canvas,s=i&&Xa(i);if(!s)return;const l=_1((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),u3(n,l),o}function wr(n,e,t){t&&t.disconnect(),e==="resize"&&f3(n)}function d3(n,e,t){const i=n.canvas,s=_1(l=>{n.ctx!==null&&t(o3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return s3(i,e,s),s}class p3 extends B1{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(i3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[fo])return!1;const i=t[fo].initial;["height","width"].forEach(l=>{const o=i[l];ct(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[fo],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:r3,detach:a3,resize:c3}[t]||d3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:wr,detach:wr,resize:wr}[t]||l3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Fk(e,t,i,s)}isAttached(e){const t=Xa(e);return!!(t&&t.isConnected)}}function m3(n){return!A1()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?t3:p3}class h3{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(Pt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=st(i.options&&i.options.plugins,{}),l=_3(i);return s===!1&&!t?[]:b3(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function _3(n){const e={},t=[],i=Object.keys(oi.plugins.items);for(let l=0;l{const a=i[r];if(!et(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=aa(r,a),f=k3(u,s),d=t.scales||{};l[u]=l[u]||r,o[r]=ol(Object.create(null),[{axis:u},a,d[u],d[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||ra(a,e),d=(as[a]||{}).scales||{};Object.keys(d).forEach(p=>{const m=y3(p,u),g=r[m+"AxisID"]||l[m]||m;o[g]=o[g]||Object.create(null),ol(o[g],[{axis:m},i[g],d[p]])})}),Object.keys(o).forEach(r=>{const a=o[r];ol(a,[lt.scales[a.type],lt.scale])}),o}function Y1(n){const e=n.options||(n.options={});e.plugins=st(e.plugins,{}),e.scales=S3(n,e)}function K1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function $3(n){return n=n||{},n.data=K1(n.data),Y1(n),n}const nc=new Map,J1=new Set;function eo(n,e){let t=nc.get(n);return t||(t=e(),nc.set(n,t),J1.add(t)),t}const Qs=(n,e,t)=>{const i=Ri(e,t);i!==void 0&&n.add(i)};class C3{constructor(e){this._config=$3(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=K1(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Y1(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return eo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return eo(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(d=>Qs(a,e,d))),f.forEach(d=>Qs(a,s,d)),f.forEach(d=>Qs(a,as[l]||{},d)),f.forEach(d=>Qs(a,lt,d)),f.forEach(d=>Qs(a,sa,d))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),J1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,as[t]||{},lt.datasets[t]||{},{type:t},lt,sa]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=ic(this._resolverCache,e,s);let a=o;if(M3(o,t)){l.$shared=!1,i=qi(i)?i():i;const u=this.createResolver(e,i,r);a=Is(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=ic(this._resolverCache,e,i);return et(t)?Is(l,t,void 0,s):l}}function ic(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Ja(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const T3=n=>et(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||qi(n[t]),!1);function M3(n,e){const{isScriptable:t,isIndexable:i}=C1(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(qi(r)||T3(r))||o&&kt(r))return!0}return!1}var O3="3.9.1";const D3=["top","bottom","left","right","chartArea"];function sc(n,e){return n==="top"||n==="bottom"||D3.indexOf(n)===-1&&e==="x"}function lc(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function oc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Pt(t&&t.onComplete,[n],e)}function E3(n){const e=n.chart,t=e.options.animation;Pt(t&&t.onProgress,[n],e)}function Z1(n){return A1()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Io={},G1=n=>{const e=Z1(n);return Object.values(Io).filter(t=>t.canvas===e).pop()};function A3(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function I3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Po{constructor(e,t){const i=this.config=new C3(t),s=Z1(e),l=G1(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||m3(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=_2(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new h3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=I2(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Io[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}hi.listen(this,"complete",oc),hi.listen(this,"progress",E3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return ct(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Af(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Of(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(e,t){hi.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Af(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Pt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};dt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=aa(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),dt(l,o=>{const r=o.options,a=r.id,u=aa(a,r),f=st(r.type,o.dtype);(r.position===void 0||sc(r.position,u)!==sc(o.dposition))&&(r.position=o.dposition),s[a]=!0;let d=null;if(a in i&&i[a].type===f)d=i[a];else{const p=oi.getScale(f);d=new p({id:a,type:f,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(r,e)}),dt(s,(o,r)=>{o||delete i[r]}),dt(i,o=>{xl.configure(this,o,o.options),xl.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(lc("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){dt(this.scales,e=>{xl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!hf(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;A3(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],dt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Wa(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ya(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return vl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=Kw.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);Wn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),hi.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};dt(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){dt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},dt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!So(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=w2(e),u=I3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Pt(l.onHover,[e,r,this],this),a&&Pt(l.onClick,[e,r,this],this));const f=!So(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const rc=()=>dt(Po.instances,n=>n._plugins.invalidate()),Oi=!0;Object.defineProperties(Po,{defaults:{enumerable:Oi,value:lt},instances:{enumerable:Oi,value:Io},overrides:{enumerable:Oi,value:as},registry:{enumerable:Oi,value:oi},version:{enumerable:Oi,value:O3},getChart:{enumerable:Oi,value:G1},register:{enumerable:Oi,value:(...n)=>{oi.add(...n),rc()}},unregister:{enumerable:Oi,value:(...n)=>{oi.remove(...n),rc()}}});function X1(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+Lt,i-Lt),n.closePath(),n.clip()}function P3(n){return Ka(n,["outerStart","outerEnd","innerStart","innerEnd"])}function L3(n,e,t,i){const s=P3(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return on(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:on(s.innerStart,0,o),innerEnd:on(s.innerEnd,0,o)}}function vs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function ua(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,d=Math.max(e.outerRadius+i+t-u,0),p=f>0?f+i+t+u:0;let m=0;const g=s-a;if(i){const V=f>0?f-i:0,W=d>0?d-i:0,ee=(V+W)/2,te=ee!==0?g*ee/(ee+i):g;m=(g-te)/2}const _=Math.max(.001,g*d-t/Rt)/d,b=(g-_)/2,k=a+b+m,$=s-b-m,{outerStart:T,outerEnd:C,innerStart:D,innerEnd:M}=L3(e,p,d,$-k),O=d-T,I=d-C,L=k+T/O,F=$-C/I,q=p+D,N=p+M,R=k+D/q,j=$-M/N;if(n.beginPath(),l){if(n.arc(o,r,d,L,F),C>0){const ee=vs(I,F,o,r);n.arc(ee.x,ee.y,C,F,$+Lt)}const V=vs(N,$,o,r);if(n.lineTo(V.x,V.y),M>0){const ee=vs(N,j,o,r);n.arc(ee.x,ee.y,M,$+Lt,j+Math.PI)}if(n.arc(o,r,p,$-M/p,k+D/p,!0),D>0){const ee=vs(q,R,o,r);n.arc(ee.x,ee.y,D,R+Math.PI,k-Lt)}const W=vs(O,k,o,r);if(n.lineTo(W.x,W.y),T>0){const ee=vs(O,L,o,r);n.arc(ee.x,ee.y,T,k-Lt,L)}}else{n.moveTo(o,r);const V=Math.cos(L)*d+o,W=Math.sin(L)*d+r;n.lineTo(V,W);const ee=Math.cos(F)*d+o,te=Math.sin(F)*d+r;n.lineTo(ee,te)}n.closePath()}function N3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){ua(n,e,t,i,o+_t,s);for(let u=0;u=_t||gl(l,r,a),_=bl(o,u+p,f+p);return g&&_}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,d=(o+r+u+a)/2;return{x:t+Math.cos(f)*d,y:i+Math.sin(f)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>_t?Math.floor(i/_t):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=Rt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=N3(e,this,r,l,o);R3(e,this,r,l,a,o),e.restore()}}iu.id="arc";iu.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};iu.defaultRoutes={backgroundColor:"backgroundColor"};function Q1(n,e,t=e){n.lineCap=st(t.borderCapStyle,e.borderCapStyle),n.setLineDash(st(t.borderDash,e.borderDash)),n.lineDashOffset=st(t.borderDashOffset,e.borderDashOffset),n.lineJoin=st(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=st(t.borderWidth,e.borderWidth),n.strokeStyle=st(t.borderColor,e.borderColor)}function q3(n,e,t){n.lineTo(t.x,t.y)}function j3(n){return n.stepped?ok:n.tension||n.cubicInterpolationMode==="monotone"?rk:q3}function x1(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-C:C))%l,T=()=>{_!==b&&(n.lineTo(f,b),n.lineTo(f,_),n.lineTo(f,k))};for(a&&(m=s[$(0)],n.moveTo(m.x,m.y)),p=0;p<=r;++p){if(m=s[$(p)],m.skip)continue;const C=m.x,D=m.y,M=C|0;M===g?(D<_?_=D:D>b&&(b=D),f=(d*f+C)/++d):(T(),n.lineTo(C,D),g=M,d=0,_=b=D),k=D}T()}function fa(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?H3:V3}function z3(n){return n.stepped?qk:n.tension||n.cubicInterpolationMode==="monotone"?jk:xi}function B3(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),Q1(n,e.options),n.stroke(s)}function U3(n,e,t,i){const{segments:s,options:l}=e,o=fa(e);for(const r of s)Q1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const W3=typeof Path2D=="function";function Y3(n,e,t,i){W3&&!e.options.segment?B3(n,e,t,i):U3(n,e,t,i)}class Hi extends Ci{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ek(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Jk(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=L1(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=z3(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function ac(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=lu(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function lu(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function uc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function tb(n,e){let t=[],i=!1;return kt(n)?(i=!0,t=n):t=x3(n,e),t.length?new Hi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function fc(n){return n&&n.fill!==!1}function eS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Vt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function tS(n,e,t){const i=lS(n);if(et(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Vt(s)&&Math.floor(s)===s?nS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function nS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function iS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:et(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function sS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:et(n)?i=n.value:i=e.getBaseValue(),i}function lS(n){const e=n.options,t=e.fill;let i=st(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function oS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=rS(e,t);r.push(tb({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&Cr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;fc(l)&&Cr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!fc(i)||t.drawTime!=="beforeDatasetDraw"||Cr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const fl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` -`):n}function bS(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function mc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=Dn(e.bodyFont),u=Dn(e.titleFont),f=Dn(e.footerFont),d=l.length,p=s.length,m=i.length,g=Yn(e.padding);let _=g.height,b=0,k=i.reduce((C,D)=>C+D.before.length+D.lines.length+D.after.length,0);if(k+=n.beforeBody.length+n.afterBody.length,d&&(_+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),k){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;_+=m*C+(k-m)*a.lineHeight+(k-1)*e.bodySpacing}p&&(_+=e.footerMarginTop+p*f.lineHeight+(p-1)*e.footerSpacing);let $=0;const T=function(C){b=Math.max(b,t.measureText(C).width+$)};return t.save(),t.font=u.string,dt(n.title,T),t.font=a.string,dt(n.beforeBody.concat(n.afterBody),T),$=e.displayColors?o+2+e.boxPadding:0,dt(i,C=>{dt(C.before,T),dt(C.lines,T),dt(C.after,T)}),$=0,t.font=f.string,dt(n.footer,T),t.restore(),b+=g.width,{width:b,height:_}}function vS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function yS(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function kS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),yS(u,n,e,t)&&(u="center"),u}function hc(n,e,t){const i=t.yAlign||e.yAlign||vS(n,t);return{xAlign:t.xAlign||e.xAlign||kS(n,e,t,i),yAlign:i}}function wS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function SS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function _c(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:m}=Cs(o);let g=wS(e,r);const _=SS(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,p)+s:r==="right"&&(g+=Math.max(d,m)+s),{x:on(g,0,i.width-e.width),y:on(_,0,i.height-e.height)}}function to(n,e,t){const i=Yn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function gc(n){return si([],_i(n))}function $S(n,e,t){return Vi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function bc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class da extends Ci{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new N1(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=$S(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=si(r,_i(s)),r=si(r,_i(l)),r=si(r,_i(o)),r}getBeforeBody(e,t){return gc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return dt(e,l=>{const o={before:[],lines:[],after:[]},r=bc(i,l);si(o.before,_i(r.beforeLabel.call(this,l))),si(o.lines,r.label.call(this,l)),si(o.after,_i(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return gc(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=si(r,_i(s)),r=si(r,_i(l)),r=si(r,_i(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,d,p,i))),e.itemSort&&(r=r.sort((f,d)=>e.itemSort(f,d,i))),dt(r,f=>{const d=bc(e.callbacks,f);s.push(d.labelColor.call(this,f)),l.push(d.labelPointStyle.call(this,f)),o.push(d.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=fl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=mc(this,i),u=Object.assign({},r,a),f=hc(this.chart,i,u),d=_c(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:d.x,y:d.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:d}=Cs(r),{x:p,y:m}=e,{width:g,height:_}=t;let b,k,$,T,C,D;return l==="center"?(C=m+_/2,s==="left"?(b=p,k=b-o,T=C+o,D=C-o):(b=p+g,k=b+o,T=C-o,D=C+o),$=b):(s==="left"?k=p+Math.max(a,f)+o:s==="right"?k=p+g-Math.max(u,d)-o:k=this.caretX,l==="top"?(T=m,C=T-o,b=k-o,$=k+o):(T=m+_,C=T+o,b=k+o,$=k-o),D=T),{x1:b,x2:k,x3:$,y1:T,y2:C,y3:D}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=_r(i.rtl,this.x,this.width);for(e.x=to(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=Dn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aT!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Do(e,{x:b,y:_,w:u,h:a,radius:$}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Do(e,{x:k,y:_+1,w:u-2,h:a-2,radius:$}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,_,u,a),e.strokeRect(b,_,u,a),e.fillStyle=o.backgroundColor,e.fillRect(k,_+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,d=Dn(i.bodyFont);let p=d.lineHeight,m=0;const g=_r(i.rtl,this.x,this.width),_=function(I){t.fillText(I,g.x(e.x+m),e.y+p/2),e.y+=p+l},b=g.textAlign(o);let k,$,T,C,D,M,O;for(t.textAlign=o,t.textBaseline="middle",t.font=d.string,e.x=to(this,b,i),t.fillStyle=i.bodyColor,dt(this.beforeBody,_),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,M=s.length;C0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=fl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=mc(this,e),a=Object.assign({},o,this._size),u=hc(t,e,a),f=_c(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Yn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),Bk(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),Uk(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!So(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!So(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=fl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}da.positioners=fl;var CS={id:"tooltip",_element:da,positioners:fl,afterInit(n,e,t){t&&(n.tooltip=new da({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:mi,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const TS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function MS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return TS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const OS=(n,e)=>n===null?null:on(Math.round(n),0,e);class pa extends cs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:MS(i,e,st(t,e),this._addedLabels),OS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}pa.id="category";pa.defaults={ticks:{callback:pa.prototype.getLabelForValue}};function DS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:d,includeBounds:p}=n,m=l||1,g=f-1,{min:_,max:b}=e,k=!ct(o),$=!ct(r),T=!ct(u),C=(b-_)/(d+1);let D=gf((b-_)/g/m)*m,M,O,I,L;if(D<1e-14&&!k&&!$)return[{value:_},{value:b}];L=Math.ceil(b/D)-Math.floor(_/D),L>g&&(D=gf(L*D/g/m)*m),ct(a)||(M=Math.pow(10,a),D=Math.ceil(D*M)/M),s==="ticks"?(O=Math.floor(_/D)*D,I=Math.ceil(b/D)*D):(O=_,I=b),k&&$&&l&&T2((r-o)/l,D/1e3)?(L=Math.round(Math.min((r-o)/D,f)),D=(r-o)/L,O=o,I=r):T?(O=k?o:O,I=$?r:I,L=u-1,D=(I-O)/L):(L=(I-O)/D,rl(L,Math.round(L),D/1e3)?L=Math.round(L):L=Math.ceil(L));const F=Math.max(bf(D),bf(O));M=Math.pow(10,ct(a)?F:a),O=Math.round(O*M)/M,I=Math.round(I*M)/M;let q=0;for(k&&(p&&O!==o?(t.push({value:o}),Os=t?s:a,r=a=>l=i?l:a;if(e){const a=ri(s),u=ri(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=DS(s,l);return e.bounds==="ticks"&&c1(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Il(e,this.chart.options.locale,this.options.ticks.format)}}class ou extends Lo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Vt(e)?e:0,this.max=Vt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Xn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ou.id="linear";ou.defaults={ticks:{callback:Zo.formatters.numeric}};function yc(n){return n/Math.pow(10,Math.floor(Bn(n)))===1}function ES(n,e){const t=Math.floor(Bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Bn(e.min)))),o=Math.floor(Bn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:yc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Vt(e)?Math.max(0,e):null,this.max=Vt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(Bn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=ES(t,this);return e.bounds==="ticks"&&c1(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Il(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bn(e),this._valueRange=Bn(this.max)-Bn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}ib.id="logarithmic";ib.defaults={ticks:{callback:Zo.formatters.logarithmic,major:{enabled:!0}}};function ma(n){const e=n.ticks;if(e.display&&n.display){const t=Yn(e.backdropPadding);return st(e.font&&e.font.size,lt.font.size)+t.height}return 0}function AS(n,e,t){return t=kt(t)?t:[t],{w:sk(n,e.string,t),h:t.length*e.lineHeight}}function kc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function IS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?Rt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function LS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ma(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Rt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function qS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=Dn(l.font),{x:r,y:a,textAlign:u,left:f,top:d,right:p,bottom:m}=n._pointLabelItems[s],{backdropColor:g}=l;if(!ct(g)){const _=Cs(l.borderRadius),b=Yn(l.backdropPadding);t.fillStyle=g;const k=f-b.left,$=d-b.top,T=p-f+b.width,C=m-d+b.height;Object.values(_).some(D=>D!==0)?(t.beginPath(),Do(t,{x:k,y:$,w:T,h:C,radius:_}),t.fill()):t.fillRect(k,$,T,C)}Oo(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function sb(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,_t);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=Pt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?IS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=_t/(this._pointLabels.length||1),i=this.options.startAngle||0;return On(e*t+Xn(i))}getDistanceFromCenterForValue(e){if(ct(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(ct(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const d=s.setContext(this.getContext(f-1));jS(this,d,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:d}=u;!d||!f||(e.lineWidth=d,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=Dn(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const d=Yn(u.backdropPadding);e.fillRect(-o/2-d.left,-l-f.size/2-d.top,o+d.width,f.size+d.height)}Oo(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Xo.id="radialLinear";Xo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Zo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Xo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Xo.descriptors={angleLines:{_fallback:"grid"}};const Qo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},bn=Object.keys(Qo);function HS(n,e){return n-e}function wc(n,e){if(ct(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Vt(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(As(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function Sc(n,e,t,i){const s=bn.length;for(let l=bn.indexOf(n);l=bn.indexOf(t);l--){const o=bn[l];if(Qo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return bn[t?bn.indexOf(t):0]}function BS(n){for(let e=bn.indexOf(n)+1,t=bn.length;e=e?t[i]:t[s];n[l]=!0}}function US(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function Cc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=on(t,0,o),i=on(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||Sc(l.minUnit,t,i,this._getLabelCapacity(t)),r=st(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=As(a)||a===!0,f={};let d=t,p,m;if(u&&(d=+e.startOf(d,"isoWeek",a)),d=+e.startOf(d,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(p=d,m=0;p_-b).map(_=>+_)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],d=i[t],p=a&&f&&d&&d.major,m=this._adapter.format(e,s||(p?f:u)),g=l.ticks.callback;return g?Pt(g,[m,t,i],this):m}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=ts(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=ts(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class lb extends Nl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=no(t,this.min),this._tableRange=no(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{i&&(t||(t=ze(e,Yt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=ze(e,Yt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function YS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=Y(n[1]),t=E(),s=Y(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&le(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&le(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function KS(n){let e;return{c(){e=Y("Loading...")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function JS(n){let e,t,i,s,l,o=n[2]&&Tc();function r(f,d){return f[2]?KS:YS}let a=r(n),u=a(n);return{c(){e=y("div"),o&&o.c(),t=E(),i=y("canvas"),s=E(),l=y("div"),u.c(),h(i,"class","chart-canvas svelte-vh4sl8"),qr(i,"height","250px"),qr(i,"width","100%"),h(e,"class","chart-wrapper svelte-vh4sl8"),x(e,"loading",n[2]),h(l,"class","txt-hint m-t-xs txt-right")},m(f,d){S(f,e,d),o&&o.m(e,null),v(e,t),v(e,i),n[8](i),S(f,s,d),S(f,l,d),u.m(l,null)},p(f,[d]){f[2]?o?d&4&&A(o,1):(o=Tc(),o.c(),A(o,1),o.m(e,t)):o&&(re(),P(o,1,1,()=>{o=null}),ae()),d&4&&x(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,d):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){P(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function ZS(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),pe.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{d();for(let g of m)r.push({x:new Date(g.date),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(d(),console.warn(m),pe.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function d(){t(1,a=0),t(7,r=[])}en(()=>(Po.register(Hi,Go,Jo,ou,Nl,gS,CS),t(6,o=new Po(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function p(m){ie[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,p]}class GS extends ye{constructor(e){super(),ve(this,e,ZS,JS,_e,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function XS(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ob={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function $(T){return T instanceof a?new a(T.type,$(T.content),T.alias):Array.isArray(T)?T.map($):T.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(D){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(D.stack)||[])[1];if($){var T=document.getElementsByTagName("script");for(var C in T)if(T[C].src==$)return T[C]}return null}},isActive:function($,T,C){for(var D="no-"+T;$;){var M=$.classList;if(M.contains(T))return!0;if(M.contains(D))return!1;$=$.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,T){var C=r.util.clone(r.languages[$]);for(var D in T)C[D]=T[D];return C},insertBefore:function($,T,C,D){D=D||r.languages;var M=D[$],O={};for(var I in M)if(M.hasOwnProperty(I)){if(I==T)for(var L in C)C.hasOwnProperty(L)&&(O[L]=C[L]);C.hasOwnProperty(I)||(O[I]=M[I])}var F=D[$];return D[$]=O,r.languages.DFS(r.languages,function(q,N){N===F&&q!=$&&(this[q]=O)}),O},DFS:function $(T,C,D,M){M=M||{};var O=r.util.objId;for(var I in T)if(T.hasOwnProperty(I)){C.call(T,I,T[I],D||I);var L=T[I],F=r.util.type(L);F==="Object"&&!M[O(L)]?(M[O(L)]=!0,$(L,C,null,M)):F==="Array"&&!M[O(L)]&&(M[O(L)]=!0,$(L,C,I,M))}}},plugins:{},highlightAll:function($,T){r.highlightAllUnder(document,$,T)},highlightAllUnder:function($,T,C){var D={callback:C,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",D),D.elements=Array.prototype.slice.apply(D.container.querySelectorAll(D.selector)),r.hooks.run("before-all-elements-highlight",D);for(var M=0,O;O=D.elements[M++];)r.highlightElement(O,T===!0,D.callback)},highlightElement:function($,T,C){var D=r.util.getLanguage($),M=r.languages[D];r.util.setLanguage($,D);var O=$.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,D);var I=$.textContent,L={element:$,language:D,grammar:M,code:I};function F(N){L.highlightedCode=N,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),C&&C.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),C&&C.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){F(r.util.encode(L.code));return}if(T&&i.Worker){var q=new Worker(r.filename);q.onmessage=function(N){F(N.data)},q.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else F(r.highlight(L.code,L.grammar,L.language))},highlight:function($,T,C){var D={code:$,grammar:T,language:C};if(r.hooks.run("before-tokenize",D),!D.grammar)throw new Error('The language "'+D.language+'" has no grammar.');return D.tokens=r.tokenize(D.code,D.grammar),r.hooks.run("after-tokenize",D),a.stringify(r.util.encode(D.tokens),D.language)},tokenize:function($,T){var C=T.rest;if(C){for(var D in C)T[D]=C[D];delete T.rest}var M=new d;return p(M,M.head,$),f($,M,T,M.head,0),g(M)},hooks:{all:{},add:function($,T){var C=r.hooks.all;C[$]=C[$]||[],C[$].push(T)},run:function($,T){var C=r.hooks.all[$];if(!(!C||!C.length))for(var D=0,M;M=C[D++];)M(T)}},Token:a};i.Prism=r;function a($,T,C,D){this.type=$,this.content=T,this.alias=C,this.length=(D||"").length|0}a.stringify=function $(T,C){if(typeof T=="string")return T;if(Array.isArray(T)){var D="";return T.forEach(function(F){D+=$(F,C)}),D}var M={type:T.type,content:$(T.content,C),tag:"span",classes:["token",T.type],attributes:{},language:C},O=T.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var I="";for(var L in M.attributes)I+=" "+L+'="'+(M.attributes[L]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+I+">"+M.content+""};function u($,T,C,D){$.lastIndex=T;var M=$.exec(C);if(M&&D&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}function f($,T,C,D,M,O){for(var I in C)if(!(!C.hasOwnProperty(I)||!C[I])){var L=C[I];L=Array.isArray(L)?L:[L];for(var F=0;F=O.reach);G+=te.value.length,te=te.next){var ce=te.value;if(T.length>$.length)return;if(!(ce instanceof a)){var Q=1,se;if(j){if(se=u(ee,G,$,R),!se||se.index>=$.length)break;var Be=se.index,ge=se.index+se[0].length,$e=G;for($e+=te.value.length;Be>=$e;)te=te.next,$e+=te.value.length;if($e-=te.value.length,G=$e,te.value instanceof a)continue;for(var Ve=te;Ve!==T.tail&&($eO.reach&&(O.reach=mt);var Xe=te.prev;Oe&&(Xe=p(T,Xe,Oe),G+=Oe.length),m(T,Xe,Q);var Ke=new a(I,N?r.tokenize(we,N):we,V,we);if(te=p(T,Xe,Ke),Ge&&p(T,te,Ge),Q>1){var Se={cause:I+","+F,reach:mt};f($,T,C,te.prev,G,Se),O&&Se.reach>O.reach&&(O.reach=Se.reach)}}}}}}function d(){var $={value:null,prev:null,next:null},T={value:null,prev:$,next:null};$.next=T,this.head=$,this.tail=T,this.length=0}function p($,T,C){var D=T.next,M={value:C,prev:T,next:D};return T.next=M,D.prev=M,$.length++,M}function m($,T,C){for(var D=T.next,M=0;M/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(_,b){return"✖ Error "+_+" while fetching file: "+b},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",d="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function p(_,b,k){var $=new XMLHttpRequest;$.open("GET",_,!0),$.onreadystatechange=function(){$.readyState==4&&($.status<400&&$.responseText?b($.responseText):$.status>=400?k(s($.status,$.statusText)):k(l))},$.send(null)}function m(_){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_||"");if(b){var k=Number(b[1]),$=b[2],T=b[3];return $?T?[k,Number(T)]:[k,void 0]:[k,k]}}t.hooks.add("before-highlightall",function(_){_.selector+=", "+d}),t.hooks.add("before-sanity-check",function(_){var b=_.element;if(b.matches(d)){_.code="",b.setAttribute(r,a);var k=b.appendChild(document.createElement("CODE"));k.textContent=i;var $=b.getAttribute("data-src"),T=_.language;if(T==="none"){var C=(/\.(\w+)$/.exec($)||[,"none"])[1];T=o[C]||C}t.util.setLanguage(k,T),t.util.setLanguage(b,T);var D=t.plugins.autoloader;D&&D.loadLanguages(T),p($,function(M){b.setAttribute(r,u);var O=m(b.getAttribute("data-range"));if(O){var I=M.split(/\r\n?|\n/g),L=O[0],F=O[1]==null?I.length:O[1];L<0&&(L+=I.length),L=Math.max(0,Math.min(L-1,I.length)),F<0&&(F+=I.length),F=Math.max(0,Math.min(F,I.length)),M=I.slice(L,F).join(` -`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}k.textContent=M,t.highlightElement(k)},function(M){b.setAttribute(r,f),k.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(d),$=0,T;T=k[$++];)t.highlightElement(T)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(ob);var QS=ob.exports;const xs=XS(QS);var xS={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[p]=` -`+f[p],d=m)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",g="",_=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function e$(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&h(e,"class",i)},i:X,o:X,d(s){s&&w(e)}}}function t$(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class rb extends ye{constructor(e){super(),ve(this,e,t$,e$,_e,{class:0,content:2,language:3})}}const n$=n=>({}),Oc=n=>({}),i$=n=>({}),Dc=n=>({});function Ec(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T=n[4]&&!n[2]&&Ac(n);const C=n[19].header,D=wt(C,n,n[18],Dc);let M=n[4]&&n[2]&&Ic(n);const O=n[19].default,I=wt(O,n,n[18],null),L=n[19].footer,F=wt(L,n,n[18],Oc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),D&&D.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(q,N){S(q,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),D&&D.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",at(n[20])),J(f,"scroll",n[22])],k=!0)},p(q,N){n=q,n[4]&&!n[2]?T?T.p(n,N):(T=Ac(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),D&&D.p&&(!b||N[0]&262144)&&$t(D,C,n,n[18],b?St(C,n[18],N,i$):Ct(n[18]),Dc),n[4]&&n[2]?M?M.p(n,N):(M=Ic(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&$t(I,O,n,n[18],b?St(O,n[18],N,null):Ct(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&$t(F,L,n,n[18],b?St(L,n[18],N,n$):Ct(n[18]),Oc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(q){b||(q&&tt(()=>{b&&(i||(i=ze(t,Qr,{duration:ys,opacity:0},!0)),i.run(1))}),A(D,q),A(I,q),A(F,q),tt(()=>{b&&(_&&_.end(1),g=G_(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),g.start())}),b=!0)},o(q){q&&(i||(i=ze(t,Qr,{duration:ys,opacity:0},!1)),i.run(0)),P(D,q),P(I,q),P(F,q),g&&g.invalidate(),_=wa(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(q){q&&w(e),q&&i&&i.end(),T&&T.d(),D&&D.d(q),M&&M.d(),I&&I.d(q),n[21](null),F&&F.d(q),q&&_&&_.end(),k=!1,Ae($)}}}function Ac(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Ic(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function s$(n){let e,t,i,s,l=n[0]&&Ec(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Ec(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Ae(s)}}}let Gi,Tr=[];function ab(){return Gi=Gi||document.querySelector(".overlays"),Gi||(Gi=document.createElement("div"),Gi.classList.add("overlays"),document.body.appendChild(Gi)),Gi}let ys=150;function Pc(){return 1e3+ab().querySelectorAll(".overlay-panel-container.active").length}function l$(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:d=void 0}=e,{beforeHide:p=void 0}=e;const m=Tt(),g="op_"+H.randomString(10);let _,b,k,$,T="",C=o;function D(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function O(){return o}async function I(G){t(17,C=G),G?(k=document.activeElement,m("show"),_==null||_.focus()):(clearTimeout($),m("hide"),k==null||k.focus()),await an(),L()}function L(){_&&(o?t(6,_.style.zIndex=Pc(),_):t(6,_.style="",_))}function F(){H.pushUnique(Tr,g),document.body.classList.add("overlay-active")}function q(){H.removeByValue(Tr,g),Tr.length||document.body.classList.remove("overlay-active")}function N(G){o&&f&&G.code=="Escape"&&!H.isInput(G.target)&&_&&_.style.zIndex==Pc()&&(G.preventDefault(),M())}function R(G){o&&j(b)}function j(G,ce){ce&&t(8,T=""),G&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}G.scrollTop==0?t(8,T+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}en(()=>(ab().appendChild(_),()=>{var G;clearTimeout($),q(),(G=_==null?void 0:_.classList)==null||G.add("hidden"),setTimeout(()=>{_==null||_.remove()},0)}));const V=()=>a?M():!0;function W(G){ie[G?"unshift":"push"](()=>{b=G,t(7,b)})}const ee=G=>j(G.target);function te(G){ie[G?"unshift":"push"](()=>{_=G,t(6,_)})}return n.$$set=G=>{"class"in G&&t(1,l=G.class),"active"in G&&t(0,o=G.active),"popup"in G&&t(2,r=G.popup),"overlayClose"in G&&t(3,a=G.overlayClose),"btnClose"in G&&t(4,u=G.btnClose),"escClose"in G&&t(12,f=G.escClose),"beforeOpen"in G&&t(13,d=G.beforeOpen),"beforeHide"in G&&t(14,p=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&j(b,!0),n.$$.dirty[0]&64&&_&&L(),n.$$.dirty[0]&1&&(o?F():q())},[o,l,r,a,u,M,_,b,T,N,R,j,f,d,p,D,O,C,s,i,V,W,ee,te]}class hn extends ye{constructor(e){super(),ve(this,e,l$,s$,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function o$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function r$(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=Y(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function a$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function u$(n){let e,t,i;return t=new rb({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function f$(n){var Le;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,g,_=n[2].status+"",b,k,$,T,C,D,M=((Le=n[2].method)==null?void 0:Le.toUpperCase())+"",O,I,L,F,q,N,R=n[2].auth+"",j,V,W,ee,te,G,ce=n[2].url+"",Q,se,ge,$e,Ve,Be,we,Oe,Ge,mt,Xe,Ke=n[2].remoteIp+"",Se,ue,He,Et,Ne,Te,nt=n[2].userIp+"",At,qt,zt,Ln,ti,Sn,ht=n[2].userAgent+"",Nn,ds,ni,Ti,ps,pi,be,Ie,Re,Qe,Ot,$n,Fn,Ui,tn,fn;function Fl(Fe,De){return Fe[2].referer?r$:o$}let K=Fl(n),Z=K(n);const ne=[u$,a$],oe=[];function Me(Fe,De){return De&4&&(be=null),be==null&&(be=!H.isEmpty(Fe[2].meta)),be?0:1}return Ie=Me(n,-1),Re=oe[Ie]=ne[Ie](n),tn=new Si({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=Y(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),g=y("span"),b=Y(_),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),D=y("td"),O=Y(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",q=E(),N=y("td"),j=Y(R),V=E(),W=y("tr"),ee=y("td"),ee.textContent="URL",te=E(),G=y("td"),Q=Y(ce),se=E(),ge=y("tr"),$e=y("td"),$e.textContent="Referer",Ve=E(),Be=y("td"),Z.c(),we=E(),Oe=y("tr"),Ge=y("td"),Ge.textContent="Remote IP",mt=E(),Xe=y("td"),Se=Y(Ke),ue=E(),He=y("tr"),Et=y("td"),Et.textContent="User IP",Ne=E(),Te=y("td"),At=Y(nt),qt=E(),zt=y("tr"),Ln=y("td"),Ln.textContent="UserAgent",ti=E(),Sn=y("td"),Nn=Y(ht),ds=E(),ni=y("tr"),Ti=y("td"),Ti.textContent="Meta",ps=E(),pi=y("td"),Re.c(),Qe=E(),Ot=y("tr"),$n=y("td"),$n.textContent="Created",Fn=E(),Ui=y("td"),U(tn.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(g,"class","label"),x(g,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h($e,"class","min-width txt-hint txt-bold"),h(Ge,"class","min-width txt-hint txt-bold"),h(Et,"class","min-width txt-hint txt-bold"),h(Ln,"class","min-width txt-hint txt-bold"),h(Ti,"class","min-width txt-hint txt-bold"),h($n,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Fe,De){S(Fe,e,De),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,g),v(g,b),v(t,k),v(t,$),v($,T),v($,C),v($,D),v(D,O),v(t,I),v(t,L),v(L,F),v(L,q),v(L,N),v(N,j),v(t,V),v(t,W),v(W,ee),v(W,te),v(W,G),v(G,Q),v(t,se),v(t,ge),v(ge,$e),v(ge,Ve),v(ge,Be),Z.m(Be,null),v(t,we),v(t,Oe),v(Oe,Ge),v(Oe,mt),v(Oe,Xe),v(Xe,Se),v(t,ue),v(t,He),v(He,Et),v(He,Ne),v(He,Te),v(Te,At),v(t,qt),v(t,zt),v(zt,Ln),v(zt,ti),v(zt,Sn),v(Sn,Nn),v(t,ds),v(t,ni),v(ni,Ti),v(ni,ps),v(ni,pi),oe[Ie].m(pi,null),v(t,Qe),v(t,Ot),v(Ot,$n),v(Ot,Fn),v(Ot,Ui),z(tn,Ui,null),fn=!0},p(Fe,De){var We;(!fn||De&4)&&r!==(r=Fe[2].id+"")&&le(a,r),(!fn||De&4)&&_!==(_=Fe[2].status+"")&&le(b,_),(!fn||De&4)&&x(g,"label-danger",Fe[2].status>=400),(!fn||De&4)&&M!==(M=((We=Fe[2].method)==null?void 0:We.toUpperCase())+"")&&le(O,M),(!fn||De&4)&&R!==(R=Fe[2].auth+"")&&le(j,R),(!fn||De&4)&&ce!==(ce=Fe[2].url+"")&&le(Q,ce),K===(K=Fl(Fe))&&Z?Z.p(Fe,De):(Z.d(1),Z=K(Fe),Z&&(Z.c(),Z.m(Be,null))),(!fn||De&4)&&Ke!==(Ke=Fe[2].remoteIp+"")&&le(Se,Ke),(!fn||De&4)&&nt!==(nt=Fe[2].userIp+"")&&le(At,nt),(!fn||De&4)&&ht!==(ht=Fe[2].userAgent+"")&&le(Nn,ht);let Je=Ie;Ie=Me(Fe,De),Ie===Je?oe[Ie].p(Fe,De):(re(),P(oe[Je],1,1,()=>{oe[Je]=null}),ae(),Re=oe[Ie],Re?Re.p(Fe,De):(Re=oe[Ie]=ne[Ie](Fe),Re.c()),A(Re,1),Re.m(pi,null));const qe={};De&4&&(qe.date=Fe[2].created),tn.$set(qe)},i(Fe){fn||(A(Re),A(tn.$$.fragment,Fe),fn=!0)},o(Fe){P(Re),P(tn.$$.fragment,Fe),fn=!1},d(Fe){Fe&&w(e),Z.d(),oe[Ie].d(),B(tn)}}}function c$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function d$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function p$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[d$],header:[c$],default:[f$]},$$scope:{ctx:n}};return e=new hn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),B(e,s)}}}function m$(n,e,t){let i,s=new Br;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){ie[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){me.call(this,n,d)}function f(d){me.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class h$ extends ye{constructor(e){super(),ve(this,e,m$,p$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function _$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[1],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lc(n){let e,t;return e=new GS({props:{filter:n[4],presets:n[5]}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Nc(n){let e,t;return e=new h2({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function g$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$=n[3],T,C=n[3],D,M;r=new Ra({}),r.$on("refresh",n[9]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[_$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),g=new Yo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),g.$on("submit",n[11]);let O=Lc(n),I=Nc(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=Y(n[6]),o=E(),U(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),U(p.$$.fragment),m=E(),U(g.$$.fragment),_=E(),b=y("div"),k=E(),O.c(),T=E(),I.c(),D=Ce(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),z(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),z(p,d,null),v(e,m),z(g,e,null),v(e,_),v(e,b),v(e,k),O.m(e,null),S(L,T,F),I.m(L,F),S(L,D,F),M=!0},p(L,F){(!M||F&64)&&le(l,L[6]);const q={};F&49154&&(q.$$scope={dirty:F,ctx:L}),p.$set(q);const N={};F&1&&(N.value=L[0]),g.$set(N),F&8&&_e($,$=L[3])?(re(),P(O,1,1,X),ae(),O=Lc(L),O.c(),A(O,1),O.m(e,null)):O.p(L,F),F&8&&_e(C,C=L[3])?(re(),P(I,1,1,X),ae(),I=Nc(L),I.c(),A(I,1),I.m(D.parentNode,D)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(g.$$.fragment,L),A(O),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(g.$$.fragment,L),P(O),P(I),M=!1},d(L){L&&w(e),B(r),B(p),B(g),O.d(L),L&&w(T),L&&w(D),I.d(L)}}}function b$(n){let e,t,i,s;e=new Pn({props:{$$slots:{default:[g$]},$$scope:{ctx:n}}});let l={};return i=new h$({props:l}),n[13](i),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(o,r){z(e,o,r),S(o,t,r),z(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){B(e,o),o&&w(t),n[13](null),B(i,o)}}}const Fc="includeAdminLogs";function v$(n,e,t){var k;let i,s,l;Ze(n,Ft,$=>t(6,l=$));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];rn(Ft,l="Request logs",l);let r,a="",u=((k=window.localStorage)==null?void 0:k.getItem(Fc))<<0,f=1;function d(){t(3,f++,f)}const p=()=>d();function m(){u=this.checked,t(1,u)}const g=$=>t(0,a=$.detail),_=$=>r==null?void 0:r.show($==null?void 0:$.detail);function b($){ie[$?"unshift":"push"](()=>{r=$,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Fc,u<<0),n.$$.dirty&1&&t(4,s=H.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,d,p,m,g,_,b]}class y$ extends ye{constructor(e){super(),ve(this,e,v$,b$,_e,{})}}const ru=In({});function vn(n,e,t){ru.set({text:n,yesCallback:e,noCallback:t})}function ub(){ru.set({})}function Rc(n){let e,t,i;const s=n[17].default,l=wt(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&$t(l,s,o,o[16],i?St(s,o[16],r,null):Ct(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&tt(()=>{i&&(t||(t=ze(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=ze(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function k$(n){let e,t,i,s,l=n[0]&&Rc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Rc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,Ae(s)}}}function w$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,g,_=!1;const b=Tt();function k(){t(0,o=!1),_=!1,clearTimeout(g)}function $(){t(0,o=!0),clearTimeout(g),g=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(V){return!d||V.classList.contains(u)||(m==null?void 0:m.contains(V))&&!d.contains(V)||d.contains(V)&&V.closest&&V.closest("."+u)}function D(V){(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function M(V){(V.code==="Enter"||V.code==="Space")&&(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function O(V){o&&r&&V.code==="Escape"&&(V.preventDefault(),k())}function I(V){o&&!(d!=null&&d.contains(V.target))?_=!0:_&&(_=!1)}function L(V){var W;o&&_&&!(d!=null&&d.contains(V.target))&&!(m!=null&&m.contains(V.target))&&!((W=V.target)!=null&&W.closest(".flatpickr-calendar"))&&k()}function F(V){I(V),L(V)}function q(V){N(),d==null||d.addEventListener("click",D),t(15,m=V||(d==null?void 0:d.parentNode)),m==null||m.addEventListener("click",D),m==null||m.addEventListener("keydown",M)}function N(){clearTimeout(g),d==null||d.removeEventListener("click",D),m==null||m.removeEventListener("click",D),m==null||m.removeEventListener("keydown",M)}en(()=>(q(),()=>N()));function R(V){ie[V?"unshift":"push"](()=>{p=V,t(3,p)})}function j(V){ie[V?"unshift":"push"](()=>{d=V,t(2,d)})}return n.$$set=V=>{"trigger"in V&&t(8,l=V.trigger),"active"in V&&t(0,o=V.active),"escClose"in V&&t(9,r=V.escClose),"autoScroll"in V&&t(10,a=V.autoScroll),"closableClass"in V&&t(11,u=V.closableClass),"class"in V&&t(1,f=V.class),"$$scope"in V&&t(16,s=V.$$scope)},n.$$.update=()=>{var V,W;n.$$.dirty&260&&d&&q(l),n.$$.dirty&32769&&(o?((V=m==null?void 0:m.classList)==null||V.add("active"),b("show")):((W=m==null?void 0:m.classList)==null||W.remove("active"),b("hide")))},[o,f,d,p,O,I,L,F,l,r,a,u,k,$,T,m,s,i,R,j]}class ei extends ye{constructor(e){super(),ve(this,e,w$,k$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function qc(n,e,t){const i=n.slice();return i[27]=e[t],i}function S$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=Y("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function $$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Nt(o,r(n)),ie.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=Ce()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ke(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){re();const p=e;P(p.$$.fragment,1,0,()=>{B(p,1)}),ae()}o?(e=Nt(o,r(a)),ie.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function C$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function T$(n){let e,t,i,s;const l=[C$,$$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ce()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function jc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[T$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&jc(n);return{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),r&&r.c(),l=Ce()},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=jc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function O$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=Y(t),s=Y(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&le(i,t)},d(l){l&&w(e)}}}function Hc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[Ee(Ye.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:X,d(s){s&&w(e),t=!1,Ae(i)}}}function D$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,Ae(o)}}}function E$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[D$],header:[O$],default:[M$]},$$scope:{ctx:n}};for(let l=0;lte.name==V);ee?H.removeByValue(W.columns,ee):H.pushUnique(W.columns,{name:V}),t(2,p=H.buildIndex(W))}en(async()=>{t(8,_=!0);try{t(7,g=(await rt(()=>import("./CodeEditor-f746b79b.js"),["./CodeEditor-f746b79b.js","./index-be8a2174.js"],import.meta.url)).default)}catch(V){console.warn(V)}t(8,_=!1)});const M=()=>T(),O=()=>k(),I=()=>C(),L=V=>{t(3,s.unique=V.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=H.buildIndex(s))};function F(V){p=V,t(2,p)}const q=V=>D(V);function N(V){ie[V?"unshift":"push"](()=>{f=V,t(4,f)})}function R(V){me.call(this,n,V)}function j(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Zt(V)),t(14,r=xe(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,W,ee;n.$$.dirty[0]&1&&t(10,i=(((W=(V=u==null?void 0:u.schema)==null?void 0:V.filter(te=>!te.toDelete))==null?void 0:W.map(te=>te.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=H.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(te=>te.name))||[])},[u,k,p,s,f,d,m,g,_,l,i,T,C,D,r,b,M,O,I,L,F,q,N,R,j]}class I$ extends ye{constructor(e){super(),ve(this,e,A$,E$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function zc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=H.parseIndex(i[10]);return i[11]=s,i}function Bc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Uc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(Wc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Bc();function d(){return n[4](n[10],n[13])}return{c(){var m,g;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=Y(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((g=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&g.message?"label-danger":"")+" svelte-167lbwu")},m(m,g){var _,b;S(m,e,g),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[Ee(r=Ye.call(null,e,((b=(_=n[2].indexes)==null?void 0:_[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,g){var _,b,k,$,T;n=m,n[11].unique?f||(f=Bc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),g&1&&s!==(s=((_=n[11].columns)==null?void 0:_.map(Wc).join(", "))+"")&&le(l,s),g&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&Ht(r.update)&&g&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,Ae(u)}}}function P$(n){var C,D,M;let e,t,i=(((D=(C=n[0])==null?void 0:C.indexes)==null?void 0:D.length)||0)+"",s,l,o,r,a,u,f,d,p,m,g,_,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let O=0;Ohe(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=Y("Unique constraints and indexes ("),s=Y(i),l=Y(")"),o=E(),r=y("div");for(let O=0;O+ - New index`,f=E(),U(d.$$.fragment),h(e,"class","section-title"),h(u,"type","button"),h(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),h(r,"class","indexes-list svelte-167lbwu")},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),S(O,o,I),S(O,r,I);for(let L=0;Lp=!1)),d.$set(L)},i(O){m||(A(d.$$.fragment,O),m=!0)},o(O){P(d.$$.fragment,O),m=!1},d(O){O&&w(e),O&&w(o),O&&w(r),pt(k,O),O&&w(f),n[6](null),B(d,O),g=!1,_()}}}const Wc=n=>n.name;function L$(n,e,t){let i;Ze(n,$i,m=>t(2,i=m));let{collection:s}=e,l;function o(m,g){for(let _=0;_l==null?void 0:l.show(m,g),a=()=>l==null?void 0:l.show();function u(m){ie[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const d=m=>{for(let g=0;g{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,d,p]}class N$ extends ye{constructor(e){super(),ve(this,e,L$,P$,_e,{collection:0})}}function Yc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Kc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function d(...p){return n[5](n[6],...p)}return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),o=Y(l),r=E(),h(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),h(s,"class","txt"),h(e,"tabindex","0"),h(e,"class","dropdown-item closable svelte-1gz9b6p")},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),v(s,o),v(e,r),a||(u=[J(e,"click",An(f)),J(e,"keydown",An(d))],a=!0)},p(p,m){n=p},d(p){p&&w(e),a=!1,Ae(u)}}}function F$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class j$ extends ye{constructor(e){super(),ve(this,e,q$,R$,_e,{class:0})}}const V$=n=>({interactive:n&128,hasErrors:n&64}),Jc=n=>({interactive:n[7],hasErrors:n[6]}),H$=n=>({interactive:n&128,hasErrors:n&64}),Zc=n=>({interactive:n[7],hasErrors:n[6]}),z$=n=>({interactive:n&128,hasErrors:n&64}),Gc=n=>({interactive:n[7],hasErrors:n[6]}),B$=n=>({interactive:n&128,hasErrors:n&64}),Xc=n=>({interactive:n[7],hasErrors:n[6]});function Qc(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","drag-handle-wrapper"),h(e,"draggable","true"),h(e,"aria-label","Sort")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xc(n){let e,t,i,s;return{c(){e=y("span"),h(e,"class","marker marker-required")},m(l,o){S(l,e,o),i||(s=Ee(t=Ye.call(null,e,n[5])),i=!0)},p(l,o){t&&Ht(t.update)&&o&32&&t.update.call(null,l[5])},d(l){l&&w(e),i=!1,s()}}}function U$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g=n[0].required&&xc(n);return{c(){e=y("div"),g&&g.c(),t=E(),i=y("div"),s=y("i"),o=E(),r=y("input"),h(e,"class","markers"),h(s,"class",l=H.getFieldTypeIcon(n[0].type)),h(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),x(i,"txt-disabled",!n[7]),h(r,"type","text"),r.required=!0,r.disabled=a=!n[7],r.readOnly=u=n[0].id&&n[0].system,h(r,"spellcheck","false"),r.autofocus=f=!n[0].id,h(r,"placeholder","Field name"),r.value=d=n[0].name},m(_,b){S(_,e,b),g&&g.m(e,null),S(_,t,b),S(_,i,b),v(i,s),S(_,o,b),S(_,r,b),n[16](r),n[0].id||r.focus(),p||(m=J(r,"input",n[17]),p=!0)},p(_,b){_[0].required?g?g.p(_,b):(g=xc(_),g.c(),g.m(e,null)):g&&(g.d(1),g=null),b&1&&l!==(l=H.getFieldTypeIcon(_[0].type))&&h(s,"class",l),b&128&&x(i,"txt-disabled",!_[7]),b&128&&a!==(a=!_[7])&&(r.disabled=a),b&1&&u!==(u=_[0].id&&_[0].system)&&(r.readOnly=u),b&1&&f!==(f=!_[0].id)&&(r.autofocus=f),b&1&&d!==(d=_[0].name)&&r.value!==d&&(r.value=d)},d(_){_&&w(e),g&&g.d(),_&&w(t),_&&w(i),_&&w(o),_&&w(r),n[16](null),p=!1,m()}}}function W$(n){let e;return{c(){e=y("span"),h(e,"class","separator")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Y$(n){let e,t,i,s,l;return{c(){e=y("button"),t=y("i"),h(t,"class","ri-settings-3-line"),h(e,"type","button"),h(e,"aria-label","Toggle field options"),h(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[4]?"btn-secondary":"btn-transparent")),x(e,"btn-hint",!n[4]&&!n[6]),x(e,"btn-danger",n[6])},m(o,r){S(o,e,r),v(e,t),s||(l=J(e,"click",n[12]),s=!0)},p(o,r){r&16&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[4]?"btn-secondary":"btn-transparent"))&&h(e,"class",i),r&80&&x(e,"btn-hint",!o[4]&&!o[6]),r&80&&x(e,"btn-danger",o[6])},d(o){o&&w(e),s=!1,l()}}}function K$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),h(e,"aria-label","Restore")},m(s,l){S(s,e,l),t||(i=[Ee(Ye.call(null,e,"Restore")),J(e,"click",n[10])],t=!0)},p:X,d(s){s&&w(e),t=!1,Ae(i)}}}function ed(n){let e,t,i,s,l,o,r,a,u,f,d;const p=n[14].options,m=wt(p,n,n[23],Gc),g=n[14].beforeNonempty,_=wt(g,n,n[23],Zc);r=new de({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[J$,({uniqueId:T})=>({29:T}),({uniqueId:T})=>T?536870912:0]},$$scope:{ctx:n}}});const b=n[14].afterNonempty,k=wt(b,n,n[23],Jc);let $=!n[0].toDelete&&td(n);return{c(){e=y("div"),t=y("div"),i=y("div"),m&&m.c(),s=E(),_&&_.c(),l=E(),o=y("div"),U(r.$$.fragment),a=E(),k&&k.c(),u=E(),$&&$.c(),h(i,"class","col-sm-12 hidden-empty"),h(o,"class","col-sm-4"),h(t,"class","grid grid-sm"),h(e,"class","schema-field-options")},m(T,C){S(T,e,C),v(e,t),v(t,i),m&&m.m(i,null),v(t,s),_&&_.m(t,null),v(t,l),v(t,o),z(r,o,null),v(t,a),k&&k.m(t,null),v(t,u),$&&$.m(t,null),d=!0},p(T,C){m&&m.p&&(!d||C&8388800)&&$t(m,p,T,T[23],d?St(p,T[23],C,z$):Ct(T[23]),Gc),_&&_.p&&(!d||C&8388800)&&$t(_,g,T,T[23],d?St(g,T[23],C,H$):Ct(T[23]),Zc);const D={};C&545259553&&(D.$$scope={dirty:C,ctx:T}),r.$set(D),k&&k.p&&(!d||C&8388800)&&$t(k,b,T,T[23],d?St(b,T[23],C,V$):Ct(T[23]),Jc),T[0].toDelete?$&&(re(),P($,1,1,()=>{$=null}),ae()):$?($.p(T,C),C&1&&A($,1)):($=td(T),$.c(),A($,1),$.m(t,null))},i(T){d||(A(m,T),A(_,T),A(r.$$.fragment,T),A(k,T),A($),T&&tt(()=>{d&&(f||(f=ze(e,bt,{duration:150},!0)),f.run(1))}),d=!0)},o(T){P(m,T),P(_,T),P(r.$$.fragment,T),P(k,T),P($),T&&(f||(f=ze(e,bt,{duration:150},!1)),f.run(0)),d=!1},d(T){T&&w(e),m&&m.d(T),_&&_.d(T),B(r),k&&k.d(T),$&&$.d(),T&&f&&f.end()}}}function J$(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),o=Y(n[5]),r=E(),a=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[29]),h(l,"class","txt"),h(a,"class","ri-information-line link-hint"),h(s,"for",f=n[29])},m(m,g){S(m,e,g),e.checked=n[0].required,S(m,i,g),S(m,s,g),v(s,l),v(l,o),v(s,r),v(s,a),d||(p=[J(e,"change",n[18]),Ee(u=Ye.call(null,a,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(n[0])}.`,position:"right"}))],d=!0)},p(m,g){g&536870912&&t!==(t=m[29])&&h(e,"id",t),g&1&&(e.checked=m[0].required),g&32&&le(o,m[5]),u&&Ht(u.update)&&g&1&&u.update.call(null,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(m[0])}.`,position:"right"}),g&536870912&&f!==(f=m[29])&&h(s,"for",f)},d(m){m&&w(e),m&&w(i),m&&w(s),d=!1,Ae(p)}}}function td(n){let e,t,i,s,l,o,r,a,u;return a=new ei({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[Z$]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=E(),s=y("div"),l=y("button"),o=y("i"),r=E(),U(a.$$.fragment),h(t,"class","flex-fill"),h(o,"class","ri-more-line"),h(l,"type","button"),h(l,"aria-label","More"),h(l,"class","btn btn-circle btn-sm btn-transparent"),h(s,"class","inline-flex flex-gap-sm flex-nowrap"),h(e,"class","col-sm-4 m-l-auto txt-right")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(s,l),v(l,o),v(l,r),z(a,l,null),u=!0},p(f,d){const p={};d&8388608&&(p.$$scope={dirty:d,ctx:f}),a.$set(p)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){P(a.$$.fragment,f),u=!1},d(f){f&&w(e),B(a)}}}function Z$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Remove',h(e,"type","button"),h(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[9]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function G$(n){let e,t,i,s,l,o,r,a,u,f,d,p=n[7]&&Qc();s=new de({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[U$]},$$scope:{ctx:n}}});const m=n[14].default,g=wt(m,n,n[23],Xc),_=g||W$();function b(C,D){if(C[0].toDelete)return K$;if(C[7])return Y$}let k=b(n),$=k&&k(n),T=n[7]&&n[4]&&ed(n);return{c(){e=y("div"),t=y("div"),p&&p.c(),i=E(),U(s.$$.fragment),l=E(),_&&_.c(),o=E(),$&&$.c(),r=E(),T&&T.c(),h(t,"class","schema-field-header"),h(e,"draggable",!0),h(e,"class","schema-field"),x(e,"required",n[0].required),x(e,"expanded",n[7]&&n[4]),x(e,"deleted",n[0].toDelete),x(e,"drag-over",n[3])},m(C,D){S(C,e,D),v(e,t),p&&p.m(t,null),v(t,i),z(s,t,null),v(t,l),_&&_.m(t,null),v(t,o),$&&$.m(t,null),v(e,r),T&&T.m(e,null),u=!0,f||(d=[J(e,"dragstart",n[19]),J(e,"dragenter",n[20]),J(e,"drop",at(n[21])),J(e,"dragleave",n[22]),J(e,"dragover",at(n[15]))],f=!0)},p(C,[D]){C[7]?p||(p=Qc(),p.c(),p.m(t,i)):p&&(p.d(1),p=null);const M={};D&128&&(M.class="form-field required m-0 "+(C[7]?"":"disabled")),D&2&&(M.name="schema."+C[1]+".name"),D&8388773&&(M.$$scope={dirty:D,ctx:C}),s.$set(M),g&&g.p&&(!u||D&8388800)&&$t(g,m,C,C[23],u?St(m,C[23],D,B$):Ct(C[23]),Xc),k===(k=b(C))&&$?$.p(C,D):($&&$.d(1),$=k&&k(C),$&&($.c(),$.m(t,null))),C[7]&&C[4]?T?(T.p(C,D),D&144&&A(T,1)):(T=ed(C),T.c(),A(T,1),T.m(e,null)):T&&(re(),P(T,1,1,()=>{T=null}),ae()),(!u||D&1)&&x(e,"required",C[0].required),(!u||D&144)&&x(e,"expanded",C[7]&&C[4]),(!u||D&1)&&x(e,"deleted",C[0].toDelete),(!u||D&8)&&x(e,"drag-over",C[3])},i(C){u||(A(s.$$.fragment,C),A(_,C),A(T),C&&tt(()=>{u&&(a||(a=ze(e,bt,{duration:150},!0)),a.run(1))}),u=!0)},o(C){P(s.$$.fragment,C),P(_,C),P(T),C&&(a||(a=ze(e,bt,{duration:150},!1)),a.run(0)),u=!1},d(C){C&&w(e),p&&p.d(),B(s),_&&_.d(C),$&&$.d(),T&&T.d(),C&&a&&a.end(),f=!1,Ae(d)}}}let Mr=[];function X$(n,e,t){let i,s,l,o;Ze(n,$i,W=>t(13,o=W));let{$$slots:r={},$$scope:a}=e,{key:u=""}=e,{field:f=new wn}=e,d,p=!1,m=!1;const g="f_"+H.randomString(8),_=Tt(),b={bool:"Nonfalsey",number:"Nonzero"};function k(){f.id?t(0,f.toDelete=!0,f):_("remove")}function $(){t(0,f.toDelete=!1,f),un({})}function T(W){return H.slugify(W)}function C(){t(4,m=!0),O()}function D(){t(4,m=!1)}function M(){m?D():C()}function O(){for(let W of Mr)W.id!=g&&W.collapse()}en(()=>(Mr.push({id:g,collapse:D}),f.onMountSelect&&(t(0,f.onMountSelect=!1,f),d==null||d.select()),()=>{H.removeByKey(Mr,"id",g)}));function I(W){me.call(this,n,W)}function L(W){ie[W?"unshift":"push"](()=>{d=W,t(2,d)})}const F=W=>{const ee=f.name;t(0,f.name=T(W.target.value),f),W.target.value=f.name,_("rename",{oldName:ee,newName:f.name})};function q(){f.required=this.checked,t(0,f)}const N=W=>{if(!W.target.classList.contains("drag-handle-wrapper")){W.preventDefault();return}const ee=document.createElement("div");W.dataTransfer.setDragImage(ee,0,0),i&&_("dragstart",W)},R=W=>{i&&(t(3,p=!0),_("dragenter",W))},j=W=>{i&&(t(3,p=!1),_("drop",W))},V=W=>{i&&(t(3,p=!1),_("dragleave",W))};return n.$$set=W=>{"key"in W&&t(1,u=W.key),"field"in W&&t(0,f=W.field),"$$scope"in W&&t(23,a=W.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&f.toDelete&&f.originalName&&f.name!==f.originalName&&t(0,f.name=f.originalName,f),n.$$.dirty&1&&!f.originalName&&f.name&&t(0,f.originalName=f.name,f),n.$$.dirty&1&&typeof f.toDelete>"u"&&t(0,f.toDelete=!1,f),n.$$.dirty&1&&f.required&&t(0,f.nullable=!1,f),n.$$.dirty&1&&t(7,i=!f.toDelete&&!(f.id&&f.system)),n.$$.dirty&8194&&t(6,s=!H.isEmpty(H.getNestedVal(o,`schema.${u}`))),n.$$.dirty&1&&t(5,l=b[f==null?void 0:f.type]||"Nonempty")},[f,u,d,p,m,l,s,i,_,k,$,T,M,o,r,I,L,F,q,N,R,j,V,a]}class di extends ye{constructor(e){super(),ve(this,e,X$,G$,_e,{key:1,field:0})}}function Q$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Min length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min","0")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function x$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Max length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min",r=n[0].options.min||0)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&8192&&i!==(i=f[13])&&h(e,"for",i),d&8192&&o!==(o=f[13])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min||0)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function eC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Regex pattern"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","text"),h(l,"id",o=n[13]),h(l,"placeholder","Valid Go regular expression, eg. ^w+$")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&&l.value!==u[0].options.pattern&&fe(l,u[0].options.pattern)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function tC(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[Q$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[x$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[eC,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),h(t,"class","col-sm-3"),h(l,"class","col-sm-3"),h(a,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(d,p){S(d,e,p),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),f=!0},p(d,p){const m={};p&2&&(m.name="schema."+d[1]+".options.min"),p&24577&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const g={};p&2&&(g.name="schema."+d[1]+".options.max"),p&24577&&(g.$$scope={dirty:p,ctx:d}),o.$set(g);const _={};p&2&&(_.name="schema."+d[1]+".options.pattern"),p&24577&&(_.$$scope={dirty:p,ctx:d}),u.$set(_)},i(d){f||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),f=!1},d(d){d&&w(e),B(i),B(o),B(u)}}}function nC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[tC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("drop",n[9]),e.$on("dragstart",n[10]),e.$on("dragenter",n[11]),e.$on("dragleave",n[12]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Gt(r[2])]):{};a&16387&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function iC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(k){l=k,t(0,l)}function d(k){me.call(this,n,k)}function p(k){me.call(this,n,k)}function m(k){me.call(this,n,k)}function g(k){me.call(this,n,k)}function _(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$set=k=>{e=je(je({},e),Zt(k)),t(2,s=xe(e,i)),"field"in k&&t(0,l=k.field),"key"in k&&t(1,o=k.key)},[l,o,s,r,a,u,f,d,p,m,g,_,b]}class sC extends ye{constructor(e){super(),ve(this,e,iC,nC,_e,{field:0,key:1})}}function lC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Min"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function oC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Max"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),h(l,"min",r=n[0].options.min)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&4096&&i!==(i=f[12])&&h(e,"for",i),d&4096&&o!==(o=f[12])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function rC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[lC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[oC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function aC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[rC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Gt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function uC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Zt(b)),t(2,s=xe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,g,_]}class fC extends ye{constructor(e){super(),ve(this,e,uC,aC,_e,{field:0,key:1})}}function cC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Gt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function dC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(g){l=g,t(0,l)}function a(g){me.call(this,n,g)}function u(g){me.call(this,n,g)}function f(g){me.call(this,n,g)}function d(g){me.call(this,n,g)}function p(g){me.call(this,n,g)}function m(g){me.call(this,n,g)}return n.$$set=g=>{e=je(je({},e),Zt(g)),t(2,s=xe(e,i)),"field"in g&&t(0,l=g.field),"key"in g&&t(1,o=g.key)},[l,o,s,r,a,u,f,d,p,m]}class pC extends ye{constructor(e){super(),ve(this,e,dC,cC,_e,{field:0,key:1})}}function mC(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=H.splitNonEmpty(d.target.value,r))};return n.$$set=d=>{e=je(je({},e),Zt(d)),t(5,l=xe(e,s)),"value"in d&&t(0,o=d.value),"separator"in d&&t(1,r=d.separator),"readonly"in d&&t(2,a=d.readonly),"disabled"in d&&t(3,u=d.disabled)},n.$$.update=()=>{n.$$.dirty&1&&t(4,i=(o||[]).join(", "))},[o,r,a,u,i,l,f]}class Vs extends ye{constructor(e){super(),ve(this,e,hC,mC,_e,{value:0,separator:1,readonly:2,disabled:3})}}function _C(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function g(b){n[3](b)}let _={id:n[12],disabled:!H.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(_.value=n[0].options.exceptDomains),r=new Vs({props:_}),ie.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ye.call(null,s,{text:`List of domains that are NOT allowed. - This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.onlyDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function gC(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function g(b){n[4](b)}let _={id:n[12]+".options.onlyDomains",disabled:!H.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(_.value=n[0].options.onlyDomains),r=new Vs({props:_}),ie.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]+".options.onlyDomains"),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ye.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]+".options.onlyDomains"))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]+".options.onlyDomains"),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function bC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[_C,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[gC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.onlyDomains"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function vC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[bC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Gt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function yC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(b){n.$$.not_equal(l.options.exceptDomains,b)&&(l.options.exceptDomains=b,t(0,l))}function a(b){n.$$.not_equal(l.options.onlyDomains,b)&&(l.options.onlyDomains=b,t(0,l))}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Zt(b)),t(2,s=xe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,g,_]}class fb extends ye{constructor(e){super(),ve(this,e,yC,vC,_e,{field:0,key:1})}}function kC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Gt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function wC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(g){l=g,t(0,l)}function a(g){me.call(this,n,g)}function u(g){me.call(this,n,g)}function f(g){me.call(this,n,g)}function d(g){me.call(this,n,g)}function p(g){me.call(this,n,g)}function m(g){me.call(this,n,g)}return n.$$set=g=>{e=je(je({},e),Zt(g)),t(2,s=xe(e,i)),"field"in g&&t(0,l=g.field),"key"in g&&t(1,o=g.key)},[l,o,s,r,a,u,f,d,p,m]}class SC extends ye{constructor(e){super(),ve(this,e,wC,kC,_e,{field:0,key:1})}}function $C(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Gt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function CC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(g){l=g,t(0,l)}function a(g){me.call(this,n,g)}function u(g){me.call(this,n,g)}function f(g){me.call(this,n,g)}function d(g){me.call(this,n,g)}function p(g){me.call(this,n,g)}function m(g){me.call(this,n,g)}return n.$$set=g=>{e=je(je({},e),Zt(g)),t(2,s=xe(e,i)),"field"in g&&t(0,l=g.field),"key"in g&&t(1,o=g.key)},[l,o,s,r,a,u,f,d,p,m]}class TC extends ye{constructor(e){super(),ve(this,e,CC,$C,_e,{field:0,key:1})}}var Or=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ts={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},kl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},_n=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function nd(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Dr=function(n){return n instanceof Array?n:[n]};function cn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function cb(n,e){if(e(n))return n;if(n.parentNode)return cb(n.parentNode,e)}function so(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function Tn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Er=function(){},No=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},MC={D:Er,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Vn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Er,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Er,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},es={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},cl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[cl.w(n,e,t)]},F:function(n,e,t){return No(cl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return _n(cl.h(n,e,t))},H:function(n){return _n(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Vn(n.getHours()>11)]},M:function(n,e){return No(n.getMonth(),!0,e)},S:function(n){return _n(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return _n(n.getFullYear(),4)},d:function(n){return _n(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return _n(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return _n(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},db=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(d,p,m){return cl[d]&&m[p-1]!=="\\"?cl[d](r,f,t):d!=="\\"?d:""}).join("")}},ha=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,d=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var p=o||(t||Ts).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,p);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var g=void 0,_=[],b=0,k=0,$="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ne=Ir(t.config);Z.setHours(ne.hours,ne.minutes,ne.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}K!==void 0&&K.type!=="blur"&&Fl(K);var oe=t._input.value;d(),tn(),t._input.value!==oe&&t._debouncedChange()}function u(K,Z){return K%12+12*Vn(Z===t.l10n.amPM[1])}function f(K){switch(K%24){case 0:case 12:return 12;default:return K%12}}function d(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var K=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ne=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(K=u(K,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Me=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Le=Ar(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Fe=Ar(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=Ar(K,Z,ne);if(De>Fe&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=_n(ne)))}function g(K){var Z=Tn(K),ne=parseInt(Z.value)+(K.delta||0);(ne/1e3>1||K.key==="Enter"&&!/[^\d]/.test(ne.toString()))&&we(ne)}function _(K,Z,ne,oe){if(Z instanceof Array)return Z.forEach(function(Me){return _(K,Me,ne,oe)});if(K instanceof Array)return K.forEach(function(Me){return _(Me,Z,ne,oe)});K.addEventListener(Z,ne,oe),t._handlers.push({remove:function(){return K.removeEventListener(Z,ne,oe)}})}function b(){Re("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ne){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ne+"]"),function(oe){return _(oe,"click",t[ne])})}),t.isMobile){be();return}var K=nd(Se,50);if(t._debouncedChange=nd(b,AC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&_(t.daysContainer,"mouseover",function(ne){t.config.mode==="range"&&Ke(Tn(ne))}),_(t._input,"keydown",Xe),t.calendarContainer!==void 0&&_(t.calendarContainer,"keydown",Xe),!t.config.inline&&!t.config.static&&_(window,"resize",K),window.ontouchstart!==void 0?_(window.document,"touchstart",Be):_(window.document,"mousedown",Be),_(window.document,"focus",Be,{capture:!0}),t.config.clickOpens===!0&&(_(t._input,"focus",t.open),_(t._input,"click",t.open)),t.daysContainer!==void 0&&(_(t.monthNav,"click",fn),_(t.monthNav,["keyup","increment"],g),_(t.daysContainer,"click",ti)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ne){return Tn(ne).select()};_(t.timeContainer,["increment"],a),_(t.timeContainer,"blur",a,{capture:!0}),_(t.timeContainer,"click",T),_([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&_(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&_(t.amPM,"click",function(ne){a(ne)})}t.config.allowInput&&_(t._input,"blur",mt)}function $(K,Z){var ne=K!==void 0?t.parseDate(K):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(K);var Me=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Me&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Le=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Le,t.element),Le.appendChild(t.element),t.altInput&&Le.appendChild(t.altInput),Le.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(K,Z,ne,oe){var Me=Oe(Z,!0),Le=ft("span",K,Z.getDate().toString());return Le.dateObj=Z,Le.$i=oe,Le.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),K.indexOf("hidden")===-1&&Mn(Z,t.now)===0&&(t.todayDateElem=Le,Le.classList.add("today"),Le.setAttribute("aria-current","date")),Me?(Le.tabIndex=-1,Ot(Z)&&(Le.classList.add("selected"),t.selectedDateElem=Le,t.config.mode==="range"&&(cn(Le,"startRange",t.selectedDates[0]&&Mn(Z,t.selectedDates[0],!0)===0),cn(Le,"endRange",t.selectedDates[1]&&Mn(Z,t.selectedDates[1],!0)===0),K==="nextMonthDay"&&Le.classList.add("inRange")))):Le.classList.add("flatpickr-disabled"),t.config.mode==="range"&&$n(Z)&&!Ot(Z)&&Le.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&K!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),Re("onDayCreate",Le),Le}function O(K){K.focus(),t.config.mode==="range"&&Ke(K)}function I(K){for(var Z=K>0?0:t.config.showMonths-1,ne=K>0?t.config.showMonths:-1,oe=Z;oe!=ne;oe+=K)for(var Me=t.daysContainer.children[oe],Le=K>0?0:Me.children.length-1,Fe=K>0?Me.children.length:-1,De=Le;De!=Fe;De+=K){var Je=Me.children[De];if(Je.className.indexOf("hidden")===-1&&Oe(Je.dateObj))return Je}}function L(K,Z){for(var ne=K.className.indexOf("Month")===-1?K.dateObj.getMonth():t.currentMonth,oe=Z>0?t.config.showMonths:-1,Me=Z>0?1:-1,Le=ne-t.currentMonth;Le!=oe;Le+=Me)for(var Fe=t.daysContainer.children[Le],De=ne-t.currentMonth===Le?K.$i+Z:Z<0?Fe.children.length-1:0,Je=Fe.children.length,qe=De;qe>=0&&qe0?Je:-1);qe+=Me){var We=Fe.children[qe];if(We.className.indexOf("hidden")===-1&&Oe(We.dateObj)&&Math.abs(K.$i-qe)>=Math.abs(Z))return O(We)}t.changeMonth(Me),F(I(Me),0)}function F(K,Z){var ne=l(),oe=Ge(ne||document.body),Me=K!==void 0?K:oe?ne:t.selectedDateElem!==void 0&&Ge(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ge(t.todayDateElem)?t.todayDateElem:I(Z>0?1:-1);Me===void 0?t._input.focus():oe?L(Me,Z):O(Me)}function q(K,Z){for(var ne=(new Date(K,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((Z-1+12)%12,K),Me=t.utils.getDaysInMonth(Z,K),Le=window.document.createDocumentFragment(),Fe=t.config.showMonths>1,De=Fe?"prevMonthDay hidden":"prevMonthDay",Je=Fe?"nextMonthDay hidden":"nextMonthDay",qe=oe+1-ne,We=0;qe<=oe;qe++,We++)Le.appendChild(M("flatpickr-day "+De,new Date(K,Z-1,qe),qe,We));for(qe=1;qe<=Me;qe++,We++)Le.appendChild(M("flatpickr-day",new Date(K,Z,qe),qe,We));for(var vt=Me+1;vt<=42-ne&&(t.config.showMonths===1||We%7!==0);vt++,We++)Le.appendChild(M("flatpickr-day "+Je,new Date(K,Z+1,vt%Me),vt,We));var ii=ft("div","dayContainer");return ii.appendChild(Le),ii}function N(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var K=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var K=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(K(Z)){var ne=ft("option","flatpickr-monthDropdown-month");ne.value=new Date(t.currentYear,Z).getMonth().toString(),ne.textContent=No(Z,t.config.shorthandCurrentMonth,t.l10n),ne.tabIndex=-1,t.currentMonth===Z&&(ne.selected=!0),t.monthsDropdownContainer.appendChild(ne)}}}function j(){var K=ft("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ne;t.config.showMonths>1||t.config.monthSelectorType==="static"?ne=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),_(t.monthsDropdownContainer,"change",function(Fe){var De=Tn(Fe),Je=parseInt(De.value,10);t.changeMonth(Je-t.currentMonth),Re("onMonthChange")}),R(),ne=t.monthsDropdownContainer);var oe=so("cur-year",{tabindex:"-1"}),Me=oe.getElementsByTagName("input")[0];Me.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Me.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Me.setAttribute("max",t.config.maxDate.getFullYear().toString()),Me.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Le=ft("div","flatpickr-current-month");return Le.appendChild(ne),Le.appendChild(oe),Z.appendChild(Le),K.appendChild(Z),{container:K,yearElement:Me,monthElement:ne}}function V(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var K=t.config.showMonths;K--;){var Z=j();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function W(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(K){t.__hidePrevMonthArrow!==K&&(cn(t.prevMonthNav,"flatpickr-disabled",K),t.__hidePrevMonthArrow=K)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(K){t.__hideNextMonthArrow!==K&&(cn(t.nextMonthNav,"flatpickr-disabled",K),t.__hideNextMonthArrow=K)}}),t.currentYearElement=t.yearElements[0],Fn(),t.monthNav}function ee(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var K=Ir(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ft("span","flatpickr-time-separator",":"),ne=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ne.getElementsByTagName("input")[0];var oe=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?K.hours:f(K.hours)),t.minuteElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():K.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ne),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Me=so("flatpickr-second");t.secondElement=Me.getElementsByTagName("input")[0],t.secondElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():K.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Me)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[Vn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function te(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var K=t.config.showMonths;K--;){var Z=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var K=t.l10n.firstDayOfWeek,Z=id(t.l10n.weekdays.shorthand);K>0&&K - `+Z.join("")+` - - `}}function ce(){t.calendarContainer.classList.add("hasWeeks");var K=ft("div","flatpickr-weekwrapper");K.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ft("div","flatpickr-weeks");return K.appendChild(Z),{weekWrapper:K,weekNumbers:Z}}function Q(K,Z){Z===void 0&&(Z=!0);var ne=Z?K:K-t.currentMonth;ne<0&&t._hidePrevMonthArrow===!0||ne>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ne,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Re("onYearChange"),R()),N(),Re("onMonthChange"),Fn())}function se(K,Z){if(K===void 0&&(K=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ne=Ir(t.config),oe=ne.hours,Me=ne.minutes,Le=ne.seconds;m(oe,Me,Le)}t.redraw(),K&&Re("onChange")}function ge(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Re("onClose")}function $e(){t.config!==void 0&&Re("onDestroy");for(var K=t._handlers.length;K--;)t._handlers[K].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ne){try{delete t[ne]}catch{}})}function Ve(K){return t.calendarContainer.contains(K)}function Be(K){if(t.isOpen&&!t.config.inline){var Z=Tn(K),ne=Ve(Z),oe=Z===t.input||Z===t.altInput||t.element.contains(Z)||K.path&&K.path.indexOf&&(~K.path.indexOf(t.input)||~K.path.indexOf(t.altInput)),Me=!oe&&!ne&&!Ve(K.relatedTarget),Le=!t.config.ignoredFocusElements.some(function(Fe){return Fe.contains(Z)});Me&&Le&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function we(K){if(!(!K||t.config.minDate&&Kt.config.maxDate.getFullYear())){var Z=K,ne=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ne&&(t.redraw(),Re("onYearChange"),R())}}function Oe(K,Z){var ne;Z===void 0&&(Z=!0);var oe=t.parseDate(K,void 0,Z);if(t.config.minDate&&oe&&Mn(oe,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&oe&&Mn(oe,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Me=!!t.config.enable,Le=(ne=t.config.enable)!==null&&ne!==void 0?ne:t.config.disable,Fe=0,De=void 0;Fe=De.from.getTime()&&oe.getTime()<=De.to.getTime())return Me}return!Me}function Ge(K){return t.daysContainer!==void 0?K.className.indexOf("hidden")===-1&&K.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(K):!1}function mt(K){var Z=K.target===t._input,ne=t._input.value.trimEnd()!==Ui();Z&&ne&&!(K.relatedTarget&&Ve(K.relatedTarget))&&t.setDate(t._input.value,!0,K.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Xe(K){var Z=Tn(K),ne=t.config.wrap?n.contains(Z):Z===t._input,oe=t.config.allowInput,Me=t.isOpen&&(!oe||!ne),Le=t.config.inline&&ne&&!oe;if(K.keyCode===13&&ne){if(oe)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(Ve(Z)||Me||Le){var Fe=!!t.timeContainer&&t.timeContainer.contains(Z);switch(K.keyCode){case 13:Fe?(K.preventDefault(),a(),Ln()):ti(K);break;case 27:K.preventDefault(),Ln();break;case 8:case 46:ne&&!t.config.allowInput&&(K.preventDefault(),t.clear());break;case 37:case 39:if(!Fe&&!ne){K.preventDefault();var De=l();if(t.daysContainer!==void 0&&(oe===!1||De&&Ge(De))){var Je=K.keyCode===39?1:-1;K.ctrlKey?(K.stopPropagation(),Q(Je),F(I(1),0)):F(void 0,Je)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:K.preventDefault();var qe=K.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?K.ctrlKey?(K.stopPropagation(),we(t.currentYear-qe),F(I(1),0)):Fe||F(void 0,qe*7):Z===t.currentYearElement?we(t.currentYear-qe):t.config.enableTime&&(!Fe&&t.hourElement&&t.hourElement.focus(),a(K),t._debouncedChange());break;case 9:if(Fe){var We=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Cn){return Cn}),vt=We.indexOf(Z);if(vt!==-1){var ii=We[vt+(K.shiftKey?-1:1)];K.preventDefault(),(ii||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&K.shiftKey&&(K.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&Z===t.amPM)switch(K.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],d(),tn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],d(),tn();break}(ne||Ve(Z))&&Re("onKeyDown",K)}function Ke(K,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||K&&(!K.classList.contains(Z)||K.classList.contains("flatpickr-disabled")))){for(var ne=K?K.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Me=Math.min(ne,t.selectedDates[0].getTime()),Le=Math.max(ne,t.selectedDates[0].getTime()),Fe=!1,De=0,Je=0,qe=Me;qeMe&&qeDe)?De=qe:qe>oe&&(!Je||qe ."+Z));We.forEach(function(vt){var ii=vt.dateObj,Cn=ii.getTime(),Hs=De>0&&Cn0&&Cn>Je;if(Hs){vt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ms){vt.classList.remove(ms)});return}else if(Fe&&!Hs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ms){vt.classList.remove(ms)}),K!==void 0&&(K.classList.add(ne<=t.selectedDates[0].getTime()?"startRange":"endRange"),oene&&Cn===oe&&vt.classList.add("endRange"),Cn>=De&&(Je===0||Cn<=Je)&&OC(Cn,oe,ne)&&vt.classList.add("inRange"))})}}function Se(){t.isOpen&&!t.config.static&&!t.config.inline&&nt()}function ue(K,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(K){K.preventDefault();var ne=Tn(K);ne&&ne.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Re("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Re("onOpen"),nt(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(K===void 0||!t.timeContainer.contains(K.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function He(K){return function(Z){var ne=t.config["_"+K+"Date"]=t.parseDate(Z,t.config.dateFormat),oe=t.config["_"+(K==="min"?"max":"min")+"Date"];ne!==void 0&&(t[K==="min"?"minDateHasTime":"maxDateHasTime"]=ne.getHours()>0||ne.getMinutes()>0||ne.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Me){return Oe(Me)}),!t.selectedDates.length&&K==="min"&&p(ne),tn()),t.daysContainer&&(zt(),ne!==void 0?t.currentYearElement[K]=ne.getFullYear().toString():t.currentYearElement.removeAttribute(K),t.currentYearElement.disabled=!!oe&&ne!==void 0&&oe.getFullYear()===ne.getFullYear())}}function Et(){var K=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=sn(sn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ne={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(We){t.config._enable=ni(We)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(We){t.config._disable=ni(We)}});var oe=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||oe)){var Me=Wt.defaultConfig.dateFormat||Ts.dateFormat;ne.dateFormat=Z.noCalendar||oe?"H:i"+(Z.enableSeconds?":S":""):Me+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||oe)&&!Z.altFormat){var Le=Wt.defaultConfig.altFormat||Ts.altFormat;ne.altFormat=Z.noCalendar||oe?"h:i"+(Z.enableSeconds?":S K":" K"):Le+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:He("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:He("max")});var Fe=function(We){return function(vt){t.config[We==="min"?"_minTime":"_maxTime"]=t.parseDate(vt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Fe("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Fe("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ne,Z);for(var De=0;De-1?t.config[qe]=Dr(Je[qe]).map(o).concat(t.config[qe]):typeof Z[qe]>"u"&&(t.config[qe]=Je[qe])}Z.altInputClass||(t.config.altInputClass=Ne().className+" "+t.config.altInputClass),Re("onParseConfig")}function Ne(){return t.config.wrap?n.querySelector("[data-input]"):n}function Te(){typeof t.config.locale!="object"&&typeof Wt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=sn(sn({},Wt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Wt.l10ns[t.config.locale]:void 0),es.D="("+t.l10n.weekdays.shorthand.join("|")+")",es.l="("+t.l10n.weekdays.longhand.join("|")+")",es.M="("+t.l10n.months.shorthand.join("|")+")",es.F="("+t.l10n.months.longhand.join("|")+")",es.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var K=sn(sn({},e),JSON.parse(JSON.stringify(n.dataset||{})));K.time_24hr===void 0&&Wt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=db(t),t.parseDate=ha({config:t.config,l10n:t.l10n})}function nt(K){if(typeof t.config.position=="function")return void t.config.position(t,K);if(t.calendarContainer!==void 0){Re("onPreCalendarPosition");var Z=K||t._positionElement,ne=Array.prototype.reduce.call(t.calendarContainer.children,function(Cb,Tb){return Cb+Tb.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Me=t.config.position.split(" "),Le=Me[0],Fe=Me.length>1?Me[1]:null,De=Z.getBoundingClientRect(),Je=window.innerHeight-De.bottom,qe=Le==="above"||Le!=="below"&&Jene,We=window.pageYOffset+De.top+(qe?-ne-2:Z.offsetHeight+2);if(cn(t.calendarContainer,"arrowTop",!qe),cn(t.calendarContainer,"arrowBottom",qe),!t.config.inline){var vt=window.pageXOffset+De.left,ii=!1,Cn=!1;Fe==="center"?(vt-=(oe-De.width)/2,ii=!0):Fe==="right"&&(vt-=oe-De.width,Cn=!0),cn(t.calendarContainer,"arrowLeft",!ii&&!Cn),cn(t.calendarContainer,"arrowCenter",ii),cn(t.calendarContainer,"arrowRight",Cn);var Hs=window.document.body.offsetWidth-(window.pageXOffset+De.right),ms=vt+oe>window.document.body.offsetWidth,bb=Hs+oe>window.document.body.offsetWidth;if(cn(t.calendarContainer,"rightMost",ms),!t.config.static)if(t.calendarContainer.style.top=We+"px",!ms)t.calendarContainer.style.left=vt+"px",t.calendarContainer.style.right="auto";else if(!bb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Hs+"px";else{var tr=At();if(tr===void 0)return;var vb=window.document.body.offsetWidth,yb=Math.max(0,vb/2-oe/2),kb=".flatpickr-calendar.centerMost:before",wb=".flatpickr-calendar.centerMost:after",Sb=tr.cssRules.length,$b="{left:"+De.left+"px;right:auto;}";cn(t.calendarContainer,"rightMost",!1),cn(t.calendarContainer,"centerMost",!0),tr.insertRule(kb+","+wb+$b,Sb),t.calendarContainer.style.left=yb+"px",t.calendarContainer.style.right="auto"}}}}function At(){for(var K=null,Z=0;Zt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Me];else if(t.config.mode==="multiple"){var Fe=Ot(Me);Fe?t.selectedDates.splice(parseInt(Fe),1):t.selectedDates.push(Me)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Me,t.selectedDates.push(Me),Mn(Me,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(We,vt){return We.getTime()-vt.getTime()}));if(d(),Le){var De=t.currentYear!==Me.getFullYear();t.currentYear=Me.getFullYear(),t.currentMonth=Me.getMonth(),De&&(Re("onYearChange"),R()),Re("onMonthChange")}if(Fn(),N(),tn(),!Le&&t.config.mode!=="range"&&t.config.showMonths===1?O(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Je=t.config.mode==="single"&&!t.config.enableTime,qe=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Je||qe)&&Ln()}b()}}var Sn={locale:[Te,G],showMonths:[V,r,te],minDate:[$],maxDate:[$],positionElement:[pi],clickOpens:[function(){t.config.clickOpens===!0?(_(t._input,"focus",t.open),_(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ht(K,Z){if(K!==null&&typeof K=="object"){Object.assign(t.config,K);for(var ne in K)Sn[ne]!==void 0&&Sn[ne].forEach(function(oe){return oe()})}else t.config[K]=Z,Sn[K]!==void 0?Sn[K].forEach(function(oe){return oe()}):Or.indexOf(K)>-1&&(t.config[K]=Dr(Z));t.redraw(),tn(!0)}function Nn(K,Z){var ne=[];if(K instanceof Array)ne=K.map(function(oe){return t.parseDate(oe,Z)});else if(K instanceof Date||typeof K=="number")ne=[t.parseDate(K,Z)];else if(typeof K=="string")switch(t.config.mode){case"single":case"time":ne=[t.parseDate(K,Z)];break;case"multiple":ne=K.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,Z)});break;case"range":ne=K.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,Z)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(K)));t.selectedDates=t.config.allowInvalidPreload?ne:ne.filter(function(oe){return oe instanceof Date&&Oe(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Me){return oe.getTime()-Me.getTime()})}function ds(K,Z,ne){if(Z===void 0&&(Z=!1),ne===void 0&&(ne=t.config.dateFormat),K!==0&&!K||K instanceof Array&&K.length===0)return t.clear(Z);Nn(K,ne),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,Z),p(),t.selectedDates.length===0&&t.clear(!1),tn(Z),Z&&Re("onChange")}function ni(K){return K.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function Ti(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var K=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);K&&Nn(K,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ps(){if(t.input=Ne(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=ft(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),pi()}function pi(){t._positionElement=t.config.positionElement||t._input}function be(){var K=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ft("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=K,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=K==="datetime-local"?"Y-m-d\\TH:i:S":K==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}_(t.mobileInput,"change",function(Z){t.setDate(Tn(Z).value,!1,t.mobileFormatStr),Re("onChange"),Re("onClose")})}function Ie(K){if(t.isOpen===!0)return t.close();t.open(K)}function Re(K,Z){if(t.config!==void 0){var ne=t.config[K];if(ne!==void 0&&ne.length>0)for(var oe=0;ne[oe]&&oe=0&&Mn(K,t.selectedDates[1])<=0}function Fn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(K,Z){var ne=new Date(t.currentYear,t.currentMonth,1);ne.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=No(ne.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ne.getMonth().toString(),K.value=ne.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ui(K){var Z=K||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ne){return t.formatDate(ne,Z)}).filter(function(ne,oe,Me){return t.config.mode!=="range"||t.config.enableTime||Me.indexOf(ne)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function tn(K){K===void 0&&(K=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ui(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ui(t.config.altFormat)),K!==!1&&Re("onValueUpdate")}function fn(K){var Z=Tn(K),ne=t.prevMonthNav.contains(Z),oe=t.nextMonthNav.contains(Z);ne||oe?Q(ne?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(K){K.preventDefault();var Z=K.type==="keydown",ne=Tn(K),oe=ne;t.amPM!==void 0&&ne===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]);var Me=parseFloat(oe.getAttribute("min")),Le=parseFloat(oe.getAttribute("max")),Fe=parseFloat(oe.getAttribute("step")),De=parseInt(oe.value,10),Je=K.delta||(Z?K.which===38?1:-1:0),qe=De+Fe*Je;if(typeof oe.value<"u"&&oe.value.length===2){var We=oe===t.hourElement,vt=oe===t.minuteElement;qeLe&&(qe=oe===t.hourElement?qe-Le-Vn(!t.amPM):Me,vt&&C(void 0,1,t.hourElement)),t.amPM&&We&&(Fe===1?qe+De===23:Math.abs(qe-De)>Fe)&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=_n(qe)}}return s(),t}function Ms(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function FC(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:d=void 0}=e,{options:p={}}=e,m=!1,{input:g=void 0,flatpickr:_=void 0}=e;en(()=>{const C=f??g,D=k(p);return D.onReady.push((M,O,I)=>{a===void 0&&$(M,O,I),an().then(()=>{t(8,m=!0)})}),t(3,_=Wt(C,Object.assign(D,f?{wrap:!0}:{}))),()=>{_.destroy()}});const b=Tt();function k(C={}){C=Object.assign({},C);for(const D of r){const M=(O,I,L)=>{b(NC(D),[O,I,L])};D in C?(Array.isArray(C[D])||(C[D]=[C[D]]),C[D].push(M)):C[D]=[M]}return C.onChange&&!C.onChange.includes($)&&C.onChange.push($),C}function $(C,D,M){const O=sd(M,C);!ld(a,O)&&(a||O)&&t(2,a=O),t(4,u=D)}function T(C){ie[C?"unshift":"push"](()=>{g=C,t(0,g)})}return n.$$set=C=>{e=je(je({},e),Zt(C)),t(1,s=xe(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,d=C.dateFormat),"options"in C&&t(7,p=C.options),"input"in C&&t(0,g=C.input),"flatpickr"in C&&t(3,_=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&_&&m&&(ld(a,sd(_,_.selectedDates))||_.setDate(a,!0,d)),n.$$.dirty&392&&_&&m)for(const[C,D]of Object.entries(k(p)))_.set(C,D)},[g,s,a,_,u,f,d,p,m,o,l,T]}class au extends ye{constructor(e){super(),ve(this,e,FC,LC,_e,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function RC(n){let e,t,i,s,l,o,r,a;function u(p){n[6](p)}function f(p){n[7](p)}let d={id:n[19],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(d.value=n[2]),n[0].options.min!==void 0&&(d.formattedValue=n[0].options.min),l=new au({props:d}),ie.push(()=>he(l,"value",u)),ie.push(()=>he(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=y("label"),t=Y("Min date (UTC)"),s=E(),U(l.$$.fragment),h(e,"for",i=n[19])},m(p,m){S(p,e,m),v(e,t),S(p,s,m),z(l,p,m),a=!0},p(p,m){(!a||m&524288&&i!==(i=p[19]))&&h(e,"for",i);const g={};m&524288&&(g.id=p[19]),!o&&m&4&&(o=!0,g.value=p[2],ke(()=>o=!1)),!r&&m&1&&(r=!0,g.formattedValue=p[0].options.min,ke(()=>r=!1)),l.$set(g)},i(p){a||(A(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),B(l,p)}}}function qC(n){let e,t,i,s,l,o,r,a;function u(p){n[9](p)}function f(p){n[10](p)}let d={id:n[19],options:H.defaultFlatpickrOptions()};return n[3]!==void 0&&(d.value=n[3]),n[0].options.max!==void 0&&(d.formattedValue=n[0].options.max),l=new au({props:d}),ie.push(()=>he(l,"value",u)),ie.push(()=>he(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=y("label"),t=Y("Max date (UTC)"),s=E(),U(l.$$.fragment),h(e,"for",i=n[19])},m(p,m){S(p,e,m),v(e,t),S(p,s,m),z(l,p,m),a=!0},p(p,m){(!a||m&524288&&i!==(i=p[19]))&&h(e,"for",i);const g={};m&524288&&(g.id=p[19]),!o&&m&8&&(o=!0,g.value=p[3],ke(()=>o=!1)),!r&&m&1&&(r=!0,g.formattedValue=p[0].options.max,ke(()=>r=!1)),l.$set(g)},i(p){a||(A(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),B(l,p)}}}function jC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[RC,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[qC,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1572869&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&1572873&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function VC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[jC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),e.$on("drop",n[15]),e.$on("dragstart",n[16]),e.$on("dragenter",n[17]),e.$on("dragleave",n[18]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Gt(r[5])]):{};a&1048591&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function HC(n,e,t){var O,I;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=(O=l==null?void 0:l.options)==null?void 0:O.min,a=(I=l==null?void 0:l.options)==null?void 0:I.max;function u(L,F){L.detail&&L.detail.length==3&&t(0,l.options[F]=L.detail[1],l)}function f(L){r=L,t(2,r),t(0,l)}function d(L){n.$$.not_equal(l.options.min,L)&&(l.options.min=L,t(0,l))}const p=L=>u(L,"min");function m(L){a=L,t(3,a),t(0,l)}function g(L){n.$$.not_equal(l.options.max,L)&&(l.options.max=L,t(0,l))}const _=L=>u(L,"max");function b(L){l=L,t(0,l)}function k(L){me.call(this,n,L)}function $(L){me.call(this,n,L)}function T(L){me.call(this,n,L)}function C(L){me.call(this,n,L)}function D(L){me.call(this,n,L)}function M(L){me.call(this,n,L)}return n.$$set=L=>{e=je(je({},e),Zt(L)),t(5,s=xe(e,i)),"field"in L&&t(0,l=L.field),"key"in L&&t(1,o=L.key)},n.$$.update=()=>{var L,F,q,N;n.$$.dirty&5&&r!=((L=l==null?void 0:l.options)==null?void 0:L.min)&&t(2,r=(F=l==null?void 0:l.options)==null?void 0:F.min),n.$$.dirty&9&&a!=((q=l==null?void 0:l.options)==null?void 0:q.max)&&t(3,a=(N=l==null?void 0:l.options)==null?void 0:N.max)},[l,o,r,a,u,s,f,d,p,m,g,_,b,k,$,T,C,D,M]}class zC extends ye{constructor(e){super(),ve(this,e,HC,VC,_e,{field:0,key:1})}}const BC=n=>({}),od=n=>({});function rd(n,e,t){const i=n.slice();return i[47]=e[t],i}const UC=n=>({}),ad=n=>({});function ud(n,e,t){const i=n.slice();return i[47]=e[t],i[51]=t,i}function fd(n){let e,t,i;return{c(){e=y("div"),t=Y(n[2]),i=E(),h(e,"class","block txt-placeholder"),x(e,"link-hint",!n[5]&&!n[6])},m(s,l){S(s,e,l),v(e,t),v(e,i)},p(s,l){l[0]&4&&le(t,s[2]),l[0]&96&&x(e,"link-hint",!s[5]&&!s[6])},d(s){s&&w(e)}}}function WC(n){let e,t=n[47]+"",i;return{c(){e=y("span"),i=Y(t),h(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&1&&t!==(t=s[47]+"")&&le(i,t)},i:X,o:X,d(s){s&&w(e)}}}function YC(n){let e,t,i;const s=[{item:n[47]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{B(f,1)}),ae()}l?(e=Nt(l,o()),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function cd(n){let e,t,i;function s(){return n[35](n[47])}return{c(){e=y("span"),e.innerHTML='',h(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Ee(Ye.call(null,e,"Clear")),J(e,"click",An(at(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ae(i)}}}function dd(n){let e,t,i,s,l,o;const r=[YC,WC],a=[];function u(d,p){return d[9]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[7])&&cd(n);return{c(){e=y("div"),i.c(),s=E(),f&&f.c(),l=E(),h(e,"class","option")},m(d,p){S(d,e,p),a[t].m(e,null),v(e,s),f&&f.m(e,null),v(e,l),o=!0},p(d,p){let m=t;t=u(d),t===m?a[t].p(d,p):(re(),P(a[m],1,1,()=>{a[m]=null}),ae(),i=a[t],i?i.p(d,p):(i=a[t]=r[t](d),i.c()),A(i,1),i.m(e,s)),d[4]||d[7]?f?f.p(d,p):(f=cd(d),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(d){o||(A(i),o=!0)},o(d){P(i),o=!1},d(d){d&&w(e),a[t].d(),f&&f.d()}}}function pd(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[19],$$slots:{default:[ZC]},$$scope:{ctx:n}};return e=new ei({props:i}),n[40](e),e.$on("show",n[25]),e.$on("hide",n[41]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,l){const o={};l[0]&524288&&(o.trigger=s[19]),l[0]&3225866|l[1]&4096&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[40](null),B(e,s)}}}function md(n){let e,t,i,s,l,o,r,a,u=n[16].length&&hd(n);return{c(){e=y("div"),t=y("label"),i=y("div"),i.innerHTML='',s=E(),l=y("input"),o=E(),u&&u.c(),h(i,"class","addon p-r-0"),l.autofocus=!0,h(l,"type","text"),h(l,"placeholder",n[3]),h(t,"class","input-group"),h(e,"class","form-field form-field-sm options-search")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(t,s),v(t,l),fe(l,n[16]),v(t,o),u&&u.m(t,null),l.focus(),r||(a=J(l,"input",n[37]),r=!0)},p(f,d){d[0]&8&&h(l,"placeholder",f[3]),d[0]&65536&&l.value!==f[16]&&fe(l,f[16]),f[16].length?u?u.p(f,d):(u=hd(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function hd(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","btn btn-sm btn-circle btn-transparent clear"),h(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",An(at(n[22]))),i=!0)},p:X,d(l){l&&w(e),i=!1,s()}}}function _d(n){let e,t=n[1]&&gd(n);return{c(){t&&t.c(),e=Ce()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=gd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function gd(n){let e,t;return{c(){e=y("div"),t=Y(n[1]),h(e,"class","txt-missing")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s[0]&2&&le(t,i[1])},d(i){i&&w(e)}}}function KC(n){let e=n[47]+"",t;return{c(){t=Y(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&2097152&&e!==(e=i[47]+"")&&le(t,e)},i:X,o:X,d(i){i&&w(t)}}}function JC(n){let e,t,i;const s=[{item:n[47]},n[12]];var l=n[11];function o(r){let a={};for(let u=0;u{B(f,1)}),ae()}l?(e=Nt(l,o()),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function bd(n){let e,t,i,s,l,o,r;const a=[JC,KC],u=[];function f(m,g){return m[11]?0:1}t=f(n),i=u[t]=a[t](n);function d(...m){return n[38](n[47],...m)}function p(...m){return n[39](n[47],...m)}return{c(){e=y("div"),i.c(),s=E(),h(e,"tabindex","0"),h(e,"class","dropdown-item option"),x(e,"closable",n[8]),x(e,"selected",n[20](n[47]))},m(m,g){S(m,e,g),u[t].m(e,null),v(e,s),l=!0,o||(r=[J(e,"click",d),J(e,"keydown",p)],o=!0)},p(m,g){n=m;let _=t;t=f(n),t===_?u[t].p(n,g):(re(),P(u[_],1,1,()=>{u[_]=null}),ae(),i=u[t],i?i.p(n,g):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||g[0]&256)&&x(e,"closable",n[8]),(!l||g[0]&3145728)&&x(e,"selected",n[20](n[47]))},i(m){l||(A(i),l=!0)},o(m){P(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Ae(r)}}}function ZC(n){let e,t,i,s,l,o=n[13]&&md(n);const r=n[34].beforeOptions,a=wt(r,n,n[43],ad);let u=n[21],f=[];for(let _=0;_P(f[_],1,1,()=>{f[_]=null});let p=null;u.length||(p=_d(n));const m=n[34].afterOptions,g=wt(m,n,n[43],od);return{c(){o&&o.c(),e=E(),a&&a.c(),t=E(),i=y("div");for(let _=0;_P(a[p],1,1,()=>{a[p]=null});let f=null;r.length||(f=fd(n));let d=!n[5]&&!n[6]&&pd(n);return{c(){e=y("div"),t=y("div");for(let p=0;p{d=null}),ae()),(!o||m[0]&16384&&l!==(l="select "+p[14]))&&h(e,"class",l),(!o||m[0]&16400)&&x(e,"multiple",p[4]),(!o||m[0]&16416)&&x(e,"disabled",p[5]),(!o||m[0]&16448)&&x(e,"readonly",p[6])},i(p){if(!o){for(let m=0;mEt(Ne,He))||[]}function se(ue,He){ue.preventDefault(),b&&p?V(He):j(He)}function ge(ue,He){(ue.code==="Enter"||ue.code==="Space")&&se(ue,He)}function $e(){ce(),setTimeout(()=>{const ue=q==null?void 0:q.querySelector(".dropdown-item.option.selected");ue&&(ue.focus(),ue.scrollIntoView({block:"nearest"}))},0)}function Ve(ue){ue.stopPropagation(),!g&&!m&&(L==null||L.toggle())}en(()=>{const ue=document.querySelectorAll(`label[for="${r}"]`);for(const He of ue)He.addEventListener("click",Ve);return()=>{for(const He of ue)He.removeEventListener("click",Ve)}});const Be=ue=>R(ue);function we(ue){ie[ue?"unshift":"push"](()=>{N=ue,t(19,N)})}function Oe(){F=this.value,t(16,F)}const Ge=(ue,He)=>se(He,ue),mt=(ue,He)=>ge(He,ue);function Xe(ue){ie[ue?"unshift":"push"](()=>{L=ue,t(17,L)})}function Ke(ue){me.call(this,n,ue)}function Se(ue){ie[ue?"unshift":"push"](()=>{q=ue,t(18,q)})}return n.$$set=ue=>{"id"in ue&&t(26,r=ue.id),"noOptionsText"in ue&&t(1,a=ue.noOptionsText),"selectPlaceholder"in ue&&t(2,u=ue.selectPlaceholder),"searchPlaceholder"in ue&&t(3,f=ue.searchPlaceholder),"items"in ue&&t(27,d=ue.items),"multiple"in ue&&t(4,p=ue.multiple),"disabled"in ue&&t(5,m=ue.disabled),"readonly"in ue&&t(6,g=ue.readonly),"selected"in ue&&t(0,_=ue.selected),"toggle"in ue&&t(7,b=ue.toggle),"closable"in ue&&t(8,k=ue.closable),"labelComponent"in ue&&t(9,$=ue.labelComponent),"labelComponentProps"in ue&&t(10,T=ue.labelComponentProps),"optionComponent"in ue&&t(11,C=ue.optionComponent),"optionComponentProps"in ue&&t(12,D=ue.optionComponentProps),"searchable"in ue&&t(13,M=ue.searchable),"searchFunc"in ue&&t(28,O=ue.searchFunc),"class"in ue&&t(14,I=ue.class),"$$scope"in ue&&t(43,o=ue.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&134217728&&d&&(G(),ce()),n.$$.dirty[0]&134283264&&t(21,i=Q(d,F)),n.$$.dirty[0]&1&&t(20,s=function(ue){const He=H.toArray(_);return H.inArray(He,ue)})},[_,a,u,f,p,m,g,b,k,$,T,C,D,M,I,R,F,L,q,N,s,i,ce,se,ge,$e,r,d,O,j,V,W,ee,te,l,Be,we,Oe,Ge,mt,Xe,Ke,Se,o]}class uu extends ye{constructor(e){super(),ve(this,e,QC,GC,_e,{id:26,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:27,multiple:4,disabled:5,readonly:6,selected:0,toggle:7,closable:8,labelComponent:9,labelComponentProps:10,optionComponent:11,optionComponentProps:12,searchable:13,searchFunc:28,class:14,deselectItem:15,selectItem:29,toggleItem:30,reset:31,showDropdown:32,hideDropdown:33},null,[-1,-1])}get deselectItem(){return this.$$.ctx[15]}get selectItem(){return this.$$.ctx[29]}get toggleItem(){return this.$$.ctx[30]}get reset(){return this.$$.ctx[31]}get showDropdown(){return this.$$.ctx[32]}get hideDropdown(){return this.$$.ctx[33]}}function vd(n){let e,t;return{c(){e=y("i"),h(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&h(e,"class",t)},d(i){i&&w(e)}}}function xC(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&vd(n);return{c(){l&&l.c(),e=E(),t=y("span"),s=Y(i),h(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),v(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=vd(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&le(s,i)},i:X,o:X,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function eT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class yd extends ye{constructor(e){super(),ve(this,e,eT,xC,_e,{item:0})}}const tT=n=>({}),kd=n=>({});function nT(n){let e;const t=n[8].afterOptions,i=wt(t,n,n[12],kd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&$t(i,t,s,s[12],e?St(t,s[12],l,tT):Ct(s[12]),kd)},i(s){e||(A(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function iT(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[nT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&62?Mt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Gt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function sT(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=yd}=e,{optionComponent:d=yd}=e,{selectionKey:p="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function g(T){T=H.toArray(T,!0);let C=[];for(let D of T){const M=H.findByKey(r,p,D);M&&C.push(M)}T.length&&!C.length||t(0,u=a?C:C[0])}async function _(T){let C=H.toArray(T,!0).map(D=>D[p]);r.length&&t(6,m=a?C:C[0])}function b(T){u=T,t(0,u)}function k(T){me.call(this,n,T)}function $(T){me.call(this,n,T)}return n.$$set=T=>{e=je(je({},e),Zt(T)),t(5,s=xe(e,i)),"items"in T&&t(1,r=T.items),"multiple"in T&&t(2,a=T.multiple),"selected"in T&&t(0,u=T.selected),"labelComponent"in T&&t(3,f=T.labelComponent),"optionComponent"in T&&t(4,d=T.optionComponent),"selectionKey"in T&&t(7,p=T.selectionKey),"keyOfSelected"in T&&t(6,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&g(m),n.$$.dirty&1&&_(u)},[u,r,a,f,d,s,m,p,l,b,k,$,o]}class zi extends ye{constructor(e){super(),ve(this,e,sT,iT,_e,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function lT(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[17],placeholder:"Choices: eg. optionA, optionB",required:!0,readonly:!n[18]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Vs({props:a}),ie.push(()=>he(t,"value",r)),{c(){e=y("div"),U(t.$$.fragment)},m(u,f){S(u,e,f),z(t,e,null),s=!0,l||(o=Ee(Ye.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const d={};f&131072&&(d.id=u[17]),f&262144&&(d.readonly=!u[18]),!i&&f&1&&(i=!0,d.value=u[0].options.values,ke(()=>i=!1)),t.$set(d)},i(u){s||(A(t.$$.fragment,u),s=!0)},o(u){P(t.$$.fragment,u),s=!1},d(u){u&&w(e),B(t),l=!1,o()}}}function oT(n){let e,t,i;function s(o){n[8](o)}let l={id:n[17],items:n[3],readonly:!n[18]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new zi({props:l}),ie.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&131072&&(a.id=o[17]),r&262144&&(a.readonly=!o[18]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function rT(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field required "+(n[18]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[lT,({uniqueId:d})=>({17:d}),({uniqueId:d})=>d?131072:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field form-field-single-multiple-select "+(n[18]?"":"readonly"),inlineError:!0,$$slots:{default:[oT,({uniqueId:d})=>({17:d}),({uniqueId:d})=>d?131072:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),U(i.$$.fragment),s=E(),l=y("div"),o=E(),U(r.$$.fragment),a=E(),u=y("div"),h(e,"class","separator"),h(l,"class","separator"),h(u,"class","separator")},m(d,p){S(d,e,p),S(d,t,p),z(i,d,p),S(d,s,p),S(d,l,p),S(d,o,p),z(r,d,p),S(d,a,p),S(d,u,p),f=!0},p(d,p){const m={};p&262144&&(m.class="form-field required "+(d[18]?"":"readonly")),p&2&&(m.name="schema."+d[1]+".options.values"),p&917505&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const g={};p&262144&&(g.class="form-field form-field-single-multiple-select "+(d[18]?"":"readonly")),p&917508&&(g.$$scope={dirty:p,ctx:d}),r.$set(g)},i(d){f||(A(i.$$.fragment,d),A(r.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(r.$$.fragment,d),f=!1},d(d){d&&w(e),d&&w(t),B(i,d),d&&w(s),d&&w(l),d&&w(o),B(r,d),d&&w(a),d&&w(u)}}}function wd(n){let e,t;return e=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[aT,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&655361&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function aT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Max select"),s=E(),l=y("input"),h(e,"for",i=n[17]),h(l,"id",o=n[17]),h(l,"type","number"),h(l,"step","1"),h(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.maxSelect),r||(a=J(l,"input",n[6]),r=!0)},p(u,f){f&131072&&i!==(i=u[17])&&h(e,"for",i),f&131072&&o!==(o=u[17])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.maxSelect&&fe(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function uT(n){let e,t,i=!n[2]&&wd(n);return{c(){i&&i.c(),e=Ce()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,l){s[2]?i&&(re(),P(i,1,1,()=>{i=null}),ae()):i?(i.p(s,l),l&4&&A(i,1)):(i=wd(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function fT(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[uT],default:[rT,({interactive:r})=>({18:r}),({interactive:r})=>r?262144:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),e.$on("drop",n[12]),e.$on("dragstart",n[13]),e.$on("dragenter",n[14]),e.$on("dragleave",n[15]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&18?Mt(s,[a&2&&{key:r[1]},a&16&&Gt(r[4])]):{};a&786439&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function cT(n,e,t){var D;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((D=l.options)==null?void 0:D.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function d(){l.options.maxSelect=gt(this.value),t(0,l),t(5,u),t(2,a)}function p(M){n.$$.not_equal(l.options.values,M)&&(l.options.values=M,t(0,l),t(5,u),t(2,a))}function m(M){a=M,t(2,a)}function g(M){l=M,t(0,l),t(5,u),t(2,a)}function _(M){me.call(this,n,M)}function b(M){me.call(this,n,M)}function k(M){me.call(this,n,M)}function $(M){me.call(this,n,M)}function T(M){me.call(this,n,M)}function C(M){me.call(this,n,M)}return n.$$set=M=>{e=je(je({},e),Zt(M)),t(4,s=xe(e,i)),"field"in M&&t(0,l=M.field),"key"in M&&t(1,o=M.key)},n.$$.update=()=>{var M,O;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((O=(M=l.options)==null?void 0:M.values)==null?void 0:O.length)||2,l)),n.$$.dirty&1&&H.isEmpty(l.options)&&f()},[l,o,a,r,s,u,d,p,m,g,_,b,k,$,T,C]}class dT extends ye{constructor(e){super(),ve(this,e,cT,fT,_e,{field:0,key:1})}}function pT(n){let e;return{c(){e=y("i"),h(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function mT(n){let e;return{c(){e=y("i"),h(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Sd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O='"{"a":1,"b":2}"',I,L,F,q,N,R,j,V,W,ee,te,G,ce;return{c(){e=y("div"),t=y("div"),i=y("div"),s=Y("In order to support seamlessly both "),l=y("code"),l.textContent="application/json",o=Y(` and - `),r=y("code"),r.textContent="multipart/form-data",a=Y(` - requests, the following normalization rules are applied if the `),u=y("code"),u.textContent="json",f=Y(` field - is a - `),d=y("strong"),d.textContent="plain string",p=Y(`: - `),m=y("ul"),g=y("li"),g.innerHTML=""true" is converted to the json true",_=E(),b=y("li"),b.innerHTML=""false" is converted to the json false",k=E(),$=y("li"),$.innerHTML=""null" is converted to the json null",T=E(),C=y("li"),C.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",D=E(),M=y("li"),I=Y(O),L=Y(" is converted to the json "),F=y("code"),F.textContent='{"a":1,"b":2}',q=E(),N=y("li"),N.textContent="numeric strings are converted to json number",R=E(),j=y("li"),j.textContent="double quoted strings are left as they are (aka. without normalizations)",V=E(),W=y("li"),W.textContent="any other string (empty string too) is double quoted",ee=Y(` - Alternatively, if you want to avoid the string value normalizations, you can wrap your - data inside an object, eg.`),te=y("code"),te.textContent='{"data": anything}',h(i,"class","content"),h(t,"class","alert alert-warning m-b-0 m-t-10"),h(e,"class","block")},m(Q,se){S(Q,e,se),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(i,r),v(i,a),v(i,u),v(i,f),v(i,d),v(i,p),v(i,m),v(m,g),v(m,_),v(m,b),v(m,k),v(m,$),v(m,T),v(m,C),v(m,D),v(m,M),v(M,I),v(M,L),v(M,F),v(m,q),v(m,N),v(m,R),v(m,j),v(m,V),v(m,W),v(i,ee),v(i,te),ce=!0},i(Q){ce||(Q&&tt(()=>{ce&&(G||(G=ze(e,bt,{duration:150},!0)),G.run(1))}),ce=!0)},o(Q){Q&&(G||(G=ze(e,bt,{duration:150},!1)),G.run(0)),ce=!1},d(Q){Q&&w(e),Q&&G&&G.end()}}}function hT(n){let e,t,i,s,l,o,r;function a(p,m){return p[2]?mT:pT}let u=a(n),f=u(n),d=n[2]&&Sd();return{c(){e=y("button"),t=y("strong"),t.textContent="String value normalizations",i=E(),f.c(),s=E(),d&&d.c(),l=Ce(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(p,m){S(p,e,m),v(e,t),v(e,i),f.m(e,null),S(p,s,m),d&&d.m(p,m),S(p,l,m),o||(r=J(e,"click",n[4]),o=!0)},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(e,null))),p[2]?d?m&4&&A(d,1):(d=Sd(),d.c(),A(d,1),d.m(l.parentNode,l)):d&&(re(),P(d,1,1,()=>{d=null}),ae())},d(p){p&&w(e),f.d(),p&&w(s),d&&d.d(p),p&&w(l),o=!1,r()}}}function _T(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[hT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&10?Mt(s,[a&2&&{key:r[1]},a&8&&Gt(r[3])]):{};a&4100&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function gT(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Zt(b)),t(3,s=xe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,r,s,a,u,f,d,p,m,g,_]}class bT extends ye{constructor(e){super(),ve(this,e,gT,_T,_e,{field:0,key:1})}}function vT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=y("span"),i=Y(t),s=E(),l=y("small"),r=Y(o),h(e,"class","txt"),h(l,"class","txt-hint")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),S(a,l,u),v(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&le(i,t),u&1&&o!==(o=a[0].mimeType+"")&&le(r,o)},i:X,o:X,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function yT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class $d extends ye{constructor(e){super(),ve(this,e,yT,vT,_e,{item:0})}}const kT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function wT(n){let e,t,i;function s(o){n[16](o)}let l={id:n[26],items:n[4],readonly:!n[27]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new zi({props:l}),ie.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&67108864&&(a.id=o[26]),r&134217728&&(a.readonly=!o[27]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function ST(n){let e,t,i,s,l,o;return i=new de({props:{class:"form-field form-field-single-multiple-select "+(n[27]?"":"readonly"),inlineError:!0,$$slots:{default:[wT,({uniqueId:r})=>({26:r}),({uniqueId:r})=>r?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),U(i.$$.fragment),s=E(),l=y("div"),h(e,"class","separator"),h(l,"class","separator")},m(r,a){S(r,e,a),S(r,t,a),z(i,r,a),S(r,s,a),S(r,l,a),o=!0},p(r,a){const u={};a&134217728&&(u.class="form-field form-field-single-multiple-select "+(r[27]?"":"readonly")),a&469762052&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(A(i.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),B(i,r),r&&w(s),r&&w(l)}}}function $T(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=E(),i=y("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=E(),l=y("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=E(),r=y("button"),r.innerHTML='Archives (zip, 7zip, rar)',h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item closable"),h(r,"type","button"),h(r,"class","dropdown-item closable")},m(f,d){S(f,e,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),S(f,o,d),S(f,r,d),a||(u=[J(e,"click",n[9]),J(i,"click",n[10]),J(l,"click",n[11]),J(r,"click",n[12])],a=!0)},p:X,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Ae(u)}}}function CT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T;function C(M){n[8](M)}let D={id:n[26],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:$d,optionComponent:$d};return n[0].options.mimeTypes!==void 0&&(D.keyOfSelected=n[0].options.mimeTypes),r=new zi({props:D}),ie.push(()=>he(r,"keyOfSelected",C)),b=new ei({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[$T]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Allowed mime types",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),d=y("button"),p=y("span"),p.textContent="Choose presets",m=E(),g=y("i"),_=E(),U(b.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[26]),h(p,"class","txt link-primary"),h(g,"class","ri-arrow-drop-down-fill"),h(d,"type","button"),h(d,"class","inline-flex flex-gap-0"),h(f,"class","help-block")},m(M,O){S(M,e,O),v(e,t),v(e,i),v(e,s),S(M,o,O),z(r,M,O),S(M,u,O),S(M,f,O),v(f,d),v(d,p),v(d,m),v(d,g),v(d,_),z(b,d,null),k=!0,$||(T=Ee(Ye.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),$=!0)},p(M,O){(!k||O&67108864&&l!==(l=M[26]))&&h(e,"for",l);const I={};O&67108864&&(I.id=M[26]),O&8&&(I.items=M[3]),!a&&O&1&&(a=!0,I.keyOfSelected=M[0].options.mimeTypes,ke(()=>a=!1)),r.$set(I);const L={};O&268435457&&(L.$$scope={dirty:O,ctx:M}),b.$set(L)},i(M){k||(A(r.$$.fragment,M),A(b.$$.fragment,M),k=!0)},o(M){P(r.$$.fragment,M),P(b.$$.fragment,M),k=!1},d(M){M&&w(e),M&&w(o),B(r,M),M&&w(u),M&&w(f),B(b),$=!1,T()}}}function TT(n){let e;return{c(){e=y("ul"),e.innerHTML=`
  • WxH - (eg. 100x50) - crop to WxH viewbox (from center)
  • -
  • WxHt - (eg. 100x50t) - crop to WxH viewbox (from top)
  • -
  • WxHb - (eg. 100x50b) - crop to WxH viewbox (from bottom)
  • -
  • WxHf - (eg. 100x50f) - fit inside a WxH viewbox (without cropping)
  • -
  • 0xH - (eg. 0x50) - resize to H height preserving the aspect ratio
  • -
  • Wx0 - (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,h(e,"class","m-0")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function MT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D;function M(I){n[13](I)}let O={id:n[26],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new Vs({props:O}),ie.push(()=>he(r,"value",M)),$=new ei({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[TT]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Thumb sizes",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),d=y("span"),d.textContent="Use comma as separator.",p=E(),m=y("button"),g=y("span"),g.textContent="Supported formats",_=E(),b=y("i"),k=E(),U($.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[26]),h(d,"class","txt"),h(g,"class","txt link-primary"),h(b,"class","ri-arrow-drop-down-fill"),h(m,"type","button"),h(m,"class","inline-flex flex-gap-0"),h(f,"class","help-block")},m(I,L){S(I,e,L),v(e,t),v(e,i),v(e,s),S(I,o,L),z(r,I,L),S(I,u,L),S(I,f,L),v(f,d),v(f,p),v(f,m),v(m,g),v(m,_),v(m,b),v(m,k),z($,m,null),T=!0,C||(D=Ee(Ye.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(I,L){(!T||L&67108864&&l!==(l=I[26]))&&h(e,"for",l);const F={};L&67108864&&(F.id=I[26]),!a&&L&1&&(a=!0,F.value=I[0].options.thumbs,ke(()=>a=!1)),r.$set(F);const q={};L&268435456&&(q.$$scope={dirty:L,ctx:I}),$.$set(q)},i(I){T||(A(r.$$.fragment,I),A($.$$.fragment,I),T=!0)},o(I){P(r.$$.fragment,I),P($.$$.fragment,I),T=!1},d(I){I&&w(e),I&&w(o),B(r,I),I&&w(u),I&&w(f),B($),C=!1,D()}}}function OT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Max file size"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Must be in bytes.",h(e,"for",i=n[26]),h(l,"type","number"),h(l,"id",o=n[26]),h(l,"step","1"),h(l,"min","0"),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[0].options.maxSize),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[14]),u=!0)},p(d,p){p&67108864&&i!==(i=d[26])&&h(e,"for",i),p&67108864&&o!==(o=d[26])&&h(l,"id",o),p&1&>(l.value)!==d[0].options.maxSize&&fe(l,d[0].options.maxSize)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Cd(n){let e,t,i;return t=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[DT,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","col-sm-3")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function DT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Max select"),s=E(),l=y("input"),h(e,"for",i=n[26]),h(l,"id",o=n[26]),h(l,"type","number"),h(l,"step","1"),h(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.maxSelect),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&67108864&&i!==(i=u[26])&&h(e,"for",i),f&67108864&&o!==(o=u[26])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.maxSelect&&fe(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ET(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[CT,({uniqueId:_})=>({26:_}),({uniqueId:_})=>_?67108864:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[MT,({uniqueId:_})=>({26:_}),({uniqueId:_})=>_?67108864:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[OT,({uniqueId:_})=>({26:_}),({uniqueId:_})=>_?67108864:0]},$$scope:{ctx:n}}});let g=!n[2]&&Cd(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),a=E(),u=y("div"),U(f.$$.fragment),p=E(),g&&g.c(),h(t,"class","col-sm-12"),h(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),h(u,"class",d=n[2]?"col-sm-4":"col-sm-3"),h(e,"class","grid grid-sm")},m(_,b){S(_,e,b),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,a),v(e,u),z(f,u,null),v(e,p),g&&g.m(e,null),m=!0},p(_,b){const k={};b&2&&(k.name="schema."+_[1]+".options.mimeTypes"),b&335544329&&(k.$$scope={dirty:b,ctx:_}),i.$set(k);const $={};b&2&&($.name="schema."+_[1]+".options.thumbs"),b&335544321&&($.$$scope={dirty:b,ctx:_}),o.$set($),(!m||b&4&&r!==(r=_[2]?"col-sm-8":"col-sm-6"))&&h(l,"class",r);const T={};b&2&&(T.name="schema."+_[1]+".options.maxSize"),b&335544321&&(T.$$scope={dirty:b,ctx:_}),f.$set(T),(!m||b&4&&d!==(d=_[2]?"col-sm-4":"col-sm-3"))&&h(u,"class",d),_[2]?g&&(re(),P(g,1,1,()=>{g=null}),ae()):g?(g.p(_,b),b&4&&A(g,1)):(g=Cd(_),g.c(),A(g,1),g.m(e,null))},i(_){m||(A(i.$$.fragment,_),A(o.$$.fragment,_),A(f.$$.fragment,_),A(g),m=!0)},o(_){P(i.$$.fragment,_),P(o.$$.fragment,_),P(f.$$.fragment,_),P(g),m=!1},d(_){_&&w(e),B(i),B(o),B(f),g&&g.d()}}}function AT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Protected",r=E(),a=y("a"),a.textContent="(Learn more)",h(e,"type","checkbox"),h(e,"id",t=n[26]),h(l,"class","txt"),h(s,"for",o=n[26]),h(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),h(a,"class","toggle-info txt-sm txt-hint m-l-5"),h(a,"target","_blank"),h(a,"rel","noopener")},m(d,p){S(d,e,p),e.checked=n[0].options.protected,S(d,i,p),S(d,s,p),v(s,l),S(d,r,p),S(d,a,p),u||(f=J(e,"change",n[7]),u=!0)},p(d,p){p&67108864&&t!==(t=d[26])&&h(e,"id",t),p&1&&(e.checked=d[0].options.protected),p&67108864&&o!==(o=d[26])&&h(s,"for",o)},d(d){d&&w(e),d&&w(i),d&&w(s),d&&w(r),d&&w(a),u=!1,f()}}}function IT(n){let e,t,i;return t=new de({props:{class:"form-field form-field-toggle m-0",name:"schema."+n[1]+".options.protected",$$slots:{default:[AT,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","col-sm-4")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.protected"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function PT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{afterNonempty:[IT],options:[ET],default:[ST,({interactive:r})=>({27:r}),({interactive:r})=>r?134217728:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),e.$on("drop",n[20]),e.$on("dragstart",n[21]),e.$on("dragenter",n[22]),e.$on("dragleave",n[23]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Gt(r[5])]):{};a&402653199&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function LT(n,e,t){var j;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=kT.slice(),u=((j=l.options)==null?void 0:j.maxSelect)<=1,f=u;function d(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function p(){if(H.isEmpty(l.options.mimeTypes))return;const V=[];for(const W of l.options.mimeTypes)a.find(ee=>ee.mimeType===W)||V.push({mimeType:W});V.length&&t(3,a=a.concat(V))}function m(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function g(V){n.$$.not_equal(l.options.mimeTypes,V)&&(l.options.mimeTypes=V,t(0,l),t(6,f),t(2,u))}const _=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},b=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},k=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},$=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function T(V){n.$$.not_equal(l.options.thumbs,V)&&(l.options.thumbs=V,t(0,l),t(6,f),t(2,u))}function C(){l.options.maxSize=gt(this.value),t(0,l),t(6,f),t(2,u)}function D(){l.options.maxSelect=gt(this.value),t(0,l),t(6,f),t(2,u)}function M(V){u=V,t(2,u)}function O(V){l=V,t(0,l),t(6,f),t(2,u)}function I(V){me.call(this,n,V)}function L(V){me.call(this,n,V)}function F(V){me.call(this,n,V)}function q(V){me.call(this,n,V)}function N(V){me.call(this,n,V)}function R(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Zt(V)),t(5,s=xe(e,i)),"field"in V&&t(0,l=V.field),"key"in V&&t(1,o=V.key)},n.$$.update=()=>{var V,W;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((W=(V=l.options)==null?void 0:V.values)==null?void 0:W.length)||99,l)),n.$$.dirty&1&&(H.isEmpty(l.options)?d():p())},[l,o,u,a,r,s,f,m,g,_,b,k,$,T,C,D,M,O,I,L,F,q,N,R]}class NT extends ye{constructor(e){super(),ve(this,e,LT,PT,_e,{field:0,key:1})}}function FT(n){let e,t,i,s,l;return{c(){e=y("hr"),t=E(),i=y("button"),i.innerHTML=` - New collection`,h(i,"type","button"),h(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=J(i,"click",n[17]),s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function RT(n){let e,t,i;function s(o){n[18](o)}let l={id:n[33],searchable:n[3].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[3],readonly:!n[34]||n[0].id,$$slots:{afterOptions:[FT]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new zi({props:l}),ie.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[0]&8&&(a.searchable=o[3].length>5),r[0]&8&&(a.items=o[3]),r[0]&1|r[1]&8&&(a.readonly=!o[34]||o[0].id),r[0]&16|r[1]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function qT(n){let e,t,i;function s(o){n[19](o)}let l={id:n[33],items:n[8],readonly:!n[34]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new zi({props:l}),ie.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[1]&8&&(a.readonly=!o[34]),!t&&r[0]&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function jT(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field required "+(n[34]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[RT,({uniqueId:d})=>({33:d}),({uniqueId:d})=>[0,d?4:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field form-field-single-multiple-select "+(n[34]?"":"readonly"),inlineError:!0,$$slots:{default:[qT,({uniqueId:d})=>({33:d}),({uniqueId:d})=>[0,d?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),U(i.$$.fragment),s=E(),l=y("div"),o=E(),U(r.$$.fragment),a=E(),u=y("div"),h(e,"class","separator"),h(l,"class","separator"),h(u,"class","separator")},m(d,p){S(d,e,p),S(d,t,p),z(i,d,p),S(d,s,p),S(d,l,p),S(d,o,p),z(r,d,p),S(d,a,p),S(d,u,p),f=!0},p(d,p){const m={};p[1]&8&&(m.class="form-field required "+(d[34]?"":"readonly")),p[0]&2&&(m.name="schema."+d[1]+".options.collectionId"),p[0]&25|p[1]&28&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const g={};p[1]&8&&(g.class="form-field form-field-single-multiple-select "+(d[34]?"":"readonly")),p[0]&4|p[1]&28&&(g.$$scope={dirty:p,ctx:d}),r.$set(g)},i(d){f||(A(i.$$.fragment,d),A(r.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(r.$$.fragment,d),f=!1},d(d){d&&w(e),d&&w(t),B(i,d),d&&w(s),d&&w(l),d&&w(o),B(r,d),d&&w(a),d&&w(u)}}}function Td(n){let e,t,i,s,l,o;return t=new de({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[VT,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[HT,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),i=E(),s=y("div"),U(l.$$.fragment),h(e,"class","col-sm-6"),h(s,"class","col-sm-6")},m(r,a){S(r,e,a),z(t,e,null),S(r,i,a),S(r,s,a),z(l,s,null),o=!0},p(r,a){const u={};a[0]&2&&(u.name="schema."+r[1]+".options.minSelect"),a[0]&1|a[1]&20&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&2&&(f.name="schema."+r[1]+".options.maxSelect"),a[0]&1|a[1]&20&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(t.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(t.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(t),r&&w(i),r&&w(s),B(l)}}}function VT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Min select"),s=E(),l=y("input"),h(e,"for",i=n[33]),h(l,"type","number"),h(l,"id",o=n[33]),h(l,"step","1"),h(l,"min","1"),h(l,"placeholder","No min limit")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.minSelect),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&4&&i!==(i=u[33])&&h(e,"for",i),f[1]&4&&o!==(o=u[33])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].options.minSelect&&fe(l,u[0].options.minSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Max select"),s=E(),l=y("input"),h(e,"for",i=n[33]),h(l,"type","number"),h(l,"id",o=n[33]),h(l,"step","1"),h(l,"placeholder","No max limit"),h(l,"min",r=n[0].options.minSelect||2)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.maxSelect),a||(u=J(l,"input",n[14]),a=!0)},p(f,d){d[1]&4&&i!==(i=f[33])&&h(e,"for",i),d[1]&4&&o!==(o=f[33])&&h(l,"id",o),d[0]&1&&r!==(r=f[0].options.minSelect||2)&&h(l,"min",r),d[0]&1&>(l.value)!==f[0].options.maxSelect&&fe(l,f[0].options.maxSelect)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f,d;function p(g){n[15](g)}let m={multiple:!0,searchable:!0,id:n[33],selectPlaceholder:"Auto",items:n[5]};return n[0].options.displayFields!==void 0&&(m.selected=n[0].options.displayFields),r=new uu({props:m}),ie.push(()=>he(r,"selected",p)),{c(){e=y("label"),t=y("span"),t.textContent="Display fields",i=E(),s=y("i"),o=E(),U(r.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[33])},m(g,_){S(g,e,_),v(e,t),v(e,i),v(e,s),S(g,o,_),z(r,g,_),u=!0,f||(d=Ee(Ye.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(g,_){(!u||_[1]&4&&l!==(l=g[33]))&&h(e,"for",l);const b={};_[1]&4&&(b.id=g[33]),_[0]&32&&(b.items=g[5]),!a&&_[0]&1&&(a=!0,b.selected=g[0].options.displayFields,ke(()=>a=!1)),r.$set(b)},i(g){u||(A(r.$$.fragment,g),u=!0)},o(g){P(r.$$.fragment,g),u=!1},d(g){g&&w(e),g&&w(o),B(r,g),f=!1,d()}}}function BT(n){let e,t,i,s,l,o,r,a,u,f,d,p;function m(_){n[16](_)}let g={id:n[33],items:n[9]};return n[0].options.cascadeDelete!==void 0&&(g.keyOfSelected=n[0].options.cascadeDelete),a=new zi({props:g}),ie.push(()=>he(a,"keyOfSelected",m)),{c(){e=y("label"),t=y("span"),t.textContent="Cascade delete",i=E(),s=y("i"),r=E(),U(a.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",o=n[33])},m(_,b){var k,$;S(_,e,b),v(e,t),v(e,i),v(e,s),S(_,r,b),z(a,_,b),f=!0,d||(p=Ee(l=Ye.call(null,s,{text:`Whether on ${((k=n[6])==null?void 0:k.name)||"relation"} record deletion to delete also the ${(($=n[7])==null?void 0:$.name)||"field"} associated records.`,position:"top"})),d=!0)},p(_,b){var $,T;l&&Ht(l.update)&&b[0]&192&&l.update.call(null,{text:`Whether on ${(($=_[6])==null?void 0:$.name)||"relation"} record deletion to delete also the ${((T=_[7])==null?void 0:T.name)||"field"} associated records.`,position:"top"}),(!f||b[1]&4&&o!==(o=_[33]))&&h(e,"for",o);const k={};b[1]&4&&(k.id=_[33]),!u&&b[0]&1&&(u=!0,k.keyOfSelected=_[0].options.cascadeDelete,ke(()=>u=!1)),a.$set(k)},i(_){f||(A(a.$$.fragment,_),f=!0)},o(_){P(a.$$.fragment,_),f=!1},d(_){_&&w(e),_&&w(r),B(a,_),d=!1,p()}}}function UT(n){let e,t,i,s,l,o,r,a,u=!n[2]&&Td(n);return s=new de({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[zT,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[BT,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),u&&u.c(),t=E(),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(f,d){S(f,e,d),u&&u.m(e,null),v(e,t),v(e,i),z(s,i,null),v(e,l),v(e,o),z(r,o,null),a=!0},p(f,d){f[2]?u&&(re(),P(u,1,1,()=>{u=null}),ae()):u?(u.p(f,d),d[0]&4&&A(u,1)):(u=Td(f),u.c(),A(u,1),u.m(e,t));const p={};d[0]&2&&(p.name="schema."+f[1]+".options.displayFields"),d[0]&33|d[1]&20&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d[0]&2&&(m.name="schema."+f[1]+".options.cascadeDelete"),d[0]&193|d[1]&20&&(m.$$scope={dirty:d,ctx:f}),r.$set(m)},i(f){a||(A(u),A(s.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){P(u),P(s.$$.fragment,f),P(r.$$.fragment,f),a=!1},d(f){f&&w(e),u&&u.d(),B(s),B(r)}}}function WT(n){let e,t,i,s,l;const o=[{key:n[1]},n[10]];function r(f){n[20](f)}let a={$$slots:{options:[UT],default:[jT,({interactive:f})=>({34:f}),({interactive:f})=>[0,f?8:0]]},$$scope:{ctx:n}};for(let f=0;fhe(e,"field",r)),e.$on("rename",n[21]),e.$on("remove",n[22]),e.$on("drop",n[23]),e.$on("dragstart",n[24]),e.$on("dragenter",n[25]),e.$on("dragleave",n[26]);let u={};return s=new fu({props:u}),n[27](s),s.$on("save",n[28]),{c(){U(e.$$.fragment),i=E(),U(s.$$.fragment)},m(f,d){z(e,f,d),S(f,i,d),z(s,f,d),l=!0},p(f,d){const p=d[0]&1026?Mt(o,[d[0]&2&&{key:f[1]},d[0]&1024&&Gt(f[10])]):{};d[0]&255|d[1]&24&&(p.$$scope={dirty:d,ctx:f}),!t&&d[0]&1&&(t=!0,p.field=f[0],ke(()=>t=!1)),e.$set(p);const m={};s.$set(m)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),P(s.$$.fragment,f),l=!1},d(f){B(e,f),f&&w(i),n[27](null),B(s,f)}}}function YT(n,e,t){var Q;let i;const s=["field","key"];let l=xe(e,s),o,r;Ze(n,ci,se=>t(3,o=se)),Ze(n,ui,se=>t(7,r=se));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],d=[{label:"False",value:!1},{label:"True",value:!0}],p=["id","created","updated"],m=["username","email","emailVisibility","verified"];let g=null,_=[],b=null,k=((Q=a.options)==null?void 0:Q.maxSelect)==1,$=k;function T(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]},a),t(2,k=!0),t(12,$=k)}function C(){var se,ge;if(t(5,_=p.slice(0)),!!i){i.isAuth&&t(5,_=_.concat(m));for(const $e of i.schema)_.push($e.name);if(((ge=(se=a.options)==null?void 0:se.displayFields)==null?void 0:ge.length)>0)for(let $e=a.options.displayFields.length-1;$e>=0;$e--)_.includes(a.options.displayFields[$e])||a.options.displayFields.splice($e,1)}}function D(){a.options.minSelect=gt(this.value),t(0,a),t(12,$),t(2,k)}function M(){a.options.maxSelect=gt(this.value),t(0,a),t(12,$),t(2,k)}function O(se){n.$$.not_equal(a.options.displayFields,se)&&(a.options.displayFields=se,t(0,a),t(12,$),t(2,k))}function I(se){n.$$.not_equal(a.options.cascadeDelete,se)&&(a.options.cascadeDelete=se,t(0,a),t(12,$),t(2,k))}const L=()=>g==null?void 0:g.show();function F(se){n.$$.not_equal(a.options.collectionId,se)&&(a.options.collectionId=se,t(0,a),t(12,$),t(2,k))}function q(se){k=se,t(2,k)}function N(se){a=se,t(0,a),t(12,$),t(2,k)}function R(se){me.call(this,n,se)}function j(se){me.call(this,n,se)}function V(se){me.call(this,n,se)}function W(se){me.call(this,n,se)}function ee(se){me.call(this,n,se)}function te(se){me.call(this,n,se)}function G(se){ie[se?"unshift":"push"](()=>{g=se,t(4,g)})}const ce=se=>{var ge,$e;($e=(ge=se==null?void 0:se.detail)==null?void 0:ge.collection)!=null&&$e.id&&t(0,a.options.collectionId=se.detail.collection.id,a)};return n.$$set=se=>{e=je(je({},e),Zt(se)),t(10,l=xe(e,s)),"field"in se&&t(0,a=se.field),"key"in se&&t(1,u=se.key)},n.$$.update=()=>{n.$$.dirty[0]&4100&&$!=k&&(t(12,$=k),k?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty[0]&1&&H.isEmpty(a.options)&&T(),n.$$.dirty[0]&9&&t(6,i=o.find(se=>se.id==a.options.collectionId)||null),n.$$.dirty[0]&2049&&b!=a.options.collectionId&&(t(11,b=a.options.collectionId),C())},[a,u,k,o,g,_,i,r,f,d,l,b,$,D,M,O,I,L,F,q,N,R,j,V,W,ee,te,G,ce]}class KT extends ye{constructor(e){super(),ve(this,e,YT,WT,_e,{field:0,key:1},null,[-1,-1])}}function Md(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Od(n){let e,t,i,s,l,o,r,a;return{c(){e=Y(`, - `),t=y("code"),t.textContent="username",i=Y(` , - `),s=y("code"),s.textContent="email",l=Y(` , - `),o=y("code"),o.textContent="emailVisibility",r=Y(` , - `),a=y("code"),a.textContent="verified",h(t,"class","txt-sm"),h(s,"class","txt-sm"),h(o,"class","txt-sm"),h(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function Dd(n,e){let t,i,s,l,o;function r(m){e[7](m,e[17],e[18],e[19])}function a(){return e[8](e[19])}function u(...m){return e[10](e[19],...m)}function f(...m){return e[11](e[19],...m)}var d=e[1][e[17].type];function p(m){let g={key:m[4](m[17])};return m[17]!==void 0&&(g.field=m[17]),{props:g}}return d&&(i=Nt(d,p(e)),ie.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f)),{key:n,first:null,c(){t=Ce(),i&&U(i.$$.fragment),l=Ce(),this.first=t},m(m,g){S(m,t,g),i&&z(i,m,g),S(m,l,g),o=!0},p(m,g){e=m;const _={};if(g&1&&(_.key=e[4](e[17])),!s&&g&1&&(s=!0,_.field=e[17],ke(()=>s=!1)),g&1&&d!==(d=e[1][e[17].type])){if(i){re();const b=i;P(b.$$.fragment,1,0,()=>{B(b,1)}),ae()}d?(i=Nt(d,p(e)),ie.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f),U(i.$$.fragment),A(i.$$.fragment,1),z(i,l.parentNode,l)):i=null}else d&&i.$set(_)},i(m){o||(i&&A(i.$$.fragment,m),o=!0)},o(m){i&&P(i.$$.fragment,m),o=!1},d(m){m&&w(t),m&&w(l),i&&B(i,m)}}}function JT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m=[],g=new Map,_,b,k,$,T,C,D,M,O=n[0].$isAuth&&Od(),I=n[0].schema;const L=N=>N[17];for(let N=0;Nhe(C,"collection",F)),{c(){e=y("div"),t=y("p"),i=Y(`System fields: - `),s=y("code"),s.textContent="id",l=Y(` , - `),o=y("code"),o.textContent="created",r=Y(` , - `),a=y("code"),a.textContent="updated",u=E(),O&&O.c(),f=Y(` - .`),d=E(),p=y("div");for(let N=0;ND=!1)),C.$set(j)},i(N){if(!M){for(let R=0;RD.name===C)}function f(C){return i.findIndex(D=>D===C)}function d(C,D){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===D||!D||t(0,s.indexes=s.indexes.map(O=>H.replaceIndexColumn(O,C,D)),s)}function p(C,D){if(!C)return;C.dataTransfer.dropEffect="move";const M=parseInt(C.dataTransfer.getData("text/plain")),O=s.schema;Mo(C),_=C=>d(C.detail.oldName,C.detail.newName),b=(C,D)=>ZT(D.detail,C),k=(C,D)=>p(D.detail,C),$=C=>r(C.detail);function T(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new kn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,f,d,p,m,g,_,b,k,$,T]}class XT extends ye{constructor(e){super(),ve(this,e,GT,JT,_e,{collection:0})}}const QT=n=>({isAdminOnly:n&512}),Ed=n=>({isAdminOnly:n[9]}),xT=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]}),e4=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]});function t4(n){let e,t;return e=new de({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[i4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function n4(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","txt-center")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function Pd(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Set Admins only`,h(e,"type","button"),h(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Ld(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=`Unlock and set custom rule -
    `,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:X,i(o){i||(o&&tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Yt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function i4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,d,p,m,g,_,b,k,$;const T=n[12].beforeLabel,C=wt(T,n,n[15],Id),D=n[12].afterLabel,M=wt(D,n,n[15],Ad);let O=!n[9]&&Pd(n);function I(j){n[14](j)}var L=n[7];function F(j){let V={id:j[18],baseCollection:j[1],disabled:j[9],placeholder:j[9]?"":j[5]};return j[0]!==void 0&&(V.value=j[0]),{props:V}}L&&(m=Nt(L,F(n)),n[13](m),ie.push(()=>he(m,"value",I)));let q=n[9]&&Ld(n);const N=n[12].default,R=wt(N,n,n[15],Ed);return{c(){e=y("div"),t=y("label"),C&&C.c(),i=E(),s=y("span"),l=Y(n[2]),o=E(),a=Y(r),u=E(),M&&M.c(),f=E(),O&&O.c(),p=E(),m&&U(m.$$.fragment),_=E(),q&&q.c(),b=E(),k=y("div"),R&&R.c(),h(s,"class","txt"),x(s,"txt-hint",n[9]),h(t,"for",d=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(k,"class","help-block")},m(j,V){S(j,e,V),v(e,t),C&&C.m(t,null),v(t,i),v(t,s),v(s,l),v(s,o),v(s,a),v(t,u),M&&M.m(t,null),v(t,f),O&&O.m(t,null),v(e,p),m&&z(m,e,null),v(e,_),q&&q.m(e,null),S(j,b,V),S(j,k,V),R&&R.m(k,null),$=!0},p(j,V){C&&C.p&&(!$||V&33280)&&$t(C,T,j,j[15],$?St(T,j[15],V,e4):Ct(j[15]),Id),(!$||V&4)&&le(l,j[2]),(!$||V&512)&&r!==(r=j[9]?"- Admins only":"")&&le(a,r),(!$||V&512)&&x(s,"txt-hint",j[9]),M&&M.p&&(!$||V&33280)&&$t(M,D,j,j[15],$?St(D,j[15],V,xT):Ct(j[15]),Ad),j[9]?O&&(O.d(1),O=null):O?O.p(j,V):(O=Pd(j),O.c(),O.m(t,null)),(!$||V&262144&&d!==(d=j[18]))&&h(t,"for",d);const W={};if(V&262144&&(W.id=j[18]),V&2&&(W.baseCollection=j[1]),V&512&&(W.disabled=j[9]),V&544&&(W.placeholder=j[9]?"":j[5]),!g&&V&1&&(g=!0,W.value=j[0],ke(()=>g=!1)),V&128&&L!==(L=j[7])){if(m){re();const ee=m;P(ee.$$.fragment,1,0,()=>{B(ee,1)}),ae()}L?(m=Nt(L,F(j)),j[13](m),ie.push(()=>he(m,"value",I)),U(m.$$.fragment),A(m.$$.fragment,1),z(m,e,_)):m=null}else L&&m.$set(W);j[9]?q?(q.p(j,V),V&512&&A(q,1)):(q=Ld(j),q.c(),A(q,1),q.m(e,null)):q&&(re(),P(q,1,1,()=>{q=null}),ae()),R&&R.p&&(!$||V&33280)&&$t(R,N,j,j[15],$?St(N,j[15],V,QT):Ct(j[15]),Ed)},i(j){$||(A(C,j),A(M,j),m&&A(m.$$.fragment,j),A(q),A(R,j),$=!0)},o(j){P(C,j),P(M,j),m&&P(m.$$.fragment,j),P(q),P(R,j),$=!1},d(j){j&&w(e),C&&C.d(j),M&&M.d(j),O&&O.d(),n[13](null),m&&B(m),q&&q.d(),j&&w(b),j&&w(k),R&&R.d(j)}}}function s4(n){let e,t,i,s;const l=[n4,t4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ce()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Nd;function l4(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,g=Nd,_=!1;b();async function b(){g||_||(t(8,_=!0),t(7,g=(await rt(()=>import("./FilterAutocompleteInput-141a3c4e.js"),["./FilterAutocompleteInput-141a3c4e.js","./index-be8a2174.js"],import.meta.url)).default),Nd=g,t(8,_=!1))}async function k(){t(0,r=m||""),await an(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(D){ie[D?"unshift":"push"](()=>{p=D,t(6,p)})}function C(D){r=D,t(0,r)}return n.$$set=D=>{"collection"in D&&t(1,o=D.collection),"rule"in D&&t(0,r=D.rule),"label"in D&&t(2,a=D.label),"formKey"in D&&t(3,u=D.formKey),"required"in D&&t(4,f=D.required),"placeholder"in D&&t(5,d=D.placeholder),"$$scope"in D&&t(15,l=D.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,g,_,i,k,$,s,T,C,l]}class Os extends ye{constructor(e){super(),ve(this,e,l4,s4,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Fd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Rd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O,I,L=n[2],F=[];for(let q=0;q@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* - @request.query.* - @request.data.* - @request.auth.*`,m=E(),g=y("hr"),_=E(),b=y("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=E(),$=y("div"),$.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=E(),C=y("hr"),D=E(),M=y("p"),M.innerHTML=`Example rule: -
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,h(s,"class","m-b-0"),h(o,"class","inline-flex flex-gap-5"),h(a,"class","m-t-10 m-b-5"),h(f,"class","m-b-0"),h(p,"class","inline-flex flex-gap-5"),h(g,"class","m-t-10 m-b-5"),h(b,"class","m-b-0"),h($,"class","inline-flex flex-gap-5"),h(C,"class","m-t-10 m-b-5"),h(i,"class","content"),h(t,"class","alert alert-warning m-0")},m(q,N){S(q,e,N),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o);for(let R=0;R{I&&(O||(O=ze(e,bt,{duration:150},!0)),O.run(1))}),I=!0)},o(q){q&&(O||(O=ze(e,bt,{duration:150},!1)),O.run(0)),I=!1},d(q){q&&w(e),pt(F,q),q&&O&&O.end()}}}function qd(n){let e,t=n[11]+"",i;return{c(){e=y("code"),i=Y(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&le(i,t)},d(s){s&&w(e)}}}function jd(n){let e,t,i,s,l,o,r,a,u;function f(b){n[6](b)}let d={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[o4,({isAdminOnly:b})=>({10:b}),({isAdminOnly:b})=>b?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(d.rule=n[0].createRule),e=new Os({props:d}),ie.push(()=>he(e,"rule",f));function p(b){n[7](b)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),s=new Os({props:m}),ie.push(()=>he(s,"rule",p));function g(b){n[8](b)}let _={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(_.rule=n[0].deleteRule),r=new Os({props:_}),ie.push(()=>he(r,"rule",g)),{c(){U(e.$$.fragment),i=E(),U(s.$$.fragment),o=E(),U(r.$$.fragment)},m(b,k){z(e,b,k),S(b,i,k),z(s,b,k),S(b,o,k),z(r,b,k),u=!0},p(b,k){const $={};k&1&&($.collection=b[0]),k&17408&&($.$$scope={dirty:k,ctx:b}),!t&&k&1&&(t=!0,$.rule=b[0].createRule,ke(()=>t=!1)),e.$set($);const T={};k&1&&(T.collection=b[0]),!l&&k&1&&(l=!0,T.rule=b[0].updateRule,ke(()=>l=!1)),s.$set(T);const C={};k&1&&(C.collection=b[0]),!a&&k&1&&(a=!0,C.rule=b[0].deleteRule,ke(()=>a=!1)),r.$set(C)},i(b){u||(A(e.$$.fragment,b),A(s.$$.fragment,b),A(r.$$.fragment,b),u=!0)},o(b){P(e.$$.fragment,b),P(s.$$.fragment,b),P(r.$$.fragment,b),u=!1},d(b){B(e,b),b&&w(i),B(s,b),b&&w(o),B(r,b)}}}function Vd(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-information-line link-hint")},m(s,l){S(s,e,l),t||(i=Ee(Ye.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&w(e),t=!1,i()}}}function o4(n){let e,t=!n[10]&&Vd();return{c(){t&&t.c(),e=Ce()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Vd(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&w(e)}}}function Hd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[r4]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Os({props:l}),ie.push(()=>he(e,"rule",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function r4(n){let e,t,i;return{c(){e=y("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. - changing the password without requiring to enter the old one, directly updating the verified - state or email, etc.`,t=E(),i=y("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:X,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function a4(n){var N,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,d,p,m,g,_,b,k,$,T,C,D=n[1]&&Rd(n);function M(j){n[4](j)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),f=new Os({props:O}),ie.push(()=>he(f,"rule",M));function I(j){n[5](j)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),m=new Os({props:L}),ie.push(()=>he(m,"rule",I));let F=!((N=n[0])!=null&&N.$isView)&&jd(n),q=((R=n[0])==null?void 0:R.$isAuth)&&Hd(n);return{c(){e=y("div"),t=y("div"),i=y("p"),i.innerHTML=`All rules follow the -
    PocketBase filter syntax and operators - .`,s=E(),l=y("button"),r=Y(o),a=E(),D&&D.c(),u=E(),U(f.$$.fragment),p=E(),U(m.$$.fragment),_=E(),F&&F.c(),b=E(),q&&q.c(),k=Ce(),h(l,"type","button"),h(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),h(t,"class","flex txt-sm txt-hint m-b-5"),h(e,"class","block m-b-sm handle")},m(j,V){S(j,e,V),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),D&&D.m(e,null),S(j,u,V),z(f,j,V),S(j,p,V),z(m,j,V),S(j,_,V),F&&F.m(j,V),S(j,b,V),q&&q.m(j,V),S(j,k,V),$=!0,T||(C=J(l,"click",n[3]),T=!0)},p(j,[V]){var te,G;(!$||V&2)&&o!==(o=j[1]?"Hide available fields":"Show available fields")&&le(r,o),j[1]?D?(D.p(j,V),V&2&&A(D,1)):(D=Rd(j),D.c(),A(D,1),D.m(e,null)):D&&(re(),P(D,1,1,()=>{D=null}),ae());const W={};V&1&&(W.collection=j[0]),!d&&V&1&&(d=!0,W.rule=j[0].listRule,ke(()=>d=!1)),f.$set(W);const ee={};V&1&&(ee.collection=j[0]),!g&&V&1&&(g=!0,ee.rule=j[0].viewRule,ke(()=>g=!1)),m.$set(ee),(te=j[0])!=null&&te.$isView?F&&(re(),P(F,1,1,()=>{F=null}),ae()):F?(F.p(j,V),V&1&&A(F,1)):(F=jd(j),F.c(),A(F,1),F.m(b.parentNode,b)),(G=j[0])!=null&&G.$isAuth?q?(q.p(j,V),V&1&&A(q,1)):(q=Hd(j),q.c(),A(q,1),q.m(k.parentNode,k)):q&&(re(),P(q,1,1,()=>{q=null}),ae())},i(j){$||(A(D),A(f.$$.fragment,j),A(m.$$.fragment,j),A(F),A(q),$=!0)},o(j){P(D),P(f.$$.fragment,j),P(m.$$.fragment,j),P(F),P(q),$=!1},d(j){j&&w(e),D&&D.d(),j&&w(u),B(f,j),j&&w(p),B(m,j),j&&w(_),F&&F.d(j),j&&w(b),q&&q.d(j),j&&w(k),T=!1,C()}}}function u4(n,e,t){let i,{collection:s=new kn}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function u(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function f(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function d(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function p(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=H.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,d,p]}class f4 extends ye{constructor(e){super(),ve(this,e,u4,a4,_e,{collection:0})}}function zd(n,e,t){const i=n.slice();return i[9]=e[t],i}function c4(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=Nt(o,r(n)),ie.push(()=>he(e,"value",l)),e.$on("change",n[6])),{c(){e&&U(e.$$.fragment),i=Ce()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,ke(()=>t=!1)),u&2&&o!==(o=a[1])){if(e){re();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ae()}o?(e=Nt(o,r(a)),ie.push(()=>he(e,"value",l)),e.$on("change",a[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function d4(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function Bd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • -
  • The query must have a unique id column. -
    - If your query doesn't have a suitable one, you can use the universal - (ROW_NUMBER() OVER()) as id.
  • -
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,u=E(),_&&_.c(),f=Ce(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),_&&_.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=g(b),l===$?m[l].p(b,k):(re(),P(m[$],1,1,()=>{m[$]=null}),ae(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?_?_.p(b,k):(_=Bd(b),_.c(),_.m(f.parentNode,f)):_&&(_.d(1),_=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),_&&_.d(b),b&&w(f)}}}function m4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[p4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function h4(n,e,t){let i;Ze(n,$i,d=>t(4,i=d));let{collection:s=new kn}=e,l,o=!1,r=[];function a(d){var g;t(3,r=[]);const p=H.getNestedVal(d,"schema",null);if(H.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=H.extractColumnsFromQuery((g=s==null?void 0:s.options)==null?void 0:g.query);H.removeByValue(m,"id"),H.removeByValue(m,"created"),H.removeByValue(m,"updated");for(let _ in p)for(let b in p[_]){const k=p[_][b].message,$=m[_]||_;r.push(H.sentenize($+": "+k))}}en(async()=>{t(2,o=!0);try{t(1,l=(await rt(()=>import("./CodeEditor-f746b79b.js"),["./CodeEditor-f746b79b.js","./index-be8a2174.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Fi("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class _4 extends ye{constructor(e){super(),ve(this,e,h4,m4,_e,{collection:0})}}const g4=n=>({active:n&1}),Wd=n=>({active:n[0]});function Yd(n){let e,t,i;const s=n[15].default,l=wt(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&$t(l,s,o,o[14],i?St(s,o[14],r,null):Ct(o[14]),null)},i(o){i||(A(l,o),o&&tt(()=>{i&&(t||(t=ze(e,bt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=ze(e,bt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function b4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=wt(a,n,n[14],Wd);let f=n[0]&&Yd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",at(n[17])),J(t,"drop",at(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",at(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&$t(u,a,d,d[14],l?St(a,d[14],p,g4):Ct(d[14]),Wd),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Yd(d),f.c(),A(f,1),f.m(e,null)):f&&(re(),P(f,1,1,()=>{f=null}),ae()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,Ae(r)}}}function v4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function g(){return!!f}function _(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():_()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const q of F)q.click()}}en(()=>()=>clearTimeout(r));function T(F){me.call(this,n,F)}const C=()=>d&&k(),D=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),O=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){ie[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,g,_,b,r,s,i,T,C,D,M,O,I,L]}class co extends ye{constructor(e){super(),ve(this,e,v4,b4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function y4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function k4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[y4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function w4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function S4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=ze(e,Yt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function $4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?S4:w4}let u=a(n),f=u(n),d=n[3]&&Kd();return{c(){e=y("div"),e.innerHTML=` - Username/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=Ce(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[3]?d?m&8&&A(d,1):(d=Kd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(re(),P(d,1,1,()=>{d=null}),ae())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function C4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Jd(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[T4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[M4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),a=!0},p(u,f){const d={};f&1&&(d.class="form-field "+(H.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(H.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&tt(()=>{a&&(r||(r=ze(e,bt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=ze(e,bt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),B(i),B(o),u&&r&&r.end()}}}function T4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function g(b){n[7](b)}let _={id:n[12],disabled:!H.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(_.value=n[0].options.exceptEmailDomains),r=new Vs({props:_}),ie.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ye.call(null,s,{text:`Email domains that are NOT allowed to sign up. - This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.onlyEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function M4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function g(b){n[8](b)}let _={id:n[12],disabled:!H.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(_.value=n[0].options.onlyEmailDomains),r=new Vs({props:_}),ie.push(()=>he(r,"value",g)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ye.call(null,s,{text:`Email domains that are ONLY allowed to sign up. - This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function O4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[C4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Jd(n);return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=Ce()},m(o,r){z(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=Jd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function D4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function E4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Zd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=ze(e,Yt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function A4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowEmailAuth?E4:D4}let u=a(n),f=u(n),d=n[2]&&Zd();return{c(){e=y("div"),e.innerHTML=` - Email/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=Ce(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[2]?d?m&4&&A(d,1):(d=Zd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(re(),P(d,1,1,()=>{d=null}),ae())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function I4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Gd(n){let e,t,i;return{c(){e=y("div"),e.innerHTML='',h(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&tt(()=>{i&&(t||(t=ze(e,bt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=ze(e,bt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function P4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[I4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Gd();return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=Ce()},m(o,r){z(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=Gd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function L4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function N4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=ze(e,Yt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function F4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowOAuth2Auth?N4:L4}let u=a(n),f=u(n),d=n[1]&&Xd();return{c(){e=y("div"),e.innerHTML=` - OAuth2`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=Ce(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[1]?d?m&2&&A(d,1):(d=Xd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(re(),P(d,1,1,()=>{d=null}),ae())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function R4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Minimum password length"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),l.required=!0,h(l,"min","6"),h(l,"max","72")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.minPasswordLength),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.minPasswordLength&&fe(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function q4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Always require email",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(l,"class","txt"),h(r,"class","ri-information-line txt-sm link-hint"),h(s,"for",a=n[12])},m(d,p){S(d,e,p),e.checked=n[0].options.requireEmail,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),Ee(Ye.call(null,r,{text:`The constraint is applied only for new records. -Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(d,p){p&4096&&t!==(t=d[12])&&h(e,"id",t),p&1&&(e.checked=d[0].options.requireEmail),p&4096&&a!==(a=d[12])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ae(f)}}}function j4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k;return s=new co({props:{single:!0,$$slots:{header:[$4],default:[k4]},$$scope:{ctx:n}}}),o=new co({props:{single:!0,$$slots:{header:[A4],default:[O4]},$$scope:{ctx:n}}}),a=new co({props:{single:!0,$$slots:{header:[F4],default:[P4]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[R4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),b=new de({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[q4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("h4"),e.textContent="Auth methods",t=E(),i=y("div"),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("hr"),d=E(),p=y("h4"),p.textContent="General",m=E(),U(g.$$.fragment),_=E(),U(b.$$.fragment),h(e,"class","section-title"),h(i,"class","accordions"),h(p,"class","section-title")},m($,T){S($,e,T),S($,t,T),S($,i,T),z(s,i,null),v(i,l),z(o,i,null),v(i,r),z(a,i,null),S($,u,T),S($,f,T),S($,d,T),S($,p,T),S($,m,T),z(g,$,T),S($,_,T),z(b,$,T),k=!0},p($,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:$}),s.$set(C);const D={};T&8197&&(D.$$scope={dirty:T,ctx:$}),o.$set(D);const M={};T&8195&&(M.$$scope={dirty:T,ctx:$}),a.$set(M);const O={};T&12289&&(O.$$scope={dirty:T,ctx:$}),g.$set(O);const I={};T&12289&&(I.$$scope={dirty:T,ctx:$}),b.$set(I)},i($){k||(A(s.$$.fragment,$),A(o.$$.fragment,$),A(a.$$.fragment,$),A(g.$$.fragment,$),A(b.$$.fragment,$),k=!0)},o($){P(s.$$.fragment,$),P(o.$$.fragment,$),P(a.$$.fragment,$),P(g.$$.fragment,$),P(b.$$.fragment,$),k=!1},d($){$&&w(e),$&&w(t),$&&w(i),B(s),B(o),B(a),$&&w(u),$&&w(f),$&&w(d),$&&w(p),$&&w(m),B(g,$),$&&w(_),B(b,$)}}}function V4(n,e,t){let i,s,l,o;Ze(n,$i,_=>t(4,o=_));let{collection:r=new kn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(_){n.$$.not_equal(r.options.exceptEmailDomains,_)&&(r.options.exceptEmailDomains=_,t(0,r))}function d(_){n.$$.not_equal(r.options.onlyEmailDomains,_)&&(r.options.onlyEmailDomains=_,t(0,r))}function p(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=gt(this.value),t(0,r)}function g(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=_=>{"collection"in _&&t(0,r=_.collection)},n.$$.update=()=>{var _,b,k,$;n.$$.dirty&1&&r.$isAuth&&H.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!H.isEmpty((_=o==null?void 0:o.options)==null?void 0:_.allowEmailAuth)||!H.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!H.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!H.isEmpty(($=o==null?void 0:o.options)==null?void 0:$.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,d,p,m,g]}class H4 extends ye{constructor(e){super(),ve(this,e,V4,j4,_e,{collection:0})}}function Qd(n,e,t){const i=n.slice();return i[17]=e[t],i}function xd(n,e,t){const i=n.slice();return i[17]=e[t],i}function ep(n,e,t){const i=n.slice();return i[17]=e[t],i}function tp(n){let e;return{c(){e=y("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function np(n){var r;let e,t,i,s,l=n[3]&&ip(n),o=!((r=n[2])!=null&&r.$isView)&&sp(n);return{c(){e=y("h6"),e.textContent="Changes:",t=E(),i=y("ul"),l&&l.c(),s=E(),o&&o.c(),h(i,"class","changes-list svelte-xqpcsf")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),l&&l.m(i,null),v(i,s),o&&o.m(i,null)},p(a,u){var f;a[3]?l?l.p(a,u):(l=ip(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[2])!=null&&f.$isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=sp(a),o.c(),o.m(i,null))},d(a){a&&w(e),a&&w(t),a&&w(i),l&&l.d(),o&&o.d()}}}function ip(n){var m,g;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,u,f,d=((g=n[2])==null?void 0:g.name)+"",p;return{c(){e=y("li"),t=y("div"),i=Y(`Renamed collection - `),s=y("strong"),o=Y(l),r=E(),a=y("i"),u=E(),f=y("strong"),p=Y(d),h(s,"class","txt-strikethrough txt-hint"),h(a,"class","ri-arrow-right-line txt-sm"),h(f,"class","txt"),h(t,"class","inline-flex"),h(e,"class","svelte-xqpcsf")},m(_,b){S(_,e,b),v(e,t),v(t,i),v(t,s),v(s,o),v(t,r),v(t,a),v(t,u),v(t,f),v(f,p)},p(_,b){var k,$;b&2&&l!==(l=((k=_[1])==null?void 0:k.name)+"")&&le(o,l),b&4&&d!==(d=(($=_[2])==null?void 0:$.name)+"")&&le(p,d)},d(_){_&&w(e)}}}function sp(n){let e,t,i,s=n[5],l=[];for(let f=0;f
    ',i=E(),s=y("div"),l=y("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, - you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=Ce(),h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),u&&u.m(s,null),S(d,r,p),f&&f.m(d,p),S(d,a,p)},p(d,p){d[6].length?u||(u=tp(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),d[8]?f?f.p(d,p):(f=np(d),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(d){d&&w(e),u&&u.d(),d&&w(r),f&&f.d(d),d&&w(a)}}}function B4(n){let e;return{c(){e=y("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function U4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Cancel',t=E(),i=y("button"),i.innerHTML='Confirm',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ae(l)}}}function W4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[U4],header:[B4],default:[z4]},$$scope:{ctx:n}};return e=new hn({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[13](null),B(e,s)}}}function Y4(n,e,t){let i,s,l,o,r;const a=Tt();let u,f,d;async function p(C,D){t(1,f=C),t(2,d=D),await an(),i||s.length||l.length||o.length?u==null||u.show():g()}function m(){u==null||u.hide()}function g(){m(),a("confirm")}const _=()=>m(),b=()=>g();function k(C){ie[C?"unshift":"push"](()=>{u=C,t(4,u)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{var C,D,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(7,s=((C=d==null?void 0:d.schema)==null?void 0:C.filter(O=>O.id&&!O.toDelete&&O.originalName!=O.name))||[]),n.$$.dirty&4&&t(6,l=((D=d==null?void 0:d.schema)==null?void 0:D.filter(O=>O.id&&O.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(O=>{var L,F,q;const I=(L=f==null?void 0:f.schema)==null?void 0:L.find(N=>N.id==O.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((q=O.options)==null?void 0:q.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(d!=null&&d.$isView)||i)},[m,f,d,i,u,o,l,s,r,g,p,_,b,k,$,T]}class K4 extends ye{constructor(e){super(),ve(this,e,Y4,W4,_e,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function ap(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function J4(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new XT({props:l}),ie.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function Z4(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new _4({props:l}),ie.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function up(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new f4({props:o}),ie.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function fp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new H4({props:o}),ie.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Ls)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function G4(n){let e,t,i,s,l,o,r;const a=[Z4,J4],u=[];function f(m,g){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let d=n[3]===wl&&up(n),p=n[2].$isAuth&&fp(n);return{c(){e=y("div"),t=y("div"),s.c(),l=E(),d&&d.c(),o=E(),p&&p.c(),h(t,"class","tab-item"),x(t,"active",n[3]===Pi),h(e,"class","tabs-content svelte-12y0yzb")},m(m,g){S(m,e,g),v(e,t),u[i].m(t,null),v(e,l),d&&d.m(e,null),v(e,o),p&&p.m(e,null),r=!0},p(m,g){let _=i;i=f(m),i===_?u[i].p(m,g):(re(),P(u[_],1,1,()=>{u[_]=null}),ae(),s=u[i],s?s.p(m,g):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||g[0]&8)&&x(t,"active",m[3]===Pi),m[3]===wl?d?(d.p(m,g),g[0]&8&&A(d,1)):(d=up(m),d.c(),A(d,1),d.m(e,o)):d&&(re(),P(d,1,1,()=>{d=null}),ae()),m[2].$isAuth?p?(p.p(m,g),g[0]&4&&A(p,1)):(p=fp(m),p.c(),A(p,1),p.m(e,null)):p&&(re(),P(p,1,1,()=>{p=null}),ae())},i(m){r||(A(s),A(d),A(p),r=!0)},o(m){P(s),P(d),P(p),r=!1},d(m){m&&w(e),u[i].d(),d&&d.d(),p&&p.d()}}}function cp(n){let e,t,i,s,l,o,r;return o=new ei({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[X4]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),i=y("button"),s=y("i"),l=E(),U(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"aria-label","More"),h(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),v(i,s),v(i,l),z(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),B(o)}}}function X4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=` - Duplicate`,t=E(),i=y("button"),i.innerHTML=` - Delete`,h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",An(at(n[25])))],s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ae(l)}}}function dp(n){let e,t,i,s;return i=new ei({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[Q4]},$$scope:{ctx:n}}}),{c(){e=y("i"),t=E(),U(i.$$.fragment),h(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),B(i,l)}}}function pp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,d;function p(){return n[27](n[47])}return{c(){e=y("button"),t=y("i"),s=E(),l=y("span"),r=Y(o),a=Y(" collection"),u=E(),h(t,"class",i=os(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),h(l,"class","txt"),h(e,"type","button"),h(e,"class","dropdown-item closable"),x(e,"selected",n[47]==n[2].type)},m(m,g){S(m,e,g),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),v(e,u),f||(d=J(e,"click",p),f=!0)},p(m,g){n=m,g[0]&64&&i!==(i=os(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&h(t,"class",i),g[0]&64&&o!==(o=n[48]+"")&&le(r,o),g[0]&68&&x(e,"selected",n[47]==n[2].type)},d(m){m&&w(e),f=!1,d()}}}function Q4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{q=null}),ae()),(!I||j[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(R[2].$isNew?"btn-outline":"btn-transparent")))&&h(p,"class",C),(!I||j[0]&4&&D!==(D=!R[2].$isNew))&&(p.disabled=D),R[2].system?N||(N=mp(),N.c(),N.m(O.parentNode,O)):N&&(N.d(1),N=null)},i(R){I||(A(q),I=!0)},o(R){P(q),I=!1},d(R){R&&w(e),R&&w(s),R&&w(l),R&&w(f),R&&w(d),q&&q.d(),R&&w(M),N&&N.d(R),R&&w(O),L=!1,F()}}}function hp(n){let e,t,i,s,l,o;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Ee(t=Ye.call(null,e,n[11])),l=!0)},p(r,a){t&&Ht(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&tt(()=>{s&&(i||(i=ze(e,Yt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=ze(e,Yt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function _p(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function gp(n){var a,u,f;let e,t,i,s=!H.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&bp();return{c(){e=y("button"),t=y("span"),t.textContent="Options",i=E(),r&&r.c(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(d,p){S(d,e,p),v(e,t),v(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(d,p){var m,g,_;p[0]&32&&(s=!H.isEmpty((m=d[5])==null?void 0:m.options)&&!((_=(g=d[5])==null?void 0:g.options)!=null&&_.manageRule)),s?r?p[0]&32&&A(r,1):(r=bp(),r.c(),A(r,1),r.m(e,null)):r&&(re(),P(r,1,1,()=>{r=null}),ae()),p[0]&8&&x(e,"active",d[3]===Ls)},d(d){d&&w(e),r&&r.d(),l=!1,o()}}}function bp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function eM(n){var V,W,ee,te,G,ce,Q,se;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,d,p,m,g=(V=n[2])!=null&&V.$isView?"Query":"Fields",_,b,k=!H.isEmpty(n[11]),$,T,C,D,M=!H.isEmpty((W=n[5])==null?void 0:W.listRule)||!H.isEmpty((ee=n[5])==null?void 0:ee.viewRule)||!H.isEmpty((te=n[5])==null?void 0:te.createRule)||!H.isEmpty((G=n[5])==null?void 0:G.updateRule)||!H.isEmpty((ce=n[5])==null?void 0:ce.deleteRule)||!H.isEmpty((se=(Q=n[5])==null?void 0:Q.options)==null?void 0:se.manageRule),O,I,L,F,q=!n[2].$isNew&&!n[2].system&&cp(n);r=new de({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[x4,({uniqueId:ge})=>({46:ge}),({uniqueId:ge})=>[0,ge?32768:0]]},$$scope:{ctx:n}}});let N=k&&hp(n),R=M&&_p(),j=n[2].$isAuth&&gp(n);return{c(){e=y("h4"),i=Y(t),s=E(),q&&q.c(),l=E(),o=y("form"),U(r.$$.fragment),a=E(),u=y("input"),f=E(),d=y("div"),p=y("button"),m=y("span"),_=Y(g),b=E(),N&&N.c(),$=E(),T=y("button"),C=y("span"),C.textContent="API Rules",D=E(),R&&R.c(),O=E(),j&&j.c(),h(e,"class","upsert-panel-title svelte-12y0yzb"),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(m,"class","txt"),h(p,"type","button"),h(p,"class","tab-item"),x(p,"active",n[3]===Pi),h(C,"class","txt"),h(T,"type","button"),h(T,"class","tab-item"),x(T,"active",n[3]===wl),h(d,"class","tabs-header stretched")},m(ge,$e){S(ge,e,$e),v(e,i),S(ge,s,$e),q&&q.m(ge,$e),S(ge,l,$e),S(ge,o,$e),z(r,o,null),v(o,a),v(o,u),S(ge,f,$e),S(ge,d,$e),v(d,p),v(p,m),v(m,_),v(p,b),N&&N.m(p,null),v(d,$),v(d,T),v(T,C),v(T,D),R&&R.m(T,null),v(d,O),j&&j.m(d,null),I=!0,L||(F=[J(o,"submit",at(n[28])),J(p,"click",n[29]),J(T,"click",n[30])],L=!0)},p(ge,$e){var Be,we,Oe,Ge,mt,Xe,Ke,Se;(!I||$e[0]&4)&&t!==(t=ge[2].$isNew?"New collection":"Edit collection")&&le(i,t),!ge[2].$isNew&&!ge[2].system?q?(q.p(ge,$e),$e[0]&4&&A(q,1)):(q=cp(ge),q.c(),A(q,1),q.m(l.parentNode,l)):q&&(re(),P(q,1,1,()=>{q=null}),ae());const Ve={};$e[0]&8192&&(Ve.class="form-field collection-field-name required m-b-0 "+(ge[13]?"disabled":"")),$e[0]&8260|$e[1]&1081344&&(Ve.$$scope={dirty:$e,ctx:ge}),r.$set(Ve),(!I||$e[0]&4)&&g!==(g=(Be=ge[2])!=null&&Be.$isView?"Query":"Fields")&&le(_,g),$e[0]&2048&&(k=!H.isEmpty(ge[11])),k?N?(N.p(ge,$e),$e[0]&2048&&A(N,1)):(N=hp(ge),N.c(),A(N,1),N.m(p,null)):N&&(re(),P(N,1,1,()=>{N=null}),ae()),(!I||$e[0]&8)&&x(p,"active",ge[3]===Pi),$e[0]&32&&(M=!H.isEmpty((we=ge[5])==null?void 0:we.listRule)||!H.isEmpty((Oe=ge[5])==null?void 0:Oe.viewRule)||!H.isEmpty((Ge=ge[5])==null?void 0:Ge.createRule)||!H.isEmpty((mt=ge[5])==null?void 0:mt.updateRule)||!H.isEmpty((Xe=ge[5])==null?void 0:Xe.deleteRule)||!H.isEmpty((Se=(Ke=ge[5])==null?void 0:Ke.options)==null?void 0:Se.manageRule)),M?R?$e[0]&32&&A(R,1):(R=_p(),R.c(),A(R,1),R.m(T,null)):R&&(re(),P(R,1,1,()=>{R=null}),ae()),(!I||$e[0]&8)&&x(T,"active",ge[3]===wl),ge[2].$isAuth?j?j.p(ge,$e):(j=gp(ge),j.c(),j.m(d,null)):j&&(j.d(1),j=null)},i(ge){I||(A(q),A(r.$$.fragment,ge),A(N),A(R),I=!0)},o(ge){P(q),P(r.$$.fragment,ge),P(N),P(R),I=!1},d(ge){ge&&w(e),ge&&w(s),q&&q.d(ge),ge&&w(l),ge&&w(o),B(r),ge&&w(f),ge&&w(d),N&&N.d(),R&&R.d(),j&&j.d(),L=!1,Ae(F)}}}function tM(n){let e,t,i,s,l,o=n[2].$isNew?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=Y(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[9],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],x(s,"btn-loading",n[9])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(d,p){p[0]&512&&(e.disabled=d[9]),p[0]&4&&o!==(o=d[2].$isNew?"Create":"Save changes")&&le(r,o),p[0]&4608&&a!==(a=!d[12]||d[9])&&(s.disabled=a),p[0]&512&&x(s,"btn-loading",d[9])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ae(f)}}}function nM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[tM],header:[eM],default:[G4]},$$scope:{ctx:n}};e=new hn({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new K4({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[37](null),B(e,r),r&&w(t),n[40](null),B(i,r)}}}const Pi="schema",wl="api_rules",Ls="options",iM="base",vp="auth",yp="view";function Pr(n){return JSON.stringify(n)}function sM(n,e,t){let i,s,l,o;Ze(n,$i,Se=>t(5,o=Se));const r={};r[iM]="Base",r[yp]="View",r[vp]="Auth";const a=Tt();let u,f,d=null,p=new kn,m=!1,g=!1,_=Pi,b=Pr(p),k="";function $(Se){t(3,_=Se)}function T(Se){return D(Se),t(10,g=!0),$(Pi),u==null?void 0:u.show()}function C(){return u==null?void 0:u.hide()}async function D(Se){un({}),typeof Se<"u"?(t(20,d=Se),t(2,p=Se.$clone())):(t(20,d=null),t(2,p=new kn)),t(2,p.schema=p.schema||[],p),t(2,p.originalName=p.name||"",p),await an(),t(21,b=Pr(p))}function M(){p.$isNew?O():f==null||f.show(d,p)}function O(){if(m)return;t(9,m=!0);const Se=I();let ue;p.$isNew?ue=pe.collections.create(Se):ue=pe.collections.update(p.id,Se),ue.then(He=>{Pa(),gy(He),t(10,g=!1),C(),xt(p.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:p.$isNew,collection:He})}).catch(He=>{pe.errorResponseHandler(He)}).finally(()=>{t(9,m=!1)})}function I(){const Se=p.$export();Se.schema=Se.schema.slice(0);for(let ue=Se.schema.length-1;ue>=0;ue--)Se.schema[ue].toDelete&&Se.schema.splice(ue,1);return Se}function L(){d!=null&&d.id&&vn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>pe.collections.delete(d==null?void 0:d.id).then(()=>{C(),xt(`Successfully deleted collection "${d==null?void 0:d.name}".`),a("delete",d),by(d)}).catch(Se=>{pe.errorResponseHandler(Se)}))}function F(Se){t(2,p.type=Se,p),Fi("schema")}function q(){s?vn("You have unsaved changes. Do you really want to discard them?",()=>{N()}):N()}async function N(){const Se=d==null?void 0:d.$clone();if(Se){if(Se.id="",Se.created="",Se.updated="",Se.name+="_duplicate",!H.isEmpty(Se.schema))for(const ue of Se.schema)ue.id="";if(!H.isEmpty(Se.indexes))for(let ue=0;ueC(),j=()=>M(),V=()=>q(),W=()=>L(),ee=Se=>{t(2,p.name=H.slugify(Se.target.value),p),Se.target.value=p.name},te=Se=>F(Se),G=()=>{l&&M()},ce=()=>$(Pi),Q=()=>$(wl),se=()=>$(Ls);function ge(Se){p=Se,t(2,p),t(20,d)}function $e(Se){p=Se,t(2,p),t(20,d)}function Ve(Se){p=Se,t(2,p),t(20,d)}function Be(Se){p=Se,t(2,p),t(20,d)}const we=()=>s&&g?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,g=!1),C()}),!1):!0;function Oe(Se){ie[Se?"unshift":"push"](()=>{u=Se,t(7,u)})}function Ge(Se){me.call(this,n,Se)}function mt(Se){me.call(this,n,Se)}function Xe(Se){ie[Se?"unshift":"push"](()=>{f=Se,t(8,f)})}const Ke=()=>O();return n.$$.update=()=>{var Se,ue;n.$$.dirty[0]&32&&(o.schema||(Se=o.options)!=null&&Se.query?t(11,k=H.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&p.type===yp&&(t(2,p.createRule=null,p),t(2,p.updateRule=null,p),t(2,p.deleteRule=null,p),t(2,p.indexes=[],p)),n.$$.dirty[0]&1048580&&p!=null&&p.name&&(d==null?void 0:d.name)!=(p==null?void 0:p.name)&&t(2,p.indexes=(ue=p.indexes)==null?void 0:ue.map(He=>H.replaceIndexTableName(He,p.name)),p),n.$$.dirty[0]&4&&t(13,i=!p.$isNew&&p.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Pr(p)),n.$$.dirty[0]&20&&t(12,l=p.$isNew||s),n.$$.dirty[0]&12&&_===Ls&&p.type!==vp&&$(Pi)},[$,C,p,_,s,o,r,u,f,m,g,k,l,i,M,O,L,F,q,T,d,b,R,j,V,W,ee,te,G,ce,Q,se,ge,$e,Ve,Be,we,Oe,Ge,mt,Xe,Ke]}class fu extends ye{constructor(e){super(),ve(this,e,sM,nM,_e,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function kp(n,e,t){const i=n.slice();return i[15]=e[t],i}function wp(n){let e,t=n[1].length&&Sp();return{c(){t&&t.c(),e=Ce()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Sp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Sp(n){let e;return{c(){e=y("p"),e.textContent="No collections found.",h(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $p(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,d,p;return{key:n,first:null,c(){var m;t=y("a"),i=y("i"),l=E(),o=y("span"),a=Y(r),u=E(),h(i,"class",s=H.getCollectionTypeIcon(e[15].type)),h(o,"class","txt"),h(t,"href",f="/collections?collectionId="+e[15].id),h(t,"class","sidebar-list-item"),x(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,g){S(m,t,g),v(t,i),v(t,l),v(t,o),v(o,a),v(t,u),d||(p=Ee(dn.call(null,t)),d=!0)},p(m,g){var _;e=m,g&8&&s!==(s=H.getCollectionTypeIcon(e[15].type))&&h(i,"class",s),g&8&&r!==(r=e[15].name+"")&&le(a,r),g&8&&f!==(f="/collections?collectionId="+e[15].id)&&h(t,"href",f),g&40&&x(t,"active",((_=e[5])==null?void 0:_.id)===e[15].id)},d(m){m&&w(t),d=!1,p()}}}function Cp(n){let e,t,i,s;return{c(){e=y("footer"),t=y("button"),t.innerHTML=` - New collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:X,d(l){l&&w(e),i=!1,s()}}}function lM(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,g,_,b,k,$,T,C=n[3];const D=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),fe(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let q=0;q20),L[7]?O&&(O.d(1),O=null):O?O.p(L,F):(O=Cp(L),O.c(),O.m(e,null));const q={};b.$set(q)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function rM(n,e,t){let i,s,l,o,r,a,u;Ze(n,ui,$=>t(5,o=$)),Ze(n,ci,$=>t(9,r=$)),Ze(n,yo,$=>t(6,a=$)),Ze(n,Es,$=>t(7,u=$));let f,d="";function p($){rn(ui,o=$,o)}const m=()=>t(0,d="");function g(){d=this.value,t(0,d)}const _=()=>f==null?void 0:f.show();function b($){ie[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&oM(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,g,_,b,k]}class aM extends ye{constructor(e){super(),ve(this,e,rM,lM,_e,{})}}function Tp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Mp(n){n[18]=n[19].default}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Dp(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ep(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Dp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=Ce(),d&&d.c(),s=E(),l=y("button"),r=Y(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,g){S(m,t,g),d&&d.m(m,g),S(m,s,g),S(m,l,g),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,g){e=m,g&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Dp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),g&8&&o!==(o=e[15].label+"")&&le(r,o),g&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Ap(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:cM,then:fM,catch:uM,value:19,blocks:[,,,]};return _u(t=n[15].component,s),{c(){e=Ce(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&_u(t,s)||zb(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function uM(n){return{c:X,m:X,p:X,i:X,o:X,d:X}}function fM(n){Mp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){U(e.$$.fragment),t=E()},m(s,l){z(e,s,l),S(s,t,l),i=!0},p(s,l){Mp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){B(e,s),s&&w(t)}}}function cM(n){return{c:X,m:X,p:X,i:X,o:X,d:X}}function Ip(n,e){let t,i,s,l=e[5]===e[14]&&Ap(e);return{key:n,first:null,c(){t=Ce(),l&&l.c(),i=Ce(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Ap(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function dM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=_=>_[14];for(let _=0;__[14];for(let _=0;_Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function mM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[pM],default:[dM]},$$scope:{ctx:n}};return e=new hn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),B(e,s)}}}function hM(n,e,t){const i={list:{label:"List/Search",component:rt(()=>import("./ListApiDocs-4c95c3ad.js"),["./ListApiDocs-4c95c3ad.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:rt(()=>import("./ViewApiDocs-7c4555f7.js"),["./ViewApiDocs-7c4555f7.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:rt(()=>import("./CreateApiDocs-b5573f81.js"),["./CreateApiDocs-b5573f81.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:rt(()=>import("./UpdateApiDocs-c1fc576c.js"),["./UpdateApiDocs-c1fc576c.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:rt(()=>import("./DeleteApiDocs-e76eaa1f.js"),["./DeleteApiDocs-e76eaa1f.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:rt(()=>import("./RealtimeApiDocs-95487622.js"),["./RealtimeApiDocs-95487622.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:rt(()=>import("./AuthWithPasswordDocs-23b7bd4b.js"),["./AuthWithPasswordDocs-23b7bd4b.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:rt(()=>import("./AuthWithOAuth2Docs-c632a81b.js"),["./AuthWithOAuth2Docs-c632a81b.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:rt(()=>import("./AuthRefreshDocs-1c9e307a.js"),["./AuthRefreshDocs-1c9e307a.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:rt(()=>import("./RequestVerificationDocs-e3bde5f0.js"),["./RequestVerificationDocs-e3bde5f0.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:rt(()=>import("./ConfirmVerificationDocs-e77b8d5b.js"),["./ConfirmVerificationDocs-e77b8d5b.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:rt(()=>import("./RequestPasswordResetDocs-48ff72aa.js"),["./RequestPasswordResetDocs-48ff72aa.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:rt(()=>import("./ConfirmPasswordResetDocs-e9329477.js"),["./ConfirmPasswordResetDocs-e9329477.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:rt(()=>import("./RequestEmailChangeDocs-fdf64daa.js"),["./RequestEmailChangeDocs-fdf64daa.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:rt(()=>import("./ConfirmEmailChangeDocs-c1ebdd85.js"),["./ConfirmEmailChangeDocs-c1ebdd85.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:rt(()=>import("./AuthMethodsDocs-21c3715f.js"),["./AuthMethodsDocs-21c3715f.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:rt(()=>import("./ListExternalAuthsDocs-72ff2f65.js"),["./ListExternalAuthsDocs-72ff2f65.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:rt(()=>import("./UnlinkExternalAuthDocs-e00bf869.js"),["./UnlinkExternalAuthDocs-e00bf869.js","./SdkTabs-9d46fa03.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new kn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function g(k){ie[k?"unshift":"push"](()=>{l=k,t(4,l)})}function _(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$.update=()=>{n.$$.dirty&12&&(o.$isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,g,_,b]}class _M extends ye{constructor(e){super(),ve(this,e,hM,mM,_e,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function gM(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","text"),h(r,"requried",a=!n[2]),h(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),h(r,"id",f=n[13])},m(m,g){S(m,e,g),v(e,t),v(e,i),v(e,s),S(m,o,g),S(m,r,g),fe(r,n[0].username),d||(p=J(r,"input",n[5]),d=!0)},p(m,g){g&8192&&l!==(l=m[13])&&h(e,"for",l),g&4&&a!==(a=!m[2])&&h(r,"requried",a),g&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&h(r,"placeholder",u),g&8192&&f!==(f=m[13])&&h(r,"id",f),g&1&&r.value!==m[0].username&&fe(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function bM(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,g,_,b,k,$,T;return{c(){var C;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=Y("Public: "),p=Y(d),g=E(),_=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[13]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(_,"type","email"),_.autofocus=n[2],h(_,"autocomplete","off"),h(_,"id",b=n[13]),_.required=k=(C=n[1].options)==null?void 0:C.requireEmail,h(_,"class","svelte-1751a4d")},m(C,D){S(C,e,D),v(e,t),v(e,i),v(e,s),S(C,o,D),S(C,r,D),v(r,a),v(a,u),v(u,f),v(u,p),S(C,g,D),S(C,_,D),fe(_,n[0].email),n[2]&&_.focus(),$||(T=[Ee(Ye.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(_,"input",n[7])],$=!0)},p(C,D){var M;D&8192&&l!==(l=C[13])&&h(e,"for",l),D&1&&d!==(d=C[0].emailVisibility?"On":"Off")&&le(p,d),D&1&&m!==(m="btn btn-sm btn-transparent "+(C[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),D&4&&(_.autofocus=C[2]),D&8192&&b!==(b=C[13])&&h(_,"id",b),D&2&&k!==(k=(M=C[1].options)==null?void 0:M.requireEmail)&&(_.required=k),D&1&&_.value!==C[0].email&&fe(_,C[0].email)},d(C){C&&w(e),C&&w(o),C&&w(r),C&&w(g),C&&w(_),$=!1,Ae(T)}}}function Pp(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[vM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function vM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[3],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lp(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[yM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[kM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[3]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d&24577&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&24577&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&8)&&x(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&tt(()=>{u&&(a||(a=ze(e,bt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=ze(e,bt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function yM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].password&&fe(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function kM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&fe(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function wM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",at(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ae(a)}}}function SM(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[gM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[bM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}});let g=!n[2]&&Pp(n),_=(n[2]||n[3])&&Lp(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[wM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),g&&g.c(),u=E(),_&&_.c(),f=E(),d=y("div"),U(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),g&&g.m(a,null),v(a,u),_&&_.m(a,null),v(e,f),v(e,d),z(p,d,null),m=!0},p(k,[$]){var M;const T={};$&4&&(T.class="form-field "+(k[2]?"":"required")),$&24581&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&24583&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[2]?g&&(re(),P(g,1,1,()=>{g=null}),ae()):g?(g.p(k,$),$&4&&A(g,1)):(g=Pp(k),g.c(),A(g,1),g.m(a,u)),k[2]||k[3]?_?(_.p(k,$),$&12&&A(_,1)):(_=Lp(k),_.c(),A(_,1),_.m(a,null)):_&&(re(),P(_,1,1,()=>{_=null}),ae());const D={};$&24581&&(D.$$scope={dirty:$,ctx:k}),p.$set(D)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(g),A(_),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(g),P(_),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),B(i),B(o),g&&g.d(),_&&_.d(),B(p)}}}function $M(n,e,t){let{collection:i=new kn}=e,{record:s=new ki}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function d(){r=this.checked,t(3,r)}function p(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function g(){s.verified=this.checked,t(0,s),t(3,r)}const _=b=>{l||vn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Fi("password"),Fi("passwordConfirm")))},[s,i,l,r,o,a,u,f,d,p,m,g,_]}class CM extends ye{constructor(e){super(),ve(this,e,$M,SM,_e,{collection:1,record:0,isNew:2})}}function TM(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const g=r.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}en(()=>(u(),()=>clearTimeout(a)));function d(m){ie[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Zt(m)),t(3,s=xe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class OM extends ye{constructor(e){super(),ve(this,e,MM,TM,_e,{value:0,maxHeight:4})}}function DM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(_){n[2](_)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new OM({props:g}),ie.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),z(f,_,b),p=!0},p(_,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(_[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=_[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=_[3]))&&h(e,"for",a);const k={};b&8&&(k.id=_[3]),b&2&&(k.required=_[1].required),!d&&b&1&&(d=!0,k.value=_[0],ke(()=>d=!1)),f.$set(k)},i(_){p||(A(f.$$.fragment,_),p=!0)},o(_){P(f.$$.fragment,_),p=!1},d(_){_&&w(e),_&&w(u),B(f,_)}}}function EM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[DM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function AM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class IM extends ye{constructor(e){super(),ve(this,e,AM,EM,_e,{field:1,value:0})}}function PM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,g,_,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",g=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),fe(f,n[0]),_||(b=J(f,"input",n[2]),_=!0)},p(k,$){var T,C;$&2&&i!==(i=H.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&le(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&g!==(g=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",g),$&1&>(f.value)!==k[0]&&fe(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),_=!1,b()}}}function LM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[PM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function NM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=gt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class FM extends ye{constructor(e){super(),ve(this,e,NM,LM,_e,{field:1,value:0})}}function RM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=Y(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&le(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function qM(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[RM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function jM(n,e,t){let{field:i=new wn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class VM extends ye{constructor(e){super(),ve(this,e,jM,qM,_e,{field:1,value:0})}}function HM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,g;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),S(_,f,b),fe(f,n[0]),m||(g=J(f,"input",n[2]),m=!0)},p(_,b){b&2&&i!==(i=H.getFieldTypeIcon(_[1].type))&&h(t,"class",i),b&2&&o!==(o=_[1].name+"")&&le(r,o),b&8&&a!==(a=_[3])&&h(e,"for",a),b&8&&d!==(d=_[3])&&h(f,"id",d),b&2&&p!==(p=_[1].required)&&(f.required=p),b&1&&f.value!==_[0]&&fe(f,_[0])},d(_){_&&w(e),_&&w(u),_&&w(f),m=!1,g()}}}function zM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[HM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function BM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class UM extends ye{constructor(e){super(),ve(this,e,BM,zM,_e,{field:1,value:0})}}function WM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,g;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),S(_,f,b),fe(f,n[0]),m||(g=J(f,"input",n[2]),m=!0)},p(_,b){b&2&&i!==(i=H.getFieldTypeIcon(_[1].type))&&h(t,"class",i),b&2&&o!==(o=_[1].name+"")&&le(r,o),b&8&&a!==(a=_[3])&&h(e,"for",a),b&8&&d!==(d=_[3])&&h(f,"id",d),b&2&&p!==(p=_[1].required)&&(f.required=p),b&1&&f.value!==_[0]&&fe(f,_[0])},d(_){_&&w(e),_&&w(u),_&&w(f),m=!1,g()}}}function YM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[WM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function KM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class JM extends ye{constructor(e){super(),ve(this,e,KM,YM,_e,{field:1,value:0})}}function Np(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[Ee(Ye.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:X,d(l){l&&w(e),i=!1,Ae(s)}}}function ZM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,g,_,b=n[0]&&!n[1].required&&Np(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new au({props:T}),ie.push(()=>he(p,"value",k)),ie.push(()=>he(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),a=Y(" (UTC)"),f=E(),b&&b.c(),d=E(),U(p.$$.fragment),h(t,"class",i=os(H.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,D){S(C,e,D),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,D),b&&b.m(C,D),S(C,d,D),z(p,C,D),_=!0},p(C,D){(!_||D&2&&i!==(i=os(H.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!_||D&2)&&o!==(o=C[1].name+"")&&le(r,o),(!_||D&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,D):(b=Np(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};D&256&&(M.id=C[8]),!m&&D&4&&(m=!0,M.value=C[2],ke(()=>m=!1)),!g&&D&1&&(g=!0,M.formattedValue=C[0],ke(()=>g=!1)),p.$set(M)},i(C){_||(A(p.$$.fragment,C),_=!0)},o(C){P(p.$$.fragment,C),_=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),B(p,C)}}}function GM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[ZM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function XM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class QM extends ye{constructor(e){super(),ve(this,e,XM,GM,_e,{field:1,value:0})}}function Fp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=Y("Select up to "),s=Y(i),l=Y(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&w(e)}}}function xM(n){var $,T,C,D,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,g;function _(O){n[3](O)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((D=n[1].options)==null?void 0:D.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new uu({props:b}),ie.push(()=>he(f,"selected",_));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Fp(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),U(f.$$.fragment),p=E(),k&&k.c(),m=Ce(),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,I),z(f,O,I),S(O,p,I),k&&k.m(O,I),S(O,m,I),g=!0},p(O,I){var F,q,N,R,j;(!g||I&2&&i!==(i=H.getFieldTypeIcon(O[1].type)))&&h(t,"class",i),(!g||I&2)&&o!==(o=O[1].name+"")&&le(r,o),(!g||I&16&&a!==(a=O[4]))&&h(e,"for",a);const L={};I&16&&(L.id=O[4]),I&6&&(L.toggle=!O[1].required||O[2]),I&4&&(L.multiple=O[2]),I&7&&(L.closable=!O[2]||((F=O[0])==null?void 0:F.length)>=((q=O[1].options)==null?void 0:q.maxSelect)),I&2&&(L.items=(N=O[1].options)==null?void 0:N.values),I&2&&(L.searchable=((R=O[1].options)==null?void 0:R.values)>5),!d&&I&1&&(d=!0,L.selected=O[0],ke(()=>d=!1)),f.$set(L),((j=O[1].options)==null?void 0:j.maxSelect)>1?k?k.p(O,I):(k=Fp(O),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(O){g||(A(f.$$.fragment,O),g=!0)},o(O){P(f.$$.fragment,O),g=!1},d(O){O&&w(e),O&&w(u),B(f,O),O&&w(p),k&&k.d(O),O&&w(m)}}}function e6(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[xM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function t6(n,e,t){let i,{field:s=new wn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class n6 extends ye{constructor(e){super(),ve(this,e,t6,e6,_e,{field:1,value:0})}}function i6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,g;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),f=y("textarea"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),S(_,f,b),m||(g=J(f,"input",n[3]),m=!0)},p(_,b){b&2&&i!==(i=H.getFieldTypeIcon(_[1].type))&&h(t,"class",i),b&2&&o!==(o=_[1].name+"")&&le(r,o),b&16&&a!==(a=_[4])&&h(e,"for",a),b&16&&d!==(d=_[4])&&h(f,"id",d),b&2&&p!==(p=_[1].required)&&(f.required=p),b&4&&(f.value=_[2])},d(_){_&&w(e),_&&w(u),_&&w(f),m=!1,g()}}}function s6(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[i6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function l6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class o6 extends ye{constructor(e){super(),ve(this,e,l6,s6,_e,{field:1,value:0})}}function r6(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function a6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!mn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function u6(n){let e;function t(l,o){return l[2]?a6:r6}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:X,o:X,d(l){s.d(l),l&&w(e)}}}function f6(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),H.hasImageExtension(s==null?void 0:s.name)&&H.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class c6 extends ye{constructor(e){super(),ve(this,e,f6,u6,_e,{file:0,size:1})}}function Rp(n){let e;function t(l,o){return l[4]==="image"?p6:d6}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function d6(n){let e,t;return{c(){e=y("object"),t=Y("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function p6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!mn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function m6(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Rp(n);return{c(){i&&i.c(),t=Ce()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Rp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function h6(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[0])),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function _6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=Y(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&le(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function g6(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[_6],header:[h6],default:[m6]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function b6(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){ie[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=H.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class v6 extends ye{constructor(e){super(),ve(this,e,b6,g6,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function y6(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?$6:u[3]==="video"||u[3]==="audio"?S6:w6}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function k6(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function w6(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function S6(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function $6(n){let e,t,i,s,l;return{c(){e=y("img"),mn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!mn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function C6(n){let e,t,i;function s(a,u){return a[2]?k6:y6}let l=s(n),o=l(n),r={};return t=new v6({props:r}),n[12](t),{c(){o.c(),e=E(),U(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),z(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[12](null),B(t,a)}}}function T6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",d="",p=!1;m();async function m(){t(2,p=!0);try{t(10,d=await pe.getAdminFileToken(l.collectionId))}catch(k){console.warn("File token failure:",k)}t(2,p=!1)}function g(){t(5,u="")}const _=k=>{s&&(k.preventDefault(),a==null||a.show(f))};function b(k){ie[k?"unshift":"push"](()=>{a=k,t(4,a)})}return n.$$set=k=>{"record"in k&&t(9,l=k.record),"filename"in k&&t(0,o=k.filename),"size"in k&&t(1,r=k.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=H.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=p?"":pe.files.getUrl(l,o,{token:d})),n.$$.dirty&1541&&t(5,u=p?"":pe.files.getUrl(l,o,{thumb:"100x100",token:d}))},[o,r,p,i,a,u,f,s,g,l,d,_,b]}class cu extends ye{constructor(e){super(),ve(this,e,T6,C6,_e,{record:9,filename:0,size:1})}}function qp(n,e,t){const i=n.slice();return i[27]=e[t],i[29]=t,i}function jp(n,e,t){const i=n.slice();i[30]=e[t],i[29]=t;const s=i[1].includes(i[29]);return i[31]=s,i}function M6(n){let e,t,i;function s(){return n[17](n[29])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Ee(Ye.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ae(i)}}}function O6(n){let e,t,i;function s(){return n[16](n[29])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Vp(n,e){let t,i,s,l,o,r,a=e[30]+"",u,f,d,p,m,g,_;s=new cu({props:{record:e[2],filename:e[30]}});function b(T,C){return C[0]&18&&(g=null),g==null&&(g=!!T[1].includes(T[29])),g?O6:M6}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=Y(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[29])),h(r,"href",f=pe.files.getUrl(e[2],e[30],{token:e[9]})),h(r,"class",d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),_=!0},p(T,C){e=T;const D={};C[0]&4&&(D.record=e[2]),C[0]&16&&(D.filename=e[30]),s.$set(D),(!_||C[0]&18)&&x(i,"fade",e[1].includes(e[29])),(!_||C[0]&16)&&a!==(a=e[30]+"")&&le(u,a),(!_||C[0]&532&&f!==(f=pe.files.getUrl(e[2],e[30],{token:e[9]})))&&h(r,"href",f),(!_||C[0]&18&&d!==(d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){_||(A(s.$$.fragment,T),_=!0)},o(T){P(s.$$.fragment,T),_=!1},d(T){T&&w(t),B(s),$.d()}}}function Hp(n){let e,t,i,s,l,o,r,a,u=n[27].name+"",f,d,p,m,g,_,b;i=new c6({props:{file:n[27]}});function k(){return n[18](n[29])}return{c(){e=y("div"),t=y("figure"),U(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=Y(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[27].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),g=!0,_||(b=[Ee(Ye.call(null,m,"Remove file")),J(m,"click",k)],_=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[27]),i.$set(C),(!g||T[0]&1)&&u!==(u=n[27].name+"")&&le(f,u),(!g||T[0]&1&&d!==(d=n[27].name))&&h(l,"title",d)},i($){g||(A(i.$$.fragment,$),g=!0)},o($){P(i.$$.fragment,$),g=!1},d($){$&&w(e),B(i),_=!1,Ae(b)}}}function D6(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,g,_,b,k,$,T,C,D,M,O,I,L=n[4];const F=j=>j[30]+j[2].id;for(let j=0;jP(N[j],1,1,()=>{N[j]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),f=y("div");for(let j=0;j({26:o}),({uniqueId:o})=>[o?67108864:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(o,r){S(o,e,r),z(t,e,null),i=!0,s||(l=[J(e,"dragover",at(n[23])),J(e,"dragleave",n[24]),J(e,"drop",n[14])],s=!0)},p(o,r){const a={};r[0]&264&&(a.class=` - form-field form-field-list form-field-file - `+(o[3].required?"required":"")+` - `+(o[8]?"dragover":"")+` - `),r[0]&8&&(a.name=o[3].name),r[0]&67110655|r[1]&4&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){P(t.$$.fragment,o),i=!1},d(o){o&&w(e),B(t),s=!1,Ae(l)}}}function A6(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,d,p,m=!1,g="";function _(R){H.removeByValue(u,R),t(1,u)}function b(R){H.pushUnique(u,R),t(1,u)}function k(R){H.isEmpty(a[R])||a.splice(R,1),t(0,a)}function $(){p==null||p.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}function T(R){var V,W;R.preventDefault(),t(8,m=!1);const j=((V=R.dataTransfer)==null?void 0:V.files)||[];if(!(l||!j.length)){for(const ee of j){const te=s.length+a.length-u.length;if(((W=f.options)==null?void 0:W.maxSelect)<=te)break;a.push(ee)}t(0,a)}}en(async()=>{t(9,g=await pe.getAdminFileToken(o.collectionId))});const C=R=>_(R),D=R=>b(R),M=R=>k(R);function O(R){ie[R?"unshift":"push"](()=>{d=R,t(6,d)})}const I=()=>{for(let R of d.files)a.push(R);t(0,a),t(6,d.value=null,d)},L=()=>d==null?void 0:d.click();function F(R){ie[R?"unshift":"push"](()=>{p=R,t(7,p)})}const q=()=>{t(8,m=!0)},N=()=>{t(8,m=!1)};return n.$$set=R=>{"record"in R&&t(2,o=R.record),"value"in R&&t(15,r=R.value),"uploadedFiles"in R&&t(0,a=R.uploadedFiles),"deletedFileIndexes"in R&&t(1,u=R.deletedFileIndexes),"field"in R&&t(3,f=R.field)},n.$$.update=()=>{var R,j;n.$$.dirty[0]&1&&(Array.isArray(a)||t(0,a=H.toArray(a))),n.$$.dirty[0]&2&&(Array.isArray(u)||t(1,u=H.toArray(u))),n.$$.dirty[0]&8&&t(5,i=((R=f.options)==null?void 0:R.maxSelect)>1),n.$$.dirty[0]&32800&&H.isEmpty(r)&&t(15,r=i?[]:""),n.$$.dirty[0]&32768&&t(4,s=H.toArray(r)),n.$$.dirty[0]&27&&t(10,l=(s.length||a.length)&&((j=f.options)==null?void 0:j.maxSelect)<=s.length+a.length-u.length),n.$$.dirty[0]&3&&(a!==-1||u!==-1)&&$()},[a,u,o,f,s,i,d,p,m,g,l,_,b,k,T,r,C,D,M,O,I,L,F,q,N]}class I6 extends ye{constructor(e){super(),ve(this,e,A6,E6,_e,{record:2,value:15,uploadedFiles:0,deletedFileIndexes:1,field:3},null,[-1,-1])}}function zp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function P6(n,e){e=zp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=zp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const L6=n=>({dragging:n&2,dragover:n&4}),Bp=n=>({dragging:n[1],dragover:n[2]});function N6(n){let e,t,i,s;const l=n[8].default,o=wt(l,n,n[7],Bp);return{c(){e=y("div"),o&&o.c(),h(e,"draggable",!0),h(e,"class","draggable svelte-28orm4"),x(e,"dragging",n[1]),x(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[J(e,"dragover",at(n[9])),J(e,"dragleave",at(n[10])),J(e,"dragend",n[11]),J(e,"dragstart",n[12]),J(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&$t(o,l,r,r[7],t?St(l,r[7],a,L6):Ct(r[7]),Bp),(!t||a&2)&&x(e,"dragging",r[1]),(!t||a&4)&&x(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,Ae(s)}}}function F6(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function d($,T){!$&&!a||(t(1,u=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",T))}function p($,T){if(!$&&!a)return;t(2,f=!1),t(1,u=!1),$.dataTransfer.dropEffect="move";const C=parseInt($.dataTransfer.getData("text/plain"));C{t(2,f=!0)},g=()=>{t(2,f=!1)},_=()=>{t(2,f=!1),t(1,u=!1)},b=$=>d($,o),k=$=>p($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(5,r=$.list),"disabled"in $&&t(6,a=$.disabled),"$$scope"in $&&t(7,s=$.$$scope)},[o,u,f,d,p,r,a,s,i,m,g,_,b,k]}class R6 extends ye{constructor(e){super(),ve(this,e,F6,N6,_e,{index:0,list:5,disabled:6})}}function Up(n,e,t){const i=n.slice();i[6]=e[t];const s=H.toArray(i[0][i[6]]).slice(0,5);return i[7]=s,i}function Wp(n,e,t){const i=n.slice();return i[10]=e[t],i}function Yp(n){let e,t;return e=new cu({props:{record:n[0],filename:n[10],size:"xs"}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[10]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Kp(n){let e=!H.isEmpty(n[10]),t,i,s=e&&Yp(n);return{c(){s&&s.c(),t=Ce()},m(l,o){s&&s.m(l,o),S(l,t,o),i=!0},p(l,o){o&3&&(e=!H.isEmpty(l[10])),e?s?(s.p(l,o),o&3&&A(s,1)):(s=Yp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(re(),P(s,1,1,()=>{s=null}),ae())},i(l){i||(A(s),i=!0)},o(l){P(s),i=!1},d(l){s&&s.d(l),l&&w(t)}}}function Jp(n){let e,t,i=n[7],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oP(m[_],1,1,()=>{m[_]=null});return{c(){e=y("div"),t=y("i"),s=E();for(let _=0;_t(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(d=>d.name==u&&d.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class xo extends ye{constructor(e){super(),ve(this,e,j6,q6,_e,{record:0,displayFields:3})}}function Zp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Gp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function Xp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='
    New record
    ',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Qp(n){let e,t;function i(o,r){return o[12]?H6:V6}let s=i(n),l=s(n);return{c(){e=y("div"),l.c(),t=E(),h(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),v(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function V6(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&xp(n);return{c(){e=y("span"),e.textContent="No records found.",t=E(),s&&s.c(),i=Ce(),h(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=xp(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function H6(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function xp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[35]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function z6(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function B6(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function em(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),h(e,"class","actions nonintrusive")},m(o,r){S(o,e,r),v(e,t),i||(s=[Ee(Ye.call(null,t,"Edit")),J(t,"keydown",An(n[27])),J(t,"click",An(l))],i=!0)},p(o,r){n=o},d(o){o&&w(e),i=!1,Ae(s)}}}function tm(n,e){var k;let t,i,s,l,o,r,a,u,f;function d($,T){return $[6]?B6:z6}let p=d(e),m=p(e);l=new xo({props:{record:e[49],displayFields:e[13]}});let g=!((k=e[10])!=null&&k.$isView)&&em(e);function _(){return e[33](e[49])}function b(...$){return e[34](e[49],...$)}return{key:n,first:null,c(){t=y("div"),m.c(),i=E(),s=y("div"),U(l.$$.fragment),o=E(),g&&g.c(),r=E(),h(s,"class","content"),h(t,"tabindex","0"),h(t,"class","list-item handle"),x(t,"selected",e[6]),x(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m($,T){S($,t,T),m.m(t,null),v(t,i),v(t,s),z(l,s,null),v(t,o),g&&g.m(t,null),v(t,r),a=!0,u||(f=[J(t,"click",_),J(t,"keydown",b)],u=!0)},p($,T){var D;e=$,p!==(p=d(e))&&(m.d(1),m=p(e),m&&(m.c(),m.m(t,i)));const C={};T[0]&8&&(C.record=e[49]),T[0]&8192&&(C.displayFields=e[13]),l.$set(C),(D=e[10])!=null&&D.$isView?g&&(g.d(1),g=null):g?g.p(e,T):(g=em(e),g.c(),g.m(t,r)),(!a||T[0]&264)&&x(t,"selected",e[6]),(!a||T[0]&808)&&x(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i($){a||(A(l.$$.fragment,$),a=!0)},o($){P(l.$$.fragment,$),a=!1},d($){$&&w(t),m.d(),B(l),g&&g.d(),u=!1,Ae(f)}}}function nm(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=Y("("),i=Y(t),s=Y(" of MAX "),l=Y(n[5]),o=Y(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&le(i,t),a[0]&32&&le(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function U6(n){let e;return{c(){e=y("p"),e.textContent="No selected records.",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function W6(n){let e,t,i=n[6],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){e=y("div");for(let o=0;o',l=E(),h(s,"type","button"),h(s,"title","Remove"),h(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),h(e,"class","label"),x(e,"label-danger",n[52]),x(e,"label-warning",n[53])},m(f,d){S(f,e,d),z(t,e,null),v(e,i),v(e,s),S(f,l,d),o=!0,r||(a=J(s,"click",u),r=!0)},p(f,d){n=f;const p={};d[0]&64&&(p.record=n[49]),d[0]&8192&&(p.displayFields=n[13]),t.$set(p),(!o||d[1]&2097152)&&x(e,"label-danger",n[52]),(!o||d[1]&4194304)&&x(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){P(t.$$.fragment,f),o=!1},d(f){f&&w(e),B(t),f&&w(l),r=!1,a()}}}function im(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[Y6,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new R6({props:l}),ie.push(()=>he(e,"list",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function K6(n){var q;let e,t,i,s,l,o=[],r=new Map,a,u,f,d,p,m,g,_,b,k,$;t=new Yo({props:{value:n[2],autocompleteCollection:n[10]}}),t.$on("submit",n[30]);let T=!((q=n[10])!=null&&q.$isView)&&Xp(n),C=n[3];const D=N=>N[49].id;for(let N=0;N1&&nm(n);const I=[W6,U6],L=[];function F(N,R){return N[6].length?0:1}return m=F(n),g=L[m]=I[m](n),{c(){e=y("div"),U(t.$$.fragment),i=E(),T&&T.c(),s=E(),l=y("div");for(let N=0;N1?O?O.p(N,R):(O=nm(N),O.c(),O.m(f,null)):O&&(O.d(1),O=null);let V=m;m=F(N),m===V?L[m].p(N,R):(re(),P(L[V],1,1,()=>{L[V]=null}),ae(),g=L[m],g?g.p(N,R):(g=L[m]=I[m](N),g.c()),A(g,1),g.m(_.parentNode,_))},i(N){if(!b){A(t.$$.fragment,N);for(let R=0;RCancel',t=E(),i=y("button"),i.innerHTML='Set selection',h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[28]),J(i,"click",n[29])],s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ae(l)}}}function G6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[Z6],header:[J6],default:[K6]},$$scope:{ctx:n}};for(let a=0;at(26,m=Ne));const g=Tt(),_="picker_"+H.randomString(5);let{value:b}=e,{field:k}=e,$,T,C="",D=[],M=[],O=1,I=0,L=!1,F=!1;function q(){return t(2,C=""),t(3,D=[]),t(6,M=[]),R(),j(!0),$==null?void 0:$.show()}function N(){return $==null?void 0:$.hide()}async function R(){const Ne=H.toArray(b);if(!s||!Ne.length)return;t(24,F=!0);let Te=[];const nt=Ne.slice(),At=[];for(;nt.length>0;){const qt=[];for(const zt of nt.splice(0,Lr))qt.push(`id="${zt}"`);At.push(pe.collection(s).getFullList(Lr,{filter:qt.join("||"),$autoCancel:!1}))}try{await Promise.all(At).then(qt=>{Te=Te.concat(...qt)}),t(6,M=[]);for(const qt of Ne){const zt=H.findByKey(Te,"id",qt);zt&&M.push(zt)}C.trim()||t(3,D=H.filterDuplicatesByKey(M.concat(D)))}catch(qt){pe.errorResponseHandler(qt)}t(24,F=!1)}async function j(Ne=!1){if(s){t(4,L=!0),Ne&&(C.trim()?t(3,D=[]):t(3,D=H.toArray(M).slice()));try{const Te=Ne?1:O+1,nt=H.getAllCollectionIdentifiers(o),At=await pe.collection(s).getList(Te,Lr,{filter:H.normalizeSearchFilter(C,nt),sort:o!=null&&o.$isView?"":"-created",$cancelKey:_+"loadList"});t(3,D=H.filterDuplicatesByKey(D.concat(At.items))),O=At.page,t(23,I=At.totalItems)}catch(Te){pe.errorResponseHandler(Te)}t(4,L=!1)}}function V(Ne){i==1?t(6,M=[Ne]):u&&(H.pushOrReplaceByKey(M,Ne),t(6,M))}function W(Ne){H.removeByKey(M,"id",Ne.id),t(6,M)}function ee(Ne){f(Ne)?W(Ne):V(Ne)}function te(){var Ne;i!=1?t(20,b=M.map(Te=>Te.id)):t(20,b=((Ne=M==null?void 0:M[0])==null?void 0:Ne.id)||""),g("save",M),N()}function G(Ne){me.call(this,n,Ne)}const ce=()=>N(),Q=()=>te(),se=Ne=>t(2,C=Ne.detail),ge=()=>T==null?void 0:T.show(),$e=Ne=>T==null?void 0:T.show(Ne),Ve=Ne=>ee(Ne),Be=(Ne,Te)=>{(Te.code==="Enter"||Te.code==="Space")&&(Te.preventDefault(),Te.stopPropagation(),ee(Ne))},we=()=>t(2,C=""),Oe=()=>{a&&!L&&j()},Ge=Ne=>W(Ne);function mt(Ne){M=Ne,t(6,M)}function Xe(Ne){ie[Ne?"unshift":"push"](()=>{$=Ne,t(1,$)})}function Ke(Ne){me.call(this,n,Ne)}function Se(Ne){me.call(this,n,Ne)}function ue(Ne){ie[Ne?"unshift":"push"](()=>{T=Ne,t(7,T)})}const He=Ne=>{H.removeByKey(D,"id",Ne.detail.id),D.unshift(Ne.detail),t(3,D),V(Ne.detail)},Et=Ne=>{H.removeByKey(D,"id",Ne.detail.id),t(3,D),W(Ne.detail)};return n.$$set=Ne=>{e=je(je({},e),Zt(Ne)),t(19,p=xe(e,d)),"value"in Ne&&t(20,b=Ne.value),"field"in Ne&&t(21,k=Ne.field)},n.$$.update=()=>{var Ne,Te,nt;n.$$.dirty[0]&2097152&&t(5,i=((Ne=k==null?void 0:k.options)==null?void 0:Ne.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(Te=k==null?void 0:k.options)==null?void 0:Te.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(nt=k==null?void 0:k.options)==null?void 0:nt.displayFields),n.$$.dirty[0]&100663296&&t(10,o=m.find(At=>At.id==s)||null),n.$$.dirty[0]&16777222&&typeof C<"u"&&!F&&$!=null&&$.isActive()&&j(!0),n.$$.dirty[0]&16777232&&t(12,r=L||F),n.$$.dirty[0]&8388616&&t(11,a=I>D.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>M.length),n.$$.dirty[0]&64&&t(8,f=function(At){return H.findByKey(M,"id",At.id)})},[N,$,C,D,L,i,M,T,f,u,o,a,r,l,j,V,W,ee,te,p,b,k,q,I,F,s,m,G,ce,Q,se,ge,$e,Ve,Be,we,Oe,Ge,mt,Xe,Ke,Se,ue,He,Et]}class Q6 extends ye{constructor(e){super(),ve(this,e,X6,G6,_e,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function sm(n,e,t){const i=n.slice();return i[17]=e[t],i}function lm(n,e,t){const i=n.slice();return i[20]=e[t],i}function om(n){let e,t=n[5]&&rm(n);return{c(){t&&t.c(),e=Ce()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=rm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function rm(n){let e,t=H.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    - `,h(e,"class","list-item")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function um(n,e){var m;let t,i,s,l,o,r,a,u,f,d;s=new xo({props:{record:e[17],displayFields:(m=e[2].options)==null?void 0:m.displayFields}});function p(){return e[9](e[17])}return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("button"),r.innerHTML='',a=E(),h(i,"class","content"),h(r,"type","button"),h(r,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(o,"class","actions"),h(t,"class","list-item"),this.first=t},m(g,_){S(g,t,_),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(t,a),u=!0,f||(d=[Ee(Ye.call(null,r,"Remove")),J(r,"click",p)],f=!0)},p(g,_){var k;e=g;const b={};_&16&&(b.record=e[17]),_&4&&(b.displayFields=(k=e[2].options)==null?void 0:k.displayFields),s.$set(b)},i(g){u||(A(s.$$.fragment,g),u=!0)},o(g){P(s.$$.fragment,g),u=!1},d(g){g&&w(t),B(s),f=!1,Ae(d)}}}function x6(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p=[],m=new Map,g,_,b,k,$,T,C=n[4];const D=O=>O[17].id;for(let O=0;O - - Open picker`,h(t,"class",i=os(H.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),h(l,"class","txt"),h(e,"for",a=n[16]),h(d,"class","relations-list svelte-1ynw0pc"),h(b,"type","button"),h(b,"class","btn btn-transparent btn-sm btn-block"),h(_,"class","list-item list-item-btn"),h(f,"class","list")},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,I),S(O,f,I),v(f,d);for(let L=0;L({16:r}),({uniqueId:r})=>r?65536:0]},$$scope:{ctx:n}};e=new de({props:l}),n[11](e);let o={value:n[0],field:n[2]};return i=new Q6({props:o}),n[12](i),i.$on("save",n[13]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&8454199&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[11](null),B(e,r),r&&w(t),n[12](null),B(i,r)}}}const fm=100;function t5(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new wn}=e,r,a=[],u=!1,f;function d(){if(u)return!1;const T=H.toArray(s);return t(4,a=a.filter(C=>T.includes(C.id))),T.length!=a.length}async function p(){var M,O;const T=H.toArray(s);if(t(4,a=[]),!((M=o==null?void 0:o.options)!=null&&M.collectionId)||!T.length){t(5,u=!1);return}t(5,u=!0);const C=T.slice(),D=[];for(;C.length>0;){const I=[];for(const L of C.splice(0,fm))I.push(`id="${L}"`);D.push(pe.collection((O=o==null?void 0:o.options)==null?void 0:O.collectionId).getFullList(fm,{filter:I.join("||"),$autoCancel:!1}))}try{let I=[];await Promise.all(D).then(L=>{I=I.concat(...L)});for(const L of T){const F=H.findByKey(I,"id",L);F&&a.push(F)}t(4,a)}catch(I){pe.errorResponseHandler(I)}t(5,u=!1)}function m(T){var C;H.removeByKey(a,"id",T.id),t(4,a),i?t(0,s=a.map(D=>D.id)):t(0,s=((C=a[0])==null?void 0:C.id)||"")}ba(()=>{clearTimeout(f)});const g=T=>m(T),_=()=>l==null?void 0:l.show();function b(T){ie[T?"unshift":"push"](()=>{r=T,t(3,r)})}function k(T){ie[T?"unshift":"push"](()=>{l=T,t(1,l)})}const $=T=>{var C;t(4,a=T.detail||[]),t(0,s=i?a.map(D=>D.id):((C=a[0])==null?void 0:C.id)||"")};return n.$$set=T=>{"value"in T&&t(0,s=T.value),"picker"in T&&t(1,l=T.picker),"field"in T&&t(2,o=T.field)},n.$$.update=()=>{var T;n.$$.dirty&4&&t(6,i=((T=o.options)==null?void 0:T.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed()),n.$$.dirty&273&&d()&&(clearTimeout(f),t(8,f=setTimeout(p,0)))},[s,l,o,r,a,u,i,m,f,g,_,b,k,$]}class n5 extends ye{constructor(e){super(),ve(this,e,t5,e5,_e,{value:0,picker:1,field:2})}}const i5=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],s5=(n,e)=>{i5.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function l5(n){let e;return{c(){e=y("textarea"),h(e,"id",n[0]),qr(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function o5(n){let e;return{c(){e=y("div"),h(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function r5(n){let e;function t(l,o){return l[1]?o5:l5}let i=t(n),s=i(n);return{c(){e=y("div"),s.c(),h(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&h(e,"class",l[2])},i:X,o:X,d(l){l&&w(e),s.d(),n[19](null)}}}const pb=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),a5=()=>{let n={listeners:[],scriptId:pb("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let u5=a5();function f5(n,e,t){var i;let{id:s=pb("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:d="change input undo redo"}=e,{value:p=""}=e,{text:m=""}=e,{cssClass:g="tinymce-wrapper"}=e,_,b,k,$=p,T=o;const C=Tt(),D=()=>{const q=(()=>typeof window<"u"?window:global)();return q&&q.tinymce?q.tinymce:null},M=()=>{const F=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:q=>{t(14,k=q),q.on("init",()=>{q.setContent(p),q.on(d,()=>{t(15,$=q.getContent()),$!==p&&(t(5,p=$),t(6,m=q.getContent({format:"text"})))})}),s5(q,C),typeof f.setup=="function"&&f.setup(q)}});t(4,b.style.visibility="",b),D().init(F)};en(()=>{if(D()!==null)M();else{const F=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;u5.load(_.ownerDocument,F,()=>{M()})}}),ba(()=>{var F;k&&((F=D())===null||F===void 0||F.remove(k))});function O(F){ie[F?"unshift":"push"](()=>{b=F,t(4,b)})}function I(F){ie[F?"unshift":"push"](()=>{b=F,t(4,b)})}function L(F){ie[F?"unshift":"push"](()=>{_=F,t(3,_)})}return n.$$set=F=>{"id"in F&&t(0,s=F.id),"inline"in F&&t(1,l=F.inline),"disabled"in F&&t(7,o=F.disabled),"apiKey"in F&&t(8,r=F.apiKey),"channel"in F&&t(9,a=F.channel),"scriptSrc"in F&&t(10,u=F.scriptSrc),"conf"in F&&t(11,f=F.conf),"modelEvents"in F&&t(12,d=F.modelEvents),"value"in F&&t(5,p=F.value),"text"in F&&t(6,m=F.text),"cssClass"in F&&t(2,g=F.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(k&&$!==p&&(k.setContent(p),t(6,m=k.getContent({format:"text"}))),k&&o!==T&&(t(16,T=o),typeof(t(13,i=k.mode)===null||i===void 0?void 0:i.set)=="function"?k.mode.set(o?"readonly":"design"):k.setMode(o?"readonly":"design")))},[s,l,g,_,b,p,m,o,r,a,u,f,d,i,k,$,T,O,I,L]}class du extends ye{constructor(e){super(),ve(this,e,f5,r5,_e,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function c5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(_){n[2](_)}let g={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()};return n[0]!==void 0&&(g.value=n[0]),f=new du({props:g}),ie.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=Y(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(_,b){S(_,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(_,u,b),z(f,_,b),p=!0},p(_,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(_[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=_[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=_[3]))&&h(e,"for",a);const k={};b&8&&(k.id=_[3]),!d&&b&1&&(d=!0,k.value=_[0],ke(()=>d=!1)),f.$set(k)},i(_){p||(A(f.$$.fragment,_),p=!0)},o(_){P(f.$$.fragment,_),p=!1},d(_){_&&w(e),_&&w(u),B(f,_)}}}function d5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[c5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function p5(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class m5 extends ye{constructor(e){super(),ve(this,e,p5,d5,_e,{field:1,value:0})}}function h5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Auth URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].authUrl),r||(a=J(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].authUrl&&fe(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Token URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].tokenUrl),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&fe(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function g5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("User API URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].userApiUrl),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&fe(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function b5(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[h5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[_5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[g5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Selfhosted endpoints (optional)",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),o=E(),U(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),B(i,u),u&&w(s),B(l,u),u&&w(o),B(r,u)}}}function v5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class cm extends ye{constructor(e){super(),ve(this,e,v5,b5,_e,{key:1,config:0})}}function y5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&fe(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function k5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&fe(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function w5(n){let e,t,i,s,l,o;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[y5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[k5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Azure AD endpoints",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),h(e,"class","section-title")},m(r,a){S(r,e,a),S(r,t,a),z(i,r,a),S(r,s,a),z(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function S5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class $5 extends ye{constructor(e){super(),ve(this,e,S5,w5,_e,{key:1,config:0})}}function C5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/authorize/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&fe(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function T5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/token/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&fe(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function M5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("User API URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/userinfo/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].userApiUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[4]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].userApiUrl&&fe(l,p[0].userApiUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function O5(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[C5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[T5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[M5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Endpoints",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),o=E(),U(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(u[0].enabled?"required":"")),f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&1&&(m.class="form-field "+(u[0].enabled?"required":"")),f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),B(i,u),u&&w(s),B(l,u),u&&w(o),B(r,u)}}}function D5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Nr extends ye{constructor(e){super(),ve(this,e,D5,O5,_e,{key:1,config:0})}}function E5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function A5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Team ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[3]),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&8&&l.value!==u[3]&&fe(l,u[3])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function I5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Key ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[4]),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&16&&l.value!==u[4]&&fe(l,u[4])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function P5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("span"),t.textContent="Duration (in seconds)",i=E(),s=y("i"),o=E(),r=y("input"),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[23]),h(r,"type","text"),h(r,"id",a=n[23]),h(r,"max",po),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[6]),u||(f=[Ee(Ye.call(null,s,{text:`Max ${po} seconds (~${po/(60*60*24*30)<<0} months).`,position:"top"})),J(r,"input",n[15])],u=!0)},p(d,p){p&8388608&&l!==(l=d[23])&&h(e,"for",l),p&8388608&&a!==(a=d[23])&&h(r,"id",a),p&64&&r.value!==d[6]&&fe(r,d[6])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,Ae(f)}}}function L5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=Y("Private key"),s=E(),l=y("textarea"),r=E(),a=y("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",h(e,"for",i=n[23]),h(l,"id",o=n[23]),l.required=!0,h(l,"rows","8"),h(l,"placeholder",`-----BEGIN PRIVATE KEY----- -... ------END PRIVATE KEY-----`),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[5]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[16]),u=!0)},p(d,p){p&8388608&&i!==(i=d[23])&&h(e,"for",i),p&8388608&&o!==(o=d[23])&&h(l,"id",o),p&32&&fe(l,d[5])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function N5(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$;return s=new de({props:{class:"form-field required",name:"clientId",$$slots:{default:[E5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"teamId",$$slots:{default:[A5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"keyId",$$slots:{default:[I5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new de({props:{class:"form-field required",name:"duration",$$slots:{default:[P5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),_=new de({props:{class:"form-field required",name:"privateKey",$$slots:{default:[L5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),a=E(),u=y("div"),U(f.$$.fragment),d=E(),p=y("div"),U(m.$$.fragment),g=E(),U(_.$$.fragment),h(i,"class","col-lg-6"),h(o,"class","col-lg-6"),h(u,"class","col-lg-6"),h(p,"class","col-lg-6"),h(t,"class","grid"),h(e,"id",n[9]),h(e,"autocomplete","off")},m(T,C){S(T,e,C),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),v(t,a),v(t,u),z(f,u,null),v(t,d),v(t,p),z(m,p,null),v(t,g),z(_,t,null),b=!0,k||($=J(e,"submit",at(n[17])),k=!0)},p(T,C){const D={};C&25165828&&(D.$$scope={dirty:C,ctx:T}),s.$set(D);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:T}),r.$set(M);const O={};C&25165840&&(O.$$scope={dirty:C,ctx:T}),f.$set(O);const I={};C&25165888&&(I.$$scope={dirty:C,ctx:T}),m.$set(I);const L={};C&25165856&&(L.$$scope={dirty:C,ctx:T}),_.$set(L)},i(T){b||(A(s.$$.fragment,T),A(r.$$.fragment,T),A(f.$$.fragment,T),A(m.$$.fragment,T),A(_.$$.fragment,T),b=!0)},o(T){P(s.$$.fragment,T),P(r.$$.fragment,T),P(f.$$.fragment,T),P(m.$$.fragment,T),P(_.$$.fragment,T),b=!1},d(T){T&&w(e),B(s),B(r),B(f),B(m),B(_),k=!1,$()}}}function F5(n){let e;return{c(){e=y("h4"),e.textContent="Generate Apple client secret",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function R5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=Y("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Generate and set secret",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[7],h(l,"class","ri-key-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[9]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],x(s,"btn-loading",n[7])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&128&&(e.disabled=d[7]),p&384&&a!==(a=!d[8]||d[7])&&(s.disabled=a),p&128&&x(s,"btn-loading",d[7])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function q5(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[R5],header:[F5],default:[N5]},$$scope:{ctx:n}};return e=new hn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[19](null),B(e,s)}}}const po=15777e3;function j5(n,e,t){let i;const s=Tt(),l="apple_secret_"+H.randomString(5);let o,r,a,u,f,d,p=!1;function m(F={}){t(2,r=F.clientId||""),t(3,a=F.teamId||""),t(4,u=F.keyId||""),t(5,f=F.privateKey||""),t(6,d=F.duration||po),un({}),o==null||o.show()}function g(){return o==null?void 0:o.hide()}async function _(){t(7,p=!0);try{const F=await pe.settings.generateAppleClientSecret(r,a,u,f.trim(),d);t(7,p=!1),xt("Successfully generated client secret."),s("submit",F),o==null||o.hide()}catch(F){pe.errorResponseHandler(F)}t(7,p=!1)}function b(){r=this.value,t(2,r)}function k(){a=this.value,t(3,a)}function $(){u=this.value,t(4,u)}function T(){d=this.value,t(6,d)}function C(){f=this.value,t(5,f)}const D=()=>_(),M=()=>!p;function O(F){ie[F?"unshift":"push"](()=>{o=F,t(1,o)})}function I(F){me.call(this,n,F)}function L(F){me.call(this,n,F)}return t(8,i=!0),[g,o,r,a,u,f,d,p,i,l,_,m,b,k,$,T,C,D,M,O,I,L]}class V5 extends ye{constructor(e){super(),ve(this,e,j5,q5,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function H5(n){let e,t,i,s,l,o,r,a,u,f,d={};return r=new V5({props:d}),n[4](r),r.$on("submit",n[5]),{c(){e=y("button"),t=y("i"),i=E(),s=y("span"),s.textContent="Generate secret",o=E(),U(r.$$.fragment),h(t,"class","ri-key-line"),h(s,"class","txt"),h(e,"type","button"),h(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),S(p,o,m),z(r,p,m),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(p,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+p[1]))&&h(e,"class",l);const g={};r.$set(g)},i(p){a||(A(r.$$.fragment,p),a=!0)},o(p){P(r.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(o),n[4](null),B(r,p),u=!1,f()}}}function z5(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){ie[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class B5 extends ye{constructor(e){super(),ve(this,e,z5,H5,_e,{key:1,config:0})}}const mo=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:B5},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:$5},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:cm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:cm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Nr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Nr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Nr}];function dm(n,e,t){const i=n.slice();return i[9]=e[t],i}function U5(n){let e;return{c(){e=y("h6"),e.textContent="No linked OAuth2 providers.",h(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function W5(n){let e,t=n[1],i=[];for(let s=0;s',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function pm(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,d,p=n[9].providerId+"",m,g,_,b,k,$;function T(){return n[6](n[9])}return{c(){var C;e=y("div"),t=y("figure"),i=y("img"),l=E(),o=y("span"),a=Y(r),u=E(),f=y("div"),d=Y("ID: "),m=Y(p),g=E(),_=y("button"),_.innerHTML='',b=E(),mn(i.src,s="./images/oauth2/"+((C=n[3](n[9].provider))==null?void 0:C.logo))||h(i,"src",s),h(i,"alt","Provider logo"),h(t,"class","provider-logo"),h(o,"class","txt"),h(f,"class","txt-hint"),h(_,"type","button"),h(_,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),h(e,"class","list-item")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(e,l),v(e,o),v(o,a),v(e,u),v(e,f),v(f,d),v(f,m),v(e,g),v(e,_),v(e,b),k||($=J(_,"click",T),k=!0)},p(C,D){var M;n=C,D&2&&!mn(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&h(i,"src",s),D&2&&r!==(r=n[4](n[9].provider)+"")&&le(a,r),D&2&&p!==(p=n[9].providerId+"")&&le(m,p)},d(C){C&&w(e),k=!1,$()}}}function K5(n){let e;function t(l,o){var r;return l[2]?Y5:(r=l[0])!=null&&r.id&&l[1].length?W5:U5}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:X,o:X,d(l){s.d(l),l&&w(e)}}}function J5(n,e,t){const i=Tt();let{record:s}=e,l=[],o=!1;function r(p){return mo.find(m=>m.key==p+"Auth")||{}}function a(p){var m;return((m=r(p))==null?void 0:m.title)||H.sentenize(p,!1)}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await pe.collection(s.collectionId).listExternalAuths(s.id))}catch(p){pe.errorResponseHandler(p)}t(2,o=!1)}function f(p){!(s!=null&&s.id)||!p||vn(`Do you really want to unlink the ${a(p)} provider?`,()=>pe.collection(s.collectionId).unlinkExternalAuth(s.id,p).then(()=>{xt(`Successfully unlinked the ${a(p)} provider.`),i("unlink",p),u()}).catch(m=>{pe.errorResponseHandler(m)}))}u();const d=p=>f(p.provider);return n.$$set=p=>{"record"in p&&t(0,s=p.record)},[s,l,o,r,a,f,d]}class Z5 extends ye{constructor(e){super(),ve(this,e,J5,K5,_e,{record:0})}}function mm(n,e,t){const i=n.slice();return i[66]=e[t],i[67]=e,i[68]=t,i}function hm(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=Y(`The record has previous unsaved changes. - `),r=y("button"),r.textContent="Restore draft",a=E(),u=y("button"),u.innerHTML='',f=E(),d=y("div"),h(i,"class","icon"),h(r,"type","button"),h(r,"class","btn btn-sm btn-secondary"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(u,"aria-label","Discard draft"),h(t,"class","alert alert-info m-0"),h(d,"class","clearfix p-b-base"),h(e,"class","block")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(t,a),v(t,u),v(e,f),v(e,d),m=!0,g||(_=[J(r,"click",n[36]),Ee(Ye.call(null,u,"Discard draft")),J(u,"click",at(n[37]))],g=!0)},p:X,i(b){m||(p&&p.end(1),m=!0)},o(b){p=wa(e,bt,{duration:150}),m=!1},d(b){b&&w(e),b&&p&&p.end(),g=!1,Ae(_)}}}function _m(n){let e,t,i,s,l;return{c(){e=y("div"),t=y("i"),h(t,"class","ri-calendar-event-line txt-disabled"),h(e,"class","form-field-addon")},m(o,r){S(o,e,r),v(e,t),s||(l=Ee(i=Ye.call(null,t,{text:`Created: ${n[3].created} -Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&Ht(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created} -Updated: ${o[3].updated}`,position:"left"})},d(o){o&&w(e),s=!1,l()}}}function G5(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_=!n[6]&&_m(n);return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",l=E(),o=y("span"),a=E(),_&&_.c(),u=E(),f=y("input"),h(t,"class",os(H.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),h(s,"class","txt"),h(o,"class","flex-fill"),h(e,"for",r=n[69]),h(f,"type","text"),h(f,"id",d=n[69]),h(f,"placeholder","Leave empty to auto generate..."),h(f,"minlength","15"),f.readOnly=p=!n[6]},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),S(b,a,k),_&&_.m(b,k),S(b,u,k),S(b,f,k),fe(f,n[3].id),m||(g=J(f,"input",n[38]),m=!0)},p(b,k){k[2]&128&&r!==(r=b[69])&&h(e,"for",r),b[6]?_&&(_.d(1),_=null):_?_.p(b,k):(_=_m(b),_.c(),_.m(u.parentNode,u)),k[2]&128&&d!==(d=b[69])&&h(f,"id",d),k[0]&64&&p!==(p=!b[6])&&(f.readOnly=p),k[0]&8&&f.value!==b[3].id&&fe(f,b[3].id)},d(b){b&&w(e),b&&w(a),_&&_.d(b),b&&w(u),b&&w(f),m=!1,g()}}}function gm(n){var u,f;let e,t,i,s,l;function o(d){n[39](d)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new CM({props:r}),ie.push(()=>he(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&bm();return{c(){U(e.$$.fragment),i=E(),a&&a.c(),s=Ce()},m(d,p){z(e,d,p),S(d,i,p),a&&a.m(d,p),S(d,s,p),l=!0},p(d,p){var g,_;const m={};p[0]&64&&(m.isNew=d[6]),p[0]&1&&(m.collection=d[0]),!t&&p[0]&8&&(t=!0,m.record=d[3],ke(()=>t=!1)),e.$set(m),(_=(g=d[0])==null?void 0:g.schema)!=null&&_.length?a||(a=bm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(d){l||(A(e.$$.fragment,d),l=!0)},o(d){P(e.$$.fragment,d),l=!1},d(d){B(e,d),d&&w(i),a&&a.d(d),d&&w(s)}}}function bm(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function X5(n){let e,t,i;function s(o){n[52](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new n5({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function Q5(n){let e,t,i,s,l;function o(f){n[49](f,n[66])}function r(f){n[50](f,n[66])}function a(f){n[51](f,n[66])}let u={field:n[66],record:n[3]};return n[3][n[66].name]!==void 0&&(u.value=n[3][n[66].name]),n[4][n[66].name]!==void 0&&(u.uploadedFiles=n[4][n[66].name]),n[5][n[66].name]!==void 0&&(u.deletedFileIndexes=n[5][n[66].name]),e=new I6({props:u}),ie.push(()=>he(e,"value",o)),ie.push(()=>he(e,"uploadedFiles",r)),ie.push(()=>he(e,"deletedFileIndexes",a)),{c(){U(e.$$.fragment)},m(f,d){z(e,f,d),l=!0},p(f,d){n=f;const p={};d[0]&1&&(p.field=n[66]),d[0]&8&&(p.record=n[3]),!t&&d[0]&9&&(t=!0,p.value=n[3][n[66].name],ke(()=>t=!1)),!i&&d[0]&17&&(i=!0,p.uploadedFiles=n[4][n[66].name],ke(()=>i=!1)),!s&&d[0]&33&&(s=!0,p.deletedFileIndexes=n[5][n[66].name],ke(()=>s=!1)),e.$set(p)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){B(e,f)}}}function x5(n){let e,t,i;function s(o){n[48](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new o6({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function eO(n){let e,t,i;function s(o){n[47](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new n6({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function tO(n){let e,t,i;function s(o){n[46](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new QM({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function nO(n){let e,t,i;function s(o){n[45](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new m5({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function iO(n){let e,t,i;function s(o){n[44](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new JM({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function sO(n){let e,t,i;function s(o){n[43](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new UM({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function lO(n){let e,t,i;function s(o){n[42](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new VM({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function oO(n){let e,t,i;function s(o){n[41](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new FM({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function rO(n){let e,t,i;function s(o){n[40](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new IM({props:l}),ie.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function vm(n,e){let t,i,s,l,o;const r=[rO,oO,lO,sO,iO,nO,tO,eO,x5,Q5,X5],a=[];function u(f,d){return f[66].type==="text"?0:f[66].type==="number"?1:f[66].type==="bool"?2:f[66].type==="email"?3:f[66].type==="url"?4:f[66].type==="editor"?5:f[66].type==="date"?6:f[66].type==="select"?7:f[66].type==="json"?8:f[66].type==="file"?9:f[66].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Ce(),s&&s.c(),l=Ce(),this.first=t},m(f,d){S(f,t,d),~i&&a[i].m(f,d),S(f,l,d),o=!0},p(f,d){e=f;let p=i;i=u(e),i===p?~i&&a[i].p(e,d):(s&&(re(),P(a[p],1,1,()=>{a[p]=null}),ae()),~i?(s=a[i],s?s.p(e,d):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function ym(n){let e,t,i;return t=new Z5({props:{record:n[3]}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[12]===Sl)},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&x(e,"active",s[12]===Sl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function aO(n){var $,T;let e,t,i,s,l,o,r=[],a=new Map,u,f,d,p,m=!n[7]&&n[9]&&hm(n);s=new de({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[G5,({uniqueId:C})=>({69:C}),({uniqueId:C})=>[0,0,C?128:0]]},$$scope:{ctx:n}}});let g=(($=n[0])==null?void 0:$.isAuth)&&gm(n),_=((T=n[0])==null?void 0:T.schema)||[];const b=C=>C[66].name;for(let C=0;C<_.length;C+=1){let D=mm(n,_,C),M=b(D);a.set(M,r[C]=vm(M,D))}let k=n[0].$isAuth&&!n[6]&&ym(n);return{c(){e=y("div"),t=y("form"),m&&m.c(),i=E(),U(s.$$.fragment),l=E(),g&&g.c(),o=E();for(let C=0;C{m=null}),ae());const M={};D[0]&64&&(M.class="form-field "+(C[6]?"":"readonly")),D[0]&72|D[2]&384&&(M.$$scope={dirty:D,ctx:C}),s.$set(M),(O=C[0])!=null&&O.isAuth?g?(g.p(C,D),D[0]&1&&A(g,1)):(g=gm(C),g.c(),A(g,1),g.m(t,o)):g&&(re(),P(g,1,1,()=>{g=null}),ae()),D[0]&57&&(_=((I=C[0])==null?void 0:I.schema)||[],re(),r=yt(r,D,b,1,C,_,a,t,Jt,vm,null,mm),ae()),(!f||D[0]&4096)&&x(t,"active",C[12]===ls),C[0].$isAuth&&!C[6]?k?(k.p(C,D),D[0]&65&&A(k,1)):(k=ym(C),k.c(),A(k,1),k.m(e,null)):k&&(re(),P(k,1,1,()=>{k=null}),ae())},i(C){if(!f){A(m),A(s.$$.fragment,C),A(g);for(let D=0;D<_.length;D+=1)A(r[D]);A(k),f=!0}},o(C){P(m),P(s.$$.fragment,C),P(g);for(let D=0;D - Send verification email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[30]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Sm(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Send password reset email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function uO(n){let e,t,i,s,l,o,r,a=n[0].$isAuth&&!n[2].verified&&n[2].email&&wm(n),u=n[0].$isAuth&&n[2].email&&Sm(n);return{c(){a&&a.c(),e=E(),u&&u.c(),t=E(),i=y("button"),i.innerHTML=` - Duplicate`,s=E(),l=y("button"),l.innerHTML=` - Delete`,h(i,"type","button"),h(i,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item txt-danger closable")},m(f,d){a&&a.m(f,d),S(f,e,d),u&&u.m(f,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),o||(r=[J(i,"click",n[32]),J(l,"click",An(at(n[33])))],o=!0)},p(f,d){f[0].$isAuth&&!f[2].verified&&f[2].email?a?a.p(f,d):(a=wm(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].$isAuth&&f[2].email?u?u.p(f,d):(u=Sm(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Ae(r)}}}function $m(n){let e,t,i,s,l,o;return{c(){e=y("div"),t=y("button"),t.textContent="Account",i=E(),s=y("button"),s.textContent="Authorized providers",h(t,"type","button"),h(t,"class","tab-item"),x(t,"active",n[12]===ls),h(s,"type","button"),h(s,"class","tab-item"),x(s,"active",n[12]===Sl),h(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),l||(o=[J(t,"click",n[34]),J(s,"click",n[35])],l=!0)},p(r,a){a[0]&4096&&x(t,"active",r[12]===ls),a[0]&4096&&x(s,"active",r[12]===Sl)},d(r){r&&w(e),l=!1,Ae(o)}}}function fO(n){var _;let e,t=n[6]?"New":"Edit",i,s,l,o=((_=n[0])==null?void 0:_.name)+"",r,a,u,f,d,p,m=!n[6]&&km(n),g=n[0].$isAuth&&!n[6]&&$m(n);return{c(){e=y("h4"),i=Y(t),s=E(),l=y("strong"),r=Y(o),a=Y(" record"),u=E(),m&&m.c(),f=E(),g&&g.c(),d=Ce(),h(e,"class","panel-title svelte-qc5ngu")},m(b,k){S(b,e,k),v(e,i),v(e,s),v(e,l),v(l,r),v(e,a),S(b,u,k),m&&m.m(b,k),S(b,f,k),g&&g.m(b,k),S(b,d,k),p=!0},p(b,k){var $;(!p||k[0]&64)&&t!==(t=b[6]?"New":"Edit")&&le(i,t),(!p||k[0]&1)&&o!==(o=(($=b[0])==null?void 0:$.name)+"")&&le(r,o),b[6]?m&&(re(),P(m,1,1,()=>{m=null}),ae()):m?(m.p(b,k),k[0]&64&&A(m,1)):(m=km(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].$isAuth&&!b[6]?g?g.p(b,k):(g=$m(b),g.c(),g.m(d.parentNode,d)):g&&(g.d(1),g=null)},i(b){p||(A(m),p=!0)},o(b){P(m),p=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),g&&g.d(b),b&&w(d)}}}function cO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=Y(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[10],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[15]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[13]||n[10],x(s,"btn-loading",n[10])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=J(e,"click",n[29]),u=!0)},p(d,p){p[0]&1024&&(e.disabled=d[10]),p[0]&64&&o!==(o=d[6]?"Create":"Save changes")&&le(r,o),p[0]&9216&&a!==(a=!d[13]||d[10])&&(s.disabled=a),p[0]&1024&&x(s,"btn-loading",d[10])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function dO(n){var s;let e,t,i={class:` - record-panel - `+(n[14]?"overlay-panel-xl":"overlay-panel-lg")+` - `+((s=n[0])!=null&&s.$isAuth&&!n[6]?"colored-header":"")+` - `,beforeHide:n[53],$$slots:{footer:[cO],header:[fO],default:[aO]},$$scope:{ctx:n}};return e=new hn({props:i}),n[54](e),e.$on("hide",n[55]),e.$on("show",n[56]),{c(){U(e.$$.fragment)},m(l,o){z(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&16449&&(r.class=` - record-panel - `+(l[14]?"overlay-panel-xl":"overlay-panel-lg")+` - `+((a=l[0])!=null&&a.$isAuth&&!l[6]?"colored-header":"")+` - `),o[0]&2176&&(r.beforeHide=l[53]),o[0]&14077|o[2]&256&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[54](null),B(e,l)}}}const ls="form",Sl="providers";function pO(n,e,t){let i,s,l,o;const r=Tt(),a="record_"+H.randomString(5);let{collection:u}=e,f,d=null,p=null,m=null,g=!1,_=!1,b={},k={},$=JSON.stringify(null),T=$,C=ls,D=!0,M=!1;function O(be){return L(be),t(11,_=!0),t(12,C=ls),f==null?void 0:f.show()}function I(){return f==null?void 0:f.hide()}async function L(be){t(27,M=!1),un({}),t(2,d=be||new ki),t(3,p=d.$clone()),t(4,b={}),t(5,k={}),await an(),t(9,m=N()),!m||V(p,m)?t(9,m=null):(delete m.password,delete m.passwordConfirm),t(25,$=JSON.stringify(p)),t(27,M=!0)}async function F(be){var Re,Qe;un({}),t(2,d=be||new ki),t(4,b={}),t(5,k={});const Ie=((Qe=(Re=u==null?void 0:u.schema)==null?void 0:Re.filter(Ot=>Ot.type!="file"))==null?void 0:Qe.map(Ot=>Ot.name))||[];for(let Ot in be.$export())Ie.includes(Ot)||t(3,p[Ot]=be[Ot],p);await an(),t(25,$=JSON.stringify(p)),W()}function q(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function N(be){try{const Ie=window.localStorage.getItem(q());if(Ie)return new ki(JSON.parse(Ie))}catch{}return be}function R(be){window.localStorage.setItem(q(),be)}function j(){m&&(t(3,p=m),t(9,m=null))}function V(be,Ie){var $n;const Re=be==null?void 0:be.$clone(),Qe=Ie==null?void 0:Ie.$clone(),Ot=($n=u==null?void 0:u.schema)==null?void 0:$n.filter(Fn=>Fn.type==="file");for(let Fn of Ot)Re==null||delete Re[Fn.name],Qe==null||delete Qe[Fn.name];return Re==null||delete Re.password,Re==null||delete Re.passwordConfirm,Qe==null||delete Qe.password,Qe==null||delete Qe.passwordConfirm,JSON.stringify(Re)==JSON.stringify(Qe)}function W(){t(9,m=null),window.localStorage.removeItem(q())}function ee(be=!0){if(g||!o||!(u!=null&&u.id))return;t(10,g=!0);const Ie=G();let Re;D?Re=pe.collection(u.id).create(Ie):Re=pe.collection(u.id).update(p.id,Ie),Re.then(Qe=>{xt(D?"Successfully created record.":"Successfully updated record."),W(),be?(t(11,_=!1),I()):F(Qe),r("save",Qe)}).catch(Qe=>{pe.errorResponseHandler(Qe)}).finally(()=>{t(10,g=!1)})}function te(){d!=null&&d.id&&vn("Do you really want to delete the selected record?",()=>pe.collection(d.collectionId).delete(d.id).then(()=>{I(),xt("Successfully deleted record."),r("delete",d)}).catch(be=>{pe.errorResponseHandler(be)}))}function G(){const be=(p==null?void 0:p.$export())||{},Ie=new FormData,Re={id:be.id};for(const Qe of(u==null?void 0:u.schema)||[])Re[Qe.name]=!0;u!=null&&u.isAuth&&(Re.username=!0,Re.email=!0,Re.emailVisibility=!0,Re.password=!0,Re.passwordConfirm=!0,Re.verified=!0);for(const Qe in be)Re[Qe]&&(typeof be[Qe]>"u"&&(be[Qe]=null),H.addValueToFormData(Ie,Qe,be[Qe]));for(const Qe in b){const Ot=H.toArray(b[Qe]);for(const $n of Ot)Ie.append(Qe,$n)}for(const Qe in k){const Ot=H.toArray(k[Qe]);for(const $n of Ot)Ie.append(Qe+"."+$n,"")}return Ie}function ce(){!(u!=null&&u.id)||!(d!=null&&d.email)||vn(`Do you really want to sent verification email to ${d.email}?`,()=>pe.collection(u.id).requestVerification(d.email).then(()=>{xt(`Successfully sent verification email to ${d.email}.`)}).catch(be=>{pe.errorResponseHandler(be)}))}function Q(){!(u!=null&&u.id)||!(d!=null&&d.email)||vn(`Do you really want to sent password reset email to ${d.email}?`,()=>pe.collection(u.id).requestPasswordReset(d.email).then(()=>{xt(`Successfully sent password reset email to ${d.email}.`)}).catch(be=>{pe.errorResponseHandler(be)}))}function se(){l?vn("You have unsaved changes. Do you really want to discard them?",()=>{ge()}):ge()}async function ge(){const be=d==null?void 0:d.$clone();if(be){be.id="",be.created="",be.updated="";const Ie=(u==null?void 0:u.schema)||[];for(const Re of Ie)Re.type==="file"&&delete be[Re.name]}W(),O(be),await an(),t(25,$="")}function $e(be){(be.ctrlKey||be.metaKey)&&be.code=="KeyS"&&(be.preventDefault(),be.stopPropagation(),ee(!1))}const Ve=()=>I(),Be=()=>ce(),we=()=>Q(),Oe=()=>se(),Ge=()=>te(),mt=()=>t(12,C=ls),Xe=()=>t(12,C=Sl),Ke=()=>j(),Se=()=>W();function ue(){p.id=this.value,t(3,p)}function He(be){p=be,t(3,p)}function Et(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function Ne(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function Te(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function nt(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function At(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function qt(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function zt(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function Ln(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function ti(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function Sn(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}function ht(be,Ie){n.$$.not_equal(b[Ie.name],be)&&(b[Ie.name]=be,t(4,b))}function Nn(be,Ie){n.$$.not_equal(k[Ie.name],be)&&(k[Ie.name]=be,t(5,k))}function ds(be,Ie){n.$$.not_equal(p[Ie.name],be)&&(p[Ie.name]=be,t(3,p))}const ni=()=>l&&_?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,_=!1),I()}),!1):(un({}),W(),!0);function Ti(be){ie[be?"unshift":"push"](()=>{f=be,t(8,f)})}function ps(be){me.call(this,n,be)}function pi(be){me.call(this,n,be)}return n.$$set=be=>{"collection"in be&&t(0,u=be.collection)},n.$$.update=()=>{var be;n.$$.dirty[0]&1&&t(14,i=!!((be=u==null?void 0:u.schema)!=null&&be.find(Ie=>Ie.type==="editor"))),n.$$.dirty[0]&48&&t(28,s=H.hasNonEmptyProps(b)||H.hasNonEmptyProps(k)),n.$$.dirty[0]&8&&t(26,T=JSON.stringify(p)),n.$$.dirty[0]&369098752&&t(7,l=s||$!=T),n.$$.dirty[0]&4&&t(6,D=!d||d.$isNew),n.$$.dirty[0]&192&&t(13,o=D||l),n.$$.dirty[0]&201326592&&M&&R(T)},[u,I,d,p,b,k,D,l,f,m,g,_,C,o,i,a,j,W,ee,te,ce,Q,se,$e,O,$,T,M,s,Ve,Be,we,Oe,Ge,mt,Xe,Ke,Se,ue,He,Et,Ne,Te,nt,At,qt,zt,Ln,ti,Sn,ht,Nn,ds,ni,Ti,ps,pi]}class mb extends ye{constructor(e){super(),ve(this,e,pO,dO,_e,{collection:0,show:24,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[1]}}function mO(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Ee(i=Ye.call(null,e,n[2]?"":"Copy")),J(e,"click",An(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&h(e,"class",t),i&&Ht(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:X,o:X,d(o){o&&w(e),s=!1,Ae(l)}}}function hO(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(H.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return en(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class er extends ye{constructor(e){super(),ve(this,e,hO,mO,_e,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Cm(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Tm(n,e,t){const i=n.slice();return i[13]=e[t],i}function Mm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Om(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function _O(n){const e=n.slice(),t=H.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function gO(n){const e=n.slice(),t=H.toArray(e[3]);e[9]=t;const i=H.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function bO(n){const e=n.slice(),t=H.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function vO(n){let e,t;return{c(){e=y("div"),t=Y(n[3]),h(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&le(t,i[3])},i:X,o:X,d(i){i&&w(e)}}}function yO(n){let e,t=H.truncate(n[3])+"",i,s;return{c(){e=y("span"),i=Y(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=H.truncate(n[3]))},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&8&&t!==(t=H.truncate(l[3])+"")&&le(i,t),o&8&&s!==(s=H.truncate(l[3]))&&h(e,"title",s)},i:X,o:X,d(l){l&&w(e)}}}function kO(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=u=>u[8]+u[18];for(let u=0;un[17]&&Em();return{c(){e=y("div");for(let u=0;uu[17]?a||(a=Em(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Pm();return{c(){e=y("div"),i.c(),s=E(),u&&u.c(),h(e,"class","inline-flex")},m(f,d){S(f,e,d),r[t].m(e,null),v(e,s),u&&u.m(e,null),l=!0},p(f,d){let p=t;t=a(f),t===p?r[t].p(f,d):(re(),P(r[p],1,1,()=>{r[p]=null}),ae(),i=r[t],i?i.p(f,d):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Pm(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function SO(n){let e,t=[],i=new Map,s=H.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function TO(n){let e,t=H.truncate(n[3])+"",i,s,l;return{c(){e=y("a"),i=Y(t),h(e,"class","txt-ellipsis"),h(e,"href",n[3]),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(o,r){S(o,e,r),v(e,i),s||(l=[Ee(Ye.call(null,e,"Open in new tab")),J(e,"click",An(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=H.truncate(o[3])+"")&&le(i,t),r&8&&h(e,"href",o[3])},i:X,o:X,d(o){o&&w(e),s=!1,Ae(l)}}}function MO(n){let e,t;return{c(){e=y("span"),t=Y(n[3]),h(e,"class","txt")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&le(t,i[3])},i:X,o:X,d(i){i&&w(e)}}}function OO(n){let e,t=n[3]?"True":"False",i;return{c(){e=y("span"),i=Y(t),h(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&le(i,t)},i:X,o:X,d(s){s&&w(e)}}}function DO(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function EO(n){let e,t,i,s;const l=[FO,NO],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ce()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Dm(n,e){let t,i,s;return i=new cu({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=Ce(),U(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),B(i,l)}}}function Em(n){let e;return{c(){e=Y("...")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function AO(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Nm(n);return{c(){e=y("span"),i=Y(t),s=E(),r&&r.c(),l=Ce(),h(e,"class","txt")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=H.truncate(a[5],500,!0)+"")&&le(i,t),a[5].length>500?r?(r.p(a,u),u&8&&A(r,1)):(r=Nm(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(re(),P(r,1,1,()=>{r=null}),ae())},i(a){o||(A(r),o=!0)},o(a){P(r),o=!1},d(a){a&&w(e),a&&w(s),r&&r.d(a),a&&w(l)}}}function FO(n){let e,t=H.truncate(n[5])+"",i;return{c(){e=y("span"),i=Y(t),h(e,"class","txt txt-ellipsis")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=H.truncate(s[5])+"")&&le(i,t)},i:X,o:X,d(s){s&&w(e)}}}function Nm(n){let e,t;return e=new er({props:{value:JSON.stringify(n[3],null,2)}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function RO(n){let e,t,i,s,l;const o=[EO,DO,OO,MO,TO,CO,$O,SO,wO,kO,yO,vO],r=[];function a(f,d){return d&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!H.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,d){return d===0?bO(f):d===8?gO(f):d===9?_O(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=Ce()},m(f,d){r[t].m(f,d),S(f,s,d),l=!0},p(f,[d]){let p=t;t=a(f,d),t===p?r[t].p(u(f,t),d):(re(),P(r[p],1,1,()=>{r[p]=null}),ae(),i=r[t],i?i.p(u(f,t),d):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){r[t].d(f),f&&w(s)}}}function qO(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){me.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class hb extends ye{constructor(e){super(),ve(this,e,qO,RO,_e,{record:0,field:1,short:2})}}function Fm(n,e,t){const i=n.slice();return i[10]=e[t],i}function Rm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new hb({props:{field:n[10],record:n[3]}}),{c(){e=y("tr"),t=y("td"),s=Y(i),l=E(),o=y("td"),U(r.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(o,"class","col-field svelte-1nt58f7")},m(u,f){S(u,e,f),v(e,t),v(t,s),v(e,l),v(e,o),z(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&le(s,i);const d={};f&1&&(d.field=u[10]),f&8&&(d.record=u[3]),r.$set(d)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){P(r.$$.fragment,u),a=!1},d(u){u&&w(e),B(r)}}}function qm(n){let e,t,i,s,l,o;return l=new Si({props:{date:n[3].created}}),{c(){e=y("tr"),t=y("td"),t.textContent="created",i=E(),s=y("td"),U(l.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(l)}}}function jm(n){let e,t,i,s,l,o;return l=new Si({props:{date:n[3].updated}}),{c(){e=y("tr"),t=y("td"),t.textContent="updated",i=E(),s=y("td"),U(l.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(l)}}}function jO(n){var M;let e,t,i,s,l,o,r,a,u,f,d=n[3].id+"",p,m,g,_,b;a=new er({props:{value:n[3].id}});let k=(M=n[0])==null?void 0:M.schema,$=[];for(let O=0;OP($[O],1,1,()=>{$[O]=null});let C=n[3].created&&qm(n),D=n[3].updated&&jm(n);return{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="id",l=E(),o=y("td"),r=y("div"),U(a.$$.fragment),u=E(),f=y("span"),p=Y(d),m=E();for(let O=0;O<$.length;O+=1)$[O].c();g=E(),C&&C.c(),_=E(),D&&D.c(),h(s,"class","min-width txt-hint txt-bold"),h(f,"class","txt"),h(r,"class","label"),h(o,"class","col-field svelte-1nt58f7"),h(e,"class","table-border preview-table")},m(O,I){S(O,e,I),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,r),z(a,r,null),v(r,u),v(r,f),v(f,p),v(t,m);for(let L=0;L<$.length;L+=1)$[L]&&$[L].m(t,null);v(t,g),C&&C.m(t,null),v(t,_),D&&D.m(t,null),b=!0},p(O,I){var F;const L={};if(I&8&&(L.value=O[3].id),a.$set(L),(!b||I&8)&&d!==(d=O[3].id+"")&&le(p,d),I&9){k=(F=O[0])==null?void 0:F.schema;let q;for(q=0;q{C=null}),ae()),O[3].updated?D?(D.p(O,I),I&8&&A(D,1)):(D=jm(O),D.c(),A(D,1),D.m(t,null)):D&&(re(),P(D,1,1,()=>{D=null}),ae())},i(O){if(!b){A(a.$$.fragment,O);for(let I=0;IClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[6]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function zO(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[HO],header:[VO],default:[jO]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function BO(n,e,t){let i,{collection:s}=e,l,o=new ki;function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(m){ie[m?"unshift":"push"](()=>{l=m,t(2,l)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(g=>g.type==="editor")))},[s,a,l,o,i,r,u,f,d,p]}class UO extends ye{constructor(e){super(),ve(this,e,BO,zO,_e,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function Vm(n,e,t){const i=n.slice();return i[55]=e[t],i}function Hm(n,e,t){const i=n.slice();return i[58]=e[t],i}function zm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Bm(n,e,t){const i=n.slice();return i[51]=e[t],i}function Um(n){let e;function t(l,o){return l[12]?YO:WO}let i=t(n),s=i(n);return{c(){e=y("th"),s.c(),h(e,"class","bulk-select-col min-width")},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function WO(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("input"),s=E(),l=y("label"),h(t,"type","checkbox"),h(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],h(l,"for","checkbox_0"),h(e,"class","form-field")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),o||(r=J(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&w(e),o=!1,r()}}}function YO(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Wm(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[KO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),ie.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function KO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="id",h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function Ym(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Km(n),r=i&&Jm(n);return{c(){o&&o.c(),t=E(),r&&r.c(),s=Ce()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=Km(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(re(),P(o,1,1,()=>{o=null}),ae()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Jm(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(re(),P(r,1,1,()=>{r=null}),ae())},i(a){l||(A(o),A(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function Km(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[JO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),ie.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function JO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="username",h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function Jm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[ZO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),ie.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function ZO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="email",h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function GO(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=y("div"),t=y("i"),s=E(),l=y("span"),r=Y(o),h(t,"class",i=H.getFieldTypeIcon(n[58].type)),h(l,"class","txt"),h(e,"class","col-header-content")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),v(l,r)},p(a,u){u[0]&262144&&i!==(i=H.getFieldTypeIcon(a[58].type))&&h(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&le(r,o)},d(a){a&&w(e)}}}function Zm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[GO]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new ln({props:r}),ie.push(()=>he(i,"sort",o)),{key:n,first:null,c(){t=Ce(),U(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),z(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ke(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),B(i,a)}}}function Gm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[XO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),ie.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function XO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function Xm(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[QO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),ie.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function QO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="updated",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function Qm(n){let e;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Toggle columns"),h(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){S(t,e,i),n[35](e)},p:X,d(t){t&&w(e),n[35](null)}}}function xm(n){let e;function t(l,o){return l[12]?eD:xO}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function xO(n){let e,t,i,s,l;function o(u,f){var d,p;if((d=u[1])!=null&&d.length)return nD;if(!((p=u[2])!=null&&p.$isView))return tD}let r=o(n),a=r&&r(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No records found.",s=E(),a&&a.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),v(e,t),v(t,i),v(t,s),a&&a.m(t,null),v(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a&&a.d()}}}function eD(n){let e;return{c(){e=y("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function tD(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - New record`,h(e,"type","button"),h(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[40]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function nD(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[39]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function eh(n){let e,t,i,s,l,o,r,a,u,f;function d(){return n[36](n[55])}return{c(){e=y("td"),t=y("div"),i=y("input"),o=E(),r=y("label"),h(i,"type","checkbox"),h(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],h(r,"for",a="checkbox_"+n[55].id),h(t,"class","form-field"),h(e,"class","bulk-select-col min-width")},m(p,m){S(p,e,m),v(e,t),v(t,i),v(t,o),v(t,r),u||(f=[J(i,"change",d),J(t,"click",An(n[26]))],u=!0)},p(p,m){n=p,m[0]&16&&s!==(s="checkbox_"+n[55].id)&&h(i,"id",s),m[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),m[0]&16&&a!==(a="checkbox_"+n[55].id)&&h(r,"for",a)},d(p){p&&w(e),u=!1,Ae(f)}}}function th(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new er({props:{value:n[55].id}});let d=n[2].$isAuth&&nh(n);return{c(){e=y("td"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),a=Y(r),u=E(),d&&d.c(),h(o,"class","txt"),h(i,"class","label"),h(t,"class","flex flex-gap-5"),h(e,"class","col-type-text col-field-id")},m(p,m){S(p,e,m),v(e,t),v(t,i),z(s,i,null),v(i,l),v(i,o),v(o,a),v(t,u),d&&d.m(t,null),f=!0},p(p,m){const g={};m[0]&16&&(g.value=p[55].id),s.$set(g),(!f||m[0]&16)&&r!==(r=p[55].id+"")&&le(a,r),p[2].$isAuth?d?d.p(p,m):(d=nh(p),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},i(p){f||(A(s.$$.fragment,p),f=!0)},o(p){P(s.$$.fragment,p),f=!1},d(p){p&&w(e),B(s),d&&d.d()}}}function nh(n){let e;function t(l,o){return l[55].verified?sD:iD}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function iD(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Ee(Ye.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function sD(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Ee(Ye.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function ih(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&sh(n),o=i&&lh(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=Ce()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=sh(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=lh(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function sh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!H.isEmpty(o[55].username)),t?oD:lD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),h(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function lD(n){let e,t=n[55].username+"",i,s;return{c(){e=y("span"),i=Y(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=n[55].username)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&le(i,t),o[0]&16&&s!==(s=l[55].username)&&h(e,"title",s)},d(l){l&&w(e)}}}function oD(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function lh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!H.isEmpty(o[55].email)),t?aD:rD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),h(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function rD(n){let e,t=n[55].email+"",i,s;return{c(){e=y("span"),i=Y(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=n[55].email)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&le(i,t),o[0]&16&&s!==(s=l[55].email)&&h(e,"title",s)},d(l){l&&w(e)}}}function aD(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function oh(n,e){let t,i,s,l;return i=new hb({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=y("td"),U(i.$$.fragment),h(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){S(o,t,r),z(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&h(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&w(t),B(i)}}}function rh(n){let e,t,i;return t=new Si({props:{date:n[55].created}}),{c(){e=y("td"),U(t.$$.fragment),h(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function ah(n){let e,t,i;return t=new Si({props:{date:n[55].updated}}),{c(){e=y("td"),U(t.$$.fragment),h(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function uh(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),d,p=e[9]&&!e[7].includes("@updated"),m,g,_,b,k,$,T=!e[2].$isView&&eh(e),C=s&&th(e),D=e[2].$isAuth&&ih(e),M=e[18];const O=N=>N[58].name;for(let N=0;N',_=E(),h(g,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(N,R){S(N,t,R),T&&T.m(t,null),v(t,i),C&&C.m(t,null),v(t,l),D&&D.m(t,null),v(t,o);for(let j=0;j{C=null}),ae()),e[2].$isAuth?D?D.p(e,R):(D=ih(e),D.c(),D.m(t,o)):D&&(D.d(1),D=null),R[0]&262160&&(M=e[18],re(),r=yt(r,R,O,1,e,M,a,t,Jt,oh,u,Hm),ae()),R[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?I?(I.p(e,R),R[0]&1152&&A(I,1)):(I=rh(e),I.c(),A(I,1),I.m(t,d)):I&&(re(),P(I,1,1,()=>{I=null}),ae()),R[0]&640&&(p=e[9]&&!e[7].includes("@updated")),p?L?(L.p(e,R),R[0]&640&&A(L,1)):(L=ah(e),L.c(),A(L,1),L.m(t,m)):L&&(re(),P(L,1,1,()=>{L=null}),ae())},i(N){if(!b){A(C);for(let R=0;RW[58].name;for(let W=0;WW[2].$isView?W[55]:W[55].id;for(let W=0;W{M=null}),ae()),W[2].$isAuth?O?(O.p(W,ee),ee[0]&4&&A(O,1)):(O=Ym(W),O.c(),A(O,1),O.m(i,r)):O&&(re(),P(O,1,1,()=>{O=null}),ae()),ee[0]&262145&&(I=W[18],re(),a=yt(a,ee,L,1,W,I,u,i,Jt,Zm,f,zm),ae()),ee[0]&1152&&(d=W[10]&&!W[7].includes("@created")),d?F?(F.p(W,ee),ee[0]&1152&&A(F,1)):(F=Gm(W),F.c(),A(F,1),F.m(i,p)):F&&(re(),P(F,1,1,()=>{F=null}),ae()),ee[0]&640&&(m=W[9]&&!W[7].includes("@updated")),m?q?(q.p(W,ee),ee[0]&640&&A(q,1)):(q=Xm(W),q.c(),A(q,1),q.m(i,g)):q&&(re(),P(q,1,1,()=>{q=null}),ae()),W[15].length?N?N.p(W,ee):(N=Qm(W),N.c(),N.m(_,null)):N&&(N.d(1),N=null),ee[0]&4986582&&(R=W[4],re(),$=yt($,ee,j,1,W,R,T,k,Jt,uh,null,Vm),ae(),!R.length&&V?V.p(W,ee):R.length?V&&(V.d(1),V=null):(V=xm(W),V.c(),V.m(k,null))),(!C||ee[0]&4096)&&x(e,"table-loading",W[12])},i(W){if(!C){A(M),A(O);for(let ee=0;ee({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ce(),U(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),B(i,l)}}}function cD(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function dh(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=y("small"),t=Y("Showing "),s=Y(i),l=Y(" of "),o=Y(n[5]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){S(r,e,a),v(e,t),v(e,s),v(e,l),v(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&le(s,i),a[0]&32&&le(o,r[5])},d(r){r&&w(e)}}}function ph(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=y("div"),t=y("button"),i=y("span"),s=Y("Load more ("),o=Y(l),r=Y(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),x(t,"btn-loading",n[12]),x(t,"btn-disabled",n[12]),h(e,"class","block txt-center m-t-xs")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(i,s),v(i,o),v(i,r),a||(u=J(t,"click",n[41]),a=!0)},p(f,d){d[0]&48&&l!==(l=f[5]-f[4].length+"")&&le(o,l),d[0]&4096&&x(t,"btn-loading",f[12]),d[0]&4096&&x(t,"btn-disabled",f[12])},d(f){f&&w(e),a=!1,u()}}}function mh(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,d,p,m,g,_,b,k,$;return{c(){e=y("div"),t=y("div"),i=Y("Selected "),s=y("strong"),l=Y(n[8]),o=E(),a=Y(r),u=E(),f=y("button"),f.innerHTML='Reset',d=E(),p=y("div"),m=E(),g=y("button"),g.innerHTML='Delete selected',h(t,"class","txt"),h(f,"type","button"),h(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),x(f,"btn-disabled",n[13]),h(p,"class","flex-fill"),h(g,"type","button"),h(g,"class","btn btn-sm btn-transparent btn-danger"),x(g,"btn-loading",n[13]),x(g,"btn-disabled",n[13]),h(e,"class","bulkbar")},m(T,C){S(T,e,C),v(e,t),v(t,i),v(t,s),v(s,l),v(t,o),v(t,a),v(e,u),v(e,f),v(e,d),v(e,p),v(e,m),v(e,g),b=!0,k||($=[J(f,"click",n[42]),J(g,"click",n[43])],k=!0)},p(T,C){(!b||C[0]&256)&&le(l,T[8]),(!b||C[0]&256)&&r!==(r=T[8]===1?"record":"records")&&le(a,r),(!b||C[0]&8192)&&x(f,"btn-disabled",T[13]),(!b||C[0]&8192)&&x(g,"btn-loading",T[13]),(!b||C[0]&8192)&&x(g,"btn-disabled",T[13])},i(T){b||(T&&tt(()=>{b&&(_||(_=ze(e,fi,{duration:150,y:5},!0)),_.run(1))}),b=!0)},o(T){T&&(_||(_=ze(e,fi,{duration:150,y:5},!1)),_.run(0)),b=!1},d(T){T&&w(e),T&&_&&_.end(),k=!1,Ae($)}}}function pD(n){let e,t,i,s,l,o;e=new qa({props:{class:"table-wrapper",$$slots:{before:[dD],default:[uD]},$$scope:{ctx:n}}});let r=n[4].length&&dh(n),a=n[4].length&&n[17]&&ph(n),u=n[8]&&mh(n);return{c(){U(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=E(),u&&u.c(),l=Ce()},m(f,d){z(e,f,d),S(f,t,d),r&&r.m(f,d),S(f,i,d),a&&a.m(f,d),S(f,s,d),u&&u.m(f,d),S(f,l,d),o=!0},p(f,d){const p={};d[0]&382679|d[2]&2&&(p.$$scope={dirty:d,ctx:f}),e.$set(p),f[4].length?r?r.p(f,d):(r=dh(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,d):(a=ph(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,d),d[0]&256&&A(u,1)):(u=mh(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(re(),P(u,1,1,()=>{u=null}),ae())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){B(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}const mD=/^([\+\-])?(\w+)$/;function hD(n,e,t){let i,s,l,o,r,a,u,f;const d=Tt();let{collection:p}=e,{sort:m=""}=e,{filter:g=""}=e,_=[],b=1,k=0,$={},T=!0,C=!1,D=0,M,O=[],I=[];function L(){p!=null&&p.id&&localStorage.setItem((p==null?void 0:p.id)+"@hiddenCollumns",JSON.stringify(O))}function F(){if(t(7,O=[]),!!(p!=null&&p.id))try{const Te=localStorage.getItem(p.id+"@hiddenCollumns");Te&&t(7,O=JSON.parse(Te)||[])}catch{}}async function q(){const Te=b;for(let nt=1;nt<=Te;nt++)(nt===1||o)&&await N(nt,!1)}async function N(Te=1,nt=!0){var ti,Sn;if(!(p!=null&&p.id))return;t(12,T=!0);let At=m;const qt=At.match(mD),zt=qt?s.find(ht=>ht.name===qt[2]):null;if(qt&&((Sn=(ti=zt==null?void 0:zt.options)==null?void 0:ti.displayFields)==null?void 0:Sn.length)>0){const ht=[];for(const Nn of zt.options.displayFields)ht.push((qt[1]||"")+qt[2]+"."+Nn);At=ht.join(",")}const Ln=H.getAllCollectionIdentifiers(p);return pe.collection(p.id).getList(Te,30,{sort:At,filter:H.normalizeSearchFilter(g,Ln),expand:s.map(ht=>ht.name).join(","),$cancelKey:"records_list"}).then(async ht=>{if(Te<=1&&R(),t(12,T=!1),t(11,b=ht.page),t(5,k=ht.totalItems),d("load",_.concat(ht.items)),nt){const Nn=++D;for(;ht.items.length&&D==Nn;)t(4,_=_.concat(ht.items.splice(0,15))),await H.yieldToMain()}else t(4,_=_.concat(ht.items))}).catch(ht=>{ht!=null&&ht.isAbort||(t(12,T=!1),console.warn(ht),R(),pe.errorResponseHandler(ht,!1))})}function R(){t(4,_=[]),t(11,b=1),t(5,k=0),t(6,$={})}function j(){a?V():W()}function V(){t(6,$={})}function W(){for(const Te of _)t(6,$[Te.id]=Te,$);t(6,$)}function ee(Te){$[Te.id]?delete $[Te.id]:t(6,$[Te.id]=Te,$),t(6,$)}function te(){vn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,G)}async function G(){if(C||!r||!(p!=null&&p.id))return;let Te=[];for(const nt of Object.keys($))Te.push(pe.collection(p.id).delete(nt));return t(13,C=!0),Promise.all(Te).then(()=>{xt(`Successfully deleted the selected ${r===1?"record":"records"}.`),V()}).catch(nt=>{pe.errorResponseHandler(nt)}).finally(()=>(t(13,C=!1),q()))}function ce(Te){me.call(this,n,Te)}const Q=(Te,nt)=>{nt.target.checked?H.removeByValue(O,Te.id):H.pushUnique(O,Te.id),t(7,O)},se=()=>j();function ge(Te){m=Te,t(0,m)}function $e(Te){m=Te,t(0,m)}function Ve(Te){m=Te,t(0,m)}function Be(Te){m=Te,t(0,m)}function we(Te){m=Te,t(0,m)}function Oe(Te){m=Te,t(0,m)}function Ge(Te){ie[Te?"unshift":"push"](()=>{M=Te,t(14,M)})}const mt=Te=>ee(Te),Xe=Te=>d("select",Te),Ke=(Te,nt)=>{nt.code==="Enter"&&(nt.preventDefault(),d("select",Te))},Se=()=>t(1,g=""),ue=()=>d("new"),He=()=>N(b+1),Et=()=>V(),Ne=()=>te();return n.$$set=Te=>{"collection"in Te&&t(2,p=Te.collection),"sort"in Te&&t(0,m=Te.sort),"filter"in Te&&t(1,g=Te.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&p!=null&&p.id&&(F(),R()),n.$$.dirty[0]&4&&t(25,i=(p==null?void 0:p.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter(Te=>Te.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter(Te=>!O.includes(Te.id))),n.$$.dirty[0]&7&&p!=null&&p.id&&m!==-1&&g!==-1&&N(1),n.$$.dirty[0]&48&&t(17,o=k>_.length),n.$$.dirty[0]&64&&t(8,r=Object.keys($).length),n.$$.dirty[0]&272&&t(16,a=_.length&&r===_.length),n.$$.dirty[0]&128&&O!==-1&&L(),n.$$.dirty[0]&20&&t(10,u=!(p!=null&&p.$isView)||_.length>0&&_[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(p!=null&&p.$isView)||_.length>0&&_[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,I=[].concat(p.$isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Te=>({id:Te.id,name:Te.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[m,g,p,N,_,k,$,O,r,f,u,b,T,C,M,I,a,o,l,d,j,V,ee,te,q,i,ce,Q,se,ge,$e,Ve,Be,we,Oe,Ge,mt,Xe,Ke,Se,ue,He,Et,Ne]}class _D extends ye{constructor(e){super(),ve(this,e,hD,pD,_e,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function gD(n){let e,t,i,s;return e=new aM({}),i=new Pn({props:{$$slots:{default:[yD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&8&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function bD(n){let e,t;return e=new Pn({props:{center:!0,$$slots:{default:[SD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function vD(n){let e,t;return e=new Pn({props:{center:!0,$$slots:{default:[$D]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function hh(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Edit collection"),h(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[Ee(Ye.call(null,e,{text:"Edit collection",position:"right"})),J(e,"click",n[15])],t=!0)},p:X,d(s){s&&w(e),t=!1,Ae(i)}}}function _h(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - New record`,h(e,"type","button"),h(e,"class","btn btn-expanded")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function yD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O,I,L,F,q=!n[10]&&hh(n);d=new Ra({}),d.$on("refresh",n[16]);let N=!n[2].$isView&&_h(n);k=new Yo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[19]);function R(W){n[21](W)}function j(W){n[22](W)}let V={collection:n[2]};return n[0]!==void 0&&(V.filter=n[0]),n[1]!==void 0&&(V.sort=n[1]),D=new _D({props:V}),n[20](D),ie.push(()=>he(D,"filter",R)),ie.push(()=>he(D,"sort",j)),D.$on("select",n[23]),D.$on("new",n[24]),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Collections",s=E(),l=y("div"),r=Y(o),a=E(),u=y("div"),q&&q.c(),f=E(),U(d.$$.fragment),p=E(),m=y("div"),g=y("button"),g.innerHTML=` - API Preview`,_=E(),N&&N.c(),b=E(),U(k.$$.fragment),$=E(),T=y("div"),C=E(),U(D.$$.fragment),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(u,"class","inline-flex gap-5"),h(g,"type","button"),h(g,"class","btn btn-outline"),h(m,"class","btns-group"),h(e,"class","page-header"),h(T,"class","clearfix m-b-base")},m(W,ee){S(W,e,ee),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),v(e,u),q&&q.m(u,null),v(u,f),z(d,u,null),v(e,p),v(e,m),v(m,g),v(m,_),N&&N.m(m,null),S(W,b,ee),z(k,W,ee),S(W,$,ee),S(W,T,ee),S(W,C,ee),z(D,W,ee),I=!0,L||(F=J(g,"click",n[17]),L=!0)},p(W,ee){(!I||ee[0]&4)&&o!==(o=W[2].name+"")&&le(r,o),W[10]?q&&(q.d(1),q=null):q?q.p(W,ee):(q=hh(W),q.c(),q.m(u,f)),W[2].$isView?N&&(N.d(1),N=null):N?N.p(W,ee):(N=_h(W),N.c(),N.m(m,null));const te={};ee[0]&1&&(te.value=W[0]),ee[0]&4&&(te.autocompleteCollection=W[2]),k.$set(te);const G={};ee[0]&4&&(G.collection=W[2]),!M&&ee[0]&1&&(M=!0,G.filter=W[0],ke(()=>M=!1)),!O&&ee[0]&2&&(O=!0,G.sort=W[1],ke(()=>O=!1)),D.$set(G)},i(W){I||(A(d.$$.fragment,W),A(k.$$.fragment,W),A(D.$$.fragment,W),I=!0)},o(W){P(d.$$.fragment,W),P(k.$$.fragment,W),P(D.$$.fragment,W),I=!1},d(W){W&&w(e),q&&q.d(),B(d),N&&N.d(),W&&w(b),B(k,W),W&&w($),W&&w(T),W&&w(C),n[20](null),B(D,W),L=!1,F()}}}function kD(n){let e,t,i,s,l;return{c(){e=y("h1"),e.textContent="Create your first collection to add records!",t=E(),i=y("button"),i.innerHTML=` - Create new collection`,h(e,"class","m-b-10"),h(i,"type","button"),h(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=J(i,"click",n[14]),s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function wD(n){let e;return{c(){e=y("h1"),e.textContent="You don't have any collections yet.",h(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function SD(n){let e,t,i;function s(r,a){return r[10]?wD:kD}let l=s(n),o=l(n);return{c(){e=y("div"),t=y("div"),t.innerHTML='',i=E(),o.c(),h(t,"class","icon"),h(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),v(e,t),v(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function $D(n){let e;return{c(){e=y("div"),e.innerHTML=` -

    Loading collections...

    `,h(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function CD(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[vD,bD,gD],m=[];function g(T,C){return T[3]&&!T[9].length?0:T[9].length?2:1}e=g(n),t=m[e]=p[e](n);let _={};s=new fu({props:_}),n[25](s);let b={};o=new _M({props:b}),n[26](o);let k={collection:n[2]};a=new mb({props:k}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let $={collection:n[2]};return f=new UO({props:$}),n[30](f),{c(){t.c(),i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment)},m(T,C){m[e].m(T,C),S(T,i,C),z(s,T,C),S(T,l,C),z(o,T,C),S(T,r,C),z(a,T,C),S(T,u,C),z(f,T,C),d=!0},p(T,C){let D=e;e=g(T),e===D?m[e].p(T,C):(re(),P(m[D],1,1,()=>{m[D]=null}),ae(),t=m[e],t?t.p(T,C):(t=m[e]=p[e](T),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const I={};C[0]&4&&(I.collection=T[2]),a.$set(I);const L={};C[0]&4&&(L.collection=T[2]),f.$set(L)},i(T){d||(A(t),A(s.$$.fragment,T),A(o.$$.fragment,T),A(a.$$.fragment,T),A(f.$$.fragment,T),d=!0)},o(T){P(t),P(s.$$.fragment,T),P(o.$$.fragment,T),P(a.$$.fragment,T),P(f.$$.fragment,T),d=!1},d(T){m[e].d(T),T&&w(i),n[25](null),B(s,T),T&&w(l),n[26](null),B(o,T),T&&w(r),n[27](null),B(a,T),T&&w(u),n[30](null),B(f,T)}}}function TD(n,e,t){let i,s,l,o,r,a,u;Ze(n,ui,Q=>t(2,s=Q)),Ze(n,Ft,Q=>t(31,l=Q)),Ze(n,yo,Q=>t(3,o=Q)),Ze(n,Sa,Q=>t(13,r=Q)),Ze(n,ci,Q=>t(9,a=Q)),Ze(n,Es,Q=>t(10,u=Q));const f=new URLSearchParams(r);let d,p,m,g,_,b=f.get("filter")||"",k=f.get("sort")||"",$=f.get("collectionId")||(s==null?void 0:s.id);function T(){t(11,$=s==null?void 0:s.id),t(0,b=""),t(1,k="-created"),s!=null&&s.$isView&&!H.extractColumnsFromQuery(s.options.query).includes("created")&&t(1,k="")}vy($);const C=()=>d==null?void 0:d.show(),D=()=>d==null?void 0:d.show(s),M=()=>_==null?void 0:_.load(),O=()=>p==null?void 0:p.show(s),I=()=>m==null?void 0:m.show(),L=Q=>t(0,b=Q.detail);function F(Q){ie[Q?"unshift":"push"](()=>{_=Q,t(8,_)})}function q(Q){b=Q,t(0,b)}function N(Q){k=Q,t(1,k)}const R=Q=>{s.$isView?g.show(Q==null?void 0:Q.detail):m==null||m.show(Q==null?void 0:Q.detail)},j=()=>m==null?void 0:m.show();function V(Q){ie[Q?"unshift":"push"](()=>{d=Q,t(4,d)})}function W(Q){ie[Q?"unshift":"push"](()=>{p=Q,t(5,p)})}function ee(Q){ie[Q?"unshift":"push"](()=>{m=Q,t(6,m)})}const te=()=>_==null?void 0:_.reloadLoadedPages(),G=()=>_==null?void 0:_.reloadLoadedPages();function ce(Q){ie[Q?"unshift":"push"](()=>{g=Q,t(7,g)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=$&&_y(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&$!=s.id&&T(),n.$$.dirty[0]&7&&(k||b||s!=null&&s.id)){const Q=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:k}).toString();ji("/collections?"+Q)}n.$$.dirty[0]&4&&rn(Ft,l=(s==null?void 0:s.name)||"Collections",l)},[b,k,s,o,d,p,m,g,_,a,u,$,i,r,C,D,M,O,I,L,F,q,N,R,j,V,W,ee,te,G,ce]}class MD extends ye{constructor(e){super(),ve(this,e,TD,CD,_e,{},null,[-1,-1])}}function OD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O,I,L;return{c(){e=y("aside"),t=y("div"),i=y("div"),i.textContent="System",s=E(),l=y("a"),l.innerHTML=` - Application`,o=E(),r=y("a"),r.innerHTML=` - Mail settings`,a=E(),u=y("a"),u.innerHTML=` - Files storage`,f=E(),d=y("div"),d.innerHTML='Sync',p=E(),m=y("a"),m.innerHTML=` - Export collections`,g=E(),_=y("a"),_.innerHTML=` - Import collections`,b=E(),k=y("div"),k.textContent="Authentication",$=E(),T=y("a"),T.innerHTML=` - Auth providers`,C=E(),D=y("a"),D.innerHTML=` - Token options`,M=E(),O=y("a"),O.innerHTML=` - Admins`,h(i,"class","sidebar-title"),h(l,"href","/settings"),h(l,"class","sidebar-list-item"),h(r,"href","/settings/mail"),h(r,"class","sidebar-list-item"),h(u,"href","/settings/storage"),h(u,"class","sidebar-list-item"),h(d,"class","sidebar-title"),h(m,"href","/settings/export-collections"),h(m,"class","sidebar-list-item"),h(_,"href","/settings/import-collections"),h(_,"class","sidebar-list-item"),h(k,"class","sidebar-title"),h(T,"href","/settings/auth-providers"),h(T,"class","sidebar-list-item"),h(D,"href","/settings/tokens"),h(D,"class","sidebar-list-item"),h(O,"href","/settings/admins"),h(O,"class","sidebar-list-item"),h(t,"class","sidebar-content"),h(e,"class","page-sidebar settings-sidebar")},m(F,q){S(F,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(t,o),v(t,r),v(t,a),v(t,u),v(t,f),v(t,d),v(t,p),v(t,m),v(t,g),v(t,_),v(t,b),v(t,k),v(t,$),v(t,T),v(t,C),v(t,D),v(t,M),v(t,O),I||(L=[Ee(Zn.call(null,l,{path:"/settings"})),Ee(dn.call(null,l)),Ee(Zn.call(null,r,{path:"/settings/mail/?.*"})),Ee(dn.call(null,r)),Ee(Zn.call(null,u,{path:"/settings/storage/?.*"})),Ee(dn.call(null,u)),Ee(Zn.call(null,m,{path:"/settings/export-collections/?.*"})),Ee(dn.call(null,m)),Ee(Zn.call(null,_,{path:"/settings/import-collections/?.*"})),Ee(dn.call(null,_)),Ee(Zn.call(null,T,{path:"/settings/auth-providers/?.*"})),Ee(dn.call(null,T)),Ee(Zn.call(null,D,{path:"/settings/tokens/?.*"})),Ee(dn.call(null,D)),Ee(Zn.call(null,O,{path:"/settings/admins/?.*"})),Ee(dn.call(null,O))],I=!0)},p:X,i:X,o:X,d(F){F&&w(e),I=!1,Ae(L)}}}class Bi extends ye{constructor(e){super(),ve(this,e,null,OD,_e,{})}}function gh(n,e,t){const i=n.slice();return i[30]=e[t],i}function bh(n){let e,t;return e=new de({props:{class:"form-field readonly",name:"id",$$slots:{default:[DD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function DD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",o=E(),r=y("div"),a=y("i"),f=E(),d=y("input"),h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[29]),h(a,"class","ri-calendar-event-line txt-disabled"),h(r,"class","form-field-addon"),h(d,"type","text"),h(d,"id",p=n[29]),d.value=m=n[1].id,d.readOnly=!0},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),S(b,r,k),v(r,a),S(b,f,k),S(b,d,k),g||(_=Ee(u=Ye.call(null,a,{text:`Created: ${n[1].created} -Updated: ${n[1].updated}`,position:"left"})),g=!0)},p(b,k){k[0]&536870912&&l!==(l=b[29])&&h(e,"for",l),u&&Ht(u.update)&&k[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} -Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d,"id",p),k[0]&2&&m!==(m=b[1].id)&&d.value!==m&&(d.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(d),g=!1,_()}}}function vh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=y("button"),t=y("img"),s=E(),mn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||h(t,"src",i),h(t,"alt","Avatar "+n[30]),h(e,"type","button"),h(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),v(e,t),v(e,s),o||(r=J(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&h(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function ED(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","email"),h(r,"autocomplete","off"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[3]),u||(f=J(r,"input",n[18]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&8&&r.value!==d[3]&&fe(r,d[3])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function yh(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[AD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function AD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[29]),h(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&h(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function kh(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[ID,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[PD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),h(e,"class","col-12")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d[0]&536871168|d[1]&4&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d[0]&536871424|d[1]&4&&(m.$$scope={dirty:d,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&tt(()=>{u&&(a||(a=ze(t,bt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=ze(t,bt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function ID(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[8]),u||(f=J(r,"input",n[20]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&256&&r.value!==d[8]&&fe(r,d[8])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function PD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[9]),u||(f=J(r,"input",n[21]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&512&&r.value!==d[9]&&fe(r,d[9])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function LD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g=!n[1].$isNew&&bh(n),_=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=vh(gh(n,_,T));a=new de({props:{class:"form-field required",name:"email",$$slots:{default:[ED,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let k=!n[1].$isNew&&yh(n),$=(n[1].$isNew||n[4])&&kh(n);return{c(){e=y("form"),g&&g.c(),t=E(),i=y("div"),s=y("p"),s.textContent="Avatar",l=E(),o=y("div");for(let T=0;T<10;T+=1)b[T].c();r=E(),U(a.$$.fragment),u=E(),k&&k.c(),f=E(),$&&$.c(),h(s,"class","section-title"),h(o,"class","flex flex-gap-xs flex-wrap"),h(i,"class","content"),h(e,"id",n[11]),h(e,"class","grid"),h(e,"autocomplete","off")},m(T,C){S(T,e,C),g&&g.m(e,null),v(e,t),v(e,i),v(i,s),v(i,l),v(i,o);for(let D=0;D<10;D+=1)b[D]&&b[D].m(o,null);v(e,r),z(a,e,null),v(e,u),k&&k.m(e,null),v(e,f),$&&$.m(e,null),d=!0,p||(m=J(e,"submit",at(n[12])),p=!0)},p(T,C){if(T[1].$isNew?g&&(re(),P(g,1,1,()=>{g=null}),ae()):g?(g.p(T,C),C[0]&2&&A(g,1)):(g=bh(T),g.c(),A(g,1),g.m(e,t)),C[0]&4){_=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const O=gh(T,_,M);b[M]?b[M].p(O,C):(b[M]=vh(O),b[M].c(),b[M].m(o,null))}for(;M<10;M+=1)b[M].d(1)}const D={};C[0]&536870920|C[1]&4&&(D.$$scope={dirty:C,ctx:T}),a.$set(D),T[1].$isNew?k&&(re(),P(k,1,1,()=>{k=null}),ae()):k?(k.p(T,C),C[0]&2&&A(k,1)):(k=yh(T),k.c(),A(k,1),k.m(e,f)),T[1].$isNew||T[4]?$?($.p(T,C),C[0]&18&&A($,1)):($=kh(T),$.c(),A($,1),$.m(e,null)):$&&(re(),P($,1,1,()=>{$=null}),ae())},i(T){d||(A(g),A(a.$$.fragment,T),A(k),A($),d=!0)},o(T){P(g),P(a.$$.fragment,T),P(k),P($),d=!1},d(T){T&&w(e),g&&g.d(),pt(b,T),B(a),k&&k.d(),$&&$.d(),p=!1,m()}}}function ND(n){let e,t=n[1].$isNew?"New admin":"Edit admin",i;return{c(){e=y("h4"),i=Y(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].$isNew?"New admin":"Edit admin")&&le(i,t)},d(s){s&&w(e)}}}function wh(n){let e,t,i,s,l,o,r,a,u;return o=new ei({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[FD]},$$scope:{ctx:n}}}),{c(){e=y("button"),t=y("span"),i=E(),s=y("i"),l=E(),U(o.$$.fragment),r=E(),a=y("div"),h(s,"class","ri-more-line"),h(e,"type","button"),h(e,"aria-label","More"),h(e,"class","btn btn-sm btn-circle btn-transparent"),h(a,"class","flex-fill")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(e,l),z(o,e,null),S(f,r,d),S(f,a,d),u=!0},p(f,d){const p={};d[1]&4&&(p.$$scope={dirty:d,ctx:f}),o.$set(p)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),B(o),f&&w(r),f&&w(a)}}}function FD(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Delete`,h(e,"type","button"),h(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function RD(n){let e,t,i,s,l,o,r=n[1].$isNew?"Create":"Save changes",a,u,f,d,p,m=!n[1].$isNew&&wh(n);return{c(){m&&m.c(),e=E(),t=y("button"),i=y("span"),i.textContent="Cancel",s=E(),l=y("button"),o=y("span"),a=Y(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-transparent"),t.disabled=n[6],h(o,"class","txt"),h(l,"type","submit"),h(l,"form",n[11]),h(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],x(l,"btn-loading",n[6])},m(g,_){m&&m.m(g,_),S(g,e,_),S(g,t,_),v(t,i),S(g,s,_),S(g,l,_),v(l,o),v(o,a),f=!0,d||(p=J(t,"click",n[16]),d=!0)},p(g,_){g[1].$isNew?m&&(re(),P(m,1,1,()=>{m=null}),ae()):m?(m.p(g,_),_[0]&2&&A(m,1)):(m=wh(g),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||_[0]&64)&&(t.disabled=g[6]),(!f||_[0]&2)&&r!==(r=g[1].$isNew?"Create":"Save changes")&&le(a,r),(!f||_[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),(!f||_[0]&64)&&x(l,"btn-loading",g[6])},i(g){f||(A(m),f=!0)},o(g){P(m),f=!1},d(g){m&&m.d(g),g&&w(e),g&&w(t),g&&w(s),g&&w(l),d=!1,p()}}}function qD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[RD],header:[ND],default:[LD]},$$scope:{ctx:n}};return e=new hn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),B(e,s)}}}function jD(n,e,t){let i;const s=Tt(),l="admin_"+H.randomString(5);let o,r=new rs,a=!1,u=!1,f=0,d="",p="",m="",g=!1;function _(W){return k(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function k(W){t(1,r=W!=null&&W.$clone?W.$clone():new rs),$()}function $(){t(4,g=!1),t(3,d=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,p=""),t(9,m=""),un({})}function T(){if(a||!i)return;t(6,a=!0);const W={email:d,avatar:f};(r.$isNew||g)&&(W.password=p,W.passwordConfirm=m);let ee;r.$isNew?ee=pe.admins.create(W):ee=pe.admins.update(r.id,W),ee.then(async te=>{var G;t(7,u=!1),b(),xt(r.$isNew?"Successfully created admin.":"Successfully updated admin."),s("save",te),((G=pe.authStore.model)==null?void 0:G.id)===te.id&&pe.authStore.save(pe.authStore.token,te)}).catch(te=>{pe.errorResponseHandler(te)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&vn("Do you really want to delete the selected admin?",()=>pe.admins.delete(r.id).then(()=>{t(7,u=!1),b(),xt("Successfully deleted admin."),s("delete",r)}).catch(W=>{pe.errorResponseHandler(W)}))}const D=()=>C(),M=()=>b(),O=W=>t(2,f=W);function I(){d=this.value,t(3,d)}function L(){g=this.checked,t(4,g)}function F(){p=this.value,t(8,p)}function q(){m=this.value,t(9,m)}const N=()=>i&&u?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function R(W){ie[W?"unshift":"push"](()=>{o=W,t(5,o)})}function j(W){me.call(this,n,W)}function V(W){me.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.$isNew&&d!=""||g||d!==r.email||f!==r.avatar)},[b,r,f,d,g,o,a,u,p,m,i,l,T,C,_,D,M,O,I,L,F,q,N,R,j,V]}class VD extends ye{constructor(e){super(),ve(this,e,jD,qD,_e,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function Sh(n,e,t){const i=n.slice();return i[24]=e[t],i}function HD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="id",h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function zD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="email",h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function BD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function UD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="updated",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:X,d(l){l&&w(e)}}}function $h(n){let e;function t(l,o){return l[5]?YD:WD}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function WD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Ch(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Ch(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function YD(n){let e;return{c(){e=y("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Ch(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Th(n){let e;return{c(){e=y("span"),e.textContent="You",h(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Mh(n,e){let t,i,s,l,o,r,a,u,f,d,p,m=e[24].id+"",g,_,b,k,$,T=e[24].email+"",C,D,M,O,I,L,F,q,N,R,j,V,W,ee;f=new er({props:{value:e[24].id}});let te=e[24].id===e[7].id&&Th();I=new Si({props:{date:e[24].created}}),q=new Si({props:{date:e[24].updated}});function G(){return e[15](e[24])}function ce(...Q){return e[16](e[24],...Q)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("figure"),l=y("img"),r=E(),a=y("td"),u=y("div"),U(f.$$.fragment),d=E(),p=y("span"),g=Y(m),_=E(),te&&te.c(),b=E(),k=y("td"),$=y("span"),C=Y(T),M=E(),O=y("td"),U(I.$$.fragment),L=E(),F=y("td"),U(q.$$.fragment),N=E(),R=y("td"),R.innerHTML='',j=E(),mn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||h(l,"src",o),h(l,"alt","Admin avatar"),h(s,"class","thumb thumb-sm thumb-circle"),h(i,"class","min-width"),h(p,"class","txt"),h(u,"class","label"),h(a,"class","col-type-text col-field-id"),h($,"class","txt txt-ellipsis"),h($,"title",D=e[24].email),h(k,"class","col-type-email col-field-email"),h(O,"class","col-type-date col-field-created"),h(F,"class","col-type-date col-field-updated"),h(R,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Q,se){S(Q,t,se),v(t,i),v(i,s),v(s,l),v(t,r),v(t,a),v(a,u),z(f,u,null),v(u,d),v(u,p),v(p,g),v(a,_),te&&te.m(a,null),v(t,b),v(t,k),v(k,$),v($,C),v(t,M),v(t,O),z(I,O,null),v(t,L),v(t,F),z(q,F,null),v(t,N),v(t,R),v(t,j),V=!0,W||(ee=[J(t,"click",G),J(t,"keydown",ce)],W=!0)},p(Q,se){e=Q,(!V||se&16&&!mn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&h(l,"src",o);const ge={};se&16&&(ge.value=e[24].id),f.$set(ge),(!V||se&16)&&m!==(m=e[24].id+"")&&le(g,m),e[24].id===e[7].id?te||(te=Th(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!V||se&16)&&T!==(T=e[24].email+"")&&le(C,T),(!V||se&16&&D!==(D=e[24].email))&&h($,"title",D);const $e={};se&16&&($e.date=e[24].created),I.$set($e);const Ve={};se&16&&(Ve.date=e[24].updated),q.$set(Ve)},i(Q){V||(A(f.$$.fragment,Q),A(I.$$.fragment,Q),A(q.$$.fragment,Q),V=!0)},o(Q){P(f.$$.fragment,Q),P(I.$$.fragment,Q),P(q.$$.fragment,Q),V=!1},d(Q){Q&&w(t),B(f),te&&te.d(),B(I),B(q),W=!1,Ae(ee)}}}function KD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D=[],M=new Map,O;function I(G){n[11](G)}let L={class:"col-type-text",name:"id",$$slots:{default:[HD]},$$scope:{ctx:n}};n[2]!==void 0&&(L.sort=n[2]),o=new ln({props:L}),ie.push(()=>he(o,"sort",I));function F(G){n[12](G)}let q={class:"col-type-email col-field-email",name:"email",$$slots:{default:[zD]},$$scope:{ctx:n}};n[2]!==void 0&&(q.sort=n[2]),u=new ln({props:q}),ie.push(()=>he(u,"sort",F));function N(G){n[13](G)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[BD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),p=new ln({props:R}),ie.push(()=>he(p,"sort",N));function j(G){n[14](G)}let V={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[UD]},$$scope:{ctx:n}};n[2]!==void 0&&(V.sort=n[2]),_=new ln({props:V}),ie.push(()=>he(_,"sort",j));let W=n[4];const ee=G=>G[24].id;for(let G=0;Gr=!1)),o.$set(Q);const se={};ce&134217728&&(se.$$scope={dirty:ce,ctx:G}),!f&&ce&4&&(f=!0,se.sort=G[2],ke(()=>f=!1)),u.$set(se);const ge={};ce&134217728&&(ge.$$scope={dirty:ce,ctx:G}),!m&&ce&4&&(m=!0,ge.sort=G[2],ke(()=>m=!1)),p.$set(ge);const $e={};ce&134217728&&($e.$$scope={dirty:ce,ctx:G}),!b&&ce&4&&(b=!0,$e.sort=G[2],ke(()=>b=!1)),_.$set($e),ce&186&&(W=G[4],re(),D=yt(D,ce,ee,1,G,W,M,C,Jt,Mh,null,Sh),ae(),!W.length&&te?te.p(G,ce):W.length?te&&(te.d(1),te=null):(te=$h(G),te.c(),te.m(C,null))),(!O||ce&32)&&x(e,"table-loading",G[5])},i(G){if(!O){A(o.$$.fragment,G),A(u.$$.fragment,G),A(p.$$.fragment,G),A(_.$$.fragment,G);for(let ce=0;ce - New admin`,m=E(),U(g.$$.fragment),_=E(),b=y("div"),k=E(),U($.$$.fragment),T=E(),I&&I.c(),C=Ce(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(f,"class","flex-fill"),h(p,"type","button"),h(p,"class","btn btn-expanded"),h(e,"class","page-header"),h(b,"class","clearfix m-b-base")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(e,r),z(a,e,null),v(e,u),v(e,f),v(e,d),v(e,p),S(L,m,F),z(g,L,F),S(L,_,F),S(L,b,F),S(L,k,F),z($,L,F),S(L,T,F),I&&I.m(L,F),S(L,C,F),D=!0,M||(O=J(p,"click",n[9]),M=!0)},p(L,F){(!D||F&64)&&le(o,L[6]);const q={};F&2&&(q.value=L[1]),g.$set(q);const N={};F&134217918&&(N.$$scope={dirty:F,ctx:L}),$.$set(N),L[4].length?I?I.p(L,F):(I=Oh(L),I.c(),I.m(C.parentNode,C)):I&&(I.d(1),I=null)},i(L){D||(A(a.$$.fragment,L),A(g.$$.fragment,L),A($.$$.fragment,L),D=!0)},o(L){P(a.$$.fragment,L),P(g.$$.fragment,L),P($.$$.fragment,L),D=!1},d(L){L&&w(e),B(a),L&&w(m),B(g,L),L&&w(_),L&&w(b),L&&w(k),B($,L),L&&w(T),I&&I.d(L),L&&w(C),M=!1,O()}}}function ZD(n){let e,t,i,s,l,o;e=new Bi({}),i=new Pn({props:{$$slots:{default:[JD]},$$scope:{ctx:n}}});let r={};return l=new VD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[18](null),B(l,a)}}}function GD(n,e,t){let i,s,l;Ze(n,Sa,q=>t(21,i=q)),Ze(n,Ft,q=>t(6,s=q)),Ze(n,Na,q=>t(7,l=q)),rn(Ft,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",d=o.get("sort")||"-created";function p(){t(5,u=!0),t(4,a=[]);const q=H.normalizeSearchFilter(f,["id","email","created","updated"]);return pe.admins.getFullList(100,{sort:d||"-created",filter:q}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),pe.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const g=()=>p(),_=()=>r==null?void 0:r.show(),b=q=>t(1,f=q.detail);function k(q){d=q,t(2,d)}function $(q){d=q,t(2,d)}function T(q){d=q,t(2,d)}function C(q){d=q,t(2,d)}const D=q=>r==null?void 0:r.show(q),M=(q,N)=>{(N.code==="Enter"||N.code==="Space")&&(N.preventDefault(),r==null||r.show(q))},O=()=>t(1,f="");function I(q){ie[q?"unshift":"push"](()=>{r=q,t(3,r)})}const L=()=>p(),F=()=>p();return n.$$.update=()=>{if(n.$$.dirty&6&&d!==-1&&f!==-1){const q=new URLSearchParams({filter:f,sort:d}).toString();ji("/settings/admins?"+q),p()}},[p,f,d,r,a,u,s,l,g,_,b,k,$,T,C,D,M,O,I,L,F]}class XD extends ye{constructor(e){super(),ve(this,e,GD,ZD,_e,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function QD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Email"),s=E(),l=y("input"),h(e,"for",i=n[8]),h(l,"type","email"),h(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&h(e,"for",i),f&256&&o!==(o=u[8])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=Y("Password"),s=E(),l=y("input"),r=E(),a=y("div"),u=y("a"),u.textContent="Forgotten password?",h(e,"for",i=n[8]),h(l,"type","password"),h(l,"id",o=n[8]),l.required=!0,h(u,"href","/request-password-reset"),h(u,"class","link-hint"),h(a,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[1]),S(p,r,m),S(p,a,m),v(a,u),f||(d=[J(l,"input",n[5]),Ee(dn.call(null,u))],f=!0)},p(p,m){m&256&&i!==(i=p[8])&&h(e,"for",i),m&256&&o!==(o=p[8])&&h(l,"id",o),m&2&&l.value!==p[1]&&fe(l,p[1])},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),p&&w(a),f=!1,Ae(d)}}}function eE(n){let e,t,i,s,l,o,r,a,u,f,d;return s=new de({props:{class:"form-field required",name:"identity",$$slots:{default:[QD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[xD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

    Admin sign in

    ",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),a=y("button"),a.innerHTML=`Login - `,h(t,"class","content txt-center m-b-base"),h(a,"type","submit"),h(a,"class","btn btn-lg btn-block btn-next"),x(a,"btn-disabled",n[2]),x(a,"btn-loading",n[2]),h(e,"class","block")},m(p,m){S(p,e,m),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),v(e,a),u=!0,f||(d=J(e,"submit",at(n[3])),f=!0)},p(p,m){const g={};m&769&&(g.$$scope={dirty:m,ctx:p}),s.$set(g);const _={};m&770&&(_.$$scope={dirty:m,ctx:p}),o.$set(_),(!u||m&4)&&x(a,"btn-disabled",p[2]),(!u||m&4)&&x(a,"btn-loading",p[2])},i(p){u||(A(s.$$.fragment,p),A(o.$$.fragment,p),u=!0)},o(p){P(s.$$.fragment,p),P(o.$$.fragment,p),u=!1},d(p){p&&w(e),B(s),B(o),f=!1,d()}}}function tE(n){let e,t;return e=new r1({props:{$$slots:{default:[eE]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function nE(n,e,t){let i;Ze(n,Sa,d=>t(6,i=d));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),pe.admins.authWithPassword(l,o).then(()=>{Pa(),ji("/")}).catch(()=>{hl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class iE extends ye{constructor(e){super(),ve(this,e,nE,tE,_e,{})}}function sE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D;i=new de({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[oE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[rE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[aE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[uE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Dh(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),p=y("div"),m=y("div"),g=E(),M&&M.c(),_=E(),b=y("button"),k=y("span"),k.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(m,"class","flex-fill"),h(k,"class","txt"),h(b,"type","submit"),h(b,"class","btn btn-expanded"),b.disabled=$=!n[3]||n[2],x(b,"btn-loading",n[2]),h(p,"class","col-lg-12 flex"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),z(a,e,null),v(e,u),z(f,e,null),v(e,d),v(e,p),v(p,m),v(p,g),M&&M.m(p,null),v(p,_),v(p,b),v(b,k),T=!0,C||(D=J(b,"click",n[13]),C=!0)},p(O,I){const L={};I&1572865&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I&1572865&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I&1572865&&(q.$$scope={dirty:I,ctx:O}),a.$set(q);const N={};I&1572865&&(N.$$scope={dirty:I,ctx:O}),f.$set(N),O[3]?M?M.p(O,I):(M=Dh(O),M.c(),M.m(p,_)):M&&(M.d(1),M=null),(!T||I&12&&$!==($=!O[3]||O[2]))&&(b.disabled=$),(!T||I&4)&&x(b,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),B(i),B(o),B(a),B(f),M&&M.d(),C=!1,D()}}}function lE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function oE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Application name"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.appName),r||(a=J(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appName&&fe(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Application url"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.appUrl),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&fe(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Logs max days retention"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","number"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].logs.maxDays),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&>(l.value)!==u[0].logs.maxDays&&fe(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function uE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Hide collection create and edit controls",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[19]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[19])},m(d,p){S(d,e,p),e.checked=n[0].meta.hideControls,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),Ee(Ye.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(d,p){p&524288&&t!==(t=d[19])&&h(e,"id",t),p&1&&(e.checked=d[0].meta.hideControls),p&524288&&a!==(a=d[19])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ae(f)}}}function Dh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function fE(n){let e,t,i,s,l,o,r,a,u;const f=[lE,sE],d=[];function p(m,g){return m[1]?0:1}return l=p(n),o=d[l]=f[l](n),{c(){e=y("header"),e.innerHTML=``,t=E(),i=y("div"),s=y("form"),o.c(),h(e,"class","page-header"),h(s,"class","panel"),h(s,"autocomplete","off"),h(i,"class","wrapper")},m(m,g){S(m,e,g),S(m,t,g),S(m,i,g),v(i,s),d[l].m(s,null),r=!0,a||(u=J(s,"submit",at(n[4])),a=!0)},p(m,g){let _=l;l=p(m),l===_?d[l].p(m,g):(re(),P(d[_],1,1,()=>{d[_]=null}),ae(),o=d[l],o?o.p(m,g):(o=d[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),d[l].d(),a=!1,u()}}}function cE(n){let e,t,i,s;return e=new Bi({}),i=new Pn({props:{$$slots:{default:[fE]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function dE(n,e,t){let i,s,l,o;Ze(n,Es,M=>t(14,s=M)),Ze(n,wo,M=>t(15,l=M)),Ze(n,Ft,M=>t(16,o=M)),rn(Ft,o="Application settings",o);let r={},a={},u=!1,f=!1,d="";p();async function p(){t(1,u=!0);try{const M=await pe.settings.getAll()||{};g(M)}catch(M){pe.errorResponseHandler(M)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const M=await pe.settings.update(H.filterRedactedProps(a));g(M),xt("Successfully saved application settings.")}catch(M){pe.errorResponseHandler(M)}t(2,f=!1)}}function g(M={}){var O,I;rn(wo,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),rn(Es,s=!!((I=M==null?void 0:M.meta)!=null&&I.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function _(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function k(){a.meta.appUrl=this.value,t(0,a)}function $(){a.logs.maxDays=gt(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>_(),D=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,d=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=d!=JSON.stringify(a))},[a,u,f,i,m,_,r,d,b,k,$,T,C,D]}class pE extends ye{constructor(e){super(),ve(this,e,dE,cE,_e,{})}}function mE(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=E(),s=y("input"),h(t,"type","button"),h(t,"class","btn btn-transparent btn-circle"),h(e,"class","form-field-addon"),ai(s,a)},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Ee(Ye.call(null,t,{position:"left",text:"Set new value"})),J(t,"click",n[6])],l=!0)},p(u,f){ai(s,a=Mt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Ae(o)}}}function _E(n){let e;function t(l,o){return l[3]?hE:mE}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:X,o:X,d(l){s.d(l),l&&w(e)}}}function gE(n,e,t){const i=["value","mask"];let s=xe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await an(),r==null||r.focus()}const f=()=>u();function d(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Zt(m)),t(5,s=xe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,d,p]}class pu extends ye{constructor(e){super(),ve(this,e,gE,_E,_e,{value:0,mask:1})}}function bE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_;return{c(){e=y("label"),t=Y("Subject"),s=E(),l=y("input"),r=E(),a=y("div"),u=Y(`Available placeholder parameters: - `),f=y("button"),f.textContent=`{APP_NAME} - `,d=Y(`, - `),p=y("button"),p.textContent=`{APP_URL} - `,m=Y("."),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),h(l,"spellcheck","false"),l.required=!0,h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),S(b,l,k),fe(l,n[0].subject),S(b,r,k),S(b,a,k),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),g||(_=[J(l,"input",n[13]),J(f,"click",n[14]),J(p,"click",n[15])],g=!0)},p(b,k){k[1]&1&&i!==(i=b[31])&&h(e,"for",i),k[1]&1&&o!==(o=b[31])&&h(l,"id",o),k[0]&1&&l.value!==b[0].subject&&fe(l,b[0].subject)},d(b){b&&w(e),b&&w(s),b&&w(l),b&&w(r),b&&w(a),g=!1,Ae(_)}}}function vE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k;return{c(){e=y("label"),t=Y("Action URL"),s=E(),l=y("input"),r=E(),a=y("div"),u=Y(`Available placeholder parameters: - `),f=y("button"),f.textContent=`{APP_NAME} - `,d=Y(`, - `),p=y("button"),p.textContent=`{APP_URL} - `,m=Y(`, - `),g=y("button"),g.textContent=`{TOKEN} - `,_=Y("."),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),h(l,"spellcheck","false"),l.required=!0,h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(g,"type","button"),h(g,"class","label label-sm link-primary txt-mono"),h(g,"title","Required parameter"),h(a,"class","help-block")},m($,T){S($,e,T),v(e,t),S($,s,T),S($,l,T),fe(l,n[0].actionUrl),S($,r,T),S($,a,T),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,g),v(a,_),b||(k=[J(l,"input",n[16]),J(f,"click",n[17]),J(p,"click",n[18]),J(g,"click",n[19])],b=!0)},p($,T){T[1]&1&&i!==(i=$[31])&&h(e,"for",i),T[1]&1&&o!==(o=$[31])&&h(l,"id",o),T[0]&1&&l.value!==$[0].actionUrl&&fe(l,$[0].actionUrl)},d($){$&&w(e),$&&w(s),$&&w(l),$&&w(r),$&&w(a),b=!1,Ae(k)}}}function yE(n){let e,t,i,s;return{c(){e=y("textarea"),h(e,"id",t=n[31]),h(e,"class","txt-mono"),h(e,"spellcheck","false"),h(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),fe(e,n[0].body),i||(s=J(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&h(e,"id",t),o[0]&1&&fe(e,l[0].body)},i:X,o:X,d(l){l&&w(e),i=!1,s()}}}function kE(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Nt(o,r(n)),ie.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=Ce()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,ke(()=>t=!1)),u[0]&16&&o!==(o=a[4])){if(e){re();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ae()}o?(e=Nt(o,r(a)),ie.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function wE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C;const D=[kE,yE],M=[];function O(I,L){return I[4]&&!I[5]?0:1}return l=O(n),o=M[l]=D[l](n),{c(){e=y("label"),t=Y("Body (HTML)"),s=E(),o.c(),r=E(),a=y("div"),u=Y(`Available placeholder parameters: - `),f=y("button"),f.textContent=`{APP_NAME} - `,d=Y(`, - `),p=y("button"),p.textContent=`{APP_URL} - `,m=Y(`, - `),g=y("button"),g.textContent=`{TOKEN} - `,_=Y(`, - `),b=y("button"),b.textContent=`{ACTION_URL} - `,k=Y("."),h(e,"for",i=n[31]),h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(g,"type","button"),h(g,"class","label label-sm link-primary txt-mono"),h(b,"type","button"),h(b,"class","label label-sm link-primary txt-mono"),h(b,"title","Required parameter"),h(a,"class","help-block")},m(I,L){S(I,e,L),v(e,t),S(I,s,L),M[l].m(I,L),S(I,r,L),S(I,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,g),v(a,_),v(a,b),v(a,k),$=!0,T||(C=[J(f,"click",n[22]),J(p,"click",n[23]),J(g,"click",n[24]),J(b,"click",n[25])],T=!0)},p(I,L){(!$||L[1]&1&&i!==(i=I[31]))&&h(e,"for",i);let F=l;l=O(I),l===F?M[l].p(I,L):(re(),P(M[F],1,1,()=>{M[F]=null}),ae(),o=M[l],o?o.p(I,L):(o=M[l]=D[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,Ae(C)}}}function SE(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[bE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[vE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[wE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),S(r,s,a),z(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){B(e,r),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function Eh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=ze(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function $E(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Eh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=Y(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=Ce(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&le(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Eh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),P(f,1,1,()=>{f=null}),ae())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function CE(n){let e,t;const i=[n[8]];let s={$$slots:{header:[$E],default:[SE]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=Ah,p=!1;function m(){f==null||f.expand()}function g(){f==null||f.collapse()}function _(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await rt(()=>import("./CodeEditor-f746b79b.js"),["./CodeEditor-f746b79b.js","./index-be8a2174.js"],import.meta.url)).default),Ah=d,t(5,p=!1))}function k(G){H.copyToClipboard(G),s1(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function D(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),O=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function F(){u.body=this.value,t(0,u)}const q=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),R=()=>k("{TOKEN}"),j=()=>k("{ACTION_URL}");function V(G){ie[G?"unshift":"push"](()=>{f=G,t(3,f)})}function W(G){me.call(this,n,G)}function ee(G){me.call(this,n,G)}function te(G){me.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),Zt(G)),t(8,l=xe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!H.isEmpty(H.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Fi(r))},[u,r,a,f,d,p,i,k,l,m,g,_,o,$,T,C,D,M,O,I,L,F,q,N,R,j,V,W,ee,te]}class Fr extends ye{constructor(e){super(),ve(this,e,TE,CE,_e,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Ih(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ph(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=Ib(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=Y(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(g,_){S(g,t,_),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(g,_){e=g,_&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),_&4&&(i.checked=i.__value===e[2]),_&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(g){g&&w(t),d.r(),p=!1,m()}}}function ME(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[OE,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),U(t.$$.fragment),i=E(),U(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),z(t,e,null),v(e,i),z(s,e,null),l=!0,o||(r=J(e,"submit",at(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),B(t),B(s),o=!1,r()}}}function EE(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function AE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=Y("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function IE(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[AE],header:[EE],default:[DE]},$$scope:{ctx:n}};return e=new hn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),B(e,s)}}}const Rr="last_email_test",Lh="email_test_request";function PE(n,e,t){let i;const s=Tt(),l="email_test_"+H.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Rr),u=o[0].value,f=!1,d=null;function p(O="",I=""){t(1,a=O||localStorage.getItem(Rr)),t(2,u=I||o[0].value),un({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function g(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Rr,a),clearTimeout(d),d=setTimeout(()=>{pe.cancelRequest(Lh),hl("Test email send timeout.")},3e4);try{await pe.settings.testEmail(a,u,{$cancelKey:Lh}),xt("Successfully sent test email."),s("submit"),t(4,f=!1),await an(),m()}catch(O){t(4,f=!1),pe.errorResponseHandler(O)}clearTimeout(d)}}const _=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>g(),T=()=>!f;function C(O){ie[O?"unshift":"push"](()=>{r=O,t(3,r)})}function D(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,g,p,b,_,k,$,T,C,D,M]}class LE extends ye{constructor(e){super(),ve(this,e,PE,IE,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function NE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[RE,({uniqueId:Q})=>({31:Q}),({uniqueId:Q})=>[0,Q?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[qE,({uniqueId:Q})=>({31:Q}),({uniqueId:Q})=>[0,Q?1:0]]},$$scope:{ctx:n}}});function q(Q){n[14](Q)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Fr({props:N}),ie.push(()=>he(u,"config",q));function R(Q){n[15](Q)}let j={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(j.config=n[0].meta.resetPasswordTemplate),p=new Fr({props:j}),ie.push(()=>he(p,"config",R));function V(Q){n[16](Q)}let W={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(W.config=n[0].meta.confirmEmailChangeTemplate),_=new Fr({props:W}),ie.push(()=>he(_,"config",V)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[jE,({uniqueId:Q})=>({31:Q}),({uniqueId:Q})=>[0,Q?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Nh(n);function te(Q,se){return Q[4]?KE:YE}let G=te(n),ce=G(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),d=E(),U(p.$$.fragment),g=E(),U(_.$$.fragment),k=E(),$=y("hr"),T=E(),U(C.$$.fragment),D=E(),ee&&ee.c(),M=E(),O=y("div"),I=y("div"),L=E(),ce.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(O,"class","flex")},m(Q,se){S(Q,e,se),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),S(Q,r,se),S(Q,a,se),z(u,a,null),v(a,d),z(p,a,null),v(a,g),z(_,a,null),S(Q,k,se),S(Q,$,se),S(Q,T,se),z(C,Q,se),S(Q,D,se),ee&&ee.m(Q,se),S(Q,M,se),S(Q,O,se),v(O,I),v(O,L),ce.m(O,null),F=!0},p(Q,se){const ge={};se[0]&1|se[1]&3&&(ge.$$scope={dirty:se,ctx:Q}),i.$set(ge);const $e={};se[0]&1|se[1]&3&&($e.$$scope={dirty:se,ctx:Q}),o.$set($e);const Ve={};!f&&se[0]&1&&(f=!0,Ve.config=Q[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Ve);const Be={};!m&&se[0]&1&&(m=!0,Be.config=Q[0].meta.resetPasswordTemplate,ke(()=>m=!1)),p.$set(Be);const we={};!b&&se[0]&1&&(b=!0,we.config=Q[0].meta.confirmEmailChangeTemplate,ke(()=>b=!1)),_.$set(we);const Oe={};se[0]&1|se[1]&3&&(Oe.$$scope={dirty:se,ctx:Q}),C.$set(Oe),Q[0].smtp.enabled?ee?(ee.p(Q,se),se[0]&1&&A(ee,1)):(ee=Nh(Q),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(re(),P(ee,1,1,()=>{ee=null}),ae()),G===(G=te(Q))&&ce?ce.p(Q,se):(ce.d(1),ce=G(Q),ce&&(ce.c(),ce.m(O,null)))},i(Q){F||(A(i.$$.fragment,Q),A(o.$$.fragment,Q),A(u.$$.fragment,Q),A(p.$$.fragment,Q),A(_.$$.fragment,Q),A(C.$$.fragment,Q),A(ee),F=!0)},o(Q){P(i.$$.fragment,Q),P(o.$$.fragment,Q),P(u.$$.fragment,Q),P(p.$$.fragment,Q),P(_.$$.fragment,Q),P(C.$$.fragment,Q),P(ee),F=!1},d(Q){Q&&w(e),B(i),B(o),Q&&w(r),Q&&w(a),B(u),B(p),B(_),Q&&w(k),Q&&w($),Q&&w(T),B(C,Q),Q&&w(D),ee&&ee.d(Q),Q&&w(M),Q&&w(O),ce.d()}}}function FE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function RE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&fe(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&fe(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function jE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),Ee(Ye.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ae(f)}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[VE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[HE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[zE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[BE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),_=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[UE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[WE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),g=y("div"),U(_.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(g,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,g),z(_,g,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(O,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:O}),u.$set(q);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:O}),p.$set(N);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:O}),_.$set(R);const j={};I[0]&1|I[1]&3&&(j.$$scope={dirty:I,ctx:O}),$.$set(j)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(p.$$.fragment,O),A(_.$$.fragment,O),A($.$$.fragment,O),O&&tt(()=>{M&&(D||(D=ze(e,bt,{duration:150},!0)),D.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(_.$$.fragment,O),P($.$$.fragment,O),O&&(D||(D=ze(e,bt,{duration:150},!1)),D.run(0)),M=!1},d(O){O&&w(e),B(i),B(o),B(u),B(p),B(_),B($),O&&D&&D.end()}}}function VE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&fe(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&fe(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function zE(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new zi({props:u}),ie.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=Y("TLS encryption"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function BE(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new zi({props:u}),ie.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=Y("AUTH method"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function UE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&fe(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WE(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new pu({props:u}),ie.push(()=>he(l,"value",a)),{c(){e=y("label"),t=Y("Password"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function YE(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Send test email`,h(e,"type","button"),h(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function KE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],h(l,"class","txt"),h(s,"type","submit"),h(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"click",n[24]),J(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ae(a)}}}function JE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b;const k=[FE,NE],$=[];function T(C,D){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=Y(n[5]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),g=!0,_||(b=J(u,"submit",at(n[27])),_=!0)},p(C,D){(!g||D[0]&32)&&le(o,C[5]);let M=p;p=T(C),p===M?$[p].p(C,D):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){g||(A(m),g=!0)},o(C){P(m),g=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),_=!1,b()}}}function ZE(n){let e,t,i,s,l,o;e=new Bi({}),i=new Pn({props:{$$slots:{default:[JE]},$$scope:{ctx:n}}});let r={};return l=new LE({props:r}),n[28](l),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[28](null),B(l,a)}}}function GE(n,e,t){let i,s,l;Ze(n,Ft,te=>t(5,l=te));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];rn(Ft,l="Mail settings",l);let a,u={},f={},d=!1,p=!1;m();async function m(){t(2,d=!0);try{const te=await pe.settings.getAll()||{};_(te)}catch(te){pe.errorResponseHandler(te)}t(2,d=!1)}async function g(){if(!(p||!s)){t(3,p=!0);try{const te=await pe.settings.update(H.filterRedactedProps(f));_(te),un({}),xt("Successfully saved mail settings.")}catch(te){pe.errorResponseHandler(te)}t(3,p=!1)}}function _(te={}){t(0,f={meta:(te==null?void 0:te.meta)||{},smtp:(te==null?void 0:te.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function k(){f.meta.senderName=this.value,t(0,f)}function $(){f.meta.senderAddress=this.value,t(0,f)}function T(te){n.$$.not_equal(f.meta.verificationTemplate,te)&&(f.meta.verificationTemplate=te,t(0,f))}function C(te){n.$$.not_equal(f.meta.resetPasswordTemplate,te)&&(f.meta.resetPasswordTemplate=te,t(0,f))}function D(te){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,te)&&(f.meta.confirmEmailChangeTemplate=te,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=gt(this.value),t(0,f)}function L(te){n.$$.not_equal(f.smtp.tls,te)&&(f.smtp.tls=te,t(0,f))}function F(te){n.$$.not_equal(f.smtp.authMethod,te)&&(f.smtp.authMethod=te,t(0,f))}function q(){f.smtp.username=this.value,t(0,f)}function N(te){n.$$.not_equal(f.smtp.password,te)&&(f.smtp.password=te,t(0,f))}const R=()=>b(),j=()=>g(),V=()=>a==null?void 0:a.show(),W=()=>g();function ee(te){ie[te?"unshift":"push"](()=>{a=te,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,d,p,s,l,o,r,g,b,u,i,k,$,T,C,D,M,O,I,L,F,q,N,R,j,V,W,ee]}class XE extends ye{constructor(e){super(),ve(this,e,GE,ZE,_e,{},null,[-1,-1])}}function QE(n){var C,D;let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_;e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[eA,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Fh(n),k=n[1].s3.enabled&&Rh(n),$=((D=n[1].s3)==null?void 0:D.enabled)&&!n[6]&&!n[3]&&qh(n),T=n[6]&&jh(n);return{c(){U(e.$$.fragment),t=E(),b&&b.c(),i=E(),k&&k.c(),s=E(),l=y("div"),o=y("div"),r=E(),$&&$.c(),a=E(),T&&T.c(),u=E(),f=y("button"),d=y("span"),d.textContent="Save changes",h(o,"class","flex-fill"),h(d,"class","txt"),h(f,"type","submit"),h(f,"class","btn btn-expanded"),f.disabled=p=!n[6]||n[3],x(f,"btn-loading",n[3]),h(l,"class","flex")},m(M,O){z(e,M,O),S(M,t,O),b&&b.m(M,O),S(M,i,O),k&&k.m(M,O),S(M,s,O),S(M,l,O),v(l,o),v(l,r),$&&$.m(l,null),v(l,a),T&&T.m(l,null),v(l,u),v(l,f),v(f,d),m=!0,g||(_=J(f,"click",n[19]),g=!0)},p(M,O){var L,F;const I={};O&100663298&&(I.$$scope={dirty:O,ctx:M}),e.$set(I),((L=M[0].s3)==null?void 0:L.enabled)!=M[1].s3.enabled?b?(b.p(M,O),O&3&&A(b,1)):(b=Fh(M),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(re(),P(b,1,1,()=>{b=null}),ae()),M[1].s3.enabled?k?(k.p(M,O),O&2&&A(k,1)):(k=Rh(M),k.c(),A(k,1),k.m(s.parentNode,s)):k&&(re(),P(k,1,1,()=>{k=null}),ae()),(F=M[1].s3)!=null&&F.enabled&&!M[6]&&!M[3]?$?$.p(M,O):($=qh(M),$.c(),$.m(l,a)):$&&($.d(1),$=null),M[6]?T?T.p(M,O):(T=jh(M),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||O&72&&p!==(p=!M[6]||M[3]))&&(f.disabled=p),(!m||O&8)&&x(f,"btn-loading",M[3])},i(M){m||(A(e.$$.fragment,M),A(b),A(k),m=!0)},o(M){P(e.$$.fragment,M),P(b),P(k),m=!1},d(M){B(e,M),M&&w(t),b&&b.d(M),M&&w(i),k&&k.d(M),M&&w(s),M&&w(l),$&&$.d(),T&&T.d(),g=!1,_()}}}function xE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function eA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Use S3 storage"),h(e,"type","checkbox"),h(e,"id",t=n[25]),e.required=!0,h(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&h(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Fh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,d,p=n[1].s3.enabled?"S3 storage":"local file system",m,g,_,b,k,$,T,C,D,M,O,I;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=Y(`If you have existing uploaded files, you'll have to migrate them manually from - the - `),r=y("strong"),u=Y(a),f=Y(` - to the - `),d=y("strong"),m=Y(p),g=Y(`. - `),_=y("br"),b=Y(` - There are numerous command line tools that can help you, such as: - `),k=y("a"),k.textContent=`rclone - `,$=Y(`, - `),T=y("a"),T.textContent=`s5cmd - `,C=Y(", etc."),D=E(),M=y("div"),h(i,"class","icon"),h(k,"href","https://github.com/rclone/rclone"),h(k,"target","_blank"),h(k,"rel","noopener noreferrer"),h(k,"class","txt-bold"),h(T,"href","https://github.com/peak/s5cmd"),h(T,"target","_blank"),h(T,"rel","noopener noreferrer"),h(T,"class","txt-bold"),h(l,"class","content"),h(t,"class","alert alert-warning m-0"),h(M,"class","clearfix m-t-base")},m(F,q){S(F,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(r,u),v(l,f),v(l,d),v(d,m),v(l,g),v(l,_),v(l,b),v(l,k),v(l,$),v(l,T),v(l,C),v(e,D),v(e,M),I=!0},p(F,q){var N;(!I||q&1)&&a!==(a=(N=F[0].s3)!=null&&N.enabled?"S3 storage":"local file system")&&le(u,a),(!I||q&2)&&p!==(p=F[1].s3.enabled?"S3 storage":"local file system")&&le(m,p)},i(F){I||(F&&tt(()=>{I&&(O||(O=ze(e,bt,{duration:150},!0)),O.run(1))}),I=!0)},o(F){F&&(O||(O=ze(e,bt,{duration:150},!1)),O.run(0)),I=!1},d(F){F&&w(e),F&&O&&O.end()}}}function Rh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M;return i=new de({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[tA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[nA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"s3.region",$$slots:{default:[iA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[sA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),_=new de({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[lA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[oA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),g=y("div"),U(_.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-6"),h(l,"class","col-lg-3"),h(a,"class","col-lg-3"),h(d,"class","col-lg-6"),h(g,"class","col-lg-6"),h(k,"class","col-lg-12"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,g),z(_,g,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(O,I){const L={};I&100663298&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I&100663298&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I&100663298&&(q.$$scope={dirty:I,ctx:O}),u.$set(q);const N={};I&100663298&&(N.$$scope={dirty:I,ctx:O}),p.$set(N);const R={};I&100663298&&(R.$$scope={dirty:I,ctx:O}),_.$set(R);const j={};I&100663298&&(j.$$scope={dirty:I,ctx:O}),$.$set(j)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(p.$$.fragment,O),A(_.$$.fragment,O),A($.$$.fragment,O),O&&tt(()=>{M&&(D||(D=ze(e,bt,{duration:150},!0)),D.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(_.$$.fragment,O),P($.$$.fragment,O),O&&(D||(D=ze(e,bt,{duration:150},!1)),D.run(0)),M=!1},d(O){O&&w(e),B(i),B(o),B(u),B(p),B(_),B($),O&&D&&D.end()}}}function tA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Endpoint"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.endpoint),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&fe(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function nA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Bucket"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.bucket),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&fe(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function iA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Region"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.region),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.region&&fe(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function sA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=Y("Access key"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.accessKey),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&fe(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function lA(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new pu({props:u}),ie.push(()=>he(l,"value",a)),{c(){e=y("label"),t=Y("Secret"),s=E(),U(l.$$.fragment),h(e,"for",i=n[25])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&33554432&&i!==(i=f[25]))&&h(e,"for",i);const p={};d&33554432&&(p.id=f[25]),!o&&d&2&&(o=!0,p.value=f[1].s3.secret,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function oA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Force path-style addressing",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[25])},m(d,p){S(d,e,p),e.checked=n[1].s3.forcePathStyle,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),Ee(Ye.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(d,p){p&33554432&&t!==(t=d[25])&&h(e,"id",t),p&2&&(e.checked=d[1].s3.forcePathStyle),p&33554432&&a!==(a=d[25])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ae(f)}}}function qh(n){let e;function t(l,o){return l[4]?uA:l[5]?aA:rA}let i=t(n),s=i(n);return{c(){s.c(),e=Ce()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function rA(n){let e;return{c(){e=y("div"),e.innerHTML=` - S3 connected successfully`,h(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function aA(n){let e,t,i,s;return{c(){e=y("div"),e.innerHTML=` - Failed to establish S3 connection`,h(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Ee(t=Ye.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Ht(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function uA(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function jh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function fA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b;const k=[xE,QE],$=[];function T(C,D){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=Y(n[7]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    -

    If you have limited disk space, you could optionally connect to a S3 compatible storage.

    `,d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),g=!0,_||(b=J(u,"submit",at(n[20])),_=!0)},p(C,D){(!g||D&128)&&le(o,C[7]);let M=p;p=T(C),p===M?$[p].p(C,D):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){g||(A(m),g=!0)},o(C){P(m),g=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),_=!1,b()}}}function cA(n){let e,t,i,s;return e=new Bi({}),i=new Pn({props:{$$slots:{default:[fA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}const lo="s3_test_request";function dA(n,e,t){let i,s,l;Ze(n,Ft,N=>t(7,l=N)),rn(Ft,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,d=null,p=null;m();async function m(){t(2,a=!0);try{const N=await pe.settings.getAll()||{};_(N)}catch(N){pe.errorResponseHandler(N)}t(2,a=!1)}async function g(){if(!(u||!s)){t(3,u=!0);try{pe.cancelRequest(lo);const N=await pe.settings.update(H.filterRedactedProps(r));un({}),await _(N),Pa(),d?hy("Successfully saved but failed to establish S3 connection."):xt("Successfully saved files storage settings.")}catch(N){pe.errorResponseHandler(N)}t(3,u=!1)}}async function _(N={}){t(1,r={s3:(N==null?void 0:N.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await k()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await k()}async function k(){if(t(5,d=null),!!r.s3.enabled){pe.cancelRequest(lo),clearTimeout(p),p=setTimeout(()=>{pe.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await pe.settings.testS3({$cancelKey:lo})}catch(N){t(5,d=N)}t(4,f=!1),clearTimeout(p)}}en(()=>()=>{clearTimeout(p)});function $(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function D(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function O(N){n.$$.not_equal(r.s3.secret,N)&&(r.s3.secret=N,t(1,r))}function I(){r.s3.forcePathStyle=this.checked,t(1,r)}const L=()=>b(),F=()=>g(),q=()=>g();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,d,s,l,g,b,i,$,T,C,D,M,O,I,L,F,q]}class pA extends ye{constructor(e){super(),ve(this,e,dA,cA,_e,{})}}function mA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=Y("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[20]),h(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[1].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&h(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function hA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=Y("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[20]),h(l,"type","text"),h(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,d){d&1048576&&i!==(i=f[20])&&h(e,"for",i),d&1048576&&o!==(o=f[20])&&h(l,"id",o),d&2&&r!==(r=f[1].enabled)&&(l.required=r),d&2&&l.value!==f[1].clientId&&fe(l,f[1].clientId)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function _A(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new pu({props:u}),ie.push(()=>he(l,"value",a)),{c(){e=y("label"),t=Y("Client secret"),s=E(),U(l.$$.fragment),h(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&h(e,"for",i);const p={};d&1048576&&(p.id=f[20]),d&2&&(p.required=f[1].enabled),!o&&d&2&&(o=!0,p.value=f[1].clientSecret,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function Vh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Nt(o,r(n)),ie.push(()=>he(t,"config",l))),{c(){e=y("div"),t&&U(t.$$.fragment),h(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&z(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],ke(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){re();const d=t;P(d.$$.fragment,1,0,()=>{B(d,1)}),ae()}o?(t=Nt(o,r(a)),ie.push(()=>he(t,"config",l)),U(t.$$.fragment),A(t.$$.fragment,1),z(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&B(t)}}}function gA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[mA,({uniqueId:_})=>({20:_}),({uniqueId:_})=>_?1048576:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[hA,({uniqueId:_})=>({20:_}),({uniqueId:_})=>_?1048576:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[_A,({uniqueId:_})=>({20:_}),({uniqueId:_})=>_?1048576:0]},$$scope:{ctx:n}}});let g=n[3].optionsComponent&&Vh(n);return{c(){e=y("form"),t=y("div"),U(i.$$.fragment),s=E(),l=y("button"),l.innerHTML='Clear all fields',o=E(),U(r.$$.fragment),a=E(),U(u.$$.fragment),f=E(),g&&g.c(),h(l,"type","button"),h(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),h(t,"class","flex m-b-base"),h(e,"id",n[6]),h(e,"autocomplete","off")},m(_,b){S(_,e,b),v(e,t),z(i,t,null),v(t,s),v(t,l),v(e,o),z(r,e,null),v(e,a),z(u,e,null),v(e,f),g&&g.m(e,null),d=!0,p||(m=[J(l,"click",n[8]),J(e,"submit",at(n[15]))],p=!0)},p(_,b){const k={};b&8&&(k.name=_[3].key+".enabled"),b&3145730&&(k.$$scope={dirty:b,ctx:_}),i.$set(k);const $={};b&2&&($.class="form-field "+(_[1].enabled?"required":"")),b&8&&($.name=_[3].key+".clientId"),b&3145730&&($.$$scope={dirty:b,ctx:_}),r.$set($);const T={};b&2&&(T.class="form-field "+(_[1].enabled?"required":"")),b&8&&(T.name=_[3].key+".clientSecret"),b&3145730&&(T.$$scope={dirty:b,ctx:_}),u.$set(T),_[3].optionsComponent?g?(g.p(_,b),b&8&&A(g,1)):(g=Vh(_),g.c(),A(g,1),g.m(e,null)):g&&(re(),P(g,1,1,()=>{g=null}),ae())},i(_){d||(A(i.$$.fragment,_),A(r.$$.fragment,_),A(u.$$.fragment,_),A(g),d=!0)},o(_){P(i.$$.fragment,_),P(r.$$.fragment,_),P(u.$$.fragment,_),P(g),d=!1},d(_){_&&w(e),B(i),B(r),B(u),g&&g.d(),p=!1,Ae(m)}}}function bA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=y("h4"),i=Y(t),s=Y(" provider"),h(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&le(i,t)},d(l){l&&w(e)}}}function vA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=Y("Close"),i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function yA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[vA],header:[bA],default:[gA]},$$scope:{ctx:n}};return e=new hn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),B(e,s)}}}function kA(n,e,t){let i;const s=Tt(),l="provider_popup_"+H.randomString(5);let o,r={},a={},u=!1,f="";function d(O,I){un({}),t(3,r=Object.assign({},O)),t(1,a=Object.assign({enabled:!0},I)),t(10,f=JSON.stringify(a)),o==null||o.show()}function p(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const O={};O[r.key]=H.filterRedactedProps(a);const I=await pe.settings.update(O);un({}),xt("Successfully updated provider settings."),s("submit",I),p()}catch(O){pe.errorResponseHandler(O)}t(4,u=!1)}function g(){for(let O in a)t(1,a[O]="",a);t(1,a.enabled=!1,a)}function _(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function k(O){n.$$.not_equal(a.clientSecret,O)&&(a.clientSecret=O,t(1,a))}function $(O){a=O,t(1,a)}const T=()=>m();function C(O){ie[O?"unshift":"push"](()=>{o=O,t(2,o)})}function D(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[p,a,o,r,u,i,l,m,g,d,f,_,b,k,$,T,C,D,M]}class wA extends ye{constructor(e){super(),ve(this,e,kA,yA,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Hh(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t="./images/oauth2/"+n[1].logo)||h(e,"src",t),h(e,"alt",i=n[1].title+" logo")},m(s,l){S(s,e,l)},p(s,l){l&2&&!mn(e.src,t="./images/oauth2/"+s[1].logo)&&h(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&h(e,"alt",i)},d(s){s&&w(e)}}}function zh(n){let e;return{c(){e=y("div"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function SA(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",d,p,m,g,_,b,k,$,T,C,D=n[1].logo&&Hh(n),M=n[0].enabled&&zh(),O={};return k=new wA({props:O}),n[4](k),k.$on("submit",n[5]),{c(){e=y("div"),t=y("figure"),D&&D.c(),i=E(),s=y("div"),o=Y(l),r=E(),a=y("em"),u=Y("("),d=Y(f),p=Y(")"),m=E(),M&&M.c(),g=E(),_=y("button"),_.innerHTML='',b=E(),U(k.$$.fragment),h(t,"class","provider-logo"),h(s,"class","title"),h(a,"class","txt-hint txt-sm m-r-auto"),h(_,"type","button"),h(_,"class","btn btn-circle btn-hint btn-transparent"),h(_,"aria-label","Provider settings"),h(e,"class","provider-card")},m(I,L){S(I,e,L),v(e,t),D&&D.m(t,null),v(e,i),v(e,s),v(s,o),v(e,r),v(e,a),v(a,u),v(a,d),v(a,p),v(e,m),M&&M.m(e,null),v(e,g),v(e,_),S(I,b,L),z(k,I,L),$=!0,T||(C=J(_,"click",n[3]),T=!0)},p(I,[L]){I[1].logo?D?D.p(I,L):(D=Hh(I),D.c(),D.m(t,null)):D&&(D.d(1),D=null),(!$||L&2)&&l!==(l=I[1].title+"")&&le(o,l),(!$||L&2)&&f!==(f=I[1].key.slice(0,-4)+"")&&le(d,f),I[0].enabled?M||(M=zh(),M.c(),M.m(e,g)):M&&(M.d(1),M=null);const F={};k.$set(F)},i(I){$||(A(k.$$.fragment,I),$=!0)},o(I){P(k.$$.fragment,I),$=!1},d(I){I&&w(e),D&&D.d(),M&&M.d(),I&&w(b),n[4](null),B(k,I),T=!1,C()}}}function $A(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){ie[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class _b extends ye{constructor(e){super(),ve(this,e,$A,SA,_e,{provider:1,config:0})}}function Bh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Uh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function CA(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const d=_=>_[9].key;for(let _=0;_0&&n[2].length>0&&Yh(),m=n[2];const g=_=>_[9].key;for(let _=0;_0&&_[2].length>0?p||(p=Yh(),p.c(),p.m(l.parentNode,l)):p&&(p.d(1),p=null),b&5&&(m=_[2],re(),r=yt(r,b,g,1,_,m,a,o,Jt,Kh,null,Bh),ae())},i(_){if(!u){for(let b=0;bhe(i,"config",r)),{key:n,first:null,c(){t=y("div"),U(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&8&&(d.provider=e[9]),!s&&f&9&&(s=!0,d.config=e[0][e[9].key],ke(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),B(i)}}}function Yh(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new _b({props:a}),ie.push(()=>he(i,"config",r)),{key:n,first:null,c(){t=y("div"),U(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&4&&(d.provider=e[9]),!s&&f&5&&(s=!0,d.config=e[0][e[9].key],ke(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),B(i)}}}function MA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g;const _=[TA,CA],b=[];function k($,T){return $[1]?0:1}return p=k(n),m=b[p]=_[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=Y(n[4]),r=E(),a=y("div"),u=y("div"),f=y("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","m-b-base"),h(u,"class","panel"),h(a,"class","wrapper")},m($,T){S($,e,T),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S($,r,T),S($,a,T),v(a,u),v(u,f),v(u,d),b[p].m(u,null),g=!0},p($,T){(!g||T&16)&&le(o,$[4]);let C=p;p=k($),p===C?b[p].p($,T):(re(),P(b[C],1,1,()=>{b[C]=null}),ae(),m=b[p],m?m.p($,T):(m=b[p]=_[p]($),m.c()),A(m,1),m.m(u,null))},i($){g||(A(m),g=!0)},o($){P(m),g=!1},d($){$&&w(e),$&&w(r),$&&w(a),b[p].d()}}}function OA(n){let e,t,i,s;return e=new Bi({}),i=new Pn({props:{$$slots:{default:[MA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function DA(n,e,t){let i,s,l;Ze(n,Ft,p=>t(4,l=p)),rn(Ft,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const p=await pe.settings.getAll()||{};u(p)}catch(p){pe.errorResponseHandler(p)}t(1,o=!1)}function u(p){p=p||{},t(0,r={});for(const m of mo)t(0,r[m.key]=Object.assign({enabled:!1},p[m.key]),r)}function f(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}function d(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=mo.filter(p=>{var m;return(m=r[p.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=mo.filter(p=>{var m;return!((m=r[p.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,d]}class EA extends ye{constructor(e){super(),ve(this,e,DA,OA,_e,{})}}function AA(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=Y(n[3]),i=Y(" duration (in seconds)"),l=E(),o=y("input"),a=E(),u=y("div"),f=y("span"),f.textContent="Invalidate all previously issued tokens",h(e,"for",s=n[6]),h(o,"type","number"),h(o,"id",r=n[6]),o.required=!0,h(f,"class","link-primary"),x(f,"txt-success",!!n[1]),h(u,"class","help-block")},m(m,g){S(m,e,g),v(e,t),v(e,i),S(m,l,g),S(m,o,g),fe(o,n[0]),S(m,a,g),S(m,u,g),v(u,f),d||(p=[J(o,"input",n[4]),J(f,"click",n[5])],d=!0)},p(m,g){g&8&&le(t,m[3]),g&64&&s!==(s=m[6])&&h(e,"for",s),g&64&&r!==(r=m[6])&&h(o,"id",r),g&1&>(o.value)!==m[0]&&fe(o,m[0]),g&2&&x(f,"txt-success",!!m[1])},d(m){m&&w(e),m&&w(l),m&&w(o),m&&w(a),m&&w(u),d=!1,Ae(p)}}}function IA(n){let e,t;return e=new de({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[AA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function PA(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=gt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=H.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class gb extends ye{constructor(e){super(),ve(this,e,PA,IA,_e,{key:2,label:3,duration:0,secret:1})}}function Jh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Zh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function LA(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],d=new Map,p,m,g,_,b,k,$,T,C,D,M,O=n[5];const I=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nhe(i,"duration",r)),ie.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=Ce(),U(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&33&&(s=!0,p.duration=e[0][e[19].key].duration,ke(()=>s=!1)),!l&&d&33&&(l=!0,p.secret=e[0][e[19].key].secret,ke(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),B(i,f)}}}function Xh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new gb({props:u}),ie.push(()=>he(i,"duration",r)),ie.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=Ce(),U(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&65&&(s=!0,p.duration=e[0][e[19].key].duration,ke(()=>s=!1)),!l&&d&65&&(l=!0,p.secret=e[0][e[19].key].secret,ke(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),B(i,f)}}}function Qh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function FA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b;const k=[NA,LA],$=[];function T(C,D){return C[1]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=Y(n[4]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Adjust common token options.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content m-b-sm txt-xl"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),g=!0,_||(b=J(u,"submit",at(n[7])),_=!0)},p(C,D){(!g||D&16)&&le(o,C[4]);let M=p;p=T(C),p===M?$[p].p(C,D):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){g||(A(m),g=!0)},o(C){P(m),g=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),_=!1,b()}}}function RA(n){let e,t,i,s;return e=new Bi({}),i=new Pn({props:{$$slots:{default:[FA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function qA(n,e,t){let i,s,l;Ze(n,Ft,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];rn(Ft,l="Token options",l);let a={},u={},f=!1,d=!1;p();async function p(){t(1,f=!0);try{const M=await pe.settings.getAll()||{};g(M)}catch(M){pe.errorResponseHandler(M)}t(1,f=!1)}async function m(){if(!(d||!s)){t(2,d=!0);try{const M=await pe.settings.update(H.filterRedactedProps(u));g(M),xt("Successfully saved tokens options.")}catch(M){pe.errorResponseHandler(M)}t(2,d=!1)}}function g(M){var I;M=M||{},t(0,u={});const O=o.concat(r);for(const L of O)t(0,u[L.key]={duration:((I=M[L.key])==null?void 0:I.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function _(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function k(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}function $(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function T(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}const C=()=>_(),D=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,d,s,l,o,r,m,_,a,i,b,k,$,T,C,D]}class jA extends ye{constructor(e){super(),ve(this,e,qA,RA,_e,{})}}function VA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g;return o=new rb({props:{content:n[2]}}),{c(){e=y("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in - another PocketBase environment.

    `,t=E(),i=y("div"),s=y("button"),s.innerHTML='Copy',l=E(),U(o.$$.fragment),r=E(),a=y("div"),u=y("div"),f=E(),d=y("button"),d.innerHTML=` - Download as JSON`,h(e,"class","content txt-xl m-b-base"),h(s,"type","button"),h(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),h(i,"tabindex","0"),h(i,"class","export-preview svelte-jm5c4z"),h(u,"class","flex-fill"),h(d,"type","button"),h(d,"class","btn btn-expanded"),h(a,"class","flex m-t-base")},m(_,b){S(_,e,b),S(_,t,b),S(_,i,b),v(i,s),v(i,l),z(o,i,null),n[8](i),S(_,r,b),S(_,a,b),v(a,u),v(a,f),v(a,d),p=!0,m||(g=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(d,"click",n[10])],m=!0)},p(_,b){const k={};b&4&&(k.content=_[2]),o.$set(k)},i(_){p||(A(o.$$.fragment,_),p=!0)},o(_){P(o.$$.fragment,_),p=!1},d(_){_&&w(e),_&&w(t),_&&w(i),B(o),n[8](null),_&&w(r),_&&w(a),m=!1,Ae(g)}}}function HA(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function zA(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[HA,VA],g=[];function _(b,k){return b[1]?0:1}return f=_(n),d=g[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=Y(n[3]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),g[f].m(u,null),p=!0},p(b,k){(!p||k&8)&&le(o,b[3]);let $=f;f=_(b),f===$?g[f].p(b,k):(re(),P(g[$],1,1,()=>{g[$]=null}),ae(),d=g[f],d?d.p(b,k):(d=g[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),g[f].d()}}}function BA(n){let e,t,i,s;return e=new Bi({}),i=new Pn({props:{$$slots:{default:[zA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function UA(n,e,t){let i,s;Ze(n,Ft,b=>t(3,s=b)),rn(Ft,s="Export collections",s);const l="export_"+H.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await pe.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){pe.errorResponseHandler(b)}t(1,a=!1)}function f(){H.downloadJson(r,"pb_schema")}function d(){H.copyToClipboard(i),s1("The configuration was copied to your clipboard!",3e3)}const p=()=>d();function m(b){ie[b?"unshift":"push"](()=>{o=b,t(0,o)})}const g=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const k=window.getSelection(),$=document.createRange();$.selectNodeContents(o),k.removeAllRanges(),k.addRange($)}},_=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,d,r,p,m,g,_]}class WA extends ye{constructor(e){super(),ve(this,e,UA,BA,_e,{})}}function xh(n,e,t){const i=n.slice();return i[14]=e[t],i}function e_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function t_(n,e,t){const i=n.slice();return i[14]=e[t],i}function n_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function i_(n,e,t){const i=n.slice();return i[14]=e[t],i}function s_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function l_(n,e,t){const i=n.slice();return i[30]=e[t],i}function YA(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&o_(),a=n[0].name!==n[1].name&&r_(n);return{c(){e=y("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=y("strong"),o=Y(l),h(s,"class","txt"),h(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),v(e,t),a&&a.m(e,null),v(e,i),v(e,s),v(s,o)},p(u,f){u[9]?r||(r=o_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=r_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&le(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function KA(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Deleted",t=E(),i=y("strong"),l=Y(s),h(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function JA(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Added",t=E(),i=y("strong"),l=Y(s),h(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function o_(n){let e;return{c(){e=y("span"),e.textContent="Changed",h(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function r_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=y("strong"),i=Y(t),s=E(),l=y("i"),h(e,"class","txt-strikethrough txt-hint"),h(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),v(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&le(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function a_(n){var b,k;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,d,p,m,g=n[12]((k=n[1])==null?void 0:k[n[30]])+"",_;return{c(){var $,T,C,D,M,O;e=y("tr"),t=y("td"),i=y("span"),l=Y(s),o=E(),r=y("td"),a=y("pre"),f=Y(u),d=E(),p=y("td"),m=y("pre"),_=Y(g),h(t,"class","min-width svelte-lmkr38"),h(a,"class","txt"),h(r,"class","svelte-lmkr38"),x(r,"changed-old-col",!n[10]&&gn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),x(r,"changed-none-col",n[10]),h(m,"class","txt"),h(p,"class","svelte-lmkr38"),x(p,"changed-new-col",!n[5]&&gn((C=n[0])==null?void 0:C[n[30]],(D=n[1])==null?void 0:D[n[30]])),x(p,"changed-none-col",n[5]),h(e,"class","svelte-lmkr38"),x(e,"txt-primary",gn((M=n[0])==null?void 0:M[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m($,T){S($,e,T),v(e,t),v(t,i),v(i,l),v(e,o),v(e,r),v(r,a),v(a,f),v(e,d),v(e,p),v(p,m),v(m,_)},p($,T){var C,D,M,O,I,L,F,q;T[0]&1&&u!==(u=$[12]((C=$[0])==null?void 0:C[$[30]])+"")&&le(f,u),T[0]&3075&&x(r,"changed-old-col",!$[10]&&gn((D=$[0])==null?void 0:D[$[30]],(M=$[1])==null?void 0:M[$[30]])),T[0]&1024&&x(r,"changed-none-col",$[10]),T[0]&2&&g!==(g=$[12]((O=$[1])==null?void 0:O[$[30]])+"")&&le(_,g),T[0]&2083&&x(p,"changed-new-col",!$[5]&&gn((I=$[0])==null?void 0:I[$[30]],(L=$[1])==null?void 0:L[$[30]])),T[0]&32&&x(p,"changed-none-col",$[5]),T[0]&2051&&x(e,"txt-primary",gn((F=$[0])==null?void 0:F[$[30]],(q=$[1])==null?void 0:q[$[30]]))},d($){$&&w(e)}}}function u_(n){let e,t=n[6],i=[];for(let s=0;sProps - Old - New`,l=E(),o=y("tbody");for(let C=0;C!["schema","created","updated"].includes(k));function _(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(k=>!f.find($=>k.id==$.id))))}function b(k){return typeof k>"u"?"":H.isObject(k)?JSON.stringify(k,null,4):k}return n.$$set=k=>{"collectionA"in k&&t(0,o=k.collectionA),"collectionB"in k&&t(1,r=k.collectionB),"deleteMissing"in k&&t(2,a=k.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&_(),n.$$.dirty[0]&24&&t(6,d=u.filter(k=>!f.find($=>k.id==$.id))),n.$$.dirty[0]&24&&t(7,p=f.filter(k=>u.find($=>$.id==k.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(k=>!u.find($=>$.id==k.id))),n.$$.dirty[0]&7&&t(9,l=H.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,d,p,m,l,s,g,b]}class XA extends ye{constructor(e){super(),ve(this,e,GA,ZA,_e,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function g_(n,e,t){const i=n.slice();return i[17]=e[t],i}function b_(n){let e,t;return e=new XA({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function QA(n){let e,t,i=n[2],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{g()}):g()}async function g(){if(!u){t(4,u=!0);try{await pe.collections.import(o,a),xt("Successfully imported collections configuration."),i("submit")}catch(C){pe.errorResponseHandler(C)}t(4,u=!1),d()}}const _=()=>m(),b=()=>!u;function k(C){ie[C?"unshift":"push"](()=>{s=C,t(1,s)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&p()},[d,s,r,a,u,m,f,l,o,_,b,k,$,T]}class iI extends ye{constructor(e){super(),ve(this,e,nI,tI,_e,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function v_(n,e,t){const i=n.slice();return i[32]=e[t],i}function y_(n,e,t){const i=n.slice();return i[35]=e[t],i}function k_(n,e,t){const i=n.slice();return i[32]=e[t],i}function sI(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$,T,C,D,M,O;a=new de({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[oI,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let I=!1,L=n[6]&&n[1].length&&!n[7]&&S_(),F=n[6]&&n[1].length&&n[7]&&$_(n),q=n[13].length&&N_(n),N=!!n[0]&&F_(n);return{c(){e=y("input"),t=E(),i=y("div"),s=y("p"),l=Y(`Paste below the collections configuration you want to import or - `),o=y("button"),o.innerHTML='Load from JSON file',r=E(),U(a.$$.fragment),u=E(),f=E(),L&&L.c(),d=E(),F&&F.c(),p=E(),q&&q.c(),m=E(),g=y("div"),N&&N.c(),_=E(),b=y("div"),k=E(),$=y("button"),T=y("span"),T.textContent="Review",h(e,"type","file"),h(e,"class","hidden"),h(e,"accept",".json"),h(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),h(i,"class","content txt-xl m-b-base"),h(b,"class","flex-fill"),h(T,"class","txt"),h($,"type","button"),h($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=C=!n[14],h(g,"class","flex m-t-base")},m(R,j){S(R,e,j),n[19](e),S(R,t,j),S(R,i,j),v(i,s),v(s,l),v(s,o),S(R,r,j),z(a,R,j),S(R,u,j),S(R,f,j),L&&L.m(R,j),S(R,d,j),F&&F.m(R,j),S(R,p,j),q&&q.m(R,j),S(R,m,j),S(R,g,j),N&&N.m(g,null),v(g,_),v(g,b),v(g,k),v(g,$),v($,T),D=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(R,j){(!D||j[0]&4096)&&x(o,"btn-loading",R[12]);const V={};j[0]&64&&(V.class="form-field "+(R[6]?"":"field-error")),j[0]&65|j[1]&1536&&(V.$$scope={dirty:j,ctx:R}),a.$set(V),R[6]&&R[1].length&&!R[7]?L||(L=S_(),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?F?F.p(R,j):(F=$_(R),F.c(),F.m(p.parentNode,p)):F&&(F.d(1),F=null),R[13].length?q?q.p(R,j):(q=N_(R),q.c(),q.m(m.parentNode,m)):q&&(q.d(1),q=null),R[0]?N?N.p(R,j):(N=F_(R),N.c(),N.m(g,_)):N&&(N.d(1),N=null),(!D||j[0]&16384&&C!==(C=!R[14]))&&($.disabled=C)},i(R){D||(A(a.$$.fragment,R),A(I),D=!0)},o(R){P(a.$$.fragment,R),P(I),D=!1},d(R){R&&w(e),n[19](null),R&&w(t),R&&w(i),R&&w(r),B(a,R),R&&w(u),R&&w(f),L&&L.d(R),R&&w(d),F&&F.d(R),R&&w(p),q&&q.d(R),R&&w(m),R&&w(g),N&&N.d(),M=!1,Ae(O)}}}function lI(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function w_(n){let e;return{c(){e=y("div"),e.textContent="Invalid collections configuration.",h(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function oI(n){let e,t,i,s,l,o,r,a,u,f,d=!!n[0]&&!n[6]&&w_();return{c(){e=y("label"),t=Y("Collections"),s=E(),l=y("textarea"),r=E(),d&&d.c(),a=Ce(),h(e,"for",i=n[40]),h(e,"class","p-b-10"),h(l,"id",o=n[40]),h(l,"class","code"),h(l,"spellcheck","false"),h(l,"rows","15"),l.required=!0},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0]),S(p,r,m),d&&d.m(p,m),S(p,a,m),u||(f=J(l,"input",n[22]),u=!0)},p(p,m){m[1]&512&&i!==(i=p[40])&&h(e,"for",i),m[1]&512&&o!==(o=p[40])&&h(l,"id",o),m[0]&1&&fe(l,p[0]),p[0]&&!p[6]?d||(d=w_(),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),d&&d.d(p),p&&w(a),u=!1,f()}}}function S_(n){let e;return{c(){e=y("div"),e.innerHTML=`
    -
    Your collections configuration is already up-to-date!
    `,h(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $_(n){let e,t,i,s,l,o=n[9].length&&C_(n),r=n[4].length&&O_(n),a=n[8].length&&I_(n);return{c(){e=y("h5"),e.textContent="Detected changes",t=E(),i=y("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),h(e,"class","section-title"),h(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),v(i,s),r&&r.m(i,null),v(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=C_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=O_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=I_(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function C_(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=E(),s=y("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are - imported with different IDs. You can replace them in the import if you want - to.`,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:X,d(u){u&&w(e),r=!1,a()}}}function F_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function rI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[lI,sI],g=[];function _(b,k){return b[5]?0:1}return f=_(n),d=g[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=Y(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),g[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&le(o,b[15]);let $=f;f=_(b),f===$?g[f].p(b,k):(re(),P(g[$],1,1,()=>{g[$]=null}),ae(),d=g[f],d?d.p(b,k):(d=g[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),g[f].d()}}}function aI(n){let e,t,i,s,l,o;e=new Bi({}),i=new Pn({props:{$$slots:{default:[rI]},$$scope:{ctx:n}}});let r={};return l=new iI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[27](null),B(l,a)}}}function uI(n,e,t){let i,s,l,o,r,a,u;Ze(n,Ft,G=>t(15,u=G)),rn(Ft,u="Import collections",u);let f,d,p="",m=!1,g=[],_=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,_=await pe.collections.getFullList(200));for(let G of _)delete G.created,delete G.updated}catch(G){pe.errorResponseHandler(G)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let G of g){const ce=H.findByKey(_,"id",G.id);!(ce!=null&&ce.id)||!H.hasCollectionChanges(ce,G,b)||k.push({new:G,old:ce})}}function D(){t(1,g=[]);try{t(1,g=JSON.parse(p))}catch{}Array.isArray(g)?t(1,g=H.filterDuplicatesByKey(g)):t(1,g=[]);for(let G of g)delete G.created,delete G.updated,G.schema=H.filterDuplicatesByKey(G.schema)}function M(){var G,ce;for(let Q of g){const se=H.findByKey(_,"name",Q.name)||H.findByKey(_,"id",Q.id);if(!se)continue;const ge=Q.id,$e=se.id;Q.id=$e;const Ve=Array.isArray(se.schema)?se.schema:[],Be=Array.isArray(Q.schema)?Q.schema:[];for(const we of Be){const Oe=H.findByKey(Ve,"name",we.name);Oe&&Oe.id&&(we.id=Oe.id)}for(let we of g)if(Array.isArray(we.schema))for(let Oe of we.schema)(G=Oe.options)!=null&&G.collectionId&&((ce=Oe.options)==null?void 0:ce.collectionId)===ge&&(Oe.options.collectionId=$e)}t(0,p=JSON.stringify(g,null,4))}function O(G){t(12,m=!0);const ce=new FileReader;ce.onload=async Q=>{t(12,m=!1),t(10,f.value="",f),t(0,p=Q.target.result),await an(),g.length||(hl("Invalid collections configuration."),I())},ce.onerror=Q=>{console.warn(Q),hl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},ce.readAsText(G)}function I(){t(0,p=""),t(10,f.value="",f),un({})}function L(G){ie[G?"unshift":"push"](()=>{f=G,t(10,f)})}const F=()=>{f.files.length&&O(f.files[0])},q=()=>{f.click()};function N(){p=this.value,t(0,p)}function R(){b=this.checked,t(3,b)}const j=()=>M(),V=()=>I(),W=()=>d==null?void 0:d.show(_,g,b);function ee(G){ie[G?"unshift":"push"](()=>{d=G,t(11,d)})}const te=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&D(),n.$$.dirty[0]&3&&t(6,i=!!p&&g.length&&g.length===g.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=_.filter(G=>i&&b&&!H.findByKey(g,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=g.filter(G=>i&&!H.findByKey(_,"id",G.id))),n.$$.dirty[0]&10&&(typeof g<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=g.filter(G=>{let ce=H.findByKey(_,"name",G.name)||H.findByKey(_,"id",G.id);if(!ce)return!1;if(ce.id!=G.id)return!0;const Q=Array.isArray(ce.schema)?ce.schema:[],se=Array.isArray(G.schema)?G.schema:[];for(const ge of se){if(H.findByKey(Q,"id",ge.id))continue;const Ve=H.findByKey(Q,"name",ge.name);if(Ve&&ge.id!=Ve.id)return!0}return!1}))},[p,g,_,b,k,$,i,o,l,s,f,d,m,a,r,u,M,O,I,L,F,q,N,R,j,V,W,ee,te]}class fI extends ye{constructor(e){super(),ve(this,e,uI,aI,_e,{},null,[-1,-1])}}const Bt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ji("/"):!0}],cI={"/login":jt({component:iE,conditions:Bt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":jt({asyncComponent:()=>rt(()=>import("./PageAdminRequestPasswordReset-40671a2b.js"),[],import.meta.url),conditions:Bt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":jt({asyncComponent:()=>rt(()=>import("./PageAdminConfirmPasswordReset-bc30579b.js"),[],import.meta.url),conditions:Bt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":jt({component:MD,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":jt({component:y$,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":jt({component:pE,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":jt({component:XD,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":jt({component:XE,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":jt({component:pA,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":jt({component:EA,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":jt({component:jA,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":jt({component:WA,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":jt({component:fI,conditions:Bt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":jt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-5ecff2bc.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":jt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-5ecff2bc.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":jt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-5529d20b.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":jt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-5529d20b.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":jt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-51c5d98d.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":jt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-51c5d98d.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":jt({asyncComponent:()=>rt(()=>import("./PageOAuth2Redirect-c20f1fc5.js"),[],import.meta.url),conditions:Bt,userData:{showAppSidebar:!1}}),"*":jt({component:Hy,userData:{showAppSidebar:!1}})};function dI(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:d=m=>Math.sqrt(m)*120,easing:p=Wo}=i;return{delay:f,duration:Ht(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,g)=>{const _=g*a,b=g*u,k=m+g*e.width/t.width,$=m+g*e.height/t.height;return`transform: ${l} translate(${_}px, ${b}px) scale(${k}, ${$});`}}}function R_(n,e,t){const i=n.slice();return i[2]=e[t],i}function pI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function mI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function _I(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function q_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m,g=X,_,b,k;function $(M,O){return M[2].type==="info"?_I:M[2].type==="success"?hI:M[2].type==="warning"?mI:pI}let T=$(e),C=T(e);function D(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),C.c(),s=E(),l=y("div"),r=Y(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){S(M,t,O),v(t,i),C.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),_=!0,b||(k=J(u,"click",at(D)),b=!0)},p(M,O){e=M,T!==(T=$(e))&&(C.d(1),C=T(e),C&&(C.c(),C.m(i,null))),(!_||O&1)&&o!==(o=e[2].message+"")&&le(r,o),(!_||O&1)&&x(t,"alert-info",e[2].type=="info"),(!_||O&1)&&x(t,"alert-success",e[2].type=="success"),(!_||O&1)&&x(t,"alert-danger",e[2].type=="error"),(!_||O&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){qb(t),g(),K_(t,m)},a(){g(),g=Rb(t,m,dI,{duration:150})},i(M){_||(tt(()=>{_&&(p&&p.end(1),d=G_(t,bt,{duration:150}),d.start())}),_=!0)},o(M){d&&d.invalidate(),p=wa(t,Qr,{duration:150}),_=!1},d(M){M&&w(t),C.d(),M&&p&&p.end(),b=!1,k()}}}function gI(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>l1(l)]}class vI extends ye{constructor(e){super(),ve(this,e,bI,gI,_e,{})}}function yI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=Y(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&w(e)}}}function kI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Ae(r)}}}function wI(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[kI],header:[yI]},$$scope:{ctx:n}};return e=new hn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),B(e,s)}}}function SI(n,e,t){let i;Ze(n,ru,d=>t(1,i=d));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(d){ie[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await an(),t(3,o=!1),ub()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class $I extends ye{constructor(e){super(),ve(this,e,SI,wI,_e,{})}}function j_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,g,_,b,k,$;return _=new ei({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[CI]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),g=E(),U(_.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),mn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,g),z(_,d,null),b=!0,k||($=[Ee(dn.call(null,t)),Ee(dn.call(null,l)),Ee(Zn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ee(Ye.call(null,l,{text:"Collections",position:"right"})),Ee(dn.call(null,r)),Ee(Zn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ee(Ye.call(null,r,{text:"Logs",position:"right"})),Ee(dn.call(null,u)),Ee(Zn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ee(Ye.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!mn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const D={};C&4096&&(D.$$scope={dirty:C,ctx:T}),_.$set(D)},i(T){b||(A(_.$$.fragment,T),b=!0)},o(T){P(_.$$.fragment,T),b=!1},d(T){T&&w(e),B(_),k=!1,Ae($)}}}function CI(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` - Manage admins`,t=E(),i=y("hr"),s=E(),l=y("button"),l.innerHTML=` - Logout`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ee(dn.call(null,e)),J(l,"click",n[7])],o=!0)},p:X,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Ae(r)}}}function V_(n){let e,t,i;return t=new du({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tinymce-preloader hidden")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p:X,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function TI(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;document.title=e=H.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let g=((b=n[0])==null?void 0:b.id)&&n[1]&&j_(n);o=new Xb({props:{routes:cI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new vI({}),f=new $I({});let _=n[1]&&!n[2]&&V_(n);return{c(){t=E(),i=y("div"),g&&g.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),_&&_.c(),p=Ce(),h(l,"class","app-body"),h(i,"class","app-layout")},m(k,$){S(k,t,$),S(k,i,$),g&&g.m(i,null),v(i,s),v(i,l),z(o,l,null),v(l,r),z(a,l,null),S(k,u,$),z(f,k,$),S(k,d,$),_&&_.m(k,$),S(k,p,$),m=!0},p(k,[$]){var T;(!m||$&24)&&e!==(e=H.joinNonEmpty([k[4],k[3],"PocketBase"]," - "))&&(document.title=e),(T=k[0])!=null&&T.id&&k[1]?g?(g.p(k,$),$&3&&A(g,1)):(g=j_(k),g.c(),A(g,1),g.m(i,s)):g&&(re(),P(g,1,1,()=>{g=null}),ae()),k[1]&&!k[2]?_?(_.p(k,$),$&6&&A(_,1)):(_=V_(k),_.c(),A(_,1),_.m(p.parentNode,p)):_&&(re(),P(_,1,1,()=>{_=null}),ae())},i(k){m||(A(g),A(o.$$.fragment,k),A(a.$$.fragment,k),A(f.$$.fragment,k),A(_),m=!0)},o(k){P(g),P(o.$$.fragment,k),P(a.$$.fragment,k),P(f.$$.fragment,k),P(_),m=!1},d(k){k&&w(t),k&&w(i),g&&g.d(),B(o),B(a),k&&w(u),B(f,k),k&&w(d),_&&_.d(k),k&&w(p)}}}function MI(n,e,t){let i,s,l,o;Ze(n,Es,_=>t(10,i=_)),Ze(n,wo,_=>t(3,s=_)),Ze(n,Na,_=>t(0,l=_)),Ze(n,Ft,_=>t(4,o=_));let r,a=!1,u=!1;function f(_){var b,k,$,T;((b=_==null?void 0:_.detail)==null?void 0:b.location)!==r&&(t(1,a=!!(($=(k=_==null?void 0:_.detail)==null?void 0:k.userData)!=null&&$.showAppSidebar)),r=(T=_==null?void 0:_.detail)==null?void 0:T.location,rn(Ft,o="",o),un({}),ub())}function d(){ji("/")}async function p(){var _,b;if(l!=null&&l.id)try{const k=await pe.settings.getAll({$cancelKey:"initialAppSettings"});rn(wo,s=((_=k==null?void 0:k.meta)==null?void 0:_.appName)||"",s),rn(Es,i=!!((b=k==null?void 0:k.meta)!=null&&b.hideControls),i)}catch(k){k!=null&&k.isAbort||console.warn("Failed to load app settings.",k)}}function m(){pe.logout()}const g=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&p()},[l,a,u,s,o,f,d,m,g]}class OI extends ye{constructor(e){super(),ve(this,e,MI,TI,_e,{})}}new OI({target:document.getElementById("app")});export{Ae as A,xt as B,H as C,ji as D,Ce as E,r1 as F,ig as G,en as H,Ze as I,ci as J,Tt as K,ie as L,rb as M,yt as N,us as O,Jt as P,pt as Q,jo as R,ye as S,kn as T,qr as U,P as a,E as b,U as c,B as d,y as e,h as f,S as g,v as h,ve as i,Ee as j,re as k,dn as l,z as m,ae as n,w as o,pe as p,de as q,x as r,_e as s,A as t,J as u,at as v,Y as w,le as x,X as y,fe as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 5d8e5c31e..bd6e6ca28 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -45,8 +45,8 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - - + +
    diff --git a/ui/package-lock.json b/ui/package-lock.json index 17d453e82..be360aeb7 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -21,7 +21,7 @@ "chart.js": "^3.7.1", "chartjs-adapter-luxon": "^1.2.0", "luxon": "^2.3.2", - "pocketbase": "^0.14.4", + "pocketbase": "0.15.0-rc", "prismjs": "^1.28.0", "sass": "^1.45.0", "svelte": "^3.44.0", @@ -31,9 +31,9 @@ } }, "node_modules/@codemirror/autocomplete": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.6.0.tgz", - "integrity": "sha512-SjbgWSwNKbyQOiVXtG8DXG2z29zTbmzpGccxMqakVo+vqK8fx3Ai0Ee7is3JqX6dxJOoK0GfP3LfeUK53Ltv7w==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.7.1.tgz", + "integrity": "sha512-hSxf9S0uB+GV+gBsjY1FZNo53e1FFdzPceRfCfD1gWOnV6o21GfB5J5Wg9G/4h76XZMPrF0A6OCK/Rz5+V1egg==", "dev": true, "dependencies": { "@codemirror/language": "^6.0.0", @@ -91,9 +91,9 @@ } }, "node_modules/@codemirror/lang-javascript": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.7.tgz", - "integrity": "sha512-KXKqxlZ4W6t5I7i2ScmITUD3f/F5Cllk3kj0De9P9mFeYVfhOVOWuDLgYiLpk357u7Xh4dhqjJAnsNPPoTLghQ==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.8.tgz", + "integrity": "sha512-5cIA6IOkslTu1DtldcYnj7hsBm3p+cD37qSaKvW1kV16M6q9ysKvKrveCOWgbrj4+ilSWRL2JtSLudbeB158xg==", "dev": true, "dependencies": { "@codemirror/autocomplete": "^6.0.0", @@ -170,9 +170,9 @@ "dev": true }, "node_modules/@codemirror/view": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.10.0.tgz", - "integrity": "sha512-Oea3rvE4JQLMmLsy2b54yxXQJgJM9xKpUQIpF/LGgKUTH2lA06GAmEtKKWn5OUnbW3jrH1hHeUd8DJEgePMOeQ==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.11.1.tgz", + "integrity": "sha512-ffKhfty5XcadA2/QSmDCnG6ZQnDfKT4YsH9ACWluhoTpkHuW5gMAK07s9Y76j/OzUqyoUuF+/VISr9BuCWzPqw==", "dev": true, "dependencies": { "@codemirror/state": "^6.1.4", @@ -181,9 +181,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "cpu": [ "arm" ], @@ -197,9 +197,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "cpu": [ "arm64" ], @@ -213,9 +213,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "cpu": [ "x64" ], @@ -229,9 +229,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "cpu": [ "arm64" ], @@ -245,9 +245,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "cpu": [ "x64" ], @@ -261,9 +261,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "cpu": [ "arm64" ], @@ -277,9 +277,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "cpu": [ "x64" ], @@ -293,9 +293,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "cpu": [ "arm" ], @@ -309,9 +309,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "cpu": [ "arm64" ], @@ -325,9 +325,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "cpu": [ "ia32" ], @@ -341,9 +341,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "cpu": [ "loong64" ], @@ -357,9 +357,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "cpu": [ "mips64el" ], @@ -373,9 +373,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "cpu": [ "ppc64" ], @@ -389,9 +389,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "cpu": [ "riscv64" ], @@ -405,9 +405,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "cpu": [ "s390x" ], @@ -421,9 +421,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "cpu": [ "x64" ], @@ -437,9 +437,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "cpu": [ "x64" ], @@ -453,9 +453,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "cpu": [ "x64" ], @@ -469,9 +469,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "cpu": [ "x64" ], @@ -485,9 +485,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "cpu": [ "arm64" ], @@ -501,9 +501,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "cpu": [ "ia32" ], @@ -517,9 +517,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "cpu": [ "x64" ], @@ -594,9 +594,9 @@ } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.1.1.tgz", - "integrity": "sha512-7YeBDt4us0FiIMNsVXxyaP4Hwyn2/v9x3oqStkHU3ZdIc5O22pGwUwH33wUqYo+7Itdmo8zxJ45Qvfm3H7UUjQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.2.0.tgz", + "integrity": "sha512-KDtdva+FZrZlyug15KlbXuubntAPKcBau0K7QhAIqC5SAy0uDbjZwoexDRx0L0J2T4niEfC6FnA9GuQQJKg+Aw==", "dev": true, "dependencies": { "debug": "^4.3.4", @@ -733,9 +733,9 @@ } }, "node_modules/esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "hasInstallScript": true, "bin": { @@ -745,28 +745,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "node_modules/fill-range": { @@ -943,9 +943,9 @@ } }, "node_modules/pocketbase": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.14.4.tgz", - "integrity": "sha512-FZJmZ7+tRJ6ShK9h8nZJNSPVfDIR1gukqcAjrzc7IS2zgK4PdBv7wwIJtCRdYYBxHMNAvU1uFkpQ0sWE094wuw==", + "version": "0.15.0-rc", + "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.15.0-rc.tgz", + "integrity": "sha512-ozq/vsZtjq+wZ4eZJHtUzh3GghNdNJCgx/TkI+JawxqTq5siZ0hDiyw089jbtQpKmiI36i1ASAbo4numEJ0tLQ==", "dev": true }, "node_modules/postcss": { @@ -1007,9 +1007,9 @@ } }, "node_modules/rollup": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.0.tgz", - "integrity": "sha512-ANPhVcyeHvYdQMUyCbczy33nbLzI7RzrBje4uvNiTDJGIMtlKoOStmympwr9OtS1LZxiDmE2wvxHyVhoLtf1KQ==", + "version": "3.21.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.7.tgz", + "integrity": "sha512-KXPaEuR8FfUoK2uHwNjxTmJ18ApyvD6zJpYv9FOJSqLStmt6xOY84l1IjK2dSolQmoXknrhEFRaPRgOPdqCT5w==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -1061,9 +1061,9 @@ "dev": true }, "node_modules/svelte": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.58.0.tgz", - "integrity": "sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==", + "version": "3.59.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.1.tgz", + "integrity": "sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==", "dev": true, "engines": { "node": ">= 8" @@ -1118,9 +1118,9 @@ } }, "node_modules/vite": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.3.tgz", - "integrity": "sha512-MwFlLBO4udZXd+VBcezo3u8mC77YQk+ik+fbc0GZWGgzfbPP+8Kf0fldhARqvSYmtIWoAJ5BXPClUbMTlqFxrA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", "dev": true, "dependencies": { "esbuild": "^0.17.5", @@ -1188,9 +1188,9 @@ }, "dependencies": { "@codemirror/autocomplete": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.6.0.tgz", - "integrity": "sha512-SjbgWSwNKbyQOiVXtG8DXG2z29zTbmzpGccxMqakVo+vqK8fx3Ai0Ee7is3JqX6dxJOoK0GfP3LfeUK53Ltv7w==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.7.1.tgz", + "integrity": "sha512-hSxf9S0uB+GV+gBsjY1FZNo53e1FFdzPceRfCfD1gWOnV6o21GfB5J5Wg9G/4h76XZMPrF0A6OCK/Rz5+V1egg==", "dev": true, "requires": { "@codemirror/language": "^6.0.0", @@ -1242,9 +1242,9 @@ } }, "@codemirror/lang-javascript": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.7.tgz", - "integrity": "sha512-KXKqxlZ4W6t5I7i2ScmITUD3f/F5Cllk3kj0De9P9mFeYVfhOVOWuDLgYiLpk357u7Xh4dhqjJAnsNPPoTLghQ==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.8.tgz", + "integrity": "sha512-5cIA6IOkslTu1DtldcYnj7hsBm3p+cD37qSaKvW1kV16M6q9ysKvKrveCOWgbrj4+ilSWRL2JtSLudbeB158xg==", "dev": true, "requires": { "@codemirror/autocomplete": "^6.0.0", @@ -1321,9 +1321,9 @@ "dev": true }, "@codemirror/view": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.10.0.tgz", - "integrity": "sha512-Oea3rvE4JQLMmLsy2b54yxXQJgJM9xKpUQIpF/LGgKUTH2lA06GAmEtKKWn5OUnbW3jrH1hHeUd8DJEgePMOeQ==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.11.1.tgz", + "integrity": "sha512-ffKhfty5XcadA2/QSmDCnG6ZQnDfKT4YsH9ACWluhoTpkHuW5gMAK07s9Y76j/OzUqyoUuF+/VISr9BuCWzPqw==", "dev": true, "requires": { "@codemirror/state": "^6.1.4", @@ -1332,156 +1332,156 @@ } }, "@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "dev": true, "optional": true }, @@ -1547,9 +1547,9 @@ } }, "@sveltejs/vite-plugin-svelte": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.1.1.tgz", - "integrity": "sha512-7YeBDt4us0FiIMNsVXxyaP4Hwyn2/v9x3oqStkHU3ZdIc5O22pGwUwH33wUqYo+7Itdmo8zxJ45Qvfm3H7UUjQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.2.0.tgz", + "integrity": "sha512-KDtdva+FZrZlyug15KlbXuubntAPKcBau0K7QhAIqC5SAy0uDbjZwoexDRx0L0J2T4niEfC6FnA9GuQQJKg+Aw==", "dev": true, "requires": { "debug": "^4.3.4", @@ -1645,33 +1645,33 @@ "dev": true }, "esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "requires": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "fill-range": { @@ -1793,9 +1793,9 @@ "dev": true }, "pocketbase": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.14.4.tgz", - "integrity": "sha512-FZJmZ7+tRJ6ShK9h8nZJNSPVfDIR1gukqcAjrzc7IS2zgK4PdBv7wwIJtCRdYYBxHMNAvU1uFkpQ0sWE094wuw==", + "version": "0.15.0-rc", + "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.15.0-rc.tgz", + "integrity": "sha512-ozq/vsZtjq+wZ4eZJHtUzh3GghNdNJCgx/TkI+JawxqTq5siZ0hDiyw089jbtQpKmiI36i1ASAbo4numEJ0tLQ==", "dev": true }, "postcss": { @@ -1831,9 +1831,9 @@ "dev": true }, "rollup": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.0.tgz", - "integrity": "sha512-ANPhVcyeHvYdQMUyCbczy33nbLzI7RzrBje4uvNiTDJGIMtlKoOStmympwr9OtS1LZxiDmE2wvxHyVhoLtf1KQ==", + "version": "3.21.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.7.tgz", + "integrity": "sha512-KXPaEuR8FfUoK2uHwNjxTmJ18ApyvD6zJpYv9FOJSqLStmt6xOY84l1IjK2dSolQmoXknrhEFRaPRgOPdqCT5w==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -1869,9 +1869,9 @@ "dev": true }, "svelte": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.58.0.tgz", - "integrity": "sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==", + "version": "3.59.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.1.tgz", + "integrity": "sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==", "dev": true }, "svelte-flatpickr": { @@ -1909,9 +1909,9 @@ } }, "vite": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.3.tgz", - "integrity": "sha512-MwFlLBO4udZXd+VBcezo3u8mC77YQk+ik+fbc0GZWGgzfbPP+8Kf0fldhARqvSYmtIWoAJ5BXPClUbMTlqFxrA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", "dev": true, "requires": { "esbuild": "^0.17.5", diff --git a/ui/package.json b/ui/package.json index 00d5aa2cf..1ae0d19db 100644 --- a/ui/package.json +++ b/ui/package.json @@ -28,7 +28,7 @@ "chart.js": "^3.7.1", "chartjs-adapter-luxon": "^1.2.0", "luxon": "^2.3.2", - "pocketbase": "^0.14.4", + "pocketbase": "0.15.0-rc", "prismjs": "^1.28.0", "sass": "^1.45.0", "svelte": "^3.44.0", diff --git a/ui/src/components/admins/AdminUpsertPanel.svelte b/ui/src/components/admins/AdminUpsertPanel.svelte index bf77899e5..cdc1d3413 100644 --- a/ui/src/components/admins/AdminUpsertPanel.svelte +++ b/ui/src/components/admins/AdminUpsertPanel.svelte @@ -82,14 +82,15 @@ confirmClose = false; hide(); addSuccessToast(admin.$isNew ? "Successfully created admin." : "Successfully updated admin."); - dispatch("save", result); if (ApiClient.authStore.model?.id === result.id) { ApiClient.authStore.save(ApiClient.authStore.token, result); } + + dispatch("save", result); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }) .finally(() => { isSaving = false; @@ -111,7 +112,7 @@ dispatch("delete", admin); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }); }); } diff --git a/ui/src/components/admins/PageAdminConfirmPasswordReset.svelte b/ui/src/components/admins/PageAdminConfirmPasswordReset.svelte index 11a3a35d3..64a2cc5d8 100644 --- a/ui/src/components/admins/PageAdminConfirmPasswordReset.svelte +++ b/ui/src/components/admins/PageAdminConfirmPasswordReset.svelte @@ -26,7 +26,7 @@ addSuccessToast("Successfully set a new admin password."); replace("/"); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/admins/PageAdminRequestPasswordReset.svelte b/ui/src/components/admins/PageAdminRequestPasswordReset.svelte index 5fdf48836..644e9a89c 100644 --- a/ui/src/components/admins/PageAdminRequestPasswordReset.svelte +++ b/ui/src/components/admins/PageAdminRequestPasswordReset.svelte @@ -19,7 +19,7 @@ await ApiClient.admins.requestPasswordReset(email); success = true; } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/admins/PageAdmins.svelte b/ui/src/components/admins/PageAdmins.svelte index de3ab24e1..3049fbdae 100644 --- a/ui/src/components/admins/PageAdmins.svelte +++ b/ui/src/components/admins/PageAdmins.svelte @@ -58,7 +58,7 @@ isLoading = false; console.warn(err); clearList(); - ApiClient.errorResponseHandler(err, false); + ApiClient.error(err, false); } }); } diff --git a/ui/src/components/base/Installer.svelte b/ui/src/components/base/Installer.svelte index 295678c6c..f9c6bf2d9 100644 --- a/ui/src/components/base/Installer.svelte +++ b/ui/src/components/base/Installer.svelte @@ -28,7 +28,7 @@ dispatch("submit"); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/base/RefreshButton.svelte b/ui/src/components/base/RefreshButton.svelte index c9fac8600..511f37fa1 100644 --- a/ui/src/components/base/RefreshButton.svelte +++ b/ui/src/components/base/RefreshButton.svelte @@ -7,6 +7,9 @@ let tooltipData = { text: "Refresh", position: "right" }; export { tooltipData as tooltip }; + let classes = ""; + export { classes as class }; + let refreshTimeoutId = null; function refresh() { @@ -31,7 +34,7 @@ diff --git a/ui/src/components/logs/LogsChart.svelte b/ui/src/components/logs/LogsChart.svelte index 9e927be12..0b354e529 100644 --- a/ui/src/components/logs/LogsChart.svelte +++ b/ui/src/components/logs/LogsChart.svelte @@ -59,7 +59,7 @@ if (!err?.isAbort) { resetData(); console.warn(err); - ApiClient.errorResponseHandler(err, false); + ApiClient.error(err, false); } }) .finally(() => { diff --git a/ui/src/components/logs/LogsList.svelte b/ui/src/components/logs/LogsList.svelte index c53b3fc1d..88d72d021 100644 --- a/ui/src/components/logs/LogsList.svelte +++ b/ui/src/components/logs/LogsList.svelte @@ -70,7 +70,7 @@ isLoading = false; console.warn(err); clearList(); - ApiClient.errorResponseHandler(err, false); + ApiClient.error(err, false); } }); } diff --git a/ui/src/components/records/ExternalAuthsList.svelte b/ui/src/components/records/ExternalAuthsList.svelte index 481fa38bc..c0f2ae6f5 100644 --- a/ui/src/components/records/ExternalAuthsList.svelte +++ b/ui/src/components/records/ExternalAuthsList.svelte @@ -33,7 +33,7 @@ try { externalAuths = await ApiClient.collection(record.collectionId).listExternalAuths(record.id); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; @@ -53,7 +53,7 @@ loadExternalAuths(); // reload list }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }); }); } diff --git a/ui/src/components/records/PageRecordConfirmEmailChange.svelte b/ui/src/components/records/PageRecordConfirmEmailChange.svelte index f5480992b..1b041caae 100644 --- a/ui/src/components/records/PageRecordConfirmEmailChange.svelte +++ b/ui/src/components/records/PageRecordConfirmEmailChange.svelte @@ -28,7 +28,7 @@ await client.collection(payload.collectionId).confirmEmailChange(params?.token, password); success = true; } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/records/PageRecordConfirmPasswordReset.svelte b/ui/src/components/records/PageRecordConfirmPasswordReset.svelte index 5cc33c26b..ffc220b01 100644 --- a/ui/src/components/records/PageRecordConfirmPasswordReset.svelte +++ b/ui/src/components/records/PageRecordConfirmPasswordReset.svelte @@ -31,7 +31,7 @@ .confirmPasswordReset(params?.token, newPassword, newPasswordConfirm); success = true; } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/records/RecordUpsertPanel.svelte b/ui/src/components/records/RecordUpsertPanel.svelte index 64d73578c..4428e06d2 100644 --- a/ui/src/components/records/RecordUpsertPanel.svelte +++ b/ui/src/components/records/RecordUpsertPanel.svelte @@ -206,7 +206,7 @@ dispatch("save", result); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }) .finally(() => { isSaving = false; @@ -227,7 +227,7 @@ dispatch("delete", original); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }); }); } @@ -299,7 +299,7 @@ addSuccessToast(`Successfully sent verification email to ${original.email}.`); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }); }); } @@ -316,7 +316,7 @@ addSuccessToast(`Successfully sent password reset email to ${original.email}.`); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }); }); } diff --git a/ui/src/components/records/RecordsList.svelte b/ui/src/components/records/RecordsList.svelte index 4321e040e..b99d3c1a1 100644 --- a/ui/src/components/records/RecordsList.svelte +++ b/ui/src/components/records/RecordsList.svelte @@ -165,7 +165,7 @@ isLoading = false; console.warn(err); clearList(); - ApiClient.errorResponseHandler(err, false); + ApiClient.error(err, false); } }); } @@ -234,7 +234,7 @@ deselectAllRecords(); }) .catch((err) => { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); }) .finally(() => { isDeleting = false; diff --git a/ui/src/components/records/RecordsPicker.svelte b/ui/src/components/records/RecordsPicker.svelte index 1456491c6..f2a0f1033 100644 --- a/ui/src/components/records/RecordsPicker.svelte +++ b/ui/src/components/records/RecordsPicker.svelte @@ -107,7 +107,7 @@ list = CommonHelper.filterDuplicatesByKey(selected.concat(list)); } } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoadingSelected = false; @@ -144,7 +144,7 @@ currentPage = result.page; totalItems = result.totalItems; } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoadingList = false; diff --git a/ui/src/components/records/fields/RelationField.svelte b/ui/src/components/records/fields/RelationField.svelte index 3e4d6d451..737430b71 100644 --- a/ui/src/components/records/fields/RelationField.svelte +++ b/ui/src/components/records/fields/RelationField.svelte @@ -91,7 +91,7 @@ list = list; } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/settings/AuthProviderPanel.svelte b/ui/src/components/settings/AuthProviderPanel.svelte index 6b2e438d1..ec6462d05 100644 --- a/ui/src/components/settings/AuthProviderPanel.svelte +++ b/ui/src/components/settings/AuthProviderPanel.svelte @@ -51,7 +51,7 @@ hide(); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isSubmitting = false; diff --git a/ui/src/components/settings/BackupCreatePanel.svelte b/ui/src/components/settings/BackupCreatePanel.svelte new file mode 100644 index 000000000..98611eb85 --- /dev/null +++ b/ui/src/components/settings/BackupCreatePanel.svelte @@ -0,0 +1,138 @@ + + + { + if (isSubmitting) { + addInfoToast("A backup has already been started, please wait."); + return false; + } + + return true; + }} + beforeHide={() => { + if (isSubmitting) { + addInfoToast( + "The backup was started but may take a while to complete. You can come back later.", + 4500 + ); + } + + return true; + }} + popup + on:show + on:hide +> + +

    Initialize new backup

    +
    + +
    +
    + +
    +
    +

    + Please note that during the backup other concurrent write requrests may fail since the + database will be temporary "locked" (this usually happens only during the ZIP generation). +

    +

    + If you are using S3 storage for the collections file upload, you'll have to backup them + separately since they are not locally stored and will not be included in the final backup! +

    +
    +
    + + + + + + Must be in the format [a-z0-9_-].zip + + + + + + + +
    diff --git a/ui/src/components/settings/BackupRestorePanel.svelte b/ui/src/components/settings/BackupRestorePanel.svelte new file mode 100644 index 000000000..95fe14946 --- /dev/null +++ b/ui/src/components/settings/BackupRestorePanel.svelte @@ -0,0 +1,114 @@ + + + !isSubmitting} + popup + on:show + on:hide +> + +

    Restore {name}

    +
    + +
    +
    + +
    +
    +

    Please proceed with caution.

    +

    + The restore operation will replace your existing pb_data with the one from the backup + and will restart the application process! +

    +

    + Backup restore is still experimental and currently works only on UNIX based systems. +

    +
    +
    + +
    + Type the backup name +
    + {name} + +
    + to confirm: +
    + +
    + + + + +
    + + + + + +
    diff --git a/ui/src/components/settings/BackupsList.svelte b/ui/src/components/settings/BackupsList.svelte new file mode 100644 index 000000000..44953938a --- /dev/null +++ b/ui/src/components/settings/BackupsList.svelte @@ -0,0 +1,224 @@ + + +
    +
    + {#if isLoading} + {#each Array(backups.length || 1) as i} +
    + +
    + {/each} + {:else} + {#each backups as backup (backup.key)} +
    + +
    + {backup.key} + + ({CommonHelper.formattedFileSize(backup.size)}) + +
    +
    + + + +
    +
    + {:else} +
    + No backups yet. +
    + {/each} + {/if} +
    + +
    + +
    +
    + + { + loadBackups(); + }} +/> + + + + diff --git a/ui/src/components/settings/EmailTestPopup.svelte b/ui/src/components/settings/EmailTestPopup.svelte index e6813e062..26b759c93 100644 --- a/ui/src/components/settings/EmailTestPopup.svelte +++ b/ui/src/components/settings/EmailTestPopup.svelte @@ -72,7 +72,7 @@ hide(); } catch (err) { isSubmitting = false; - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } clearTimeout(testTimeoutId); diff --git a/ui/src/components/settings/ImportPopup.svelte b/ui/src/components/settings/ImportPopup.svelte index ed95d75cf..aef95066e 100644 --- a/ui/src/components/settings/ImportPopup.svelte +++ b/ui/src/components/settings/ImportPopup.svelte @@ -62,7 +62,7 @@ } } - function submitWithConfirm() { + function submitConfirm() { // find deleted fields const deletedFieldNames = []; if (deleteMissing) { @@ -109,7 +109,7 @@ addSuccessToast("Successfully imported collections configuration."); dispatch("submit"); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isImporting = false; @@ -137,13 +137,14 @@ {/each} - + diff --git a/ui/src/components/settings/PageApplication.svelte b/ui/src/components/settings/PageApplication.svelte index c134525dd..7dafc4164 100644 --- a/ui/src/components/settings/PageApplication.svelte +++ b/ui/src/components/settings/PageApplication.svelte @@ -29,7 +29,7 @@ const settings = (await ApiClient.settings.getAll()) || {}; init(settings); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; @@ -47,7 +47,7 @@ init(settings); addSuccessToast("Successfully saved application settings."); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isSaving = false; diff --git a/ui/src/components/settings/PageAuthProviders.svelte b/ui/src/components/settings/PageAuthProviders.svelte index e5f3c4be0..ba5bb5575 100644 --- a/ui/src/components/settings/PageAuthProviders.svelte +++ b/ui/src/components/settings/PageAuthProviders.svelte @@ -24,7 +24,7 @@ const result = (await ApiClient.settings.getAll()) || {}; initSettings(result); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; diff --git a/ui/src/components/settings/PageBackups.svelte b/ui/src/components/settings/PageBackups.svelte new file mode 100644 index 000000000..50d4ff5e6 --- /dev/null +++ b/ui/src/components/settings/PageBackups.svelte @@ -0,0 +1,293 @@ + + + + + + + +
    +
    +
    + Backup and restore your PocketBase data + refreshList()} + /> +
    + + + +
    + + + + {#if showBackupsSettings && !isLoading} +
    + + + + + + {#if enableAutoBackups} +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Only numeric list, steps or ranges are supported. +
    +
    +
    +
    + + + + +
    +
    +
    + {/if} + +
    + + + +
    +
    + + {#if formSettings.backups?.s3?.enabled && !hasChanges && !isSaving} + {#if isTesting} + + {:else if testError} +
    + + Failed to establish S3 connection +
    + {:else} +
    + + S3 connected successfully +
    + {/if} + {/if} + + {#if hasChanges} + + {/if} + + +
    + + {/if} +
    +
    + diff --git a/ui/src/components/settings/PageExportCollections.svelte b/ui/src/components/settings/PageExportCollections.svelte index db56b5455..a10dfc91e 100644 --- a/ui/src/components/settings/PageExportCollections.svelte +++ b/ui/src/components/settings/PageExportCollections.svelte @@ -33,7 +33,7 @@ delete collection.updated; } } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoadingCollections = false; diff --git a/ui/src/components/settings/PageImportCollections.svelte b/ui/src/components/settings/PageImportCollections.svelte index 5a9c91f01..a49fdb9cb 100644 --- a/ui/src/components/settings/PageImportCollections.svelte +++ b/ui/src/components/settings/PageImportCollections.svelte @@ -93,7 +93,7 @@ delete collection.updated; } } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoadingOldCollections = false; diff --git a/ui/src/components/settings/PageMail.svelte b/ui/src/components/settings/PageMail.svelte index 519189fec..e0b8e36f5 100644 --- a/ui/src/components/settings/PageMail.svelte +++ b/ui/src/components/settings/PageMail.svelte @@ -45,7 +45,7 @@ const settings = (await ApiClient.settings.getAll()) || {}; init(settings); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; @@ -64,7 +64,7 @@ setErrors({}); addSuccessToast("Successfully saved mail settings."); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isSaving = false; diff --git a/ui/src/components/settings/PageStorage.svelte b/ui/src/components/settings/PageStorage.svelte index 2a829b4fc..f56871e73 100644 --- a/ui/src/components/settings/PageStorage.svelte +++ b/ui/src/components/settings/PageStorage.svelte @@ -1,5 +1,4 @@ @@ -142,129 +103,57 @@ {#if isLoading}
    {:else} - - - - - - {#if originalFormSettings.s3?.enabled != formSettings.s3.enabled} -
    -
    -
    - + + {#if originalFormSettings.s3?.enabled != formSettings.s3.enabled} +
    +
    +
    + +
    +
    + If you have existing uploaded files, you'll have to migrate them manually + from the + + {originalFormSettings.s3?.enabled + ? "S3 storage" + : "local file system"} + + to the + {formSettings.s3.enabled + ? "S3 storage" + : "local file system"}. +
    + There are numerous command line tools that can help you, such as: + + rclone + , + + s5cmd + , etc. +
    -
    - If you have existing uploaded files, you'll have to migrate them manually from - the - - {originalFormSettings.s3?.enabled ? "S3 storage" : "local file system"} - - to the - {formSettings.s3.enabled ? "S3 storage" : "local file system"}. -
    - There are numerous command line tools that can help you, such as: - - rclone - , - - s5cmd - , etc. -
    -
    -
    -
    - {/if} - - {#if formSettings.s3.enabled} -
    -
    - - - - +
    -
    - - - - -
    -
    - - - - -
    -
    - - - - -
    -
    - - - - -
    -
    - - - - -
    - -
    -
    - {/if} + {/if} +
    @@ -272,10 +161,10 @@ {#if formSettings.s3?.enabled && !hasChanges && !isSaving} {#if isTesting} - {:else if testS3Error} + {:else if testError}
    Failed to establish S3 connection @@ -295,7 +184,7 @@ disabled={isSaving} on:click={() => reset()} > - Cancel + Reset {/if} diff --git a/ui/src/components/settings/PageTokenOptions.svelte b/ui/src/components/settings/PageTokenOptions.svelte index 86bb24be3..a3ef7a1cf 100644 --- a/ui/src/components/settings/PageTokenOptions.svelte +++ b/ui/src/components/settings/PageTokenOptions.svelte @@ -41,7 +41,7 @@ const result = (await ApiClient.settings.getAll()) || {}; initSettings(result); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isLoading = false; @@ -59,7 +59,7 @@ initSettings(result); addSuccessToast("Successfully saved tokens options."); } catch (err) { - ApiClient.errorResponseHandler(err); + ApiClient.error(err); } isSaving = false; diff --git a/ui/src/components/settings/S3Fields.svelte b/ui/src/components/settings/S3Fields.svelte new file mode 100644 index 000000000..ef509f548 --- /dev/null +++ b/ui/src/components/settings/S3Fields.svelte @@ -0,0 +1,143 @@ + + + + + + + + + +{#if config.enabled} +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + +
    + +
    +
    +{/if} diff --git a/ui/src/components/settings/SettingsSidebar.svelte b/ui/src/components/settings/SettingsSidebar.svelte index ab6845324..1a5cfc366 100644 --- a/ui/src/components/settings/SettingsSidebar.svelte +++ b/ui/src/components/settings/SettingsSidebar.svelte @@ -28,6 +28,15 @@ Files storage + + + Backups +