diff --git a/.idea/dictionaries/vabene1111_PC.xml b/.idea/dictionaries/vabene1111_PC.xml index bb97e302..2bd9a725 100644 --- a/.idea/dictionaries/vabene1111_PC.xml +++ b/.idea/dictionaries/vabene1111_PC.xml @@ -6,6 +6,7 @@ csrftoken gunicorn ical + invitelink mealie pepperplate safron diff --git a/cookbook/admin.py b/cookbook/admin.py index 41687f9c..0e903999 100644 --- a/cookbook/admin.py +++ b/cookbook/admin.py @@ -32,41 +32,7 @@ admin.site.unregister(Group) @admin.action(description='Delete all data from a space') def delete_space_action(modeladmin, request, queryset): for space in queryset: - CookLog.objects.filter(space=space).delete() - ViewLog.objects.filter(space=space).delete() - ImportLog.objects.filter(space=space).delete() - BookmarkletImport.objects.filter(space=space).delete() - - Comment.objects.filter(recipe__space=space).delete() - Keyword.objects.filter(space=space).delete() - Ingredient.objects.filter(space=space).delete() - Food.objects.filter(space=space).delete() - Unit.objects.filter(space=space).delete() - Step.objects.filter(space=space).delete() - NutritionInformation.objects.filter(space=space).delete() - RecipeBookEntry.objects.filter(book__space=space).delete() - RecipeBook.objects.filter(space=space).delete() - MealType.objects.filter(space=space).delete() - MealPlan.objects.filter(space=space).delete() - ShareLink.objects.filter(space=space).delete() - Recipe.objects.filter(space=space).delete() - - RecipeImport.objects.filter(space=space).delete() - SyncLog.objects.filter(sync__space=space).delete() - Sync.objects.filter(space=space).delete() - Storage.objects.filter(space=space).delete() - - ShoppingListEntry.objects.filter(shoppinglist__space=space).delete() - ShoppingListRecipe.objects.filter(shoppinglist__space=space).delete() - ShoppingList.objects.filter(space=space).delete() - - SupermarketCategoryRelation.objects.filter(supermarket__space=space).delete() - SupermarketCategory.objects.filter(space=space).delete() - Supermarket.objects.filter(space=space).delete() - - InviteLink.objects.filter(space=space).delete() - UserFile.objects.filter(space=space).delete() - Automation.objects.filter(space=space).delete() + space.save() class SpaceAdmin(admin.ModelAdmin): @@ -81,8 +47,8 @@ admin.site.register(Space, SpaceAdmin) class UserPreferenceAdmin(admin.ModelAdmin): - list_display = ('name', 'space', 'theme', 'nav_color', 'default_page', 'search_style',) # TODO add new fields - search_fields = ('user__username', 'space__name') + list_display = ('name', 'theme', 'nav_color', 'default_page', 'search_style',) # TODO add new fields + search_fields = ('user__username',) list_filter = ('theme', 'nav_color', 'default_page', 'search_style') date_hierarchy = 'created_at' diff --git a/cookbook/forms.py b/cookbook/forms.py index 239b1701..50f88228 100644 --- a/cookbook/forms.py +++ b/cookbook/forms.py @@ -37,12 +37,9 @@ class UserPreferenceForm(forms.ModelForm): prefix = 'preference' def __init__(self, *args, **kwargs): - if x := kwargs.get('instance', None): - space = x.space - else: - space = kwargs.pop('space') + space = kwargs.pop('space') super().__init__(*args, **kwargs) - self.fields['plan_share'].queryset = User.objects.filter(userpreference__space=space).all() + self.fields['plan_share'].queryset = User.objects.filter(userspace__space=space).all() class Meta: model = UserPreference diff --git a/cookbook/helper/permission_helper.py b/cookbook/helper/permission_helper.py index 0331a599..b701f543 100644 --- a/cookbook/helper/permission_helper.py +++ b/cookbook/helper/permission_helper.py @@ -2,14 +2,14 @@ from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.core.cache import caches -from django.core.exceptions import ValidationError +from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.http import HttpResponseRedirect from django.urls import reverse, reverse_lazy from django.utils.translation import gettext as _ from rest_framework import permissions from rest_framework.permissions import SAFE_METHODS -from cookbook.models import ShareLink, Recipe, UserPreference +from cookbook.models import ShareLink, Recipe, UserPreference, UserSpace def get_allowed_groups(groups_required): @@ -40,8 +40,11 @@ def has_group_permission(user, groups): return False groups_allowed = get_allowed_groups(groups) if user.is_authenticated: - if bool(user.groups.filter(name__in=groups_allowed)): - return True + if user_space := user.userspace_set.filter(active=True): + if len(user_space) != 1: + return False # do not allow any group permission if more than one space is active, needs to be changed when simultaneous multi-space-tenancy is added + if bool(user_space.first().groups.filter(name__in=groups_allowed)): + return True return False @@ -50,7 +53,6 @@ def is_object_owner(user, obj): Tests if a given user is the owner of a given object test performed by checking user against the objects user and create_by field (if exists) - superusers bypass all checks, unauthenticated users cannot own anything :param user django auth user object :param obj any object that should be tested :return: true if user is owner of object, false otherwise @@ -63,11 +65,25 @@ def is_object_owner(user, obj): return False +def is_space_owner(user, obj): + """ + Tests if a given user is the owner the space of a given object + :param user django auth user object + :param obj any object that should be tested + :return: true if user is owner of the objects space, false otherwise + """ + if not user.is_authenticated: + return False + try: + return obj.get_space().get_owner() == user + except Exception: + return False + + def is_object_shared(user, obj): """ Tests if a given user is shared for a given object test performed by checking user against the objects shared table - superusers bypass all checks, unauthenticated users cannot own anything :param user django auth user object :param obj any object that should be tested :return: true if user is shared for object, false otherwise @@ -163,7 +179,7 @@ class OwnerRequiredMixin(object): try: obj = self.get_object() - if obj.get_space() != request.space: + if not request.user.userspace.filter(space=obj.get_space()).exists(): messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!')) return HttpResponseRedirect(reverse_lazy('index')) @@ -181,7 +197,7 @@ class CustomIsOwner(permissions.BasePermission): verifies user has ownership over object (either user or created_by or user is request user) """ - message = _('You cannot interact with this object as it is not owned by you!') # noqa: E501 + message = _('You cannot interact with this object as it is not owned by you!') def has_permission(self, request, view): return request.user.is_authenticated @@ -190,6 +206,20 @@ class CustomIsOwner(permissions.BasePermission): return is_object_owner(request.user, obj) +class CustomIsSpaceOwner(permissions.BasePermission): + """ + Custom permission class for django rest framework views + verifies if the user is the owner of the space the object belongs to + """ + message = _('You cannot interact with this object as it is not owned by you!') + + def has_permission(self, request, view): + return request.user.is_authenticated + + def has_object_permission(self, request, view, obj): + return is_space_owner(request.user, obj) + + # TODO function duplicate/too similar name class CustomIsShared(permissions.BasePermission): """ @@ -290,7 +320,27 @@ def above_space_user_limit(space): :param space: Space to test for limits :return: Tuple (True if above or equal limit else false, message) """ - limit = space.max_users != 0 and UserPreference.objects.filter(space=space).count() > space.max_users + limit = space.max_users != 0 and UserSpace.objects.filter(space=space).count() > space.max_users if limit: return True, _('You have more users than allowed in your space.') return False, '' + + +def switch_user_active_space(user, space): + """ + Switch the currently active space of a user by setting all spaces to inactive and activating the one passed + :param user: user to change active space for + :param space: space to activate user for + :return user space object or none if not found/no permission + """ + try: + us = UserSpace.objects.get(space=space, user=user) + if not us.active: + UserSpace.objects.filter(user=user).update(active=False) + us.active = True + us.save() + return us + else: + return us + except ObjectDoesNotExist: + return None diff --git a/cookbook/helper/recipe_search.py b/cookbook/helper/recipe_search.py index b0ead870..fc62d741 100644 --- a/cookbook/helper/recipe_search.py +++ b/cookbook/helper/recipe_search.py @@ -760,6 +760,6 @@ def old_search(request): params = dict(request.GET) params['internal'] = None f = RecipeFilter(params, - queryset=Recipe.objects.filter(space=request.user.userpreference.space).all().order_by(Lower('name').asc()), + queryset=Recipe.objects.filter(space=request.space).all().order_by(Lower('name').asc()), space=request.space) return f.qs diff --git a/cookbook/helper/scope_middleware.py b/cookbook/helper/scope_middleware.py index f5179bcb..c3700e03 100644 --- a/cookbook/helper/scope_middleware.py +++ b/cookbook/helper/scope_middleware.py @@ -14,6 +14,12 @@ class ScopeMiddleware: def __call__(self, request): prefix = settings.JS_REVERSE_SCRIPT_PREFIX or '' + + # need to disable scopes for writing requests into userpref and enable for loading ? + if request.path.startswith(prefix + '/api/user-preference/'): + with scopes_disabled(): + return self.get_response(request) + if request.user.is_authenticated: if request.path.startswith(prefix + '/admin/'): @@ -26,14 +32,23 @@ class ScopeMiddleware: if request.path.startswith(prefix + '/accounts/'): return self.get_response(request) - with scopes_disabled(): - if request.user.userpreference.space is None and not reverse('account_logout') in request.path: - return views.no_space(request) + if request.path.startswith(prefix + '/switch-space/'): + return self.get_response(request) - if request.user.groups.count() == 0 and not reverse('account_logout') in request.path: + with scopes_disabled(): + if request.user.userspace_set.count() == 0 and not reverse('account_logout') in request.path: + return views.space_overview(request) + + # get active user space, if for some reason more than one space is active select first (group permission checks will fail, this is not intended at this point) + user_space = request.user.userspace_set.filter(active=True).first() + + if not user_space: + return views.space_overview(request) + + if user_space.groups.count() == 0 and not reverse('account_logout') in request.path: return views.no_groups(request) - request.space = request.user.userpreference.space + request.space = user_space.space # with scopes_disabled(): with scope(space=request.space): return self.get_response(request) @@ -41,9 +56,11 @@ class ScopeMiddleware: if request.path.startswith(prefix + '/api/'): try: if auth := TokenAuthentication().authenticate(request): - request.space = auth[0].userpreference.space - with scope(space=request.space): - return self.get_response(request) + user_space = auth[0].userspace_set.filter(active=True).first() + if user_space: + request.space = user_space.space + with scope(space=request.space): + return self.get_response(request) except AuthenticationFailed: pass diff --git a/cookbook/migrations/0084_auto_20200922_1233.py b/cookbook/migrations/0084_auto_20200922_1233.py index a2ddf284..93e08309 100644 --- a/cookbook/migrations/0084_auto_20200922_1233.py +++ b/cookbook/migrations/0084_auto_20200922_1233.py @@ -4,11 +4,12 @@ from django.db import migrations def create_default_space(apps, schema_editor): - Space = apps.get_model('cookbook', 'Space') - Space.objects.create( - name='Default', - message='' - ) + # Space = apps.get_model('cookbook', 'Space') + # Space.objects.create( + # name='Default', + # message='' + # ) + pass # Beginning with the multi space tenancy version (~something around 1.3) a default space is no longer needed as the first user can create it after setup class Migration(migrations.Migration): diff --git a/cookbook/migrations/0174_alter_food_substitute_userspace.py b/cookbook/migrations/0174_alter_food_substitute_userspace.py new file mode 100644 index 00000000..9fddb151 --- /dev/null +++ b/cookbook/migrations/0174_alter_food_substitute_userspace.py @@ -0,0 +1,45 @@ +# Generated by Django 4.0.4 on 2022-05-31 14:10 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +from django_scopes import scopes_disabled + + +def migrate_space_permissions(apps, schema_editor): + with scopes_disabled(): + UserPreference = apps.get_model('cookbook', 'UserPreference') + UserSpace = apps.get_model('cookbook', 'UserSpace') + + for up in UserPreference.objects.exclude(space=None).all(): + us = UserSpace.objects.create(user=up.user, space=up.space, active=True) + us.groups.set(up.user.groups.all()) + + +class Migration(migrations.Migration): + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('cookbook', '0173_recipe_source_url'), + ] + + operations = [ + migrations.AlterField( + model_name='food', + name='substitute', + field=models.ManyToManyField(blank=True, to='cookbook.food'), + ), + migrations.CreateModel( + name='UserSpace', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('active', models.BooleanField(default=False)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('groups', models.ManyToManyField(to='auth.group')), + ('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.space')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.RunPython(migrate_space_permissions) + ] diff --git a/cookbook/migrations/0175_remove_userpreference_space.py b/cookbook/migrations/0175_remove_userpreference_space.py new file mode 100644 index 00000000..e0455aa2 --- /dev/null +++ b/cookbook/migrations/0175_remove_userpreference_space.py @@ -0,0 +1,17 @@ +# Generated by Django 4.0.4 on 2022-05-31 14:56 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookbook', '0174_alter_food_substitute_userspace'), + ] + + operations = [ + migrations.RemoveField( + model_name='userpreference', + name='space', + ), + ] diff --git a/cookbook/models.py b/cookbook/models.py index 2ed79cc5..22bdf90f 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -2,9 +2,7 @@ import operator import pathlib import re import uuid -from collections import OrderedDict from datetime import date, timedelta -from decimal import Decimal from annoying.fields import AutoOneToOneField from django.contrib import auth @@ -14,10 +12,9 @@ from django.contrib.postgres.search import SearchVectorField from django.core.files.uploadedfile import InMemoryUploadedFile, UploadedFile from django.core.validators import MinLengthValidator from django.db import IntegrityError, models -from django.db.models import Index, ProtectedError, Q, Subquery +from django.db.models import Index, ProtectedError, Q from django.db.models.fields.related import ManyToManyField from django.db.models.functions import Substr -from django.db.transaction import atomic from django.utils import timezone from django.utils.translation import gettext as _ from django_prometheus.models import ExportModelOperationsMixin @@ -35,6 +32,19 @@ def get_user_name(self): return self.username +def get_active_space(self): + """ + Returns the active space of a user or in case no space is actives raises an *** exception + CAREFUL: cannot be used in django scopes with scope() function because passing None as a scope context means no space checking is enforced (at least I think)!! + :param self: user + :return: space currently active for user + """ + try: + return self.userspace_set.filter(active=True).first().space + except AttributeError: + return None + + def get_shopping_share(self): # get list of users that shared shopping list with user. Django ORM forbids this type of query, so raw is required return User.objects.raw(' '.join([ @@ -49,6 +59,7 @@ def get_shopping_share(self): auth.models.User.add_to_class('get_user_name', get_user_name) auth.models.User.add_to_class('get_shopping_share', get_shopping_share) +auth.models.User.add_to_class('get_active_space', get_active_space) def get_model_name(model): @@ -244,6 +255,54 @@ class Space(ExportModelOperationsMixin('space'), models.Model): food_inherit = models.ManyToManyField(FoodInheritField, blank=True) show_facet_count = models.BooleanField(default=False) + def safe_delete(self): + """ + Safely deletes a space by deleting all objects belonging to the space first and then deleting the space itself + """ + CookLog.objects.filter(space=self).delete() + ViewLog.objects.filter(space=self).delete() + ImportLog.objects.filter(space=self).delete() + BookmarkletImport.objects.filter(space=self).delete() + CustomFilter.objects.filter(space=self).delete() + + Comment.objects.filter(recipe__space=self).delete() + Keyword.objects.filter(space=self).delete() + Ingredient.objects.filter(space=self).delete() + Food.objects.filter(space=self).delete() + Unit.objects.filter(space=self).delete() + Step.objects.filter(space=self).delete() + NutritionInformation.objects.filter(space=self).delete() + RecipeBookEntry.objects.filter(book__space=self).delete() + RecipeBook.objects.filter(space=self).delete() + MealType.objects.filter(space=self).delete() + MealPlan.objects.filter(space=self).delete() + ShareLink.objects.filter(space=self).delete() + Recipe.objects.filter(space=self).delete() + + RecipeImport.objects.filter(space=self).delete() + SyncLog.objects.filter(sync__space=self).delete() + Sync.objects.filter(space=self).delete() + Storage.objects.filter(space=self).delete() + + ShoppingListEntry.objects.filter(shoppinglist__space=self).delete() + ShoppingListRecipe.objects.filter(shoppinglist__space=self).delete() + ShoppingList.objects.filter(space=self).delete() + + SupermarketCategoryRelation.objects.filter(supermarket__space=self).delete() + SupermarketCategory.objects.filter(space=self).delete() + Supermarket.objects.filter(space=self).delete() + + InviteLink.objects.filter(space=self).delete() + UserFile.objects.filter(space=self).delete() + Automation.objects.filter(space=self).delete() + self.delete() + + def get_owner(self): + return self.created_by + + def get_space(self): + return self + def __str__(self): return self.name @@ -340,13 +399,25 @@ class UserPreference(models.Model, PermissionModelMixin): csv_prefix = models.CharField(max_length=10, blank=True, ) created_at = models.DateTimeField(auto_now_add=True) - space = models.ForeignKey(Space, on_delete=models.CASCADE, null=True) objects = ScopedManager(space='space') def __str__(self): return str(self.user) +class UserSpace(models.Model, PermissionModelMixin): + user = models.ForeignKey(User, on_delete=models.CASCADE) + space = models.ForeignKey(Space, on_delete=models.CASCADE) + groups = models.ManyToManyField(Group) + + # there should always only be one active space although permission methods are written in such a way + # that having more than one active space should just break certain parts of the application and not leak any data + active = models.BooleanField(default=False) + + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + class Storage(models.Model, PermissionModelMixin): DROPBOX = 'DB' NEXTCLOUD = 'NEXTCLOUD' @@ -539,14 +610,14 @@ class Food(ExportModelOperationsMixin('food'), TreeModel, PermissionModelMixin): tree_filter = Q(space=space) # remove all inherited fields from food - Through = Food.objects.filter(tree_filter).first().inherit_fields.through - Through.objects.all().delete() + trough = Food.objects.filter(tree_filter).first().inherit_fields.through + trough.objects.all().delete() # food is going to inherit attributes if len(inherit) > 0: # ManyToMany cannot be updated through an UPDATE operation for i in inherit: - Through.objects.bulk_create([ - Through(food_id=x, foodinheritfield_id=i['id']) + trough.objects.bulk_create([ + trough(food_id=x, foodinheritfield_id=i['id']) for x in Food.objects.filter(tree_filter).values_list('id', flat=True) ]) diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 6679f8d2..118fdd94 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -1,11 +1,16 @@ -from datetime import timedelta +from datetime import timedelta, datetime from decimal import Decimal from gettext import gettext as _ +from html import escape +from smtplib import SMTPException -from django.contrib.auth.models import User +from django.contrib.auth.models import User, Group +from django.core.mail import send_mail from django.db.models import Avg, Q, QuerySet, Sum +from django.http import BadHeaderError from django.urls import reverse from django.utils import timezone +from django_scopes import scopes_disabled from drf_writable_nested import UniqueFieldsMixin, WritableNestedModelSerializer from rest_framework import serializers from rest_framework.exceptions import NotFound, ValidationError @@ -20,7 +25,7 @@ from cookbook.models import (Automation, BookmarkletImport, Comment, CookLog, Cu RecipeBookEntry, RecipeImport, ShareLink, ShoppingList, ShoppingListEntry, ShoppingListRecipe, Step, Storage, Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync, SyncLog, Unit, - UserFile, UserPreference, ViewLog) + UserFile, UserPreference, ViewLog, Space, UserSpace, InviteLink) from cookbook.templatetags.custom_tags import markdown from recipes.settings import MEDIA_URL, AWS_ENABLED @@ -117,12 +122,97 @@ class SpaceFilterSerializer(serializers.ListSerializer): # if query is sliced it came from api request not nested serializer return super().to_representation(data) if self.child.Meta.model == User: - data = data.filter(userpreference__space=self.context['request'].space) + data = data.filter(userspace__space=self.context['request'].user.get_active_space()).all() else: data = data.filter(**{'__'.join(data.model.get_space_key()): self.context['request'].space}) return super().to_representation(data) +class UserNameSerializer(WritableNestedModelSerializer): + username = serializers.SerializerMethodField('get_user_label') + + def get_user_label(self, obj): + return obj.get_user_name() + + class Meta: + list_serializer_class = SpaceFilterSerializer + model = User + fields = ('id', 'username') + + +class GroupSerializer(UniqueFieldsMixin, WritableNestedModelSerializer): + def create(self, validated_data): + raise ValidationError('Cannot create using this endpoint') + + def update(self, instance, validated_data): + return instance # cannot update group + + class Meta: + model = Group + fields = ('id', 'name') + + +class FoodInheritFieldSerializer(UniqueFieldsMixin, WritableNestedModelSerializer): + name = serializers.CharField(allow_null=True, allow_blank=True, required=False) + field = serializers.CharField(allow_null=True, allow_blank=True, required=False) + + def create(self, validated_data): + raise ValidationError('Cannot create using this endpoint') + + def update(self, instance, validated_data): + return instance + + class Meta: + model = FoodInheritField + fields = ('id', 'name', 'field',) + read_only_fields = ['id'] + + +class SpaceSerializer(WritableNestedModelSerializer): + user_count = serializers.SerializerMethodField('get_user_count') + recipe_count = serializers.SerializerMethodField('get_recipe_count') + file_size_mb = serializers.SerializerMethodField('get_file_size_mb') + food_inherit = FoodInheritFieldSerializer(many=True) + + def get_user_count(self, obj): + return UserSpace.objects.filter(space=obj).count() + + def get_recipe_count(self, obj): + return Recipe.objects.filter(space=obj).count() + + def get_file_size_mb(self, obj): + try: + return UserFile.objects.filter(space=obj).aggregate(Sum('file_size_kb'))['file_size_kb__sum'] / 1000 + except TypeError: + return 0 + + def create(self, validated_data): + raise ValidationError('Cannot create using this endpoint') + + class Meta: + model = Space + fields = ('id', 'name', 'created_by', 'created_at', 'message', 'max_recipes', 'max_file_storage_mb', 'max_users', 'allow_sharing', 'demo', 'food_inherit', 'show_facet_count', 'user_count', 'recipe_count', 'file_size_mb',) + read_only_fields = ('id', 'created_by', 'created_at', 'max_recipes', 'max_file_storage_mb', 'max_users', 'allow_sharing', 'demo',) + + +class UserSpaceSerializer(WritableNestedModelSerializer): + user = UserNameSerializer(read_only=True) + groups = GroupSerializer(many=True) + + def validate(self, data): + if self.instance.user == self.context['request'].space.created_by: # can't change space owner permission + raise serializers.ValidationError(_('Cannot modify Space owner permission.')) + return super().validate(data) + + def create(self, validated_data): + raise ValidationError('Cannot create using this endpoint') + + class Meta: + model = UserSpace + fields = ('id', 'user', 'space', 'groups', 'active', 'created_at', 'updated_at',) + read_only_fields = ('id', 'created_at', 'updated_at', 'space') + + class SpacedModelSerializer(serializers.ModelSerializer): def create(self, validated_data): validated_data['space'] = self.context['request'].space @@ -142,53 +232,25 @@ class MealTypeSerializer(SpacedModelSerializer, WritableNestedModelSerializer): read_only_fields = ('created_by',) -class UserNameSerializer(WritableNestedModelSerializer): - username = serializers.SerializerMethodField('get_user_label') - - def get_user_label(self, obj): - return obj.get_user_name() - - class Meta: - list_serializer_class = SpaceFilterSerializer - model = User - fields = ('id', 'username') - - -class FoodInheritFieldSerializer(WritableNestedModelSerializer): - name = serializers.CharField(allow_null=True, allow_blank=True, required=False) - field = serializers.CharField(allow_null=True, allow_blank=True, required=False) - - def create(self, validated_data): - # don't allow writing to FoodInheritField via API - return FoodInheritField.objects.get(**validated_data) - - def update(self, instance, validated_data): - # don't allow writing to FoodInheritField via API - return FoodInheritField.objects.get(**validated_data) - - class Meta: - model = FoodInheritField - fields = ('id', 'name', 'field',) - read_only_fields = ['id'] - - class UserPreferenceSerializer(WritableNestedModelSerializer): - food_inherit_default = FoodInheritFieldSerializer(source='space.food_inherit', many=True, allow_null=True, - required=False, read_only=True) + food_inherit_default = serializers.SerializerMethodField('get_food_inherit_defaults') plan_share = UserNameSerializer(many=True, allow_null=True, required=False, read_only=True) shopping_share = UserNameSerializer(many=True, allow_null=True, required=False) food_children_exist = serializers.SerializerMethodField('get_food_children_exist') + def get_food_inherit_defaults(self, obj): + return FoodInheritFieldSerializer(obj.user.get_active_space().food_inherit.all(), many=True).data + def get_food_children_exist(self, obj): space = getattr(self.context.get('request', None), 'space', None) return Food.objects.filter(depth__gt=0, space=space).exists() + def update(self, instance, validated_data): + with scopes_disabled(): + return super().update(instance, validated_data) + def create(self, validated_data): - if not validated_data.get('user', None): - raise ValidationError(_('A user is required')) - if (validated_data['user'] != self.context['request'].user): - raise NotFound() - return super().create(validated_data) + raise ValidationError('Cannot create using this endpoint') class Meta: model = UserPreference @@ -975,13 +1037,50 @@ class AutomationSerializer(serializers.ModelSerializer): read_only_fields = ('created_by',) +class InviteLinkSerializer(WritableNestedModelSerializer): + group = GroupSerializer() + + def create(self, validated_data): + validated_data['created_by'] = self.context['request'].user + validated_data['space'] = self.context['request'].space + obj = super().create(validated_data) + + if obj.email: + try: + if InviteLink.objects.filter(space=self.context['request'].space, created_at__gte=datetime.now() - timedelta(hours=4)).count() < 20: + message = _('Hello') + '!\n\n' + _('You have been invited by ') + escape(self.context['request'].user.username) + message += _(' to join their Tandoor Recipes space ') + escape(self.context['request'].space.name) + '.\n\n' + message += _('Click the following link to activate your account: ') + self.context['request'].build_absolute_uri(reverse('view_invite', args=[str(obj.uuid)])) + '\n\n' + message += _('If the link does not work use the following code to manually join the space: ') + str(obj.uuid) + '\n\n' + message += _('The invitation is valid until ') + str(obj.valid_until) + '\n\n' + message += _('Tandoor Recipes is an Open Source recipe manager. Check it out on GitHub ') + 'https://github.com/vabene1111/recipes/' + + send_mail( + _('Tandoor Recipes Invite'), + message, + None, + [obj.email], + fail_silently=True, + ) + except (SMTPException, BadHeaderError, TimeoutError): + pass + + return obj + + class Meta: + model = InviteLink + fields = ( + 'id', 'uuid', 'email', 'group', 'valid_until', 'used_by', 'created_by', 'created_at',) + read_only_fields = ('id', 'uuid', 'created_by', 'created_at',) + + # CORS, REST and Scopes aren't currently working # Scopes are evaluating before REST has authenticated the user assigning a None space # I've made the change below to fix the bookmarklet, other serializers likely need a similar/better fix class BookmarkletImportListSerializer(serializers.ModelSerializer): def create(self, validated_data): validated_data['created_by'] = self.context['request'].user - validated_data['space'] = self.context['request'].user.userpreference.space + validated_data['space'] = self.context['request'].space return super().create(validated_data) class Meta: diff --git a/cookbook/signals.py b/cookbook/signals.py index 8032ada9..18ae917b 100644 --- a/cookbook/signals.py +++ b/cookbook/signals.py @@ -2,16 +2,17 @@ from decimal import Decimal from functools import wraps from django.conf import settings +from django.contrib.auth.models import User from django.contrib.postgres.search import SearchVector from django.db.models.signals import post_save from django.dispatch import receiver from django.utils import translation -from django_scopes import scope +from django_scopes import scope, scopes_disabled from cookbook.helper.shopping_helper import RecipeShoppingEditor from cookbook.managers import DICTIONARY from cookbook.models import (Food, FoodInheritField, Ingredient, MealPlan, Recipe, - ShoppingListEntry, Step) + ShoppingListEntry, Step, UserPreference) SQLITE = True if settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2', @@ -28,9 +29,17 @@ def skip_signal(signal_func): if hasattr(instance, 'skip_signal'): return None return signal_func(sender, instance, **kwargs) + return _decorator +@receiver(post_save, sender=User) +def create_user_preference(sender, instance=None, created=False, **kwargs): + if created: + with scopes_disabled(): + UserPreference.objects.get_or_create(user=instance) + + @receiver(post_save, sender=Recipe) @skip_signal def update_recipe_search_vector(sender, instance=None, created=False, **kwargs): @@ -131,5 +140,3 @@ def auto_add_shopping(sender, instance=None, created=False, weak=False, **kwargs print("MEAL_AUTO_ADD Created SLR") except AttributeError: pass - - diff --git a/cookbook/static/js/bootstrap-vue.min.js b/cookbook/static/js/bootstrap-vue.min.js deleted file mode 100644 index 52768f27..00000000 --- a/cookbook/static/js/bootstrap-vue.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * BootstrapVue 2.15.0 - * - * @link https://bootstrap-vue.org - * @source https://github.com/bootstrap-vue/bootstrap-vue - * @copyright (c) 2016-2020 BootstrapVue - * @license MIT - * https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t=t||self).bootstrapVue=e(t.Vue)}(this,(function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i0,K=(/msie|trident/.test(Y),function(){var t=!1;if(U)try{var e={get passive(){t=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){t=!1}return t}()),X=U&&("ontouchstart"in document.documentElement||navigator.maxTouchPoints>0),Z=U&&Boolean(window.PointerEvent||window.MSPointerEvent),J=U&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,Q=function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i="undefined"!=typeof process&&process&&process.env||{};return t?i[t]||e:i}("BOOTSTRAP_VUE_NO_WARN")},tt=H?window:{},et=H?tt.Element:function(t){l(Element,t);var e=v(Element);function Element(){return i(this,Element),e.apply(this,arguments)}return Element}(f(Object)),HTMLElement=H?tt.HTMLElement:function(t){l(HTMLElement,t);var e=v(HTMLElement);function HTMLElement(){return i(this,HTMLElement),e.apply(this,arguments)}return HTMLElement}(et),SVGElement=H?tt.SVGElement:function(t){l(SVGElement,t);var e=v(SVGElement);function SVGElement(){return i(this,SVGElement),e.apply(this,arguments)}return SVGElement}(et),it=H?tt.File:function(t){l(n,t);var e=v(n);function n(){return i(this,n),e.apply(this,arguments)}return n}(f(Object)),nt=function(t){return e(t)},at=function(t){return void 0===t},rt=function(t){return null===t},ot=function(t){return at(t)||rt(t)},st=function(t){return"function"===nt(t)},lt=function(t){return"boolean"===nt(t)},ut=function(t){return"string"===nt(t)},ct=function(t){return"number"===nt(t)},dt=function(t){return t instanceof Date},ht=function(t){return t instanceof Event},ft=function(t){return"RegExp"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)},pt=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return k(e)?e.reduce((function(e,i){return[].concat(y(e),[t(i,i)])}),[]):N(e)?A(e).reduce((function(i,n){return s(s({},i),{},r({},n,t(e[n],e[n])))}),{}):i},mt=function(t){return t},vt=/\[(\d+)]/g,gt=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!(e=k(e)?e.join("."):e)||!V(t))return i;if(e in t)return t[e];var n=(e=String(e).replace(vt,".$1")).split(".").filter(mt);return 0===n.length?i:n.every((function(e){return V(t)&&e in t&&!ot(t=t[e])}))?t:rt(t)?null:i},bt=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=gt(t,e);return ot(n)?i:n},yt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Q()||console.warn("[BootstrapVue warn]: ".concat(e?"".concat(e," - "):"").concat(t))},St=function(t){return!U&&(yt("".concat(t,": Can not be called during SSR.")),!0)},Tt=function(t){return!G&&(yt("".concat(t,": Requires Promise support.")),!0)},wt=function t(e){return A(e).forEach((function(i){var n=e[i];e[i]=n&&(N(n)||k(n))?t(n):n})),I(e)}({breakpoints:["xs","sm","md","lg","xl"],formControls:{size:void 0},BAlert:{dismissLabel:"Close",variant:"info"},BAvatar:{variant:"secondary",badgeVariant:"primary"},BBadge:{variant:"secondary"},BButton:{size:void 0,variant:"secondary"},BButtonClose:{content:"×",textVariant:void 0,ariaLabel:"Close"},BCalendar:{labelPrevDecade:"Previous decade",labelPrevYear:"Previous year",labelPrevMonth:"Previous month",labelCurrentMonth:"Current month",labelNextMonth:"Next month",labelNextYear:"Next year",labelNextDecade:"Next decade",labelToday:"Today",labelSelected:"Selected date",labelNoDateSelected:"No date selected",labelCalendar:"Calendar",labelNav:"Calendar navigation",labelHelp:"Use cursor keys to navigate calendar dates"},BCardSubTitle:{subTitleTextVariant:"muted"},BCarousel:{labelPrev:"Previous Slide",labelNext:"Next Slide",labelGotoSlide:"Goto Slide",labelIndicators:"Select a slide to display"},BDropdown:{toggleText:"Toggle Dropdown",size:void 0,variant:"secondary",splitVariant:void 0},BFormDatepicker:{labelPrevDecade:void 0,labelPrevYear:void 0,labelPrevMonth:void 0,labelCurrentMonth:void 0,labelNextMonth:void 0,labelNextYear:void 0,labelNextDecade:void 0,labelToday:void 0,labelSelected:void 0,labelNoDateSelected:void 0,labelCalendar:void 0,labelNav:void 0,labelHelp:void 0,labelTodayButton:"Select today",labelResetButton:"Reset",labelCloseButton:"Close"},BFormFile:{browseText:"Browse",placeholder:"No file chosen",dropPlaceholder:"Drop files here"},BFormRating:{variant:null,color:null},BFormTag:{removeLabel:"Remove tag",variant:"secondary"},BFormTags:{addButtonText:"Add",addButtonVariant:"outline-secondary",duplicateTagText:"Duplicate tag(s)",invalidTagText:"Invalid tag(s)",placeholder:"Add tag...",tagRemoveLabel:"Remove tag",tagRemovedLabel:"Tag removed",tagVariant:"secondary"},BFormText:{textVariant:"muted"},BFormTimepicker:{labelNoTimeSelected:void 0,labelSelected:void 0,labelHours:void 0,labelMinutes:void 0,labelSeconds:void 0,labelAmpm:void 0,labelAm:void 0,labelPm:void 0,labelDecrement:void 0,labelIncrement:void 0,labelNowButton:"Select now",labelResetButton:"Reset",labelCloseButton:"Close"},BFormSpinbutton:{labelDecrement:"Decrement",labelIncrement:"Increment"},BImg:{blankColor:"transparent"},BImgLazy:{blankColor:"transparent"},BInputGroup:{size:void 0},BJumbotron:{bgVariant:void 0,borderVariant:void 0,textVariant:void 0},BLink:{routerComponentName:void 0},BListGroupItem:{variant:void 0},BModal:{titleTag:"h5",size:"md",headerBgVariant:void 0,headerBorderVariant:void 0,headerTextVariant:void 0,headerCloseVariant:void 0,bodyBgVariant:void 0,bodyTextVariant:void 0,footerBgVariant:void 0,footerBorderVariant:void 0,footerTextVariant:void 0,cancelTitle:"Cancel",cancelVariant:"secondary",okTitle:"OK",okVariant:"primary",headerCloseContent:"×",headerCloseLabel:"Close"},BNavbar:{variant:null},BNavbarToggle:{label:"Toggle navigation"},BPagination:{size:void 0},BPaginationNav:{size:void 0},BPopover:{boundary:"scrollParent",boundaryPadding:5,customClass:void 0,delay:50,variant:void 0},BProgress:{variant:void 0},BProgressBar:{variant:void 0},BSpinner:{variant:void 0},BSidebar:{bgVariant:"light",textVariant:"dark",shadow:!1,width:void 0,tag:"div",backdropVariant:"dark"},BTable:{selectedVariant:"active",headVariant:void 0,footVariant:void 0},BTime:{labelNoTimeSelected:"No time selected",labelSelected:"Selected time",labelHours:"Hours",labelMinutes:"Minutes",labelSeconds:"Seconds",labelAmpm:"AM/PM",labelAm:"AM",labelPm:"PM",labelIncrement:void 0,labelDecrement:void 0},BToast:{toaster:"b-toaster-top-right",autoHideDelay:5e3,variant:void 0,toastClass:void 0,headerClass:void 0,bodyClass:void 0},BToaster:{ariaLive:void 0,ariaAtomic:void 0,role:void 0},BTooltip:{boundary:"scrollParent",boundaryPadding:5,customClass:void 0,delay:50,variant:void 0}}),Bt="BvConfig",Ct=function(){function t(){i(this,t),this.$_config={},this.$_cachedBreakpoints=null}return a(t,[{key:"getDefaults",value:function(){return this.defaults}},{key:"setConfig",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(N(e)){var i=O(e);i.forEach((function(i){if(E(wt,i)){var n=e[i];if("breakpoints"===i){var a=e.breakpoints;!k(a)||a.length<2||a.some((function(t){return!ut(t)||0===t.length}))?yt('"breakpoints" must be an array of at least 2 breakpoint names',Bt):t.$_config.breakpoints=pt(a)}else if(N(n)){O(n).forEach((function(e){E(wt[i],e)?(t.$_config[i]=t.$_config[i]||{},at(n[e])||(t.$_config[i][e]=pt(n[e]))):yt('Unknown config property "'.concat(i,".").concat(e,'"'),Bt)}))}}else yt('Unknown config property "'.concat(i,'"'),Bt)}))}}},{key:"resetConfig",value:function(){this.$_config={}}},{key:"getConfig",value:function(){return pt(this.$_config)}},{key:"getConfigValue",value:function(t){return pt(gt(this.$_config,t,gt(wt,t)))}},{key:"defaults",get:function(){return wt}}],[{key:"Defaults",get:function(){return wt}}]),t}(),kt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;i.prototype.$bvConfig=t.prototype.$bvConfig=i.prototype.$bvConfig||t.prototype.$bvConfig||new Ct,i.prototype.$bvConfig.setConfig(e)},xt=(w=!1,B=["Multiple instances of Vue detected!","You may need to set up an alias for Vue in your bundler config.","See: https://bootstrap-vue.org/docs#using-module-bundlers"].join("\n"),function(e){w||t===e||q||yt(B),w=!0}),$t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.components,i=t.directives,n=t.plugins,a=function t(a){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.installed||(t.installed=!0,xt(a),kt(r,a),Ft(a,e),Ot(a,i),Pt(a,n))};return a.installed=!1,a},Dt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(s({},e),{},{install:$t(t)})},Pt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)i&&e[i]&&t.use(e[i])},_t=function(t,e,i){t&&e&&i&&t.component(e,i)},Ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)_t(t,i,e[i])},It=function(t,e,i){t&&e&&i&&t.directive(e.replace(/^VB/,"B"),i)},Ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)It(t,i,e[i])},At=function(t){var e=P(null);return function(){for(var i=arguments.length,n=new Array(i),a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return e?Vt("".concat(t,".").concat(e)):Vt(t)||{}},Lt=function(){return Vt("breakpoints")},Mt=At((function(){return Lt()})),Rt=At((function(){var t=pt(Mt());return t[0]="",t})),Ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,i=parseInt(t,10);return isNaN(i)?e:i},zt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,i=parseFloat(t);return isNaN(i)?e:i},jt=function(t,e){return zt(t).toFixed(Ht(e,0))},Gt=/^\s+/,Wt=/[-/\\^$*+?.()|[\]{}]/g,Ut=/-(\w)/g,Yt=/\B([A-Z])/g,qt=function(t){return t.replace(Yt,"-$1").toLowerCase()},Kt=function(t){return(t=qt(t).replace(Ut,(function(t,e){return e?e.toUpperCase():""}))).charAt(0).toUpperCase()+t.slice(1)},Xt=function(t){return(t=ut(t)?t.trim():String(t)).charAt(0).toUpperCase()+t.slice(1)},Zt=function(t){return t.replace(Wt,"\\$&")},Jt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return ot(t)?"":k(t)||N(t)&&t.toString===Object.prototype.toString?JSON.stringify(t,null,e):String(t)},Qt=function(t){return Jt(t).trim()},te=function(t){return Jt(t).toLowerCase()},ee=["button","[href]:not(.disabled)","input","select","textarea","[tabindex]","[contenteditable]"].map((function(t){return"".concat(t,":not(:disabled):not([disabled])")})).join(", "),ie=H?window:{},ne=z?document:{},ae="undefined"!=typeof Element?Element.prototype:{},re=ae.matches||ae.msMatchesSelector||ae.webkitMatchesSelector,oe=ae.closest||function(t){var e=this;do{if(be(e,t))return e;e=e.parentElement||e.parentNode}while(!rt(e)&&e.nodeType===Node.ELEMENT_NODE);return null},se=ie.requestAnimationFrame||ie.webkitRequestAnimationFrame||ie.mozRequestAnimationFrame||ie.msRequestAnimationFrame||ie.oRequestAnimationFrame||function(t){return setTimeout(t,16)},le=ie.MutationObserver||ie.WebKitMutationObserver||ie.MozMutationObserver||null,ue=function(t){return!(!t||t.nodeType!==Node.ELEMENT_NODE)},ce=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=ne.activeElement;return e&&!t.some((function(t){return t===e}))?e:null},de=function(t,e){return Jt(t).toLowerCase()===Jt(e).toLowerCase()},he=function(t){return ue(t)&&t===ce()},fe=function(t){if(!ue(t)||!t.parentNode||!Se(ne.body,t))return!1;if("none"===t.style.display)return!1;var e=Pe(t);return!!(e&&e.height>0&&e.width>0)},pe=function(t){return!ue(t)||t.disabled||De(t,"disabled")||Ce(t,"disabled")},me=function(t){return ue(t)&&t.offsetHeight},ve=function(t,e){return C((ue(e)?e:ne).querySelectorAll(t))},ge=function(t,e){return(ue(e)?e:ne).querySelector(t)||null},be=function(t,e){return!!ue(t)&&re.call(t,e)},ye=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!ue(e))return null;var n=oe.call(e,t);return i?n:n===e?null:n},Se=function(t,e){return!(!t||!st(t.contains))&&t.contains(e)},Te=function(t){return ne.getElementById(/^#/.test(t)?t.slice(1):t)||null},we=function(t,e){e&&ue(t)&&t.classList&&t.classList.add(e)},Be=function(t,e){e&&ue(t)&&t.classList&&t.classList.remove(e)},Ce=function(t,e){return!!(e&&ue(t)&&t.classList)&&t.classList.contains(e)},ke=function(t,e,i){e&&ue(t)&&t.setAttribute(e,i)},xe=function(t,e){e&&ue(t)&&t.removeAttribute(e)},$e=function(t,e){return e&&ue(t)?t.getAttribute(e):null},De=function(t,e){return e&&ue(t)?t.hasAttribute(e):null},Pe=function(t){return ue(t)?t.getBoundingClientRect():null},_e=function(t){return H&&ue(t)?ie.getComputedStyle(t):{}},Fe=function(){return H&&ie.getSelection?ie.getSelection():null},Ie=function(t){var e={top:0,left:0};if(!ue(t)||0===t.getClientRects().length)return e;var i=Pe(t);if(i){var n=t.ownerDocument.defaultView;e.top=i.top+n.pageYOffset,e.left=i.left+n.pageXOffset}return e},Oe=function(t){var e={top:0,left:0};if(!ue(t))return e;var i={top:0,left:0},n=_e(t);if("fixed"===n.position)e=Pe(t)||e;else{e=Ie(t);for(var a=t.ownerDocument,r=t.offsetParent||a.documentElement;r&&(r===a.body||r===a.documentElement)&&"static"===_e(r).position;)r=r.parentNode;if(r&&r!==t&&r.nodeType===Node.ELEMENT_NODE){i=Ie(r);var o=_e(r);i.top+=zt(o.borderTopWidth,0),i.left+=zt(o.borderLeftWidth,0)}}return{top:e.top-i.top-zt(n.marginTop,0),left:e.left-i.left-zt(n.marginLeft,0)}},Ae=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return ve(ee,t).filter(fe).filter((function(t){return t.tabIndex>-1&&!t.disabled}))},Ee=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{t.focus(e)}catch(t){}return he(t)},Ve=function(t){try{t.blur()}catch(t){}return!he(t)},Ne=function(){return(Ne=Object.assign||function(t){for(var e,i=1,n=arguments.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(t=$(t).filter(mt)).some((function(t){return e[t]||i[t]}))},qe=function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=$(t).filter(mt);for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},i=qe(t,e,this.$scopedSlots,this.$slots);return i?$(i):i}}},Xe="BButtonClose",Ze={content:{type:String,default:function(){return Nt(Xe,"content")}},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:function(){return Nt(Xe,"ariaLabel")}},textVariant:{type:String,default:function(){return Nt(Xe,"textVariant")}}},Je=t.extend({name:Xe,functional:!0,props:Ze,render:function(t,e){var i=e.props,n=e.data,a=e.slots,o=e.scopedSlots,s=a(),l=o||{},u={staticClass:"close",class:r({},"text-".concat(i.textVariant),i.textVariant),attrs:{type:"button",disabled:i.disabled,"aria-label":i.ariaLabel?String(i.ariaLabel):null},on:{click:function(t){i.disabled&&ht(t)&&(t.stopPropagation(),t.preventDefault())}}};return Ye("default",l,s)||(u.domProps={innerHTML:i.content}),t("button",je(n,u),qe("default",{},l,s))}}),Qe=function(t){return""===t||lt(t)?0:(t=Ht(t,0))>0?t:0},ti=function(t){return""===t||!0===t||!(Ht(t,0)<1)&&!!t},ei=function(t){return!isNaN(Ht(t))},ii=Dt({components:{BAlert:t.extend({name:"BAlert",mixins:[Ke],model:{prop:"show",event:"input"},props:{variant:{type:String,default:function(){return Nt("BAlert","variant")}},dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:function(){return Nt("BAlert","dismissLabel")}},show:{type:[Boolean,Number,String],default:!1},fade:{type:Boolean,default:!1}},data:function(){return{countDown:0,countDownTimeout:null,localShow:ti(this.show)}},watch:{show:function(t){this.countDown=Qe(t),this.localShow=ti(t)},countDown:function(t){var e=this;this.clearCountDownInterval(),ei(this.show)&&(this.$emit("dismiss-count-down",t),this.show!==t&&this.$emit("input",t),t>0?(this.localShow=!0,this.countDownTimeout=setTimeout((function(){e.countDown--}),1e3)):this.$nextTick((function(){se((function(){e.localShow=!1}))})))},localShow:function(t){t||!this.dismissible&&!ei(this.show)||this.$emit("dismissed"),ei(this.show)||this.show===t||this.$emit("input",t)}},created:function(){this.countDown=Qe(this.show),this.localShow=ti(this.show)},mounted:function(){this.countDown=Qe(this.show),this.localShow=ti(this.show)},beforeDestroy:function(){this.clearCountDownInterval()},methods:{dismiss:function(){this.clearCountDownInterval(),this.countDown=0,this.localShow=!1},clearCountDownInterval:function(){this.countDownTimeout&&(clearTimeout(this.countDownTimeout),this.countDownTimeout=null)}},render:function(t){var e;if(this.localShow){var i=t();this.dismissible&&(i=t(Je,{attrs:{"aria-label":this.dismissLabel},on:{click:this.dismiss}},[this.normalizeSlot("dismiss")])),e=[e=t("div",{key:this._uid,staticClass:"alert",class:r({"alert-dismissible":this.dismissible},"alert-".concat(this.variant),this.variant),attrs:{role:"alert","aria-live":"polite","aria-atomic":!0}},[i,this.normalizeSlot("default")])]}return t(Ue,{props:{noFade:!this.fade}},e)}})}}),ni=Math.min,ai=Math.max,ri=Math.abs,oi=Math.ceil,si=Math.floor,li=Math.pow,ui=Math.round,ci=/^\d+(\.\d*)?[/:]\d+(\.\d*)?$/,di=/[/:]/,hi=Dt({components:{BAspect:t.extend({name:"BAspect",mixins:[Ke],props:{aspect:{type:[Number,String],default:"1:1"},tag:{type:String,default:"div"}},computed:{padding:function(){var t=this.aspect,e=1;if(ci.test(t)){var i=b(t.split(di).map((function(t){return zt(t)||1})),2);e=i[0]/i[1]}else e=zt(t)||1;return"".concat(100/ri(e),"%")}},render:function(t){var e=t("div",{staticClass:"".concat("b-aspect","-sizer flex-grow-1"),style:{paddingBottom:this.padding,height:0}}),i=t("div",{staticClass:"".concat("b-aspect","-content flex-grow-1 w-100 mw-100"),style:{marginLeft:"-100%"}},[this.normalizeSlot("default")]);return t(this.tag,{staticClass:"".concat("b-aspect"," d-flex")},[e,i])}})}}),fi=function(t,e){return t+Xt(e)},pi=function(t,e){return i=e.replace(t,""),(i=ut(i)?i.trim():String(i)).charAt(0).toLowerCase()+i.slice(1);var i},mi=function(t,e){return e+(t?Xt(t):"")},vi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt;if(k(t))return t.map(e);var i={};for(var n in t)E(t,n)&&(i[e(n)]=V(t[n])?L(t[n]):t[n]);return i},gi=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:mt;return(k(t)?t.slice():A(t)).reduce((function(t,n){return t[i(n)]=e[n],t}),{})},bi=/%2C/g,yi=/[!'()*]/g,Si=/\+/g,Ti=/^(\?|#|&)/,wi=function(t){return"%"+t.charCodeAt(0).toString(16)},Bi=function(t){return encodeURIComponent(Jt(t)).replace(yi,wi).replace(bi,",")},Ci=decodeURIComponent,ki=function(t){if(!N(t))return"";var e=A(t).map((function(e){var i=t[e];return at(i)?"":rt(i)?Bi(e):k(i)?i.reduce((function(t,i){return rt(i)?t.push(Bi(e)):at(i)||t.push(Bi(e)+"="+Bi(i)),t}),[]).join("&"):Bi(e)+"="+Bi(i)})).filter((function(t){return t.length>0})).join("&");return e?"?".concat(e):""},xi=function(t){var e={};return(t=Jt(t).trim().replace(Ti,""))?(t.split("&").forEach((function(t){var i=t.replace(Si," ").split("="),n=Ci(i.shift()),a=i.length>0?Ci(i.join("=")):null;at(e[n])?e[n]=a:k(e[n])?e[n].push(a):e[n]=[e[n],a]})),e):e},$i=function(t){return!(!t.href&&!t.to)},Di=function(t){return!de(t,"a")},Pi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.href,i=t.to,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(Di(n))return null;if(e)return e;if(i){if(ut(i))return i||r;if(N(i)&&(i.path||i.query||i.hash)){var o=Jt(i.path),s=ki(i.query),l=Jt(i.hash);return l=l&&"#"!==l.charAt(0)?"#".concat(l):l,"".concat(o).concat(s).concat(l)||r}}return a},_i=I({SPACE:32,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,PAGEUP:33,PAGEDOWN:34,HOME:36,END:35,TAB:9,SHIFT:16,CTRL:17,BACKSPACE:8,ALT:18,PAUSE:19,BREAK:19,INSERT:45,INS:45,DELETE:46}),Fi=function(t){return{handler:function(e,i){for(var n in i)E(e,n)||this.$delete(this.$data[t],n);for(var a in e)this.$set(this.$data[t],a,e[a])}}},Ii=function(t,e){return{data:function(){return r({},e,{})},watch:r({},t,Fi(e)),created:function(){this[e]=s({},this[t])}}},Oi=Ii("$attrs","bvAttrs"),Ai=Ii("$listeners","bvListeners"),Ei={to:{type:[String,Object],default:null},append:{type:Boolean,default:!1},replace:{type:Boolean,default:!1},event:{type:[String,Array],default:"click"},activeClass:{type:String},exact:{type:Boolean,default:!1},exactActiveClass:{type:String},routerTag:{type:String,default:"a"}},Vi={prefetch:{type:Boolean,default:null},noPrefetch:{type:Boolean,default:!1}},Ni=s(s(s({href:{type:String,default:null},rel:{type:String,default:null},target:{type:String,default:"_self"},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},Ei),Vi),{},{routerComponentName:{type:String,default:function(){return Nt("BLink","routerComponentName")}}}),Li=t.extend({name:"BLink",mixins:[Oi,Ai,Ke],inheritAttrs:!1,props:Ni,computed:{computedTag:function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.to,i=t.disabled,n=t.routerComponentName,a=arguments.length>1?arguments[1]:void 0,r=a.$router;return!r||r&&i||r&&!e?"a":n||(a.$nuxt?"nuxt-link":"router-link")}({to:this.to,disabled:this.disabled,routerComponentName:this.routerComponentName},this)},isRouterLink:function(){return Di(this.computedTag)},computedRel:function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,i=t.rel;return"_blank"===e&&rt(i)?"noopener":i||null}({target:this.target,rel:this.rel})},computedHref:function(){return Pi({to:this.to,href:this.href},this.computedTag)},computedProps:function(){var t=this.prefetch;return this.isRouterLink?s(s({},gi(s(s({},Ei),Vi),this)),{},{prefetch:lt(t)?t:void 0,tag:this.routerTag}):{}},computedAttrs:function(){var t=this.bvAttrs,e=this.computedHref,i=this.computedRel,n=this.disabled,a=this.target,r=this.routerTag,o=this.isRouterLink;return s(s(s(s({},t),e?{href:e}:{}),o&&"a"!==r&&"area"!==r?{}:{rel:i,target:a}),{},{tabindex:n?"-1":at(t.tabindex)?null:t.tabindex,"aria-disabled":n?"true":null})},computedListeners:function(){return s(s({},this.bvListeners),{},{click:this.onClick})}},methods:{onClick:function(t){var e=arguments,i=ht(t),n=this.isRouterLink,a=this.bvListeners.click;i&&this.disabled?(t.stopPropagation(),t.stopImmediatePropagation()):(n&&t.currentTarget.__vue__&&t.currentTarget.__vue__.$emit("click",t),$(a).filter((function(t){return st(t)})).forEach((function(t){t.apply(void 0,y(e))})),this.$root.$emit("clicked::link",t)),i&&(this.disabled||!n&&"#"===this.computedHref)&&t.preventDefault()},focus:function(){Ee(this.$el)},blur:function(){Ve(this.$el)}},render:function(t){var e=this.active,i=this.disabled;return t(this.computedTag,r({class:{active:e,disabled:i},attrs:this.computedAttrs,props:this.computedProps},this.isRouterLink?"nativeOn":"on",this.computedListeners),this.normalizeSlot("default"))}}),Mi=R(Ni,["event","routerTag"]);delete Mi.href.default,delete Mi.to.default;var Ri=s(s({},{block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:function(){return Nt("BButton","size")}},variant:{type:String,default:function(){return Nt("BButton","variant")}},type:{type:String,default:"button"},tag:{type:String,default:"button"},pill:{type:Boolean,default:!1},squared:{type:Boolean,default:!1},pressed:{type:Boolean,default:null}}),Mi),Hi=function(t){"focusin"===t.type?we(t.target,"focus"):"focusout"===t.type&&Be(t.target,"focus")},zi=function(t){return $i(t)||de(t.tag,"a")},ji=function(t){return lt(t.pressed)},Gi=function(t){return!(zi(t)||t.tag&&!de(t.tag,"button"))},Wi=function(t){return!zi(t)&&!Gi(t)},Ui=function(t){var e;return["btn-".concat(t.variant||Nt("BButton","variant")),(e={},r(e,"btn-".concat(t.size),t.size),r(e,"btn-block",t.block),r(e,"rounded-pill",t.pill),r(e,"rounded-0",t.squared&&!t.pill),r(e,"disabled",t.disabled),r(e,"active",t.pressed),e)]},Yi=function(t){return zi(t)?gi(Mi,t):{}},qi=function(t,e){var i=Gi(t),n=zi(t),a=ji(t),r=Wi(t),o=n&&"#"===t.href,s=e.attrs&&e.attrs.role?e.attrs.role:null,l=e.attrs?e.attrs.tabindex:null;return(r||o)&&(l="0"),{type:i&&!n?t.type:null,disabled:i?t.disabled:null,role:r||o?"button":s,"aria-disabled":r?String(t.disabled):null,"aria-pressed":a?String(t.pressed):null,autocomplete:a?"off":null,tabindex:t.disabled&&!i?"-1":l}},Ki=t.extend({name:"BButton",functional:!0,props:Ri,render:function(t,e){var i=e.props,n=e.data,a=e.listeners,r=e.children,o=ji(i),s=zi(i),l=Wi(i),u=s&&"#"===i.href,c={keydown:function(t){if(!i.disabled&&(l||u)){var e=t.keyCode;if(e===_i.SPACE||e===_i.ENTER&&l){var n=t.currentTarget||t.target;t.preventDefault(),n.click()}}},click:function(t){i.disabled&&ht(t)?(t.stopPropagation(),t.preventDefault()):o&&a&&a["update:pressed"]&&$(a["update:pressed"]).forEach((function(t){st(t)&&t(!i.pressed)}))}};o&&(c.focusin=Hi,c.focusout=Hi);var d={staticClass:"btn",class:Ui(i),props:Yi(i),attrs:qi(i,n),on:c};return t(s?Li:i.tag,je(n,d),r)}}),Xi={variant:{type:String,default:null},fontScale:{type:[Number,String],default:1},scale:{type:[Number,String],default:1},rotate:{type:[Number,String],default:0},flipH:{type:Boolean,default:!1},flipV:{type:Boolean,default:!1},shiftH:{type:[Number,String],default:0},shiftV:{type:[Number,String],default:0},animation:{type:String,default:null}},Zi={viewBox:"0 0 16 16",width:"1em",height:"1em",focusable:"false",role:"img",alt:"icon"},Ji={width:null,height:null,focusable:null,role:null,alt:null},Qi=t.extend({name:"BVIconBase",functional:!0,props:s({content:{type:String},stacked:{type:Boolean,default:!1}},Xi),render:function(t,e){var i,n=e.data,a=e.props,o=e.children,s=ai(zt(a.fontScale,1),0)||1,l=ai(zt(a.scale,1),0)||1,u=zt(a.rotate,0),c=zt(a.shiftH,0),d=zt(a.shiftV,0),h=a.flipH,f=a.flipV,p=a.animation,m=h||f||1!==l,v=m||u,g=c||d,b=[v?"translate(8 8)":null,m?"scale(".concat((h?-1:1)*l," ").concat((f?-1:1)*l,")"):null,u?"rotate(".concat(u,")"):null,v?"translate(-8 -8)":null].filter(mt),y=a.stacked,S=!ot(a.content),T=t("g",{attrs:{transform:b.join(" ")||null},domProps:S?{innerHTML:a.content||""}:{}},o);return g&&(T=t("g",{attrs:{transform:"translate(".concat(16*c/16," ").concat(-16*d/16,")")}},[T])),y&&(T=t("g",{},[T])),t("svg",je({staticClass:"b-icon bi",class:(i={},r(i,"text-".concat(a.variant),!!a.variant),r(i,"b-icon-animation-".concat(p),!!p),i),attrs:Zi,style:y?{}:{fontSize:1===s?null:"".concat(100*s,"%")}},n,y?{attrs:Ji}:{},{attrs:{xmlns:y?null:"http://www.w3.org/2000/svg",fill:"currentColor"}}),[T])}}),tn=function(e,i){var n="BIcon".concat(Kt(e)),a="bi-".concat(qt(e)),r=Qt(i||"");return t.extend({name:n,functional:!0,props:s(s({},Xi),{},{stacked:{type:Boolean,default:!1}}),render:function(t,e){var i=e.data,n=e.props;return t(Qi,je(i,{staticClass:a,props:s(s({},n),{},{content:r})}))}})},en=tn("Blank",""),nn=tn("Calendar",''),an=tn("CalendarFill",''),rn=tn("ChevronBarLeft",''),on=tn("ChevronDoubleLeft",''),sn=tn("ChevronDown",''),ln=tn("ChevronLeft",''),un=tn("ChevronUp",''),cn=tn("CircleFill",''),dn=tn("Clock",''),hn=tn("ClockFill",''),fn=tn("Dash",''),pn=tn("PersonFill",''),mn=tn("Plus",''),vn=tn("Star",''),gn=tn("StarFill",''),bn=tn("StarHalf",''),yn=tn("X",''),Sn=/^BIcon/,Tn=t.extend({name:"BIcon",functional:!0,props:s(s({icon:{type:String,default:null}},Xi),{},{stacked:{type:Boolean,default:!1}}),render:function(t,e){var i=e.data,n=e.props,a=e.parent,r=Kt(Qt(n.icon||"")).replace(Sn,""),o="BIcon".concat(r),l=((a||{}).$options||{}).components;return t(r&&l?l[o]||en:r?o:en,je(i,{props:s(s({},n),{},{icon:null})}))}}),wn=/^[0-9]*\.?[0-9]+$/,Bn={sm:"1.5em",md:"2.5em",lg:"3.5em"},Cn=R(Ni,["active","event","routerTag"]),kn=s(s({src:{type:String},text:{type:String},icon:{type:String},alt:{type:String,default:"avatar"},variant:{type:String,default:function(){return Nt("BAvatar","variant")}},size:{type:[Number,String],default:null},square:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},button:{type:Boolean,default:!1},buttonType:{type:String,default:"button"},badge:{type:[Boolean,String],default:!1},badgeVariant:{type:String,default:function(){return Nt("BAvatar","badgeVariant")}},badgeTop:{type:Boolean,default:!1},badgeLeft:{type:Boolean,default:!1},badgeOffset:{type:String,default:"0px"}},Cn),{},{ariaLabel:{type:String}}),xn=function(t){return t=ot(t)||""===t?"md":ut(t)&&wn.test(t)?zt(t,0):t,ct(t)?"".concat(t,"px"):Bn[t]||t},$n=Dt({components:{BAvatar:t.extend({name:"BAvatar",mixins:[Ke],inject:{bvAvatarGroup:{default:null}},props:kn,data:function(){return{localSrc:this.src||null}},computed:{computedSize:function(){return xn(this.bvAvatarGroup?this.bvAvatarGroup.size:this.size)},computedVariant:function(){var t=this.bvAvatarGroup;return t&&t.variant?t.variant:this.variant},computedRounded:function(){var t=this.bvAvatarGroup,e=!(!t||!t.square)||this.square,i=t&&t.rounded?t.rounded:this.rounded;return e?"0":""===i||(i||"circle")},fontStyle:function(){var t=this.computedSize;return(t=t?"calc(".concat(t," * ").concat(.4,")"):null)?{fontSize:t}:{}},marginStyle:function(){var t=this.bvAvatarGroup,e=t?t.overlapScale:0,i=this.computedSize,n=i&&e?"calc(".concat(i," * -").concat(e,")"):null;return n?{marginLeft:n,marginRight:n}:{}},badgeStyle:function(){var t=this.computedSize,e=this.badgeTop,i=this.badgeLeft,n=this.badgeOffset||"0px";return{fontSize:t?"calc(".concat(t," * ").concat(.4*.7," )"):null,top:e?n:null,bottom:e?null:n,left:i?n:null,right:i?null:n}}},watch:{src:function(t,e){t!==e&&(this.localSrc=t||null)}},methods:{onImgError:function(t){this.localSrc=null,this.$emit("img-error",t)},onClick:function(t){this.$emit("click",t)}},render:function(t){var e,i=this.computedVariant,n=this.disabled,a=this.computedRounded,o=this.icon,l=this.localSrc,u=this.text,c=this.fontStyle,d=this.marginStyle,h=this.computedSize,f=this.button,p=this.buttonType,m=this.badge,v=this.badgeVariant,g=this.badgeStyle,b=!f&&$i(this),y=f?Ki:b?Li:"span",S=this.alt||null,T=this.ariaLabel||null,w=null;this.hasNormalizedSlot("default")?w=t("span",{staticClass:"b-avatar-custom"},[this.normalizeSlot("default")]):l?(w=t("img",{style:i?{}:{width:"100%",height:"100%"},attrs:{src:l,alt:S},on:{error:this.onImgError}}),w=t("span",{staticClass:"b-avatar-img"},[w])):w=o?t(Tn,{props:{icon:o},attrs:{"aria-hidden":"true",alt:S}}):u?t("span",{staticClass:"b-avatar-text",style:c},[t("span",u)]):t(pn,{attrs:{"aria-hidden":"true",alt:S}});var B=t(),C=this.hasNormalizedSlot("badge");if(m||""===m||C){var k=!0===m?"":m;B=t("span",{staticClass:"b-avatar-badge",class:r({},"badge-".concat(v),!!v),style:g},[C?this.normalizeSlot("badge"):k])}return t(y,{staticClass:"b-avatar",class:(e={},r(e,"badge-".concat(i),!f&&i),r(e,"rounded",!0===a),r(e,"rounded-".concat(a),a&&!0!==a),r(e,"disabled",n),e),style:s({width:h,height:h},d),attrs:{"aria-label":T||null},props:f?{variant:i,disabled:n,type:p}:b?gi(Cn,this):{},on:f||b?{click:this.onClick}:{}},[w,B])}}),BAvatarGroup:t.extend({name:"BAvatarGroup",mixins:[Ke],provide:function(){return{bvAvatarGroup:this}},props:{variant:{type:String,default:null},size:{type:String,default:null},overlap:{type:[Number,String],default:.3},square:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},tag:{type:String,default:"div"}},computed:{computedSize:function(){return xn(this.size)},overlapScale:function(){return ni(ai(zt(this.overlap,0),0),1)/2},paddingStyle:function(){var t=this.computedSize;return(t=t?"calc(".concat(t," * ").concat(this.overlapScale,")"):null)?{paddingLeft:t,paddingRight:t}:{}}},render:function(t){var e=t("div",{staticClass:"b-avatar-group-inner",style:this.paddingStyle},[this.normalizeSlot("default")]);return t(this.tag,{staticClass:"b-avatar-group",attrs:{role:"group"}},[e])}})}}),Dn=R(Ni,["event","routerTag"]);delete Dn.href.default,delete Dn.to.default;var Pn=s({tag:{type:String,default:"span"},variant:{type:String,default:function(){return Nt("BBadge","variant")}},pill:{type:Boolean,default:!1}},Dn),_n=t.extend({name:"BBadge",functional:!0,props:Pn,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=$i(i);return t(r?Li:i.tag,je(n,{staticClass:"badge",class:[i.variant?"badge-".concat(i.variant):"badge-secondary",{"badge-pill":i.pill,active:i.active,disabled:i.disabled}],props:r?gi(Dn,i):{}}),a)}}),Fn=Dt({components:{BBadge:_n}}),In=/(<([^>]+)>)/gi,On=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(In,"")},An=function(t,e){return t?{innerHTML:t}:e?{textContent:e}:{}},En=s({text:{type:String,default:null},html:{type:String,default:null},ariaCurrent:{type:String,default:"location"}},R(Ni,["event","routerTag"])),Vn=t.extend({name:"BBreadcrumbLink",functional:!0,props:En,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=i.active,o=r?"span":Li,s={attrs:{"aria-current":r?i.ariaCurrent:null},props:gi(En,i)};return a||(s.domProps=An(i.html,i.text)),t(o,je(n,s),a)}}),Nn=t.extend({name:"BBreadcrumbItem",functional:!0,props:En,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t("li",je(n,{staticClass:"breadcrumb-item",class:{active:i.active}}),[t(Vn,{props:i},a)])}}),Ln={items:{type:Array,default:null}},Mn=Dt({components:{BBreadcrumb:t.extend({name:"BBreadcrumb",functional:!0,props:Ln,render:function(t,e){var i=e.props,n=e.data,a=e.children;if(k(i.items)){var r=!1;a=i.items.map((function(e,n){V(e)||(e={text:Jt(e)});var a=e.active;return a&&(r=!0),a||r||(a=n+1===i.items.length),t(Nn,{props:s(s({},e),{},{active:a})})}))}return t("ol",je(n,{staticClass:"breadcrumb"}),a)}}),BBreadcrumbItem:Nn,BBreadcrumbLink:Vn}}),Rn=Dt({components:{BButton:Ki,BBtn:Ki,BButtonClose:Je,BBtnClose:Je}}),Hn={vertical:{type:Boolean,default:!1},size:{type:String,default:function(){return Nt("BButton","size")}},tag:{type:String,default:"div"},ariaRole:{type:String,default:"group"}},zn=t.extend({name:"BButtonGroup",functional:!0,props:Hn,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{class:r({"btn-group":!i.vertical,"btn-group-vertical":i.vertical},"btn-group-".concat(i.size),i.size),attrs:{role:i.ariaRole}}),a)}}),jn=Dt({components:{BButtonGroup:zn,BBtnGroup:zn}}),Gn=[".btn:not(.disabled):not([disabled]):not(.dropdown-item)",".form-control:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])",'input[type="checkbox"]:not(.disabled)','input[type="radio"]:not(.disabled)'].join(","),Wn=t.extend({name:"BButtonToolbar",mixins:[Ke],props:{justify:{type:Boolean,default:!1},keyNav:{type:Boolean,default:!1}},mounted:function(){this.keyNav&&this.getItems()},methods:{onFocusin:function(t){t.target===this.$el&&(t.preventDefault(),t.stopPropagation(),this.focusFirst(t))},stop:function(t){t.preventDefault(),t.stopPropagation()},onKeydown:function(t){if(this.keyNav){var e=t.keyCode,i=t.shiftKey;e===_i.UP||e===_i.LEFT?(this.stop(t),i?this.focusFirst(t):this.focusPrev(t)):e!==_i.DOWN&&e!==_i.RIGHT||(this.stop(t),i?this.focusLast(t):this.focusNext(t))}},focusFirst:function(){var t=this.getItems();Ee(t[0])},focusPrev:function(t){var e=this.getItems(),i=e.indexOf(t.target);i>-1&&(e=e.slice(0,i).reverse(),Ee(e[0]))},focusNext:function(t){var e=this.getItems(),i=e.indexOf(t.target);i>-1&&(e=e.slice(i+1),Ee(e[0]))},focusLast:function(){var t=this.getItems().reverse();Ee(t[0])},getItems:function(){var t=ve(Gn,this.$el);return t.forEach((function(t){t.tabIndex=-1})),t.filter((function(t){return fe(t)}))}},render:function(t){return t("div",{staticClass:"btn-toolbar",class:{"justify-content-between":this.justify},attrs:{role:"toolbar",tabindex:this.keyNav?"0":null},on:this.keyNav?{focusin:this.onFocusin,keydown:this.onKeydown}:{}},[this.normalizeSlot("default")])}}),Un=Dt({components:{BButtonToolbar:Wn,BBtnToolbar:Wn}}),Yn=function(t,e){if(t.length!==e.length)return!1;for(var i=!0,n=0;i&&n1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t=Jn(t),e=Jn(e)||t,i=Jn(i)||t,t?ti?i:t:null},ha=["ar","az","ckb","fa","he","ks","lrc","mzn","ps","sd","te","ug","ur","yi"].map((function(t){return t.toLowerCase()})),fa=/-u-.+/,pa=function(t){var e=Jt(t).toLowerCase().replace(fa,"").split("-"),i=e.slice(0,2).join("-"),n=e[0];return x(ha,i)||x(ha,n)},ma={props:{id:{type:String}},data:function(){return{localId_:null}},computed:{safeId:function(){var t=this.id||this.localId_;return function(e){return t?(e=String(e||"").replace(/\s+/g,"_"))?t+"_"+e:t:null}}},mounted:function(){var t=this;this.$nextTick((function(){t.localId_="__BVID__".concat(t._uid)}))}},va="BCalendar",ga=_i.UP,ba=_i.DOWN,ya=_i.LEFT,Sa=_i.RIGHT,Ta=_i.PAGEUP,wa=_i.PAGEDOWN,Ba=_i.HOME,Ca=_i.END,ka=_i.ENTER,xa=_i.SPACE,$a=t.extend({name:va,mixins:[Oi,ma,Ke],model:{prop:"value",event:"input"},props:{value:{type:[String,Date]},valueAsDate:{type:Boolean,default:!1},initialDate:{type:[String,Date]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{type:[String,Date]},max:{type:[String,Date]},dateDisabledFn:{type:Function},startWeekday:{type:[Number,String],default:0},locale:{type:[String,Array]},direction:{type:String},selectedVariant:{type:String,default:"primary"},todayVariant:{type:String},noHighlightToday:{type:Boolean,default:!1},dateInfoFn:{type:Function},width:{type:String,default:"270px"},block:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},showDecadeNav:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},ariaControls:{type:String},roleDescription:{type:String},labelPrevDecade:{type:String,default:function(){return Nt(va,"labelPrevDecade")}},labelPrevYear:{type:String,default:function(){return Nt(va,"labelPrevYear")}},labelPrevMonth:{type:String,default:function(){return Nt(va,"labelPrevMonth")}},labelCurrentMonth:{type:String,default:function(){return Nt(va,"labelCurrentMonth")}},labelNextMonth:{type:String,default:function(){return Nt(va,"labelNextMonth")}},labelNextYear:{type:String,default:function(){return Nt(va,"labelNextYear")}},labelNextDecade:{type:String,default:function(){return Nt(va,"labelNextDecade")}},labelToday:{type:String,default:function(){return Nt(va,"labelToday")}},labelSelected:{type:String,default:function(){return Nt(va,"labelSelected")}},labelNoDateSelected:{type:String,default:function(){return Nt(va,"labelNoDateSelected")}},labelCalendar:{type:String,default:function(){return Nt(va,"labelCalendar")}},labelNav:{type:String,default:function(){return Nt(va,"labelNav")}},labelHelp:{type:String,default:function(){return Nt(va,"labelHelp")}},dateFormatOptions:{type:Object,default:function(){return{year:"numeric",month:"long",day:"numeric",weekday:"long"}}},weekdayHeaderFormat:{type:String,default:"short",validator:function(t){return x(["long","short","narrow"],t)}}},data:function(){var t=Qn(this.value)||"";return{selectedYMD:t,activeYMD:t||Qn(da(this.initialDate||this.getToday()),this.min,this.max),gridHasFocus:!1,isLive:!1}},computed:{valueId:function(){return this.safeId()},widgetId:function(){return this.safeId("_calendar-wrapper_")},navId:function(){return this.safeId("_calendar-nav_")},gridId:function(){return this.safeId("_calendar-grid_")},gridCaptionId:function(){return this.safeId("_calendar-grid-caption_")},gridHelpId:function(){return this.safeId("_calendar-grid-help_")},activeId:function(){return this.activeYMD?this.safeId("_cell-".concat(this.activeYMD,"_")):null},selectedDate:function(){return Jn(this.selectedYMD)},activeDate:function(){return Jn(this.activeYMD)},computedMin:function(){return Jn(this.min)},computedMax:function(){return Jn(this.max)},computedWeekStarts:function(){return ai(Ht(this.startWeekday,0),0)%7},computedLocale:function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gregory";t=$(t).filter(mt);var i=new Intl.DateTimeFormat(t,{calendar:e});return i.resolvedOptions().locale}($(this.locale).filter(mt),"gregory")},calendarLocale:function(){var t=new Intl.DateTimeFormat(this.computedLocale,{calendar:"gregory"}),e=t.resolvedOptions().calendar,i=t.resolvedOptions().locale;return"gregory"!==e&&(i=i.replace(/-u-.+$/i,"").concat("-u-ca-gregory")),i},calendarYear:function(){return this.activeDate.getFullYear()},calendarMonth:function(){return this.activeDate.getMonth()},calendarFirstDay:function(){return Zn(this.calendarYear,this.calendarMonth,1)},calendarDaysInMonth:function(){var t=Zn(this.calendarFirstDay);return t.setMonth(t.getMonth()+1,0),t.getDate()},computedVariant:function(){return"btn-".concat(this.selectedVariant||"primary")},computedTodayVariant:function(){return"btn-outline-".concat(this.todayVariant||this.selectedVariant||"primary")},isRTL:function(){var t=Jt(this.direction).toLowerCase();return"rtl"===t||"ltr"!==t&&pa(this.computedLocale)},context:function(){var t=this.selectedYMD,e=Jn(t),i=this.activeYMD,n=Jn(i);return{selectedYMD:t,selectedDate:e,selectedFormatted:e?this.formatDateString(e):this.labelNoDateSelected,activeYMD:i,activeDate:n,activeFormatted:n?this.formatDateString(n):"",disabled:this.dateDisabled(n),locale:this.computedLocale,calendarLocale:this.calendarLocale,rtl:this.isRTL}},dateOutOfRange:function(){var t=this.computedMin,e=this.computedMax;return function(i){return i=Jn(i),t&&ie}},dateDisabled:function(){var t=this.dateOutOfRange,e=st(this.dateDisabledFn)?this.dateDisabledFn:function(){return!1};return function(i){i=Jn(i);var n=Qn(i);return!(!t(i)&&!e(n,i))}},formatDateString:function(){return ta(this.calendarLocale,s(s({year:"numeric",month:"2-digit",day:"2-digit"},this.dateFormatOptions),{},{hour:void 0,minute:void 0,second:void 0,calendar:"gregory"}))},formatYearMonth:function(){return ta(this.calendarLocale,{year:"numeric",month:"long",calendar:"gregory"})},formatWeekdayName:function(){return ta(this.calendarLocale,{weekday:"long",calendar:"gregory"})},formatWeekdayNameShort:function(){return ta(this.calendarLocale,{weekday:this.weekdayHeaderFormat||"short",calendar:"gregory"})},formatDay:function(){var t=new Intl.NumberFormat([this.computedLocale],{style:"decimal",minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:0,notation:"standard"});return function(e){return t.format(e.getDate())}},prevDecadeDisabled:function(){var t=this.computedMin;return this.disabled||t&&na(ua(this.activeDate))t},nextYearDisabled:function(){var t=this.computedMax;return this.disabled||t&&ia(la(this.activeDate))>t},nextDecadeDisabled:function(){var t=this.computedMax;return this.disabled||t&&ia(ca(this.activeDate))>t},calendar:function(){for(var t=[],e=this.calendarFirstDay,i=e.getFullYear(),n=e.getMonth(),a=this.calendarDaysInMonth,r=e.getDay(),o=(this.computedWeekStarts>r?7:0)-this.computedWeekStarts,l=st(this.dateInfoFn)?this.dateInfoFn:function(){return{}},u=0-o-r,c=0;c<6&&u0);i!==this.visible&&(this.visible=i,this.callback(i),this.once&&this.visible&&(this.doneOnce=!0,this.stop()))}},{key:"stop",value:function(){this.observer&&this.observer.disconnect(),this.observer=null}}]),t}(),qa=function(t){var e=t[Wa];e&&e.stop&&e.stop(),delete t[Wa]},Ka=function(t,e,i){var n=e.value,a=e.modifiers,r={margin:"0px",once:!1,callback:n};A(a).forEach((function(t){Ua.test(t)?r.margin="".concat(t,"px"):"once"===t.toLowerCase()&&(r.once=!0)})),qa(t),t[Wa]=new Ya(t,r,i),t[Wa]._prevModifiers=L(a)},Xa={bind:Ka,componentUpdated:function(t,e,i){var n=e.value,a=e.oldValue,r=e.modifiers;r=L(r),!t||n===a&&t[Wa]&&qn(r,t[Wa]._prevModifiers)||Ka(t,{value:n,modifiers:r},i)},unbind:function(t){qa(t)}},Za='',Ja={src:{type:String},srcset:{type:[String,Array]},sizes:{type:[String,Array]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},block:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},fluidGrow:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},thumbnail:{type:Boolean,default:!1},left:{type:Boolean,default:!1},right:{type:Boolean,default:!1},center:{type:Boolean,default:!1},blank:{type:Boolean,default:!1},blankColor:{type:String,default:function(){return Nt("BImg","blankColor")}}},Qa=t.extend({name:"BImg",functional:!0,props:Ja,render:function(t,e){var i,n=e.props,a=e.data,o=n.src,s=Ht(n.width)||null,l=Ht(n.height)||null,u=null,c=n.block,d=$(n.srcset).filter(mt).join(","),h=$(n.sizes).filter(mt).join(",");return n.blank&&(!l&&s?l=s:!s&&l&&(s=l),s||l||(s=1,l=1),o=function(t,e,i){var n=encodeURIComponent(Za.replace("%{w}",Jt(t)).replace("%{h}",Jt(e)).replace("%{f}",i));return"data:image/svg+xml;charset=UTF-8,".concat(n)}(s,l,n.blankColor||"transparent"),d=null,h=null),n.left?u="float-left":n.right?u="float-right":n.center&&(u="mx-auto",c=!0),t("img",je(a,{attrs:{src:o,alt:n.alt||null,width:s?Jt(s):null,height:l?Jt(l):null,srcset:d||null,sizes:h||null},class:(i={"img-thumbnail":n.thumbnail,"img-fluid":n.fluid||n.fluidGrow,"w-100":n.fluidGrow,rounded:""===n.rounded||!0===n.rounded},r(i,"rounded-".concat(n.rounded),ut(n.rounded)&&""!==n.rounded),r(i,u,u),r(i,"d-block",c),i)}))}}),tr={src:{type:String,required:!0},srcset:{type:[String,Array]},sizes:{type:[String,Array]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},blankSrc:{type:String,default:null},blankColor:{type:String,default:function(){return Nt("BImgLazy","blankColor")}},blankWidth:{type:[Number,String]},blankHeight:{type:[Number,String]},show:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},fluidGrow:{type:Boolean,default:!1},block:{type:Boolean,default:!1},thumbnail:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},left:{type:Boolean,default:!1},right:{type:Boolean,default:!1},center:{type:Boolean,default:!1},offset:{type:[Number,String],default:360}},er=t.extend({name:"BImgLazy",directives:{bVisible:Xa},props:tr,data:function(){return{isShown:this.show}},computed:{computedSrc:function(){return!this.blankSrc||this.isShown?this.src:this.blankSrc},computedBlank:function(){return!(this.isShown||this.blankSrc)},computedWidth:function(){return this.isShown?this.width:this.blankWidth||this.width},computedHeight:function(){return this.isShown?this.height:this.blankHeight||this.height},computedSrcset:function(){var t=$(this.srcset).filter(mt).join(",");return!this.blankSrc||this.isShown?t:null},computedSizes:function(){var t=$(this.sizes).filter(mt).join(",");return!this.blankSrc||this.isShown?t:null}},watch:{show:function(t,e){if(t!==e){var i=!J||t;this.isShown=i,i!==t&&this.$nextTick(this.updateShowProp)}},isShown:function(t,e){t!==e&&this.updateShowProp()}},mounted:function(){this.isShown=!J||this.show},methods:{updateShowProp:function(){this.$emit("update:show",this.isShown)},doShow:function(t){!t&&null!==t||this.isShown||(this.isShown=!0)}},render:function(t){var e,i=[];this.isShown||i.push({name:"b-visible",value:this.doShow,modifiers:(e={},r(e,"".concat(Ht(this.offset,0)),!0),r(e,"once",!0),e)});return t(Qa,{directives:i,props:{src:this.computedSrc,blank:this.computedBlank,width:this.computedWidth,height:this.computedHeight,srcset:this.computedSrcset||null,sizes:this.computedSizes||null,alt:this.alt,blankColor:this.blankColor,fluid:this.fluid,fluidGrow:this.fluidGrow,block:this.block,thumbnail:this.thumbnail,rounded:this.rounded,left:this.left,right:this.right,center:this.center}})}}),ir=s(s({},R(tr,["left","right","center","block","rounded","thumbnail","fluid","fluidGrow"])),{},{top:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},start:{type:Boolean,default:!1},left:{type:Boolean,default:!1},end:{type:Boolean,default:!1},right:{type:Boolean,default:!1}}),nr={textTag:{type:String,default:"p"}},ar={tag:{type:String,default:"div"},deck:{type:Boolean,default:!1},columns:{type:Boolean,default:!1}},rr=Dt({components:{BCard:Ga,BCardHeader:Na,BCardBody:Ea,BCardTitle:Fa,BCardSubTitle:Oa,BCardFooter:Ma,BCardImg:Ha,BCardImgLazy:t.extend({name:"BCardImgLazy",functional:!0,props:ir,render:function(t,e){var i=e.props,n=e.data,a="card-img";i.top?a+="-top":i.right||i.end?a+="-right":i.bottom?a+="-bottom":(i.left||i.start)&&(a+="-left");var r=s(s({},i),{},{left:!1,right:!1,center:!1});return t(er,je(n,{class:[a],props:r}))}}),BCardText:t.extend({name:"BCardText",functional:!0,props:nr,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.textTag,je(n,{staticClass:"card-text"}),a)}}),BCardGroup:t.extend({name:"BCardGroup",functional:!0,props:ar,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{class:i.deck?"card-deck":i.columns?"card-columns":"card-group"}),a)}})}}),or=function(){},sr=function(t,e,i){if(t=t?t.$el||t:null,!ue(t))return null;if(n="observeDom",!W&&(yt("".concat(n,": Requires MutationObserver support.")),1))return null;var n,a=new le((function(t){for(var i=!1,n=0;n0||a.removedNodes.length>0))&&(i=!0)}i&&e()}));return a.observe(t,s({childList:!0,subtree:!0},i)),a},lr={passive:!0},ur={passive:!0,capture:!1},cr=function(t){return K?V(t)?t:{capture:!!t||!1}:!!(V(t)?t.capture:t)},dr=function(t,e,i,n){t&&t.addEventListener&&t.addEventListener(e,i,cr(n))},hr=function(t,e,i,n){t&&t.removeEventListener&&t.removeEventListener(e,i,cr(n))},fr=function(t){for(var e=t?dr:hr,i=arguments.length,n=new Array(i>1?i-1:0),a=1;a0),touchStartX:0,touchDeltaX:0}},computed:{numSlides:function(){return this.slides.length}},watch:{value:function(t,e){t!==e&&this.setSlide(Ht(t,0))},interval:function(t,e){t!==e&&(t?(this.pause(!0),this.start(!1)):this.pause(!1))},isPaused:function(t,e){t!==e&&this.$emit(t?"paused":"unpaused")},index:function(t,e){t===e||this.isSliding||this.doSlide(t,e)}},created:function(){this.$_interval=null,this.$_animationTimeout=null,this.$_touchTimeout=null,this.$_observer=null,this.isPaused=!(Ht(this.interval,0)>0)},mounted:function(){this.transitionEndEvent=function(t){for(var e in gr)if(!at(t.style[e]))return gr[e];return null}(this.$el)||null,this.updateSlides(),this.setObserver(!0)},beforeDestroy:function(){this.clearInterval(),this.clearAnimationTimeout(),this.clearTouchTimeout(),this.setObserver(!1)},methods:{clearInterval:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){clearInterval(this.$_interval),this.$_interval=null})),clearAnimationTimeout:function(){clearTimeout(this.$_animationTimeout),this.$_animationTimeout=null},clearTouchTimeout:function(){clearTimeout(this.$_touchTimeout),this.$_touchTimeout=null},setObserver:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$_observer&&this.$_observer.disconnect(),this.$_observer=null,t&&(this.$_observer=sr(this.$refs.inner,this.updateSlides.bind(this),{subtree:!1,childList:!0,attributes:!0,attributeFilter:["id"]}))},setSlide:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(U&&document.visibilityState&&document.hidden)){var n=this.noWrap,a=this.numSlides;t=si(t),0!==a&&(this.isSliding?this.$once("sliding-end",(function(){return e.setSlide(t,i)})):(this.direction=i,this.index=t>=a?n?a-1:0:t<0?n?0:a-1:t,n&&this.index!==t&&this.index!==this.value&&this.$emit("input",this.index)))}},prev:function(){this.setSlide(this.index-1,"prev")},next:function(){this.setSlide(this.index+1,"next")},pause:function(t){t||(this.isPaused=!0),this.clearInterval()},start:function(t){t||(this.isPaused=!1),this.clearInterval(),this.interval&&this.numSlides>1&&(this.$_interval=setInterval(this.next,ai(1e3,this.interval)))},restart:function(){this.$el.contains(ce())||this.start()},doSlide:function(t,e){var i=this,n=Boolean(this.interval),a=this.calcDirection(this.direction,e,t),r=a.overlayClass,o=a.dirClass,s=this.slides[e],l=this.slides[t];if(s&&l){if(this.isSliding=!0,n&&this.pause(!1),this.$emit("sliding-start",t),this.$emit("input",this.index),this.noAnimation)we(l,"active"),Be(s,"active"),this.isSliding=!1,this.$nextTick((function(){return i.$emit("sliding-end",t)}));else{we(l,r),me(l),we(s,o),we(l,o);var u=!1,c=function e(){if(!u){if(u=!0,i.transitionEndEvent)i.transitionEndEvent.split(/\s+/).forEach((function(t){return hr(s,t,e,ur)}));i.clearAnimationTimeout(),Be(l,o),Be(l,r),we(l,"active"),Be(s,"active"),Be(s,o),Be(s,r),ke(s,"aria-current","false"),ke(l,"aria-current","true"),ke(s,"aria-hidden","true"),ke(l,"aria-hidden","false"),i.isSliding=!1,i.direction=null,i.$nextTick((function(){return i.$emit("sliding-end",t)}))}};if(this.transitionEndEvent)this.transitionEndEvent.split(/\s+/).forEach((function(t){return dr(s,t,c,ur)}));this.$_animationTimeout=setTimeout(c,650)}n&&this.start(!1)}},updateSlides:function(){this.pause(!0),this.slides=ve(".carousel-item",this.$refs.inner);var t=this.slides.length,e=ai(0,ni(si(this.index),t-1));this.slides.forEach((function(i,n){var a=n+1;n===e?(we(i,"active"),ke(i,"aria-current","true")):(Be(i,"active"),ke(i,"aria-current","false")),ke(i,"aria-posinset",String(a)),ke(i,"aria-setsize",String(t))})),this.setSlide(e),this.start(this.isPaused)},calcDirection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t?mr[t]:i>e?mr.next:mr.prev},handleClick:function(t,e){var i=t.keyCode;"click"!==t.type&&i!==_i.SPACE&&i!==_i.ENTER||(t.preventDefault(),t.stopPropagation(),e())},handleSwipe:function(){var t=ri(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0?this.prev():e<0&&this.next()}},touchStart:function(t){Z&&vr[t.pointerType.toUpperCase()]?this.touchStartX=t.clientX:Z||(this.touchStartX=t.touches[0].clientX)},touchMove:function(t){t.touches&&t.touches.length>1?this.touchDeltaX=0:this.touchDeltaX=t.touches[0].clientX-this.touchStartX},touchEnd:function(t){Z&&vr[t.pointerType.toUpperCase()]&&(this.touchDeltaX=t.clientX-this.touchStartX),this.handleSwipe(),this.pause(!1),this.clearTouchTimeout(),this.$_touchTimeout=setTimeout(this.start,500+ai(1e3,this.interval))}},render:function(t){var e=this,i=t("div",{ref:"inner",class:["carousel-inner"],attrs:{id:this.safeId("__BV_inner_"),role:"list"}},[this.normalizeSlot("default")]),n=t();if(this.controls){var a=function(t){e.isSliding?t.preventDefault():e.handleClick(t,e.prev)},r=function(t){e.isSliding?t.preventDefault():e.handleClick(t,e.next)};n=[t("a",{class:["carousel-control-prev"],attrs:{href:"#",role:"button","aria-controls":this.safeId("__BV_inner_"),"aria-disabled":this.isSliding?"true":null},on:{click:a,keydown:a}},[t("span",{class:["carousel-control-prev-icon"],attrs:{"aria-hidden":"true"}}),t("span",{class:["sr-only"]},[this.labelPrev])]),t("a",{class:["carousel-control-next"],attrs:{href:"#",role:"button","aria-controls":this.safeId("__BV_inner_"),"aria-disabled":this.isSliding?"true":null},on:{click:r,keydown:r}},[t("span",{class:["carousel-control-next-icon"],attrs:{"aria-hidden":"true"}}),t("span",{class:["sr-only"]},[this.labelNext])])]}var o=t("ol",{class:["carousel-indicators"],directives:[{name:"show",rawName:"v-show",value:this.indicators,expression:"indicators"}],attrs:{id:this.safeId("__BV_indicators_"),"aria-hidden":this.indicators?"false":"true","aria-label":this.labelIndicators,"aria-owns":this.safeId("__BV_inner_")}},this.slides.map((function(i,n){return t("li",{key:"slide_".concat(n),class:{active:n===e.index},attrs:{role:"button",id:e.safeId("__BV_indicator_".concat(n+1,"_")),tabindex:e.indicators?"0":"-1","aria-current":n===e.index?"true":"false","aria-label":"".concat(e.labelGotoSlide," ").concat(n+1),"aria-describedby":e.slides[n].id||null,"aria-controls":e.safeId("__BV_inner_")},on:{click:function(t){e.handleClick(t,(function(){e.setSlide(n)}))},keydown:function(t){e.handleClick(t,(function(){e.setSlide(n)}))}}})}))),s={mouseenter:this.noHoverPause?or:this.pause,mouseleave:this.noHoverPause?or:this.restart,focusin:this.pause,focusout:this.restart,keydown:function(t){if(!/input|textarea/i.test(t.target.tagName)){var i=t.keyCode;i!==_i.LEFT&&i!==_i.RIGHT||(t.preventDefault(),t.stopPropagation(),e[i===_i.LEFT?"prev":"next"]())}}};return!this.noTouch&&X&&(Z?(s["&pointerdown"]=this.touchStart,s["&pointerup"]=this.touchEnd):(s["&touchstart"]=this.touchStart,s["&touchmove"]=this.touchMove,s["&touchend"]=this.touchEnd)),t("div",{staticClass:"carousel",class:{slide:!this.noAnimation,"carousel-fade":!this.noAnimation&&this.fade,"pointer-event":!this.noTouch&&X&&Z},style:{background:this.background},attrs:{role:"region",id:this.safeId(),"aria-busy":this.isSliding?"true":"false"},on:s},[i,n,o])}}),yr={imgSrc:{type:String},imgAlt:{type:String},imgWidth:{type:[Number,String]},imgHeight:{type:[Number,String]},imgBlank:{type:Boolean,default:!1},imgBlankColor:{type:String,default:"transparent"}},Sr=s(s({},yr),{},{contentVisibleUp:{type:String},contentTag:{type:String,default:"div"},caption:{type:String},captionHtml:{type:String},captionTag:{type:String,default:"h3"},text:{type:String},textHtml:{type:String},textTag:{type:String,default:"p"},background:{type:String}}),Tr=Dt({components:{BCarousel:br,BCarouselSlide:t.extend({name:"BCarouselSlide",mixins:[ma,Ke],inject:{bvCarousel:{default:function(){return{noTouch:!0}}}},props:Sr,computed:{contentClasses:function(){return[this.contentVisibleUp?"d-none":"",this.contentVisibleUp?"d-".concat(this.contentVisibleUp,"-block"):""]},computedWidth:function(){return this.imgWidth||this.bvCarousel.imgWidth||null},computedHeight:function(){return this.imgHeight||this.bvCarousel.imgHeight||null}},render:function(t){var e=this.normalizeSlot("img");if(!e&&(this.imgSrc||this.imgBlank)){var i={};!this.bvCarousel.noTouch&&X&&(i.dragstart=function(t){t.preventDefault()}),e=t(Qa,{props:s(s({},gi(yr,this.$props,pi.bind(null,"img"))),{},{width:this.computedWidth,height:this.computedHeight,fluidGrow:!0,block:!0}),on:i})}var n=[!(!this.caption&&!this.captionHtml)&&t(this.captionTag,{domProps:An(this.captionHtml,this.caption)}),!(!this.text&&!this.textHtml)&&t(this.textTag,{domProps:An(this.textHtml,this.text)}),this.normalizeSlot("default")||!1],a=t();return n.some(Boolean)&&(a=t(this.contentTag,{staticClass:"carousel-caption",class:this.contentClasses},n.map((function(e){return e||t()})))),t("div",{staticClass:"carousel-item",style:{background:this.background||this.bvCarousel.background||null},attrs:{id:this.safeId(),role:"listitem"}},[e,a])}})}}),wr={css:!0,enterClass:"",enterActiveClass:"collapsing",enterToClass:"collapse show",leaveClass:"collapse show",leaveActiveClass:"collapsing",leaveToClass:"collapse"},Br={enter:function(t){t.style.height=0,se((function(){me(t),t.style.height="".concat(t.scrollHeight,"px")}))},afterEnter:function(t){t.style.height=null},leave:function(t){t.style.height="auto",t.style.display="block",t.style.height="".concat(Pe(t).height,"px"),me(t),t.style.height=0},afterLeave:function(t){t.style.height=null}},Cr=t.extend({name:"BVCollapse",functional:!0,props:{appear:{type:Boolean,default:!1}},render:function(t,e){var i=e.props,n=e.data,a=e.children;return t("transition",je(n,{props:wr,on:Br},{props:i}),a)}}),kr={methods:{listenOnRoot:function(t,e){var i=this;this.$root.$on(t,e),this.$on("hook:beforeDestroy",(function(){i.$root.$off(t,e)}))},listenOnRootOnce:function(t,e){var i=this;this.$root.$once(t,e),this.$on("hook:beforeDestroy",(function(){i.$root.$off(t,e)}))},emitOnRoot:function(t){for(var e,i=arguments.length,n=new Array(i>1?i-1:0),a=1;a=0)return 1;return 0}();var Zr=Kr&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),Xr))}};function Jr(t){return t&&"[object Function]"==={}.toString.call(t)}function Qr(t,e){if(1!==t.nodeType)return[];var i=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?i[e]:i}function to(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function eo(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=Qr(t),i=e.overflow,n=e.overflowX,a=e.overflowY;return/(auto|scroll|overlay)/.test(i+a+n)?t:eo(to(t))}function io(t){return t&&t.referenceNode?t.referenceNode:t}var no=Kr&&!(!window.MSInputMethodContext||!document.documentMode),ao=Kr&&/MSIE 10/.test(navigator.userAgent);function ro(t){return 11===t?no:10===t?ao:no||ao}function oo(t){if(!t)return document.documentElement;for(var e=ro(10)?document.body:null,i=t.offsetParent||null;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===Qr(i,"position")?oo(i):i:t?t.ownerDocument.documentElement:document.documentElement}function so(t){return null!==t.parentNode?so(t.parentNode):t}function lo(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,a=i?e:t,r=document.createRange();r.setStart(n,0),r.setEnd(a,0);var o,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||n.contains(a))return"BODY"===(s=(o=l).nodeName)||"HTML"!==s&&oo(o.firstElementChild)!==o?oo(l):l;var u=so(t);return u.host?lo(u.host,e):lo(t,so(e).host)}function uo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i="top"===e?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var a=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||a;return r[i]}return t[i]}function co(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=uo(e,"top"),a=uo(e,"left"),r=i?-1:1;return t.top+=n*r,t.bottom+=n*r,t.left+=a*r,t.right+=a*r,t}function ho(t,e){var i="x"===e?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"])+parseFloat(t["border"+n+"Width"])}function fo(t,e,i,n){return Math.max(e["offset"+t],e["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],ro(10)?parseInt(i["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function po(t){var e=t.body,i=t.documentElement,n=ro(10)&&getComputedStyle(i);return{height:fo("Height",e,i,n),width:fo("Width",e,i,n)}}var mo=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},vo=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],n=ro(10),a="HTML"===e.nodeName,r=So(t),o=So(e),s=eo(t),l=Qr(e),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);i&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var d=yo({top:r.top-o.top-u,left:r.left-o.left-c,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!n&&a){var h=parseFloat(l.marginTop),f=parseFloat(l.marginLeft);d.top-=u-h,d.bottom-=u-h,d.left-=c-f,d.right-=c-f,d.marginTop=h,d.marginLeft=f}return(n&&!i?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=co(d,e)),d}function wo(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.ownerDocument.documentElement,n=To(t,i),a=Math.max(i.clientWidth,window.innerWidth||0),r=Math.max(i.clientHeight,window.innerHeight||0),o=e?0:uo(i),s=e?0:uo(i,"left"),l={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:a,height:r};return yo(l)}function Bo(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===Qr(t,"position"))return!0;var i=to(t);return!!i&&Bo(i)}function Co(t){if(!t||!t.parentElement||ro())return document.documentElement;for(var e=t.parentElement;e&&"none"===Qr(e,"transform");)e=e.parentElement;return e||document.documentElement}function ko(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},o=a?Co(t):lo(t,io(e));if("viewport"===n)r=wo(o,a);else{var s=void 0;"scrollParent"===n?"BODY"===(s=eo(to(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===n?t.ownerDocument.documentElement:n;var l=To(s,o,a);if("HTML"!==s.nodeName||Bo(o))r=l;else{var u=po(t.ownerDocument),c=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=c+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var h="number"==typeof(i=i||0);return r.left+=h?i:i.left||0,r.top+=h?i:i.top||0,r.right-=h?i:i.right||0,r.bottom-=h?i:i.bottom||0,r}function xo(t){return t.width*t.height}function $o(t,e,i,n,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var o=ko(i,n,r,a),s={top:{width:o.width,height:e.top-o.top},right:{width:o.right-e.right,height:o.height},bottom:{width:o.width,height:o.bottom-e.bottom},left:{width:e.left-o.left,height:o.height}},l=Object.keys(s).map((function(t){return bo({key:t},s[t],{area:xo(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight})),c=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return c+(d?"-"+d:"")}function Do(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=n?Co(e):lo(e,io(i));return To(i,a,n)}function Po(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),i=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function _o(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function Fo(t,e,i){i=i.split("-")[0];var n=Po(t),a={width:n.width,height:n.height},r=-1!==["right","left"].indexOf(i),o=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return a[o]=e[o]+e[l]/2-n[l]/2,a[s]=i===s?e[s]-n[u]:e[_o(s)],a}function Io(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function Oo(t,e,i){return(void 0===i?t:t.slice(0,function(t,e,i){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===i}));var n=Io(t,(function(t){return t[e]===i}));return t.indexOf(n)}(t,"name",i))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t.function||t.fn;t.enabled&&Jr(i)&&(e.offsets.popper=yo(e.offsets.popper),e.offsets.reference=yo(e.offsets.reference),e=i(e,t))})),e}function Ao(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=Do(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=$o(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=Fo(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=Oo(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function Eo(t,e){return t.some((function(t){var i=t.name;return t.enabled&&i===e}))}function Vo(t){for(var e=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n1&&void 0!==arguments[1]&&arguments[1],i=Yo.indexOf(t),n=Yo.slice(i+1).concat(Yo.slice(0,i));return e?n.reverse():n}var Ko="flip",Xo="clockwise",Zo="counterclockwise";function Jo(t,e,i,n){var a=[0,0],r=-1!==["right","left"].indexOf(n),o=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=o.indexOf(Io(o,(function(t){return-1!==t.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return(u=u.map((function(t,n){var a=(1===n?!r:r)?"height":"width",o=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,o=!0,t):o?(t[t.length-1]+=e,o=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,i,n){var a=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+a[1],o=a[2];if(!r)return t;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=i;break;case"%":case"%r":default:s=n}return yo(s)[e]/100*r}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}(t,a,e,i)}))}))).forEach((function(t,e){t.forEach((function(i,n){zo(i)&&(a[e]+=i*("-"===t[n-1]?-1:1))}))})),a}var Qo={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var a=t.offsets,r=a.reference,o=a.popper,s=-1!==["bottom","top"].indexOf(i),l=s?"left":"top",u=s?"width":"height",c={start:go({},l,r[l]),end:go({},l,r[l]+r[u]-o[u])};t.offsets.popper=bo({},o,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var i=e.offset,n=t.placement,a=t.offsets,r=a.popper,o=a.reference,s=n.split("-")[0],l=void 0;return l=zo(+i)?[+i,0]:Jo(i,r,o,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var i=e.boundariesElement||oo(t.instance.popper);t.instance.reference===i&&(i=oo(i));var n=Vo("transform"),a=t.instance.popper.style,r=a.top,o=a.left,s=a[n];a.top="",a.left="",a[n]="";var l=ko(t.instance.popper,t.instance.reference,e.padding,i,t.positionFixed);a.top=r,a.left=o,a[n]=s,e.boundaries=l;var u=e.priority,c=t.offsets.popper,d={primary:function(t){var i=c[t];return c[t]l[t]&&!e.escapeWithReference&&(n=Math.min(c[i],l[t]-("right"===t?c.width:c.height))),go({},i,n)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=bo({},c,d[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,a=t.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(a),s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return i[s]r(n[s])&&(t.offsets.popper[l]=r(n[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!Wo(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var a=t.placement.split("-")[0],r=t.offsets,o=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(a),u=l?"height":"width",c=l?"Top":"Left",d=c.toLowerCase(),h=l?"left":"top",f=l?"bottom":"right",p=Po(n)[u];s[f]-po[f]&&(t.offsets.popper[d]+=s[d]+p-o[f]),t.offsets.popper=yo(t.offsets.popper);var m=s[d]+s[u]/2-p/2,v=Qr(t.instance.popper),g=parseFloat(v["margin"+c]),b=parseFloat(v["border"+c+"Width"]),y=m-t.offsets.popper[d]-g-b;return y=Math.max(Math.min(o[u]-p,y),0),t.arrowElement=n,t.offsets.arrow=(go(i={},d,Math.round(y)),go(i,h,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(Eo(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=ko(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],a=_o(n),r=t.placement.split("-")[1]||"",o=[];switch(e.behavior){case Ko:o=[n,a];break;case Xo:o=qo(n);break;case Zo:o=qo(n,!0);break;default:o=e.behavior}return o.forEach((function(s,l){if(n!==s||o.length===l+1)return t;n=t.placement.split("-")[0],a=_o(n);var u=t.offsets.popper,c=t.offsets.reference,d=Math.floor,h="left"===n&&d(u.right)>d(c.left)||"right"===n&&d(u.left)d(c.top)||"bottom"===n&&d(u.top)d(i.right),m=d(u.top)d(i.bottom),g="left"===n&&f||"right"===n&&p||"top"===n&&m||"bottom"===n&&v,b=-1!==["top","bottom"].indexOf(n),y=!!e.flipVariations&&(b&&"start"===r&&f||b&&"end"===r&&p||!b&&"start"===r&&m||!b&&"end"===r&&v),S=!!e.flipVariationsByContent&&(b&&"start"===r&&p||b&&"end"===r&&f||!b&&"start"===r&&v||!b&&"end"===r&&m),T=y||S;(h||g||T)&&(t.flipped=!0,(h||g)&&(n=o[l+1]),T&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=n+(r?"-"+r:""),t.offsets.popper=bo({},t.offsets.popper,Fo(t.instance.popper,t.offsets.reference,t.placement)),t=Oo(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,a=n.popper,r=n.reference,o=-1!==["left","right"].indexOf(i),s=-1===["top","left"].indexOf(i);return a[o?"left":"top"]=r[i]-(s?a[o?"width":"height"]:0),t.placement=_o(e),t.offsets.popper=yo(a),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Wo(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=Io(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomi.right||e.top>i.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};mo(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Zr(this.update.bind(this)),this.options=bo({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(bo({},t.Defaults.modifiers,a.modifiers)).forEach((function(e){n.options.modifiers[e]=bo({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return bo({name:t},n.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&Jr(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return vo(t,[{key:"update",value:function(){return Ao.call(this)}},{key:"destroy",value:function(){return No.call(this)}},{key:"enableEventListeners",value:function(){return Ro.call(this)}},{key:"disableEventListeners",value:function(){return Ho.call(this)}}]),t}();ts.Utils=("undefined"!=typeof window?window:global).PopperUtils,ts.placements=Uo,ts.Defaults=Qo;var BvEvent=function(){function BvEvent(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,BvEvent),!t)throw new TypeError("Failed to construct '".concat(this.constructor.name,"'. 1 argument required, ").concat(arguments.length," given."));D(this,BvEvent.Defaults,this.constructor.Defaults,e,{type:t}),_(this,{type:{enumerable:!0,configurable:!1,writable:!1},cancelable:{enumerable:!0,configurable:!1,writable:!1},nativeEvent:{enumerable:!0,configurable:!1,writable:!1},target:{enumerable:!0,configurable:!1,writable:!1},relatedTarget:{enumerable:!0,configurable:!1,writable:!1},vueTarget:{enumerable:!0,configurable:!1,writable:!1},componentId:{enumerable:!0,configurable:!1,writable:!1}});var n=!1;this.preventDefault=function(){this.cancelable&&(n=!0)},F(this,"defaultPrevented",{enumerable:!0,get:function(){return n}})}return a(BvEvent,null,[{key:"Defaults",get:function(){return{type:"",cancelable:!0,nativeEvent:null,target:null,relatedTarget:null,vueTarget:null,componentId:null}}}]),BvEvent}(),es={data:function(){return{listenForClickOut:!1}},watch:{listenForClickOut:function(t,e){t!==e&&(hr(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,ur),t&&dr(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,ur))}},beforeCreate:function(){this.clickOutElement=null,this.clickOutEventName=null},mounted:function(){this.clickOutElement||(this.clickOutElement=document),this.clickOutEventName||(this.clickOutEventName="click"),this.listenForClickOut&&dr(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,ur)},beforeDestroy:function(){hr(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,ur)},methods:{isClickOut:function(t){return!Se(this.$el,t.target)},_clickOutHandler:function(t){this.clickOutHandler&&this.isClickOut(t)&&this.clickOutHandler(t)}}},is={data:function(){return{listenForFocusIn:!1}},watch:{listenForFocusIn:function(t,e){t!==e&&(hr(this.focusInElement,"focusin",this._focusInHandler,ur),t&&dr(this.focusInElement,"focusin",this._focusInHandler,ur))}},beforeCreate:function(){this.focusInElement=null},mounted:function(){this.focusInElement||(this.focusInElement=document),this.listenForFocusIn&&dr(this.focusInElement,"focusin",this._focusInHandler,ur)},beforeDestroy:function(){hr(this.focusInElement,"focusin",this._focusInHandler,ur)},methods:{_focusInHandler:function(t){this.focusInHandler&&this.focusInHandler(t)}}},ns="".concat("bv::dropdown::","shown"),as="".concat("bv::dropdown::","hidden"),rs={FORM_CHILD:".dropdown form",ITEM_SELECTOR:[".dropdown-item",".b-dropdown-form"].map((function(t){return"".concat(t,":not(.disabled):not([disabled])")})).join(", ")},os="top-start",ss="top-end",ls="bottom-start",us="bottom-end",cs="right-start",ds="left-start",hs={dropup:{type:Boolean,default:!1},dropright:{type:Boolean,default:!1},dropleft:{type:Boolean,default:!1},right:{type:Boolean,default:!1},offset:{type:[Number,String],default:0},noFlip:{type:Boolean,default:!1},popperOpts:{default:function(){}},boundary:{type:[String,HTMLElement],default:"scrollParent"}},fs={mixins:[ma,es,is],provide:function(){return{bvDropdown:this}},inject:{bvNavbar:{default:null}},props:s({disabled:{type:Boolean,default:!1}},hs),data:function(){return{visible:!1,visibleChangePrevented:!1}},computed:{inNavbar:function(){return!rt(this.bvNavbar)},toggler:function(){var t=this.$refs.toggle;return t?t.$el||t:null},directionClass:function(){return this.dropup?"dropup":this.dropright?"dropright":this.dropleft?"dropleft":""}},watch:{visible:function(t,e){if(this.visibleChangePrevented)this.visibleChangePrevented=!1;else if(t!==e){var i=t?"show":"hide",n=new BvEvent(i,{cancelable:!0,vueTarget:this,target:this.$refs.menu,relatedTarget:null,componentId:this.safeId?this.safeId():this.id||null});if(this.emitEvent(n),n.defaultPrevented)return this.visibleChangePrevented=!0,this.visible=e,void this.$off("hidden",this.focusToggler);"show"===i?this.showMenu():this.hideMenu()}},disabled:function(t,e){t!==e&&t&&this.visible&&(this.visible=!1)}},created:function(){this.$_popper=null},deactivated:function(){this.visible=!1,this.whileOpenListen(!1),this.destroyPopper()},beforeDestroy:function(){this.visible=!1,this.whileOpenListen(!1),this.destroyPopper()},methods:{emitEvent:function(t){var e=t.type;this.$emit(e,t),this.$root.$emit("".concat("bv::dropdown::").concat(e),t)},showMenu:function(){var t=this;if(!this.disabled){if(!this.inNavbar)if("undefined"==typeof ts)yt("Popper.js not found. Falling back to CSS positioning","BDropdown");else{var e=this.dropup&&this.right||this.split?this.$el:this.$refs.toggle;e=e.$el||e,this.createPopper(e)}this.$root.$emit(ns,this),this.whileOpenListen(!0),this.$nextTick((function(){t.focusMenu(),t.$emit("shown")}))}},hideMenu:function(){this.whileOpenListen(!1),this.$root.$emit(as,this),this.$emit("hidden"),this.destroyPopper()},createPopper:function(t){this.destroyPopper(),this.$_popper=new ts(t,this.$refs.menu,this.getPopperConfig())},destroyPopper:function(){this.$_popper&&this.$_popper.destroy(),this.$_popper=null},updatePopper:function(){try{this.$_popper.scheduleUpdate()}catch(t){}},getPopperConfig:function(){var t=ls;this.dropup?t=this.right?ss:os:this.dropright?t=cs:this.dropleft?t=ds:this.right&&(t=us);var e={placement:t,modifiers:{offset:{offset:this.offset||0},flip:{enabled:!this.noFlip}}};return this.boundary&&(e.modifiers.preventOverflow={boundariesElement:this.boundary}),s(s({},e),this.popperOpts||{})},whileOpenListen:function(t){this.listenForClickOut=t,this.listenForFocusIn=t;var e=t?"$on":"$off";this.$root[e](ns,this.rootCloseListener)},rootCloseListener:function(t){t!==this&&(this.visible=!1)},show:function(){var t=this;this.disabled||se((function(){t.visible=!0}))},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.disabled||(this.visible=!1,t&&this.$once("hidden",this.focusToggler))},toggle:function(t){var e=t=t||{},i=e.type,n=e.keyCode;("click"===i||"keydown"===i&&-1!==[_i.ENTER,_i.SPACE,_i.DOWN].indexOf(n))&&(this.disabled?this.visible=!1:(this.$emit("toggle",t),t.preventDefault(),t.stopPropagation(),this.visible?this.hide(!0):this.show()))},onMousedown:function(t){t.preventDefault()},onKeydown:function(t){var e=t.keyCode;e===_i.ESC?this.onEsc(t):e===_i.DOWN?this.focusNext(t,!1):e===_i.UP&&this.focusNext(t,!0)},onEsc:function(t){this.visible&&(this.visible=!1,t.preventDefault(),t.stopPropagation(),this.$once("hidden",this.focusToggler))},onSplitClick:function(t){this.disabled?this.visible=!1:this.$emit("click",t)},hideHandler:function(t){var e=t.target;!this.visible||Se(this.$refs.menu,e)||Se(this.toggler,e)||this.hide()},clickOutHandler:function(t){this.hideHandler(t)},focusInHandler:function(t){this.hideHandler(t)},focusNext:function(t,e){var i=this,n=t.target;!this.visible||t&&ye(rs.FORM_CHILD,n)||(t.preventDefault(),t.stopPropagation(),this.$nextTick((function(){var t=i.getItems();if(!(t.length<1)){var a=t.indexOf(n);e&&a>0?a--:!e&&a1&&void 0!==arguments[1]?arguments[1]:null;if(N(t)){var i=bt(t,this.valueField),n=bt(t,this.textField);return{value:at(i)?e||n:i,text:On(String(at(n)?e:n)),html:bt(t,this.htmlField),disabled:Boolean(bt(t,this.disabledField))}}return{value:e||t,text:On(String(t)),disabled:!1}},normalizeOptions:function(t){var e=this;return k(t)?t.map((function(t){return e.normalizeOption(t)})):N(t)?(yt('Setting prop "options" to an object is deprecated. Use the array format instead.',this.$options.name),A(t).map((function(i){return e.normalizeOption(t[i]||{},i)}))):[]}}},Es=t.extend({name:"BFormDatalist",mixins:[As,Ke],props:{id:{type:String,required:!0}},render:function(t){var e=this.formOptions.map((function(e,i){var n=e.value,a=e.text,r=e.html,o=e.disabled;return t("option",{attrs:{value:n,disabled:o},domProps:An(r,a),key:"option_".concat(i)})}));return t("datalist",{attrs:{id:this.id}},[e,this.normalizeSlot("default")])}}),Vs={id:{type:String},tag:{type:String,default:"small"},textVariant:{type:String,default:function(){return Nt("BFormText","textVariant")}},inline:{type:Boolean,default:!1}},Ns=t.extend({name:"BFormText",functional:!0,props:Vs,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{class:r({"form-text":!i.inline},"text-".concat(i.textVariant),i.textVariant),attrs:{id:i.id}}),a)}}),Ls={id:{type:String},tag:{type:String,default:"div"},tooltip:{type:Boolean,default:!1},forceShow:{type:Boolean,default:!1},state:{type:Boolean,default:null},ariaLive:{type:String},role:{type:String}},Ms=t.extend({name:"BFormInvalidFeedback",functional:!0,props:Ls,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=!0===i.forceShow||!1===i.state;return t(i.tag,je(n,{class:{"invalid-feedback":!i.tooltip,"invalid-tooltip":i.tooltip,"d-block":r},attrs:{id:i.id||null,role:i.role||null,"aria-live":i.ariaLive||null,"aria-atomic":i.ariaLive?"true":null}}),a)}}),Rs={id:{type:String},tag:{type:String,default:"div"},tooltip:{type:Boolean,default:!1},forceShow:{type:Boolean,default:!1},state:{type:Boolean,default:null},ariaLive:{type:String},role:{type:String}},Hs=t.extend({name:"BFormValidFeedback",functional:!0,props:Rs,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=!0===i.forceShow||!0===i.state;return t(i.tag,je(n,{class:{"valid-feedback":!i.tooltip,"valid-tooltip":i.tooltip,"d-block":r},attrs:{id:i.id||null,role:i.role||null,"aria-live":i.ariaLive||null,"aria-atomic":i.ariaLive?"true":null}}),a)}}),zs={tag:{type:String,default:"div"}},js=t.extend({name:"BFormRow",functional:!0,props:zs,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{staticClass:"form-row"}),a)}}),Gs=Dt({components:{BForm:xs,BFormDatalist:Es,BDatalist:Es,BFormText:Ns,BFormInvalidFeedback:Ms,BFormFeedback:Ms,BFormValidFeedback:Hs,BFormRow:js}}),Ws=function(t,e){for(var i=0;i-1:qn(t,e)},isRadio:function(){return!1},isCheck:function(){return!0}},watch:{computedLocalChecked:function(t){this.$emit("input",t),this.$refs&&this.$refs.input&&this.$emit("update:indeterminate",this.$refs.input.indeterminate)},indeterminate:function(t){this.setIndeterminate(t)}},mounted:function(){this.setIndeterminate(this.indeterminate)},methods:{handleChange:function(t){var e=t.target,i=e.checked,n=e.indeterminate,a=this.computedLocalChecked,r=this.value,o=k(a),s=o?null:this.uncheckedValue;if(o){var l=Ws(a,r);i&&l<0?a=a.concat(r):!i&&l>-1&&(a=a.slice(0,l).concat(a.slice(l+1)))}else a=i?r:s;this.computedLocalChecked=a,this.$emit("change",i?r:s),this.isGroup&&this.bvGroup.$emit("change",a),this.$emit("update:indeterminate",n)},setIndeterminate:function(t){k(this.computedLocalChecked)&&(t=!1),this.$refs&&this.$refs.input&&(this.$refs.input.indeterminate=t,this.$emit("update:indeterminate",t))}}}),Zs=t.extend({name:"BFormRadio",mixins:[ma,Ys,Us,qs,Ks],inject:{bvGroup:{from:"bvRadioGroup",default:!1}},props:{checked:{default:null}},computed:{isChecked:function(){return qn(this.value,this.computedLocalChecked)},isRadio:function(){return!0},isCheck:function(){return!1}},watch:{computedLocalChecked:function(){this.$emit("input",this.computedLocalChecked)}},methods:{handleChange:function(t){var e=t.target.checked,i=this.value;this.computedLocalChecked=i,this.$emit("change",e?i:null),this.isGroup&&this.bvGroup.$emit("change",e?i:null)}}}),Js={mixins:[Ke],model:{prop:"checked",event:"input"},props:{validated:{type:Boolean,default:!1},ariaInvalid:{type:[Boolean,String],default:!1},stacked:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},buttons:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"}},computed:{inline:function(){return!this.stacked},groupName:function(){return this.name||this.safeId()},groupClasses:function(){return this.buttons?["btn-group-toggle",this.inline?"btn-group":"btn-group-vertical",this.size?"btn-group-".concat(this.size):"",this.validated?"was-validated":""]:[this.validated?"was-validated":""]},computedAriaInvalid:function(){var t=this.ariaInvalid;return!0===t||"true"===t||""===t||!1===this.computedState?"true":null}},watch:{checked:function(t){this.localChecked=t},localChecked:function(t){this.$emit("input",t)}},render:function(t){var e=this,i=this.formOptions.map((function(i,n){var a="BV_option_".concat(n);return t(e.isRadioGroup?Zs:Xs,{props:{id:e.safeId(a),value:i.value,disabled:i.disabled||!1},key:a},[t("span",{domProps:An(i.html,i.text)})])}));return t("div",{class:[this.groupClasses,"bv-no-focus-ring"],attrs:{id:this.safeId(),role:this.isRadioGroup?"radiogroup":"group",tabindex:"-1","aria-required":this.required?"true":null,"aria-invalid":this.computedAriaInvalid}},[this.normalizeSlot("first"),i,this.normalizeSlot("default")])}},Qs={switches:{type:Boolean,default:!1},checked:{type:Array,default:null}},tl=t.extend({name:"BFormCheckboxGroup",mixins:[ma,Us,Js,As,qs,Ks],provide:function(){return{bvCheckGroup:this}},props:Qs,data:function(){return{localChecked:this.checked||[]}},computed:{isRadioGroup:function(){return!1}}}),el=Dt({components:{BFormCheckbox:Xs,BCheckbox:Xs,BCheck:Xs,BFormCheckboxGroup:tl,BCheckboxGroup:tl,BCheckGroup:tl}}),il="__BV_hover_handler__",nl=function(t,e,i){fr(t,e,"mouseenter",i,ur),fr(t,e,"mouseleave",i,ur)},al=function(t,e){var i=e.value,n=void 0===i?null:i;if(U){var a=t[il],r=st(a),o=!(r&&a.fn===n);r&&o&&(nl(!1,t,a),delete t[il]),st(n)&&o&&(t[il]=function(t){var e=function(e){t("mouseenter"===e.type,e)};return e.fn=t,e}(n),nl(!0,t,t[il]))}},rl={bind:al,componentUpdated:al,unbind:function(t){al(t,{value:null})}},ol=hs,sl=t.extend({name:"BVFormBtnLabelControl",directives:{BHover:rl},mixins:[ma,Ke,fs],props:{value:{type:String,default:""},formattedValue:{type:String},placeholder:{type:String},labelSelected:{type:String},state:{type:Boolean,default:null},size:{type:String},name:{type:String},form:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},lang:{type:String},rtl:{type:Boolean,default:null},buttonOnly:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"},menuClass:{type:[String,Array,Object]}},data:function(){return{isHovered:!1,hasFocus:!1}},computed:{idButton:function(){return this.safeId()},idLabel:function(){return this.safeId("_value_")},idMenu:function(){return this.safeId("_dialog_")},idWrapper:function(){return this.safeId("_outer_")},computedDir:function(){return!0===this.rtl?"rtl":!1===this.rtl?"ltr":null}},methods:{focus:function(){this.disabled||Ee(this.$refs.toggle)},blur:function(){this.disabled||Ve(this.$refs.toggle)},setFocus:function(t){this.hasFocus="focus"===t.type},handleHover:function(t){this.isHovered=t},stopEvent:function(t){t.stopPropagation()}},render:function(t){var e,i,n,a=this.idButton,o=this.idLabel,s=this.idMenu,l=this.idWrapper,u=this.disabled,c=this.readonly,d=this.required,h=this.isHovered,f=this.hasFocus,p=this.state,m=this.visible,v=this.size,g=Jt(this.value)||"",b=this.labelSelected,y=!!this.buttonOnly,S=this.buttonVariant,T={isHovered:h,hasFocus:f,state:p,opened:m},w=t("button",{ref:"toggle",staticClass:"btn",class:(e={},r(e,"btn-".concat(S),y),r(e,"btn-".concat(v),!!v),r(e,"h-auto",!y),r(e,"dropdown-toggle",y),r(e,"dropdown-toggle-no-caret",y),e),attrs:{id:a,type:"button",disabled:u,"aria-haspopup":"dialog","aria-expanded":m?"true":"false","aria-invalid":!1===p||d&&!g?"true":null,"aria-required":d?"true":null},directives:[{name:"b-hover",value:this.handleHover}],on:{mousedown:this.onMousedown,click:this.toggle,keydown:this.toggle,"!focus":this.setFocus,"!blur":this.setFocus}},[this.hasNormalizedSlot("button-content")?this.normalizeSlot("button-content",T):t(sn,{props:{scale:1.25}})]),B=t();this.name&&!u&&(B=t("input",{attrs:{type:"hidden",name:this.name||null,form:this.form||null,value:g}}));var C=t("div",{ref:"menu",staticClass:"dropdown-menu",class:[this.menuClass,{show:m,"dropdown-menu-right":this.right}],attrs:{id:s,role:"dialog",tabindex:"-1","aria-modal":"false","aria-labelledby":o},on:{keydown:this.onKeydown}},[this.normalizeSlot("default",{opened:m})]),k=t("label",{staticClass:"form-control text-break text-wrap bg-transparent h-auto",class:(i={"sr-only":y,"text-muted":!g},r(i,"form-control-".concat(v),!!v),r(i,"is-invalid",!1===p),r(i,"is-valid",!0===p),i),attrs:{id:o,for:a,"aria-invalid":!1===p||d&&!g?"true":null,"aria-required":d?"true":null},directives:[{name:"b-hover",value:this.handleHover}],on:{"!click":this.stopEvent}},[g?this.formattedValue||g:this.placeholder||"",g&&b?t("bdi",{staticClass:"sr-only"},b):""]);return t("div",{staticClass:"b-form-btn-label-control dropdown",class:[this.directionClass,(n={"btn-group":y,"form-control":!y},r(n,"form-control-".concat(v),!!v&&!y),r(n,"d-flex",!y),r(n,"h-auto",!y),r(n,"align-items-stretch",!y),r(n,"focus",f&&!y),r(n,"show",m),r(n,"is-valid",!0===p),r(n,"is-invalid",!1===p),n)],attrs:{id:l,role:y?null:"group",lang:this.lang||null,dir:this.computedDir,"aria-disabled":u,"aria-readonly":c&&!u,"aria-labelledby":o,"aria-invalid":!1===p||d&&!g?"true":null,"aria-required":d?"true":null}},[w,B,C,k])}}),ll="BFormDatepicker",ul=function(t){return Nt(ll,t)||Nt("BCalendar",t)},cl={props:s({value:{type:[String,Date],default:null},valueAsDate:{type:Boolean,default:!1},resetValue:{type:[String,Date]},initialDate:{type:[String,Date]},placeholder:{type:String},size:{type:String},min:{type:[String,Date]},max:{type:[String,Date]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},name:{type:String},form:{type:String},state:{type:Boolean,default:null},dateDisabledFn:{type:Function},noCloseOnSelect:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},showDecadeNav:{type:Boolean,default:!1},locale:{type:[String,Array]},startWeekday:{type:[Number,String],default:0},direction:{type:String},buttonOnly:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"},calendarWidth:{type:String,default:"270px"},selectedVariant:{type:String,default:"primary"},todayVariant:{type:String},noHighlightToday:{type:Boolean,default:!1},todayButton:{type:Boolean,default:!1},labelTodayButton:{type:String,default:function(){return Nt(ll,"labelTodayButton")}},todayButtonVariant:{type:String,default:"outline-primary"},resetButton:{type:Boolean,default:!1},labelResetButton:{type:String,default:function(){return Nt(ll,"labelResetButton")}},resetButtonVariant:{type:String,default:"outline-danger"},closeButton:{type:Boolean,default:!1},labelCloseButton:{type:String,default:function(){return Nt(ll,"labelCloseButton")}},closeButtonVariant:{type:String,default:"outline-secondary"},dateInfoFn:{type:Function},labelPrevDecade:{type:String,default:function(){return ul("labelPrevDecade")}},labelPrevYear:{type:String,default:function(){return ul("labelPrevYear")}},labelPrevMonth:{type:String,default:function(){return ul("labelPrevMonth")}},labelCurrentMonth:{type:String,default:function(){return ul("labelCurrentMonth")}},labelNextMonth:{type:String,default:function(){return ul("labelNextMonth")}},labelNextYear:{type:String,default:function(){return ul("labelNextYear")}},labelNextDecade:{type:String,default:function(){return ul("labelNextDecade")}},labelToday:{type:String,default:function(){return ul("labelToday")}},labelSelected:{type:String,default:function(){return ul("labelSelected")}},labelNoDateSelected:{type:String,default:function(){return ul("labelNoDateSelected")}},labelCalendar:{type:String,default:function(){return ul("labelCalendar")}},labelNav:{type:String,default:function(){return ul("labelNav")}},labelHelp:{type:String,default:function(){return ul("labelHelp")}},dateFormatOptions:{type:Object,default:function(){return{year:"numeric",month:"long",day:"numeric",weekday:"long"}}},weekdayHeaderFormat:{type:String,default:"short",validator:function(t){return x(["long","short","narrow"],t)}},dark:{type:Boolean,default:!1},menuClass:{type:[String,Array,Object]}},ol)},dl=t.extend({name:ll,mixins:[ma,cl],model:{prop:"value",event:"input"},data:function(){return{localYMD:Qn(this.value)||"",isVisible:!1,localLocale:null,isRTL:!1,formattedValue:"",activeYMD:""}},computed:{calendarYM:function(){return this.activeYMD.slice(0,-3)},calendarProps:function(){return{hidden:!this.isVisible,value:this.localYMD,min:this.min,max:this.max,initialDate:this.initialDate,readonly:this.readonly,disabled:this.disabled,locale:this.locale,startWeekday:this.startWeekday,direction:this.direction,width:this.calendarWidth,dateDisabledFn:this.dateDisabledFn,selectedVariant:this.selectedVariant,todayVariant:this.todayVariant,dateInfoFn:this.dateInfoFn,hideHeader:this.hideHeader,showDecadeNav:this.showDecadeNav,noHighlightToday:this.noHighlightToday,labelPrevDecade:this.labelPrevDecade,labelPrevYear:this.labelPrevYear,labelPrevMonth:this.labelPrevMonth,labelCurrentMonth:this.labelCurrentMonth,labelNextMonth:this.labelNextMonth,labelNextYear:this.labelNextYear,labelNextDecade:this.labelNextDecade,labelToday:this.labelToday,labelSelected:this.labelSelected,labelNoDateSelected:this.labelNoDateSelected,labelCalendar:this.labelCalendar,labelNav:this.labelNav,labelHelp:this.labelHelp,dateFormatOptions:this.dateFormatOptions,weekdayHeaderFormat:this.weekdayHeaderFormat}},computedLang:function(){return(this.localLocale||"").replace(/-u-.*$/i,"")||null},computedResetValue:function(){return Qn(da(this.resetValue))||""}},watch:{value:function(t){this.localYMD=Qn(t)||""},localYMD:function(t){this.isVisible&&this.$emit("input",this.valueAsDate?Jn(t)||null:t||"")},calendarYM:function(t,e){if(t!==e&&e)try{this.$refs.control.updatePopper()}catch(t){}}},methods:{focus:function(){this.disabled||Ee(this.$refs.control)},blur:function(){this.disabled||Ve(this.$refs.control)},setAndClose:function(t){var e=this;this.localYMD=t,this.noCloseOnSelect||this.$nextTick((function(){e.$refs.control.hide(!0)}))},onSelected:function(t){var e=this;this.$nextTick((function(){e.setAndClose(t)}))},onInput:function(t){this.localYMD!==t&&(this.localYMD=t)},onContext:function(t){var e=t.activeYMD,i=t.isRTL,n=t.locale,a=t.selectedYMD,r=t.selectedFormatted;this.isRTL=i,this.localLocale=n,this.formattedValue=r,this.localYMD=a,this.activeYMD=e,this.$emit("context",t)},onTodayButton:function(){this.setAndClose(Qn(da(Zn(),this.min,this.max)))},onResetButton:function(){this.setAndClose(this.computedResetValue)},onCloseButton:function(){this.$refs.control.hide(!0)},onShow:function(){this.isVisible=!0},onShown:function(){var t=this;this.$nextTick((function(){Ee(t.$refs.calendar),t.$emit("shown")}))},onHidden:function(){this.isVisible=!1,this.$emit("hidden")},defaultButtonFn:function(t){var e=t.isHovered,i=t.hasFocus;return this.$createElement(e||i?an:nn,{attrs:{"aria-hidden":"true"}})}},render:function(t){var e=this.$scopedSlots,i=this.localYMD,n=this.disabled,a=this.readonly,r=ot(this.placeholder)?this.labelNoDateSelected:this.placeholder,o=[];if(this.todayButton){var l=this.labelTodayButton;o.push(t(Ki,{props:{size:"sm",disabled:n||a,variant:this.todayButtonVariant},attrs:{"aria-label":l||null},on:{click:this.onTodayButton}},l))}if(this.resetButton){var u=this.labelResetButton;o.push(t(Ki,{props:{size:"sm",disabled:n||a,variant:this.resetButtonVariant},attrs:{"aria-label":u||null},on:{click:this.onResetButton}},u))}if(this.closeButton){var c=this.labelCloseButton;o.push(t(Ki,{props:{size:"sm",disabled:n,variant:this.closeButtonVariant},attrs:{"aria-label":c||null},on:{click:this.onCloseButton}},c))}o.length>0&&(o=[t("div",{staticClass:"b-form-date-controls d-flex flex-wrap",class:{"justify-content-between":o.length>1,"justify-content-end":o.length<2}},o)]);var d=t($a,{key:"calendar",ref:"calendar",staticClass:"b-form-date-calendar w-100",props:this.calendarProps,on:{selected:this.onSelected,input:this.onInput,context:this.onContext},scopedSlots:M(e,["nav-prev-decade","nav-prev-year","nav-prev-month","nav-this-month","nav-next-month","nav-next-year","nav-next-decade"])},o);return t(sl,{ref:"control",staticClass:"b-form-datepicker",props:s(s({},this.$props),{},{id:this.safeId(),rtl:this.isRTL,lang:this.computedLang,value:i||"",formattedValue:i?this.formattedValue:"",placeholder:r||"",menuClass:[{"bg-dark":!!this.dark,"text-light":!!this.dark},this.menuClass]}),on:{show:this.onShow,shown:this.onShown,hidden:this.onHidden},scopedSlots:{"button-content":e["button-content"]||this.defaultButtonFn}},[d])}}),hl=Dt({components:{BFormDatepicker:dl,BDatepicker:dl}}),fl={props:{plain:{type:Boolean,default:!1}},computed:{custom:function(){return!this.plain}}},pl="BFormFile",ml=function t(e){return e instanceof it||k(e)&&e.every((function(e){return t(e)}))},vl=t.extend({name:pl,mixins:[Oi,ma,Us,Ks,fl,Ke],inheritAttrs:!1,model:{prop:"value",event:"input"},props:{size:{type:String,default:function(){return Nt("BFormControl","size")}},value:{type:[it,Array],default:null,validator:function(t){return""===t?(yt('Setting "value"/"v-model" to an empty string for reset is deprecated. Set to "null" instead.',pl),!0):ot(t)||ml(t)}},accept:{type:String,default:""},capture:{type:Boolean,default:!1},placeholder:{type:String,default:function(){return Nt(pl,"placeholder")}},browseText:{type:String,default:function(){return Nt(pl,"browseText")}},dropPlaceholder:{type:String,default:function(){return Nt(pl,"dropPlaceholder")}},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{selectedFile:null,dragging:!1,hasFocus:!1}},computed:{selectLabel:function(){if(this.dragging&&this.dropPlaceholder)return this.dropPlaceholder;if(!this.selectedFile||0===this.selectedFile.length)return this.placeholder;var t=$(this.selectedFile).filter(mt);return this.hasNormalizedSlot("file-name")?[this.normalizeSlot("file-name",{files:t,names:t.map((function(t){return t.name}))})]:st(this.fileNameFormatter)?Jt(this.fileNameFormatter(t)):t.map((function(t){return t.name})).join(", ")},computedAttrs:function(){return s(s({},this.bvAttrs),{},{type:"file",id:this.safeId(),name:this.name,disabled:this.disabled,required:this.required,form:this.form||null,capture:this.capture||null,accept:this.accept||null,multiple:this.multiple,webkitdirectory:this.directory,"aria-required":this.required?"true":null})}},watch:{selectedFile:function(t,e){t===e||k(t)&&k(e)&&t.length===e.length&&t.every((function(t,i){return t===e[i]}))||(!t&&this.multiple?this.$emit("input",[]):this.$emit("input",t))},value:function(t){(!t||k(t)&&0===t.length)&&this.reset()}},methods:{focusHandler:function(t){this.plain||"focusout"===t.type?this.hasFocus=!1:this.hasFocus=!0},reset:function(){try{var t=this.$refs.input;t.value="",t.type="",t.type="file"}catch(t){}this.selectedFile=this.multiple?[]:null},onFileChange:function(t){var e=this;this.$emit("change",t);var i=t.dataTransfer&&t.dataTransfer.items;if(!i||this.noTraverse)this.setFiles(t.target.files||t.dataTransfer.files);else{for(var n=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:[];if(t)if(this.multiple){for(var e=[],i=0;i0&&this.onFileChange(t))},traverseFileTree:function(t,e){var i=this;return new Promise((function(n){e=e||"",t.isFile?t.file((function(t){t.$path=e,n(t)})):t.isDirectory&&t.createReader().readEntries((function(a){for(var r=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;return"".concat(e).concat(Xt(t))})),Dl={name:"BFormGroup",mixins:[ma,Ks,Ke],get props(){return delete this.props,this.props=(t=Rt(),e=t.reduce((function(t,e){return t[$l(e,"labelCols")]={type:[Number,String,Boolean],default:!e&&null},t}),P(null)),i=t.reduce((function(t,e){return t[$l(e,"labelAlign")]={type:String},t}),P(null)),s(s(s({label:{type:String},labelFor:{type:String},labelSize:{type:String},labelSrOnly:{type:Boolean,default:!1}},e),i),{},{labelClass:{type:[String,Array,Object]},description:{type:String},invalidFeedback:{type:String},validFeedback:{type:String},tooltip:{type:Boolean,default:!1},feedbackAriaLive:{type:String,default:"assertive"},validated:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}}));var t,e,i},computed:{labelColProps:function(){var t=this,e={};return Rt().forEach((function(i){var n=t[$l(i,"labelCols")];if(lt(n=""===n||(n||!1))||"auto"===n||(n=(n=Ht(n,0))>0&&n),n){var a=i||(lt(n)?"col":"cols");e[a]=n}})),e},labelAlignClasses:function(){var t=this,e=[];return Rt().forEach((function(i){var n=t[$l(i,"labelAlign")]||null;if(n){var a=i?"text-".concat(i,"-").concat(n):"text-".concat(n);e.push(a)}})),e},isHorizontal:function(){return A(this.labelColProps).length>0},labelId:function(){return this.hasNormalizedSlot("label")||this.label?this.safeId("_BV_label_"):null},descriptionId:function(){return this.hasNormalizedSlot("description")||this.description?this.safeId("_BV_description_"):null},hasInvalidFeedback:function(){return!1===this.computedState&&(this.hasNormalizedSlot("invalid-feedback")||this.invalidFeedback)},invalidFeedbackId:function(){return this.hasInvalidFeedback?this.safeId("_BV_feedback_invalid_"):null},hasValidFeedback:function(){return!0===this.computedState&&(this.hasNormalizedSlot("valid-feedback")||this.validFeedback)},validFeedbackId:function(){return this.hasValidFeedback?this.safeId("_BV_feedback_valid_"):null},describedByIds:function(){return[this.descriptionId,this.invalidFeedbackId,this.validFeedbackId].filter(Boolean).join(" ")||null}},watch:{describedByIds:function(t,e){t!==e&&this.setInputDescribedBy(t,e)}},mounted:function(){var t=this;this.$nextTick((function(){t.setInputDescribedBy(t.describedByIds)}))},methods:{legendClick:function(t){if(!this.labelFor){var e=t.target?t.target.tagName:"";if(!/^(input|select|textarea|label|button|a)$/i.test(e)){var i=ve("input:not([disabled]),textarea:not([disabled]),select:not([disabled])",this.$refs.content).filter(fe);i&&1===i.length&&Ee(i[0])}}},setInputDescribedBy:function(t,e){if(this.labelFor&&U){var i=ge("#".concat(this.labelFor),this.$refs.content);if(i){var n="aria-describedby",a=($e(i,n)||"").split(/\s+/);t=(t||"").split(/\s+/),e=(e||"").split(/\s+/),a=a.filter((function(t){return!x(e,t)})).concat(t).filter(Boolean),(a=A(a.reduce((function(t,e){return s(s({},t),{},r({},e,!0))}),{})).join(" ").trim())?ke(i,n,a):xe(i,n)}}}},render:function(t){var e=!this.labelFor,i=this.isHorizontal,n=function(t,e){var i=e.normalizeSlot("label")||e.label,n=e.labelFor,a=!n,r=e.isHorizontal,o=a?"legend":"label";if(i||r){if(e.labelSrOnly){var l=t();return i&&(l=t(o,{class:"sr-only",attrs:{id:e.labelId,for:n||null}},[i])),t(r?Bl:"div",{props:r?e.labelColProps:{}},[l])}return t(r?Bl:o,{on:a?{click:e.legendClick}:{},props:r?s({tag:o},e.labelColProps):{},attrs:{id:e.labelId,for:n||null,tabindex:a?"-1":null},class:[a?"bv-no-focus-ring":"",r||a?"col-form-label":"",!r&&a?"pt-0":"",r||a?"":"d-block",e.labelSize?"col-form-label-".concat(e.labelSize):"",e.labelAlignClasses,e.labelClass]},[i])}return t()}(t,this),a=t(i?Bl:"div",{ref:"content",staticClass:"bv-no-focus-ring",attrs:{tabindex:e?"-1":null,role:e?"group":null}},[this.normalizeSlot("default")||t(),Cl(t,this),kl(t,this),xl(t,this)]),r={staticClass:"form-group",class:[this.validated?"was-validated":null,this.stateClass],attrs:{id:this.safeId(),disabled:e?this.disabled:null,role:e?null:"group","aria-invalid":!1===this.computedState?"true":null,"aria-labelledby":e&&i?this.labelId:null,"aria-describedby":e?this.describedByIds:null}};return t(e?"fieldset":i?js:"div",r,i&&e?[t(js,[n,a])]:[n,a])}},Pl=Dt({components:{BFormGroup:Dl,BFormFieldset:Dl}}),_l={computed:{selectionStart:{cache:!1,get:function(){return this.$refs.input.selectionStart},set:function(t){this.$refs.input.selectionStart=t}},selectionEnd:{cache:!1,get:function(){return this.$refs.input.selectionEnd},set:function(t){this.$refs.input.selectionEnd=t}},selectionDirection:{cache:!1,get:function(){return this.$refs.input.selectionDirection},set:function(t){this.$refs.input.selectionDirection=t}}},methods:{select:function(){var t;(t=this.$refs.input).select.apply(t,arguments)},setSelectionRange:function(){var t;(t=this.$refs.input).setSelectionRange.apply(t,arguments)},setRangeText:function(){var t;(t=this.$refs.input).setRangeText.apply(t,arguments)}}},Fl={model:{prop:"value",event:"update"},props:{value:{type:[String,Number],default:""},ariaInvalid:{type:[Boolean,String],default:!1},readonly:{type:Boolean,default:!1},plaintext:{type:Boolean,default:!1},autocomplete:{type:String},placeholder:{type:String},formatter:{type:Function},lazyFormatter:{type:Boolean,default:!1},trim:{type:Boolean,default:!1},number:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},debounce:{type:[Number,String],default:0}},data:function(){return{localValue:Jt(this.value),vModelValue:this.value}},computed:{computedClass:function(){return[{"custom-range":"range"===this.type,"form-control-plaintext":this.plaintext&&"range"!==this.type&&"color"!==this.type,"form-control":!this.plaintext&&"range"!==this.type||"color"===this.type},this.sizeFormClass,this.stateClass]},computedAriaInvalid:function(){return this.ariaInvalid&&"false"!==this.ariaInvalid?!0===this.ariaInvalid?"true":this.ariaInvalid:!1===this.computedState?"true":null},computedDebounce:function(){return ai(Ht(this.debounce,0),0)},hasFormatter:function(){return st(this.formatter)}},watch:{value:function(t){var e=Jt(t);e!==this.localValue&&t!==this.vModelValue&&(this.clearDebounce(),this.localValue=e,this.vModelValue=t)}},created:function(){this.$_inputDebounceTimer=null},mounted:function(){this.$on("hook:beforeDestroy",this.clearDebounce);var t=this.value,e=Jt(t);e!==this.localValue&&t!==this.vModelValue&&(this.localValue=e,this.vModelValue=t)},methods:{clearDebounce:function(){clearTimeout(this.$_inputDebounceTimer),this.$_inputDebounceTimer=null},formatValue:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t=Jt(t),!this.hasFormatter||this.lazyFormatter&&!i||(t=this.formatter(t,e)),t},modifyValue:function(t){return this.trim&&(t=t.trim()),this.number&&(t=zt(t,t)),t},updateValue:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.lazy;if(!n||i)if((t=this.modifyValue(t))!==this.vModelValue){this.clearDebounce();var a=function(){e.vModelValue=t,e.$emit("update",t)},r=this.computedDebounce;r>0&&!n&&!i?this.$_inputDebounceTimer=setTimeout(a,r):a()}else if(this.hasFormatter){var o=this.$refs.input;o&&t!==o.value&&(o.value=t)}},onInput:function(t){if(!t.target.composing){var e=t.target.value,i=this.formatValue(e,t);!1===i||t.defaultPrevented?t.preventDefault():(this.localValue=i,this.updateValue(i),this.$emit("input",i))}},onChange:function(t){var e=t.target.value,i=this.formatValue(e,t);!1===i||t.defaultPrevented?t.preventDefault():(this.localValue=i,this.updateValue(i,!0),this.$emit("change",i))},onBlur:function(t){var e=t.target.value,i=this.formatValue(e,t,!0);!1!==i&&(this.localValue=Jt(this.modifyValue(i)),this.updateValue(i,!0)),this.$emit("blur",t)},focus:function(){this.disabled||Ee(this.$el)},blur:function(){this.disabled||Ve(this.$el)}}},Il={computed:{validity:{cache:!1,get:function(){return this.$refs.input.validity}},validationMessage:{cache:!1,get:function(){return this.$refs.input.validationMessage}},willValidate:{cache:!1,get:function(){return this.$refs.input.willValidate}}},methods:{setCustomValidity:function(){var t;return(t=this.$refs.input).setCustomValidity.apply(t,arguments)},checkValidity:function(){var t;return(t=this.$refs.input).checkValidity.apply(t,arguments)},reportValidity:function(){var t;return(t=this.$refs.input).reportValidity.apply(t,arguments)}}},Ol=["text","password","email","number","url","tel","search","range","color","date","time","datetime","datetime-local","month","week"],Al=t.extend({name:"BFormInput",mixins:[Ai,ma,Us,qs,Ks,Fl,_l,Il],props:{type:{type:String,default:"text",validator:function(t){return x(Ol,t)}},noWheel:{type:Boolean,default:!1},min:{type:[String,Number]},max:{type:[String,Number]},step:{type:[String,Number]},list:{type:String}},computed:{localType:function(){return x(Ol,this.type)?this.type:"text"},computedAttrs:function(){var t=this.localType,e=this.disabled,i=this.placeholder,n=this.required,a=this.min,r=this.max,o=this.step;return{id:this.safeId(),name:this.name||null,form:this.form||null,type:t,disabled:e,placeholder:i,required:n,autocomplete:this.autocomplete||null,readonly:this.readonly||this.plaintext,min:a,max:r,step:o,list:"password"!==t?this.list:null,"aria-required":n?"true":null,"aria-invalid":this.computedAriaInvalid}},computedListeners:function(){return s(s({},this.bvListeners),{},{input:this.onInput,change:this.onChange,blur:this.onBlur})}},watch:{noWheel:function(t){this.setWheelStopper(t)}},mounted:function(){this.setWheelStopper(this.noWheel)},deactivated:function(){this.setWheelStopper(!1)},activated:function(){this.setWheelStopper(this.noWheel)},beforeDestroy:function(){this.setWheelStopper(!1)},methods:{setWheelStopper:function(t){var e=this.$el;fr(t,e,"focus",this.onWheelFocus),fr(t,e,"blur",this.onWheelBlur),t||hr(document,"wheel",this.stopWheel)},onWheelFocus:function(){dr(document,"wheel",this.stopWheel)},onWheelBlur:function(){hr(document,"wheel",this.stopWheel)},stopWheel:function(t){t.preventDefault(),Ve(this.$el)}},render:function(t){return t("input",{ref:"input",class:this.computedClass,attrs:this.computedAttrs,domProps:{value:this.localValue},on:this.computedListeners})}}),El=Dt({components:{BFormInput:Al,BInput:Al}}),Vl=t.extend({name:"BFormRadioGroup",mixins:[ma,Us,Js,As,qs,Ks],provide:function(){return{bvRadioGroup:this}},props:{checked:{default:null}},data:function(){return{localChecked:this.checked}},computed:{isRadioGroup:function(){return!0}}}),Nl=Dt({components:{BFormRadio:Zs,BRadio:Zs,BFormRadioGroup:Vl,BRadioGroup:Vl}}),Ll=_i.LEFT,Ml=_i.RIGHT,Rl=_i.UP,Hl=_i.DOWN,zl=t.extend({name:"BVFormRatingStar",mixins:[Ke],props:{rating:{type:Number,default:0},star:{type:Number,default:0},focused:{type:Boolean,default:!1},variant:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},hasClear:{type:Boolean,default:!1}},methods:{onClick:function(t){this.disabled||this.readonly||(t.preventDefault(),this.$emit("selected",this.star))}},render:function(t){var e=this.rating,i=this.star,n=this.focused,a=this.hasClear,r=this.variant,o=this.disabled,s=this.readonly,l=a?0:1,u=e>=i?"full":e>=i-.5?"half":"empty",c={variant:r,disabled:o,readonly:s};return t("span",{staticClass:"b-rating-star",class:{focused:n&&e===i||!Ht(e)&&i===l,"b-rating-star-empty":"empty"===u,"b-rating-star-half":"half"===u,"b-rating-star-full":"full"===u},attrs:{tabindex:o||s?null:"-1"},on:{click:this.onClick}},[t("span",{staticClass:"b-rating-icon"},[this.normalizeSlot(u,c)])])}}),jl=function(t){return ai(3,Ht(t,5))},Gl=function(t,e,i){return ai(ni(t,i),e)},Wl=t.extend({name:"BFormRating",components:{BIconStar:vn,BIconStarHalf:bn,BIconStarFill:gn,BIconX:yn},mixins:[ma],model:{prop:"value",event:"change"},props:{value:{type:[Number,String],default:null},stars:{type:[Number,String],default:5,validator:function(t){return Ht(t)>=3}},variant:{type:String,default:function(){return Nt("BFormRating","variant")}},color:{type:String,default:function(){return Nt("BFormRating","color")}},showValue:{type:Boolean,default:!1},showValueMax:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{type:String},name:{type:String},form:{type:String},noBorder:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},precision:{type:[Number,String],default:null},iconEmpty:{type:String,default:"star"},iconHalf:{type:String,default:"star-half"},iconFull:{type:String,default:"star-fill"},iconClear:{type:String,default:"x"},locale:{type:[String,Array]},showClear:{type:Boolean,default:!1}},data:function(){var t=zt(this.value,null),e=jl(this.stars);return{localValue:rt(t)?null:Gl(t,0,e),hasFocus:!1}},computed:{computedStars:function(){return jl(this.stars)},computedRating:function(){var t=zt(this.localValue,0),e=Ht(this.precision,3);return Gl(zt(t.toFixed(e)),0,this.computedStars)},computedLocale:function(){var t=$(this.locale).filter(mt);return new Intl.NumberFormat(t).resolvedOptions().locale},isInteractive:function(){return!this.disabled&&!this.readonly},isRTL:function(){return pa(this.computedLocale)},formattedRating:function(){var t=Ht(this.precision),e=this.showValueMax,i=this.computedLocale,n={notation:"standard",minimumFractionDigits:isNaN(t)?0:t,maximumFractionDigits:isNaN(t)?3:t},a=this.computedStars.toLocaleString(i),r=this.localValue;return r=rt(r)?e?"-":"":r.toLocaleString(i,n),e?"".concat(r,"/").concat(a):r}},watch:{value:function(t,e){if(t!==e){var i=zt(t,null);this.localValue=rt(i)?null:Gl(i,0,this.computedStars)}},localValue:function(t,e){t!==e&&t!==(this.value||0)&&this.$emit("change",t||null)},disabled:function(t){t&&(this.hasFocus=!1,this.blur())}},methods:{focus:function(){this.disabled||Ee(this.$el)},blur:function(){this.disabled||Ve(this.$el)},onKeydown:function(t){var e=t.keyCode;if(this.isInteractive&&x([Ll,Hl,Ml,Rl],e)){t.preventDefault();var i=Ht(this.localValue,0),n=this.showClear?0:1,a=this.computedStars,r=this.isRTL?-1:1;e===Ll?this.localValue=Gl(i-r,n,a)||null:e===Ml?this.localValue=Gl(i+r,n,a):e===Hl?this.localValue=Gl(i-1,n,a)||null:e===Rl&&(this.localValue=Gl(i+1,n,a))}},onSelected:function(t){this.isInteractive&&(this.localValue=t)},onFocus:function(t){this.hasFocus=!!this.isInteractive&&"focus"===t.type},renderIcon:function(t){return this.$createElement(Tn,{props:{icon:t,variant:this.disabled||this.color?null:this.variant||null}})},iconEmptyFn:function(){return this.renderIcon(this.iconEmpty)},iconHalfFn:function(){return this.renderIcon(this.iconHalf)},iconFullFn:function(){return this.renderIcon(this.iconFull)},iconClearFn:function(){return this.$createElement(Tn,{props:{icon:this.iconClear}})}},render:function(t){var e,i=this,n=this.disabled,a=this.readonly,o=this.size,s=this.name,l=this.form,u=this.inline,c=this.variant,d=this.color,h=this.noBorder,f=this.hasFocus,p=this.computedRating,m=this.computedStars,v=this.formattedRating,g=this.showClear,b=this.isRTL,y=this.isInteractive,S=this.$scopedSlots,T=[];if(g&&!n&&!a){var w=t("span",{staticClass:"b-rating-icon"},[(S["icon-clear"]||this.iconClearFn)()]);T.push(t("span",{staticClass:"b-rating-star b-rating-star-clear flex-grow-1",class:{focused:f&&0===p},attrs:{tabindex:y?"-1":null},on:{click:function(){return i.onSelected(null)}},key:"clear"},[w]))}for(var B=0;B1&&void 0!==arguments[1]?arguments[1]:null;if(N(t)){var i=bt(t,this.valueField),n=bt(t,this.textField),a=bt(t,this.optionsField,null);return rt(a)?{value:at(i)?e||n:i,text:String(at(n)?e:n),html:bt(t,this.htmlField),disabled:Boolean(bt(t,this.disabledField))}:{label:String(bt(t,this.labelField)||n),options:this.normalizeOptions(a)}}return{value:e||t,text:String(t),disabled:!1}}}},ql={value:{required:!0},disabled:{type:Boolean,default:!1}},Kl=t.extend({name:"BFormSelectOption",functional:!0,props:ql,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=i.value;return t("option",je(n,{attrs:{disabled:i.disabled},domProps:{value:r}}),a)}}),Xl=t.extend({name:"BFormSelectOptionGroup",mixins:[Ke,As],props:{label:{type:String,required:!0}},render:function(t){var e=this.formOptions.map((function(e,i){var n=e.value,a=e.text,r=e.html,o=e.disabled;return t(Kl,{attrs:{value:n,disabled:o},domProps:An(r,a),key:"option_".concat(i)})}));return t("optgroup",{attrs:{label:this.label}},[this.normalizeSlot("first"),e,this.normalizeSlot("default")])}}),Zl=t.extend({name:"BFormSelect",mixins:[ma,Ke,Us,qs,Ks,fl,Yl],model:{prop:"value",event:"input"},props:{value:{},multiple:{type:Boolean,default:!1},selectSize:{type:Number,default:0},ariaInvalid:{type:[Boolean,String],default:!1}},data:function(){return{localValue:this.value}},computed:{computedSelectSize:function(){return this.plain||0!==this.selectSize?this.selectSize:null},inputClass:function(){return[this.plain?"form-control":"custom-select",this.size&&this.plain?"form-control-".concat(this.size):null,this.size&&!this.plain?"custom-select-".concat(this.size):null,this.stateClass]},computedAriaInvalid:function(){return!0===this.ariaInvalid||"true"===this.ariaInvalid||"is-invalid"===this.stateClass?"true":null}},watch:{value:function(t){this.localValue=t},localValue:function(){this.$emit("input",this.localValue)}},methods:{focus:function(){Ee(this.$refs.input)},blur:function(){Ve(this.$refs.input)},onChange:function(t){var e=this,i=t.target,n=C(i.options).filter((function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));this.localValue=i.multiple?n:n[0],this.$nextTick((function(){e.$emit("change",e.localValue)}))}},render:function(t){var e=this.name,i=this.disabled,n=this.required,a=this.computedSelectSize,r=this.localValue,o=this.formOptions.map((function(e,i){var n=e.value,a=e.label,r=e.options,o=e.disabled,s="option_".concat(i);return k(r)?t(Xl,{props:{label:a,options:r},key:s}):t(Kl,{props:{value:n,disabled:o},domProps:An(e.html,e.text),key:s})}));return t("select",{class:this.inputClass,attrs:{id:this.safeId(),name:e,form:this.form||null,multiple:this.multiple||null,size:a,disabled:i,required:n,"aria-required":n?"true":null,"aria-invalid":this.computedAriaInvalid},on:{change:this.onChange},directives:[{name:"model",value:r}],ref:"input"},[this.normalizeSlot("first"),o,this.normalizeSlot("default")])}}),Jl=Dt({components:{BFormSelect:Zl,BFormSelectOption:Kl,BFormSelectOptionGroup:Xl,BSelect:Zl,BSelectOption:Kl,BSelectOptionGroup:Xl}}),Ql="BFormSpinbutton",tu=_i.UP,eu=_i.DOWN,iu=_i.HOME,nu=_i.END,au=_i.PAGEUP,ru=_i.PAGEDOWN,ou=t.extend({name:Ql,mixins:[Oi,ma,Ke],inheritAttrs:!1,props:{value:{type:Number,default:null},min:{type:[Number,String],default:1},max:{type:[Number,String],default:100},step:{type:[Number,String],default:1},wrap:{type:Boolean,default:!1},formatterFn:{type:Function},size:{type:String},placeholder:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},name:{type:String},form:{type:String},state:{type:Boolean,default:null},inline:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},ariaLabel:{type:String},ariaControls:{type:String},labelDecrement:{type:String,default:function(){return Nt(Ql,"labelDecrement")}},labelIncrement:{type:String,default:function(){return Nt(Ql,"labelIncrement")}},locale:{type:[String,Array]},repeatDelay:{type:[Number,String],default:500},repeatInterval:{type:[Number,String],default:100},repeatThreshold:{type:[Number,String],default:10},repeatStepMultiplier:{type:[Number,String],default:4}},data:function(){return{localValue:zt(this.value,null),hasFocus:!1}},computed:{spinId:function(){return this.safeId()},computedInline:function(){return this.inline&&!this.vertical},computedReadonly:function(){return this.readonly&&!this.disabled},computedRequired:function(){return this.required&&!this.computedReadonly&&!this.disabled},computedStep:function(){return zt(this.step,1)},computedMin:function(){return zt(this.min,1)},computedMax:function(){var t=zt(this.max,100),e=this.computedStep,i=this.computedMin;return si((t-i)/e)*e+i},computedDelay:function(){var t=Ht(this.repeatDelay,0);return t>0?t:500},computedInterval:function(){var t=Ht(this.repeatInterval,0);return t>0?t:100},computedThreshold:function(){return ai(Ht(this.repeatThreshold,10),1)},computedStepMultiplier:function(){return ai(Ht(this.repeatStepMultiplier,4),1)},computedPrecision:function(){var t=this.computedStep;return si(t)===t?0:(t.toString().split(".")[1]||"").length},computedMultiplier:function(){return li(10,this.computedPrecision||0)},valueAsFixed:function(){var t=this.localValue;return rt(t)?"":t.toFixed(this.computedPrecision)},computedLocale:function(){var t=$(this.locale).filter(mt);return new Intl.NumberFormat(t).resolvedOptions().locale},computedRTL:function(){return pa(this.computedLocale)},defaultFormatter:function(){var t=this.computedPrecision;return new Intl.NumberFormat(this.computedLocale,{style:"decimal",useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:t,maximumFractionDigits:t,notation:"standard"}).format},computedFormatter:function(){return st(this.formatterFn)?this.formatterFn:this.defaultFormatter},computedAttrs:function(){return s(s({},this.bvAttrs),{},{role:"group",lang:this.computedLocale,tabindex:this.disabled?null:"-1",title:this.ariaLabel})},computedSpinAttrs:function(){var t=this.spinId,e=this.localValue,i=this.computedRequired,n=this.disabled,a=this.state,r=this.computedFormatter,o=!rt(e);return s(s({dir:this.computedRTL?"rtl":"ltr"},this.bvAttrs),{},{id:t,role:"spinbutton",tabindex:n?null:"0","aria-live":"off","aria-label":this.ariaLabel||null,"aria-controls":this.ariaControls||null,"aria-invalid":!1===a||!o&&i?"true":null,"aria-required":i?"true":null,"aria-valuemin":Jt(this.computedMin),"aria-valuemax":Jt(this.computedMax),"aria-valuenow":o?e:null,"aria-valuetext":o?r(e):null})}},watch:{value:function(t){this.localValue=zt(t,null)},localValue:function(t){this.$emit("input",t)},disabled:function(t){t&&this.clearRepeat()},readonly:function(t){t&&this.clearRepeat()}},created:function(){this.$_autoDelayTimer=null,this.$_autoRepeatTimer=null,this.$_keyIsDown=!1},beforeDestroy:function(){this.clearRepeat()},deactivated:function(){this.clearRepeat()},methods:{focus:function(){this.disabled||Ee(this.$refs.spinner)},blur:function(){this.disabled||Ve(this.$refs.spinner)},emitChange:function(){this.$emit("change",this.localValue)},stepValue:function(t){var e=this.localValue;if(!this.disabled&&!rt(e)){var i=this.computedStep*t,n=this.computedMin,a=this.computedMax,r=this.computedMultiplier,o=this.wrap;e=ui((e-n)/i)*i+n+i,e=ui(e*r)/r,this.localValue=e>a?o?n:a:e0&&void 0!==arguments[0]?arguments[0]:1,e=this.localValue;rt(e)?this.localValue=this.computedMin:this.stepValue(1*t)},stepDown:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.localValue;rt(e)?this.localValue=this.wrap?this.computedMax:this.computedMin:this.stepValue(-1*t)},onKeydown:function(t){var e=t.keyCode,i=t.altKey,n=t.ctrlKey,a=t.metaKey;if(!(this.disabled||this.readonly||i||n||a)&&x([tu,eu,iu,nu,au,ru],e)){if(t.preventDefault(),this.$_keyIsDown)return;this.resetTimers(),x([tu,eu],e)?(this.$_keyIsDown=!0,e===tu?this.handleStepRepeat(t,this.stepUp):e===eu&&this.handleStepRepeat(t,this.stepDown)):e===au?this.stepUp(this.computedStepMultiplier):e===ru?this.stepDown(this.computedStepMultiplier):e===iu?this.localValue=this.computedMin:e===nu&&(this.localValue=this.computedMax)}},onKeyup:function(t){var e=t.keyCode,i=t.altKey,n=t.ctrlKey,a=t.metaKey;this.disabled||this.readonly||i||n||a||x([tu,eu,iu,nu,au,ru],e)&&(this.resetTimers(),this.$_keyIsDown=!1,t.preventDefault(),this.emitChange())},handleStepRepeat:function(t,e){var i=this,n=t||{},a=n.type,r=n.button;if(!this.disabled&&!this.readonly){if("mousedown"===a&&r)return;this.resetTimers(),e(1);var o=this.computedThreshold,s=this.computedStepMultiplier,l=this.computedDelay,u=this.computedInterval;this.$_autoDelayTimer=setTimeout((function(){var t=0;i.$_autoRepeatTimer=setInterval((function(){e(t0&&i.indexOf(t)===e}))},vu=function(t){return ut(t)?t:ht(t)&&t.target.value||""},gu=t.extend({name:uu,mixins:[ma,Ke],model:{prop:"value",event:"input"},props:{inputId:{type:String},placeholder:{type:String,default:function(){return Nt(uu,"placeholder")}},disabled:{type:Boolean,default:!1},name:{type:String},form:{type:String},autofocus:{type:Boolean,default:!1},state:{type:Boolean,default:null},size:{type:String},inputType:{type:String,default:"text",validator:function(t){return x(cu,t)}},inputClass:{type:[String,Array,Object]},inputAttrs:{type:Object,default:function(){return{}}},addButtonText:{type:String,default:function(){return Nt(uu,"addButtonText")}},addButtonVariant:{type:String,default:function(){return Nt(uu,"addButtonVariant")}},tagVariant:{type:String,default:function(){return Nt(uu,"tagVariant")}},tagClass:{type:[String,Array,Object]},tagPills:{type:Boolean,default:!1},tagRemoveLabel:{type:String,default:function(){return Nt(uu,"tagRemoveLabel")}},tagRemovedLabel:{type:String,default:function(){return Nt(uu,"tagRemovedLabel")}},tagValidator:{type:Function},duplicateTagText:{type:String,default:function(){return Nt(uu,"duplicateTagText")}},invalidTagText:{type:String,default:function(){return Nt(uu,"invalidTagText")}},separator:{type:[String,Array]},removeOnDelete:{type:Boolean,default:!1},addOnChange:{type:Boolean,default:!1},noAddOnEnter:{type:Boolean,default:!1},noOuterFocus:{type:Boolean,default:!1},value:{type:Array,default:function(){return[]}}},data:function(){return{hasFocus:!1,newTag:"",tags:[],removedTags:[],tagsState:{all:[],valid:[],invalid:[],duplicate:[]}}},computed:{computedInputId:function(){return this.inputId||this.safeId("__input__")},computedInputType:function(){return x(cu,this.inputType)?this.inputType:"text"},computedInputAttrs:function(){return s(s({},this.inputAttrs),{},{id:this.computedInputId,value:this.newTag,disabled:this.disabled||null,form:this.form||null})},computedInputHandlers:function(){return{input:this.onInputInput,change:this.onInputChange,keydown:this.onInputKeydown}},computedSeparator:function(){return $(this.separator).filter(ut).filter(mt).join("")},computedSeparatorRegExp:function(){var t=this.computedSeparator;return t?new RegExp("[".concat(Zt(t).replace(du,"\\s"),"]+")):null},computedJoiner:function(){var t=this.computedSeparator.charAt(0);return" "!==t?"".concat(t," "):t},disableAddButton:function(){var t=this,e=Qt(this.newTag);return""===e||!this.splitTags(e).some((function(e){return!x(t.tags,e)&&t.validateTag(e)}))},duplicateTags:function(){return this.tagsState.duplicate},hasDuplicateTags:function(){return this.duplicateTags.length>0},invalidTags:function(){return this.tagsState.invalid},hasInvalidTags:function(){return this.invalidTags.length>0}},watch:{value:function(t){this.tags=mu(t)},tags:function(t,e){qn(t,this.value)||this.$emit("input",t),qn(t,e)||(t=$(t).filter(mt),e=$(e).filter(mt),this.removedTags=e.filter((function(e){return!x(t,e)})))},tagsState:function(t,e){qn(t,e)||this.$emit("tag-state",t.valid,t.invalid,t.duplicate)}},created:function(){this.tags=mu(this.value)},mounted:function(){this.handleAutofocus()},activated:function(){this.handleAutofocus()},methods:{addTag:function(t){if(t=ut(t)?t:this.newTag,!this.disabled&&""!==Qt(t)){var e=this.parseTags(t);if(e.valid.length>0||0===e.all.length)if(be(this.getInput(),"select"))this.newTag="";else{var i=[].concat(y(e.invalid),y(e.duplicate));this.newTag=e.all.filter((function(t){return x(i,t)})).join(this.computedJoiner).concat(i.length>0?this.computedJoiner.charAt(0):"")}e.valid.length>0&&(this.tags=$(this.tags,e.valid)),this.tagsState=e,this.focus()}},removeTag:function(t){var e=this;this.disabled||(this.tags=this.tags.filter((function(e){return e!==t})),this.$nextTick((function(){e.focus()})))},onInputInput:function(t){if(!(this.disabled||ht(t)&&t.target.composing)){var e=vu(t),i=this.computedSeparatorRegExp;this.newTag!==e&&(this.newTag=e),e=Jt(e).replace(Gt,""),i&&i.test(e.slice(-1))?this.addTag():this.tagsState=""===e?{all:[],valid:[],invalid:[],duplicate:[]}:this.parseTags(e)}},onInputChange:function(t){if(!this.disabled&&this.addOnChange){var e=vu(t);this.newTag!==e&&(this.newTag=e),this.addTag()}},onInputKeydown:function(t){if(!this.disabled&&ht(t)){var e=t.keyCode,i=t.target.value||"";this.noAddOnEnter||e!==hu?!this.removeOnDelete||e!==fu&&e!==pu||""!==i||(t.preventDefault(),this.tags=this.tags.slice(0,-1)):(t.preventDefault(),this.addTag())}},onClick:function(t){var e=this;!this.disabled&&ht(t)&&t.target===t.currentTarget&&this.$nextTick((function(){e.focus()}))},onFocusin:function(){this.hasFocus=!0},onFocusout:function(){this.hasFocus=!1},handleAutofocus:function(){var t=this;this.$nextTick((function(){se((function(){t.autofocus&&!t.disabled&&t.focus()}))}))},focus:function(){this.disabled||Ee(this.getInput())},blur:function(){this.disabled||Ve(this.getInput())},splitTags:function(t){t=Jt(t);var e=this.computedSeparatorRegExp;return(e?t.split(e):[t]).map(Qt).filter(mt)},parseTags:function(t){var e=this,i=this.splitTags(t),n={all:i,valid:[],invalid:[],duplicate:[]};return i.forEach((function(t){x(e.tags,t)||x(n.valid,t)?x(n.duplicate,t)||n.duplicate.push(t):e.validateTag(t)?n.valid.push(t):x(n.invalid,t)||n.invalid.push(t)})),n},validateTag:function(t){var e=this.tagValidator;return!st(e)||e(t)},getInput:function(){return ge("#".concat(this.computedInputId),this.$el)},defaultRender:function(t){var e=t.tags,i=t.addTag,n=t.removeTag,a=t.inputType,r=t.inputAttrs,o=t.inputHandlers,l=t.inputClass,u=t.tagClass,c=t.tagVariant,d=t.tagPills,h=t.tagRemoveLabel,f=t.invalidTagText,p=t.duplicateTagText,m=t.isInvalid,v=t.isDuplicate,g=t.disabled,b=t.placeholder,y=t.addButtonText,S=t.addButtonVariant,T=t.disableAddButton,w=this.$createElement,B=e.map((function(t){return t=Jt(t),w(lu,{key:"li-tag__".concat(t),staticClass:"mt-1 mr-1",class:u,props:{tag:"li",title:t,disabled:g,variant:c,pill:d,removeLabel:h},on:{remove:function(){return n(t)}}},t)})),C=f&&m?this.safeId("__invalid_feedback__"):null,k=p&&v?this.safeId("__duplicate_feedback__"):null,x=[r["aria-describedby"],C,k].filter(mt).join(" "),D=w("input",{ref:"input",directives:[{name:"model",value:r.value}],staticClass:"b-form-tags-input w-100 flex-grow-1 p-0 m-0 bg-transparent border-0",class:l,style:{outline:0,minWidth:"5rem"},attrs:s(s({},r),{},{"aria-describedby":x||null,type:a,placeholder:b||null}),domProps:{value:r.value},on:o}),P=w(Ki,{ref:"button",staticClass:"b-form-tags-button py-0",class:{invisible:T},style:{fontSize:"90%"},props:{variant:S,disabled:T},on:{click:function(){return i()}}},[this.normalizeSlot("add-button-text")||y]),_=this.safeId("__TAG__LIST__"),F=w("li",{key:"__li-input__",staticClass:"flex-grow-1 mt-1",attrs:{role:"none","aria-live":"off","aria-controls":_}},[w("div",{staticClass:"d-flex",attrs:{role:"group"}},[D,P])]),I=w("ul",{key:"_tags_list_",staticClass:"list-unstyled mt-n1 mb-0 d-flex flex-wrap align-items-center",attrs:{id:_}},$(B,F)),O=w();if(f||p){var A=this.computedJoiner,E=w();C&&(E=w(Ms,{key:"_tags_invalid_feedback_",props:{id:C,forceShow:!0}},[this.invalidTagText,": ",this.invalidTags.join(A)]));var V=w();k&&(V=w(Ns,{key:"_tags_duplicate_feedback_",props:{id:k}},[this.duplicateTagText,": ",this.duplicateTags.join(A)])),O=w("div",{key:"_tags_feedback_",attrs:{"aria-live":"polite","aria-atomic":"true"}},[E,V])}return[I,O]}},render:function(t){var e=this,i={tags:this.tags.slice(),removeTag:this.removeTag,addTag:this.addTag,inputType:this.computedInputType,inputAttrs:this.computedInputAttrs,inputHandlers:this.computedInputHandlers,inputId:this.computedInputId,invalidTags:this.invalidTags.slice(),isInvalid:this.hasInvalidTags,duplicateTags:this.duplicateTags.slice(),isDuplicate:this.hasDuplicateTags,disableAddButton:this.disableAddButton,state:this.state,separator:this.separator,disabled:this.disabled,size:this.size,placeholder:this.placeholder,inputClass:this.inputClass,tagRemoveLabel:this.tagRemoveLabel,tagVariant:this.tagVariant,tagPills:this.tagPills,tagClass:this.tagClass,addButtonText:this.addButtonText,addButtonVariant:this.addButtonVariant,invalidTagText:this.invalidTagText,duplicateTagText:this.duplicateTagText},n=this.normalizeSlot("default",i)||this.defaultRender(i),a=t("output",{staticClass:"sr-only",attrs:{id:this.safeId("_selected-tags_"),role:"status",for:this.computedInputId,"aria-live":this.hasFocus?"polite":"off","aria-atomic":"true","aria-relevant":"additions text"}},this.tags.join(", ")),o=t("div",{staticClass:"sr-only",attrs:{id:this.safeId("_removed-tags_"),role:"status","aria-live":this.hasFocus?"assertive":"off","aria-atomic":"true"}},this.removedTags.length>0?"(".concat(this.tagRemovedLabel,") ").concat(this.removedTags.join(", ")):""),s=t();return this.name&&!this.disabled&&(s=this.tags.map((function(i){return t("input",{key:i,attrs:{type:"hidden",value:i,name:e.name,form:e.form||null}})}))),t("div",{staticClass:"b-form-tags form-control h-auto",class:r({focus:this.hasFocus&&!this.noOuterFocus&&!this.disabled,disabled:this.disabled,"is-valid":!0===this.state,"is-invalid":!1===this.state},"form-control-".concat(this.size),this.size),attrs:{id:this.safeId(),role:"group",tabindex:this.disabled||this.noOuterFocus?null:"-1","aria-describedby":this.safeId("_selected_")},on:{focusin:this.onFocusin,focusout:this.onFocusout,click:this.onClick}},$(a,o,n,s))}}),bu=Dt({components:{BFormTags:gu,BTags:gu,BFormTag:lu,BTag:lu}}),yu=t.extend({name:"BFormTextarea",directives:{"b-visible":Xa},mixins:[Ai,ma,kr,Us,qs,Ks,Fl,_l,Il],props:{rows:{type:[Number,String],default:2},maxRows:{type:[Number,String]},wrap:{type:String,default:"soft"},noResize:{type:Boolean,default:!1},noAutoShrink:{type:Boolean,default:!1}},data:function(){return{heightInPx:null}},computed:{computedStyle:function(){var t={resize:!this.computedRows||this.noResize?"none":null};return this.computedRows||(t.height=this.heightInPx,t.overflowY="scroll"),t},computedMinRows:function(){return ai(Ht(this.rows,2),2)},computedMaxRows:function(){return ai(this.computedMinRows,Ht(this.maxRows,0))},computedRows:function(){return this.computedMinRows===this.computedMaxRows?this.computedMinRows:null},computedAttrs:function(){var t=this.disabled,e=this.required;return{id:this.safeId(),name:this.name||null,form:this.form||null,disabled:t,placeholder:this.placeholder||null,required:e,autocomplete:this.autocomplete||null,readonly:this.readonly||this.plaintext,rows:this.computedRows,wrap:this.wrap||null,"aria-required":this.required?"true":null,"aria-invalid":this.computedAriaInvalid}},computedListeners:function(){return s(s({},this.bvListeners),{},{input:this.onInput,change:this.onChange,blur:this.onBlur})}},watch:{localValue:function(){this.setHeight()}},mounted:function(){this.setHeight()},methods:{visibleCallback:function(t){t&&this.$nextTick(this.setHeight)},setHeight:function(){var t=this;this.$nextTick((function(){se((function(){t.heightInPx=t.computeHeight()}))}))},computeHeight:function(){if(this.$isServer||!rt(this.computedRows))return null;var t=this.$el;if(!fe(t))return null;var e=_e(t),i=zt(e.lineHeight,1),n=zt(e.borderTopWidth,0)+zt(e.borderBottomWidth,0),a=zt(e.paddingTop,0)+zt(e.paddingBottom,0),r=n+a,o=i*this.computedMinRows+r,s=t.style.height||e.height;t.style.height="auto";var l=t.scrollHeight;t.style.height=s;var u=ai((l-a)/i,2),c=ni(ai(u,this.computedMinRows),this.computedMaxRows),d=ai(oi(c*i+r),o);return this.noAutoShrink&&zt(s,0)>d?s:"".concat(d,"px")}},render:function(t){return t("textarea",{ref:"input",class:this.computedClass,style:this.computedStyle,directives:[{name:"b-visible",value:this.visibleCallback,modifiers:{640:!0}}],attrs:this.computedAttrs,domProps:{value:this.localValue},on:this.computedListeners})}}),Su=Dt({components:{BFormTextarea:yu,BTextarea:yu}}),Tu=_i.LEFT,wu=_i.RIGHT,Bu=/^([0-1]?[0-9]|2[0-3]):[0-5]?[0-9](:[0-5]?[0-9])?$/,Cu=function(t){return Nt("BTime",t)||Nt("BFormSpinbutton",t)},ku=function(t){return"00".concat(t||"").slice(-2)},xu=function(t){t=Jt(t);var e=null,i=null,n=null;if(Bu.test(t)){var a=b(t.split(":").map((function(t){return Ht(t,null)})),3);e=a[0],i=a[1],n=a[2]}return{hours:ot(e)?null:e,minutes:ot(i)?null:i,seconds:ot(n)?null:n,ampm:ot(e)||e<12?0:1}},$u=t.extend({name:"BTime",mixins:[ma,Ke],model:{prop:"value",event:"input"},props:{value:{type:String,default:""},showSeconds:{type:Boolean,default:!1},hour12:{type:Boolean,default:null},locale:{type:[String,Array]},ariaLabelledby:{type:String},secondsStep:{type:[Number,String],default:1},minutesStep:{type:[Number,String],default:1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},labelNoTimeSelected:{type:String,default:function(){return Nt("BTime","labelNoTimeSelected")}},labelSelected:{type:String,default:function(){return Nt("BTime","labelSelected")}},labelHours:{type:String,default:function(){return Nt("BTime","labelHours")}},labelMinutes:{type:String,default:function(){return Nt("BTime","labelMinutes")}},labelSeconds:{type:String,default:function(){return Nt("BTime","labelSeconds")}},labelAmpm:{type:String,default:function(){return Nt("BTime","labelAmpm")}},labelAm:{type:String,default:function(){return Nt("BTime","labelAm")}},labelPm:{type:String,default:function(){return Nt("BTime","labelPm")}},labelIncrement:{type:String,default:function(){return Cu("labelIncrement")}},labelDecrement:{type:String,default:function(){return Cu("labelDecrement")}},hidden:{type:Boolean,default:!1}},data:function(){var t=xu(this.value||"");return{modelHours:t.hours,modelMinutes:t.minutes,modelSeconds:t.seconds,modelAmpm:t.ampm,isLive:!1}},computed:{computedHMS:function(){return function(t){var e=t.hours,i=t.minutes,n=t.seconds,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(rt(e)||rt(i)||a&&rt(n))return"";var r=[e,i,a?n:0];return r.map(ku).join(":")}({hours:this.modelHours,minutes:this.modelMinutes,seconds:this.modelSeconds},this.showSeconds)},resolvedOptions:function(){var t=$(this.locale).filter(mt),e={hour:"numeric",minute:"numeric",second:"numeric"};ot(this.hour12)||(e.hour12=!!this.hour12);var i=new Intl.DateTimeFormat(t,e).resolvedOptions(),n=i.hour12||!1,a=i.hourCycle||(n?"h12":"h23");return{locale:i.locale,hour12:n,hourCycle:a}},computedLocale:function(){return this.resolvedOptions.locale},computedLang:function(){return(this.computedLocale||"").replace(/-u-.*$/,"")},computedRTL:function(){return pa(this.computedLang)},computedHourCycle:function(){return this.resolvedOptions.hourCycle},is12Hour:function(){return!!this.resolvedOptions.hour12},context:function(){return{locale:this.computedLocale,isRTL:this.computedRTL,hourCycle:this.computedHourCycle,hour12:this.is12Hour,hours:this.modelHours,minutes:this.modelMinutes,seconds:this.showSeconds?this.modelSeconds:0,value:this.computedHMS,formatted:this.formattedTimeString}},valueId:function(){return this.safeId()||null},computedAriaLabelledby:function(){return[this.ariaLabelledby,this.valueId].filter(mt).join(" ")||null},timeFormatter:function(){var t={hour12:this.is12Hour,hourCycle:this.computedHourCycle,hour:"numeric",minute:"numeric",timeZone:"UTC"};return this.showSeconds&&(t.second="numeric"),ta(this.computedLocale,t)},numberFormatter:function(){return new Intl.NumberFormat(this.computedLocale,{style:"decimal",minimumIntegerDigits:2,minimumFractionDigits:0,maximumFractionDigits:0,notation:"standard"}).format},formattedTimeString:function(){var t=this.modelHours,e=this.modelMinutes,i=this.showSeconds&&this.modelSeconds||0;return this.computedHMS?this.timeFormatter(Zn(Date.UTC(0,0,1,t,e,i))):this.labelNoTimeSelected||" "},spinScopedSlots:function(){var t=this.$createElement;return{increment:function(e){var i=e.hasFocus;return t(un,{props:{scale:i?1.5:1.25},attrs:{"aria-hidden":"true"}})},decrement:function(e){var i=e.hasFocus;return t(un,{props:{flipV:!0,scale:i?1.5:1.25},attrs:{"aria-hidden":"true"}})}}}},watch:{value:function(t,e){if(t!==e&&!qn(xu(t),xu(this.computedHMS))){var i=xu(t),n=i.hours,a=i.minutes,r=i.seconds,o=i.ampm;this.modelHours=n,this.modelMinutes=a,this.modelSeconds=r,this.modelAmpm=o}},computedHMS:function(t,e){t!==e&&this.$emit("input",t)},context:function(t,e){qn(t,e)||this.$emit("context",t)},modelAmpm:function(t,e){var i=this;if(t!==e){var n=rt(this.modelHours)?0:this.modelHours;this.$nextTick((function(){0===t&&n>11?i.modelHours=n-12:1===t&&n<12&&(i.modelHours=n+12)}))}},modelHours:function(t,e){t!==e&&(this.modelAmpm=t>11?1:0)}},created:function(){var t=this;this.$nextTick((function(){t.$emit("context",t.context)}))},mounted:function(){this.setLive(!0)},activated:function(){this.setLive(!0)},deactivated:function(){this.setLive(!1)},beforeDestroy:function(){this.setLive(!1)},methods:{focus:function(){this.disabled||Ee(this.$refs.spinners[0])},blur:function(){if(!this.disabled){var t=ce();Se(this.$el,t)&&Ve(t)}},formatHours:function(t){var e=this.computedHourCycle;return t=0===(t=this.is12Hour&&t>12?t-12:t)&&"h12"===e?12:0===t&&"h24"===e?24:12===t&&"h11"===e?0:t,this.numberFormatter(t)},formatMinutes:function(t){return this.numberFormatter(t)},formatSeconds:function(t){return this.numberFormatter(t)},formatAmpm:function(t){return 0===t?this.labelAm:1===t?this.labelPm:""},setHours:function(t){this.modelHours=t},setMinutes:function(t){this.modelMinutes=t},setSeconds:function(t){this.modelSeconds=t},setAmpm:function(t){this.modelAmpm=t},onSpinLeftRight:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.type,i=t.keyCode;if(!this.disabled&&"keydown"===e&&(i===Tu||i===wu)){t.preventDefault(),t.stopPropagation();var n=this.$refs.spinners||[],a=n.map((function(t){return!!t.hasFocus})).indexOf(!0);a=(a+=i===Tu?-1:1)>=n.length?0:a<0?n.length-1:a,Ee(n[a])}},setLive:function(t){var e=this;t?this.$nextTick((function(){se((function(){e.isLive=!0}))})):this.isLive=!1}},render:function(t){var e=this;if(this.hidden)return t();var i=this.valueId,n=this.computedAriaLabelledby,a=[],r=function(n,r,o){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=e.safeId("_spinbutton_".concat(r,"_"))||null;return a.push(u),t(ou,{key:r,ref:"spinners",refInFor:!0,class:o,props:s({id:u,placeholder:"--",vertical:!0,required:!0,disabled:e.disabled,readonly:e.readonly,locale:e.computedLocale,labelIncrement:e.labelIncrement,labelDecrement:e.labelDecrement,wrap:!0,ariaControls:i,min:0},l),scopedSlots:e.spinScopedSlots,on:{change:n}})},o=function(){return t("div",{staticClass:"d-flex flex-column",class:{"text-muted":e.disabled||e.readonly},attrs:{"aria-hidden":"true"}},[t(cn,{props:{shiftV:4,scale:.5}}),t(cn,{props:{shiftV:-4,scale:.5}})])},l=[];l.push(r(this.setHours,"hours","b-time-hours",{value:this.modelHours,max:23,step:1,formatterFn:this.formatHours,ariaLabel:this.labelHours})),l.push(o()),l.push(r(this.setMinutes,"minutes","b-time-minutes",{value:this.modelMinutes,max:59,step:this.minutesStep||1,formatterFn:this.formatMinutes,ariaLabel:this.labelMinutes})),this.showSeconds&&(l.push(o()),l.push(r(this.setSeconds,"seconds","b-time-seconds",{value:this.modelSeconds,max:59,step:this.secondsStep||1,formatterFn:this.formatSeconds,ariaLabel:this.labelSeconds}))),this.is12Hour&&l.push(r(this.setAmpm,"ampm","b-time-ampm",{value:this.modelAmpm,max:1,formatterFn:this.formatAmpm,ariaLabel:this.labelAmpm,required:!1})),l=t("div",{staticClass:"d-flex align-items-center justify-content-center mx-auto",attrs:{role:"group",tabindex:this.disabled||this.readonly?null:"-1","aria-labelledby":n},on:{keydown:this.onSpinLeftRight,click:function(t){t.target===t.currentTarget&&e.focus()}}},l);var u=t("output",{staticClass:"form-control form-control-sm text-center",class:{disabled:this.disabled||this.readonly},attrs:{id:i,role:"status",for:a.filter(mt).join(" ")||null,tabindex:this.disabled?null:"-1","aria-live":this.isLive?"polite":"off","aria-atomic":"true"},on:{click:this.focus,focus:this.focus}},[t("bdi",this.formattedTimeString),this.computedHMS?t("span",{staticClass:"sr-only"}," (".concat(this.labelSelected,") ")):""]),c=t("header",{staticClass:"b-time-header",class:{"sr-only":this.hideHeader}},[u]),d=this.normalizeSlot("default");return d=d?t("footer",{staticClass:"b-time-footer"},d):t(),t("div",{staticClass:"b-time d-inline-flex flex-column text-center",attrs:{role:"group",lang:this.computedLang||null,"aria-labelledby":n||null,"aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly&&!this.disabled?"true":null}},[c,l,d])}}),Du="BFormTimepicker",Pu=function(t){return Nt(Du,t)||Nt("BTime",t)||Nt("BFormSpinbutton",t)},_u={props:s({value:{type:String,default:""},resetValue:{type:String,default:""},placeholder:{type:String},size:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},name:{type:String},form:{type:String},state:{type:Boolean,default:null},hour12:{type:Boolean,default:null},locale:{type:[String,Array]},showSeconds:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},secondsStep:{type:[Number,String],default:1},minutesStep:{type:[Number,String],default:1},buttonOnly:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"},nowButton:{type:Boolean,default:!1},labelNowButton:{type:String,default:function(){return Nt(Du,"labelNowButton")}},nowButtonVariant:{type:String,default:"outline-primary"},resetButton:{type:Boolean,default:!1},labelResetButton:{type:String,default:function(){return Nt(Du,"labelResetButton")}},resetButtonVariant:{type:String,default:"outline-danger"},noCloseButton:{type:Boolean,default:!1},labelCloseButton:{type:String,default:function(){return Nt(Du,"labelCloseButton")}},closeButtonVariant:{type:String,default:"outline-secondary"},labelSelected:{type:String,default:function(){return Pu("labelSelected")}},labelNoTimeSelected:{type:String,default:function(){return Pu("labelNoTimeSelected")}},labelHours:{type:String,default:function(){return Pu("labelHours")}},labelMinutes:{type:String,default:function(){return Pu("labelMinutes")}},labelSeconds:{type:String,default:function(){return Pu("labelSeconds")}},labelAmpm:{type:String,default:function(){return Pu("labelAmpm")}},labelAm:{type:String,default:function(){return Pu("labelAm")}},labelPm:{type:String,default:function(){return Pu("labelPm")}},labelIncrement:{type:String,default:function(){return Pu("labelIncrement")}},labelDecrement:{type:String,default:function(){return Pu("labelDecrement")}},menuClass:{type:[String,Array,Object]}},ol)},Fu=t.extend({name:Du,mixins:[ma,_u],model:{prop:"value",event:"input"},data:function(){return{localHMS:this.value||"",localLocale:null,isRTL:!1,formattedValue:"",isVisible:!1}},computed:{computedLang:function(){return(this.localLocale||"").replace(/-u-.*$/i,"")||null},timeProps:function(){return{hidden:!this.isVisible,value:this.localHMS,readonly:this.readonly,disabled:this.disabled,locale:this.locale,hour12:this.hour12,hideHeader:this.hideHeader,showSeconds:this.showSeconds,secondsStep:this.secondsStep,minutesStep:this.minutesStep,labelNoTimeSelected:this.labelNoTimeSelected,labelSelected:this.labelSelected,labelHours:this.labelHours,labelMinutes:this.labelMinutes,labelSeconds:this.labelSeconds,labelAmpm:this.labelAmpm,labelAm:this.labelAm,labelPm:this.labelPm,labelIncrement:this.labelIncrement,labelDecrement:this.labelDecrement}}},watch:{value:function(t){this.localHMS=t||""},localHMS:function(t){this.isVisible&&this.$emit("input",t||"")}},methods:{focus:function(){this.disabled||Ee(this.$refs.control)},blur:function(){this.disabled||Ve(this.$refs.control)},setAndClose:function(t){var e=this;this.localHMS=t,this.$nextTick((function(){e.$refs.control.hide(!0)}))},onInput:function(t){this.localHMS!==t&&(this.localHMS=t)},onContext:function(t){var e=t.isRTL,i=t.locale,n=t.value,a=t.formatted;this.isRTL=e,this.localLocale=i,this.formattedValue=a,this.localHMS=n||"",this.$emit("context",t)},onNowButton:function(){var t=new Date,e=[t.getHours(),t.getMinutes(),this.showSeconds?t.getSeconds():0].map((function(t){return"00".concat(t||"").slice(-2)})).join(":");this.setAndClose(e)},onResetButton:function(){this.setAndClose(this.resetValue)},onCloseButton:function(){this.$refs.control.hide(!0)},onShow:function(){this.isVisible=!0},onShown:function(){var t=this;this.$nextTick((function(){Ee(t.$refs.time),t.$emit("shown")}))},onHidden:function(){this.isVisible=!1,this.$emit("hidden")},defaultButtonFn:function(t){var e=t.isHovered,i=t.hasFocus;return this.$createElement(e||i?hn:dn,{attrs:{"aria-hidden":"true"}})}},render:function(t){var e=this.localHMS,i=this.disabled,n=this.readonly,a=ot(this.placeholder)?this.labelNoTimeSelected:this.placeholder,r=[];if(this.nowButton){var o=this.labelNowButton;r.push(t(Ki,{key:"now-btn",props:{size:"sm",disabled:i||n,variant:this.nowButtonVariant},attrs:{"aria-label":o||null},on:{click:this.onNowButton}},o))}if(this.resetButton){r.length>0&&r.push(t("span"," "));var l=this.labelResetButton;r.push(t(Ki,{key:"reset-btn",props:{size:"sm",disabled:i||n,variant:this.resetButtonVariant},attrs:{"aria-label":l||null},on:{click:this.onResetButton}},l))}if(!this.noCloseButton){r.length>0&&r.push(t("span"," "));var u=this.labelCloseButton;r.push(t(Ki,{key:"close-btn",props:{size:"sm",disabled:i,variant:this.closeButtonVariant},attrs:{"aria-label":u||null},on:{click:this.onCloseButton}},u))}r.length>0&&(r=[t("div",{staticClass:"b-form-date-controls d-flex flex-wrap",class:{"justify-content-between":r.length>1,"justify-content-end":r.length<2}},r)]);var c=t($u,{ref:"time",staticClass:"b-form-time-control",props:this.timeProps,on:{input:this.onInput,context:this.onContext}},r);return t(sl,{ref:"control",staticClass:"b-form-timepicker",props:s(s({},this.$props),{},{id:this.safeId(),rtl:this.isRTL,lang:this.computedLang,value:e||"",formattedValue:e?this.formattedValue:"",placeholder:a||""}),on:{show:this.onShow,shown:this.onShown,hidden:this.onHidden},scopedSlots:{"button-content":this.$scopedSlots["button-content"]||this.defaultButtonFn}},[c])}}),Iu=Dt({components:{BFormTimepicker:Fu,BTimepicker:Fu}}),Ou=Dt({components:{BImg:Qa,BImgLazy:er}}),Au={tag:{type:String,default:"div"}},Eu=t.extend({name:"BInputGroupText",functional:!0,props:Au,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{staticClass:"input-group-text"}),a)}}),Vu={id:{type:String,default:null},tag:{type:String,default:"div"},isText:{type:Boolean,default:!1}},Nu=t.extend({name:"BInputGroupAddon",functional:!0,props:s(s({},Vu),{},{append:{type:Boolean,default:!1}}),render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{class:{"input-group-append":i.append,"input-group-prepend":!i.append},attrs:{id:i.id}}),i.isText?[t(Eu,a)]:a)}}),Lu=t.extend({name:"BInputGroupAppend",functional:!0,props:Vu,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(Nu,je(n,{props:s(s({},i),{},{append:!0})}),a)}}),Mu=t.extend({name:"BInputGroupPrepend",functional:!0,props:Vu,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(Nu,je(n,{props:s(s({},i),{},{append:!1})}),a)}}),Ru={id:{type:String},size:{type:String,default:function(){return Nt("BInputGroup","size")}},prepend:{type:String},prependHtml:{type:String},append:{type:String},appendHtml:{type:String},tag:{type:String,default:"div"}},Hu=Dt({components:{BInputGroup:t.extend({name:"BInputGroup",functional:!0,props:Ru,render:function(t,e){var i=e.props,n=e.data,a=e.slots,o=e.scopedSlots,s=i.prepend,l=i.prependHtml,u=i.append,c=i.appendHtml,d=i.size,h=o||{},f=a(),p={},m=t(),v=Ye("prepend",h,f);(v||s||l)&&(m=t(Mu,[v?qe("prepend",p,h,f):t(Eu,{domProps:An(l,s)})]));var g=t(),b=Ye("append",h,f);return(b||u||c)&&(g=t(Lu,[b?qe("append",p,h,f):t(Eu,{domProps:An(c,u)})])),t(i.tag,je(n,{staticClass:"input-group",class:r({},"input-group-".concat(d),d),attrs:{id:i.id||null,role:"group"}}),[m,qe("default",p,h,f),g])}}),BInputGroupAddon:Nu,BInputGroupPrepend:Mu,BInputGroupAppend:Lu,BInputGroupText:Eu}}),zu={tag:{type:String,default:"div"},fluid:{type:[Boolean,String],default:!1}},ju=t.extend({name:"BContainer",functional:!0,props:zu,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{class:r({container:!(i.fluid||""===i.fluid),"container-fluid":!0===i.fluid||""===i.fluid},"container-".concat(i.fluid),i.fluid&&!0!==i.fluid)}),a)}}),Gu="BJumbotron",Wu={fluid:{type:Boolean,default:!1},containerFluid:{type:[Boolean,String],default:!1},header:{type:String},headerHtml:{type:String},headerTag:{type:String,default:"h1"},headerLevel:{type:[Number,String],default:"3"},lead:{type:String},leadHtml:{type:String},leadTag:{type:String,default:"p"},tag:{type:String,default:"div"},bgVariant:{type:String,default:function(){return Nt(Gu,"bgVariant")}},borderVariant:{type:String,default:function(){return Nt(Gu,"borderVariant")}},textVariant:{type:String,default:function(){return Nt(Gu,"textVariant")}}},Uu=Dt({components:{BJumbotron:t.extend({name:Gu,functional:!0,props:Wu,render:function(t,e){var i,n=e.props,a=e.data,o=e.slots,s=e.scopedSlots,l=n.header,u=n.headerHtml,c=n.lead,d=n.leadHtml,h=n.textVariant,f=n.bgVariant,p=n.borderVariant,m=s||{},v=o(),g={},b=t(),y=Ye("header",m,v);if(y||l||u){var S=n.headerLevel;b=t(n.headerTag,{class:r({},"display-".concat(S),S),domProps:y?{}:An(u,l)},qe("header",g,m,v))}var T=t(),w=Ye("lead",m,v);(w||c||d)&&(T=t(n.leadTag,{staticClass:"lead",domProps:w?{}:An(d,c)},qe("lead",g,m,v)));var B=[b,T,qe("default",g,m,v)];return n.fluid&&(B=[t(ju,{props:{fluid:n.containerFluid}},B)]),t(n.tag,je(a,{staticClass:"jumbotron",class:(i={"jumbotron-fluid":n.fluid},r(i,"text-".concat(h),h),r(i,"bg-".concat(f),f),r(i,"border-".concat(p),p),r(i,"border",p),i)}),B)}})}}),Yu=["start","end","center"],qu=At((function(t,e){return(e=Qt(Jt(e)))?te(["row-cols",t,e].filter(mt).join("-")):null})),Ku=At((function(t){return te(t.replace("cols",""))})),Xu=[],Zu=function(){var t=Rt().reduce((function(t,e){return t[mi(e,"cols")]={type:[String,Number],default:null},t}),P(null));return Xu=A(t),s({tag:{type:String,default:"div"},noGutters:{type:Boolean,default:!1},alignV:{type:String,default:null,validator:function(t){return x($(Yu,"baseline","stretch"),t)}},alignH:{type:String,default:null,validator:function(t){return x($(Yu,"between","around"),t)}},alignContent:{type:String,default:null,validator:function(t){return x($(Yu,"between","around","stretch"),t)}}},t)},Ju=Dt({components:{BContainer:ju,BRow:{name:"BRow",functional:!0,get props(){return delete this.props,this.props=Zu(),this.props},render:function(t,e){var i,n=e.props,a=e.data,o=e.children,s=[];return Xu.forEach((function(t){var e=qu(Ku(t),n[t]);e&&s.push(e)})),s.push((r(i={"no-gutters":n.noGutters},"align-items-".concat(n.alignV),n.alignV),r(i,"justify-content-".concat(n.alignH),n.alignH),r(i,"align-content-".concat(n.alignContent),n.alignContent),i)),t(n.tag,je(a,{staticClass:"row",class:s}),o)}},BCol:Bl,BFormRow:js}}),Qu=Dt({components:{BLink:Li}}),tc={tag:{type:String,default:"div"},flush:{type:Boolean,default:!1},horizontal:{type:[Boolean,String],default:!1}},ec=t.extend({name:"BListGroup",functional:!0,props:tc,render:function(t,e){var i=e.props,n=e.data,a=e.children,o=""===i.horizontal||i.horizontal;o=!i.flush&&o;var s={staticClass:"list-group",class:r({"list-group-flush":i.flush,"list-group-horizontal":!0===o},"list-group-horizontal-".concat(o),ut(o))};return t(i.tag,je(n,s),a)}}),ic=["a","router-link","button","b-link"],nc=R(Ni,["event","routerTag"]);delete nc.href.default,delete nc.to.default;var ac=s({tag:{type:String,default:"div"},action:{type:Boolean,default:null},button:{type:Boolean,default:null},variant:{type:String,default:function(){return Nt("BListGroupItem","variant")}}},nc),rc=Dt({components:{BListGroup:ec,BListGroupItem:t.extend({name:"BListGroupItem",functional:!0,props:ac,render:function(t,e){var i,n=e.props,a=e.data,o=e.children,s=n.button,l=n.variant,u=n.active,c=n.disabled,d=$i(n),h=s?"button":d?Li:n.tag,f=!!(n.action||d||s||x(ic,n.tag)),p={},m={};return de(h,"button")?(a.attrs&&a.attrs.type||(p.type="button"),n.disabled&&(p.disabled=!0)):m=gi(nc,n),t(h,je(a,{attrs:p,props:m,staticClass:"list-group-item",class:(i={},r(i,"list-group-item-".concat(l),l),r(i,"list-group-item-action",f),r(i,"active",u),r(i,"disabled",c),i)}),o)}})}}),oc={tag:{type:String,default:"div"}},sc=t.extend({name:"BMediaBody",functional:!0,props:oc,render:function(t,e){var i=e.props,n=e.data,a=e.children;return t(i.tag,je(n,{staticClass:"media-body"}),a)}}),lc={tag:{type:String,default:"div"},verticalAlign:{type:String,default:"top"}},uc=t.extend({name:"BMediaAside",functional:!0,props:lc,render:function(t,e){var i=e.props,n=e.data,a=e.children,o="top"===i.verticalAlign?"start":"bottom"===i.verticalAlign?"end":i.verticalAlign;return t(i.tag,je(n,{staticClass:"d-flex",class:r({},"align-self-".concat(o),o)}),a)}}),cc={tag:{type:String,default:"div"},rightAlign:{type:Boolean,default:!1},verticalAlign:{type:String,default:"top"},noBody:{type:Boolean,default:!1}},dc=Dt({components:{BMedia:t.extend({name:"BMedia",functional:!0,props:cc,render:function(t,e){var i=e.props,n=e.data,a=e.slots,r=e.scopedSlots,o=e.children,s=i.noBody?o:[];if(!i.noBody){var l=a(),u=r||{},c=qe("aside",{},u,l),d=qe("default",{},u,l);c&&!i.rightAlign&&s.push(t(uc,{staticClass:"mr-3",props:{verticalAlign:i.verticalAlign}},c)),s.push(t(sc,d)),c&&i.rightAlign&&s.push(t(uc,{staticClass:"ml-3",props:{verticalAlign:i.verticalAlign}},c))}return t(i.tag,je(n,{staticClass:"media"}),s)}}),BMediaAside:uc,BMediaBody:sc}}),hc=t.extend({abstract:!0,name:"BTransporterTargetSingle",props:{nodes:{type:[Array,Function]}},data:function(t){return{updatedNodes:t.nodes}},destroyed:function(){var t;(t=this.$el)&&t.parentNode&&t.parentNode.removeChild(t)},render:function(t){var e=st(this.updatedNodes)?this.updatedNodes({}):this.updatedNodes;return(e=$(e).filter(Boolean))&&e.length>0&&!e[0].text?e[0]:t()}}),fc=t.extend({name:"BTransporterSingle",mixins:[Ke],props:{disabled:{type:Boolean,default:!1},container:{type:[String,HTMLElement],default:"body"},tag:{type:String,default:"div"}},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmountTarget():this.$nextTick(this.mountTarget)}}},created:function(){this.$_defaultFn=null,this.$_target=null},beforeMount:function(){this.mountTarget()},updated:function(){this.updateTarget()},beforeDestroy:function(){this.unmountTarget(),this.$_defaultFn=null},methods:{getContainer:function(){if(U){var t=this.container;return ut(t)?ge(t):t}return null},mountTarget:function(){if(!this.$_target){var t=this.getContainer();if(t){var e=document.createElement("div");t.appendChild(e),this.$_target=new hc({el:e,parent:this,propsData:{nodes:$(this.normalizeSlot("default"))}})}}},updateTarget:function(){if(U&&this.$_target){var t=this.$scopedSlots.default;this.disabled||(t&&this.$_defaultFn!==t?this.$_target.updatedNodes=t:t||(this.$_target.updatedNodes=this.$slots.default)),this.$_defaultFn=t}},unmountTarget:function(){this.$_target&&this.$_target.$destroy(),this.$_target=null}},render:function(t){if(this.disabled){var e=$(this.normalizeSlot("default")).filter(mt);if(e.length>0&&!e[0].text)return e[0]}return t()}}),pc="$_bv_documentHandlers_",mc={created:function(){var t=this;U&&(this[pc]={},this.$once("hook:beforeDestroy",(function(){var e=t[pc]||{};delete t[pc],A(e).forEach((function(t){(e[t]||[]).forEach((function(e){return hr(document,t,e,ur)}))}))})))},methods:{listenDocument:function(t,e,i){t?this.listenOnDocument(e,i):this.listenOffDocument(e,i)},listenOnDocument:function(t,e){this[pc]&&ut(t)&&st(e)&&(this[pc][t]=this[pc][t]||[],x(this[pc][t],e)||(this[pc][t].push(e),dr(document,t,e,ur)))},listenOffDocument:function(t,e){this[pc]&&ut(t)&&st(e)&&(hr(document,t,e,ur),this[pc][t]=(this[pc][t]||[]).filter((function(t){return t!==e})))}}},vc="$_bv_windowHandlers_",gc={beforeCreate:function(){this[vc]={}},beforeDestroy:function(){if(U){var t=this[vc];delete this[vc],A(t).forEach((function(e){(t[e]||[]).forEach((function(t){return hr(window,e,t,ur)}))}))}},methods:{listenWindow:function(t,e,i){t?this.listenOnWindow(e,i):this.listenOffWindow(e,i)},listenOnWindow:function(t,e){U&&this[vc]&&ut(t)&&st(e)&&(this[vc][t]=this[vc][t]||[],x(this[vc][t],e)||(this[vc][t].push(e),dr(window,t,e,ur)))},listenOffWindow:function(t,e){U&&this[vc]&&ut(t)&&st(e)&&(hr(window,t,e,ur),this[vc][t]=(this[vc][t]||[]).filter((function(t){return t!==e})))}}},bc=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t&&t.$options._scopeId||e},yc={computed:{scopedStyleAttrs:function(){var t=bc(this.$parent);return t?r({},t,""):{}}}},Sc=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Tc=".sticky-top",wc=".navbar-toggler",Bc=new(t.extend({data:function(){return{modals:[],baseZIndex:null,scrollbarWidth:null,isBodyOverflowing:!1}},computed:{modalCount:function(){return this.modals.length},modalsAreOpen:function(){return this.modalCount>0}},watch:{modalCount:function(t,e){U&&(this.getScrollbarWidth(),t>0&&0===e?(this.checkScrollbar(),this.setScrollbar(),we(document.body,"modal-open")):0===t&&e>0&&(this.resetScrollbar(),Be(document.body,"modal-open")),ke(document.body,"data-modal-open-count",String(t)))},modals:function(t){var e=this;this.checkScrollbar(),se((function(){e.updateModals(t||[])}))}},methods:{registerModal:function(t){var e=this;t&&-1===this.modals.indexOf(t)&&(this.modals.push(t),t.$once("hook:beforeDestroy",(function(){e.unregisterModal(t)})))},unregisterModal:function(t){var e=this.modals.indexOf(t);e>-1&&(this.modals.splice(e,1),t._isBeingDestroyed||t._isDestroyed||this.resetModal(t))},getBaseZIndex:function(){if(rt(this.baseZIndex)&&U){var t=document.createElement("div");t.className="modal-backdrop d-none",t.style.display="none",document.body.appendChild(t),this.baseZIndex=Ht(_e(t).zIndex,1040),document.body.removeChild(t)}return this.baseZIndex||1040},getScrollbarWidth:function(){if(rt(this.scrollbarWidth)&&U){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t),this.scrollbarWidth=Pe(t).width-t.clientWidth,document.body.removeChild(t)}return this.scrollbarWidth||0},updateModals:function(t){var e=this,i=this.getBaseZIndex(),n=this.getScrollbarWidth();t.forEach((function(t,a){t.zIndex=i+a,t.scrollbarWidth=n,t.isTop=a===e.modals.length-1,t.isBodyOverflowing=e.isBodyOverflowing}))},resetModal:function(t){t&&(t.zIndex=this.getBaseZIndex(),t.isTop=!0,t.isBodyOverflowing=!1)},checkScrollbar:function(){var t=Pe(document.body),e=t.left,i=t.right;this.isBodyOverflowing=e+i1&&void 0!==arguments[1]?arguments[1]:{};return i(this,BvModalEvent),n=e.call(this,t,a),_(p(n),{trigger:{enumerable:!0,configurable:!1,writable:!1}}),n}return a(BvModalEvent,null,[{key:"Defaults",get:function(){return s(s({},g(u(BvModalEvent),"Defaults",this)),{},{trigger:null})}}]),BvModalEvent}(BvEvent),Cc="BModal",kc={subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["style","class"]},xc={size:{type:String,default:function(){return Nt(Cc,"size")}},centered:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},buttonSize:{type:String},noStacking:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noEnforceFocus:{type:Boolean,default:!1},ignoreEnforceFocusSelector:{type:[Array,String],default:""},title:{type:String,default:""},titleHtml:{type:String},titleTag:{type:String,default:function(){return Nt(Cc,"titleTag")}},titleClass:{type:[String,Array,Object]},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String},headerBgVariant:{type:String,default:function(){return Nt(Cc,"headerBgVariant")}},headerBorderVariant:{type:String,default:function(){return Nt(Cc,"headerBorderVariant")}},headerTextVariant:{type:String,default:function(){return Nt(Cc,"headerTextVariant")}},headerCloseVariant:{type:String,default:function(){return Nt(Cc,"headerCloseVariant")}},headerClass:{type:[String,Array,Object]},bodyBgVariant:{type:String,default:function(){return Nt(Cc,"bodyBgVariant")}},bodyTextVariant:{type:String,default:function(){return Nt(Cc,"bodyTextVariant")}},modalClass:{type:[String,Array,Object]},dialogClass:{type:[String,Array,Object]},contentClass:{type:[String,Array,Object]},bodyClass:{type:[String,Array,Object]},footerBgVariant:{type:String,default:function(){return Nt(Cc,"footerBgVariant")}},footerBorderVariant:{type:String,default:function(){return Nt(Cc,"footerBorderVariant")}},footerTextVariant:{type:String,default:function(){return Nt(Cc,"footerTextVariant")}},footerClass:{type:[String,Array,Object]},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},hideBackdrop:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},okDisabled:{type:Boolean,default:!1},cancelDisabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},returnFocus:{type:[HTMLElement,String,Object],default:null},headerCloseContent:{type:String,default:function(){return Nt(Cc,"headerCloseContent")}},headerCloseLabel:{type:String,default:function(){return Nt(Cc,"headerCloseLabel")}},cancelTitle:{type:String,default:function(){return Nt(Cc,"cancelTitle")}},cancelTitleHtml:{type:String},okTitle:{type:String,default:function(){return Nt(Cc,"okTitle")}},okTitleHtml:{type:String},cancelVariant:{type:String,default:function(){return Nt(Cc,"cancelVariant")}},okVariant:{type:String,default:function(){return Nt(Cc,"okVariant")}},lazy:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},static:{type:Boolean,default:!1},autoFocusButton:{type:String,default:null,validator:function(t){return ot(t)||x(["ok","cancel","close"],t)}}},$c=t.extend({name:Cc,mixins:[Oi,ma,mc,kr,gc,Ke,yc],inheritAttrs:!1,model:{prop:"visible",event:"change"},props:xc,data:function(){return{isHidden:!0,isVisible:!1,isTransitioning:!1,isShow:!1,isBlock:!1,isOpening:!1,isClosing:!1,ignoreBackdropClick:!1,isModalOverflowing:!1,return_focus:this.returnFocus||null,scrollbarWidth:0,zIndex:Bc.getBaseZIndex(),isTop:!0,isBodyOverflowing:!1}},computed:{modalId:function(){return this.safeId()},modalOuterId:function(){return this.safeId("__BV_modal_outer_")},modalHeaderId:function(){return this.safeId("__BV_modal_header_")},modalBodyId:function(){return this.safeId("__BV_modal_body_")},modalTitleId:function(){return this.safeId("__BV_modal_title_")},modalContentId:function(){return this.safeId("__BV_modal_content_")},modalFooterId:function(){return this.safeId("__BV_modal_footer_")},modalBackdropId:function(){return this.safeId("__BV_modal_backdrop_")},modalClasses:function(){return[{fade:!this.noFade,show:this.isShow},this.modalClass]},modalStyles:function(){var t="".concat(this.scrollbarWidth,"px");return{paddingLeft:!this.isBodyOverflowing&&this.isModalOverflowing?t:"",paddingRight:this.isBodyOverflowing&&!this.isModalOverflowing?t:"",display:this.isBlock?"block":"none"}},dialogClasses:function(){var t;return[(t={},r(t,"modal-".concat(this.size),this.size),r(t,"modal-dialog-centered",this.centered),r(t,"modal-dialog-scrollable",this.scrollable),t),this.dialogClass]},headerClasses:function(){var t;return[(t={},r(t,"bg-".concat(this.headerBgVariant),this.headerBgVariant),r(t,"text-".concat(this.headerTextVariant),this.headerTextVariant),r(t,"border-".concat(this.headerBorderVariant),this.headerBorderVariant),t),this.headerClass]},titleClasses:function(){return[{"sr-only":this.titleSrOnly},this.titleClass]},bodyClasses:function(){var t;return[(t={},r(t,"bg-".concat(this.bodyBgVariant),this.bodyBgVariant),r(t,"text-".concat(this.bodyTextVariant),this.bodyTextVariant),t),this.bodyClass]},footerClasses:function(){var t;return[(t={},r(t,"bg-".concat(this.footerBgVariant),this.footerBgVariant),r(t,"text-".concat(this.footerTextVariant),this.footerTextVariant),r(t,"border-".concat(this.footerBorderVariant),this.footerBorderVariant),t),this.footerClass]},modalOuterStyle:function(){return{position:"absolute",zIndex:this.zIndex}},slotScope:function(){return{ok:this.onOk,cancel:this.onCancel,close:this.onClose,hide:this.hide,visible:this.isVisible}},computeIgnoreEnforceFocusSelector:function(){return $(this.ignoreEnforceFocusSelector).filter(mt).join(",").trim()},computedAttrs:function(){return s(s(s({},this.static?{}:this.scopedStyleAttrs),this.bvAttrs),{},{id:this.modalOuterId})},computedModalAttrs:function(){var t=this.isVisible,e=this.ariaLabel;return{id:this.modalId,role:"dialog","aria-hidden":t?null:"true","aria-modal":t?"true":null,"aria-label":e,"aria-labelledby":this.hideHeader||e||!(this.hasNormalizedSlot("modal-title")||this.titleHtml||this.title)?null:this.modalTitleId,"aria-describedby":this.modalBodyId}}},watch:{visible:function(t,e){t!==e&&this[t?"show":"hide"]()}},created:function(){this.$_observer=null},mounted:function(){this.zIndex=Bc.getBaseZIndex(),this.listenOnRoot("bv::show::modal",this.showHandler),this.listenOnRoot("bv::hide::modal",this.hideHandler),this.listenOnRoot("bv::toggle::modal",this.toggleHandler),this.listenOnRoot("bv::modal::show",this.modalListener),!0===this.visible&&this.$nextTick(this.show)},beforeDestroy:function(){this.setObserver(!1),this.isVisible&&(this.isVisible=!1,this.isShow=!1,this.isTransitioning=!1)},methods:{setObserver:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$_observer&&this.$_observer.disconnect(),this.$_observer=null,t&&(this.$_observer=sr(this.$refs.content,this.checkModalOverflow.bind(this),kc))},updateModel:function(t){t!==this.visible&&this.$emit("change",t)},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new BvModalEvent(t,s(s({cancelable:!1,target:this.$refs.modal||this.$el||null,relatedTarget:null,trigger:null},e),{},{vueTarget:this,componentId:this.modalId}))},show:function(){if(!this.isVisible&&!this.isOpening)if(this.isClosing)this.$once("hidden",this.show);else{this.isOpening=!0,this.return_focus=this.return_focus||this.getActiveElement();var t=this.buildEvent("show",{cancelable:!0});if(this.emitEvent(t),t.defaultPrevented||this.isVisible)return this.isOpening=!1,void this.updateModel(!1);this.doShow()}},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.isVisible&&!this.isClosing){this.isClosing=!0;var e=this.buildEvent("hide",{cancelable:"FORCE"!==t,trigger:t||null});if("ok"===t?this.$emit("ok",e):"cancel"===t?this.$emit("cancel",e):"headerclose"===t&&this.$emit("close",e),this.emitEvent(e),e.defaultPrevented||!this.isVisible)return this.isClosing=!1,void this.updateModel(!0);this.setObserver(!1),this.isVisible=!1,this.updateModel(!1)}},toggle:function(t){t&&(this.return_focus=t),this.isVisible?this.hide("toggle"):this.show()},getActiveElement:function(){var t=ce(U?[document.body]:[]);return t&&t.focus?t:null},doShow:function(){var t=this;Bc.modalsAreOpen&&this.noStacking?this.listenOnRootOnce("bv::modal::hidden",this.doShow):(Bc.registerModal(this),this.isHidden=!1,this.$nextTick((function(){t.isVisible=!0,t.isOpening=!1,t.updateModel(!0),t.$nextTick((function(){t.setObserver(!0)}))})))},onBeforeEnter:function(){this.isTransitioning=!0,this.setResizeEvent(!0)},onEnter:function(){var t=this;this.isBlock=!0,se((function(){se((function(){t.isShow=!0}))}))},onAfterEnter:function(){var t=this;this.checkModalOverflow(),this.isTransitioning=!1,se((function(){t.emitEvent(t.buildEvent("shown")),t.setEnforceFocus(!0),t.$nextTick((function(){t.focusFirst()}))}))},onBeforeLeave:function(){this.isTransitioning=!0,this.setResizeEvent(!1),this.setEnforceFocus(!1)},onLeave:function(){this.isShow=!1},onAfterLeave:function(){var t=this;this.isBlock=!1,this.isTransitioning=!1,this.isModalOverflowing=!1,this.isHidden=!0,this.$nextTick((function(){t.isClosing=!1,Bc.unregisterModal(t),t.returnFocusTo(),t.emitEvent(t.buildEvent("hidden"))}))},emitEvent:function(t){var e=t.type;this.emitOnRoot("bv::modal::".concat(e),t,t.componentId),this.$emit(e,t)},onDialogMousedown:function(){var t=this,e=this.$refs.modal;dr(e,"mouseup",(function i(n){hr(e,"mouseup",i,ur),n.target===e&&(t.ignoreBackdropClick=!0)}),ur)},onClickOut:function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:this.isVisible&&!this.noCloseOnBackdrop&&Se(document.body,t.target)&&(Se(this.$refs.content,t.target)||this.hide("backdrop"))},onOk:function(){this.hide("ok")},onCancel:function(){this.hide("cancel")},onClose:function(){this.hide("headerclose")},onEsc:function(t){t.keyCode===_i.ESC&&this.isVisible&&!this.noCloseOnEsc&&this.hide("esc")},focusHandler:function(t){var e=this.$refs.content,i=t.target;if(!(this.noEnforceFocus||!this.isTop||!this.isVisible||!e||document===i||Se(e,i)||this.computeIgnoreEnforceFocusSelector&&ye(this.computeIgnoreEnforceFocusSelector,i,!0))){var n=Ae(this.$refs.content),a=this.$refs,r=a.bottomTrap,o=a.topTrap;if(r&&i===r){if(Ee(n[0]))return}else if(o&&i===o&&Ee(n[n.length-1]))return;Ee(e,{preventScroll:!0})}},setEnforceFocus:function(t){this.listenDocument(t,"focusin",this.focusHandler)},setResizeEvent:function(t){this.listenWindow(t,"resize",this.checkModalOverflow),this.listenWindow(t,"orientationchange",this.checkModalOverflow)},showHandler:function(t,e){t===this.modalId&&(this.return_focus=e||this.getActiveElement(),this.show())},hideHandler:function(t){t===this.modalId&&this.hide("event")},toggleHandler:function(t,e){t===this.modalId&&this.toggle(e)},modalListener:function(t){this.noStacking&&t.vueTarget!==this&&this.hide()},focusFirst:function(){var t=this;U&&se((function(){var e=t.$refs.modal,i=t.$refs.content,n=t.getActiveElement();if(e&&i&&(!n||!Se(i,n))){var a=t.$refs["ok-button"],r=t.$refs["cancel-button"],o=t.$refs["close-button"],s=t.autoFocusButton,l="ok"===s&&a?a.$el||a:"cancel"===s&&r?r.$el||r:"close"===s&&o?o.$el||o:i;Ee(l),l===i&&t.$nextTick((function(){e.scrollTop=0}))}}))},returnFocusTo:function(){var t=this.returnFocus||this.return_focus||null;this.return_focus=null,this.$nextTick((function(){(t=ut(t)?ge(t):t)&&(t=t.$el||t,Ee(t))}))},checkModalOverflow:function(){if(this.isVisible){var t=this.$refs.modal;this.isModalOverflowing=t.scrollHeight>document.documentElement.clientHeight}},makeModal:function(t){var e=t();if(!this.hideHeader){var i=this.normalizeSlot("modal-header",this.slotScope);if(!i){var n=t();this.hideHeaderClose||(n=t(Je,{props:{content:this.headerCloseContent,disabled:this.isTransitioning,ariaLabel:this.headerCloseLabel,textVariant:this.headerCloseVariant||this.headerTextVariant},on:{click:this.onClose},ref:"close-button"},[this.normalizeSlot("modal-header-close")])),i=[t(this.titleTag,{staticClass:"modal-title",class:this.titleClasses,attrs:{id:this.modalTitleId},domProps:this.hasNormalizedSlot("modal-title")?{}:An(this.titleHtml,this.title)},[this.normalizeSlot("modal-title",this.slotScope)]),n]}e=t("header",{staticClass:"modal-header",class:this.headerClasses,attrs:{id:this.modalHeaderId},ref:"header"},[i])}var a=t("div",{staticClass:"modal-body",class:this.bodyClasses,attrs:{id:this.modalBodyId},ref:"body"},this.normalizeSlot("default",this.slotScope)),r=t();if(!this.hideFooter){var o=this.normalizeSlot("modal-footer",this.slotScope);if(!o){var s=t();this.okOnly||(s=t(Ki,{props:{variant:this.cancelVariant,size:this.buttonSize,disabled:this.cancelDisabled||this.busy||this.isTransitioning},domProps:this.hasNormalizedSlot("modal-cancel")?{}:An(this.cancelTitleHtml,this.cancelTitle),on:{click:this.onCancel},ref:"cancel-button"},this.normalizeSlot("modal-cancel"))),o=[s,t(Ki,{props:{variant:this.okVariant,size:this.buttonSize,disabled:this.okDisabled||this.busy||this.isTransitioning},domProps:this.hasNormalizedSlot("modal-ok")?{}:An(this.okTitleHtml,this.okTitle),on:{click:this.onOk},ref:"ok-button"},this.normalizeSlot("modal-ok"))]}r=t("footer",{staticClass:"modal-footer",class:this.footerClasses,attrs:{id:this.modalFooterId},ref:"footer"},[o])}var l=t("div",{staticClass:"modal-content",class:this.contentClass,attrs:{id:this.modalContentId,tabindex:"-1"},ref:"content"},[e,a,r]),u=t(),c=t();this.isVisible&&!this.noEnforceFocus&&(u=t("span",{ref:"topTrap",attrs:{tabindex:"0"}}),c=t("span",{ref:"bottomTrap",attrs:{tabindex:"0"}}));var d=t("div",{staticClass:"modal-dialog",class:this.dialogClasses,on:{mousedown:this.onDialogMousedown},ref:"dialog"},[u,l,c]),h=t("div",{staticClass:"modal",class:this.modalClasses,style:this.modalStyles,attrs:this.computedModalAttrs,on:{keydown:this.onEsc,click:this.onClickOut},directives:[{name:"show",value:this.isVisible}],ref:"modal"},[d]);h=t("transition",{props:{enterClass:"",enterToClass:"",enterActiveClass:"",leaveClass:"",leaveActiveClass:"",leaveToClass:""},on:{beforeEnter:this.onBeforeEnter,enter:this.onEnter,afterEnter:this.onAfterEnter,beforeLeave:this.onBeforeLeave,leave:this.onLeave,afterLeave:this.onAfterLeave}},[h]);var f=t();return!this.hideBackdrop&&this.isVisible&&(f=t("div",{staticClass:"modal-backdrop",attrs:{id:this.modalBackdropId}},this.normalizeSlot("modal-backdrop"))),f=t(Ue,{props:{noFade:this.noFade}},[f]),t("div",{style:this.modalOuterStyle,attrs:this.computedAttrs,key:"modal-outer-".concat(this._uid)},[h,f])}},render:function(t){return this.static?this.lazy&&this.isHidden?t():this.makeModal(t):this.isHidden?t():t(fc,[this.makeModal(t)])}}),Dc="__bv_modal_directive__",Pc=function(t){var e=t.modifiers,i=void 0===e?{}:e,n=t.arg,a=t.value;return ut(a)?a:ut(n)?n:A(i).reverse()[0]},_c=function(t){return t&&be(t,".dropdown-menu > li, li.nav-item")&&ge("a, button",t)||t},Fc=function(t){t&&"BUTTON"!==t.tagName&&(De(t,"role")||ke(t,"role","button"),"A"===t.tagName||De(t,"tabindex")||ke(t,"tabindex","0"))},Ic=function(t){var e=t[Dc]||{},i=e.trigger,n=e.handler;i&&n&&(hr(i,"click",n,lr),hr(i,"keydown",n,lr),hr(t,"click",n,lr),hr(t,"keydown",n,lr)),delete t[Dc]},Oc=function(t,e,i){var n=t[Dc]||{},a=Pc(e),r=_c(t);a===n.target&&r===n.trigger||(Ic(t),function(t,e,i){var n=Pc(e),a=_c(t);if(n&&a){var r=function(t){var e=t.currentTarget;if(!pe(e)){var a=t.type,r=t.keyCode;"click"!==a&&("keydown"!==a||r!==_i.ENTER&&r!==_i.SPACE)||i.context.$root.$emit("bv::show::modal",n,e)}};t[Dc]={handler:r,target:n,trigger:a},Fc(a),dr(a,"click",r,lr),"BUTTON"!==a.tagName&&"button"===$e(a,"role")&&dr(a,"keydown",r,lr)}}(t,e,i)),Fc(r)},Ac={inserted:Oc,updated:function(){},componentUpdated:Oc,unbind:Ic},Ec=["id"].concat(y(A(R(xc,["busy","lazy","noStacking","static","visible"])))),Vc=function(){},Nc={msgBoxContent:"default",title:"modal-title",okTitle:"modal-ok",cancelTitle:"modal-cancel"},Lc=function(t){return Ec.reduce((function(e,i){return at(t[i])||(e[i]=t[i]),e}),{})},Mc=Dt({components:{BModal:$c},directives:{VBModal:Ac},plugins:{BVModalPlugin:Dt({plugins:{plugin:function(t){var e=t.extend({name:"BMsgBox",extends:$c,destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},mounted:function(){var t=this,e=function(){var e=t;t.$nextTick((function(){setTimeout((function(){return e.$destroy()}),0)}))};this.$parent.$once("hook:destroyed",e),this.$once("hidden",e),this.$router&&this.$route&&this.$once("hook:beforeDestroy",this.$watch("$router",e)),this.show()}}),n=function(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vc;if(!St("$bvModal")&&!Tt("$bvModal")){var a=new e({parent:t,propsData:s(s(s({},Lc(Nt("BModal")||{})),{},{hideHeaderClose:!0,hideHeader:!(i.title||i.titleHtml)},R(i,A(Nc))),{},{lazy:!1,busy:!1,visible:!1,noStacking:!1,noEnforceFocus:!1})});return A(Nc).forEach((function(t){at(i[t])||(a.$slots[Nc[t]]=$(i[t]))})),new Promise((function(t,e){var i=!1;a.$once("hook:destroyed",(function(){i||e(new Error("BootstrapVue MsgBox destroyed before resolve"))})),a.$on("hide",(function(e){if(!e.defaultPrevented){var a=n(e);e.defaultPrevented||(i=!0,t(a))}}));var r=document.createElement("div");document.body.appendChild(r),a.$mount(r)}))}},r=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(e&&!Tt("$bvModal")&&!St("$bvModal")&&st(a))return n(t,s(s({},Lc(i)),{},{msgBoxContent:e}),a)},o=function(){function t(e){i(this,t),D(this,{_vm:e,_root:e.$root}),_(this,{_vm:{enumerable:!0,configurable:!1,writable:!1},_root:{enumerable:!0,configurable:!1,writable:!1}})}return a(t,[{key:"show",value:function(t){if(t&&this._root){for(var e,i=arguments.length,n=new Array(i>1?i-1:0),a=1;a1?i-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:{},i=s(s({},e),{},{okOnly:!0,okDisabled:!1,hideFooter:!1,msgBoxContent:t});return r(this._vm,t,i,(function(){return!0}))}},{key:"msgBoxConfirm",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=s(s({},e),{},{okOnly:!1,okDisabled:!1,cancelDisabled:!1,hideFooter:!1});return r(this._vm,t,i,(function(t){var e=t.trigger;return"ok"===e||"cancel"!==e&&null}))}}]),t}();t.mixin({beforeCreate:function(){this._bv__modal=new o(this)}}),E(t.prototype,"$bvModal")||F(t.prototype,"$bvModal",{get:function(){return this&&this._bv__modal||yt('"'.concat("$bvModal",'" must be accessed from a Vue instance "this" context.'),"BModal"),this._bv__modal}})}}})}}),Rc={tag:{type:String,default:"ul"},fill:{type:Boolean,default:!1},justified:{type:Boolean,default:!1},align:{type:String},tabs:{type:Boolean,default:!1},pills:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},small:{type:Boolean,default:!1},cardHeader:{type:Boolean,default:!1}},Hc=t.extend({name:"BNav",functional:!0,props:Rc,render:function(t,e){var i,n,a=e.props,o=e.data,s=e.children;return t(a.tag,je(o,{staticClass:"nav",class:(i={"nav-tabs":a.tabs,"nav-pills":a.pills&&!a.tabs,"card-header-tabs":!a.vertical&&a.cardHeader&&a.tabs,"card-header-pills":!a.vertical&&a.cardHeader&&a.pills&&!a.tabs,"flex-column":a.vertical,"nav-fill":!a.vertical&&a.fill,"nav-justified":!a.vertical&&a.justified},r(i,(n=a.align,"justify-content-".concat(n="left"===n?"start":"right"===n?"end":n)),!a.vertical&&a.align),r(i,"small",a.small),i)}),s)}}),zc=R(Ni,["event","routerTag"]),jc=t.extend({name:"BNavItem",functional:!0,props:s(s({},zc),{},{linkAttrs:{type:Object,default:function(){}},linkClasses:{type:[String,Object,Array],default:null}}),render:function(t,e){var i=e.props,n=e.data,a=e.listeners,r=e.children;return delete n.on,t("li",je(n,{staticClass:"nav-item"}),[t(Li,{staticClass:"nav-link",class:i.linkClasses,attrs:i.linkAttrs,props:i,on:a},r)])}}),Gc=t.extend({name:"BNavText",functional:!0,props:{},render:function(t,e){var i=e.data,n=e.children;return t("li",je(i,{staticClass:"navbar-text"}),n)}}),Wc=s(s({},R(ks,["inline"])),{},{formClass:{type:[String,Array,Object]}}),Uc=t.extend({name:"BNavForm",functional:!0,props:Wc,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=e.listeners,o=void 0===r?{}:r,l=n.attrs;n.attrs={},n.on={};var u=t(xs,{class:i.formClass,props:s(s({},i),{},{inline:!0}),attrs:l,on:o},a);return t("li",je(n,{staticClass:"form-inline"}),[u])}}),Yc=gi(["text","html","menuClass","toggleClass","noCaret","role","lazy"],ms),qc=t.extend({name:"BNavItemDropdown",mixins:[ma,fs,Ke],props:Yc,computed:{toggleId:function(){return this.safeId("_BV_toggle_")},isNav:function(){return!0},dropdownClasses:function(){return[this.directionClass,{show:this.visible}]},menuClasses:function(){return[this.menuClass,{"dropdown-menu-right":this.right,show:this.visible}]},toggleClasses:function(){return[this.toggleClass,{"dropdown-toggle-no-caret":this.noCaret}]}},render:function(t){var e=this.toggleId,i=this.visible,n=t(Li,{staticClass:"nav-link dropdown-toggle",class:this.toggleClasses,props:{href:"#".concat(this.id||""),disabled:this.disabled},attrs:{id:e,role:"button","aria-haspopup":"true","aria-expanded":i?"true":"false"},on:{mousedown:this.onMousedown,click:this.toggle,keydown:this.toggle},ref:"toggle"},[this.normalizeSlot(["button-content","text"])||t("span",{domProps:An(this.html,this.text)})]),a=t("ul",{staticClass:"dropdown-menu",class:this.menuClasses,attrs:{tabindex:"-1","aria-labelledby":e},on:{keydown:this.onKeydown},ref:"menu"},!this.lazy||i?this.normalizeSlot("default",{hide:this.hide}):[t()]);return t("li",{staticClass:"nav-item b-nav-dropdown dropdown",class:this.dropdownClasses,attrs:{id:this.safeId()}},[n,a])}}),Kc=Dt({components:{BNav:Hc,BNavItem:jc,BNavText:Gc,BNavForm:Uc,BNavItemDropdown:qc,BNavItemDd:qc,BNavDropdown:qc,BNavDd:qc},plugins:{DropdownPlugin:Fs}}),Xc={tag:{type:String,default:"nav"},type:{type:String,default:"light"},variant:{type:String,default:function(){return Nt("BNavbar","variant")}},toggleable:{type:[Boolean,String],default:!1},fixed:{type:String},sticky:{type:Boolean,default:!1},print:{type:Boolean,default:!1}},Zc=t.extend({name:"BNavbar",mixins:[Ke],props:Xc,provide:function(){return{bvNavbar:this}},computed:{breakpointClass:function(){var t=null,e=Lt()[0],i=this.toggleable;return i&&ut(i)&&i!==e?t="navbar-expand-".concat(i):!1===i&&(t="navbar-expand"),t}},render:function(t){var e;return t(this.tag,{staticClass:"navbar",class:[(e={"d-print":this.print,"sticky-top":this.sticky},r(e,"navbar-".concat(this.type),this.type),r(e,"bg-".concat(this.variant),this.variant),r(e,"fixed-".concat(this.fixed),this.fixed),e),this.breakpointClass],attrs:{role:de(this.tag,"nav")?null:"navigation"}},[this.normalizeSlot("default")])}}),Jc=gi(["tag","fill","justified","align","small"],Rc),Qc=t.extend({name:"BNavbarNav",functional:!0,props:Jc,render:function(t,e){var i,n,a=e.props,o=e.data,s=e.children;return t(a.tag,je(o,{staticClass:"navbar-nav",class:(i={"nav-fill":a.fill,"nav-justified":a.justified},r(i,(n=a.align,"justify-content-".concat(n="left"===n?"start":"right"===n?"end":n)),a.align),r(i,"small",a.small),i)}),s)}}),td=R(Ni,["event","routerTag"]);td.href.default=void 0,td.to.default=void 0;var ed=s({tag:{type:String,default:"div"}},td),id=t.extend({name:"BNavbarBrand",functional:!0,props:ed,render:function(t,e){var i=e.props,n=e.data,a=e.children,r=i.to||i.href;return t(r?Li:i.tag,je(n,{staticClass:"navbar-brand",props:r?gi(td,i):{}}),a)}}),nd=t.extend({name:"BNavbarToggle",directives:{BToggle:Wr},mixins:[kr,Ke],props:{label:{type:String,default:function(){return Nt("BNavbarToggle","label")}},target:{type:String,required:!0},disabled:{type:Boolean,default:!1}},data:function(){return{toggleState:!1}},created:function(){this.listenOnRoot(Or,this.handleStateEvt),this.listenOnRoot(Ar,this.handleStateEvt)},methods:{onClick:function(t){this.disabled||this.$emit("click",t)},handleStateEvt:function(t,e){t===this.target&&(this.toggleState=e)}},render:function(t){var e=this.disabled;return t("button",{staticClass:"navbar-toggler",class:{disabled:e},directives:[{name:"BToggle",value:this.target}],attrs:{type:"button",disabled:e,"aria-label":this.label},on:{click:this.onClick}},[this.normalizeSlot("default",{expanded:this.toggleState})||t("span",{staticClass:"".concat("navbar-toggler","-icon")})])}}),ad=Dt({components:{BNavbar:Zc,BNavbarNav:Qc,BNavbarBrand:id,BNavbarToggle:nd,BNavToggle:nd},plugins:{NavPlugin:Kc,CollapsePlugin:qr,DropdownPlugin:Fs}}),rd=t.extend({name:"BSpinner",functional:!0,props:{type:{type:String,default:"border"},label:{type:String},variant:{type:String,default:function(){return Nt("BSpinner","variant")}},small:{type:Boolean,default:!1},role:{type:String,default:"status"},tag:{type:String,default:"span"}},render:function(t,e){var i,n=e.props,a=e.data,o=e.slots,s=e.scopedSlots,l=o(),u=qe("label",{},s||{},l)||n.label;return u&&(u=t("span",{staticClass:"sr-only"},u)),t(n.tag,je(a,{attrs:{role:u?n.role||"status":null,"aria-hidden":u?null:"true"},class:(i={},r(i,"spinner-".concat(n.type),n.type),r(i,"spinner-".concat(n.type,"-sm"),n.small),r(i,"text-".concat(n.variant),n.variant),i)}),[u||t()])}}),od={top:0,left:0,bottom:0,right:0},sd=Dt({components:{BOverlay:t.extend({name:"BOverlay",mixins:[Ke],props:{show:{type:Boolean,default:!1},variant:{type:String,default:"light"},bgColor:{type:String},opacity:{type:[Number,String],default:.85,validator:function(t){var e=zt(t,0);return e>=0&&e<=1}},blur:{type:String,default:"2px"},rounded:{type:[Boolean,String],default:!1},noCenter:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},spinnerType:{type:String,default:"border"},spinnerVariant:{type:String},spinnerSmall:{type:Boolean,default:!1},overlayTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},noWrap:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:10}},computed:{computedRounded:function(){var t=this.rounded;return!0===t||""===t?"rounded":t?"rounded-".concat(t):""},computedVariant:function(){return this.variant&&!this.bgColor?"bg-".concat(this.variant):""},overlayScope:function(){return{spinnerType:this.spinnerType||null,spinnerVariant:this.spinnerVariant||null,spinnerSmall:this.spinnerSmall}}},methods:{defaultOverlayFn:function(t){var e=t.spinnerType,i=t.spinnerVariant,n=t.spinnerSmall;return this.$createElement(rd,{props:{type:e,variant:i,small:n}})}},render:function(t){var e=this,i=t();if(this.show){var n=this.overlayScope,a=t("div",{staticClass:"position-absolute",class:[this.computedVariant,this.computedRounded],style:s(s({},od),{},{opacity:this.opacity,backgroundColor:this.bgColor||null,backdropFilter:this.blur?"blur(".concat(this.blur,")"):null})}),r=t("div",{staticClass:"position-absolute",style:this.noCenter?s({},od):{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}},[this.normalizeSlot("overlay",n)||this.defaultOverlayFn(n)]);i=t(this.overlayTag,{key:"overlay",staticClass:"b-overlay",class:{"position-absolute":!this.noWrap||this.noWrap&&!this.fixed,"position-fixed":this.noWrap&&this.fixed},style:s(s({},od),{},{zIndex:this.zIndex||10}),on:{click:function(t){return e.$emit("click",t)}}},[a,r])}return i=t(Ue,{props:{noFade:this.noFade,appear:!0},on:{"after-enter":function(){return e.$emit("shown")},"after-leave":function(){return e.$emit("hidden")}}},[i]),this.noWrap?i:t(this.wrapTag,{staticClass:"b-overlay-wrap position-relative",attrs:{"aria-busy":this.show?"true":null}},this.noWrap?[i]:[this.normalizeSlot("default"),i])}})}}),ld=function(t){return Array.apply(null,{length:t})},ud=function(t){var e=Ht(t)||1;return e<1?5:e},cd=function(t,e){var i=Ht(t)||1;return i>e?e:i<1?1:i},dd=function(t){if(t.keyCode===_i.SPACE)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.currentTarget.click(),!1},hd={mixins:[Ke],model:{prop:"value",event:"input"},props:{disabled:{type:Boolean,default:!1},value:{type:[Number,String],default:null,validator:function(t){return!(!rt(t)&&Ht(t,0)<1)||(yt('"v-model" value must be a number greater than "0"',"BPagination"),!1)}},limit:{type:[Number,String],default:5,validator:function(t){return!(Ht(t,0)<1)||(yt('Prop "limit" must be a number greater than "0"',"BPagination"),!1)}},align:{type:String,default:"left"},pills:{type:Boolean,default:!1},hideGotoEndButtons:{type:Boolean,default:!1},ariaLabel:{type:String,default:"Pagination"},labelFirstPage:{type:String,default:"Go to first page"},firstText:{type:String,default:"«"},firstNumber:{type:Boolean,default:!1},firstClass:{type:[String,Array,Object],default:null},labelPrevPage:{type:String,default:"Go to previous page"},prevText:{type:String,default:"‹"},prevClass:{type:[String,Array,Object],default:null},labelNextPage:{type:String,default:"Go to next page"},nextText:{type:String,default:"›"},nextClass:{type:[String,Array,Object]},labelLastPage:{type:String,default:"Go to last page"},lastText:{type:String,default:"»"},lastNumber:{type:Boolean,default:!1},lastClass:{type:[String,Array,Object]},labelPage:{type:[String,Function],default:"Go to page"},pageClass:{type:[String,Array,Object]},hideEllipsis:{type:Boolean,default:!1},ellipsisText:{type:String,default:"…"},ellipsisClass:{type:[String,Array,Object]}},data:function(){var t=Ht(this.value,0);return{currentPage:t=t>0?t:-1,localNumberOfPages:1,localLimit:5}},computed:{btnSize:function(){return this.size?"pagination-".concat(this.size):""},alignment:function(){var t=this.align;return"center"===t?"justify-content-center":"end"===t||"right"===t?"justify-content-end":"fill"===t?"text-center":""},styleClass:function(){return this.pills?"b-pagination-pills":""},computedCurrentPage:function(){return cd(this.currentPage,this.localNumberOfPages)},paginationParams:function(){var t=this.localLimit,e=this.localNumberOfPages,i=this.computedCurrentPage,n=this.hideEllipsis,a=this.firstNumber,r=this.lastNumber,o=!1,s=!1,l=t,u=1;e<=t?l=e:i3?(n&&!r||(s=!0,l=t-(a?0:1)),l=ni(l,t)):e-i+23?(n&&!a||(o=!0,l=t-(r?0:1)),u=e-l+1):(t>3&&(l=t-2,o=!(n&&!a),s=!(n&&!r)),u=i-si(l/2)),u<1?(u=1,o=!1):u>e-l&&(u=e-l+1,s=!1),o&&a&&u<4&&(l+=2,u=1,o=!1);var c=u+l-1;return s&&r&&c>e-3&&(l+=c===e-2?2:3,s=!1),t<=3&&(a&&1===u?l=ni(l+1,e,t+1):r&&e===u+l-1&&(u=ai(u-1,1),l=ni(e-u+1,e,t+1))),{showFirstDots:o,showLastDots:s,numberOfLinks:l=ni(l,e-u+1),startNumber:u}},pageList:function(){var t=this.paginationParams,e=t.numberOfLinks,i=t.startNumber,n=this.computedCurrentPage,a=function(t,e){return ld(e).map((function(e,i){return{number:t+i,classes:null}}))}(i,e);if(a.length>3){var r=n-i,o="bv-d-xs-down-none";if(0===r)for(var s=3;sr+1;c--)a[c].classes=o}}return a}},watch:{value:function(t,e){t!==e&&(this.currentPage=cd(t,this.localNumberOfPages))},currentPage:function(t,e){t!==e&&this.$emit("input",t>0?t:null)},limit:function(t,e){t!==e&&(this.localLimit=ud(t))}},created:function(){var t=this;this.localLimit=ud(this.limit),this.$nextTick((function(){t.currentPage=t.currentPage>t.localNumberOfPages?t.localNumberOfPages:t.currentPage}))},methods:{handleKeyNav:function(t){var e=t.keyCode,i=t.shiftKey;this.isNav||(e===_i.LEFT||e===_i.UP?(t.preventDefault(),i?this.focusFirst():this.focusPrev()):e!==_i.RIGHT&&e!==_i.DOWN||(t.preventDefault(),i?this.focusLast():this.focusNext()))},getButtons:function(){return ve("button.page-link, a.page-link",this.$el).filter((function(t){return fe(t)}))},focusCurrent:function(){var t=this;this.$nextTick((function(){var e=t.getButtons().find((function(e){return Ht($e(e,"aria-posinset"),0)===t.computedCurrentPage}));Ee(e)||t.focusFirst()}))},focusFirst:function(){var t=this;this.$nextTick((function(){var e=t.getButtons().find((function(t){return!pe(t)}));Ee(e)}))},focusLast:function(){var t=this;this.$nextTick((function(){var e=t.getButtons().reverse().find((function(t){return!pe(t)}));Ee(e)}))},focusPrev:function(){var t=this;this.$nextTick((function(){var e=t.getButtons(),i=e.indexOf(ce());i>0&&!pe(e[i-1])&&Ee(e[i-1])}))},focusNext:function(){var t=this;this.$nextTick((function(){var e=t.getButtons(),i=e.indexOf(ce());in,v=i<1?1:i>n?n:i,g={disabled:m,page:v,index:v-1},b=e.normalizeSlot(o,g)||Jt(s)||t(),y=t(m?"span":d?Li:"button",{staticClass:"page-link",class:{"flex-grow-1":!d&&!m&&c},props:m||!d?{}:e.linkProps(i),attrs:{role:d?null:"menuitem",type:d||m?null:"button",tabindex:m||d?null:"-1","aria-label":a,"aria-controls":e.ariaControls||null,"aria-disabled":m?"true":null},on:m?{}:{"!click":function(t){e.onClick(i,t)},keydown:dd}},[b]);return t("li",{key:p,staticClass:"page-item",class:[{disabled:m,"flex-fill":c,"d-flex":c&&!d&&!m},l],attrs:{role:d?null:"presentation","aria-hidden":m?"true":null}},[y])},m=function(i){return t("li",{key:"ellipsis-".concat(i?"last":"first"),staticClass:"page-item",class:["disabled","bv-d-xs-down-none",c?"flex-fill":"",e.ellipsisClass],attrs:{role:"separator"}},[t("span",{staticClass:"page-link"},[e.normalizeSlot("ellipsis-text")||Jt(e.ellipsisText)||t()])])},v=function(i,a){var o=h(i.number)&&!f,s=r?null:o||f&&0===a?"0":"-1",l={role:d?null:"menuitemradio",type:d||r?null:"button","aria-disabled":r?"true":null,"aria-controls":e.ariaControls||null,"aria-label":st(e.labelPage)?e.labelPage(i.number):"".concat(e.labelPage," ").concat(i.number),"aria-checked":d?null:o?"true":"false","aria-current":d&&o?"page":null,"aria-posinset":i.number,"aria-setsize":n,tabindex:d?null:s},u=Jt(e.makePage(i.number)),p={page:i.number,index:i.number-1,content:u,active:o,disabled:r},m=t(r?"span":d?Li:"button",{props:r||!d?{}:e.linkProps(i.number),staticClass:"page-link",class:{"flex-grow-1":!d&&!r&&c},attrs:l,on:r?{}:{"!click":function(t){e.onClick(i.number,t)},keydown:dd}},[e.normalizeSlot("page",p)||u]);return t("li",{key:"page-".concat(i.number),staticClass:"page-item",class:[{disabled:r,active:o,"flex-fill":c,"d-flex":c&&!d&&!r},i.classes,e.pageClass],attrs:{role:d?null:"presentation"}},[m])},g=t();this.firstNumber||this.hideGotoEndButtons||(g=p(1,this.labelFirstPage,"first-text",this.firstText,this.firstClass,1,"pagination-goto-first")),i.push(g),i.push(p(u-1,this.labelPrevPage,"prev-text",this.prevText,this.prevClass,1,"pagination-goto-prev")),i.push(this.firstNumber&&1!==a[0]?v({number:1},0):t()),i.push(s?m(!1):t()),this.pageList.forEach((function(t,n){var r=s&&e.firstNumber&&1!==a[0]?1:0;i.push(v(t,n+r))})),i.push(l?m(!0):t()),i.push(this.lastNumber&&a[a.length-1]!==n?v({number:n},-1):t()),i.push(p(u+1,this.labelNextPage,"next-text",this.nextText,this.nextClass,n,"pagination-goto-next"));var b=t();this.lastNumber||this.hideGotoEndButtons||(b=p(n,this.labelLastPage,"last-text",this.lastText,this.lastClass,n,"pagination-goto-last")),i.push(b);var y=t("ul",{ref:"ul",staticClass:"pagination",class:["b-pagination",this.btnSize,this.alignment,this.styleClass],attrs:{role:d?null:"menubar","aria-disabled":r?"true":"false","aria-label":d?null:this.ariaLabel||null},on:d?{}:{keydown:this.handleKeyNav}},i);return d?t("nav",{attrs:{"aria-disabled":r?"true":null,"aria-hidden":r?"true":"false","aria-label":d&&this.ariaLabel||null}},[y]):y}},fd={size:{type:String,default:function(){return Nt("BPagination","size")}},perPage:{type:[Number,String],default:20},totalRows:{type:[Number,String],default:0},ariaControls:{type:String}},pd=function(t){return ai(Ht(t)||20,1)},md=function(t){return ai(Ht(t)||0,0)},vd=Dt({components:{BPagination:t.extend({name:"BPagination",mixins:[hd],props:fd,computed:{numberOfPages:function(){var t=oi(md(this.totalRows)/pd(this.perPage));return t<1?1:t},pageSizeNumberOfPages:function(){return{perPage:pd(this.perPage),totalRows:md(this.totalRows),numberOfPages:this.numberOfPages}}},watch:{pageSizeNumberOfPages:function(t,e){ot(e)||(t.perPage!==e.perPage&&t.totalRows===e.totalRows||t.numberOfPages!==e.numberOfPages&&this.currentPage>t.numberOfPages)&&(this.currentPage=1),this.localNumberOfPages=t.numberOfPages}},created:function(){var t=this;this.localNumberOfPages=this.numberOfPages;var e=Ht(this.value,0);e>0?this.currentPage=e:this.$nextTick((function(){t.currentPage=0}))},mounted:function(){this.localNumberOfPages=this.numberOfPages},methods:{onClick:function(t,e){var i=this;t>this.numberOfPages?t=this.numberOfPages:t<1&&(t=1),this.currentPage=t,this.$emit("change",this.currentPage),this.$nextTick((function(){var t=e.target;fe(t)&&i.$el.contains(t)?Ee(t):i.focusCurrent()}))},makePage:function(t){return t},linkProps:function(){return{}}}})}}),gd="BPaginationNav",bd=R(Ni,["event","routerTag"]),yd=s({size:{type:String,default:function(){return Nt(gd,"size")}},numberOfPages:{type:[Number,String],default:1,validator:function(t){return!(Ht(t,0)<1)||(yt('Prop "number-of-pages" must be a number greater than "0"',gd),!1)}},baseUrl:{type:String,default:"/"},useRouter:{type:Boolean,default:!1},linkGen:{type:Function},pageGen:{type:Function},pages:{type:Array},noPageDetect:{type:Boolean,default:!1}},bd),Sd=Dt({components:{BPaginationNav:t.extend({name:gd,mixins:[hd],props:yd,computed:{isNav:function(){return!0},computedValue:function(){var t=Ht(this.value,0);return t<1?null:t}},watch:{numberOfPages:function(){var t=this;this.$nextTick((function(){t.setNumberOfPages()}))},pages:function(){var t=this;this.$nextTick((function(){t.setNumberOfPages()}))}},created:function(){this.setNumberOfPages()},mounted:function(){var t=this;this.$router&&this.$watch("$route",(function(){t.$nextTick((function(){se((function(){t.guessCurrentPage()}))}))}))},methods:{setNumberOfPages:function(){var t,e=this;k(this.pages)&&this.pages.length>0?this.localNumberOfPages=this.pages.length:this.localNumberOfPages=(t=this.numberOfPages,ai(Ht(t,0),1)),this.$nextTick((function(){e.guessCurrentPage()}))},onClick:function(t,e){var i=this;t!==this.currentPage&&(se((function(){i.currentPage=t,i.$emit("change",t)})),this.$nextTick((function(){var t=e.currentTarget||e.target;Ve(t)})))},getPageInfo:function(t){if(!k(this.pages)||0===this.pages.length||at(this.pages[t-1])){var e="".concat(this.baseUrl).concat(t);return{link:this.useRouter?{path:e}:e,text:Jt(t)}}var i=this.pages[t-1];if(V(i)){var n=i.link;return{link:V(n)?n:this.useRouter?{path:n}:n,text:Jt(i.text||t)}}return{link:Jt(i),text:Jt(t)}},makePage:function(t){var e=this.getPageInfo(t);return this.pageGen&&st(this.pageGen)?this.pageGen(t,e):e.text},makeLink:function(t){var e=this.getPageInfo(t);return this.linkGen&&st(this.linkGen)?this.linkGen(t,e):e.link},linkProps:function(t){var e=gi(bd,this),i=this.makeLink(t);return this.useRouter||V(i)?e.to=i:e.href=i,e},resolveLink:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{(t=document.createElement("a")).href=Pi({to:e},"a","/","/"),document.body.appendChild(t);var i=t,n=i.pathname,a=i.hash,r=i.search;return document.body.removeChild(t),{path:n,hash:a,query:xi(r)}}catch(e){try{t&&t.parentNode&&t.parentNode.removeChild(t)}catch(t){}return{}}},resolveRoute:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{var e=this.$router.resolve(t,this.$route).route;return{path:e.path,hash:e.hash,query:e.query}}catch(t){return{}}},guessCurrentPage:function(){var t=this.computedValue,e=this.$router,i=this.$route;if(!this.noPageDetect&&!t&&(U||!U&&e))for(var n=e&&i?{path:i.path,hash:i.hash,query:i.query}:{},a=U?window.location||document.location:null,r=a?{path:a.pathname,hash:a.hash,query:xi(a.search)}:{},o=1;!t&&o<=this.localNumberOfPages;o++){var s=this.makeLink(o);t=e&&(V(s)||this.useRouter)?qn(this.resolveRoute(s),n)?o:null:U?qn(this.resolveLink(s),r)?o:null:-1}this.currentPage=t>0?t:0}}})}}),Td={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOPLEFT:"top",TOPRIGHT:"top",RIGHTTOP:"right",RIGHTBOTTOM:"right",BOTTOMLEFT:"bottom",BOTTOMRIGHT:"bottom",LEFTTOP:"left",LEFTBOTTOM:"left"},wd={AUTO:0,TOPLEFT:-1,TOP:0,TOPRIGHT:1,RIGHTTOP:-1,RIGHT:0,RIGHTBOTTOM:1,BOTTOMLEFT:-1,BOTTOM:0,BOTTOMRIGHT:1,LEFTTOP:-1,LEFT:0,LEFTBOTTOM:1},Bd=t.extend({name:"BVPopper",props:{target:{type:[HTMLElement,SVGElement]},placement:{type:String,default:"top"},fallbackPlacement:{type:[String,Array],default:"flip"},offset:{type:Number,default:0},boundary:{type:[String,HTMLElement],default:"scrollParent"},boundaryPadding:{type:Number,default:5},arrowPadding:{type:Number,default:6}},data:function(){return{noFade:!1,localShow:!0,attachment:this.getAttachment(this.placement)}},computed:{templateType:function(){return"unknown"},popperConfig:function(){var t=this,e=this.placement;return{placement:this.getAttachment(e),modifiers:{offset:{offset:this.getOffset(e)},flip:{behavior:this.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{padding:this.boundaryPadding,boundariesElement:this.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t.popperPlacementChange(e)},onUpdate:function(e){t.popperPlacementChange(e)}}}},created:function(){var t=this;this.$_popper=null,this.localShow=!0,this.$on("show",(function(e){t.popperCreate(e)})),this.$on("hidden",(function(){t.$nextTick(t.$destroy)})),this.$parent.$once("hook:destroyed",this.$destroy)},beforeMount:function(){this.attachment=this.getAttachment(this.placement)},mounted:function(){},updated:function(){this.updatePopper()},beforeDestroy:function(){this.destroyPopper()},destroyed:function(){var t=this.$el;t&&t.parentNode&&t.parentNode.removeChild(t)},methods:{hide:function(){this.localShow=!1},getAttachment:function(t){return Td[String(t).toUpperCase()]||"auto"},getOffset:function(t){if(!this.offset){var e=this.$refs.arrow||ge(".arrow",this.$el),i=zt(_e(e).width,0)+zt(this.arrowPadding,0);switch(wd[String(t).toUpperCase()]||0){case 1:return"+50%p - ".concat(i,"px");case-1:return"-50%p + ".concat(i,"px");default:return 0}}return this.offset},popperCreate:function(t){this.destroyPopper(),this.$_popper=new ts(this.target,t,this.popperConfig)},destroyPopper:function(){this.$_popper&&this.$_popper.destroy(),this.$_popper=null},updatePopper:function(){this.$_popper&&this.$_popper.scheduleUpdate()},popperPlacementChange:function(t){this.attachment=this.getAttachment(t.placement)},renderTemplate:function(t){return t("div")}},render:function(t){var e=this;return t(Ue,{props:{appear:!0,noFade:this.noFade},on:{beforeEnter:function(t){return e.$emit("show",t)},afterEnter:function(t){return e.$emit("shown",t)},beforeLeave:function(t){return e.$emit("hide",t)},afterLeave:function(t){return e.$emit("hidden",t)}}},[this.localShow?this.renderTemplate(t):t()])}}),Cd=t.extend({name:"BVTooltipTemplate",extends:Bd,mixins:[yc],props:{id:{type:String},html:{type:Boolean}},data:function(){return{title:"",content:"",variant:null,customClass:null,interactive:!0}},computed:{templateType:function(){return"tooltip"},templateClasses:function(){var t;return[(t={noninteractive:!this.interactive},r(t,"b-".concat(this.templateType,"-").concat(this.variant),this.variant),r(t,"bs-".concat(this.templateType,"-").concat(this.attachment),this.attachment),t),this.customClass]},templateAttributes:function(){return s({id:this.id,role:"tooltip",tabindex:"-1"},this.scopedStyleAttrs)},templateListeners:function(){var t=this;return{mouseenter:function(e){t.$emit("mouseenter",e)},mouseleave:function(e){t.$emit("mouseleave",e)},focusin:function(e){t.$emit("focusin",e)},focusout:function(e){t.$emit("focusout",e)}}}},methods:{renderTemplate:function(t){var e=st(this.title)?this.title({}):ot(this.title)?t():this.title,i=this.html&&!st(this.title)?{innerHTML:this.title}:{};return t("div",{staticClass:"tooltip b-tooltip",class:this.templateClasses,attrs:this.templateAttributes,on:this.templateListeners},[t("div",{ref:"arrow",staticClass:"arrow"}),t("div",{staticClass:"tooltip-inner",domProps:i},[e])])}}}),kd=".modal-content",xd=[kd,".b-sidebar"].join(", "),$d={title:"",content:"",variant:null,customClass:null,triggers:"",placement:"auto",fallbackPlacement:"flip",target:null,container:null,noFade:!1,boundary:"scrollParent",boundaryPadding:5,offset:0,delay:0,arrowPadding:6,interactive:!0,disabled:!1,id:null,html:!1},Dd=t.extend({name:"BVTooltip",props:{},data:function(){return s(s({},$d),{},{activeTrigger:{hover:!1,click:!1,focus:!1},localShow:!1})},computed:{templateType:function(){return"tooltip"},computedId:function(){return this.id||"__bv_".concat(this.templateType,"_").concat(this._uid,"__")},computedDelay:function(){var t={show:0,hide:0};return N(this.delay)?(t.show=ai(Ht(this.delay.show,0),0),t.hide=ai(Ht(this.delay.hide,0),0)):(ct(this.delay)||ut(this.delay))&&(t.show=t.hide=ai(Ht(this.delay,0),0)),t},computedTriggers:function(){return $(this.triggers).filter(Boolean).join(" ").trim().toLowerCase().split(/\s+/).sort()},isWithActiveTrigger:function(){for(var t in this.activeTrigger)if(this.activeTrigger[t])return!0;return!1},computedTemplateData:function(){return{title:this.title,content:this.content,variant:this.variant,customClass:this.customClass,noFade:this.noFade,interactive:this.interactive}}},watch:{computedTriggers:function(t,e){var i=this;qn(t,e)||this.$nextTick((function(){i.unListen(),e.forEach((function(e){x(t,e)||i.activeTrigger[e]&&(i.activeTrigger[e]=!1)})),i.listen()}))},computedTemplateData:function(){this.handleTemplateUpdate()},disabled:function(t){t?this.disable():this.enable()}},created:function(){var t=this;this.$_tip=null,this.$_hoverTimeout=null,this.$_hoverState="",this.$_visibleInterval=null,this.$_enabled=!this.disabled,this.$_noop=or.bind(this),this.$parent&&this.$parent.$once("hook:beforeDestroy",this.$destroy),this.$nextTick((function(){var e=t.getTarget();e&&Se(document.body,e)?(t.scopeId=bc(t.$parent),t.listen()):yt("Unable to find target element in document.",t.templateType)}))},updated:function(){this.$nextTick(this.handleTemplateUpdate)},deactivated:function(){this.forceHide()},beforeDestroy:function(){this.unListen(),this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.clearVisibilityInterval(),this.destroyTemplate(),this.$_noop=null},methods:{getTemplate:function(){return Cd},updateData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=!1;A($d).forEach((function(n){at(e[n])||t[n]===e[n]||(t[n]=e[n],"title"===n&&(i=!0))})),i&&this.localShow&&this.fixTitle()},createTemplateAndShow:function(){var t=this.getContainer(),e=this.getTemplate(),i=this.$_tip=new e({parent:this,propsData:{id:this.computedId,html:this.html,placement:this.placement,fallbackPlacement:this.fallbackPlacement,target:this.getPlacementTarget(),boundary:this.getBoundary(),offset:Ht(this.offset,0),arrowPadding:Ht(this.arrowPadding,0),boundaryPadding:Ht(this.boundaryPadding,0)}});this.handleTemplateUpdate(),i.$once("show",this.onTemplateShow),i.$once("shown",this.onTemplateShown),i.$once("hide",this.onTemplateHide),i.$once("hidden",this.onTemplateHidden),i.$once("hook:destroyed",this.destroyTemplate),i.$on("focusin",this.handleEvent),i.$on("focusout",this.handleEvent),i.$on("mouseenter",this.handleEvent),i.$on("mouseleave",this.handleEvent),i.$mount(t.appendChild(document.createElement("div")))},hideTemplate:function(){this.$_tip&&this.$_tip.hide(),this.clearActiveTriggers(),this.$_hoverState=""},destroyTemplate:function(){this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.$_hoverState="",this.clearActiveTriggers(),this.localPlacementTarget=null;try{this.$_tip.$destroy()}catch(t){}this.$_tip=null,this.removeAriaDescribedby(),this.restoreTitle(),this.localShow=!1},getTemplateElement:function(){return this.$_tip?this.$_tip.$el:null},handleTemplateUpdate:function(){var t=this,e=this.$_tip;if(e){["title","content","variant","customClass","noFade","interactive"].forEach((function(i){e[i]!==t[i]&&(e[i]=t[i])}))}},show:function(){var t=this.getTarget();if(t&&Se(document.body,t)&&fe(t)&&!this.dropdownOpen()&&(!ot(this.title)&&""!==this.title||!ot(this.content)&&""!==this.content)&&!this.$_tip&&!this.localShow){this.localShow=!0;var e=this.buildEvent("show",{cancelable:!0});this.emitEvent(e),e.defaultPrevented?this.destroyTemplate():(this.fixTitle(),this.addAriaDescribedby(),this.createTemplateAndShow())}},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getTemplateElement();if(e&&this.localShow){var i=this.buildEvent("hide",{cancelable:!t});this.emitEvent(i),i.defaultPrevented||this.hideTemplate()}else this.restoreTitle()},forceHide:function(){this.getTemplateElement()&&this.localShow&&(this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.$_hoverState="",this.clearActiveTriggers(),this.$_tip&&(this.$_tip.noFade=!0),this.hide(!0))},enable:function(){this.$_enabled=!0,this.emitEvent(this.buildEvent("enabled"))},disable:function(){this.$_enabled=!1,this.emitEvent(this.buildEvent("disabled"))},onTemplateShow:function(){this.setWhileOpenListeners(!0)},onTemplateShown:function(){var t=this.$_hoverState;this.$_hoverState="","out"===t&&this.leave(null),this.emitEvent(this.buildEvent("shown"))},onTemplateHide:function(){this.setWhileOpenListeners(!1)},onTemplateHidden:function(){this.destroyTemplate(),this.emitEvent(this.buildEvent("hidden"))},getTarget:function(){var t=this.target?this.target.$el||this.target:null;return t=ut(t)?Te(t.replace(/^#/,"")):t,t=st(t)?t():t,ue(t)?t:null},getPlacementTarget:function(){return this.getTarget()},getTargetId:function(){var t=this.getTarget();return t&&t.id?t.id:null},getContainer:function(){var t=!!this.container&&(this.container.$el||this.container),e=document.body,i=this.getTarget();return!1===t?ye(xd,i)||e:ut(t)&&Te(t.replace(/^#/,""))||e},getBoundary:function(){return this.boundary?this.boundary.$el||this.boundary:"scrollParent"},isInModal:function(){var t=this.getTarget();return t&&ye(kd,t)},isDropdown:function(){var t=this.getTarget();return t&&Ce(t,"dropdown")},dropdownOpen:function(){var t=this.getTarget();return this.isDropdown()&&t&&ge(".dropdown-menu.show",t)},clearHoverTimeout:function(){clearTimeout(this.$_hoverTimeout),this.$_hoverTimeout=null},clearVisibilityInterval:function(){clearInterval(this.$_visibleInterval),this.$_visibleInterval=null},clearActiveTriggers:function(){for(var t in this.activeTrigger)this.activeTrigger[t]=!1},addAriaDescribedby:function(){var t=this.getTarget(),e=$e(t,"aria-describedby")||"";e=e.split(/\s+/).concat(this.computedId).join(" ").trim(),ke(t,"aria-describedby",e)},removeAriaDescribedby:function(){var t=this,e=this.getTarget(),i=$e(e,"aria-describedby")||"";(i=i.split(/\s+/).filter((function(e){return e!==t.computedId})).join(" ").trim())?ke(e,"aria-describedby",i):xe(e,"aria-describedby")},fixTitle:function(){var t=this.getTarget();t&&$e(t,"title")&&(ke(t,"data-original-title",$e(t,"title")||""),ke(t,"title",""))},restoreTitle:function(){var t=this.getTarget();t&&De(t,"data-original-title")&&(ke(t,"title",$e(t,"data-original-title")||""),xe(t,"data-original-title"))},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new BvEvent(t,s({cancelable:!1,target:this.getTarget(),relatedTarget:this.getTemplateElement()||null,componentId:this.computedId,vueTarget:this},e))},emitEvent:function(t){var e=t.type,i=this.$root;i&&i.$emit&&i.$emit("bv::".concat(this.templateType,"::").concat(e),t),this.$emit(e,t)},listen:function(){var t=this,e=this.getTarget();e&&(this.setRootListener(!0),this.computedTriggers.forEach((function(i){"click"===i?dr(e,"click",t.handleEvent,ur):"focus"===i?(dr(e,"focusin",t.handleEvent,ur),dr(e,"focusout",t.handleEvent,ur)):"blur"===i?dr(e,"focusout",t.handleEvent,ur):"hover"===i&&(dr(e,"mouseenter",t.handleEvent,ur),dr(e,"mouseleave",t.handleEvent,ur))}),this))},unListen:function(){var t=this,e=this.getTarget();this.setRootListener(!1),["click","focusin","focusout","mouseenter","mouseleave"].forEach((function(i){e&&hr(e,i,t.handleEvent,ur)}),this)},setRootListener:function(t){var e=this.$root;if(e){var i=t?"$on":"$off",n=this.templateType;e[i]("bv::hide::".concat(n),this.doHide),e[i]("bv::show::".concat(n),this.doShow),e[i]("bv::disable::".concat(n),this.doDisable),e[i]("bv::enable::".concat(n),this.doEnable)}},setWhileOpenListeners:function(t){this.setModalListener(t),this.setDropdownListener(t),this.visibleCheck(t),this.setOnTouchStartListener(t)},visibleCheck:function(t){var e=this;this.clearVisibilityInterval();var i=this.getTarget(),n=this.getTemplateElement();t&&(this.$_visibleInterval=setInterval((function(){!n||!e.localShow||i.parentNode&&fe(i)||e.forceHide()}),100))},setModalListener:function(t){this.isInModal()&&this.$root[t?"$on":"$off"]("bv::modal::hidden",this.forceHide)},setOnTouchStartListener:function(t){var e=this;"ontouchstart"in document.documentElement&&C(document.body.children).forEach((function(i){fr(t,i,"mouseover",e.$_noop)}))},setDropdownListener:function(t){var e=this.getTarget();e&&this.$root&&this.isDropdown&&e.__vue__&&e.__vue__[t?"$on":"$off"]("shown",this.forceHide)},handleEvent:function(t){var e=this.getTarget();if(e&&!pe(e)&&this.$_enabled&&!this.dropdownOpen()){var i=t.type,n=this.computedTriggers;if("click"===i&&x(n,"click"))this.click(t);else if("mouseenter"===i&&x(n,"hover"))this.enter(t);else if("focusin"===i&&x(n,"focus"))this.enter(t);else if("focusout"===i&&(x(n,"focus")||x(n,"blur"))||"mouseleave"===i&&x(n,"hover")){var a=this.getTemplateElement(),r=t.target,o=t.relatedTarget;if(a&&Se(a,r)&&Se(e,o)||a&&Se(e,r)&&Se(a,o)||a&&Se(a,r)&&Se(a,o)||Se(e,r)&&Se(e,o))return;this.leave(t)}}},doHide:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.forceHide()},doShow:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.show()},doDisable:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.disable()},doEnable:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.enable()},click:function(t){this.$_enabled&&!this.dropdownOpen()&&(Ee(t.currentTarget),this.activeTrigger.click=!this.activeTrigger.click,this.isWithActiveTrigger?this.enter(null):this.leave(null))},toggle:function(){this.$_enabled&&!this.dropdownOpen()&&(this.localShow?this.leave(null):this.enter(null))},enter:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(this.activeTrigger["focusin"===e.type?"focus":"hover"]=!0),this.localShow||"in"===this.$_hoverState?this.$_hoverState="in":(this.clearHoverTimeout(),this.$_hoverState="in",this.computedDelay.show?(this.fixTitle(),this.$_hoverTimeout=setTimeout((function(){"in"===t.$_hoverState?t.show():t.localShow||t.restoreTitle()}),this.computedDelay.show)):this.show())},leave:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(this.activeTrigger["focusout"===e.type?"focus":"hover"]=!1,"focusout"===e.type&&x(this.computedTriggers,"blur")&&(this.activeTrigger.click=!1,this.activeTrigger.hover=!1)),this.isWithActiveTrigger||(this.clearHoverTimeout(),this.$_hoverState="out",this.computedDelay.hide?this.$_hoverTimeout=setTimeout((function(){"out"===t.$_hoverState&&t.hide()}),this.computedDelay.hide):this.hide())}}}),Pd="BTooltip",_d=t.extend({name:Pd,props:{title:{type:String},target:{type:[String,HTMLElement,SVGElement,Function,Object],required:!0},triggers:{type:[String,Array],default:"hover focus"},placement:{type:String,default:"top"},fallbackPlacement:{type:[String,Array],default:"flip",validator:function(t){return k(t)&&t.every((function(t){return ut(t)}))||x(["flip","clockwise","counterclockwise"],t)}},variant:{type:String,default:function(){return Nt(Pd,"variant")}},customClass:{type:String,default:function(){return Nt(Pd,"customClass")}},delay:{type:[Number,Object,String],default:function(){return Nt(Pd,"delay")}},boundary:{type:[String,HTMLElement,Object],default:function(){return Nt(Pd,"boundary")}},boundaryPadding:{type:[Number,String],default:function(){return Nt(Pd,"boundaryPadding")}},offset:{type:[Number,String],default:0},noFade:{type:Boolean,default:!1},container:{type:[String,HTMLElement,Object]},show:{type:Boolean,default:!1},noninteractive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{type:String}},data:function(){return{localShow:this.show,localTitle:"",localContent:""}},computed:{templateData:function(){return{title:this.localTitle,content:this.localContent,target:this.target,triggers:this.triggers,placement:this.placement,fallbackPlacement:this.fallbackPlacement,variant:this.variant,customClass:this.customClass,container:this.container,boundary:this.boundary,boundaryPadding:this.boundaryPadding,delay:this.delay,offset:this.offset,noFade:this.noFade,interactive:!this.noninteractive,disabled:this.disabled,id:this.id}},templateTitleContent:function(){return{title:this.title,content:this.content}}},watch:{show:function(t,e){t!==e&&t!==this.localShow&&this.$_toolpop&&(t?this.$_toolpop.show():this.$_toolpop.forceHide())},disabled:function(t){t?this.doDisable():this.doEnable()},localShow:function(t){this.$emit("update:show",t)},templateData:function(){var t=this;this.$nextTick((function(){t.$_toolpop&&t.$_toolpop.updateData(t.templateData)}))},templateTitleContent:function(){this.$nextTick(this.updateContent)}},created:function(){this.$_toolpop=null},updated:function(){this.$nextTick(this.updateContent)},beforeDestroy:function(){this.$off("open",this.doOpen),this.$off("close",this.doClose),this.$off("disable",this.doDisable),this.$off("enable",this.doEnable),this.$_toolpop&&(this.$_toolpop.$destroy(),this.$_toolpop=null)},mounted:function(){var t=this;this.$nextTick((function(){var e=t.getComponent();t.updateContent();var i=bc(t)||bc(t.$parent),n=t.$_toolpop=new e({parent:t,_scopeId:i||void 0});n.updateData(t.templateData),n.$on("show",t.onShow),n.$on("shown",t.onShown),n.$on("hide",t.onHide),n.$on("hidden",t.onHidden),n.$on("disabled",t.onDisabled),n.$on("enabled",t.onEnabled),t.disabled&&t.doDisable(),t.$on("open",t.doOpen),t.$on("close",t.doClose),t.$on("disable",t.doDisable),t.$on("enable",t.doEnable),t.localShow&&n.show()}))},methods:{getComponent:function(){return Dd},updateContent:function(){this.setTitle(this.$scopedSlots.default||this.title)},setTitle:function(t){t=ot(t)?"":t,this.localTitle!==t&&(this.localTitle=t)},setContent:function(t){t=ot(t)?"":t,this.localContent!==t&&(this.localContent=t)},onShow:function(t){this.$emit("show",t),t&&(this.localShow=!t.defaultPrevented)},onShown:function(t){this.localShow=!0,this.$emit("shown",t)},onHide:function(t){this.$emit("hide",t)},onHidden:function(t){this.$emit("hidden",t),this.localShow=!1},onDisabled:function(t){t&&"disabled"===t.type&&(this.$emit("update:disabled",!0),this.$emit("disabled",t))},onEnabled:function(t){t&&"enabled"===t.type&&(this.$emit("update:disabled",!1),this.$emit("enabled",t))},doOpen:function(){!this.localShow&&this.$_toolpop&&this.$_toolpop.show()},doClose:function(){this.localShow&&this.$_toolpop&&this.$_toolpop.hide()},doDisable:function(){this.$_toolpop&&this.$_toolpop.disable()},doEnable:function(){this.$_toolpop&&this.$_toolpop.enable()}},render:function(t){return t()}}),Fd=t.extend({name:"BVPopoverTemplate",extends:Cd,computed:{templateType:function(){return"popover"}},methods:{renderTemplate:function(t){var e=st(this.title)?this.title({}):this.title,i=st(this.content)?this.content({}):this.content,n=this.html&&!st(this.title)?{innerHTML:this.title}:{},a=this.html&&!st(this.content)?{innerHTML:this.content}:{};return t("div",{staticClass:"popover b-popover",class:this.templateClasses,attrs:this.templateAttributes,on:this.templateListeners},[t("div",{ref:"arrow",staticClass:"arrow"}),ot(e)||""===e?t():t("h3",{staticClass:"popover-header",domProps:n},[e]),ot(i)||""===i?t():t("div",{staticClass:"popover-body",domProps:a},[i])])}}}),Id=t.extend({name:"BVPopover",extends:Dd,computed:{templateType:function(){return"popover"}},methods:{getTemplate:function(){return Fd}}}),Od="BPopover",Ad=t.extend({name:Od,extends:_d,inheritAttrs:!1,props:{title:{type:String},content:{type:String},triggers:{type:[String,Array],default:"click"},placement:{type:String,default:"right"},variant:{type:String,default:function(){return Nt(Od,"variant")}},customClass:{type:String,default:function(){return Nt(Od,"customClass")}},delay:{type:[Number,Object,String],default:function(){return Nt(Od,"delay")}},boundary:{type:[String,HTMLElement,Object],default:function(){return Nt(Od,"boundary")}},boundaryPadding:{type:[Number,String],default:function(){return Nt(Od,"boundaryPadding")}}},methods:{getComponent:function(){return Id},updateContent:function(){this.setContent(this.$scopedSlots.default||this.content),this.setTitle(this.$scopedSlots.title||this.title)}}}),Ed="__BV_Popover__",Vd={focus:!0,hover:!0,click:!0,blur:!0,manual:!0},Nd=/^html$/i,Ld=/^nofade$/i,Md=/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/i,Rd=/^(window|viewport|scrollParent)$/i,Hd=/^d\d+$/i,zd=/^ds\d+$/i,jd=/^dh\d+$/i,Gd=/^o-?\d+$/i,Wd=/^v-.+$/i,Ud=/\s+/,Yd=function(t,e,i){if(U){var n=function(t,e){var i="BPopover",n={title:void 0,content:void 0,trigger:"",placement:"right",fallbackPlacement:"flip",container:!1,animation:!0,offset:0,disabled:!1,id:null,html:!1,delay:Nt(i,"delay"),boundary:String(Nt(i,"boundary")),boundaryPadding:Ht(Nt(i,"boundaryPadding"),0),variant:Nt(i,"variant"),customClass:Nt(i,"customClass")};if(ut(t.value)||ct(t.value)||st(t.value)?n.content=t.value:N(t.value)&&(n=s(s({},n),t.value)),t.arg&&(n.container="#".concat(t.arg)),at(n.title)){var a=e.data||{};n.title=a.attrs&&!ot(a.attrs.title)?a.attrs.title:void 0}N(n.delay)||(n.delay={show:Ht(n.delay,0),hide:Ht(n.delay,0)}),A(t.modifiers).forEach((function(t){if(Nd.test(t))n.html=!0;else if(Ld.test(t))n.animation=!1;else if(Md.test(t))n.placement=t;else if(Rd.test(t))t="scrollparent"===t?"scrollParent":t,n.boundary=t;else if(Hd.test(t)){var e=Ht(t.slice(1),0);n.delay.show=e,n.delay.hide=e}else zd.test(t)?n.delay.show=Ht(t.slice(2),0):jd.test(t)?n.delay.hide=Ht(t.slice(2),0):Gd.test(t)?n.offset=Ht(t.slice(1),0):Wd.test(t)&&(n.variant=t.slice(2)||null)}));var r={};return $(n.trigger||"").filter(mt).join(" ").trim().toLowerCase().split(Ud).forEach((function(t){Vd[t]&&(r[t]=!0)})),A(t.modifiers).forEach((function(t){t=t.toLowerCase(),Vd[t]&&(r[t]=!0)})),n.trigger=A(r).join(" "),"blur"===n.trigger&&(n.trigger="focus"),n.trigger||(n.trigger="click"),n}(e,i);if(!t[Ed]){var a=i.context;t[Ed]=new Id({parent:a,_scopeId:bc(a,void 0)}),t[Ed].__bv_prev_data__={},t[Ed].$on("show",(function(){var e={};st(n.title)&&(e.title=n.title(t)),st(n.content)&&(e.content=n.content(t)),A(e).length>0&&t[Ed].updateData(e)}))}var r={title:n.title,content:n.content,triggers:n.trigger,placement:n.placement,fallbackPlacement:n.fallbackPlacement,variant:n.variant,customClass:n.customClass,container:n.container,boundary:n.boundary,delay:n.delay,offset:n.offset,noFade:!n.animation,id:n.id,disabled:n.disabled,html:n.html},o=t[Ed].__bv_prev_data__;if(t[Ed].__bv_prev_data__=r,!qn(r,o)){var l={target:t};A(r).forEach((function(e){r[e]!==o[e]&&(l[e]="title"!==e&&"content"!==e||!st(r[e])?r[e]:r[e](t))})),t[Ed].updateData(l)}}},qd=Dt({directives:{VBPopover:{bind:function(t,e,i){Yd(t,e,i)},componentUpdated:function(t,e,i){i.context.$nextTick((function(){Yd(t,e,i)}))},unbind:function(t){!function(t){t[Ed]&&(t[Ed].$destroy(),t[Ed]=null),delete t[Ed]}(t)}}}}),Kd=Dt({components:{BPopover:Ad},plugins:{VBPopoverPlugin:qd}}),Xd=t.extend({name:"BProgressBar",mixins:[Ke],inject:{bvProgress:{default:function(){return{}}}},props:{value:{type:[Number,String],default:0},label:{type:String},labelHtml:{type:String},max:{type:[Number,String],default:null},precision:{type:[Number,String],default:null},variant:{type:String,default:function(){return Nt("BProgressBar","variant")}},striped:{type:Boolean,default:null},animated:{type:Boolean,default:null},showProgress:{type:Boolean,default:null},showValue:{type:Boolean,default:null}},computed:{progressBarClasses:function(){return[this.computedVariant?"bg-".concat(this.computedVariant):"",this.computedStriped||this.computedAnimated?"progress-bar-striped":"",this.computedAnimated?"progress-bar-animated":""]},progressBarStyles:function(){return{width:this.computedValue/this.computedMax*100+"%"}},computedValue:function(){return zt(this.value,0)},computedMax:function(){var t=zt(this.max)||zt(this.bvProgress.max,0);return t>0?t:100},computedPrecision:function(){return ai(Ht(this.precision,Ht(this.bvProgress.precision,0)),0)},computedProgress:function(){var t=this.computedPrecision,e=li(10,t);return jt(100*e*this.computedValue/this.computedMax/e,t)},computedVariant:function(){return this.variant||this.bvProgress.variant},computedStriped:function(){return lt(this.striped)?this.striped:this.bvProgress.striped||!1},computedAnimated:function(){return lt(this.animated)?this.animated:this.bvProgress.animated||!1},computedShowProgress:function(){return lt(this.showProgress)?this.showProgress:this.bvProgress.showProgress||!1},computedShowValue:function(){return lt(this.showValue)?this.showValue:this.bvProgress.showValue||!1}},render:function(t){var e=this.label,i=this.labelHtml,n=this.computedValue,a=this.computedPrecision,r=t(),o={};return this.hasNormalizedSlot("default")?r=this.normalizeSlot("default"):e||i?o=An(i,e):this.computedShowProgress?r=this.computedProgress:this.computedShowValue&&(r=jt(n,a)),t("div",{staticClass:"progress-bar",class:this.progressBarClasses,style:this.progressBarStyles,attrs:{role:"progressbar","aria-valuemin":"0","aria-valuemax":Jt(this.computedMax),"aria-valuenow":jt(n,a)},domProps:o},[r])}}),Zd=Dt({components:{BProgress:t.extend({name:"BProgress",mixins:[Ke],provide:function(){return{bvProgress:this}},props:{variant:{type:String,default:function(){return Nt("BProgress","variant")}},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1},height:{type:String},precision:{type:[Number,String],default:0},showProgress:{type:Boolean,default:!1},showValue:{type:Boolean,default:!1},max:{type:[Number,String],default:100},value:{type:[Number,String],default:0}},computed:{progressHeight:function(){return{height:this.height||null}}},render:function(t){var e=this.normalizeSlot("default");return e||(e=t(Xd,{props:{value:this.value,max:this.max,precision:this.precision,variant:this.variant,animated:this.animated,striped:this.striped,showProgress:this.showProgress,showValue:this.showValue}})),t("div",{class:["progress"],style:this.progressHeight},[e])}}),BProgressBar:Xd}}),Jd="BSidebar",Qd=function(t,e){if(e.noHeader)return t();var i=function(t,e){var i=e.normalizeSlot("title",e.slotScope)||Jt(e.title)||null;return i?t("strong",{attrs:{id:e.safeId("__title__")}},[i]):t("span")}(t,e),n=function(t,e){if(e.noHeaderClose)return t();var i=e.closeLabel,n=e.textVariant,a=e.hide;return t(Je,{ref:"close-button",props:{ariaLabel:i,textVariant:n},on:{click:a}},[e.normalizeSlot("header-close")||t(yn)])}(t,e);return t("header",{key:"header",staticClass:"".concat("b-sidebar","-header"),class:e.headerClass},e.right?[n,i]:[i,n])},th=function(t,e){return t("div",{key:"body",staticClass:"".concat("b-sidebar","-body"),class:e.bodyClass},[e.normalizeSlot("default",e.slotScope)])},eh=function(t,e){var i=e.normalizeSlot("footer",e.slotScope);return i?t("footer",{key:"footer",staticClass:"".concat("b-sidebar","-footer"),class:e.footerClass},[i]):t()},ih=function(t,e){var i=Qd(t,e);return e.lazy&&!e.isOpen?i:[i,th(t,e),eh(t,e)]},nh=function(t,e){if(!e.backdrop)return t();var i=e.backdropVariant;return t("div",{directives:[{name:"show",value:e.localShow}],staticClass:"b-sidebar-backdrop",class:r({},"bg-".concat(i),!!i),on:{click:e.onBackdropClick}})},ah=Dt({components:{BSidebar:t.extend({name:Jd,mixins:[Oi,ma,kr,Ke],inheritAttrs:!1,model:{prop:"visible",event:"change"},props:{title:{type:String},right:{type:Boolean,default:!1},bgVariant:{type:String,default:function(){return Nt(Jd,"bgVariant")}},textVariant:{type:String,default:function(){return Nt(Jd,"textVariant")}},shadow:{type:[Boolean,String],default:function(){return Nt(Jd,"shadow")}},width:{type:String,default:function(){return Nt(Jd,"width")}},zIndex:{type:[Number,String]},ariaLabel:{type:String},ariaLabelledby:{type:String},closeLabel:{type:String},tag:{type:String,default:function(){return Nt(Jd,"tag")}},sidebarClass:{type:[String,Array,Object]},headerClass:{type:[String,Array,Object]},bodyClass:{type:[String,Array,Object]},footerClass:{type:[String,Array,Object]},backdrop:{type:Boolean,default:!1},backdropVariant:{type:String,default:function(){return Nt(Jd,"backdropVariant")}},noSlide:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noHeaderClose:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnRouteChange:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},data:function(){return{localShow:!!this.visible,isOpen:!!this.visible}},computed:{transitionProps:function(){return this.noSlide?{css:!0}:{css:!0,enterClass:"",enterActiveClass:"slide",enterToClass:"show",leaveClass:"show",leaveActiveClass:"slide",leaveToClass:""}},slotScope:function(){return{visible:this.localShow,right:this.right,hide:this.hide}},computedTile:function(){return this.normalizeSlot("title",this.slotScope)||Jt(this.title)||null},titleId:function(){return this.computedTile?this.safeId("__title__"):null},computedAttrs:function(){return s(s({},this.bvAttrs),{},{id:this.safeId(),tabindex:"-1",role:"dialog","aria-modal":this.backdrop?"true":"false","aria-hidden":this.localShow?null:"true","aria-label":this.ariaLabel||null,"aria-labelledby":this.ariaLabelledby||this.titleId||null})}},watch:{visible:function(t,e){t!==e&&(this.localShow=t)},localShow:function(t,e){t!==e&&(this.emitState(t),this.$emit("change",t))},$route:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.noCloseOnRouteChange||t.fullPath===e.fullPath||this.hide()}},created:function(){this.$_returnFocusEl=null},mounted:function(){var t=this;this.listenOnRoot("bv::toggle::collapse",this.handleToggle),this.listenOnRoot("bv::request::collapse::state",this.handleSync),this.$nextTick((function(){t.emitState(t.localShow)}))},activated:function(){this.emitSync()},beforeDestroy:function(){this.localShow=!1,this.$_returnFocusEl=null},methods:{hide:function(){this.localShow=!1},emitState:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.localShow;this.emitOnRoot(Or,this.safeId(),t)},emitSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.localShow;this.emitOnRoot(Ar,this.safeId(),t)},handleToggle:function(t){t&&t===this.safeId()&&(this.localShow=!this.localShow)},handleSync:function(t){var e=this;t&&t===this.safeId()&&this.$nextTick((function(){e.emitSync(e.localShow)}))},onKeydown:function(t){var e=t.keyCode;!this.noCloseOnEsc&&e===_i.ESC&&this.localShow&&this.hide()},onBackdropClick:function(){this.localShow&&!this.noCloseOnBackdrop&&this.hide()},onTopTrapFocus:function(){var t=Ae(this.$refs.content);Ee(t.reverse()[0])},onBottomTrapFocus:function(){var t=Ae(this.$refs.content);Ee(t[0])},onBeforeEnter:function(){this.$_returnFocusEl=ce(U?[document.body]:[]),this.isOpen=!0},onAfterEnter:function(t){Se(t,ce())||Ee(t),this.$emit("shown")},onAfterLeave:function(){Ee(this.$_returnFocusEl),this.$_returnFocusEl=null,this.isOpen=!1,this.$emit("hidden")}},render:function(t){var e,i=this.localShow,n=""===this.shadow||this.shadow,a=t(this.tag,{ref:"content",directives:[{name:"show",value:i}],staticClass:"b-sidebar",class:[(e={shadow:!0===n},r(e,"shadow-".concat(n),n&&!0!==n),r(e,"".concat("b-sidebar","-right"),this.right),r(e,"bg-".concat(this.bgVariant),!!this.bgVariant),r(e,"text-".concat(this.textVariant),!!this.textVariant),e),this.sidebarClass],attrs:this.computedAttrs,style:{width:this.width}},[ih(t,this)]);a=t("transition",{props:this.transitionProps,on:{beforeEnter:this.onBeforeEnter,afterEnter:this.onAfterEnter,afterLeave:this.onAfterLeave}},[a]);var o=t(Ue,{props:{noFade:this.noSlide}},[nh(t,this)]),s=t(),l=t();return this.backdrop&&this.localShow&&(s=t("div",{attrs:{tabindex:"0"},on:{focus:this.onTopTrapFocus}}),l=t("div",{attrs:{tabindex:"0"},on:{focus:this.onBottomTrapFocus}})),t("div",{staticClass:"b-sidebar-outer",style:{zIndex:this.zIndex},attrs:{tabindex:"-1"},on:{keydown:this.onKeydown}},[s,a,l,o])}})},plugins:{VBTogglePlugin:Yr}}),rh=Dt({components:{BSpinner:rd}}),oh={methods:{hasListener:function(t){var e=this.$listeners||{},i=this._events||{};return!at(e[t])||k(i[t])&&i[t].length>0}}},sh=/_/g,lh=/([a-z])([A-Z])/g,uh=/(\s|^)(\w)/g,ch=function(t){return t.replace(sh," ").replace(lh,(function(t,e,i){return e+" "+i})).replace(uh,(function(t,e,i){return e+i.toUpperCase()}))},dh={_rowVariant:!0,_cellVariants:!0,_showDetails:!0},hh=["a","a *","button","button *","input:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])","textarea:not(.disabled):not([disabled])",'[role="link"]','[role="link"] *','[role="button"]','[role="button"] *',"[tabindex]:not(.disabled):not([disabled])"].join(","),fh=function(t,e){var i=[];if(k(t)&&t.filter(mt).forEach((function(t){if(ut(t))i.push({key:t,label:ch(t)});else if(V(t)&&t.key&&ut(t.key))i.push(L(t));else if(V(t)&&1===A(t).length){var e=A(t)[0],n=function(t,e){var i=null;return ut(e)?i={key:t,label:e}:st(e)?i={key:t,formatter:e}:V(e)?(i=L(e)).key=i.key||t:!1!==e&&(i={key:t}),i}(e,t[e]);n&&i.push(n)}})),0===i.length&&k(e)&&e.length>0){var n=e[0];A(n).forEach((function(t){dh[t]||i.push({key:t,label:ch(t)})}))}var a={};return i.filter((function(t){return!a[t.key]&&(a[t.key]=!0,t.label=ut(t.label)?t.label:ch(t.key),!0)}))},ph={props:{items:{type:Array,default:function(){return[]}},fields:{type:Array,default:null},primaryKey:{type:String},value:{type:Array,default:function(){return[]}}},data:function(){return{localItems:k(this.items)?this.items.slice():[]}},computed:{computedFields:function(){return fh(this.fields,this.localItems)},computedFieldsObj:function(){var t=this.$parent;return this.computedFields.reduce((function(e,i){if(e[i.key]=L(i),i.formatter){var n=i.formatter;ut(n)&&st(t[n])?n=t[n]:st(n)||(n=void 0),e[i.key].formatter=n}return e}),{})},computedItems:function(){return(this.paginatedItems||this.sortedItems||this.filteredItems||this.localItems||[]).slice()},context:function(){return{filter:this.localFilter,sortBy:this.localSortBy,sortDesc:this.localSortDesc,perPage:ai(Ht(this.perPage,0),0),currentPage:ai(Ht(this.currentPage,0),1),apiUrl:this.apiUrl}}},watch:{items:function(t){k(t)?this.localItems=t.slice():ot(t)&&(this.localItems=[])},computedItems:function(t){this.$emit("input",t)},context:function(t,e){qn(t,e)||this.$emit("context-changed",t)}},mounted:function(){this.$emit("input",this.computedItems)},methods:{getFieldFormatter:function(t){var e=this.computedFieldsObj[t];return e?e.formatter:void 0}}},mh={props:{stacked:{type:[Boolean,String],default:!1}},computed:{isStacked:function(){return""===this.stacked||this.stacked},isStackedAlways:function(){return!0===this.isStacked},stackedTableClasses:function(){return r({"b-table-stacked":this.isStackedAlways},"b-table-stacked-".concat(this.stacked),!this.isStackedAlways&&this.isStacked)}}},vh=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return A(t).reduce((function(a,r){if(!dh[r]&&!(e&&e.length>0&&x(e,r))&&(!(i&&i.length>0)||x(i,r))){var o=n[r]||{},s=t[r],l=o.filterByFormatted,u=st(l)?l:l?o.formatter:null;a[r]=st(u)?u(s,r,t):s}return a}),{})},gh=function t(e){return ot(e)?"":V(e)&&!dt(e)?A(e).sort().filter((function(t){return!ot(t)})).map((function(i){return t(e[i])})).join(" "):Jt(e)},bh='Prop "filter-debounce" is deprecated. Use the debounce feature of "" instead.',yh=/[\s\uFEFF\xA0]+/g,Sh={props:{filter:{type:[String,RegExp,Object,Array],default:null},filterFunction:{type:Function},filterIgnoredFields:{type:Array},filterIncludedFields:{type:Array},filterDebounce:{type:[Number,String],deprecated:bh,default:0,validator:function(t){return/^\d+/.test(String(t))}}},data:function(){return{isFiltered:!1,localFilter:this.filterSanitize(this.filter)}},computed:{computedFilterIgnored:function(){return this.filterIgnoredFields?$(this.filterIgnoredFields).filter(mt):null},computedFilterIncluded:function(){return this.filterIncludedFields?$(this.filterIncludedFields).filter(mt):null},computedFilterDebounce:function(){var t=Ht(this.filterDebounce,0);return t>0&&yt(bh,"BTable"),t},localFiltering:function(){return!this.hasProvider||!!this.noProviderFiltering},filteredCheck:function(){return{filteredItems:this.filteredItems,localItems:this.localItems,localFilter:this.localFilter}},localFilterFn:function(){return st(this.filterFunction)?this.filterFunction:null},filteredItems:function(){var t=this.localItems||[],e=this.localFilter,i=this.localFiltering?this.filterFnFactory(this.localFilterFn,e)||this.defaultFilterFnFactory(e):null;return i&&t.length>0?t.filter(i):t}},watch:{computedFilterDebounce:function(t){!t&&this.$_filterTimer&&(this.clearFilterTimer(),this.localFilter=this.filterSanitize(this.filter))},filter:{deep:!0,handler:function(t){var e=this,i=this.computedFilterDebounce;this.clearFilterTimer(),i&&i>0?this.$_filterTimer=setTimeout((function(){e.localFilter=e.filterSanitize(t)}),i):this.localFilter=this.filterSanitize(t)}},filteredCheck:function(t){var e=t.filteredItems,i=t.localFilter,n=!1;i?qn(i,[])||qn(i,{})?n=!1:i&&(n=!0):n=!1,n&&this.$emit("filtered",e,e.length),this.isFiltered=n},isFiltered:function(t,e){!1===t&&!0===e&&this.$emit("filtered",this.localItems,this.localItems.length)}},created:function(){var t=this;this.$_filterTimer=null,this.$nextTick((function(){t.isFiltered=Boolean(t.localFilter)}))},beforeDestroy:function(){this.clearFilterTimer()},methods:{clearFilterTimer:function(){clearTimeout(this.$_filterTimer),this.$_filterTimer=null},filterSanitize:function(t){return!this.localFiltering||this.localFilterFn||ut(t)||ft(t)?pt(t):""},filterFnFactory:function(t,e){if(!t||!st(t)||!e||qn(e,[])||qn(e,{}))return null;return function(i){return t(i,e)}},defaultFilterFnFactory:function(t){var e=this;if(!t||!ut(t)&&!ft(t))return null;var i=t;if(ut(i)){var n=Zt(t).replace(yh,"\\s+");i=new RegExp(".*".concat(n,".*"),"i")}return function(t){return i.lastIndex=0,i.test((n=t,a=e.computedFilterIgnored,r=e.computedFilterIncluded,o=e.computedFieldsObj,V(n)?gh(vh(n,a,r,o)):""));var n,a,r,o}}}},Th=function(t,e){return t.map((function(t,e){return[e,t]})).sort(function(t,e){return this(t[1],e[1])||t[0]-e[0]}.bind(e)).map((function(t){return t[1]}))},wh={props:{sortBy:{type:String,default:""},sortDesc:{type:Boolean,default:!1},sortDirection:{type:String,default:"asc",validator:function(t){return x(["asc","desc","last"],t)}},sortCompare:{type:Function},sortCompareOptions:{type:Object,default:function(){return{numeric:!0}}},sortCompareLocale:{type:[String,Array]},sortNullLast:{type:Boolean,default:!1},noSortReset:{type:Boolean,default:!1},labelSortAsc:{type:String,default:"Click to sort Ascending"},labelSortDesc:{type:String,default:"Click to sort Descending"},labelSortClear:{type:String,default:"Click to clear sorting"},noLocalSorting:{type:Boolean,default:!1},noFooterSorting:{type:Boolean,default:!1},sortIconLeft:{type:Boolean,default:!1}},data:function(){return{localSortBy:this.sortBy||"",localSortDesc:this.sortDesc||!1}},computed:{localSorting:function(){return this.hasProvider?!!this.noProviderSorting:!this.noLocalSorting},isSortable:function(){return this.computedFields.some((function(t){return t.sortable}))},sortedItems:function(){var t=(this.filteredItems||this.localItems||[]).slice(),e=this.localSortBy,i=this.localSortDesc,n=this.sortCompare,a=this.localSorting,r=s(s({},this.sortCompareOptions),{},{usage:"sort"}),o=this.sortCompareLocale||void 0,l=this.sortNullLast;if(e&&a){var u=(this.computedFieldsObj[e]||{}).sortByFormatted,c=st(u)?u:u?this.getFieldFormatter(e):void 0;return Th(t,(function(t,a){var s=null;return st(n)&&(s=n(t,a,e,i,c,r,o)),(ot(s)||!1===s)&&(s=function(t,e,i,n,a,r,o,s){var l=bt(t,i,null),u=bt(e,i,null);return st(a)&&(l=a(l,i,t),u=a(u,i,e)),l=ot(l)?"":l,u=ot(u)?"":u,dt(l)&&dt(u)||ct(l)&&ct(u)?lu?1:0:s&&""===l&&""!==u?1:s&&""!==l&&""===u?-1:gh(l).localeCompare(gh(u),o,r)}(t,a,e,0,c,r,o,l)),(s||0)*(i?-1:1)}))}return t}},watch:{isSortable:function(t){t?this.isSortable&&this.$on("head-clicked",this.handleSort):this.$off("head-clicked",this.handleSort)},sortDesc:function(t){t!==this.localSortDesc&&(this.localSortDesc=t||!1)},sortBy:function(t){t!==this.localSortBy&&(this.localSortBy=t||"")},localSortDesc:function(t,e){t!==e&&this.$emit("update:sortDesc",t)},localSortBy:function(t,e){t!==e&&this.$emit("update:sortBy",t)}},created:function(){this.isSortable&&this.$on("head-clicked",this.handleSort)},methods:{handleSort:function(t,e,i,n){var a=this;if(this.isSortable&&(!n||!this.noFooterSorting)){var r=!1,o=function(){var t=e.sortDirection||a.sortDirection;"asc"===t?a.localSortDesc=!1:"desc"===t&&(a.localSortDesc=!0)};e.sortable?(t===this.localSortBy?this.localSortDesc=!this.localSortDesc:(this.localSortBy=t,o()),r=!0):this.localSortBy&&!this.noSortReset&&(this.localSortBy="",o(),r=!0),r&&this.$emit("sort-changed",this.context)}},sortTheadThClasses:function(t,e,i){return{"b-table-sort-icon-left":e.sortable&&this.sortIconLeft&&!(i&&this.noFooterSorting)}},sortTheadThAttrs:function(t,e,i){if(!this.isSortable||i&&this.noFooterSorting)return{};var n=e.sortable;return{"aria-sort":n&&this.localSortBy===t?this.localSortDesc?"descending":"ascending":n?"none":null}},sortTheadThLabel:function(t,e,i){if(!this.isSortable||i&&this.noFooterSorting)return null;var n="";if(e.sortable)if(this.localSortBy===t)n=this.localSortDesc?this.labelSortAsc:this.labelSortDesc;else{n=this.localSortDesc?this.labelSortDesc:this.labelSortAsc;var a=this.sortDirection||e.sortDirection;"asc"===a?n=this.labelSortAsc:"desc"===a&&(n=this.labelSortDesc)}else this.noSortReset||(n=this.localSortBy?this.labelSortClear:"");return Qt(n)||null}}},Bh={props:{perPage:{type:[Number,String],default:0},currentPage:{type:[Number,String],default:1}},computed:{localPaging:function(){return!this.hasProvider||!!this.noProviderPaging},paginatedItems:function(){var t=this.sortedItems||this.filteredItems||this.localItems||[],e=ai(Ht(this.currentPage,1),1),i=ai(Ht(this.perPage,0),0);return this.localPaging&&i&&(t=t.slice((e-1)*i,e*i)),t}}},Ch={props:{caption:{type:String},captionHtml:{type:String}},computed:{captionId:function(){return this.isStacked?this.safeId("_caption_"):null}},methods:{renderCaption:function(){var t=this.caption,e=this.captionHtml,i=this.$createElement,n=i(),a=this.hasNormalizedSlot("table-caption");return(a||t||e)&&(n=i("caption",{key:"caption",attrs:{id:this.captionId},domProps:a?{}:An(e,t)},this.normalizeSlot("table-caption"))),n}}},kh={methods:{renderColgroup:function(){var t=this.$createElement,e=this.computedFields,i=t();return this.hasNormalizedSlot("table-colgroup")&&(i=t("colgroup",{key:"colgroup"},[this.normalizeSlot("table-colgroup",{columns:e.length,fields:e})])),i}}},xh=["TD","TH","TR"],$h=function(t){if(!t||!t.target)return!1;var e=t.target;if(e.disabled||-1!==xh.indexOf(e.tagName))return!1;if(ye(".dropdown-menu",e))return!0;var i="LABEL"===e.tagName?e:ye("label",e);if(i){var n=$e(i,"for"),a=n?Te(n):ge("input, select, textarea",i);if(a&&!a.disabled)return!0}return be(e,hh)},Dh=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=Fe();return!!(e&&""!==e.toString().trim()&&e.containsNode&&ue(t))&&e.containsNode(t,!0)},Ph={headVariant:{type:String,default:null}},_h=t.extend({name:"BThead",mixins:[Oi,Ai,Ke],inheritAttrs:!1,provide:function(){return{bvTableRowGroup:this}},inject:{bvTable:{default:function(){return{}}}},props:Ph,computed:{isThead:function(){return!0},isDark:function(){return this.bvTable.dark},isStacked:function(){return this.bvTable.isStacked},isResponsive:function(){return this.bvTable.isResponsive},isStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},hasStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},tableVariant:function(){return this.bvTable.tableVariant},theadClasses:function(){return[this.headVariant?"thead-".concat(this.headVariant):null]},theadAttrs:function(){return s({role:"rowgroup"},this.bvAttrs)}},render:function(t){return t("thead",{class:this.theadClasses,attrs:this.theadAttrs,on:this.bvListeners},this.normalizeSlot("default"))}}),Fh={footVariant:{type:String,default:null}},Ih=t.extend({name:"BTfoot",mixins:[Oi,Ai,Ke],inheritAttrs:!1,provide:function(){return{bvTableRowGroup:this}},inject:{bvTable:{default:function(){return{}}}},props:Fh,computed:{isTfoot:function(){return!0},isDark:function(){return this.bvTable.dark},isStacked:function(){return this.bvTable.isStacked},isResponsive:function(){return this.bvTable.isResponsive},isStickyHeader:function(){return!1},hasStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},tableVariant:function(){return this.bvTable.tableVariant},tfootClasses:function(){return[this.footVariant?"thead-".concat(this.footVariant):null]},tfootAttrs:function(){return s({role:"rowgroup"},this.bvAttrs)}},render:function(t){return t("tfoot",{class:this.tfootClasses,attrs:this.tfootAttrs,on:this.bvListeners},this.normalizeSlot("default"))}}),Oh={variant:{type:String,default:null}},Ah=t.extend({name:"BTr",mixins:[Oi,Ai,Ke],inheritAttrs:!1,provide:function(){return{bvTableTr:this}},inject:{bvTableRowGroup:{default:function(){return{}}}},props:Oh,computed:{inTbody:function(){return this.bvTableRowGroup.isTbody},inThead:function(){return this.bvTableRowGroup.isThead},inTfoot:function(){return this.bvTableRowGroup.isTfoot},isDark:function(){return this.bvTableRowGroup.isDark},isStacked:function(){return this.bvTableRowGroup.isStacked},isResponsive:function(){return this.bvTableRowGroup.isResponsive},isStickyHeader:function(){return this.bvTableRowGroup.isStickyHeader},hasStickyHeader:function(){return!this.isStacked&&this.bvTableRowGroup.hasStickyHeader},tableVariant:function(){return this.bvTableRowGroup.tableVariant},headVariant:function(){return this.inThead?this.bvTableRowGroup.headVariant:null},footVariant:function(){return this.inTfoot?this.bvTableRowGroup.footVariant:null},isRowDark:function(){return"light"!==this.headVariant&&"light"!==this.footVariant&&("dark"===this.headVariant||"dark"===this.footVariant||this.isDark)},trClasses:function(){return[this.variant?"".concat(this.isRowDark?"bg":"table","-").concat(this.variant):null]},trAttrs:function(){return s({role:"row"},this.bvAttrs)}},render:function(t){return t("tr",{class:this.trClasses,attrs:this.trAttrs,on:this.bvListeners},this.normalizeSlot("default"))}}),Eh=function(t){return(t=Ht(t,0))>0?t:null},Vh=function(t){return ot(t)||Eh(t)>0},Nh={variant:{type:String,default:null},colspan:{type:[Number,String],default:null,validator:Vh},rowspan:{type:[Number,String],default:null,validator:Vh},stackedHeading:{type:String,default:null},stickyColumn:{type:Boolean,default:!1}},Lh=t.extend({name:"BTableCell",mixins:[Oi,Ai,Ke],inheritAttrs:!1,inject:{bvTableTr:{default:function(){return{}}}},props:Nh,computed:{tag:function(){return"td"},inTbody:function(){return this.bvTableTr.inTbody},inThead:function(){return this.bvTableTr.inThead},inTfoot:function(){return this.bvTableTr.inTfoot},isDark:function(){return this.bvTableTr.isDark},isStacked:function(){return this.bvTableTr.isStacked},isStackedCell:function(){return this.inTbody&&this.isStacked},isResponsive:function(){return this.bvTableTr.isResponsive},isStickyHeader:function(){return this.bvTableTr.isStickyHeader},hasStickyHeader:function(){return this.bvTableTr.hasStickyHeader},isStickyColumn:function(){return!this.isStacked&&(this.isResponsive||this.hasStickyHeader)&&this.stickyColumn},rowVariant:function(){return this.bvTableTr.variant},headVariant:function(){return this.bvTableTr.headVariant},footVariant:function(){return this.bvTableTr.footVariant},tableVariant:function(){return this.bvTableTr.tableVariant},computedColspan:function(){return Eh(this.colspan)},computedRowspan:function(){return Eh(this.rowspan)},cellClasses:function(){var t=this.variant;return(!t&&this.isStickyHeader&&!this.headVariant||!t&&this.isStickyColumn&&this.inTfoot&&!this.footVariant||!t&&this.isStickyColumn&&this.inThead&&!this.headVariant||!t&&this.isStickyColumn&&this.inTbody)&&(t=this.rowVariant||this.tableVariant||"b-table-default"),[t?"".concat(this.isDark?"bg":"table","-").concat(t):null,this.isStickyColumn?"b-table-sticky-column":null]},cellAttrs:function(){var t=this.inThead||this.inTfoot,e=this.computedColspan,i=this.computedRowspan,n="cell",a=null;return t?(n="columnheader",a=e>0?"colspan":"col"):de(this.tag,"th")&&(n="rowheader",a=i>0?"rowgroup":"row"),s(s({colspan:e,rowspan:i,role:n,scope:a},this.bvAttrs),{},{"data-label":this.isStackedCell&&!ot(this.stackedHeading)?Jt(this.stackedHeading):null})}},render:function(t){var e=[this.normalizeSlot("default")];return t(this.tag,{class:this.cellClasses,attrs:this.cellAttrs,on:this.bvListeners},[this.isStackedCell?t("div",[e]):e])}}),Mh=t.extend({name:"BTh",extends:Lh,computed:{tag:function(){return"th"}}}),Rh={props:{headVariant:{type:String,default:function(){return Nt("BTable","headVariant")}},headRowVariant:{type:String},theadClass:{type:[String,Array,Object]},theadTrClass:{type:[String,Array,Object]}},methods:{fieldClasses:function(t){return[t.class?t.class:"",t.thClass?t.thClass:""]},headClicked:function(t,e,i){this.stopIfBusy&&this.stopIfBusy(t)||$h(t)||Dh(this.$el)||(t.stopPropagation(),t.preventDefault(),this.$emit("head-clicked",e.key,e,t,i))},renderThead:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.$createElement,n=this.computedFields||[];if(this.isStackedAlways||0===n.length)return i();var a=this.isSortable,r=this.isSelectable,o=this.headVariant,l=this.footVariant,u=this.headRowVariant,c=this.footRowVariant,d=a||this.hasListener("head-clicked"),h=r?this.selectAllRows:or,f=r?this.clearSelected:or,p=function(n,r){var o=n.label,l=n.labelHtml,u=n.variant,c=n.stickyColumn,p=n.key,m=null;n.label.trim()||n.headerTitle||(m=ch(n.key));var v={};d&&(v.click=function(i){t.headClicked(i,n,e)},v.keydown=function(i){var a=i.keyCode;a!==_i.ENTER&&a!==_i.SPACE||t.headClicked(i,n,e)});var g=a?t.sortTheadThAttrs(p,n,e):{},b=a?t.sortTheadThClasses(p,n,e):null,S=a?t.sortTheadThLabel(p,n,e):null,T={class:[t.fieldClasses(n),b],props:{variant:u,stickyColumn:c},style:n.thStyle||{},attrs:s(s({tabindex:d?"0":null,abbr:n.headerAbbr||null,title:n.headerTitle||null,"aria-colindex":r+1,"aria-label":m},t.getThValues(null,p,n.thAttr,e?"foot":"head",{})),g),on:v,key:p},w=["head(".concat(p,")"),"head(".concat(p.toLowerCase(),")"),"head()"];e&&(w=["foot(".concat(p,")"),"foot(".concat(p.toLowerCase(),")"),"foot()"].concat(y(w)));var B={label:o,column:p,field:n,isFoot:e,selectAllRows:h,clearSelected:f},C=t.normalizeSlot(w,B)||i("div",{domProps:An(l,o)}),k=S?i("span",{staticClass:"sr-only"}," (".concat(S,")")):null;return i(Mh,T,[C,k].filter(mt))},m=n.map(p).filter(mt),v=[];if(e)v.push(i(Ah,{class:this.tfootTrClass,props:{variant:ot(c)?u:c}},m));else{var g={columns:n.length,fields:n,selectAllRows:h,clearSelected:f};v.push(this.normalizeSlot("thead-top",g)||i()),v.push(i(Ah,{class:this.theadTrClass,props:{variant:u}},m))}return i(e?Ih:_h,{key:e?"bv-tfoot":"bv-thead",class:(e?this.tfootClass:this.theadClass)||null,props:e?{footVariant:l||o||null}:{headVariant:o||null}},v)}}},Hh={props:{footClone:{type:Boolean,default:!1},footVariant:{type:String,default:function(){return Nt("BTable","footVariant")}},footRowVariant:{type:String},tfootClass:{type:[String,Array,Object]},tfootTrClass:{type:[String,Array,Object]}},methods:{renderTFootCustom:function(){var t=this.$createElement;return this.hasNormalizedSlot("custom-foot")?t(Ih,{key:"bv-tfoot-custom",class:this.tfootClass||null,props:{footVariant:this.footVariant||this.headVariant||null}},this.normalizeSlot("custom-foot",{items:this.computedItems.slice(),fields:this.computedFields.slice(),columns:this.computedFields.length})):t()},renderTfoot:function(){return this.footClone?this.renderThead(!0):this.renderTFootCustom()}}},zh={tbodyTransitionProps:{type:Object},tbodyTransitionHandlers:{type:Object}},jh=t.extend({name:"BTbody",mixins:[Oi,Ai,Ke],inheritAttrs:!1,provide:function(){return{bvTableRowGroup:this}},inject:{bvTable:{default:function(){return{}}}},props:zh,computed:{isTbody:function(){return!0},isDark:function(){return this.bvTable.dark},isStacked:function(){return this.bvTable.isStacked},isResponsive:function(){return this.bvTable.isResponsive},isStickyHeader:function(){return!1},hasStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},tableVariant:function(){return this.bvTable.tableVariant},isTransitionGroup:function(){return this.tbodyTransitionProps||this.tbodyTransitionHandlers},tbodyAttrs:function(){return s({role:"rowgroup"},this.bvAttrs)},tbodyProps:function(){return this.tbodyTransitionProps?s(s({},this.tbodyTransitionProps),{},{tag:"tbody"}):{}}},render:function(t){var e={props:this.tbodyProps,attrs:this.tbodyAttrs};return this.isTransitionGroup?(e.on=this.tbodyTransitionHandlers||{},e.nativeOn=this.bvListeners):e.on=this.bvListeners,t(this.isTransitionGroup?"transition-group":"tbody",e,this.normalizeSlot("default"))}}),Gh={mixins:[{props:{tbodyTrClass:{type:[String,Array,Object,Function]},tbodyTrAttr:{type:[Object,Function]},detailsTdClass:{type:[String,Array,Object]}},methods:{getTdValues:function(t,e,i,n){var a=this.$parent;if(i){var r=bt(t,e,"");return st(i)?i(r,e,t):ut(i)&&st(a[i])?a[i](r,e,t):i}return n},getThValues:function(t,e,i,n,a){var r=this.$parent;if(i){var o=bt(t,e,"");return st(i)?i(o,e,t,n):ut(i)&&st(r[i])?r[i](o,e,t,n):i}return a},getFormattedValue:function(t,e){var i=e.key,n=this.getFieldFormatter(i),a=bt(t,i,null);return st(n)&&(a=n(a,i,t)),ot(a)?"":a},toggleDetailsFactory:function(t,e){var i=this;return function(){t&&i.$set(e,"_showDetails",!e._showDetails)}},rowHovered:function(t){this.tbodyRowEvtStopped(t)||this.emitTbodyRowEvent("row-hovered",t)},rowUnhovered:function(t){this.tbodyRowEvtStopped(t)||this.emitTbodyRowEvent("row-unhovered",t)},renderTbodyRowCell:function(t,e,i,n){var a=this,r=this.$createElement,o=this.hasNormalizedSlot("row-details"),l=this.getFormattedValue(i,t),u=t.key,c=!this.isStacked&&(this.isResponsive||this.stickyHeader)&&t.stickyColumn,d=c?t.isRowHeader?Mh:Lh:t.isRowHeader?"th":"td",h=i._cellVariants&&i._cellVariants[u]?i._cellVariants[u]:t.variant||null,f={key:"row-".concat(n,"-cell-").concat(e,"-").concat(u),class:[t.class?t.class:"",this.getTdValues(i,u,t.tdClass,"")],props:{},attrs:s({"aria-colindex":String(e+1)},t.isRowHeader?this.getThValues(i,u,t.thAttr,"row",{}):this.getTdValues(i,u,t.tdAttr,{}))};c?f.props={stackedHeading:this.isStacked?t.label:null,stickyColumn:!0,variant:h}:(f.attrs["data-label"]=this.isStacked&&!ot(t.label)?Jt(t.label):null,f.attrs.role=t.isRowHeader?"rowheader":"cell",f.attrs.scope=t.isRowHeader?"row":null,h&&f.class.push("".concat(this.dark?"bg":"table","-").concat(h)));var p={item:i,index:n,field:t,unformatted:bt(i,u,""),value:l,toggleDetails:this.toggleDetailsFactory(o,i),detailsShowing:Boolean(i._showDetails)};this.supportsSelectableRows&&(p.rowSelected=this.isRowSelected(n),p.selectRow=function(){return a.selectRow(n)},p.unselectRow=function(){return a.unselectRow(n)});var m=this.$_bodyFieldSlotNameCache[u],v=m?this.normalizeSlot(m,p):Jt(l);return this.isStacked&&(v=[r("div",[v])]),r(d,f,[v])},renderTbodyRow:function(t,e){var i=this,n=this.$createElement,a=this.computedFields,r=this.striped,o=this.hasNormalizedSlot("row-details"),l=t._showDetails&&o,u=this.$listeners["row-clicked"]||this.hasSelectableRowClick,c=[],d=l?this.safeId("_details_".concat(e,"_")):null,h=a.map((function(n,a){return i.renderTbodyRowCell(n,a,t,e)})),f=null;this.currentPage&&this.perPage&&this.perPage>0&&(f=String((this.currentPage-1)*this.perPage+e+1));var p=this.primaryKey,m=Jt(bt(t,p))||null,v=m||Jt(e),g=m?this.safeId("_row_".concat(m)):null,b=this.selectableRowClasses?this.selectableRowClasses(e):{},y=this.selectableRowAttrs?this.selectableRowAttrs(e):{},S=st(this.tbodyTrClass)?this.tbodyTrClass(t,"row"):this.tbodyTrClass,T=st(this.tbodyTrAttr)?this.tbodyTrAttr(t,"row"):this.tbodyTrAttr;if(c.push(n(Ah,{key:"__b-table-row-".concat(v,"__"),ref:"itemRows",refInFor:!0,class:[S,b,l?"b-table-has-details":""],props:{variant:t._rowVariant||null},attrs:s(s({id:g},T),{},{tabindex:u?"0":null,"data-pk":m||null,"aria-details":d,"aria-owns":d,"aria-rowindex":f},y),on:{mouseenter:this.rowHovered,mouseleave:this.rowUnhovered}},h)),l){var w={item:t,index:e,fields:a,toggleDetails:this.toggleDetailsFactory(o,t)};this.supportsSelectableRows&&(w.rowSelected=this.isRowSelected(e),w.selectRow=function(){return i.selectRow(e)},w.unselectRow=function(){return i.unselectRow(e)});var B=n(Lh,{props:{colspan:a.length},class:this.detailsTdClass},[this.normalizeSlot("row-details",w)]);r&&c.push(n("tr",{key:"__b-table-details-stripe__".concat(v),staticClass:"d-none",attrs:{"aria-hidden":"true",role:"presentation"}}));var C=st(this.tbodyTrClass)?this.tbodyTrClass(t,"row-details"):this.tbodyTrClass,k=st(this.tbodyTrAttr)?this.tbodyTrAttr(t,"row-details"):this.tbodyTrAttr;c.push(n(Ah,{key:"__b-table-details__".concat(v),staticClass:"b-table-details",class:[C],props:{variant:t._rowVariant||null},attrs:s(s({},k),{},{id:d,tabindex:"-1"})},[B]))}else o&&(c.push(n()),r&&c.push(n()));return c}}}],props:s(s({},zh),{},{tbodyClass:{type:[String,Array,Object]}}),beforeDestroy:function(){this.$_bodyFieldSlotNameCache=null},methods:{getTbodyTrs:function(){var t=this.$refs||{},e=t.tbody?t.tbody.$el||t.tbody:null,i=(t.itemRows||[]).map((function(t){return t.$el||t}));return e&&e.children&&e.children.length>0&&i&&i.length>0?C(e.children).filter((function(t){return x(i,t)})):[]},getTbodyTrIndex:function(t){if(!ue(t))return-1;var e="TR"===t.tagName?t:ye("tr",t,!0);return e?this.getTbodyTrs().indexOf(e):-1},emitTbodyRowEvent:function(t,e){if(t&&this.hasListener(t)&&e&&e.target){var i=this.getTbodyTrIndex(e.target);if(i>-1){var n=this.computedItems[i];this.$emit(t,n,i,e)}}},tbodyRowEvtStopped:function(t){return this.stopIfBusy&&this.stopIfBusy(t)},onTbodyRowKeydown:function(t){var e=t.target;if(!this.tbodyRowEvtStopped(t)&&"TR"===e.tagName&&he(e)&&0===e.tabIndex){var i=t.keyCode;if(x([_i.ENTER,_i.SPACE],i))t.stopPropagation(),t.preventDefault(),this.onTBodyRowClicked(t);else if(x([_i.UP,_i.DOWN,_i.HOME,_i.END],i)){var n=this.getTbodyTrIndex(e);if(n>-1){t.stopPropagation(),t.preventDefault();var a=this.getTbodyTrs(),r=t.shiftKey;i===_i.HOME||r&&i===_i.UP?Ee(a[0]):i===_i.END||r&&i===_i.DOWN?Ee(a[a.length-1]):i===_i.UP&&n>0?Ee(a[n-1]):i===_i.DOWN&&n0&&this.selectedRows.some(mt)},selectableIsMultiSelect:function(){return this.isSelectable&&x(["range","multi"],this.selectMode)},selectableTableClasses:function(){var t;return r(t={"b-table-selectable":this.isSelectable},"b-table-select-".concat(this.selectMode),this.isSelectable),r(t,"b-table-selecting",this.selectableHasSelection),r(t,"b-table-selectable-no-click",this.isSelectable&&!this.hasSelectableRowClick),t},selectableTableAttrs:function(){return{"aria-multiselectable":this.isSelectable?this.selectableIsMultiSelect?"true":"false":null}}},watch:{computedItems:function(t,e){var i=!1;if(this.isSelectable&&this.selectedRows.length>0){i=k(t)&&k(e)&&t.length===e.length;for(var n=0;i&&n=0&&t0&&(this.selectedLastClicked=-1,this.selectedRows=this.selectableIsMultiSelect?ld(t).map((function(){return!0})):[!0])},isRowSelected:function(t){return!(!ct(t)||!this.selectedRows[t])},clearSelected:function(){this.selectedLastClicked=-1,this.selectedRows=[]},selectableRowClasses:function(t){if(this.isSelectable&&this.isRowSelected(t)){var e=this.selectedVariant;return r({"b-table-row-selected":!0},"".concat(this.dark?"bg":"table","-").concat(e),e)}return{}},selectableRowAttrs:function(t){return{"aria-selected":this.isSelectable?this.isRowSelected(t)?"true":"false":null}},setSelectionHandlers:function(t){var e=t&&!this.noSelectOnClick?"$on":"$off";this[e]("row-clicked",this.selectionHandler),this[e]("filtered",this.clearSelected),this[e]("context-changed",this.clearSelected)},selectionHandler:function(t,e,i){if(this.isSelectable&&!this.noSelectOnClick){var n=this.selectMode,a=this.selectedRows.slice(),r=!a[e];if("single"===n)a=[];else if("range"===n)if(this.selectedLastRow>-1&&i.shiftKey){for(var o=ni(this.selectedLastRow,e);o<=ai(this.selectedLastRow,e);o++)a[o]=!0;r=!0}else i.ctrlKey||i.metaKey||(a=[],r=!0),this.selectedLastRow=r?e:-1;a[e]=r,this.selectedRows=a}else this.clearSelected()}}},Xh={mixins:[kr],props:{items:{type:[Array,Function],default:function(){return[]}},noProviderPaging:{type:Boolean,default:!1},noProviderSorting:{type:Boolean,default:!1},noProviderFiltering:{type:Boolean,default:!1},apiUrl:{type:String,default:""}},computed:{hasProvider:function(){return st(this.items)},providerTriggerContext:function(){var t={apiUrl:this.apiUrl,filter:null,sortBy:null,sortDesc:null,perPage:null,currentPage:null};return this.noProviderFiltering||(t.filter=this.localFilter),this.noProviderSorting||(t.sortBy=this.localSortBy,t.sortDesc=this.localSortDesc),this.noProviderPaging||(t.perPage=this.perPage,t.currentPage=this.currentPage),L(t)}},watch:{items:function(t){(this.hasProvider||st(t))&&this.$nextTick(this._providerUpdate)},providerTriggerContext:function(t,e){qn(t,e)||this.$nextTick(this._providerUpdate)}},mounted:function(){var t=this;!this.hasProvider||this.localItems&&0!==this.localItems.length||this._providerUpdate(),this.listenOnRoot("bv::refresh::table",(function(e){e!==t.id&&e!==t||t.refresh()}))},methods:{refresh:function(){this.$off("refreshed",this.refresh),this.computedBusy?this.localBusy&&this.hasProvider&&this.$on("refreshed",this.refresh):(this.clearSelected(),this.hasProvider?this.$nextTick(this._providerUpdate):this.localItems=k(this.items)?this.items.slice():[])},_providerSetLocal:function(t){this.localItems=k(t)?t.slice():[],this.localBusy=!1,this.$emit("refreshed"),this.id&&this.emitOnRoot("bv::table::refreshed",this.id)},_providerUpdate:function(){var t=this;this.hasProvider&&(this.computedBusy?this.$nextTick(this.refresh):(this.localBusy=!0,this.$nextTick((function(){try{var e=t.items(t.context,t._providerSetLocal);!ot(i=e)&&st(i.then)&&st(i.catch)?e.then((function(e){t._providerSetLocal(e)})):k(e)?t._providerSetLocal(e):2!==t.items.length&&(yt("Provider function didn't request callback and did not return a promise or data.","BTable"),t.localBusy=!1)}catch(e){yt("Provider function error [".concat(e.name,"] ").concat(e.message,"."),"BTable"),t.localBusy=!1,t.$off("refreshed",t.refresh)}var i}))))}}},Zh={inheritAttrs:!1,mixins:[Oi],provide:function(){return{bvTable:this}},props:{striped:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},hover:{type:Boolean,default:!1},small:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1},responsive:{type:[Boolean,String],default:!1},stickyHeader:{type:[Boolean,String],default:!1},noBorderCollapse:{type:Boolean,default:!1},captionTop:{type:Boolean,default:!1},tableVariant:{type:String},tableClass:{type:[String,Array,Object]}},computed:{isResponsive:function(){var t=""===this.responsive||this.responsive;return!this.isStacked&&t},isStickyHeader:function(){var t=""===this.stickyHeader||this.stickyHeader;return!this.isStacked&&t},wrapperClasses:function(){return[this.isStickyHeader?"b-table-sticky-header":"",!0===this.isResponsive?"table-responsive":this.isResponsive?"table-responsive-".concat(this.responsive):""].filter(mt)},wrapperStyles:function(){return this.isStickyHeader&&!lt(this.isStickyHeader)?{maxHeight:this.isStickyHeader}:{}},tableClasses:function(){var t=this.isTableSimple?this.hover:this.hover&&this.computedItems.length>0&&!this.computedBusy;return[this.tableClass,{"table-striped":this.striped,"table-hover":t,"table-dark":this.dark,"table-bordered":this.bordered,"table-borderless":this.borderless,"table-sm":this.small,border:this.outlined,"b-table-fixed":this.fixed,"b-table-caption-top":this.captionTop,"b-table-no-border-collapse":this.noBorderCollapse},this.tableVariant?"".concat(this.dark?"bg":"table","-").concat(this.tableVariant):"",this.stackedTableClasses,this.selectableTableClasses]},tableAttrs:function(){var t=[(this.bvAttrs||{})["aria-describedby"],this.captionId].filter(mt).join(" ")||null,e=this.computedItems,i=this.filteredItems,n=this.computedFields,a=this.selectableTableAttrs||{},r=this.isTableSimple?{}:{"aria-busy":this.computedBusy?"true":"false","aria-colcount":Jt(n.length),"aria-describedby":t};return s(s(s({"aria-rowcount":e&&i&&i.length>e.length?Jt(i.length):null},this.bvAttrs),{},{id:this.safeId(),role:"table"},r),a)}},render:function(t){var e=[];this.isTableSimple?e.push(this.normalizeSlot("default")):(e.push(this.renderCaption?this.renderCaption():null),e.push(this.renderColgroup?this.renderColgroup():null),e.push(this.renderThead?this.renderThead():null),e.push(this.renderTbody?this.renderTbody():null),e.push(this.renderTfoot?this.renderTfoot():null));var i=t("table",{key:"b-table",staticClass:"table b-table",class:this.tableClasses,attrs:this.tableAttrs},e.filter(mt));return this.wrapperClasses.length>0?t("div",{key:"wrap",class:this.wrapperClasses,style:this.wrapperStyles},[i]):i}},Jh=t.extend({name:"BTable",mixins:[Oi,oh,ma,Ke,ph,Zh,mh,Rh,Hh,Gh,mh,Sh,wh,Bh,Ch,kh,Kh,Wh,Uh,Yh,qh,Xh]}),Qh=t.extend({name:"BTableLite",mixins:[oh,ma,Ke,ph,Zh,mh,Rh,Hh,Gh,Ch,kh]}),tf=t.extend({name:"BTableSimple",mixins:[ma,Ke,Zh,mh],computed:{isTableSimple:function(){return!0}}}),ef=Dt({components:{BTable:Jh},plugins:{TableLitePlugin:Dt({components:{BTableLite:Qh}}),TableSimplePlugin:Dt({components:{BTableSimple:tf,BTbody:jh,BThead:_h,BTfoot:Ih,BTr:Ah,BTd:Lh,BTh:Mh}})}}),nf=R(Rc,["tabs","isNavBar","cardHeader"]),af=function(t){return!t.disabled},rf=t.extend({name:"BTabButtonHelper",inject:{bvTabs:{default:function(){return{}}}},props:{tab:{default:null},tabs:{type:Array,default:function(){return[]}},id:{type:String,default:null},controls:{type:String,default:null},tabIndex:{type:Number,default:null},posInSet:{type:Number,default:null},setSize:{type:Number,default:null},noKeyNav:{type:Boolean,default:!1}},methods:{focus:function(){Ee(this.$refs.link)},handleEvt:function(t){var e=function(){t.preventDefault(),t.stopPropagation()};if(!this.tab.disabled){var i=t.type,n=t.keyCode,a=t.shiftKey;"click"===i||"keydown"===i&&n===_i.SPACE?(e(),this.$emit("click",t)):"keydown"!==i||this.noKeyNav||(n===_i.UP||n===_i.LEFT||n===_i.HOME?(e(),a||n===_i.HOME?this.$emit("first",t):this.$emit("prev",t)):n!==_i.DOWN&&n!==_i.RIGHT&&n!==_i.END||(e(),a||n===_i.END?this.$emit("last",t):this.$emit("next",t)))}}},render:function(t){var e=t(Li,{ref:"link",staticClass:"nav-link",class:[{active:this.tab.localActive&&!this.tab.disabled,disabled:this.tab.disabled},this.tab.titleLinkClass,this.tab.localActive?this.bvTabs.activeNavItemClass:null],props:{disabled:this.tab.disabled},attrs:s(s({},this.tab.titleLinkAttributes),{},{role:"tab",id:this.id,tabindex:this.tabIndex,"aria-selected":this.tab.localActive&&!this.tab.disabled?"true":"false","aria-setsize":this.setSize,"aria-posinset":this.posInSet,"aria-controls":this.controls}),on:{click:this.handleEvt,keydown:this.handleEvt}},[this.tab.normalizeSlot("title")||this.tab.title]);return t("li",{staticClass:"nav-item",class:[this.tab.titleItemClass],attrs:{role:"presentation"}},[e])}}),of=Dt({components:{BTabs:t.extend({name:"BTabs",mixins:[ma,Ke],provide:function(){return{bvTabs:this}},model:{prop:"value",event:"input"},props:s(s({},nf),{},{tag:{type:String,default:"div"},card:{type:Boolean,default:!1},end:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noNavStyle:{type:Boolean,default:!1},noKeyNav:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},contentClass:{type:[String,Array,Object]},navClass:{type:[String,Array,Object]},navWrapperClass:{type:[String,Array,Object]},activeNavItemClass:{type:[String,Array,Object]},activeTabClass:{type:[String,Array,Object]},value:{type:Number,default:null}}),data:function(){return{currentTab:Ht(this.value,-1),tabs:[],registeredTabs:[],isMounted:!1}},computed:{fade:function(){return!this.noFade},localNavClass:function(){var t=[];return this.card&&this.vertical&&t.push("card-header","h-100","border-bottom-0","rounded-0"),[].concat(t,[this.navClass])}},watch:{currentTab:function(t){var e=-1;this.tabs.forEach((function(i,n){t!==n||i.disabled?i.localActive=!1:(i.localActive=!0,e=n)})),this.$emit("input",e)},value:function(t,e){if(t!==e){t=Ht(t,-1),e=Ht(e,0);var i=this.tabs;i[t]&&!i[t].disabled?this.activateTab(i[t]):t0){var i=t.map((function(t){return"#".concat(t.safeId())})).join(", ");e=ve(i,this.$el).map((function(t){return t.id})).filter(mt)}return Th(t,(function(t,i){return e.indexOf(t.safeId())-e.indexOf(i.safeId())}))},updateTabs:function(){var t=this.getTabs(),e=t.indexOf(t.slice().reverse().find((function(t){return t.localActive&&!t.disabled})));if(e<0){var i=this.currentTab;i>=t.length?e=t.indexOf(t.slice().reverse().find(af)):t[i]&&!t[i].disabled&&(e=i)}e<0&&(e=t.indexOf(t.find(af))),t.forEach((function(t){t.localActive=!1})),t[e]&&(t[e].localActive=!0),this.tabs=t,this.currentTab=e},getButtonForTab:function(t){return(this.$refs.buttons||[]).find((function(e){return e.tab===t}))},updateButton:function(t){var e=this.getButtonForTab(t);e&&e.$forceUpdate&&e.$forceUpdate()},activateTab:function(t){var e=!1;if(t){var i=this.tabs.indexOf(t);if(!t.disabled&&i>-1&&i!==this.currentTab){var n=new BvEvent("activate-tab",{cancelable:!0,vueTarget:this,componentId:this.safeId()});this.$emit(n.type,i,this.currentTab,n),n.defaultPrevented||(e=!0,this.currentTab=i)}}return e||this.currentTab===this.value||this.$emit("input",this.currentTab),e},deactivateTab:function(t){return!!t&&this.activateTab(this.tabs.filter((function(e){return e!==t})).find(af))},focusButton:function(t){var e=this;this.$nextTick((function(){Ee(e.getButtonForTab(t))}))},emitTabClick:function(t,e){ht(e)&&t&&t.$emit&&!t.disabled&&t.$emit("click",e)},clickTab:function(t,e){this.activateTab(t),this.emitTabClick(t,e)},firstTab:function(t){var e=this.tabs.find(af);this.activateTab(e)&&t&&(this.focusButton(e),this.emitTabClick(e,t))},previousTab:function(t){var e=ai(this.currentTab,0),i=this.tabs.slice(0,e).reverse().find(af);this.activateTab(i)&&t&&(this.focusButton(i),this.emitTabClick(i,t))},nextTab:function(t){var e=ai(this.currentTab,-1),i=this.tabs.slice(e+1).find(af);this.activateTab(i)&&t&&(this.focusButton(i),this.emitTabClick(i,t))},lastTab:function(t){var e=this.tabs.slice().reverse().find(af);this.activateTab(e)&&t&&(this.focusButton(e),this.emitTabClick(e,t))}},render:function(t){var e=this,i=this.tabs,n=i.find((function(t){return t.localActive&&!t.disabled})),a=i.find((function(t){return!t.disabled})),r=i.map((function(r,o){var s=null;return e.noKeyNav||(s=-1,(n===r||!n&&a===r)&&(s=null)),t(rf,{key:r._uid||o,ref:"buttons",refInFor:!0,props:{tab:r,tabs:i,id:r.controlledBy||(r.safeId?r.safeId("_BV_tab_button_"):null),controls:r.safeId?r.safeId():null,tabIndex:s,setSize:i.length,posInSet:o+1,noKeyNav:e.noKeyNav},on:{click:function(t){e.clickTab(r,t)},first:e.firstTab,prev:e.previousTab,next:e.nextTab,last:e.lastTab}})})),o=t(Hc,{ref:"nav",class:this.localNavClass,attrs:{role:"tablist",id:this.safeId("_BV_tab_controls_")},props:{fill:this.fill,justified:this.justified,align:this.align,tabs:!this.noNavStyle&&!this.pills,pills:!this.noNavStyle&&this.pills,vertical:this.vertical,small:this.small,cardHeader:this.card&&!this.vertical}},[this.normalizeSlot("tabs-start")||t(),r,this.normalizeSlot("tabs-end")||t()]);o=t("div",{key:"bv-tabs-nav",class:[{"card-header":this.card&&!this.vertical&&!this.end,"card-footer":this.card&&!this.vertical&&this.end,"col-auto":this.vertical},this.navWrapperClass]},[o]);var s=t();i&&0!==i.length||(s=t("div",{key:"bv-empty-tab",class:["tab-pane","active",{"card-body":this.card}]},this.normalizeSlot("empty")));var l=t("div",{ref:"tabsContainer",key:"bv-tabs-container",staticClass:"tab-content",class:[{col:this.vertical},this.contentClass],attrs:{id:this.safeId("_BV_tab_container_")}},$(this.normalizeSlot("default"),s));return t(this.tag,{staticClass:"tabs",class:{row:this.vertical,"no-gutters":this.vertical&&this.card},attrs:{id:this.safeId()}},[this.end?l:t(),[o],this.end?t():l])}}),BTab:t.extend({name:"BTab",mixins:[ma,Ke],inject:{bvTabs:{default:function(){return{}}}},props:{active:{type:Boolean,default:!1},tag:{type:String,default:"div"},buttonId:{type:String},title:{type:String,default:""},titleItemClass:{type:[String,Array,Object]},titleLinkClass:{type:[String,Array,Object]},titleLinkAttributes:{type:Object},disabled:{type:Boolean,default:!1},noBody:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},data:function(){return{localActive:this.active&&!this.disabled,show:!1}},computed:{tabClasses:function(){return[{active:this.localActive,disabled:this.disabled,"card-body":this.bvTabs.card&&!this.noBody},this.localActive?this.bvTabs.activeTabClass:null]},controlledBy:function(){return this.buttonId||this.safeId("__BV_tab_button__")},computedNoFade:function(){return!this.bvTabs.fade},computedLazy:function(){return this.bvTabs.lazy||this.lazy},_isTab:function(){return!0}},watch:{localActive:function(t){this.$emit("update:active",t)},active:function(t,e){t!==e&&(t?this.activate():this.deactivate()||this.$emit("update:active",this.localActive))},disabled:function(t,e){t!==e&&t&&this.localActive&&this.bvTabs.firstTab&&(this.localActive=!1,this.bvTabs.firstTab())}},mounted:function(){this.registerTab(),this.show=this.localActive},updated:function(){this.hasNormalizedSlot("title")&&this.bvTabs.updateButton&&this.bvTabs.updateButton(this)},destroyed:function(){this.unregisterTab()},methods:{registerTab:function(){this.bvTabs.registerTab&&this.bvTabs.registerTab(this)},unregisterTab:function(){this.bvTabs.unregisterTab&&this.bvTabs.unregisterTab(this)},activate:function(){return!(!this.bvTabs.activateTab||this.disabled)&&this.bvTabs.activateTab(this)},deactivate:function(){return!(!this.bvTabs.deactivateTab||!this.localActive)&&this.bvTabs.deactivateTab(this)}},render:function(t){var e=t(this.tag,{ref:"panel",staticClass:"tab-pane",class:this.tabClasses,directives:[{name:"show",rawName:"v-show",value:this.localActive,expression:"localActive"}],attrs:{role:"tabpanel",id:this.safeId(),"aria-hidden":this.localActive?"false":"true","aria-labelledby":this.controlledBy||null}},[this.localActive||!this.computedLazy?this.normalizeSlot("default"):t()]);return t(Ue,{props:{mode:"out-in",noFade:this.computedNoFade}},[e])}})}}),sf=Dt({components:{BTime:$u}});function lf(t){return(lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uf(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e1&&void 0!==arguments[1]&&arguments[1],i=t.to,n=t.from;if(i&&(n||!1!==e)&&this.transports[i])if(e)this.transports[i]=[];else{var a=this.$_getTransportIndex(t);if(a>=0){var r=this.transports[i].slice(0);r.splice(a,1),this.transports[i]=r}}},registerTarget:function(t,e,i){cf&&(this.trackInstances&&!i&&this.targets[t]&&console.warn("[portal-vue]: Target ".concat(t," already exists")),this.$set(this.targets,t,Object.freeze([e])))},unregisterTarget:function(t){this.$delete(this.targets,t)},registerSource:function(t,e,i){cf&&(this.trackInstances&&!i&&this.sources[t]&&console.warn("[portal-vue]: source ".concat(t," already exists")),this.$set(this.sources,t,Object.freeze([e])))},unregisterSource:function(t){this.$delete(this.sources,t)},hasTarget:function(t){return!(!this.targets[t]||!this.targets[t][0])},hasSource:function(t){return!(!this.sources[t]||!this.sources[t][0])},hasContentFor:function(t){return!!this.transports[t]&&!!this.transports[t].length},$_getTransportIndex:function(t){var e=t.to,i=t.from;for(var n in this.transports[e])if(this.transports[e][n].from===i)return+n;return-1}}}))(ff),gf=1,bf=t.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(gf++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var t=this;this.$nextTick((function(){vf.registerSource(t.name,t)}))},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){vf.unregisterSource(this.name),this.clear()},watch:{to:function(t,e){e&&e!==t&&this.clear(e),this.sendUpdate()}},methods:{clear:function(t){var e={from:this.name,to:t||this.to};vf.close(e)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(t){return"function"==typeof t?t(this.slotProps):t},sendUpdate:function(){var t=this.normalizeSlots();if(t){var e={from:this.name,to:this.to,passengers:uf(t),order:this.order};vf.open(e)}else this.clear()}},render:function(t){var e=this.$slots.default||this.$scopedSlots.default||[],i=this.tag;return e&&this.disabled?e.length<=1&&this.slim?this.normalizeOwnChildren(e)[0]:t(i,[this.normalizeOwnChildren(e)]):this.slim?t():t(i,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),yf=t.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:vf.transports,firstRender:!0}},created:function(){var t=this;this.$nextTick((function(){vf.registerTarget(t.name,t)}))},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(t,e){vf.unregisterTarget(e),vf.registerTarget(t,this)}},mounted:function(){var t=this;this.transition&&this.$nextTick((function(){t.firstRender=!1}))},beforeDestroy:function(){vf.unregisterTarget(this.name)},computed:{ownTransports:function(){var t=this.transports[this.name]||[];return this.multiple?t:0===t.length?[]:[t[t.length-1]]},passengers:function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.reduce((function(t,i){var n=i.passengers[0],a="function"==typeof n?n(e):i.passengers;return t.concat(a)}),[])}(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var t=this.slim&&!this.transition;return t&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),t}},render:function(t){var e=this.noWrapper(),i=this.children(),n=this.transition||this.tag;return e?i[0]:this.slim&&!n?t():t(n,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},i)}}),Sf=0,Tf=["disabled","name","order","slim","slotProps","tag","to"],wf=["multiple","transition"],Bf=(t.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(Sf++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!=typeof document){var t=document.querySelector(this.mountTo);if(t){var e=this.$props;if(vf.targets[e.name])e.bail?console.warn("[portal-vue]: Target ".concat(e.name," is already mounted.\n Aborting because 'bail: true' is set")):this.portalTarget=vf.targets[e.name];else{var i=e.append;if(i){var n="string"==typeof i?i:"DIV",a=document.createElement(n);t.appendChild(a),t=a}var r=df(this.$props,wf);r.slim=this.targetSlim,r.tag=this.targetTag,r.slotProps=this.targetSlotProps,r.name=this.to,this.portalTarget=new yf({el:t,parent:this.$parent||this,propsData:r})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var t=this.portalTarget;if(this.append){var e=t.$el;e.parentNode.removeChild(e)}t.$destroy()},render:function(t){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),t();if(!this.$scopedSlots.manual){var e=df(this.$props,Tf);return t(bf,{props:e,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var i=this.$scopedSlots.manual({to:this.to});return Array.isArray(i)&&(i=i[0]),i||t()}}),{name:{type:String,required:!0},ariaLive:{type:String,default:function(){return Nt("BToaster","ariaLive")}},ariaAtomic:{type:String,default:function(){return Nt("BToaster","ariaAtomic")}},role:{type:String,default:function(){return Nt("BToaster","role")}}}),Cf=t.extend({data:function(){return{name:"b-toaster"}},methods:{onAfterEnter:function(t){var e=this;se((function(){Be(t,"".concat(e.name,"-enter-to"))}))}},render:function(t){return t("transition-group",{props:{tag:"div",name:this.name},on:{afterEnter:this.onAfterEnter}},this.$slots.default)}}),kf=t.extend({name:"BToaster",props:Bf,data:function(){return{doRender:!1,dead:!1,staticName:this.name}},beforeMount:function(){var t=this;this.staticName=this.name,vf.hasTarget(this.staticName)?(yt('A "" with name "'.concat(this.name,'" already exists in the document.'),"BToaster"),this.dead=!0):(this.doRender=!0,this.$once("hook:beforeDestroy",(function(){t.$root.$emit("bv::toaster::destroyed",t.staticName)})))},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},render:function(t){var e=t("div",{class:["d-none",{"b-dead-toaster":this.dead}]});if(this.doRender){var i=t(yf,{staticClass:"b-toaster-slot",props:{name:this.staticName,multiple:!0,tag:"div",slim:!1,transition:Cf}});e=t("div",{staticClass:"b-toaster",class:[this.staticName],attrs:{id:this.staticName,role:this.role||null,"aria-live":this.ariaLive,"aria-atomic":this.ariaAtomic}},[i])}return e}}),xf=M(Ni,["href","to"]),$f=s({id:{type:String},title:{type:String},toaster:{type:String,default:function(){return Nt("BToast","toaster")}},visible:{type:Boolean,default:!1},variant:{type:String,default:function(){return Nt("BToast","variant")}},isStatus:{type:Boolean,default:!1},appendToast:{type:Boolean,default:!1},noAutoHide:{type:Boolean,default:!1},autoHideDelay:{type:[Number,String],default:function(){return Nt("BToast","autoHideDelay")}},noCloseButton:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noHoverPause:{type:Boolean,default:!1},solid:{type:Boolean,default:!1},toastClass:{type:[String,Object,Array],default:function(){return Nt("BToast","toastClass")}},headerClass:{type:[String,Object,Array],default:function(){return Nt("BToast","headerClass")}},bodyClass:{type:[String,Object,Array],default:function(){return Nt("BToast","bodyClass")}},static:{type:Boolean,default:!1}},xf),Df=t.extend({name:"BToast",mixins:[Oi,ma,kr,Ke,yc],inheritAttrs:!1,model:{prop:"visible",event:"change"},props:$f,data:function(){return{isMounted:!1,doRender:!1,localShow:!1,isTransitioning:!1,isHiding:!1,order:0,timer:null,dismissStarted:0,resumeDismiss:0}},computed:{bToastClasses:function(){return r({"b-toast-solid":this.solid,"b-toast-append":this.appendToast,"b-toast-prepend":!this.appendToast},"b-toast-".concat(this.variant),this.variant)},slotScope:function(){return{hide:this.hide}},computedDuration:function(){return ai(Ht(this.autoHideDelay,0),1e3)},computedToaster:function(){return String(this.toaster)},transitionHandlers:function(){return{beforeEnter:this.onBeforeEnter,afterEnter:this.onAfterEnter,beforeLeave:this.onBeforeLeave,afterLeave:this.onAfterLeave}},computedAttrs:function(){return s(s({},this.bvAttrs),{},{id:this.safeId(),tabindex:"0"})}},watch:{visible:function(t){t?this.show():this.hide()},localShow:function(t){t!==this.visible&&this.$emit("change",t)},toaster:function(){this.$nextTick(this.ensureToaster)},static:function(t){t&&this.localShow&&this.ensureToaster()}},mounted:function(){var t=this;this.isMounted=!0,this.$nextTick((function(){t.visible&&se((function(){t.show()}))})),this.listenOnRoot("bv::show::toast",(function(e){e===t.safeId()&&t.show()})),this.listenOnRoot("bv::hide::toast",(function(e){e&&e!==t.safeId()||t.hide()})),this.listenOnRoot("bv::toaster::destroyed",(function(e){e===t.computedToaster&&t.hide()}))},beforeDestroy:function(){this.clearDismissTimer()},methods:{show:function(){var t=this;if(!this.localShow){this.ensureToaster();var e=this.buildEvent("show");this.emitEvent(e),this.dismissStarted=this.resumeDismiss=0,this.order=Date.now()*(this.appendToast?1:-1),this.isHiding=!1,this.doRender=!0,this.$nextTick((function(){se((function(){t.localShow=!0}))}))}},hide:function(){var t=this;if(this.localShow){var e=this.buildEvent("hide");this.emitEvent(e),this.setHoverHandler(!1),this.dismissStarted=this.resumeDismiss=0,this.clearDismissTimer(),this.isHiding=!0,se((function(){t.localShow=!1}))}},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new BvEvent(t,s(s({cancelable:!1,target:this.$el||null,relatedTarget:null},e),{},{vueTarget:this,componentId:this.safeId()}))},emitEvent:function(t){var e=t.type;this.emitOnRoot("bv::toast:".concat(e),t),this.$emit(e,t)},ensureToaster:function(){if(!this.static&&!vf.hasTarget(this.computedToaster)){var t=document.createElement("div");document.body.appendChild(t),new kf({parent:this.$root,propsData:{name:this.computedToaster}}).$mount(t)}},startDismissTimer:function(){this.clearDismissTimer(),this.noAutoHide||(this.timer=setTimeout(this.hide,this.resumeDismiss||this.computedDuration),this.dismissStarted=Date.now(),this.resumeDismiss=0)},clearDismissTimer:function(){clearTimeout(this.timer),this.timer=null},setHoverHandler:function(t){var e=this.$refs["b-toast"];fr(t,e,"mouseenter",this.onPause,ur),fr(t,e,"mouseleave",this.onUnPause,ur)},onPause:function(){if(!this.noAutoHide&&!this.noHoverPause&&this.timer&&!this.resumeDismiss){var t=Date.now()-this.dismissStarted;t>0&&(this.clearDismissTimer(),this.resumeDismiss=ai(this.computedDuration-t,1e3))}},onUnPause:function(){this.noAutoHide||this.noHoverPause||!this.resumeDismiss?this.resumeDismiss=this.dismissStarted=0:this.startDismissTimer()},onLinkClick:function(){var t=this;this.$nextTick((function(){se((function(){t.hide()}))}))},onBeforeEnter:function(){this.isTransitioning=!0},onAfterEnter:function(){this.isTransitioning=!1;var t=this.buildEvent("shown");this.emitEvent(t),this.startDismissTimer(),this.setHoverHandler(!0)},onBeforeLeave:function(){this.isTransitioning=!0},onAfterLeave:function(){this.isTransitioning=!1,this.order=0,this.resumeDismiss=this.dismissStarted=0;var t=this.buildEvent("hidden");this.emitEvent(t),this.doRender=!1},makeToast:function(t){var e=this,i=[],n=this.normalizeSlot("toast-title",this.slotScope);n?i.push(n):this.title&&i.push(t("strong",{staticClass:"mr-2"},this.title)),this.noCloseButton||i.push(t(Je,{staticClass:"ml-auto mb-1",on:{click:function(){e.hide()}}}));var a=t();i.length>0&&(a=t("header",{staticClass:"toast-header",class:this.headerClass},i));var r=$i(this),o=t(r?Li:"div",{staticClass:"toast-body",class:this.bodyClass,props:r?gi(xf,this):{},on:r?{click:this.onLinkClick}:{}},[this.normalizeSlot("default",this.slotScope)||t()]);return t("div",{key:"toast-".concat(this._uid),ref:"toast",staticClass:"toast",class:this.toastClass,attrs:this.computedAttrs},[a,o])}},render:function(t){if(!this.doRender||!this.isMounted)return t();var e="b-toast-".concat(this._uid),i=this.static?{}:this.scopedStyleAttrs;return t(bf,{props:{name:e,to:this.computedToaster,order:this.order,slim:!0,disabled:this.static}},[t("div",{key:e,ref:"b-toast",staticClass:"b-toast",class:this.bToastClasses,attrs:s(s({},i),{},{id:this.safeId("_toast_outer"),role:this.isHiding?null:this.isStatus?"status":"alert","aria-live":this.isHiding?null:this.isStatus?"polite":"assertive","aria-atomic":this.isHiding?null:"true"})},[t(Ue,{props:{noFade:this.noFade},on:this.transitionHandlers},[this.localShow?this.makeToast(t):t()])])])}}),Pf=["id"].concat(y(A(R($f,["static","visible"])))),_f={toastContent:"default",title:"toast-title"},Ff=function(t){return Pf.reduce((function(e,i){return at(t[i])||(e[i]=t[i]),e}),{})},If=Dt({components:{BToast:Df,BToaster:kf},plugins:{BVToastPlugin:Dt({plugins:{plugin:function(t){var e=t.extend({name:"BToastPop",extends:Df,destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},mounted:function(){var t=this,e=function(){t.localShow=!1,t.doRender=!1,t.$nextTick((function(){t.$nextTick((function(){se((function(){t.$destroy()}))}))}))};this.$parent.$once("hook:destroyed",e),this.$once("hidden",e),this.listenOnRoot("bv::toaster::destroyed",(function(i){i===t.toaster&&e()}))}}),n=function(t,i){if(!St("$bvToast")){var n=new e({parent:i,propsData:s(s(s({},Ff(Nt("BToast")||{})),R(t,A(_f))),{},{static:!1,visible:!0})});A(_f).forEach((function(e){var a=t[e];at(a)||("title"===e&&ut(a)&&(a=[i.$createElement("strong",{class:"mr-2"},a)]),n.$slots[_f[e]]=$(a))}));var a=document.createElement("div");document.body.appendChild(a),n.$mount(a)}},r=function(){function t(e){i(this,t),D(this,{_vm:e,_root:e.$root}),_(this,{_vm:{enumerable:!0,configurable:!1,writable:!1},_root:{enumerable:!0,configurable:!1,writable:!1}})}return a(t,[{key:"toast",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&!St("$bvToast")&&n(s(s({},Ff(e)),{},{toastContent:t}),this._vm)}},{key:"show",value:function(t){t&&this._root.$emit("bv::show::toast",t)}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._root.$emit("bv::hide::toast",t)}}]),t}();t.mixin({beforeCreate:function(){this._bv__toast=new r(this)}}),E(t.prototype,"$bvToast")||F(t.prototype,"$bvToast",{get:function(){return this&&this._bv__toast||yt('"'.concat("$bvToast",'" must be accessed from a Vue instance "this" context.'),"BToast"),this._bv__toast}})}}})}}),Of="__BV_Tooltip__",Af={focus:!0,hover:!0,click:!0,blur:!0,manual:!0},Ef=/^html$/i,Vf=/^noninteractive$/i,Nf=/^nofade$/i,Lf=/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/i,Mf=/^(window|viewport|scrollParent)$/i,Rf=/^d\d+$/i,Hf=/^ds\d+$/i,zf=/^dh\d+$/i,jf=/^o-?\d+$/i,Gf=/^v-.+$/i,Wf=/\s+/,Uf=function(t,e,i){if(U){var n=function(t,e){var i="BTooltip",n={title:void 0,trigger:"",placement:"top",fallbackPlacement:"flip",container:!1,animation:!0,offset:0,id:null,html:!1,interactive:!0,disabled:!1,delay:Nt(i,"delay"),boundary:String(Nt(i,"boundary")),boundaryPadding:Ht(Nt(i,"boundaryPadding"),0),variant:Nt(i,"variant"),customClass:Nt(i,"customClass")};if(ut(t.value)||ct(t.value)||st(t.value)?n.title=t.value:N(t.value)&&(n=s(s({},n),t.value)),at(n.title)){var a=e.data||{};n.title=a.attrs&&!ot(a.attrs.title)?a.attrs.title:void 0}N(n.delay)||(n.delay={show:Ht(n.delay,0),hide:Ht(n.delay,0)}),t.arg&&(n.container="#".concat(t.arg)),A(t.modifiers).forEach((function(t){if(Ef.test(t))n.html=!0;else if(Vf.test(t))n.interactive=!1;else if(Nf.test(t))n.animation=!1;else if(Lf.test(t))n.placement=t;else if(Mf.test(t))t="scrollparent"===t?"scrollParent":t,n.boundary=t;else if(Rf.test(t)){var e=Ht(t.slice(1),0);n.delay.show=e,n.delay.hide=e}else Hf.test(t)?n.delay.show=Ht(t.slice(2),0):zf.test(t)?n.delay.hide=Ht(t.slice(2),0):jf.test(t)?n.offset=Ht(t.slice(1),0):Gf.test(t)&&(n.variant=t.slice(2)||null)}));var r={};return $(n.trigger||"").filter(mt).join(" ").trim().toLowerCase().split(Wf).forEach((function(t){Af[t]&&(r[t]=!0)})),A(t.modifiers).forEach((function(t){t=t.toLowerCase(),Af[t]&&(r[t]=!0)})),n.trigger=A(r).join(" "),"blur"===n.trigger&&(n.trigger="focus"),n.trigger||(n.trigger="hover focus"),n}(e,i);if(!t[Of]){var a=i.context;t[Of]=new Dd({parent:a,_scopeId:bc(a,void 0)}),t[Of].__bv_prev_data__={},t[Of].$on("show",(function(){st(n.title)&&t[Of].updateData({title:n.title(t)})}))}var r={title:n.title,triggers:n.trigger,placement:n.placement,fallbackPlacement:n.fallbackPlacement,variant:n.variant,customClass:n.customClass,container:n.container,boundary:n.boundary,delay:n.delay,offset:n.offset,noFade:!n.animation,id:n.id,interactive:n.interactive,disabled:n.disabled,html:n.html},o=t[Of].__bv_prev_data__;if(t[Of].__bv_prev_data__=r,!qn(r,o)){var l={target:t};A(r).forEach((function(e){r[e]!==o[e]&&(l[e]="title"===e&&st(r[e])?r[e](t):r[e])})),t[Of].updateData(l)}}},Yf=Dt({directives:{VBTooltip:{bind:function(t,e,i){Uf(t,e,i)},componentUpdated:function(t,e,i){i.context.$nextTick((function(){Uf(t,e,i)}))},unbind:function(t){!function(t){t[Of]&&(t[Of].$destroy(),t[Of]=null),delete t[Of]}(t)}}}}),qf=Dt({plugins:{AlertPlugin:ii,AspectPlugin:hi,AvatarPlugin:$n,BadgePlugin:Fn,BreadcrumbPlugin:Mn,ButtonPlugin:Rn,ButtonGroupPlugin:jn,ButtonToolbarPlugin:Un,CalendarPlugin:Da,CardPlugin:rr,CarouselPlugin:Tr,CollapsePlugin:qr,DropdownPlugin:Fs,EmbedPlugin:Os,FormPlugin:Gs,FormCheckboxPlugin:el,FormDatepickerPlugin:hl,FormFilePlugin:gl,FormGroupPlugin:Pl,FormInputPlugin:El,FormRadioPlugin:Nl,FormRatingPlugin:Ul,FormSelectPlugin:Jl,FormSpinbuttonPlugin:su,FormTagsPlugin:bu,FormTextareaPlugin:Su,FormTimepickerPlugin:Iu,ImagePlugin:Ou,InputGroupPlugin:Hu,JumbotronPlugin:Uu,LayoutPlugin:Ju,LinkPlugin:Qu,ListGroupPlugin:rc,MediaPlugin:dc,ModalPlugin:Mc,NavPlugin:Kc,NavbarPlugin:ad,OverlayPlugin:sd,PaginationPlugin:vd,PaginationNavPlugin:Sd,PopoverPlugin:Kd,ProgressPlugin:Zd,SidebarPlugin:ah,SpinnerPlugin:rh,TablePlugin:ef,TabsPlugin:of,TimePlugin:sf,ToastPlugin:If,TooltipPlugin:Dt({components:{BTooltip:_d},plugins:{VBTooltipPlugin:Yf}})}}),Kf=Dt({directives:{VBHover:rl}}),Xf=Dt({directives:{VBModal:Ac}}),Zf={element:"body",offset:10,method:"auto",throttle:75},Jf={element:"(string|element|component)",offset:"number",method:"string",throttle:"number"},Qf="dropdown-item",tp="active",ep={ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown, .dropup",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},ip="offset",np="position",ap=/^.*(#[^#]+)$/,rp=["webkitTransitionEnd","transitionend","otransitionend","oTransitionEnd"],op=function(t){return function(t){return Object.prototype.toString.call(t)}(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()},sp=function(){function t(e,n,a){i(this,t),this.$el=e,this.$scroller=null,this.$selector=[ep.NAV_LINKS,ep.LIST_ITEMS,ep.DROPDOWN_ITEMS].join(","),this.$offsets=[],this.$targets=[],this.$activeTarget=null,this.$scrollHeight=0,this.$resizeTimeout=null,this.$scrollerObserver=null,this.$targetsObserver=null,this.$root=a||null,this.$config=null,this.updateConfig(n)}return a(t,[{key:"updateConfig",value:function(t,e){this.$scroller&&(this.unlisten(),this.$scroller=null);var i=s(s({},this.constructor.Default),t);if(e&&(this.$root=e),function(t,e,i){for(var n in i)if(E(i,n)){var a=i[n],r=e[n],o=r&&ue(r)?"element":op(r);o=r&&r._isVue?"component":o,new RegExp(a).test(o)||yt("".concat(t,': Option "').concat(n,'" provided type "').concat(o,'" but expected type "').concat(a,'"'))}}(this.constructor.Name,i,this.constructor.DefaultType),this.$config=i,this.$root){var n=this;this.$root.$nextTick((function(){n.listen()}))}else this.listen()}},{key:"dispose",value:function(){this.unlisten(),clearTimeout(this.$resizeTimeout),this.$resizeTimeout=null,this.$el=null,this.$config=null,this.$scroller=null,this.$selector=null,this.$offsets=null,this.$targets=null,this.$activeTarget=null,this.$scrollHeight=null}},{key:"listen",value:function(){var t=this,e=this.getScroller();e&&"BODY"!==e.tagName&&dr(e,"scroll",this,ur),dr(window,"scroll",this,ur),dr(window,"resize",this,ur),dr(window,"orientationchange",this,ur),rp.forEach((function(e){dr(window,e,t,ur)})),this.setObservers(!0),this.handleEvent("refresh")}},{key:"unlisten",value:function(){var t=this,e=this.getScroller();this.setObservers(!1),e&&"BODY"!==e.tagName&&hr(e,"scroll",this,ur),hr(window,"scroll",this,ur),hr(window,"resize",this,ur),hr(window,"orientationchange",this,ur),rp.forEach((function(e){hr(window,e,t,ur)}))}},{key:"setObservers",value:function(t){var e=this;this.$scrollerObserver&&this.$scrollerObserver.disconnect(),this.$targetsObserver&&this.$targetsObserver.disconnect(),this.$scrollerObserver=null,this.$targetsObserver=null,t&&(this.$targetsObserver=sr(this.$el,(function(){e.handleEvent("mutation")}),{subtree:!0,childList:!0,attributes:!0,attributeFilter:["href"]}),this.$scrollerObserver=sr(this.getScroller(),(function(){e.handleEvent("mutation")}),{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["id","style","class"]}))}},{key:"handleEvent",value:function(t){var e=ut(t)?t:t.type,i=this;"scroll"===e?(this.$scrollerObserver||this.listen(),this.process()):/(resize|orientationchange|mutation|refresh)/.test(e)&&(i.$resizeTimeout||(i.$resizeTimeout=setTimeout((function(){i.refresh(),i.process(),i.$resizeTimeout=null}),i.$config.throttle)))}},{key:"refresh",value:function(){var t=this,e=this.getScroller();if(e){var i=e!==e.window?np:ip,n="auto"===this.$config.method?i:this.$config.method,a=n===np?Oe:Ie,r=n===np?this.getScrollTop():0;return this.$offsets=[],this.$targets=[],this.$scrollHeight=this.getScrollHeight(),ve(this.$selector,this.$el).map((function(t){return $e(t,"href")})).filter((function(t){return t&&ap.test(t||"")})).map((function(t){var i=t.replace(ap,"$1").trim();if(!i)return null;var n=ge(i,e);return n&&fe(n)?{offset:Ht(a(n).top,0)+r,target:i}:null})).filter(Boolean).sort((function(t,e){return t.offset-e.offset})).reduce((function(e,i){return e[i.target]||(t.$offsets.push(i.offset),t.$targets.push(i.target),e[i.target]=!0),e}),{}),this}}},{key:"process",value:function(){var t=this.getScrollTop()+this.$config.offset,e=this.getScrollHeight(),i=this.$config.offset+e-this.getOffsetHeight();if(this.$scrollHeight!==e&&this.refresh(),t>=i){var n=this.$targets[this.$targets.length-1];this.$activeTarget!==n&&this.activate(n)}else{if(this.$activeTarget&&t0)return this.$activeTarget=null,void this.clear();for(var a=this.$offsets.length;a--;){this.$activeTarget!==this.$targets[a]&&t>=this.$offsets[a]&&(at(this.$offsets[a+1])||t0&&this.$root&&this.$root.$emit("bv::scrollspy::activate",t,i)}},{key:"clear",value:function(){var t=this;ve("".concat(this.$selector,", ").concat(ep.NAV_ITEMS),this.$el).filter((function(t){return Ce(t,tp)})).forEach((function(e){return t.setActiveState(e,!1)}))}},{key:"setActiveState",value:function(t,e){t&&(e?we(t,tp):Be(t,tp))}}],[{key:"Name",get:function(){return"v-b-scrollspy"}},{key:"Default",get:function(){return Zf}},{key:"DefaultType",get:function(){return Jf}}]),t}(),lp="__BV_ScrollSpy__",up=/^\d+$/,cp=/^(auto|position|offset)$/,dp=function(t,e,i){if(U){var n=function(t){var e={};return t.arg&&(e.element="#".concat(t.arg)),A(t.modifiers).forEach((function(t){up.test(t)?e.offset=Ht(t,0):cp.test(t)&&(e.method=t)})),ut(t.value)?e.element=t.value:ct(t.value)?e.offset=ui(t.value):V(t.value)&&A(t.value).filter((function(t){return!!sp.DefaultType[t]})).forEach((function(i){e[i]=t.value[i]})),e}(e);t[lp]?t[lp].updateConfig(n,i.context.$root):t[lp]=new sp(t,n,i.context.$root)}},hp=Dt({plugins:{VBHoverPlugin:Kf,VBModalPlugin:Xf,VBPopoverPlugin:qd,VBScrollspyPlugin:Dt({directives:{VBScrollspy:{bind:function(t,e,i){dp(t,e,i)},inserted:function(t,e,i){dp(t,e,i)},update:function(t,e,i){e.value!==e.oldValue&&dp(t,e,i)},componentUpdated:function(t,e,i){e.value!==e.oldValue&&dp(t,e,i)},unbind:function(t){!function(t){t[lp]&&(t[lp].dispose(),t[lp]=null,delete t[lp])}(t)}}}}),VBTogglePlugin:Yr,VBTooltipPlugin:Yf,VBVisiblePlugin:Dt({directives:{VBVisible:Xa}})}}),fp=(s({},Xi),{install:$t({plugins:{componentsPlugin:qf,directivesPlugin:hp}}),NAME:"BootstrapVue"});return hf=fp,H&&window.Vue&&window.Vue.use(hf),H&&hf.NAME&&(window[hf.NAME]=hf),fp})); -//# sourceMappingURL=bootstrap-vue.min.js.map \ No newline at end of file diff --git a/cookbook/static/js/portal-vue.umd.min.js b/cookbook/static/js/portal-vue.umd.min.js deleted file mode 100644 index e3f16f97..00000000 --- a/cookbook/static/js/portal-vue.umd.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * portal-vue © Thorsten Lünborg, 2019 - * - * Version: 2.1.7 - * - * LICENCE: MIT - * - * https://github.com/linusborg/portal-vue - * - */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],b):b(a.PortalVue={},a.Vue)})(this,function(a,b){'use strict';var m=Math.round;function c(a){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},c(a)}function d(a){return e(a)||f(a)||g()}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=b.length&&this.slim?this.normalizeOwnChildren(b)[0]:a(c,[this.normalizeOwnChildren(b)]):this.slim?a():a(c,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),v=b.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:s.transports,firstRender:!0}},created:function(){var a=this;this.$nextTick(function(){s.registerTarget(a.name,a)})},watch:{ownTransports:function(){this.$emit("change",0this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=n(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=n(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}})},4667:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class o extends n{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const n=[e[0]];let r=0;for(;r"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends s{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const n=e?o.varKinds.var:this.varKind,r=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,t),this}get names(){return R(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class m extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let r=n.length;for(;r--;){const o=n[r];o.optimizeNames(e,t)||(j(e,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>$(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(T(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return R(e,this.condition),this.else&&$(e,this.else.names),e}}b.kind="if";class w extends g{}w.kind="for";class x extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return $(super.names,this.iteration.names)}}class k extends w{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:n,from:r,to:i}=this;return`for(${t} ${n}=${r}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){const e=R(super.names,this.from);return R(e,this.to)}}class _ extends w{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return $(super.names,this.iterable.names)}}class O extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}O.kind="func";class S extends m{render(e){return"return "+super.render(e)}}S.kind="return";class E extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&$(e,this.catch.names),this.finally&&$(e,this.finally.names),e}}class P extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class A extends g{render(e){return"finally"+super.render(e)}}function $(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function R(e,t){return t instanceof r._CodeOrName?$(e,t.names):e}function C(e,t,n){return e instanceof r.Name?i(e):(o=e)instanceof r._Code&&o._items.some((e=>e instanceof r.Name&&1===t[e.str]&&void 0!==n[e.str]))?new r._Code(e._items.reduce(((e,t)=>(t instanceof r.Name&&(t=i(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const r=n[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}}function j(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:r._`!${L(e)}`}A.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){const o=this._scope.toName(t);return void 0!==n&&r&&(this._constants[o.str]=n),this._leafNode(new l(e,o,n)),o}const(e,t,n){return this._def(o.varKinds.const,e,t,n)}let(e,t,n){return this._def(o.varKinds.let,e,t,n)}var(e,t,n){return this._def(o.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new c(e,t,n))}add(e,n){return this._leafNode(new u(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[n,o]of e)t.length>1&&t.push(","),t.push(n),(n!==o||this.opts.es5)&&(t.push(":"),r.addCodeArg(t,o));return t.push("}"),new r._Code(t)}if(e,t,n){if(this._blockNode(new b(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,n,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const a=this._scope.toName(e);return this._for(new k(i,a,t,n),(()=>r(a)))}forOf(e,t,n,i=o.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,r._`${e}.length`,(t=>{this.var(a,r._`${e}[${t}]`),n(a)}))}return this._for(new _("of",i,a,t),(()=>n(a)))}forIn(e,t,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,r._`Object.keys(${t})`,n);const a=this._scope.toName(e);return this._for(new _("in",i,a,t),(()=>n(a)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new E;if(this._blockNode(r),this.code(e),t){const e=this.name("e");this._currNode=r.catch=new P(e),t(e)}return n&&(this._currNode=r.finally=new A,this.code(n)),this._endBlockNode(P,A)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=r.nil,n,o){return this._blockNode(new O(e,t,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(O)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const I=D(t.operators.AND);t.and=function(...e){return e.reduce(I)};const N=D(t.operators.OR);function D(e){return(t,n)=>t===r.nil?n:n===r.nil?t:r._`${L(t)} ${e} ${L(n)}`}function L(e){return e instanceof r.Name?e:r._`(${e})`}t.or=function(...e){return e.reduce(N)}},7791:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const r=n(4667);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof r.Name?e:this.name(e)}name(e){return new r.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class s extends r.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=r._`.${new r.Name(t)}[${n}]`}}t.ValueScopeName=s;const l=r._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:r.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(e),{prefix:o}=r,i=null!==(n=t.key)&&void 0!==n?n:t.ref;let a=this._values[o];if(a){const e=a.get(i);if(e)return e}else a=this._values[o]=new Map;a.set(i,r);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return r._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,n){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(e,n,a={},s){let l=r.nil;for(const c in e){const u=e[c];if(!u)continue;const p=a[c]=a[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,i.Started);let a=n(e);if(a){const n=this.opts.es5?t.varKinds.var:t.varKinds.const;l=r._`${l}${n} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(e)))throw new o(e);l=r._`${l}${a}${this.opts._n}`}p.set(e,i.Completed)}))}return l}}},1885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const r=n(4475),o=n(6124),i=n(5018);function a(e,t){const n=e.const("err",t);e.if(r._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,r._`[${n}]`)),r._`${i.default.vErrors}.push(${n})`),e.code(r._`${i.default.errors}++`)}function s(e,t){const{gen:n,validateName:o,schemaEnv:i}=e;i.$async?n.throw(r._`new ${e.ValidationError}(${t})`):(n.assign(r._`${o}.errors`,t),n.return(!1))}t.keywordError={message:({keyword:e})=>r.str`should pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?r.str`"${e}" keyword must be ${t} ($data)`:r.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,n=t.keywordError,o,i){const{it:l}=e,{gen:u,compositeRule:p,allErrors:d}=l,f=c(e,n,o);(null!=i?i:p||d)?a(u,f):s(l,r._`[${f}]`)},t.reportExtraError=function(e,n=t.keywordError,r){const{it:o}=e,{gen:l,compositeRule:u,allErrors:p}=o;a(l,c(e,n,r)),u||p||s(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(r._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(r._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:o,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",a,i.default.errors,(a=>{e.const(l,r._`${i.default.vErrors}[${a}]`),e.if(r._`${l}.instancePath === undefined`,(()=>e.assign(r._`${l}.instancePath`,r.strConcat(i.default.instancePath,s.errorPath)))),e.assign(r._`${l}.schemaPath`,r.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(r._`${l}.schema`,n),e.assign(r._`${l}.data`,o))}))};const l={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function c(e,t,n){const{createErrors:o}=e.it;return!1===o?r._`{}`:function(e,t,n={}){const{gen:o,it:a}=e,s=[u(a,n),p(e,n)];return function(e,{params:t,message:n},o){const{keyword:a,data:s,schemaValue:c,it:u}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:h}=u;o.push([l.keyword,a],[l.params,"function"==typeof t?t(e):t||r._`{}`]),p.messages&&o.push([l.message,"function"==typeof n?n(e):n]),p.verbose&&o.push([l.schema,c],[l.parentSchema,r._`${f}${h}`],[i.default.data,s]),d&&o.push([l.propertyName,d])}(e,t,s),o.object(...s)}(e,t,n)}function u({errorPath:e},{instancePath:t}){const n=t?r.str`${e}${o.getErrorPath(t,o.Type.Str)}`:e;return[i.default.instancePath,r.strConcat(i.default.instancePath,n)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:i}){let a=i?t:r.str`${t}/${e}`;return n&&(a=r.str`${a}${o.getErrorPath(n,o.Type.Str)}`),[l.schemaPath,a]}},7805:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const r=n(4475),o=n(8451),i=n(5018),a=n(9826),s=n(6124),l=n(1321),c=n(540);class u{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:a.normalizeId(null==n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function p(e){const t=f.call(this,e);if(t)return t;const n=a.getFullPath(e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,p=new r.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u});let d;e.$async&&(d=p.scopeValue("Error",{ref:o.default,code:r._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");e.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:r.stringify(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:r.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:r._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),l.validateFunctionCode(m),p.optimize(this.opts.code.optimize);const t=p.toString();g=`const visitedNodesForRef = new WeakMap(); ${p.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const n=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:n}),n.errors=null,n.schema=e.schema,n.schemaEnv=e,e.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=m;n.evaluated={props:e instanceof r.Name?void 0:e,items:t instanceof r.Name?void 0:t,dynamicProps:e instanceof r.Name,dynamicItems:t instanceof r.Name},n.source&&(n.source.evaluated=r.stringify(n.evaluated))}return e.validate=n,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),t}finally{this._compilations.delete(e)}}function d(e){return a.inlineRef(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:p.call(this,e)}function f(e){for(const r of this._compilations)if(n=e,(t=r).schema===n.schema&&t.root===n.root&&t.baseId===n.baseId)return r;var t,n}function h(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){const n=c.parse(t),r=a._getFullPath(n);let o=a.getFullPath(e.baseId);if(Object.keys(e.schema).length>0&&r===o)return y.call(this,n,e);const i=a.normalizeId(r),s=this.refs[i]||this.schemas[i];if("string"==typeof s){const t=m.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,n,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||p.call(this,s),i===a.normalizeId(t)){const{schema:t}=s,{schemaId:n}=this.opts,r=t[n];return r&&(o=a.resolveUrl(o,r)),new u({schema:t,schemaId:n,root:e,baseId:o})}return y.call(this,n,s)}}t.SchemaEnv=u,t.compileSchema=p,t.resolveRef=function(e,t,n){var r;const o=a.resolveUrl(t,n),i=e.refs[o];if(i)return i;let s=h.call(this,e,o);if(void 0===s){const n=null===(r=e.localRefs)||void 0===r?void 0:r[o],{schemaId:i}=this.opts;n&&(s=new u({schema:n,schemaId:i,root:e,baseId:t}))}if(void 0===s&&this.opts.loadSchemaSync){const r=this.opts.loadSchemaSync(t,n,o);!r||this.refs[o]||this.schemas[o]||(this.addSchema(r,o,void 0),s=h.call(this,e,o))}return void 0!==s?e.refs[o]=d.call(this,s):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:n,root:r}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const r of e.fragment.slice(1).split("/")){if("boolean"==typeof n)return;if(void 0===(n=n[s.unescapeFragment(r)]))return;const e="object"==typeof n&&n[this.opts.schemaId];!g.has(r)&&e&&(t=a.resolveUrl(t,e))}let i;if("boolean"!=typeof n&&n.$ref&&!s.schemaHasRulesButRef(n,this.RULES)){const e=a.resolveUrl(t,n.$ref);i=m.call(this,r,e)}const{schemaId:l}=this.opts;return i=i||new u({schema:n,schemaId:l,root:r,baseId:t}),i.schema!==i.root.schema?i:void 0}},5018:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};t.default=o},4143:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9826);class o extends Error{constructor(e,t,n){super(n||`can't resolve reference ${t} from id ${e}`),this.missingRef=r.resolveUrl(e,t),this.missingSchema=r.normalizeId(r.getFullPath(this.missingRef))}}t.default=o},9826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const r=n(6124),o=n(4063),i=n(4029),a=n(540),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&u(e)<=t)};const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(l.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(c))return!0;if("object"==typeof n&&c(n))return!0}return!1}function u(e){let t=0;for(const n in e){if("$ref"===n)return 1/0;if(t++,!s.has(n)&&("object"==typeof e[n]&&r.eachItem(e[n],(e=>t+=u(e))),t===1/0))return 1/0}return t}function p(e="",t){return!1!==t&&(e=h(e)),d(a.parse(e))}function d(e){return a.serialize(e).split("#")[0]+"#"}t.getFullPath=p,t._getFullPath=d;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t){return t=h(t),a.resolve(e,t)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e){if("boolean"==typeof e)return{};const{schemaId:t}=this.opts,n=h(e[t]),r={"":n},s=p(n,!1),l={},c=new Set;return i(e,{allKeys:!0},((e,n,o,i)=>{if(void 0===i)return;const p=s+n;let f=r[i];function g(t){if(t=h(f?a.resolve(f,t):t),c.has(t))throw d(t);c.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==h(p)&&("#"===t[0]?(u(e,l[t],t),l[t]=e):this.refs[t]=p),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);g.call(this,`#${e}`)}}"string"==typeof e[t]&&(f=g.call(this,e[t])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),r[n]=f})),l;function u(e,t,n){if(void 0!==t&&!o(e,t))throw d(n)}function d(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3664:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&n.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6124:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const r=n(4475),o=n(4667);function i(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const o=r.RULES.keywords;for(const n in t)o[n]||h(e,`unknown keyword: "${n}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(i,a,s,l)=>{const c=void 0===s?a:s instanceof r.Name?(a instanceof r.Name?e(i,a,s):t(i,a,s),s):a instanceof r.Name?(t(i,s,a),a):n(a,s);return l!==r.Name||c instanceof r.Name?c:o(i,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const n=e.var("props",r._`{}`);return void 0!==t&&p(e,n,t),n}function p(e,t,n){Object.keys(n).forEach((n=>e.assign(r._`${t}${r.getProperty(n)}`,!0)))}t.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,o,i){if(!i){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return r._`${n}`}return r._`${e}${t}${r.getProperty(o)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,(()=>{e.if(r._`${t} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,r._`${n} || {}`).code(r._`Object.assign(${n}, ${t})`)))})),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,(()=>{!0===t?e.assign(n,!0):(e.assign(n,r._`${n} || {}`),p(e,n,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,(()=>e.assign(n,r._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`))),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,(()=>e.assign(n,!0===t||r._`${n} > ${t} ? ${n} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=p;const d={};var f;function h(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,n){if(e instanceof r.Name){const o=t===f.Num;return n?o?r._`"[" + ${e} + "]"`:r._`"['" + ${e} + "']"`:o?r._`"/" + ${e}`:r._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?r.getProperty(e).toString():"/"+s(e)},t.checkStrictMode=h},4566:function(e,t){"use strict";function n(e,t){return t.rules.some((t=>r(e,t)))}function r(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},r){const o=t.RULES.types[r];return o&&!0!==o&&n(e,o)},t.shouldUseGroup=n,t.shouldUseRule=r},7627:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const r=n(1885),o=n(4475),i=n(5018),a={message:"boolean schema is false"};function s(e,t){const{gen:n,data:o}=e,i={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};r.reportError(i,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:n,validateName:r}=e;!1===n?s(e,!1):"object"==typeof n&&!0===n.$async?t.return(i.default.data):(t.assign(o._`${r}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:n,schema:r}=e;!1===r?(n.var(t,!1),s(e)):n.var(t,!0)}},7927:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const r=n(3664),o=n(4566),i=n(1885),a=n(4475),s=n(6124);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(r.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:n,data:r,opts:i}=e,s=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&o.schemaHasRulesForType(e,t[0]));if(c){const o=d(t,r,i.strictNumbers,l.Wrong);n.if(o,(()=>{s.length?function(e,t,n){const{gen:r,data:o,opts:i}=e,s=r.let("dataType",a._`typeof ${o}`),l=r.let("coerced",a._`undefined`);"array"===i.coerceTypes&&r.if(a._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>r.assign(o,a._`${o}[0]`).assign(s,a._`typeof ${o}`).if(d(t,o,i.strictNumbers),(()=>r.assign(l,o))))),r.if(a._`${l} !== undefined`);for(const e of n)(u.has(e)||"array"===e&&"array"===i.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void r.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(l,a._`"" + ${o}`).elseIf(a._`${o} === null`).assign(l,a._`""`);case"number":return void r.elseIf(a._`${s} == "boolean" || ${o} === null + || (${s} == "string" && ${o} && ${o} == +${o})`).assign(l,a._`+${o}`);case"integer":return void r.elseIf(a._`${s} === "boolean" || ${o} === null + || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,a._`+${o}`);case"boolean":return void r.elseIf(a._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(a._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return r.elseIf(a._`${o} === "" || ${o} === 0 || ${o} === false`),void r.assign(l,null);case"array":r.elseIf(a._`${s} === "string" || ${s} === "number" + || ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}r.else(),h(e),r.endIf(),r.if(a._`${l} !== undefined`,(()=>{r.assign(o,l),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${n}]`,r)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,n,r=l.Correct){const o=r===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return r===l.Correct?i:a.not(i);function s(e=a.nil){return a.and(a._`typeof ${t} == "number"`,e,n?a._`isFinite(${t})`:a.nil)}}function d(e,t,n,r){if(1===e.length)return p(e[0],t,n,r);let o;const i=s.toHash(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=a.and(o,p(e,t,n,r));return o}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,o=s.schemaRefOrVal(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}(e);i.reportError(t,f)}t.reportTypeError=h},2537:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(4475),o=n(6124);function i(e,t,n){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===n)return;const c=r._`${s}${r.getProperty(t)}`;if(a)return void o.checkStrictMode(e,`default is ignored for: ${c}`);let u=r._`${c} === undefined`;"empty"===l.useDefaults&&(u=r._`${u} || ${c} === null || ${c} === ""`),i.if(u,r._`${c} = ${r.stringify(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const t in n)i(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>i(e,n,t.default)))}},1321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(7627),o=n(7927),i=n(4566),a=n(7927),s=n(2537),l=n(6488),c=n(4688),u=n(4475),p=n(5018),d=n(9826),f=n(6124),h=n(1885);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:o},i){o.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,r.$async,(()=>{e.code(u._`"use strict"; ${g(n,o)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,r.$async,(()=>e.code(g(n,o)).code(i)))}function g(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){f.checkUnknownRules(e),function(e){const{schema:t,errSchemaPath:n,opts:r,self:o}=e;t.$ref&&r.ignoreKeywordsWithRef&&f.schemaHasRulesButRef(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function w(e,t){if(e.opts.jtd)return k(e,[],!1,t);const n=o.getSchemaTypes(e.schema);k(e,n,!o.coerceAndCheckDataType(e,n),t)}function x({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:o}){const i=n.$comment;if(!0===o.$comment)e.code(u._`${p.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const n=u.str`${r}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${p.default.self}.opts.$comment(${i}, ${n}, ${o}.schema)`)}}function k(e,t,n,r){const{gen:o,schema:s,data:l,allErrors:c,opts:d,self:h}=e,{RULES:m}=h;function g(f){i.shouldUseGroup(s,f)&&(f.type?(o.if(a.checkDataType(f.type,l,d.strictNumbers)),_(e,f),1===t.length&&t[0]===f.type&&n&&(o.else(),a.reportTypeError(e)),o.endIf()):_(e,f),c||o.if(u._`${p.default.errors} === ${r||0}`))}!s.$ref||!d.ignoreKeywordsWithRef&&f.schemaHasRulesButRef(s,m)?(d.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{O(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>O(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const n=e.self.RULES.all;for(const r in n){const o=n[r];if("object"==typeof o&&i.shouldUseRule(e.schema,o)){const{type:n}=o.definition;n.length&&!n.some((e=>{return r=e,(n=t).includes(r)||"number"===r&&n.includes("integer");var n,r}))&&S(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>P(e,"$ref",m.all.$ref.definition)))}function _(e,t){const{gen:n,schema:r,opts:{useDefaults:o}}=e;o&&s.assignDefaults(e,t.type),n.block((()=>{for(const n of t.rules)i.shouldUseRule(r,n)&&P(e,n.keyword,n.definition,t.type)}))}function O(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,f.checkStrictMode(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),y(e))?function(e){const{schema:t,opts:n,gen:r}=e;m(e,(()=>{n.$comment&&t.$comment&&x(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&f.checkStrictMode(e,"default is ignored in the schema root")}(e),r.let(p.default.vErrors,null),r.let(p.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",u._`${n}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:o,opts:i}=e;n.$async?t.if(u._`${p.default.errors} === 0`,(()=>t.return(p.default.data)),(()=>t.throw(u._`new ${o}(${p.default.vErrors})`))):(t.assign(u._`${r}.errors`,p.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof u.Name&&e.assign(u._`${t}.props`,n),r instanceof u.Name&&e.assign(u._`${t}.items`,r)}(e),t.return(u._`${p.default.errors} === 0`))}(e)}))}(e):m(e,(()=>r.topBoolOrEmptySchema(e)))};class E{constructor(e,t,n){if(l.validateKeywordUsage(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=f.schemaRefOrVal(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",R(this.$data,e));else if(this.schemaCode=this.schemaValue,!l.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,n){this.gen.if(u.not(e)),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.result(e,void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${u.or(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){h.reportError(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');h.resetErrorsCount(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=u.nil){this.gen.block((()=>{this.check$data(e,n),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:o,def:i}=this;n.if(u.or(u._`${r} === undefined`,t)),e!==u.nil&&n.assign(e,!0),(o.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:r,it:o}=this;return u.or(function(){if(n.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return u._`${a.checkDataTypes(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(r.validateSchema){const n=e.scopeValue("validate$data",{ref:r.validateSchema});return u._`!${n}(${t})`}return u.nil}())}subschema(e,t){const n=c.getSubschema(this.it,e);c.extendSubschemaData(n,this.it,e),c.extendSubschemaMode(n,e);const o={...this.it,...n,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),y(e))?function(e,t){const{schema:n,gen:r,opts:o}=e;o.$comment&&n.$comment&&x(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=d.resolveUrl(e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=r.const("_errs",p.default.errors);w(e,i),r.var(t,u._`${i} === ${p.default.errors}`)}(e,t):r.boolOrEmptySchema(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=f.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=f.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function P(e,t,n,r){const o=new E(e,n,t);"code"in n?n.code(o,r):o.$data&&n.validate?l.funcKeywordCode(o,n):"macro"in n?l.macroKeywordCode(o,n):(n.compile||n.validate)&&l.funcKeywordCode(o,n)}t.KeywordCxt=E;const A=/^\/(?:[^~]|~0|~1)*$/,$=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function R(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let o,i;if(""===e)return p.default.rootData;if("/"===e[0]){if(!A.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=p.default.rootData}else{const a=$.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(o=a[2],"#"===o){if(s>=t)throw new Error(l("property/index",s));return r[t-s]}if(s>t)throw new Error(l("data",s));if(i=n[t-s],!o)return i}let a=i;const s=o.split("/");for(const e of s)e&&(i=u._`${i}${u.getProperty(f.unescapeJsonPointer(e))}`,a=u._`${a} && ${i}`);return a;function l(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=R},6488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const r=n(4475),o=n(5018),i=n(8619),a=n(1885);function s(e){const{gen:t,data:n,it:o}=e;t.if(o.parentData,(()=>t.assign(n,r._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,n){if(void 0===n)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:r.stringify(n)})}t.macroKeywordCode=function(e,t){const{gen:n,keyword:o,schema:i,parentSchema:a,it:s}=e,c=t.macro.call(s.self,i,a,s),u=l(n,o,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const p=n.name("valid");e.subschema({schema:c,schemaPath:r.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var n;const{gen:c,keyword:u,schema:p,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,p,d,h):t.validate,g=l(c,u,m),y=c.let("valid");function v(n=(t.async?r._`await `:r.nil)){const a=h.opts.passContext?o.default.this:o.default.self,s=!("compile"in t&&!f||!1===t.schema);c.assign(y,r._`${n}${i.callValidateCode(e,g,a,s)}`,t.modifying)}function b(e){var n;c.if(r.not(null!==(n=t.valid)&&void 0!==n?n:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&s(e),b((()=>e.error()));else{const n=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(r._`await `)),(t=>c.assign(y,!1).if(r._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,r._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=r._`${g}.errors`;return c.assign(e,null),v(r.nil),e}();t.modifying&&s(e),b((()=>function(e,t){const{gen:n}=e;n.if(r._`Array.isArray(${t})`,(()=>{n.assign(o.default.vErrors,r._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,r._`${o.default.vErrors}.length`),a.extendErrors(e)}),(()=>e.error()))}(e,n)))}})),e.ok(null!==(n=t.valid)&&void 0!==n?n:y)},t.validSchemaType=function(e,t,n=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:r},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const a=o.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);n.logger.error(e)}}},4688:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const r=n(4475),o=n(6124);t.getSubschema=function(e,{keyword:t,schemaProp:n,schema:i,schemaPath:a,errSchemaPath:s,topSchemaRef:l}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===n?{schema:i,schemaPath:r._`${e.schemaPath}${r.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:r._`${e.schemaPath}${r.getProperty(t)}${r.getProperty(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${o.escapeFragment(n)}`}}if(void 0!==i){if(void 0===a||void 0===s||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:a,topSchemaRef:l,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:i,data:a,dataTypes:s,propertyName:l}){if(void 0!==a&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==n){const{errorPath:a,dataPathArr:s,opts:l}=t;u(c.let("data",r._`${t.data}${r.getProperty(n)}`,!0)),e.errorPath=r.str`${a}${o.getErrorPath(n,i,l.jsPropertySyntax)}`,e.parentDataProperty=r._`${n}`,e.dataPathArr=[...s,e.parentDataProperty]}function u(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}void 0!==a&&(u(a instanceof r.Name?a:c.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:i}){void 0!==r&&(e.compositeRule=r),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=n}},3325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=n(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var o=n(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=n(8451),a=n(4143),s=n(3664),l=n(7805),c=n(4475),u=n(9826),p=n(7927),d=n(6124),f=n(5449),h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,n,r,o,i,a,s,l,c,u,p,d,f,h,m,g,y,v,b,w,x,k;const _=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,S=!0===O||void 0===O?1:O||0;return{strictSchema:null===(r=null!==(n=e.strictSchema)&&void 0!==n?n:_)||void 0===r||r,strictNumbers:null===(i=null!==(o=e.strictNumbers)&&void 0!==o?o:_)||void 0===i||i,strictTypes:null!==(s=null!==(a=e.strictTypes)&&void 0!==a?a:_)&&void 0!==s?s:"log",strictTuples:null!==(c=null!==(l=e.strictTuples)&&void 0!==l?l:_)&&void 0!==c?c:"log",strictRequired:null!==(p=null!==(u=e.strictRequired)&&void 0!==u?u:_)&&void 0!==p&&p,code:e.code?{...e.code,optimize:S}:{optimize:S},loopRequired:null!==(d=e.loopRequired)&&void 0!==d?d:200,loopEnum:null!==(f=e.loopEnum)&&void 0!==f?f:200,meta:null===(h=e.meta)||void 0===h||h,messages:null===(m=e.messages)||void 0===m||m,inlineRefs:null===(g=e.inlineRefs)||void 0===g||g,schemaId:null!==(y=e.schemaId)&&void 0!==y?y:"$id",addUsedSchema:null===(v=e.addUsedSchema)||void 0===v||v,validateSchema:null===(b=e.validateSchema)||void 0===b||b,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(x=e.unicodeRegExp)||void 0===x||x,int32range:null===(k=e.int32range)||void 0===k||k}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:n}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=s.getRules(),w.call(this,g,e,"NOT SUPPORTED"),w.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let r=f;"id"===n&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await o.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||i.call(this,n)}async function o(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const n=await c.call(this,e);this.refs[e]||await o.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,r);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=u.normalizeId(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,e);if(!r&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:n});if(t=l.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=u.normalizeId(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,n,t),!t)return d.eachItem(n,(e=>$.call(this,e))),this;C.call(this,t);const r={...t,type:p.getJSONTypes(t.type),schemaType:p.getJSONTypes(t.schemaType)};return d.eachItem(n,0===r.type.length?e=>$.call(this,e,r):e=>r.type.forEach((t=>$.call(this,e,r,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const r of t){const t=r.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:r}=t.definition,i=o[e];r&&i&&(o[e]=T(i))}}return e}_removeAllSchemas(e,t){for(const n in e){const r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;const c=u.getSchemaRefs.call(this,e);return n=u.normalizeId(i||n),s=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:n,localRefs:c}),this._cache.set(s.schema,s),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=s),r&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,n,r="error"){for(const o in e){const i=o;i in t&&this.logger[r](`${n}: option ${o}. ${e[i]}`)}}function x(e){return e=u.normalizeId(e),this.schemas[e]||this.refs[e]}function k(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function _(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function S(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=b,b.ValidationError=i.default,b.MissingRefError=a.default;const E={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:n}=this;if(d.eachItem(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function $(e,t,n){var r;const o=null==t?void 0:t.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let a=o?i.post:i.rules.find((({type:e})=>e===n));if(a||(a={type:n,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:p.getJSONTypes(t.type),schemaType:p.getJSONTypes(t.schemaType)}};t.before?R.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,null===(r=t.implements)||void 0===r||r.forEach((e=>this.addKeyword(e)))}function R(e,t,n){const r=e.rules.findIndex((e=>e.keyword===n));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function C(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=T(t)),e.validateSchema=this.compile(t,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,j]}}},5449:function(e){"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},4137:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},412:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4063);r.code='require("ajv/dist/runtime/equal").default',t.default=r},5872:function(e,t){"use strict";function n(e){const t=e.length;let n,r=0,o=0;for(;o=55296&&n<=56319&&or.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?a(e,r):o.checkStrictMode(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:n,schema:i,data:a,keyword:s,it:l}=e;l.items=!0;const c=n.const("len",r._`${a}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(r._`${c} <= ${t.length}`);else if("object"==typeof i&&!o.alwaysValidSchema(l,i)){const i=n.var("valid",r._`${c} <= ${t.length}`);n.if(r.not(i),(()=>function(i){n.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:o.Type.Num},i),l.allErrors||n.if(r.not(i),(()=>n.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=a,t.default=i},1422:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8619),o=n(4475),i=n(5018),a=n(6124),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,parentSchema:n,data:s,errsCount:l,it:c}=e,{schema:u=c.opts.defaultAdditionalProperties}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:p,opts:d}=c;if(c.props=!0,"all"!==d.removeAdditional&&a.alwaysValidSchema(c,u))return;const f=r.allSchemaProperties(n.properties),h=r.allSchemaProperties(n.patternProperties);function m(e){t.code(o._`delete ${s}[${e}]`)}function g(n){if("all"===d.removeAdditional||d.removeAdditional&&!1===u)m(n);else{if(!1===u)return e.setParams({additionalProperty:n}),e.error(),void(p||t.break());if("object"==typeof u&&!a.alwaysValidSchema(c,u)){const r=t.name("valid");"failing"===d.removeAdditional?(y(n,r,!1),t.if(o.not(r),(()=>{e.reset(),m(n)}))):(y(n,r),p||t.if(o.not(r),(()=>t.break())))}}}function y(t,n,r){const o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===r&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,n)}t.forIn("key",s,(i=>{f.length||h.length?t.if(function(i){let s;if(f.length>8){const e=a.schemaRefOrVal(c,n.properties,"properties");s=r.isOwnProperty(t,e,i)}else s=f.length?o.or(...f.map((e=>o._`${i} === ${e}`))):o.nil;return h.length&&(s=o.or(s,...h.map((t=>o._`${r.usePattern(e,t)}.test(${i})`)))),o.not(s)}(i),(()=>g(i))):g(i)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=s},5716:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6124),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const i=t.name("valid");n.forEach(((t,n)=>{if(r.alwaysValidSchema(o,t))return;const a=e.subschema({keyword:"allOf",schemaProp:n},i);e.ok(i),e.mergeEvaluated(a)}))}};t.default=o},1668:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(8619).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r},9564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?r.str`must contain at least ${e} valid item(s)`:r.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?r._`{minContains: ${e}}`:r._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:n,parentSchema:i,data:a,it:s}=e;let l,c;const{minContains:u,maxContains:p}=i;s.opts.next?(l=void 0===u?1:u,c=p):l=1;const d=t.const("len",r._`${a}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void o.checkStrictMode(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return o.checkStrictMode(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if(o.alwaysValidSchema(s,n)){let t=r._`${d} >= ${l}`;return void 0!==c&&(t=r._`${t} && ${d} <= ${c}`),void e.pass(t)}s.items=!0;const f=t.name("valid");if(void 0===c&&1===l)h(f,(()=>t.if(f,(()=>t.break()))));else{t.let(f,!1);const e=t.name("_valid"),n=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(r._`${e}++`),void 0===c?t.if(r._`${e} >= ${l}`,(()=>t.assign(f,!0).break())):(t.if(r._`${e} > ${c}`,(()=>t.assign(f,!1).break())),1===l?t.assign(f,!0):t.if(r._`${e} >= ${l}`,(()=>t.assign(f,!0))))}(n)))))}function h(n,r){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},n),r()}))}e.result(f,(()=>e.reset()))}};t.default=i},1117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const r=n(4475),o=n(6124),i=n(8619);t.error={message:({params:{property:e,depsCount:t,deps:n}})=>{const o=1===t?"property":"properties";return r.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>r._`{property: ${e}, + missingProperty: ${o}, + depsCount: ${t}, + deps: ${n}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);s(e,t),l(e,n)}};function s(e,t=e.schema){const{gen:n,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=n.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=i.propertyInData(n,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?n.if(u,(()=>{for(const t of c)i.checkReportMissingProp(e,t)})):(n.if(r._`${u} && (${i.checkMissingProp(e,c,s)})`),i.reportMissingProp(e,s),n.else())}}function l(e,t=e.schema){const{gen:n,data:r,keyword:a,it:s}=e,l=n.name("valid");for(const c in t)o.alwaysValidSchema(s,t[c])||(n.if(i.propertyInData(n,r,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>n.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},5184:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:i}=e;void 0===n.then&&void 0===n.else&&o.checkStrictMode(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,p("then",n),p("else",n))}else s?t.if(u,p("then")):t.if(r.not(u),p("else"));function p(n,o){return()=>{const i=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const n=e.schema[t];return void 0!==n&&!o.alwaysValidSchema(e,n)}t.default=i},9616:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3074),o=n(6988),i=n(6348),a=n(9822),s=n(9564),l=n(1117),c=n(4002),u=n(1422),p=n(9690),d=n(9883),f=n(8435),h=n(1668),m=n(9684),g=n(5716),y=n(5184),v=n(5642);t.default=function(e=!1){const t=[f.default,h.default,m.default,g.default,y.default,v.default,c.default,u.default,l.default,p.default,d.default];return e?t.push(o.default,a.default):t.push(r.default,i.default),t.push(s.default),t}},6348:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(4475),o=n(6124),i=n(8619),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,o.alwaysValidSchema(n,t)||e.ok(i.validateArray(e))}};function s(e,t,n=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:r,errSchemaPath:i}=c,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(r.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;o.checkStrictMode(c,e,r.strictTuples)}}(a),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,n.length,c.items));const u=i.name("valid"),p=i.const("len",r._`${s}.length`);n.forEach(((t,n)=>{o.alwaysValidSchema(c,t)||(i.if(r._`${p} > ${n}`,(()=>e.subschema({keyword:l,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},9822:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i=n(8619),a=n(3074),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:s}=n;r.items=!0,o.alwaysValidSchema(r,t)||(s?a.validateAdditionalItems(e,s):e.ok(i.validateArray(e)))}};t.default=s},8435:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6124),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:o}=e;if(r.alwaysValidSchema(o,n))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.result(i,(()=>e.error()),(()=>e.reset()))},error:{message:"must NOT be valid"}};t.default=o},9684:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>r._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:i,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&i.discriminator)return;const s=n,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((n,i)=>{let s;o.alwaysValidSchema(a,n)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(r._`${u} && ${l}`).assign(l,!1).assign(c,r._`[${c}, ${i}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,i),s&&e.mergeEvaluated(s,r.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},9883:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8619),o=n(4475),i=n(6124),a=n(6124),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:s,parentSchema:l,it:c}=e,{opts:u}=c,p=r.allSchemaProperties(n),d=p.filter((e=>i.alwaysValidSchema(c,n[e])));if(0===p.length||d.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;const f=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=a.evaluatedPropsToName(t,c.props));const{props:m}=c;function g(e){for(const t in f)new RegExp(e).test(t)&&i.checkStrictMode(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(n){t.forIn("key",s,(i=>{t.if(o._`${r.usePattern(e,n)}.test(${i})`,(()=>{const r=d.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:i,dataPropType:a.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${i}]`,!0):r||c.allErrors||t.if(o.not(h),(()=>t.break()))}))}))}!function(){for(const e of p)f&&g(e),c.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=s},6988:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6348),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>r.validateTuple(e,"items")};t.default=o},9690:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1321),o=n(8619),i=n(6124),a=n(1422),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:s,data:l,it:c}=e;("all"===c.opts.removeAdditional&&void 0===s.additionalProperties||!1===c.opts.defaultAdditionalProperties)&&a.default.code(new r.KeywordCxt(c,a.default,"additionalProperties"));const u=o.allSchemaProperties(n);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,i.toHash(u),c.props));const p=u.filter((e=>!i.alwaysValidSchema(c,n[e])));if(0===p.length)return;const d=t.name("valid");for(const n of p)f(n)?h(n):(t.if(o.propertyInData(t,l,n,c.opts.ownProperties)),h(n),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(d);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==n[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=s},4002:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>r._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:i,it:a}=e;if(o.alwaysValidSchema(a,n))return;const s=t.name("valid");t.forIn("key",i,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},s),t.if(r.not(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};t.default=i},5642:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6124),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&r.checkStrictMode(n,`"${e}" without "if" is ignored`)}};t.default=o},8619:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=n(4475),o=n(6124),i=n(5018);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function s(e,t,n){return r._`${a(e)}.call(${t}, ${n})`}function l(e,t,n,o){const i=r._`${t}${r.getProperty(n)} === undefined`;return o?r.or(i,r.not(s(e,t,n))):i}function c(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:o,it:i}=e;n.if(l(n,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},o,i){return r.or(...o.map((o=>r.and(l(e,t,o,n.ownProperties),r._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=s,t.propertyInData=function(e,t,n,o){const i=r._`${t}${r.getProperty(n)} !== undefined`;return o?r._`${i} && ${s(e,t,n)}`:i},t.noPropertyInData=l,t.allSchemaProperties=c,t.schemaProperties=function(e,t){return c(t).filter((n=>!o.alwaysValidSchema(e,t[n])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:a,errorPath:s},it:l},c,u,p){const d=p?r._`${e}, ${t}, ${o}${a}`:t,f=[[i.default.instancePath,r.strConcat(i.default.instancePath,s)],[i.default.parentData,l.parentData],[i.default.parentDataProperty,l.parentDataProperty],[i.default.rootData,i.default.rootData]];l.opts.dynamicRef&&f.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const h=r._`${d}, ${n.object(...f)}`;return u!==r.nil?r._`${c}.call(${u}, ${h})`:r._`${c}(${h})`},t.usePattern=function({gen:e,it:{opts:t}},n){const o=t.unicodeRegExp?"u":"";return e.scopeValue("pattern",{key:n,ref:new RegExp(n,o),code:r._`new RegExp(${n}, ${o})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:i,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(s,!0),l((()=>t.break())),s;function l(a){const l=t.const("len",r._`${n}.length`);t.forRange("i",0,l,(n=>{e.subschema({keyword:i,dataProp:n,dataPropType:o.Type.Num},s),t.if(r.not(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:i,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((e=>o.alwaysValidSchema(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block((()=>n.forEach(((n,o)=>{const a=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},l);t.assign(s,r._`${s} || ${l}`),e.mergeValidEvaluated(a,l)||t.if(r.not(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},5060:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=n},8223:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5060),o=n(4028),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,o.default];t.default=i},4028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r=n(4143),o=n(8619),i=n(4475),a=n(5018),s=n(7805),l=n(6124),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:o}=e,{baseId:a,schemaEnv:l,validateName:c,opts:d,self:f}=o,{root:h}=l;if(("#"===n||"#/"===n)&&a===h.baseId)return function(){if(l===h)return p(e,c,l,l.$async);const n=t.scopeValue("root",{ref:h});return p(e,i._`${n}.validate`,h,h.$async)}();const m=s.resolveRef.call(f,h,a,n);if(void 0===m)throw new r.default(a,n);return m instanceof s.SchemaEnv?function(t){const n=u(e,t);p(e,n,t,t.$async)}(m):function(r){const o=t.scopeValue("schema",!0===d.code.source?{ref:r,code:i.stringify(r)}:{ref:r}),a=t.name("valid"),s=e.subschema({schema:r,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:n},a);e.mergeEvaluated(s),e.ok(a)}(m)}};function u(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):i._`${n.scopeValue("wrapper",{ref:t})}.validate`}function p(e,t,n,r){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:p,opts:d}=c,f=d.passContext?a.default.this:i.nil;function h(e){const t=i._`${e}.errors`;s.assign(a.default.vErrors,i._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,i._`${a.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=l.mergeEvaluated.props(s,r.props,c.props));else{const t=s.var("props",i._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=l.mergeEvaluated.items(s,r.items,c.items));else{const t=s.var("items",i._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,i.Name)}}r?function(){if(!p.$async)throw new Error("async schema referenced by sync schema");const n=s.let("valid");s.try((()=>{s.code(i._`await ${o.callValidateCode(e,t,f)}`),m(t),u||s.assign(n,!0)}),(e=>{s.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(n,!1)})),e.ok(n)}():function(){const n=s.name("visitedNodes");s.code(i._`const ${n} = visitedNodesForRef.get(${t}) || new Set()`),s.if(i._`!${n}.has(${e.data})`,(()=>{s.code(i._`visitedNodesForRef.set(${t}, ${n})`),s.code(i._`const dataNode = ${e.data}`),s.code(i._`${n}.add(dataNode)`);const r=e.result(o.callValidateCode(e,t,f),(()=>m(t)),(()=>h(t)));return s.code(i._`${n}.delete(dataNode)`),r}))}()}t.getValidate=u,t.callRef=p,t.default=c},5522:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6545),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>r._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:i,parentSchema:a,it:s}=e,{oneOf:l}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=i.propertyName;if("string"!=typeof c)throw new Error("discriminator: requires propertyName");if(!l)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),p=t.const("tag",r._`${n}${r.getProperty(c)}`);function d(n){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:n},o);return e.mergeEvaluated(i,r.Name),o}function f(e){return e.hasOwnProperty("$ref")}t.if(r._`typeof ${p} == "string"`,(()=>function(){const n=function(){var e;const t={},n=o(a);let r=!0;for(let t=0;te.error(!1,{discrError:o.DiscrError.Tag,tag:p,tagName:c}))),e.ok(u)}};t.default=i},6545:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"},6479:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8223),o=n(3799),i=n(9616),a=n(3815),s=n(4826),l=[r.default,o.default,i.default(),a.default,s.metadataVocabulary,s.contentVocabulary];t.default=l},157:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match format "${e}"`,params:({schemaCode:e})=>r._`{format: ${e}}`},code(e,t){const{gen:n,data:o,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:d}=l;c.validateFormats&&(i?function(){const i=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),a=n.const("fDef",r._`${i}[${s}]`),l=n.let("fType"),u=n.let("format");n.if(r._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>n.assign(l,r._`${a}.type || "string"`).assign(u,r._`${a}.validate`)),(()=>n.assign(l,r._`"string"`).assign(u,a))),e.fail$data(r.or(!1===c.strictSchema?r.nil:r._`${s} && !${u}`,function(){const e=p.$async?r._`(${a}.async ? await ${u}(${o}) : ${u}(${o}))`:r._`${u}(${o})`,n=r._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return r._`${u} && ${u} !== true && ${l} === ${t} && !${n}`}()))}():function(){const i=d.formats[a];if(!i)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${u}"`}d.logger.warn(e())}();if(!0===i)return;const[s,l,f]=function(e){const t=e instanceof RegExp?r.regexpCode(e):c.code.formats?r._`${c.code.formats}${r.getProperty(a)}`:void 0,o=n.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,r._`${o}.validate`]}(i);s===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!p.$async)throw new Error("async format in sync schema");return r._`await ${f}(${o})`}return"function"==typeof l?r._`${f}(${o})`:r._`${f}.test(${o})`}())}())}};t.default=o},3815:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=[n(157).default];t.default=r},4826:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i=n(412),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>r._`{allowedValue: ${e}}`},code(e){const{gen:t,data:n,$data:a,schemaCode:s,schema:l}=e;a||l&&"object"==typeof l?e.fail$data(r._`!${o.useFunc(t,i.default)}(${n}, ${s})`):e.fail(r._`${l} !== ${n}`)}};t.default=a},4147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i=n(412),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>r._`{allowedValues: ${e}}`},code(e){const{gen:t,data:n,$data:a,schema:s,schemaCode:l,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum,p=o.useFunc(t,i.default);let d;if(u||a)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",l,(e=>t.if(r._`${p}(${n}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",l);d=r.or(...s.map(((t,o)=>function(e,t){const o=s[t];return"object"==typeof o&&null!==o?r._`${p}(${n}, ${e}[${t}])`:r._`${n} === ${o}`}(e,o))))}e.pass(d)}};t.default=a},3799:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9640),o=n(7692),i=n(3765),a=n(8582),s=n(6711),l=n(7835),c=n(8950),u=n(7326),p=n(7535),d=n(4147),f=[r.default,o.default,i.default,a.default,s.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,d.default];t.default=f},8950:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxItems"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:o}=e,i="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`${n}.length ${i} ${o}`)}};t.default=o},3765:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i=n(5872),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxLength"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:a,it:s}=e,l="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===s.opts.unicode?r._`${n}.length`:r._`${o.useFunc(e.gen,i.default)}(${n})`;e.fail$data(r._`${c} ${l} ${a}`)}};t.default=a},9640:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=r.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>r.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${i[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:n,schemaCode:o}=e;e.fail$data(r._`${n} ${i[t].fail} ${o} || isNaN(${n})`)}};t.default=s},6711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxProperties"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:o}=e,i="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`Object.keys(${n}).length ${i} ${o}`)}};t.default=o},7692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>r.str`must be multiple of ${e}`,params:({schemaCode:e})=>r._`{multipleOf: ${e}}`},code(e){const{gen:t,data:n,schemaCode:o,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?r._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:r._`${s} !== parseInt(${s})`;e.fail$data(r._`(${o} === 0 || (${s} = ${n}/${o}, ${l}))`)}};t.default=o},8582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8619),o=n(4475),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:n,schema:i,schemaCode:a,it:s}=e,l=s.opts.unicodeRegExp?"u":"",c=n?o._`(new RegExp(${a}, ${l}))`:r.usePattern(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},7835:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8619),o=n(4475),i=n(6124),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:n,schemaCode:a,data:s,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===n.length)return;const p=n.length>=u.loopRequired;if(c.allErrors?function(){if(p||l)e.block$data(o.nil,d);else for(const t of n)r.checkReportMissingProp(e,t)}():function(){const i=t.let("missing");if(p||l){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,i){e.setParams({missingProperty:n}),t.forOf(n,a,(()=>{t.assign(i,r.propertyInData(t,s,n,u.ownProperties)),t.if(o.not(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,n))),e.ok(n)}else t.if(r.checkMissingProp(e,n,i)),r.reportMissingProp(e,i),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null==t?void 0:t[e])&&!r.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;i.checkStrictMode(c,t,c.opts.strictRequired)}}function d(){t.forOf("prop",a,(n=>{e.setParams({missingProperty:n}),t.if(r.noPropertyInData(t,s,n,u.ownProperties),(()=>e.error()))}))}}};t.default=a},7326:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7927),o=n(4475),i=n(6124),a=n(412),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:n,$data:s,schema:l,parentSchema:c,schemaCode:u,it:p}=e;if(!s&&!l)return;const d=t.let("valid"),f=c.items?r.getSchemaTypes(c.items):[];function h(i,a){const s=t.name("item"),l=r.checkDataTypes(f,s,p.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(s,o._`${n}[${i}]`),t.if(l,o._`continue`),f.length>1&&t.if(o._`typeof ${s} == "string"`,o._`${s} += "_"`),t.if(o._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,o._`${c}[${s}]`),e.error(),t.assign(d,!1).break()})).code(o._`${c}[${s}] = ${i}`)}))}function m(r,s){const l=i.useFunc(t,a.default),c=t.name("outer");t.label(c).for(o._`;${r}--;`,(()=>t.for(o._`${s} = ${r}; ${s}--;`,(()=>t.if(o._`${l}(${n}[${r}], ${n}[${s}])`,(()=>{e.error(),t.assign(d,!1).break(c)}))))))}e.block$data(d,(function(){const r=t.let("i",o._`${n}.length`),i=t.let("j");e.setParams({i:r,j:i}),t.assign(d,!0),t.if(o._`${r} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(r,i)))}),o._`${u} === false`),e.ok(d)}};t.default=s},4029:function(e){"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,o,i,a,s,l,c,u,p){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var d in r(i,a,s,l,c,u,p),i){var f=i[d];if(Array.isArray(f)){if(d in t.arrayKeywords)for(var h=0;hn.addProblemToIgnore(e))),fileDependencies:o.getFiles(),rootType:O.DefinitionRoot,refTypes:P.refTypes,visitorsData:P.visitorsData}}))}function k(e,t){switch(t){case d.OasMajorVersion.Version3:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case d.OasMajorVersion.Version2:switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}}}function _(e,t,n,r,a){let s;const l={ref:{leave(o,s,l){if(!l.location||void 0===l.node)return void m.reportUnresolvedRef(l,s.report,s.location);if(l.location.source===r.source&&l.location.source===s.location.source&&"scalar"!==s.type.name&&!t)return;if(n&&y.isRedoclyRegistryURL(o.$ref))return;const p=k(s.type.name,e);p?t?(u(p,l,s),c(o,l,s)):(o.$ref=u(p,l,s),function(e,t,n){const o=i.makeRefId(n.location.source.absoluteRef,e.$ref);a.set(o,{document:r,isRemote:!1,node:t.node,nodePointer:e.$ref,resolved:!0})}(o,l,s)):c(o,l,s)}},DefinitionRoot:{enter(t){e===d.OasMajorVersion.Version3?s=t.components=t.components||{}:e===d.OasMajorVersion.Version2&&(s=t)}}};function c(e,t,n){g.isPlainObject(t.node)?(delete e.$ref,Object.assign(e,t.node)):n.parent[n.key]=t.node}function u(t,n,r){s[t]=s[t]||{};const o=function(e,t,n){const[r,o]=[e.location.source.absoluteRef,e.location.pointer],i=s[t];let a="";const l=o.slice(2).split("/").filter(Boolean);for(;l.length>0;)if(a=l.pop()+(a?`-${a}`:""),!i||!i[a]||p(i[a],e,n))return a;if(a=f.refBaseName(r)+(a?`_${a}`:""),!i[a]||p(i[a],e,n))return a;const c=a;let u=2;for(;i[a]&&!p(i[a],e,n);)a=`${c}-${u}`,u++;return i[a]||n.report({message:`Two schemas are referenced with the same name but different content. Renamed ${c} to ${a}.`,location:n.location,forceSeverity:"warn"}),a}(n,t,r);return s[t][o]=n.node,e===d.OasMajorVersion.Version3?`#/components/${t}/${o}`:`#/${t}/${o}`}function p(e,t,n){var r;return!(!f.isRef(e)||(null===(r=n.resolve(e).location)||void 0===r?void 0:r.absolutePointer)!==t.location.absolutePointer)||o(e,t.node)}return e===d.OasMajorVersion.Version3&&(l.DiscriminatorMapping={leave(n,r){for(const o of Object.keys(n)){const i=n[o],a=r.resolve({$ref:i});if(!a.location||void 0===a.node)return void m.reportUnresolvedRef(a,r.report,r.location.child(o));const s=k("Schema",e);t?u(s,a,r):n[o]=u(s,a,r)}}}),l}!function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(w=t.OasVersion||(t.OasVersion={})),t.bundle=function(e){return r(this,void 0,void 0,(function*(){const{ref:t,doc:n,externalRefResolver:r=new i.BaseResolver(e.config.resolve),base:o=null}=e;if(!t&&!n)throw new Error("Document or reference is required.\n");const a=void 0!==n?n:yield r.resolveDocument(o,t,!0);if(a instanceof Error)throw a;return x(Object.assign(Object.assign({document:a},e),{config:e.config.lint,externalRefResolver:r}))}))},t.bundleDocument=x,t.mapTypeToComponent=k},6877:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rules:{"info-description":"error","info-contact":"error","info-license":"error","info-license-url":"error","tag-description":"error","tags-alphabetical":"error","parameter-description":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-path-trailing-slash":"error","path-segment-plural":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error",assertions:"error","operation-operationId":"error","operation-summary":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-security-defined":"error","operation-singular-tag":"error","no-unresolved-refs":"error","no-enum-type-mismatch":"error","boolean-parameter-prefixes":"error","paths-kebab-case":"error","no-http-verbs-in-paths":"error","path-excludes-patterns":{severity:"error",patterns:[]},"request-mime-type":"error",spec:"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error"},oas3_0Rules:{"no-invalid-media-type-examples":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-servers-empty-enum":"error"},oas3_1Rules:{"no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-servers-empty-enum":"error"}}},6242:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPlugin=t.builtInConfigs=void 0;const r=n(8057),o=n(6877),i=n(9016),a=n(226),s=n(7523),l=n(226),c=n(7523),u=n(1753),p=n(7060);t.builtInConfigs={recommended:r.default,minimal:i.default,all:o.default,"redocly-registry":{decorators:{"registry-dependencies":"on"}}},t.defaultPlugin={id:"",rules:{oas3:a.rules,oas2:s.rules},preprocessors:{oas3:l.preprocessors,oas2:c.preprocessors},decorators:{oas3:u.decorators,oas2:p.decorators},configs:t.builtInConfigs}},7040:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{if(p.isString(e)&&s.isAbsoluteUrl(e))throw new Error(a.red("We don't support remote plugins yet."));const o=p.isString(e)?n(i.resolve(i.dirname(t),e)):e,l=o.id;if("string"!=typeof l)throw new Error(a.red(`Plugin must define \`id\` property in ${a.blue(e.toString())}.`));if(r.has(l)){const t=r.get(l);throw new Error(a.red(`Plugin "id" must be unique. Plugin ${a.blue(e.toString())} uses id "${a.blue(l)}" already seen in ${a.blue(t)}`))}r.set(l,e.toString());const c=Object.assign(Object.assign({id:l},o.configs?{configs:o.configs}:{}),o.typeExtension?{typeExtension:o.typeExtension}:{});if(o.rules){if(!o.rules.oas3&&!o.rules.oas2)throw new Error(`Plugin rules must have \`oas3\` or \`oas2\` rules "${e}.`);c.rules={},o.rules.oas3&&(c.rules.oas3=u.prefixRules(o.rules.oas3,l)),o.rules.oas2&&(c.rules.oas2=u.prefixRules(o.rules.oas2,l))}if(o.preprocessors){if(!o.preprocessors.oas3&&!o.preprocessors.oas2)throw new Error(`Plugin \`preprocessors\` must have \`oas3\` or \`oas2\` preprocessors "${e}.`);c.preprocessors={},o.preprocessors.oas3&&(c.preprocessors.oas3=u.prefixRules(o.preprocessors.oas3,l)),o.preprocessors.oas2&&(c.preprocessors.oas2=u.prefixRules(o.preprocessors.oas2,l))}if(o.decorators){if(!o.decorators.oas3&&!o.decorators.oas2)throw new Error(`Plugin \`decorators\` must have \`oas3\` or \`oas2\` decorators "${e}.`);c.decorators={},o.decorators.oas3&&(c.decorators.oas3=u.prefixRules(o.decorators.oas3,l)),o.decorators.oas2&&(c.decorators.oas2=u.prefixRules(o.decorators.oas2,l))}return c})).filter(p.notUndefined)}function h({rawConfig:e,configPath:t="",resolver:n}){var o,i;return r(this,void 0,void 0,(function*(){const{apis:r={},lint:a={}}=e;let s={};for(const[e,l]of Object.entries(r||{})){if(null===(i=null===(o=l.lint)||void 0===o?void 0:o.extends)||void 0===i?void 0:i.some(p.isNotString))throw new Error("Error configuration format not detected in extends value must contain strings");const r=v(a,l.lint),c=yield g({lintConfig:r,configPath:t,resolver:n});s[e]=Object.assign(Object.assign({},l),{lint:c})}return s}))}function m({lintConfig:e,configPath:t="",resolver:n=new l.BaseResolver},a=[],d=[]){var h,g,v;return r(this,void 0,void 0,(function*(){if(a.includes(t))throw new Error(`Circular dependency in config file: "${t}"`);const l=u.getUniquePlugins(f([...(null==e?void 0:e.plugins)||[],c.defaultPlugin],t)),b=null===(h=null==e?void 0:e.plugins)||void 0===h?void 0:h.filter(p.isString).map((e=>i.resolve(i.dirname(t),e))),w=s.isAbsoluteUrl(t)?t:t&&i.resolve(t),x=yield Promise.all((null===(g=null==e?void 0:e.extends)||void 0===g?void 0:g.map((e=>r(this,void 0,void 0,(function*(){if(!s.isAbsoluteUrl(e)&&!i.extname(e))return y(e,l);const o=s.isAbsoluteUrl(e)?e:s.isAbsoluteUrl(t)?new URL(e,t).href:i.resolve(i.dirname(t),e),c=yield function(e,t){return r(this,void 0,void 0,(function*(){try{const n=yield t.loadExternalRef(e),r=u.transformConfig(p.parseYaml(n.body));if(!r.lint)throw new Error(`Lint configuration format not detected: "${e}"`);return r.lint}catch(t){throw new Error(`Failed to load "${e}": ${t.message}`)}}))}(o,n);return yield m({lintConfig:c,configPath:o,resolver:n},[...a,w],d)})))))||[]),k=u.mergeExtends([...x,Object.assign(Object.assign({},e),{plugins:l,extends:void 0,extendPaths:[...a,w],pluginPaths:b})]),{plugins:_=[]}=k,O=o(k,["plugins"]);return Object.assign(Object.assign({},O),{extendPaths:null===(v=O.extendPaths)||void 0===v?void 0:v.filter((e=>e&&!s.isAbsoluteUrl(e))),plugins:u.getUniquePlugins(_),recommendedFallback:null==e?void 0:e.recommendedFallback,doNotResolveExamples:null==e?void 0:e.doNotResolveExamples})}))}function g(e,t=[],n=[]){return r(this,void 0,void 0,(function*(){const r=yield m(e,t,n);return Object.assign(Object.assign({},r),{rules:r.rules&&b(r.rules)})}))}function y(e,t){var n;const{pluginId:r,configName:o}=u.parsePresetName(e),i=t.find((e=>e.id===r));if(!i)throw new Error(`Invalid config ${a.red(e)}: plugin ${r} is not included.`);const s=null===(n=i.configs)||void 0===n?void 0:n[o];if(!s)throw new Error(r?`Invalid config ${a.red(e)}: plugin ${r} doesn't export config with name ${o}.`:`Invalid config ${a.red(e)}: there is no such built-in config.`);return s}function v(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{rules:Object.assign(Object.assign({},null==e?void 0:e.rules),null==t?void 0:t.rules),oas2Rules:Object.assign(Object.assign({},null==e?void 0:e.oas2Rules),null==t?void 0:t.oas2Rules),oas3_0Rules:Object.assign(Object.assign({},null==e?void 0:e.oas3_0Rules),null==t?void 0:t.oas3_0Rules),oas3_1Rules:Object.assign(Object.assign({},null==e?void 0:e.oas3_1Rules),null==t?void 0:t.oas3_1Rules),preprocessors:Object.assign(Object.assign({},null==e?void 0:e.preprocessors),null==t?void 0:t.preprocessors),oas2Preprocessors:Object.assign(Object.assign({},null==e?void 0:e.oas2Preprocessors),null==t?void 0:t.oas2Preprocessors),oas3_0Preprocessors:Object.assign(Object.assign({},null==e?void 0:e.oas3_0Preprocessors),null==t?void 0:t.oas3_0Preprocessors),oas3_1Preprocessors:Object.assign(Object.assign({},null==e?void 0:e.oas3_1Preprocessors),null==t?void 0:t.oas3_1Preprocessors),decorators:Object.assign(Object.assign({},null==e?void 0:e.decorators),null==t?void 0:t.decorators),oas2Decorators:Object.assign(Object.assign({},null==e?void 0:e.oas2Decorators),null==t?void 0:t.oas2Decorators),oas3_0Decorators:Object.assign(Object.assign({},null==e?void 0:e.oas3_0Decorators),null==t?void 0:t.oas3_0Decorators),oas3_1Decorators:Object.assign(Object.assign({},null==e?void 0:e.oas3_1Decorators),null==t?void 0:t.oas3_1Decorators),recommendedFallback:!(null==t?void 0:t.extends)&&e.recommendedFallback})}function b(e){if(!e)return e;const t={},n=[];for(const[r,o]of Object.entries(e))if(r.startsWith("assert/")&&"object"==typeof o&&null!==o){const e=o;n.push(Object.assign(Object.assign({},e),{assertionId:r.replace("assert/","")}))}else t[r]=o;return n.length>0&&(t.assertions=n),t}t.resolveConfig=function(e,t){var n,o,i,a,s;return r(this,void 0,void 0,(function*(){if(null===(o=null===(n=e.lint)||void 0===n?void 0:n.extends)||void 0===o?void 0:o.some(p.isNotString))throw new Error("Error configuration format not detected in extends value must contain strings");const r=new l.BaseResolver(u.getResolveConfig(e.resolve)),c=null!==(a=null===(i=null==e?void 0:e.lint)||void 0===i?void 0:i.extends)&&void 0!==a?a:["recommended"],f=!(null===(s=null==e?void 0:e.lint)||void 0===s?void 0:s.extends),m=Object.assign(Object.assign({},null==e?void 0:e.lint),{extends:c,recommendedFallback:f}),y=yield h({rawConfig:Object.assign(Object.assign({},e),{lint:m}),configPath:t,resolver:r}),v=yield g({lintConfig:m,configPath:t,resolver:r});return new d.Config(Object.assign(Object.assign({},e),{apis:y,lint:v}),t)}))},t.resolvePlugins=f,t.resolveApis=h,t.resolveLint=g,t.resolvePreset=y},3777:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.LintConfig=t.AVAILABLE_REGIONS=t.DOMAINS=t.DEFAULT_REGION=t.IGNORE_FILE=t.env=void 0;const r=n(5101),o=n(6470),i=n(5273),a=n(771),s=n(1510),l=n(2565);t.env="undefined"!=typeof process&&{}||{},t.IGNORE_FILE=".redocly.lint-ignore.yaml",t.DEFAULT_REGION="us",t.DOMAINS=function(){const e={us:"redocly.com",eu:"eu.redocly.com"},n=t.env.REDOCLY_DOMAIN;return(null==n?void 0:n.endsWith(".redocly.host"))&&(e[n.split(".")[0]]=n),"redoc.online"===n&&(e[n]=n),e}(),t.AVAILABLE_REGIONS=Object.keys(t.DOMAINS);class c{constructor(e,n){this.rawConfig=e,this.configFile=n,this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.plugins=e.plugins||[],this.doNotResolveExamples=!!e.doNotResolveExamples,this.recommendedFallback=e.recommendedFallback||!1,this.rules={[s.OasVersion.Version2]:Object.assign(Object.assign({},e.rules),e.oas2Rules),[s.OasVersion.Version3_0]:Object.assign(Object.assign({},e.rules),e.oas3_0Rules),[s.OasVersion.Version3_1]:Object.assign(Object.assign({},e.rules),e.oas3_1Rules)},this.preprocessors={[s.OasVersion.Version2]:Object.assign(Object.assign({},e.preprocessors),e.oas2Preprocessors),[s.OasVersion.Version3_0]:Object.assign(Object.assign({},e.preprocessors),e.oas3_0Preprocessors),[s.OasVersion.Version3_1]:Object.assign(Object.assign({},e.preprocessors),e.oas3_1Preprocessors)},this.decorators={[s.OasVersion.Version2]:Object.assign(Object.assign({},e.decorators),e.oas2Decorators),[s.OasVersion.Version3_0]:Object.assign(Object.assign({},e.decorators),e.oas3_0Decorators),[s.OasVersion.Version3_1]:Object.assign(Object.assign({},e.decorators),e.oas3_1Decorators)},this.extendPaths=e.extendPaths||[],this.pluginPaths=e.pluginPaths||[];const a=this.configFile?o.dirname(this.configFile):"undefined"!=typeof process&&process.cwd()||"",l=o.join(a,t.IGNORE_FILE);if(r.hasOwnProperty("existsSync")&&r.existsSync(l)){this.ignore=i.parseYaml(r.readFileSync(l,"utf-8"))||{};for(const e of Object.keys(this.ignore)){this.ignore[o.resolve(o.dirname(l),e)]=this.ignore[e];for(const t of Object.keys(this.ignore[e]))this.ignore[e][t]=new Set(this.ignore[e][t]);delete this.ignore[e]}}}saveIgnore(){const e=this.configFile?o.dirname(this.configFile):process.cwd(),n=o.join(e,t.IGNORE_FILE),s={};for(const t of Object.keys(this.ignore)){const n=s[a.slash(o.relative(e,t))]=this.ignore[t];for(const e of Object.keys(n))n[e]=Array.from(n[e])}r.writeFileSync(n,"# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n# See https://redoc.ly/docs/cli/ for more information.\n"+i.stringifyYaml(s))}addIgnore(e){const t=this.ignore,n=e.location[0];if(void 0===n.pointer)return;const r=t[n.source.absoluteRef]=t[n.source.absoluteRef]||{};(r[e.ruleId]=r[e.ruleId]||new Set).add(n.pointer)}addProblemToIgnore(e){const t=e.location[0];if(void 0===t.pointer)return e;const n=(this.ignore[t.source.absoluteRef]||{})[e.ruleId],r=n&&n.has(t.pointer);return r?Object.assign(Object.assign({},e),{ignored:r}):e}extendTypes(e,t){let n=e;for(const e of this.plugins)if(void 0!==e.typeExtension)switch(t){case s.OasVersion.Version3_0:case s.OasVersion.Version3_1:if(!e.typeExtension.oas3)continue;n=e.typeExtension.oas3(n,t);case s.OasVersion.Version2:if(!e.typeExtension.oas2)continue;n=e.typeExtension.oas2(n,t);default:throw new Error("Not implemented")}return n}getRuleSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.rules[t][e]||"off";return"string"==typeof n?{severity:n}:Object.assign({severity:"error"},n)}getPreprocessorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.preprocessors[t][e]||"off";return"string"==typeof n?{severity:"on"===n?"error":n}:Object.assign({severity:"error"},n)}getDecoratorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.decorators[t][e]||"off";return"string"==typeof n?{severity:"on"===n?"error":n}:Object.assign({severity:"error"},n)}getUnusedRules(){const e=[],t=[],n=[];for(const r of Array.from(this._usedVersions))e.push(...Object.keys(this.rules[r]).filter((e=>!this._usedRules.has(e)))),t.push(...Object.keys(this.decorators[r]).filter((e=>!this._usedRules.has(e)))),n.push(...Object.keys(this.preprocessors[r]).filter((e=>!this._usedRules.has(e))));return{rules:e,preprocessors:n,decorators:t}}getRulesForOasVersion(e){switch(e){case s.OasMajorVersion.Version3:const e=[];return this.plugins.forEach((t=>{var n;return(null===(n=t.preprocessors)||void 0===n?void 0:n.oas3)&&e.push(t.preprocessors.oas3)})),this.plugins.forEach((t=>{var n;return(null===(n=t.rules)||void 0===n?void 0:n.oas3)&&e.push(t.rules.oas3)})),this.plugins.forEach((t=>{var n;return(null===(n=t.decorators)||void 0===n?void 0:n.oas3)&&e.push(t.decorators.oas3)})),e;case s.OasMajorVersion.Version2:const t=[];return this.plugins.forEach((e=>{var n;return(null===(n=e.preprocessors)||void 0===n?void 0:n.oas2)&&t.push(e.preprocessors.oas2)})),this.plugins.forEach((e=>{var n;return(null===(n=e.rules)||void 0===n?void 0:n.oas2)&&t.push(e.rules.oas2)})),this.plugins.forEach((e=>{var n;return(null===(n=e.decorators)||void 0===n?void 0:n.oas2)&&t.push(e.decorators.oas2)})),t}}skipRules(e){for(const t of e||[])for(const e of Object.values(s.OasVersion))this.rules[e][t]&&(this.rules[e][t]="off")}skipPreprocessors(e){for(const t of e||[])for(const e of Object.values(s.OasVersion))this.preprocessors[e][t]&&(this.preprocessors[e][t]="off")}skipDecorators(e){for(const t of e||[])for(const e of Object.values(s.OasVersion))this.decorators[e][t]&&(this.decorators[e][t]="off")}}t.LintConfig=c,t.Config=class{constructor(e,t){this.rawConfig=e,this.configFile=t,this.apis=e.apis||{},this.lint=new c(e.lint||{},t),this["features.openapi"]=e["features.openapi"]||{},this["features.mockServer"]=e["features.mockServer"]||{},this.resolve=l.getResolveConfig(null==e?void 0:e.resolve),this.region=e.region,this.organization=e.organization}}},8698:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3777),t),o(n(3865),t),o(n(5030),t),o(n(6242),t),o(n(9129),t),o(n(2565),t),o(n(7040),t)},9129:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.findConfig=t.CONFIG_FILE_NAMES=t.loadConfig=void 0;const o=n(5101),i=n(6470),a=n(1094),s=n(771),l=n(3777),c=n(2565),u=n(7040);function p(e){if(!o.hasOwnProperty("existsSync"))return;const n=t.CONFIG_FILE_NAMES.map((t=>e?i.resolve(e,t):t)).filter(o.existsSync);if(n.length>1)throw new Error(`\n Multiple configuration files are not allowed. \n Found the following files: ${n.join(", ")}. \n Please use 'redocly.yaml' instead.\n `);return n[0]}function d(e=p()){return r(this,void 0,void 0,(function*(){if(!e)return{};try{const t=(yield s.loadYaml(e))||{};return c.transformConfig(t)}catch(t){throw new Error(`Error parsing config file at '${e}': ${t.message}`)}}))}t.loadConfig=function(e=p(),t){var n;return r(this,void 0,void 0,(function*(){const r=yield d(e);void 0!==t?(r.lint=r.lint||{},r.lint.extends=t):s.isEmptyObject(r);const o=new a.RedoclyClient,i=yield o.getTokens();if(i.length){r.resolve||(r.resolve={}),r.resolve.http||(r.resolve.http={}),r.resolve.http.headers=[...null!==(n=r.resolve.http.headers)&&void 0!==n?n:[]];for(const e of i){const t=l.DOMAINS[e.region];r.resolve.http.headers.push({matches:`https://api.${t}/registry/**`,name:"Authorization",envVariable:void 0,value:e.token},..."us"===e.region?[{matches:"https://api.redoc.ly/registry/**",name:"Authorization",envVariable:void 0,value:e.token}]:[])}}return u.resolveConfig(r,e)}))},t.CONFIG_FILE_NAMES=["redocly.yaml","redocly.yml",".redocly.yaml",".redocly.yml"],t.findConfig=p,t.getConfig=d},9016:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rules:{"info-description":"warn","info-contact":"off","info-license":"off","info-license-url":"off","tag-description":"warn","tags-alphabetical":"off","parameter-description":"off","no-path-trailing-slash":"warn","no-identical-paths":"warn","no-ambiguous-paths":"warn","path-declaration-must-exist":"warn","path-not-include-query":"warn","path-parameters-defined":"warn","operation-description":"off","operation-2xx-response":"warn","operation-4xx-response":"off",assertions:"warn","operation-operationId":"warn","operation-summary":"warn","operation-operationId-unique":"warn","operation-parameters-unique":"warn","operation-tag-defined":"off","operation-security-defined":"warn","operation-operationId-url-safe":"warn","operation-singular-tag":"off","no-unresolved-refs":"error","no-enum-type-mismatch":"warn","boolean-parameter-prefixes":"off","paths-kebab-case":"off",spec:"error"},oas3_0Rules:{"no-invalid-media-type-examples":{severity:"warn",disallowAdditionalProperties:!0},"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"warn","no-example-value-and-externalValue":"warn","no-unused-components":"warn","no-undefined-server-variable":"warn","no-servers-empty-enum":"error"},oas3_1Rules:{"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"warn","no-example-value-and-externalValue":"warn","no-unused-components":"warn","no-undefined-server-variable":"warn","no-servers-empty-enum":"error"}}},8057:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rules:{"info-description":"warn","info-contact":"off","info-license":"warn","info-license-url":"warn","tag-description":"warn","tags-alphabetical":"off","parameter-description":"off","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"warn","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","operation-description":"off","operation-2xx-response":"warn",assertions:"warn","operation-4xx-response":"warn","operation-operationId":"warn","operation-summary":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-tag-defined":"off","operation-security-defined":"error","operation-singular-tag":"off","no-unresolved-refs":"error","no-enum-type-mismatch":"error","boolean-parameter-prefixes":"off","paths-kebab-case":"off",spec:"error"},oas3_0Rules:{"no-invalid-media-type-examples":{severity:"warn",disallowAdditionalProperties:!0},"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"warn","no-undefined-server-variable":"error","no-servers-empty-enum":"error"},oas3_1Rules:{"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"warn","no-undefined-server-variable":"error","no-servers-empty-enum":"error"}}},5030:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRules=void 0;const r=n(771);t.initRules=function(e,t,n,o){return e.flatMap((e=>Object.keys(e).map((r=>{const i=e[r],a="rules"===n?t.getRuleSettings(r,o):"preprocessors"===n?t.getPreprocessorSettings(r,o):t.getDecoratorSettings(r,o);if("off"===a.severity)return;const s=i(a);return Array.isArray(s)?s.map((e=>({severity:a.severity,ruleId:r,visitor:e}))):{severity:a.severity,ruleId:r,visitor:s}})))).flatMap((e=>e)).filter(r.notUndefined)}},3865:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2565:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o-1){const[t,n]=e.split("/");return{pluginId:t,configName:n}}return{pluginId:"",configName:e}},t.transformApiDefinitionsToApis=s,t.prefixRules=function(e,t){if(!t)return e;const n={};for(const r of Object.keys(e))n[`${t}/${r}`]=e[r];return n},t.mergeExtends=function(e){const t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},plugins:[],pluginPaths:[],extendPaths:[]};for(let n of e){if(n.extends)throw new Error(`\`extends\` is not supported in shared configs yet: ${JSON.stringify(n,null,2)}.`);Object.assign(t.rules,n.rules),Object.assign(t.oas2Rules,n.oas2Rules),i.assignExisting(t.oas2Rules,n.rules||{}),Object.assign(t.oas3_0Rules,n.oas3_0Rules),i.assignExisting(t.oas3_0Rules,n.rules||{}),Object.assign(t.oas3_1Rules,n.oas3_1Rules),i.assignExisting(t.oas3_1Rules,n.rules||{}),Object.assign(t.preprocessors,n.preprocessors),Object.assign(t.oas2Preprocessors,n.oas2Preprocessors),i.assignExisting(t.oas2Preprocessors,n.preprocessors||{}),Object.assign(t.oas3_0Preprocessors,n.oas3_0Preprocessors),i.assignExisting(t.oas3_0Preprocessors,n.preprocessors||{}),Object.assign(t.oas3_1Preprocessors,n.oas3_1Preprocessors),i.assignExisting(t.oas3_1Preprocessors,n.preprocessors||{}),Object.assign(t.decorators,n.decorators),Object.assign(t.oas2Decorators,n.oas2Decorators),i.assignExisting(t.oas2Decorators,n.decorators||{}),Object.assign(t.oas3_0Decorators,n.oas3_0Decorators),i.assignExisting(t.oas3_0Decorators,n.decorators||{}),Object.assign(t.oas3_1Decorators,n.oas3_1Decorators),i.assignExisting(t.oas3_1Decorators,n.decorators||{}),t.plugins.push(...n.plugins||[]),t.pluginPaths.push(...n.pluginPaths||[]),t.extendPaths.push(...new Set(n.extendPaths))}return t},t.getMergedConfig=function(e,t){var n,r,o,i,s,l;const c=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.lint)||void 0===t?void 0:t.extendPaths})),null===(r=null===(n=e.rawConfig)||void 0===n?void 0:n.lint)||void 0===r?void 0:r.extendPaths].flat().filter(Boolean),u=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.lint)||void 0===t?void 0:t.pluginPaths})),null===(i=null===(o=e.rawConfig)||void 0===o?void 0:o.lint)||void 0===i?void 0:i.pluginPaths].flat().filter(Boolean);return t?new a.Config(Object.assign(Object.assign({},e.rawConfig),{lint:Object.assign(Object.assign({},e.apis[t]?e.apis[t].lint:e.rawConfig.lint),{extendPaths:c,pluginPaths:u}),"features.openapi":Object.assign(Object.assign({},e["features.openapi"]),null===(s=e.apis[t])||void 0===s?void 0:s["features.openapi"]),"features.mockServer":Object.assign(Object.assign({},e["features.mockServer"]),null===(l=e.apis[t])||void 0===l?void 0:l["features.mockServer"])}),e.configFile):e},t.transformConfig=function(e){if(e.apis&&e.apiDefinitions)throw new Error("Do not use 'apiDefinitions' field. Use 'apis' instead.\n");if(e["features.openapi"]&&e.referenceDocs)throw new Error("Do not use 'referenceDocs' field. Use 'features.openapi' instead.\n");const t=e,{apiDefinitions:n,referenceDocs:i}=t,a=r(t,["apiDefinitions","referenceDocs"]);return n&&process.stderr.write(`The ${o.yellow("apiDefinitions")} field is deprecated. Use ${o.green("apis")} instead. Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`),i&&process.stderr.write(`The ${o.yellow("referenceDocs")} field is deprecated. Use ${o.green("features.openapi")} instead. Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`),Object.assign({"features.openapi":i,apis:s(n)},a)},t.getResolveConfig=function(e){var t,n;return{http:{headers:null!==(n=null===(t=null==e?void 0:e.http)||void 0===t?void 0:t.headers)&&void 0!==n?n:[],customFetch:void 0}}},t.getUniquePlugins=function(e){const t=new Set,n=[];for(const r of e)t.has(r.id)?r.id&&process.stderr.write(`Duplicate plugin id "${o.yellow(r.id)}".\n`):(n.push(r),t.add(r.id));return n}},4555:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoDescriptionOverride=void 0;const r=n(771);t.InfoDescriptionOverride=({filePath:e})=>({Info:{leave(t,{report:n,location:o}){if(!e)throw new Error('Parameter "filePath" is not provided for "info-description-override" rule');try{t.description=r.readFileAsStringSync(e)}catch(e){n({message:`Failed to read markdown override file for "info.description".\n${e.message}`,location:o.child("description")})}}}})},7802:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationDescriptionOverride=void 0;const r=n(771);t.OperationDescriptionOverride=({operationIds:e})=>({Operation:{leave(t,{report:n,location:o}){if(!t.operationId)return;if(!e)throw new Error('Parameter "operationIds" is not provided for "operation-description-override" rule');const i=t.operationId;if(e[i])try{t.description=r.readFileAsStringSync(e[i])}catch(e){n({message:`Failed to read markdown override file for operation "${i}".\n${e.message}`,location:o.child("operationId").key()})}}}})},2287:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegistryDependencies=void 0;const r=n(1094);t.RegistryDependencies=()=>{let e=new Set;return{DefinitionRoot:{leave(t,n){n.getVisitorData().links=Array.from(e)}},ref(t){if(t.$ref){const n=t.$ref.split("#/")[0];r.isRedoclyRegistryURL(n)&&e.add(n)}}}}},5830:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveXInternal=void 0;const r=n(771),o=n(7468);t.RemoveXInternal=({internalFlagProperty:e})=>{const t=e||"x-internal";return{any:{enter:(e,n)=>{!function(e,n){var i,a,s,l;const{parent:c,key:u}=n;let p=!1;if(Array.isArray(e))for(let r=0;r({Tag:{leave(t,{report:n}){if(!e)throw new Error('Parameter "tagNames" is not provided for "tag-description-override" rule');if(e[t.name])try{t.description=r.readFileAsStringSync(e[t.name])}catch(e){n({message:`Failed to read markdown override file for tag "${t.name}".\n${e.message}`})}}}})},7060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decorators=void 0;const r=n(2287),o=n(7802),i=n(423),a=n(4555),s=n(5830);t.decorators={"registry-dependencies":r.RegistryDependencies,"operation-description-override":o.OperationDescriptionOverride,"tag-description-override":i.TagDescriptionOverride,"info-description-override":a.InfoDescriptionOverride,"remove-x-internal":s.RemoveXInternal}},1753:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decorators=void 0;const r=n(2287),o=n(7802),i=n(423),a=n(4555),s=n(5830);t.decorators={"registry-dependencies":r.RegistryDependencies,"operation-description-override":o.OperationDescriptionOverride,"tag-description-override":i.TagDescriptionOverride,"info-description-override":a.InfoDescriptionOverride,"remove-x-internal":s.RemoveXInternal}},5273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyYaml=t.parseYaml=void 0;const r=n(3320),o=r.JSON_SCHEMA.extend({implicit:[r.types.merge],explicit:[r.types.binary,r.types.omap,r.types.pairs,r.types.set]});t.parseYaml=(e,t)=>r.load(e,Object.assign({schema:o},t)),t.stringifyYaml=(e,t)=>r.dump(e,t)},1510:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.openAPIMajor=t.detectOpenAPI=t.OasMajorVersion=t.OasVersion=void 0,function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(n=t.OasVersion||(t.OasVersion={})),function(e){e.Version2="oas2",e.Version3="oas3"}(r=t.OasMajorVersion||(t.OasMajorVersion={})),t.detectOpenAPI=function(e){if("object"!=typeof e)throw new Error("Document must be JSON object, got "+typeof e);if(!e.openapi&&!e.swagger)throw new Error("This doesn’t look like an OpenAPI document.\n");if(e.openapi&&"string"!=typeof e.openapi)throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof e.openapi}"`);if(e.openapi&&e.openapi.startsWith("3.0"))return n.Version3_0;if(e.openapi&&e.openapi.startsWith("3.1"))return n.Version3_1;if(e.swagger&&"2.0"===e.swagger)return n.Version2;throw new Error(`Unsupported OpenAPI Version: ${e.openapi||e.swagger}`)},t.openAPIMajor=function(e){return e===n.Version2?r.Version2:r.Version3}},1094:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.isRedoclyRegistryURL=t.RedoclyClient=void 0;const o=n(2116),i=n(6470),a=n(6918),s=n(7121),l=n(1390),c=n(3777),u=n(771),p=".redocly-config.json";t.RedoclyClient=class{constructor(e){this.accessTokens={},this.region=this.loadRegion(e),this.loadTokens(),this.domain=e?c.DOMAINS[e]:c.env.REDOCLY_DOMAIN||c.DOMAINS[c.DEFAULT_REGION],c.env.REDOCLY_DOMAIN=this.domain,this.registryApi=new l.RegistryApi(this.accessTokens,this.region)}loadRegion(e){if(e&&!c.DOMAINS[e])throw new Error(`Invalid argument: region in config file.\nGiven: ${s.green(e)}, choices: "us", "eu".`);return c.env.REDOCLY_DOMAIN?c.AVAILABLE_REGIONS.find((e=>c.DOMAINS[e]===c.env.REDOCLY_DOMAIN))||c.DEFAULT_REGION:e||c.DEFAULT_REGION}getRegion(){return this.region}hasTokens(){return u.isNotEmptyObject(this.accessTokens)}hasToken(){return!!this.accessTokens[this.region]}getAuthorizationHeader(){return r(this,void 0,void 0,(function*(){return this.accessTokens[this.region]}))}setAccessTokens(e){this.accessTokens=e}loadTokens(){const e=i.resolve(a.homedir(),p),t=this.readCredentialsFile(e);u.isNotEmptyObject(t)&&this.setAccessTokens(Object.assign(Object.assign({},t),t.token&&!t[this.region]&&{[this.region]:t.token})),c.env.REDOCLY_AUTHORIZATION&&this.setAccessTokens(Object.assign(Object.assign({},this.accessTokens),{[this.region]:c.env.REDOCLY_AUTHORIZATION}))}getAllTokens(){return Object.entries(this.accessTokens).filter((([e])=>c.AVAILABLE_REGIONS.includes(e))).map((([e,t])=>({region:e,token:t})))}getValidTokens(){return r(this,void 0,void 0,(function*(){const e=this.getAllTokens(),t=yield Promise.allSettled(e.map((({token:e,region:t})=>this.verifyToken(e,t))));return e.filter(((e,n)=>"fulfilled"===t[n].status)).map((({token:e,region:t})=>({token:e,region:t,valid:!0})))}))}getTokens(){return r(this,void 0,void 0,(function*(){return this.hasTokens()?yield this.getValidTokens():[]}))}isAuthorizedWithRedoclyByRegion(){return r(this,void 0,void 0,(function*(){if(!this.hasTokens())return!1;const e=this.accessTokens[this.region];if(!e)return!1;try{return yield this.verifyToken(e,this.region),!0}catch(e){return!1}}))}isAuthorizedWithRedocly(){return r(this,void 0,void 0,(function*(){return this.hasTokens()&&u.isNotEmptyObject(yield this.getValidTokens())}))}readCredentialsFile(e){return o.existsSync(e)?JSON.parse(o.readFileSync(e,"utf-8")):{}}verifyToken(e,t,n=!1){return r(this,void 0,void 0,(function*(){return this.registryApi.authStatus(e,t,n)}))}login(e,t=!1){return r(this,void 0,void 0,(function*(){const n=i.resolve(a.homedir(),p);try{yield this.verifyToken(e,this.region,t)}catch(e){throw new Error("Authorization failed. Please check if you entered a valid API key.")}const r=Object.assign(Object.assign({},this.readCredentialsFile(n)),{[this.region]:e,token:e});this.accessTokens=r,this.registryApi.setAccessTokens(r),o.writeFileSync(n,JSON.stringify(r,null,2))}))}logout(){const e=i.resolve(a.homedir(),p);o.existsSync(e)&&o.unlinkSync(e)}},t.isRedoclyRegistryURL=function(e){const t=c.env.REDOCLY_DOMAIN||c.DOMAINS[c.DEFAULT_REGION],n="redocly.com"===t?"redoc.ly":t;return!(!e.startsWith(`https://api.${t}/registry/`)&&!e.startsWith(`https://api.${n}/registry/`))}},1390:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegistryApi=void 0;const o=n(7707),i=n(3777),a=n(771),s=n(337).i8;t.RegistryApi=class{constructor(e,t){this.accessTokens=e,this.region=t}get accessToken(){return a.isNotEmptyObject(this.accessTokens)&&this.accessTokens[this.region]}getBaseUrl(e=i.DEFAULT_REGION){return`https://api.${i.DOMAINS[e]}/registry`}setAccessTokens(e){return this.accessTokens=e,this}request(e="",t={},n){return r(this,void 0,void 0,(function*(){const r=Object.assign({},t.headers||{},{"x-redocly-cli-version":s});if(!r.hasOwnProperty("authorization"))throw new Error("Unauthorized");const i=yield o.default(`${this.getBaseUrl(n)}${e}`,Object.assign({},t,{headers:r}));if(401===i.status)throw new Error("Unauthorized");if(404===i.status){const e=yield i.json();throw new Error(e.code)}return i}))}authStatus(e,t,n=!1){return r(this,void 0,void 0,(function*(){try{const n=yield this.request("",{headers:{authorization:e}},t);return yield n.json()}catch(e){throw n&&console.log(e),e}}))}prepareFileUpload({organizationId:e,name:t,version:n,filesHash:o,filename:i,isUpsert:a}){return r(this,void 0,void 0,(function*(){const r=yield this.request(`/${e}/${t}/${n}/prepare-file-upload`,{method:"POST",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({filesHash:o,filename:i,isUpsert:a})},this.region);if(r.ok)return r.json();throw new Error("Could not prepare file upload")}))}pushApi({organizationId:e,name:t,version:n,rootFilePath:o,filePaths:i,branch:a,isUpsert:s,isPublic:l}){return r(this,void 0,void 0,(function*(){if(!(yield this.request(`/${e}/${t}/${n}`,{method:"PUT",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({rootFilePath:o,filePaths:i,branch:a,isUpsert:s,isPublic:l})},this.region)).ok)throw new Error("Could not push api")}))}}},7468:function(e,t){"use strict";function n(e,t){return""===e&&(e="#/"),"/"===e[e.length-1]?e+t:e+"/"+t}Object.defineProperty(t,"__esModule",{value:!0}),t.isMappingRef=t.isAbsoluteUrl=t.refBaseName=t.pointerBaseName=t.parsePointer=t.parseRef=t.escapePointer=t.unescapePointer=t.Location=t.isRef=t.joinPointer=void 0,t.joinPointer=n,t.isRef=function(e){return e&&"string"==typeof e.$ref};class r{constructor(e,t){this.source=e,this.pointer=t}child(e){return new r(this.source,n(this.pointer,(Array.isArray(e)?e:[e]).map(i).join("/")))}key(){return Object.assign(Object.assign({},this),{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+("#/"===this.pointer?"":this.pointer)}}function o(e){return decodeURIComponent(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function i(e){return"number"==typeof e?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}t.Location=r,t.unescapePointer=o,t.escapePointer=i,t.parseRef=function(e){const[t,n]=e.split("#/");return{uri:t||null,pointer:n?n.split("/").map(o).filter(Boolean):[]}},t.parsePointer=function(e){return e.substr(2).split("/").map(o)},t.pointerBaseName=function(e){const t=e.split("/");return t[t.length-1]},t.refBaseName=function(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")},t.isAbsoluteUrl=function(e){return e.startsWith("http://")||e.startsWith("https://")},t.isMappingRef=function(e){return e.startsWith("#")||e.startsWith("https://")||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1}},4182:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDocument=t.BaseResolver=t.makeDocumentFromString=t.makeRefId=t.YamlParseError=t.ResolveError=t.Source=void 0;const o=n(3197),i=n(6470),a=n(7468),s=n(5220),l=n(771);class c{constructor(e,t,n){this.absoluteRef=e,this.body=t,this.mimeType=n}getAst(e){var t;return void 0===this._ast&&(this._ast=null!==(t=e(this.body,{filename:this.absoluteRef}))&&void 0!==t?t:void 0,this._ast&&0===this._ast.kind&&""===this._ast.value&&1!==this._ast.startPosition&&(this._ast.startPosition=1,this._ast.endPosition=1)),this._ast}getLines(){return void 0===this._lines&&(this._lines=this.body.split(/\r\n|[\n\r]/g)),this._lines}}t.Source=c;class u extends Error{constructor(e){super(e.message),this.originalError=e,Object.setPrototypeOf(this,u.prototype)}}t.ResolveError=u;const p=/\((\d+):(\d+)\)$/;class d extends Error{constructor(e,t){super(e.message.split("\n")[0]),this.originalError=e,this.source=t,Object.setPrototypeOf(this,d.prototype);const[,n,r]=this.message.match(p)||[];this.line=parseInt(n,10),this.col=parseInt(r,10)}}function f(e,t){return e+"::"+t}function h(e,t){return{prev:e,node:t}}t.YamlParseError=d,t.makeRefId=f,t.makeDocumentFromString=function(e,t){const n=new c(t,e);try{return{source:n,parsed:l.parseYaml(e,{filename:t})}}catch(e){throw new d(e,n)}},t.BaseResolver=class{constructor(e={http:{headers:[]}}){this.config=e,this.cache=new Map}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(e,t){return a.isAbsoluteUrl(t)?t:e&&a.isAbsoluteUrl(e)?new URL(t,e).href:i.resolve(e?i.dirname(e):process.cwd(),t)}loadExternalRef(e){return r(this,void 0,void 0,(function*(){try{if(a.isAbsoluteUrl(e)){const{body:t,mimeType:n}=yield l.readFileFromUrl(e,this.config.http);return new c(e,t,n)}return new c(e,yield o.promises.readFile(e,"utf-8"))}catch(e){throw new u(e)}}))}parseDocument(e,t=!1){var n;const r=e.absoluteRef.substr(e.absoluteRef.lastIndexOf("."));if(![".json",".json",".yml",".yaml"].includes(r)&&!(null===(n=e.mimeType)||void 0===n?void 0:n.match(/(json|yaml|openapi)/))&&!t)return{source:e,parsed:e.body};try{return{source:e,parsed:l.parseYaml(e.body,{filename:e.absoluteRef})}}catch(t){throw new d(t,e)}}resolveDocument(e,t,n=!1){return r(this,void 0,void 0,(function*(){const r=this.resolveExternalRef(e,t),o=this.cache.get(r);if(o)return o;const i=this.loadExternalRef(r).then((e=>this.parseDocument(e,n)));return this.cache.set(r,i),i}))}};const m={name:"unknown",properties:{}},g={name:"scalar",properties:{}};t.resolveDocument=function(e){return r(this,void 0,void 0,(function*(){const{rootDocument:t,externalRefResolver:n,rootType:o}=e,i=new Map,l=new Set,c=[];let u;!function e(t,o,u,p){function d(e,t,o){return r(this,void 0,void 0,(function*(){if(function(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}(o.prev,t))throw new Error("Self-referencing circular pointer");const{uri:r,pointer:s}=a.parseRef(t.$ref),l=null!==r;let c;try{c=l?yield n.resolveDocument(e.source.absoluteRef,r):e}catch(n){const r={resolved:!1,isRemote:l,document:void 0,error:n},o=f(e.source.absoluteRef,t.$ref);return i.set(o,r),r}let u={resolved:!0,document:c,isRemote:l,node:e.parsed,nodePointer:"#/"},p=c.parsed;const m=s;for(let e of m){if("object"!=typeof p){p=void 0;break}if(void 0!==p[e])p=p[e],u.nodePointer=a.joinPointer(u.nodePointer,a.escapePointer(e));else{if(!a.isRef(p)){p=void 0;break}if(u=yield d(c,p,h(o,p)),c=u.document||c,"object"!=typeof u.node){p=void 0;break}p=u.node[e],u.nodePointer=a.joinPointer(u.nodePointer,a.escapePointer(e))}}u.node=p,u.document=c;const g=f(e.source.absoluteRef,t.$ref);return u.document&&a.isRef(p)&&(u=yield d(u.document,p,h(o,p))),i.set(g,u),Object.assign({},u)}))}!function t(n,r,i){if("object"!=typeof n||null===n)return;const u=`${r.name}::${i}`;if(!l.has(u))if(l.add(u),Array.isArray(n)){const e=r.items;if(r!==m&&void 0===e)return;for(let r=0;r{t.resolved&&e(t.node,t.document,t.nodePointer,r)}));c.push(t)}}}(t,p,o.source.absoluteRef+u)}(t.parsed,t,"#/",o);do{u=yield Promise.all(c)}while(c.length!==u.length);return i}))}},7275:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonSchema=t.releaseAjvInstance=void 0;const r=n(5499),o=n(7468);let i=null;t.releaseAjvInstance=function(){i=null},t.validateJsonSchema=function(e,t,n,a,s,l){const c=function(e,t,n,o){const a=function(e,t){return i||(i=new r.default({schemaId:"$id",meta:!0,allErrors:!0,strictSchema:!1,inlineRefs:!1,validateSchema:!1,discriminator:!0,allowUnionTypes:!0,validateFormats:!1,defaultAdditionalProperties:!t,loadSchemaSync(t,n){const r=e({$ref:n},t.split("#")[0]);if(r&&r.location)return Object.assign({$id:r.location.absolutePointer},r.node)},logger:!1})),i}(n,o);return a.getSchema(t.absolutePointer)||a.addSchema(Object.assign({$id:t.absolutePointer},e),t.absolutePointer),a.getSchema(t.absolutePointer)}(t,n,s,l);return c?{valid:!!c(e,{instancePath:a,parentData:{fake:{}},parentDataProperty:"fake",rootData:{},dynamicAnchors:{}}),errors:(c.errors||[]).map((function(e){let t=e.message,n="enum"===e.keyword?e.params.allowedValues:void 0;n&&(t+=` ${n.map((e=>`"${e}"`)).join(", ")}`),"type"===e.keyword&&(t=`type ${t}`);const r=e.instancePath.substring(a.length+1),i=r.substring(r.lastIndexOf("/")+1);if(i&&(t=`\`${i}\` property ${t}`),"additionalProperties"===e.keyword){const n=e.params.additionalProperty;t=`${t} \`${n}\``,e.instancePath+="/"+o.escapePointer(n)}return Object.assign(Object.assign({},e),{message:t,suggest:n})}))}:{valid:!0,errors:[]}}},9740:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asserts=t.runOnValuesSet=t.runOnKeysSet=void 0;const r=n(5738);t.runOnKeysSet=new Set(["mutuallyExclusive","mutuallyRequired","enum","pattern","minLength","maxLength","casing","sortOrder","disallowed","required"]),t.runOnValuesSet=new Set(["pattern","enum","defined","undefined","nonEmpty","minLength","maxLength","casing","sortOrder"]),t.asserts={pattern:(e,t)=>{if(void 0===e)return!0;const n="string"==typeof e?[e]:e,r=t.match(/(\b\/\b)(.+)/g)||["/"];t=t.slice(1).replace(r[0],"");const o=new RegExp(t,r[0].slice(1));for(let e of n)if(!e.match(o))return!1;return!0},enum:(e,t)=>{if(void 0===e)return!0;const n="string"==typeof e?[e]:e;for(let e of n)if(!t.includes(e))return!1;return!0},defined:(e,t=!0)=>{const n=void 0!==e;return t?n:!n},required:(e,t)=>{for(const n of t)if(!e.includes(n))return!1;return!0},disallowed:(e,t)=>{if(void 0===e)return!0;const n="string"==typeof e?[e]:e;for(let e of n)if(t.includes(e))return!1;return!0},undefined:(e,t=!0)=>{const n=void 0===e;return t?n:!n},nonEmpty:(e,t=!0)=>{const n=null==e||""===e;return t?!n:n},minLength:(e,t)=>void 0===e||e.length>=t,maxLength:(e,t)=>void 0===e||e.length<=t,casing:(e,t)=>{if(void 0===e)return!0;const n="string"==typeof e?[e]:e;for(let e of n){let n=!1;switch(t){case"camelCase":n=!!e.match(/^[a-z][a-zA-Z0-9]+$/g);break;case"kebab-case":n=!!e.match(/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/g);break;case"snake_case":n=!!e.match(/^([a-z][a-z0-9]*)(_[a-z0-9]+)*$/g);break;case"PascalCase":n=!!e.match(/^[A-Z][a-zA-Z0-9]+$/g);break;case"MACRO_CASE":n=!!e.match(/^([A-Z][A-Z0-9]*)(_[A-Z0-9]+)*$/g);break;case"COBOL-CASE":n=!!e.match(/^([A-Z][A-Z0-9]*)(-[A-Z0-9]+)*$/g);break;case"flatcase":n=!!e.match(/^[a-z][a-z0-9]+$/g)}if(!n)return!1}return!0},sortOrder:(e,t)=>void 0===e||r.isOrdered(e,t),mutuallyExclusive:(e,t)=>r.getIntersectionLength(e,t)<2,mutuallyRequired:(e,t)=>!(r.getIntersectionLength(e,t)>0)||r.getIntersectionLength(e,t)===t.length}},4015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Assertions=void 0;const r=n(9740),o=n(5738);t.Assertions=e=>{let t=[];const n=Object.values(e).filter((e=>"object"==typeof e&&null!==e));for(const[e,i]of n.entries()){const n=i.assertionId&&`${i.assertionId} assertion`||`assertion #${e+1}`;if(!i.subject)throw new Error(`${n}: 'subject' is required`);const a=Array.isArray(i.subject)?i.subject:[i.subject],s=Object.keys(r.asserts).filter((e=>void 0!==i[e])).map((e=>({assertId:n,name:e,conditions:i[e],message:i.message,severity:i.severity||"error",suggest:i.suggest||[],runsOnKeys:r.runOnKeysSet.has(e),runsOnValues:r.runOnValuesSet.has(e)}))),l=s.find((e=>e.runsOnKeys&&!e.runsOnValues)),c=s.find((e=>e.runsOnValues&&!e.runsOnKeys));if(c&&!i.property)throw new Error(`${c.name} can't be used on all keys. Please provide a single property.`);if(l&&i.property)throw new Error(`${l.name} can't be used on a single property. Please use 'property'.`);for(const e of a){const n=o.buildSubjectVisitor(i.property,s,i.context),r=o.buildVisitorObject(e,i.context,n);t.push(r)}}return t}},5738:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOrdered=t.getIntersectionLength=t.buildSubjectVisitor=t.buildVisitorObject=void 0;const r=n(7468),o=n(9740);function i(e,t,n,r){o.asserts[t.name](e,t.conditions)||r({message:t.message||`The ${t.assertId} doesn't meet required conditions`,location:n,forceSeverity:t.severity,suggest:t.suggest,ruleId:t.assertId})}t.buildVisitorObject=function(e,t,n){if(!t)return{[e]:n};let r={};const o=r;for(let n=0;ni?!i.includes(t):a?a.includes(t):void 0}:{},r=r[o.type]}return r[e]=n,o},t.buildSubjectVisitor=function(e,t,n){return function(o,{report:a,location:s,key:l,type:c,resolve:u}){var p;if(n){const e=n[n.length-1];if(e.type===c.name){const t=e.matchParentKeys,n=e.excludeParentKeys;if(t&&!t.includes(l))return;if(n&&n.includes(l))return}}e&&(e=Array.isArray(e)?e:[e]);for(const n of t)if(e)for(const t of e)i(r.isRef(o[t])?null===(p=u(o[t]))||void 0===p?void 0:p.node:o[t],n,s.child(t),a);else i(Object.keys(o),n,s.key(),a)}},t.getIntersectionLength=function(e,t){const n=new Set(t);let r=0;for(const t of e)n.has(t)&&r++;return r},t.isOrdered=function(e,t){const n=t.direction||t,r=t.property;for(let t=1;t=i:o<=i))return!1}return!0}},8265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoContact=void 0;const r=n(780);t.InfoContact=()=>({Info(e,{report:t,location:n}){e.contact||t({message:r.missingRequiredField("Info","contact"),location:n.child("contact").key()})}})},8675:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoDescription=void 0;const r=n(780);t.InfoDescription=()=>({Info(e,t){r.validateDefinedAndNonEmpty("description",e,t)}})},9622:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoLicense=void 0;const r=n(780);t.InfoLicense=()=>({Info(e,{report:t}){e.license||t({message:r.missingRequiredField("Info","license"),location:{reportOnKey:!0}})}})},476:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoLicenseUrl=void 0;const r=n(780);t.InfoLicenseUrl=()=>({License(e,t){r.validateDefinedAndNonEmpty("url",e,t)}})},3467:function(e,t){"use strict";function n(e,t){const n=e.split("/"),r=t.split("/");if(n.length!==r.length)return!1;let o=0,i=0,a=!0;for(let e=0;e({PathMap(e,{report:t,location:r}){const o=[];for(const i of Object.keys(e)){const e=o.find((e=>n(e,i)));e&&t({message:`Paths should resolve unambiguously. Found two ambiguous paths: \`${e}\` and \`${i}\`.`,location:r.child([i]).key()}),o.push(i)}}})},2319:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoEnumTypeMismatch=void 0;const r=n(780);t.NoEnumTypeMismatch=()=>({Schema(e,{report:t,location:n}){if(!e.enum||Array.isArray(e.enum)){if(e.enum&&e.type&&!Array.isArray(e.type)){const o=e.enum.filter((t=>!r.matchesJsonSchemaType(t,e.type,e.nullable)));for(const i of o)t({message:`All values of \`enum\` field must be of the same type as the \`type\` field: expected "${e.type}" but received "${r.oasTypeOf(i)}".`,location:n.child(["enum",e.enum.indexOf(i)])})}if(e.enum&&e.type&&Array.isArray(e.type)){const o={};for(const t of e.enum){o[t]=[];for(const n of e.type)r.matchesJsonSchemaType(t,n,e.nullable)||o[t].push(n);o[t].length!==e.type.length&&delete o[t]}for(const r of Object.keys(o))t({message:`Enum value \`${r}\` must be of one type. Allowed types: \`${e.type}\`.`,location:n.child(["enum",e.enum.indexOf(r)])})}}}})},525:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoHttpVerbsInPaths=void 0;const r=n(771),o=["get","head","post","put","patch","delete","options","trace"];t.NoHttpVerbsInPaths=({splitIntoWords:e})=>({PathItem(t,{key:n,report:i,location:a}){const s=n.toString();if(!s.startsWith("/"))return;const l=s.split("/");for(const t of l){if(!t||r.isPathParameter(t))continue;const n=n=>e?r.splitCamelCaseIntoWords(t).has(n):t.toLocaleLowerCase().includes(n);for(const e of o)n(e)&&i({message:`path \`${s}\` should not contain http verb ${e}`,location:a.key()})}}})},4628:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoIdenticalPaths=void 0,t.NoIdenticalPaths=()=>({PathMap(e,{report:t,location:n}){const r=new Map;for(const o of Object.keys(e)){const e=o.replace(/{.+?}/g,"{VARIABLE}"),i=r.get(e);i?t({message:`The path already exists which differs only by path parameter name(s): \`${i}\` and \`${o}\`.`,location:n.child([o]).key()}):r.set(e,o)}}})},1562:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoInvalidParameterExamples=void 0;const r=n(780);t.NoInvalidParameterExamples=e=>{var t;const n=null===(t=e.disallowAdditionalProperties)||void 0===t||t;return{Parameter:{leave(e,t){if(e.example&&r.validateExample(e.example,e.schema,t.location.child("example"),t,n),e.examples)for(const[n,o]of Object.entries(e.examples))"value"in o&&r.validateExample(o.value,e.schema,t.location.child(["examples",n]),t,!1)}}}}},78:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoInvalidSchemaExamples=void 0;const r=n(780);t.NoInvalidSchemaExamples=e=>{var t;const n=null===(t=e.disallowAdditionalProperties)||void 0===t||t;return{Schema:{leave(e,t){if(e.examples)for(const o of e.examples)r.validateExample(o,e,t.location.child(["examples",e.examples.indexOf(o)]),t,n);e.example&&r.validateExample(e.example,e,t.location.child("example"),t,!1)}}}}},700:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoPathTrailingSlash=void 0,t.NoPathTrailingSlash=()=>({PathItem(e,{report:t,key:n,location:r}){n.endsWith("/")&&"/"!==n&&t({message:`\`${n}\` should not have a trailing slash.`,location:r.key()})}})},5946:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation2xxResponse=void 0,t.Operation2xxResponse=()=>({ResponsesMap(e,{report:t}){Object.keys(e).some((e=>"default"===e||/2[Xx0-9]{2}/.test(e)))||t({message:"Operation must have at least one `2xx` response.",location:{reportOnKey:!0}})}})},5281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation4xxResponse=void 0,t.Operation4xxResponse=()=>({ResponsesMap(e,{report:t}){Object.keys(e).some((e=>/4[Xx0-9]{2}/.test(e)))||t({message:"Operation must have at least one `4xx` response.",location:{reportOnKey:!0}})}})},3408:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationDescription=void 0;const r=n(780);t.OperationDescription=()=>({Operation(e,t){r.validateDefinedAndNonEmpty("description",e,t)}})},8742:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationIdUnique=void 0,t.OperationIdUnique=()=>{const e=new Set;return{Operation(t,{report:n,location:r}){t.operationId&&(e.has(t.operationId)&&n({message:"Every operation must have a unique `operationId`.",location:r.child([t.operationId])}),e.add(t.operationId))}}}},5064:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationIdUrlSafe=void 0;const n=/^[A-Za-z0-9-._~:/?#\[\]@!\$&'()*+,;=]*$/;t.OperationIdUrlSafe=()=>({Operation(e,{report:t,location:r}){e.operationId&&!n.test(e.operationId)&&t({message:"Operation `operationId` should not have URL invalid characters.",location:r.child(["operationId"])})}})},8786:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationOperationId=void 0;const r=n(780);t.OperationOperationId=()=>({DefinitionRoot:{PathItem:{Operation(e,t){r.validateDefinedAndNonEmpty("operationId",e,t)}}}})},4112:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationParametersUnique=void 0,t.OperationParametersUnique=()=>{let e,t;return{PathItem:{enter(){e=new Set},Parameter(t,{report:n,key:r,parentLocations:o}){const i=`${t.in}___${t.name}`;e.has(i)&&n({message:`Paths must have unique \`name\` + \`in\` parameters.\nRepeats of \`in:${t.in}\` + \`name:${t.name}\`.`,location:o.PathItem.child(["parameters",r])}),e.add(`${t.in}___${t.name}`)},Operation:{enter(){t=new Set},Parameter(e,{report:n,key:r,parentLocations:o}){const i=`${e.in}___${e.name}`;t.has(i)&&n({message:`Operations must have unique \`name\` + \`in\` parameters. Repeats of \`in:${e.in}\` + \`name:${e.name}\`.`,location:o.Operation.child(["parameters",r])}),t.add(i)}}}}}},7892:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationSecurityDefined=void 0,t.OperationSecurityDefined=()=>{let e=new Map;return{DefinitionRoot:{leave(t,{report:n}){for(const[t,r]of e.entries())if(!r.defined)for(const e of r.from)n({message:`There is no \`${t}\` security scheme defined.`,location:e.key()})}},SecurityScheme(t,{key:n}){e.set(n.toString(),{defined:!0,from:[]})},SecurityRequirement(t,{location:n}){for(const r of Object.keys(t)){const t=e.get(r),o=n.child([r]);t?t.from.push(o):e.set(r,{from:[o]})}}}}},8613:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationSingularTag=void 0,t.OperationSingularTag=()=>({Operation(e,{report:t,location:n}){e.tags&&e.tags.length>1&&t({message:"Operation `tags` object should have only one tag.",location:n.child(["tags"]).key()})}})},9578:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationSummary=void 0;const r=n(780);t.OperationSummary=()=>({Operation(e,t){r.validateDefinedAndNonEmpty("summary",e,t)}})},5097:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTagDefined=void 0,t.OperationTagDefined=()=>{let e;return{DefinitionRoot(t){var n;e=new Set((null!==(n=t.tags)&&void 0!==n?n:[]).map((e=>e.name)))},Operation(t,{report:n,location:r}){if(t.tags)for(let o=0;o({Parameter(e,{report:t,location:n}){void 0===e.description?t({message:"Parameter object description must be present.",location:{reportOnKey:!0}}):e.description||t({message:"Parameter object description must be non-empty string.",location:n.child(["description"])})}})},7890:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathDeclarationMustExist=void 0,t.PathDeclarationMustExist=()=>({PathItem(e,{report:t,key:n}){-1!==n.indexOf("{}")&&t({message:"Path parameter declarations must be non-empty. `{}` is invalid.",location:{reportOnKey:!0}})}})},3689:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathExcludesPatterns=void 0,t.PathExcludesPatterns=({patterns:e})=>({PathItem(t,{report:n,key:r,location:o}){if(!e)throw new Error('Parameter "patterns" is not provided for "path-excludes-patterns" rule');const i=r.toString();if(i.startsWith("/")){const t=e.filter((e=>i.match(e)));for(const e of t)n({message:`path \`${i}\` should not match regex pattern: \`${e}\``,location:o.key()})}}})},2332:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathHttpVerbsOrder=void 0;const n=["get","head","post","put","patch","delete","options","trace"];t.PathHttpVerbsOrder=e=>{const t=e&&e.order||n;if(!Array.isArray(t))throw new Error("path-http-verbs-order `order` option must be an array");return{PathItem(e,{report:n,location:r}){const o=Object.keys(e).filter((e=>t.includes(e)));for(let e=0;e({PathMap:{PathItem(e,{report:t,key:n}){n.toString().includes("?")&&t({message:"Don't put query string items in the path, they belong in parameters with `in: query`.",location:{reportOnKey:!0}})}}})},7421:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathParamsDefined=void 0;const n=/\{([a-zA-Z0-9_.-]+)\}+/g;t.PathParamsDefined=()=>{let e,t,r;return{PathItem:{enter(o,{key:i}){t=new Set,r=i,e=new Set(Array.from(i.toString().matchAll(n)).map((e=>e[1])))},Parameter(n,{report:o,location:i}){"path"===n.in&&n.name&&(t.add(n.name),e.has(n.name)||o({message:`Path parameter \`${n.name}\` is not used in the path \`${r}\`.`,location:i.child(["name"])}))},Operation:{leave(n,{report:o,location:i}){for(const n of Array.from(e.keys()))t.has(n)||o({message:`The operation does not define the path parameter \`{${n}}\` expected by path \`${r}\`.`,location:i.child(["parameters"]).key()})},Parameter(n,{report:o,location:i}){"path"===n.in&&n.name&&(t.add(n.name),e.has(n.name)||o({message:`Path parameter \`${n.name}\` is not used in the path \`${r}\`.`,location:i.child(["name"])}))}}}}}},3807:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathSegmentPlural=void 0;const r=n(771);t.PathSegmentPlural=e=>{const{ignoreLastPathSegment:t,exceptions:n}=e;return{PathItem:{leave(e,{report:o,key:i,location:a}){const s=i.toString();if(s.startsWith("/")){const e=s.split("/");e.shift(),t&&e.length>1&&e.pop();for(const t of e)n&&n.includes(t)||!r.isPathParameter(t)&&r.isSingular(t)&&o({message:`path segment \`${t}\` should be plural.`,location:a.key()})}}}}}},9527:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathsKebabCase=void 0,t.PathsKebabCase=()=>({PathItem(e,{report:t,key:n}){n.substr(1).split("/").filter((e=>""!==e)).every((e=>/^{.+}$/.test(e)||/^[a-z0-9-.]+$/.test(e)))||t({message:`\`${n}\` does not use kebab-case.`,location:{reportOnKey:!0}})}})},6471:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OasSpec=void 0;const r=n(5220),o=n(780),i=n(7468),a=n(771);t.OasSpec=()=>({any(e,{report:t,type:n,location:s,key:l,resolve:c,ignoreNextVisitorsOnNode:u}){var p,d,f,h;const m=o.oasTypeOf(e);if(n.items)return void("array"!==m&&(t({message:`Expected type \`${n.name}\` (array) but got \`${m}\``}),u()));if("object"!==m)return t({message:`Expected type \`${n.name}\` (object) but got \`${m}\``}),void u();const g="function"==typeof n.required?n.required(e,l):n.required;for(let n of g||[])e.hasOwnProperty(n)||t({message:`The field \`${n}\` must be present on this level.`,location:[{reportOnKey:!0}]});const y=null===(p=n.allowed)||void 0===p?void 0:p.call(n,e);if(y&&a.isPlainObject(e))for(const r in e)y.includes(r)||n.extensionsPrefix&&r.startsWith(n.extensionsPrefix)||!Object.keys(n.properties).includes(r)||t({message:`The field \`${r}\` is not allowed here.`,location:s.child([r]).key()});const v=n.requiredOneOf||null;if(v){let r=!1;for(let t of v||[])e.hasOwnProperty(t)&&(r=!0);r||t({message:`Must contain at least one of the following fields: ${null===(d=n.requiredOneOf)||void 0===d?void 0:d.join(", ")}.`,location:[{reportOnKey:!0}]})}for(const a of Object.keys(e)){const l=s.child([a]);let u=e[a],p=n.properties[a];if(void 0===p&&(p=n.additionalProperties),"function"==typeof p&&(p=p(u,a)),r.isNamedType(p))continue;const d=p,m=o.oasTypeOf(u);if(void 0!==d){if(null!==d){if(!1!==d.resolvable&&i.isRef(u)&&(u=c(u).node),d.enum)d.enum.includes(u)||t({location:l,message:`\`${a}\` can be one of the following only: ${d.enum.map((e=>`"${e}"`)).join(", ")}.`,suggest:o.getSuggest(u,d.enum)});else if(d.type&&!o.matchesJsonSchemaType(u,d.type,!1))t({message:`Expected type \`${d.type}\` but got \`${m}\`.`,location:l});else if("array"===m&&(null===(f=d.items)||void 0===f?void 0:f.type)){const e=null===(h=d.items)||void 0===h?void 0:h.type;for(let n=0;ne[a]&&t({message:`The value of the ${a} field must be greater than or equal to ${d.minimum}`,location:s.child([a])})}}else{if(a.startsWith("x-"))continue;t({message:`Property \`${a}\` is not expected here.`,suggest:o.getSuggest(a,Object.keys(n.properties)),location:l.key()})}}}})},7281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagDescription=void 0;const r=n(780);t.TagDescription=()=>({Tag(e,t){r.validateDefinedAndNonEmpty("description",e,t)}})},6855:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagsAlphabetical=void 0,t.TagsAlphabetical=()=>({DefinitionRoot(e,{report:t,location:n}){if(e.tags)for(let r=0;re.tags[r+1].name&&t({message:"The `tags` array should be in alphabetical order.",location:n.child(["tags",r])})}})},348:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnresolvedRef=t.NoUnresolvedRefs=void 0;const r=n(4182);function o(e,t,n){var o;const i=e.error;i instanceof r.YamlParseError&&t({message:"Failed to parse: "+i.message,location:{source:i.source,pointer:void 0,start:{col:i.col,line:i.line}}});const a=null===(o=e.error)||void 0===o?void 0:o.message;t({location:n,message:"Can't resolve $ref"+(a?": "+a:"")})}t.NoUnresolvedRefs=()=>({ref:{leave(e,{report:t,location:n},r){void 0===r.node&&o(r,t,n)}},DiscriminatorMapping(e,{report:t,resolve:n,location:r}){for(const i of Object.keys(e)){const a=n({$ref:e[i]});if(void 0!==a.node)return;o(a,t,r.child(i))}}}),t.reportUnresolvedRef=o},9566:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanParameterPrefixes=void 0,t.BooleanParameterPrefixes=e=>{const t=e.prefixes||["is","has"],n=new RegExp(`^(${t.join("|")})[A-Z-_]`),r=t.map((e=>`\`${e}\``)),o=1===r.length?r[0]:r.slice(0,-1).join(", ")+" or "+r[t.length-1];return{Parameter(e,{report:t,location:r}){"boolean"!==e.type||n.test(e.name)||t({message:`Boolean parameter \`${e.name}\` should have ${o} prefix.`,location:r.child("name")})}}}},7523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preprocessors=t.rules=void 0;const r=n(6471),o=n(78),i=n(1562),a=n(8675),s=n(8265),l=n(9622),c=n(476),u=n(9566),p=n(7281),d=n(6855),f=n(9527),h=n(2319),m=n(700),g=n(5946),y=n(5281),v=n(4015),b=n(8742),w=n(4112),x=n(7421),k=n(5097),_=n(7890),O=n(5064),S=n(3408),E=n(5023),P=n(3529),A=n(8613),$=n(7892),R=n(348),C=n(2332),j=n(4628),T=n(8786),I=n(9578),N=n(3467),D=n(525),L=n(3689),M=n(7028),F=n(1750),z=n(3807);t.rules={spec:r.OasSpec,"no-invalid-schema-examples":o.NoInvalidSchemaExamples,"no-invalid-parameter-examples":i.NoInvalidParameterExamples,"info-description":a.InfoDescription,"info-contact":s.InfoContact,"info-license":l.InfoLicense,"info-license-url":c.InfoLicenseUrl,"tag-description":p.TagDescription,"tags-alphabetical":d.TagsAlphabetical,"paths-kebab-case":f.PathsKebabCase,"no-enum-type-mismatch":h.NoEnumTypeMismatch,"boolean-parameter-prefixes":u.BooleanParameterPrefixes,"no-path-trailing-slash":m.NoPathTrailingSlash,"operation-2xx-response":g.Operation2xxResponse,"operation-4xx-response":y.Operation4xxResponse,assertions:v.Assertions,"operation-operationId-unique":b.OperationIdUnique,"operation-parameters-unique":w.OperationParametersUnique,"path-parameters-defined":x.PathParamsDefined,"operation-tag-defined":k.OperationTagDefined,"path-declaration-must-exist":_.PathDeclarationMustExist,"operation-operationId-url-safe":O.OperationIdUrlSafe,"operation-operationId":T.OperationOperationId,"operation-summary":I.OperationSummary,"operation-description":S.OperationDescription,"path-not-include-query":E.PathNotIncludeQuery,"path-params-defined":x.PathParamsDefined,"parameter-description":P.ParameterDescription,"operation-singular-tag":A.OperationSingularTag,"operation-security-defined":$.OperationSecurityDefined,"no-unresolved-refs":R.NoUnresolvedRefs,"no-identical-paths":j.NoIdenticalPaths,"no-ambiguous-paths":N.NoAmbiguousPaths,"path-http-verbs-order":C.PathHttpVerbsOrder,"no-http-verbs-in-paths":D.NoHttpVerbsInPaths,"path-excludes-patterns":L.PathExcludesPatterns,"request-mime-type":M.RequestMimeType,"response-mime-type":F.ResponseMimeType,"path-segment-plural":z.PathSegmentPlural},t.preprocessors={}},4508:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const r=n(771);t.RemoveUnusedComponents=()=>{let e=new Map;function t(t,n,r){var o;e.set(t.absolutePointer,{used:(null===(o=e.get(t.absolutePointer))||void 0===o?void 0:o.used)||!1,componentType:n,name:r})}return{ref:{leave(t,{type:n,resolve:r,key:o}){if(["Schema","Parameter","Response","SecurityScheme"].includes(n.name)){const n=r(t);if(!n.location)return;e.set(n.location.absolutePointer,{used:!0,name:o.toString()})}}},DefinitionRoot:{leave(t,n){const o=n.getVisitorData();o.removedCount=0;let i=new Set;e.forEach((e=>{const{used:n,name:r,componentType:a}=e;!n&&a&&(i.add(a),delete t[a][r],o.removedCount++)}));for(const e of i)r.isEmptyObject(t[e])&&delete t[e]}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,"definitions",r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,"parameters",r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,"responses",r.toString())}},NamedSecuritySchemes:{SecurityScheme(e,{location:n,key:r}){t(n,"securityDefinitions",r.toString())}}}}},7028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMimeType=void 0;const r=n(771);t.RequestMimeType=({allowedValues:e})=>({DefinitionRoot(t,n){r.validateMimeType({type:"consumes",value:t},n,e)},Operation:{leave(t,n){r.validateMimeType({type:"consumes",value:t},n,e)}}})},1750:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseMimeType=void 0;const r=n(771);t.ResponseMimeType=({allowedValues:e})=>({DefinitionRoot(t,n){r.validateMimeType({type:"produces",value:t},n,e)},Operation:{leave(t,n){r.validateMimeType({type:"produces",value:t},n,e)}}})},962:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanParameterPrefixes=void 0,t.BooleanParameterPrefixes=e=>{const t=e.prefixes||["is","has"],n=new RegExp(`^(${t.join("|")})[A-Z-_]`),r=t.map((e=>`\`${e}\``)),o=1===r.length?r[0]:r.slice(0,-1).join(", ")+" or "+r[t.length-1];return{Parameter:{Schema(e,{report:t,parentLocations:r},i){"boolean"!==e.type||n.test(i.Parameter.name)||t({message:`Boolean parameter \`${i.Parameter.name}\` should have ${o} prefix.`,location:r.Parameter.child(["name"])})}}}}},226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preprocessors=t.rules=void 0;const r=n(6471),o=n(5946),i=n(5281),a=n(4015),s=n(8742),l=n(4112),c=n(7421),u=n(5097),p=n(1265),d=n(2319),f=n(700),h=n(7890),m=n(5064),g=n(6855),y=n(5486),v=n(2947),b=n(8675),w=n(7281),x=n(8265),k=n(9622),_=n(3408),O=n(897),S=n(5023),E=n(3529),P=n(8613),A=n(476),$=n(7892),R=n(348),C=n(962),j=n(9527),T=n(2332),I=n(7020),N=n(9336),D=n(4628),L=n(6208),M=n(8786),F=n(9578),z=n(3467),U=n(472),B=n(525),q=n(3736),V=n(503),W=n(3807),H=n(3689),Y=n(78),G=n(1562);t.rules={spec:r.OasSpec,"info-description":b.InfoDescription,"info-contact":x.InfoContact,"info-license":k.InfoLicense,"info-license-url":A.InfoLicenseUrl,"operation-2xx-response":o.Operation2xxResponse,"operation-4xx-response":i.Operation4xxResponse,assertions:a.Assertions,"operation-operationId-unique":s.OperationIdUnique,"operation-parameters-unique":l.OperationParametersUnique,"path-parameters-defined":c.PathParamsDefined,"operation-tag-defined":u.OperationTagDefined,"no-example-value-and-externalValue":p.NoExampleValueAndExternalValue,"no-enum-type-mismatch":d.NoEnumTypeMismatch,"no-path-trailing-slash":f.NoPathTrailingSlash,"no-empty-servers":I.NoEmptyServers,"path-declaration-must-exist":h.PathDeclarationMustExist,"operation-operationId-url-safe":m.OperationIdUrlSafe,"operation-operationId":M.OperationOperationId,"operation-summary":F.OperationSummary,"tags-alphabetical":g.TagsAlphabetical,"no-server-example.com":y.NoServerExample,"no-server-trailing-slash":v.NoServerTrailingSlash,"tag-description":w.TagDescription,"operation-description":_.OperationDescription,"no-unused-components":O.NoUnusedComponents,"path-not-include-query":S.PathNotIncludeQuery,"path-params-defined":c.PathParamsDefined,"parameter-description":E.ParameterDescription,"operation-singular-tag":P.OperationSingularTag,"operation-security-defined":$.OperationSecurityDefined,"no-unresolved-refs":R.NoUnresolvedRefs,"paths-kebab-case":j.PathsKebabCase,"boolean-parameter-prefixes":C.BooleanParameterPrefixes,"path-http-verbs-order":T.PathHttpVerbsOrder,"no-invalid-media-type-examples":N.ValidContentExamples,"no-identical-paths":D.NoIdenticalPaths,"no-ambiguous-paths":z.NoAmbiguousPaths,"no-undefined-server-variable":L.NoUndefinedServerVariable,"no-servers-empty-enum":U.NoEmptyEnumServers,"no-http-verbs-in-paths":B.NoHttpVerbsInPaths,"path-excludes-patterns":H.PathExcludesPatterns,"request-mime-type":q.RequestMimeType,"response-mime-type":V.ResponseMimeType,"path-segment-plural":W.PathSegmentPlural,"no-invalid-schema-examples":Y.NoInvalidSchemaExamples,"no-invalid-parameter-examples":G.NoInvalidParameterExamples},t.preprocessors={}},7020:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoEmptyServers=void 0,t.NoEmptyServers=()=>({DefinitionRoot(e,{report:t,location:n}){e.hasOwnProperty("servers")?Array.isArray(e.servers)&&0!==e.servers.length||t({message:"Servers must be a non-empty array.",location:n.child(["servers"]).key()}):t({message:"Servers must be present.",location:n.child(["openapi"]).key()})}})},1265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoExampleValueAndExternalValue=void 0,t.NoExampleValueAndExternalValue=()=>({Example(e,{report:t,location:n}){e.value&&e.externalValue&&t({message:"Example object can have either `value` or `externalValue` fields.",location:n.child(["value"]).key()})}})},9336:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidContentExamples=void 0;const r=n(7468),o=n(780);t.ValidContentExamples=e=>{var t;const n=null===(t=e.disallowAdditionalProperties)||void 0===t||t;return{MediaType:{leave(e,t){const{location:i,resolve:a}=t;if(e.schema)if(e.example)s(e.example,i.child("example"));else if(e.examples)for(const t of Object.keys(e.examples))s(e.examples[t],i.child(["examples",t,"value"]),!0);function s(i,s,l){if(r.isRef(i)){const e=a(i);if(!e.location)return;s=l?e.location.child("value"):e.location,i=e.node}o.validateExample(l?i.value:i,e.schema,s,t,n)}}}}}},5486:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoServerExample=void 0,t.NoServerExample=()=>({Server(e,{report:t,location:n}){-1!==["example.com","localhost"].indexOf(e.url)&&t({message:"Server `url` should not point at example.com.",location:n.child(["url"])})}})},2947:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoServerTrailingSlash=void 0,t.NoServerTrailingSlash=()=>({Server(e,{report:t,location:n}){e.url&&e.url.endsWith("/")&&"/"!==e.url&&t({message:"Server `url` should not have a trailing slash.",location:n.child(["url"])})}})},472:function(e,t){"use strict";var n;function r(e){var t;if(e.variables&&0===Object.keys(e.variables).length)return;const r=[];for(var o in e.variables){const i=e.variables[o];if(!i.enum)continue;if(Array.isArray(i.enum)&&0===(null===(t=i.enum)||void 0===t?void 0:t.length)&&r.push(n.empty),!i.default)continue;const a=e.variables[o].default;i.enum&&!i.enum.includes(a)&&r.push(n.invalidDefaultValue)}return r.length?r:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.NoEmptyEnumServers=void 0,function(e){e.empty="empty",e.invalidDefaultValue="invalidDefaultValue"}(n||(n={})),t.NoEmptyEnumServers=()=>({DefinitionRoot(e,{report:t,location:o}){if(!e.servers||0===e.servers.length)return;const i=[];if(Array.isArray(e.servers))for(const t of e.servers){const e=r(t);e&&i.push(...e)}else{const t=r(e.servers);if(!t)return;i.push(...t)}for(const e of i)e===n.empty&&t({message:"Server variable with `enum` must be a non-empty array.",location:o.child(["servers"]).key()}),e===n.invalidDefaultValue&&t({message:"Server variable define `enum` and `default`. `enum` must include default value",location:o.child(["servers"]).key()})}})},6208:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoUndefinedServerVariable=void 0,t.NoUndefinedServerVariable=()=>({Server(e,{report:t,location:n}){var r;if(!e.url)return;const o=(null===(r=e.url.match(/{[^}]+}/g))||void 0===r?void 0:r.map((e=>e.slice(1,e.length-1))))||[],i=(null==e?void 0:e.variables)&&Object.keys(e.variables)||[];for(const e of o)i.includes(e)||t({message:`The \`${e}\` variable is not defined in the \`variables\` objects.`,location:n.child(["url"])});for(const e of i)o.includes(e)||t({message:`The \`${e}\` variable is not used in the server's \`url\` field.`,location:n.child(["variables",e]).key(),from:n.child("url")})}})},897:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoUnusedComponents=void 0,t.NoUnusedComponents=()=>{let e=new Map;function t(t,n){var r;e.set(t.absolutePointer,{used:(null===(r=e.get(t.absolutePointer))||void 0===r?void 0:r.used)||!1,location:t,name:n})}return{ref(t,{type:n,resolve:r,key:o,location:i}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(n.name)){const n=r(t);if(!n.location)return;e.set(n.location.absolutePointer,{used:!0,name:o.toString(),location:i})}},DefinitionRoot:{leave(t,{report:n}){e.forEach((e=>{e.used||n({message:`Component: "${e.name}" is never used.`,location:e.location.key()})}))}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,r.toString())}},NamedExamples:{Example(e,{location:n,key:r}){t(n,r.toString())}},NamedRequestBodies:{RequestBody(e,{location:n,key:r}){t(n,r.toString())}},NamedHeaders:{Header(e,{location:n,key:r}){t(n,r.toString())}}}}},6350:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const r=n(771);t.RemoveUnusedComponents=()=>{let e=new Map;function t(t,n,r){var o;e.set(t.absolutePointer,{used:(null===(o=e.get(t.absolutePointer))||void 0===o?void 0:o.used)||!1,componentType:n,name:r})}return{ref:{leave(t,{type:n,resolve:r,key:o}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(n.name)){const n=r(t);if(!n.location)return;e.set(n.location.absolutePointer,{used:!0,name:o.toString()})}}},DefinitionRoot:{leave(t,n){const o=n.getVisitorData();o.removedCount=0,e.forEach((e=>{const{used:n,componentType:i,name:a}=e;if(!n&&i){let e=t.components[i];delete e[a],o.removedCount++,r.isEmptyObject(e)&&delete t.components[i]}})),r.isEmptyObject(t.components)&&delete t.components}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,"schemas",r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,"parameters",r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,"responses",r.toString())}},NamedExamples:{Example(e,{location:n,key:r}){t(n,"examples",r.toString())}},NamedRequestBodies:{RequestBody(e,{location:n,key:r}){t(n,"requestBodies",r.toString())}},NamedHeaders:{Header(e,{location:n,key:r}){t(n,"headers",r.toString())}}}}},3736:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMimeType=void 0;const r=n(771);t.RequestMimeType=({allowedValues:e})=>({PathMap:{RequestBody:{leave(t,n){r.validateMimeTypeOAS3({type:"consumes",value:t},n,e)}},Callback:{RequestBody(){},Response:{leave(t,n){r.validateMimeTypeOAS3({type:"consumes",value:t},n,e)}}}},WebhooksMap:{Response:{leave(t,n){r.validateMimeTypeOAS3({type:"consumes",value:t},n,e)}}}})},503:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseMimeType=void 0;const r=n(771);t.ResponseMimeType=({allowedValues:e})=>({PathMap:{Response:{leave(t,n){r.validateMimeTypeOAS3({type:"produces",value:t},n,e)}},Callback:{Response(){},RequestBody:{leave(t,n){r.validateMimeTypeOAS3({type:"produces",value:t},n,e)}}}},WebhooksMap:{RequestBody:{leave(t,n){r.validateMimeTypeOAS3({type:"produces",value:t},n,e)}}}})},780:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateExample=t.getSuggest=t.validateDefinedAndNonEmpty=t.fieldNonEmpty=t.missingRequiredField=t.matchesJsonSchemaType=t.oasTypeOf=void 0;const r=n(9991),o=n(7468),i=n(7275);function a(e,t){return`${e} object should contain \`${t}\` field.`}function s(e,t){return`${e} object \`${t}\` must be non-empty string.`}t.oasTypeOf=function(e){return Array.isArray(e)?"array":null===e?"null":typeof e},t.matchesJsonSchemaType=function(e,t,n){if(n&&null===e)return null===e;switch(t){case"array":return Array.isArray(e);case"object":return"object"==typeof e&&null!==e&&!Array.isArray(e);case"null":return null===e;case"integer":return Number.isInteger(e);default:return typeof e===t}},t.missingRequiredField=a,t.fieldNonEmpty=s,t.validateDefinedAndNonEmpty=function(e,t,n){"object"==typeof t&&(void 0===t[e]?n.report({message:a(n.type.name,e),location:n.location.child([e]).key()}):t[e]||n.report({message:s(n.type.name,e),location:n.location.child([e]).key()}))},t.getSuggest=function(e,t){if("string"!=typeof e||!t.length)return[];const n=[];for(let o=0;oe.distance-t.distance)),n.map((e=>e.variant))},t.validateExample=function(e,t,n,{resolve:r,location:a,report:s},l){try{const{valid:c,errors:u}=i.validateJsonSchema(e,t,a.child("schema"),n.pointer,r,l);if(!c)for(let e of u)s({message:`Example value must conform to the schema: ${e.message}.`,location:Object.assign(Object.assign({},new o.Location(n.source,e.instancePath)),{reportOnKey:"additionalProperties"===e.keyword}),from:a,suggest:e.suggest})}catch(e){s({message:`Example validation errored: ${e.message}.`,location:a.child("schema"),from:a})}}},5220:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedType=t.normalizeTypes=t.mapOf=t.listOf=void 0,t.listOf=function(e){return{name:`${e}List`,properties:{},items:e}},t.mapOf=function(e){return{name:`${e}Map`,properties:{},additionalProperties:()=>e}},t.normalizeTypes=function(e,t={}){const n={};for(const t of Object.keys(e))n[t]=Object.assign(Object.assign({},e[t]),{name:t});for(const e of Object.values(n))r(e);return n;function r(e){if(e.additionalProperties&&(e.additionalProperties=o(e.additionalProperties)),e.items&&(e.items=o(e.items)),e.properties){const n={};for(const[r,i]of Object.entries(e.properties))n[r]=o(i),t.doNotResolveExamples&&i&&i.isExample&&(n[r]=Object.assign(Object.assign({},i),{resolvable:!1}));e.properties=n}}function o(e){if("string"==typeof e){if(!n[e])throw new Error(`Unknown type name found: ${e}`);return n[e]}return"function"==typeof e?(t,n)=>o(e(t,n)):e&&e.name?(r(e=Object.assign({},e)),e):e&&e.directResolveAs?Object.assign(Object.assign({},e),{directResolveAs:o(e.directResolveAs)}):e}},t.isNamedType=function(e){return"string"==typeof(null==e?void 0:e.name)}},388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas2Types=void 0;const r=n(5220),o=/^[0-9][0-9Xx]{2}$/,i={properties:{swagger:{type:"string"},info:"Info",host:{type:"string"},basePath:{type:"string"},schemes:{type:"array",items:{type:"string"}},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},paths:"PathMap",definitions:"NamedSchemas",parameters:"NamedParameters",responses:"NamedResponses",securityDefinitions:"NamedSecuritySchemes",security:r.listOf("SecurityRequirement"),tags:r.listOf("Tag"),externalDocs:"ExternalDocs"},required:["swagger","paths","info"]},a={properties:{$ref:{type:"string"},parameters:r.listOf("Parameter"),get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation"}},s={properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},parameters:r.listOf("Parameter"),responses:"ResponsesMap",schemes:{type:"array",items:{type:"string"}},deprecated:{type:"boolean"},security:r.listOf("SecurityRequirement"),"x-codeSamples":r.listOf("XCodeSample"),"x-code-samples":r.listOf("XCodeSample")},required:["responses"]},l={properties:{default:"Response"},additionalProperties:(e,t)=>o.test(t)?"Response":void 0},c={properties:{description:{type:"string"},schema:"Schema",headers:r.mapOf("Header"),examples:"Examples"},required:["description"]},u={properties:{format:{type:"string"},title:{type:"string"},description:{type:"string"},default:null,multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{type:"string",enum:["object","array","string","number","integer","boolean","null"]},items:e=>Array.isArray(e)?r.listOf("Schema"):"Schema",allOf:r.listOf("Schema"),properties:"SchemaProperties",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",discriminator:{type:"string"},readOnly:{type:"boolean"},xml:"Xml",externalDocs:"ExternalDocs",example:{isExample:!0}}},p={properties:{type:{enum:["basic","apiKey","oauth2"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header"]},flow:{enum:["implicit","password","application","accessCode"]},authorizationUrl:{type:"string"},tokenUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","scopes"];case"application":case"password":return["type","flow","tokenUrl","scopes"];default:return["type","flow","scopes"]}default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"basic":return["type","description"];case"apiKey":return["type","name","in","description"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","description","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","description","scopes"];case"application":case"password":return["type","flow","tokenUrl","description","scopes"];default:return["type","flow","tokenUrl","authorizationUrl","description","scopes"]}default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas2Types={DefinitionRoot:i,Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs"},required:["name"]},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"]},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},Info:{properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License",version:{type:"string"}},required:["title","version"]},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}}},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"]},PathMap:{properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},PathItem:a,Parameter:{properties:{name:{type:"string"},in:{type:"string",enum:["query","header","path","formData","body"]},description:{type:"string"},required:{type:"boolean"},schema:"Schema",type:{type:"string",enum:["string","number","integer","boolean","array","file"]},format:{type:"string"},allowEmptyValue:{type:"boolean"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&e.in?"body"===e.in?["name","in","schema"]:"array"===e.type?["name","in","type","items"]:["name","in","type"]:["name","in"]},ParameterItems:{properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"]},Operation:s,Examples:{properties:{},additionalProperties:{isExample:!0}},Header:{properties:{description:{type:"string"},type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"]},ResponsesMap:l,Response:c,Schema:u,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}}},SchemaProperties:{properties:{},additionalProperties:"Schema"},NamedSchemas:r.mapOf("Schema"),NamedResponses:r.mapOf("Response"),NamedParameters:r.mapOf("Parameter"),NamedSecuritySchemes:r.mapOf("SecurityScheme"),SecurityScheme:p,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}}}},5241:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3Types=void 0;const r=n(5220),o=n(7468),i=/^[0-9][0-9Xx]{2}$/,a={properties:{openapi:null,info:"Info",servers:r.listOf("Server"),security:r.listOf("SecurityRequirement"),tags:r.listOf("Tag"),externalDocs:"ExternalDocs",paths:"PathMap",components:"Components","x-webhooks":"WebhooksMap"},required:["openapi","paths","info"]},s={properties:{url:{type:"string"},description:{type:"string"},variables:r.mapOf("ServerVariable")},required:["url"]},l={properties:{$ref:{type:"string"},servers:r.listOf("Server"),parameters:r.listOf("Parameter"),summary:{type:"string"},description:{type:"string"},get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation",trace:"Operation"}},c={properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:r.mapOf("Example"),content:"MediaTypeMap"},required:["name","in"],requiredOneOf:["schema","content"]},u={properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:r.listOf("Parameter"),security:r.listOf("SecurityRequirement"),servers:r.listOf("Server"),requestBody:"RequestBody",responses:"ResponsesMap",deprecated:{type:"boolean"},callbacks:r.mapOf("Callback"),"x-codeSamples":r.listOf("XCodeSample"),"x-code-samples":r.listOf("XCodeSample")},required:["responses"]},p={properties:{schema:"Schema",example:{isExample:!0},examples:r.mapOf("Example"),encoding:r.mapOf("Encoding")}},d={properties:{contentType:{type:"string"},headers:r.mapOf("Header"),style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"}}},f={properties:{description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:r.mapOf("Example"),content:"MediaTypeMap"}},h={properties:{default:"Response"},additionalProperties:(e,t)=>i.test(t)?"Response":void 0},m={properties:{description:{type:"string"},headers:r.mapOf("Header"),content:"MediaTypeMap",links:r.mapOf("Link")},required:["description"]},g={properties:{externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number",minimum:0},minLength:{type:"number",minimum:0},pattern:{type:"string"},maxItems:{type:"number",minimum:0},minItems:{type:"number",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"number",minimum:0},minProperties:{type:"number",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{enum:["object","array","string","number","integer","boolean","null"]},allOf:r.listOf("Schema"),anyOf:r.listOf("Schema"),oneOf:r.listOf("Schema"),not:"Schema",properties:"SchemaProperties",items:e=>Array.isArray(e)?r.listOf("Schema"):"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},default:null,nullable:{type:"boolean"},readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",example:{isExample:!0},deprecated:{type:"boolean"}}},y={properties:{},additionalProperties:e=>o.isMappingRef(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},v={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"SecuritySchemeFlows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3Types={DefinitionRoot:a,Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs"},required:["name"]},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"]},Server:s,ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:null},required:["default"]},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License"},required:["title","version"]},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}}},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"]},PathMap:{properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},PathItem:l,Parameter:c,Operation:u,Callback:{properties:{},additionalProperties:"PathItem"},RequestBody:{properties:{description:{type:"string"},required:{type:"boolean"},content:"MediaTypeMap"},required:["content"]},MediaTypeMap:{properties:{},additionalProperties:"MediaType"},MediaType:p,Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}}},Encoding:d,Header:f,ResponsesMap:h,Response:m,Link:{properties:{operationRef:{type:"string"},operationId:{type:"string"},parameters:null,requestBody:null,description:{type:"string"},server:"Server"}},Schema:g,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}}},SchemaProperties:{properties:{},additionalProperties:"Schema"},DiscriminatorMapping:y,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"]},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks"}},NamedSchemas:r.mapOf("Schema"),NamedResponses:r.mapOf("Response"),NamedParameters:r.mapOf("Parameter"),NamedExamples:r.mapOf("Example"),NamedRequestBodies:r.mapOf("RequestBody"),NamedHeaders:r.mapOf("Header"),NamedSecuritySchemes:r.mapOf("SecurityScheme"),NamedLinks:r.mapOf("Link"),NamedCallbacks:r.mapOf("PathItem"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"]},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["authorizationUrl","tokenUrl","scopes"]},SecuritySchemeFlows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"}},SecurityScheme:v,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},WebhooksMap:{properties:{},additionalProperties:()=>"PathItem"}}},2608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3_1Types=void 0;const r=n(5220),o=n(5241),i={properties:{openapi:null,info:"Info",servers:r.listOf("Server"),security:r.listOf("SecurityRequirement"),tags:r.listOf("Tag"),externalDocs:"ExternalDocs",paths:"PathMap",webhooks:"WebhooksMap",components:"Components",jsonSchemaDialect:{type:"string"}},required:["openapi","info"],requiredOneOf:["paths","components","webhooks"]},a={properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:r.listOf("Parameter"),security:r.listOf("SecurityRequirement"),servers:r.listOf("Server"),requestBody:"RequestBody",responses:"ResponsesMap",deprecated:{type:"boolean"},callbacks:r.mapOf("Callback"),"x-codeSamples":r.listOf("XCodeSample"),"x-code-samples":r.listOf("XCodeSample")}},s={properties:{$id:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",myArbitraryKeyword:{type:"boolean"},title:{type:"string"},multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:r.listOf("Schema"),anyOf:r.listOf("Schema"),oneOf:r.listOf("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:r.listOf("Schema"),prefixItems:r.listOf("Schema"),contains:"Schema",patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>Array.isArray(e)?r.listOf("Schema"):"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"}}},l={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect","mutualTLS"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"SecuritySchemeFlows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":switch(null==e?void 0:e.flows){case"implicit":return["type","flows","authorizationUrl","refreshUrl","description","scopes"];case"password":case"clientCredentials":return["type","flows","tokenUrl","refreshUrl","description","scopes"];case"authorizationCode":default:return["type","flows","authorizationUrl","refreshUrl","tokenUrl","description","scopes"]}case"openIdConnect":return["type","openIdConnectUrl","description"];case"mutualTLS":default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3_1Types=Object.assign(Object.assign({},o.Oas3Types),{Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},summary:{type:"string"},contact:"Contact",license:"License"},required:["title","version"]},DefinitionRoot:i,Schema:s,License:{properties:{name:{type:"string"},url:{type:"string"},identifier:{type:"string"}},required:["name"]},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks",pathItems:"NamedPathItems"}},NamedPathItems:r.mapOf("PathItem"),SecurityScheme:l,Operation:a})},771:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.assignExisting=t.isNotString=t.isString=t.isNotEmptyObject=t.slash=t.isPathParameter=t.readFileAsStringSync=t.isSingular=t.validateMimeTypeOAS3=t.validateMimeType=t.splitCamelCaseIntoWords=t.omitObjectProps=t.pickObjectProps=t.readFileFromUrl=t.isEmptyArray=t.isEmptyObject=t.isPlainObject=t.notUndefined=t.loadYaml=t.popStack=t.pushStack=t.stringifyYaml=t.parseYaml=void 0;const o=n(3197),i=n(4099),a=n(7707),s=n(3450),l=n(5273),c=n(8698);var u=n(5273);function p(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function d(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),i(e,t)}function f(e){return"string"==typeof e}Object.defineProperty(t,"parseYaml",{enumerable:!0,get:function(){return u.parseYaml}}),Object.defineProperty(t,"stringifyYaml",{enumerable:!0,get:function(){return u.stringifyYaml}}),t.pushStack=function(e,t){return{prev:e,value:t}},t.popStack=function(e){var t;return null!==(t=null==e?void 0:e.prev)&&void 0!==t?t:null},t.loadYaml=function(e){return r(this,void 0,void 0,(function*(){const t=yield o.promises.readFile(e,"utf-8");return l.parseYaml(t)}))},t.notUndefined=function(e){return void 0!==e},t.isPlainObject=p,t.isEmptyObject=function(e){return p(e)&&0===Object.keys(e).length},t.isEmptyArray=function(e){return Array.isArray(e)&&0===e.length},t.readFileFromUrl=function(e,t){return r(this,void 0,void 0,(function*(){const n={};for(const r of t.headers)d(e,r.matches)&&(n[r.name]=void 0!==r.envVariable?c.env[r.envVariable]||"":r.value);const r=yield(t.customFetch||a.default)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:yield r.text(),mimeType:r.headers.get("content-type")}}))},t.pickObjectProps=function(e,t){return Object.fromEntries(t.filter((t=>t in e)).map((t=>[t,e[t]])))},t.omitObjectProps=function(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))},t.splitCamelCaseIntoWords=function(e){const t=e.split(/(?:[-._])|([A-Z][a-z]+)/).filter(Boolean).map((e=>e.toLocaleLowerCase())),n=e.split(/([A-Z]{2,})/).filter((e=>e&&e===e.toUpperCase())).map((e=>e.toLocaleLowerCase()));return new Set([...t,...n])},t.validateMimeType=function({type:e,value:t},{report:n,location:r},o){if(!o)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t[e])for(const i of t[e])o.includes(i)||n({message:`Mime type "${i}" is not allowed`,location:r.child(t[e].indexOf(i)).key()})},t.validateMimeTypeOAS3=function({type:e,value:t},{report:n,location:r},o){if(!o)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t.content)for(const e of Object.keys(t.content))o.includes(e)||n({message:`Mime type "${e}" is not allowed`,location:r.child("content").child(e).key()})},t.isSingular=function(e){return s.isSingular(e)},t.readFileAsStringSync=function(e){return o.readFileSync(e,"utf-8")},t.isPathParameter=function(e){return e.startsWith("{")&&e.endsWith("}")},t.slash=function(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")},t.isNotEmptyObject=function(e){return!!e&&Object.keys(e).length>0},t.isString=f,t.isNotString=function(e){return!f(e)},t.assignExisting=function(e,t){for(let n of Object.keys(t))e.hasOwnProperty(n)&&(e[n]=t[n])}},8065:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVisitors=void 0,t.normalizeVisitors=function(e,t){const n={any:{enter:[],leave:[]}};for(const e of Object.keys(t))n[e]={enter:[],leave:[]};n.ref={enter:[],leave:[]};for(const{ruleId:t,severity:n,visitor:r}of e)o({ruleId:t,severity:n},r,null);for(const e of Object.keys(n))n[e].enter.sort(((e,t)=>t.depth-e.depth)),n[e].leave.sort(((e,t)=>e.depth-t.depth));return n;function r(e,t,o,i,a=[]){if(a.includes(t))return;a=[...a,t];const s=new Set;for(let n of Object.values(t.properties))n!==o?"object"==typeof n&&null!==n&&n.name&&s.add(n):l(e,a);t.additionalProperties&&"function"!=typeof t.additionalProperties&&(t.additionalProperties===o?l(e,a):void 0!==t.additionalProperties.name&&s.add(t.additionalProperties)),t.items&&(t.items===o?l(e,a):void 0!==t.items.name&&s.add(t.items));for(let t of Array.from(s.values()))r(e,t,o,i,a);function l(e,t){for(const r of t.slice(1))n[r.name]=n[r.name]||{enter:[],leave:[]},n[r.name].enter.push(Object.assign(Object.assign({},e),{visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:i}}))}}function o(e,i,a,s=0){const l=Object.keys(t);if(0===s)l.push("any"),l.push("ref");else{if(i.any)throw new Error("any() is allowed only on top level");if(i.ref)throw new Error("ref() is allowed only on top level")}for(const c of l){const l=i[c],u=n[c];if(!l)continue;let p,d,f;const h="object"==typeof l;if("ref"===c&&h&&l.skip)throw new Error("ref() visitor does not support skip");"function"==typeof l?p=l:h&&(p=l.enter,d=l.leave,f=l.skip);const m={activatedOn:null,type:t[c],parent:a,isSkippedLevel:!1};if("object"==typeof l&&o(e,l,m,s+1),a&&r(e,a.type,t[c],a),p||h){if(p&&"function"!=typeof p)throw new Error("DEV: should be function");u.enter.push(Object.assign(Object.assign({},e),{visit:p||(()=>{}),skip:f,depth:s,context:m}))}if(d){if("function"!=typeof d)throw new Error("DEV: should be function");u.leave.push(Object.assign(Object.assign({},e),{visit:d,depth:s,context:m}))}}}}},9443:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkDocument=void 0;const r=n(7468),o=n(4182),i=n(771),a=n(5220);function s(e){var t,n;const r={};for(;e.parent;)(null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.location)&&(r[e.parent.type.name]=null===(n=e.parent.activatedOn)||void 0===n?void 0:n.value.location),e=e.parent;return r}t.walkDocument=function(e){const{document:t,rootType:n,normalizedVisitors:l,resolvedRefMap:c,ctx:u}=e,p={},d=new Set;!function e(t,n,f,h,m){var g,y,v,b,w,x,k,_,O,S,E;let P=f;const{node:A,location:$,error:R}=T(t),C=new Set;if(r.isRef(t)){const e=l.ref.enter;for(const{visit:r,ruleId:o,severity:i,context:a}of e)if(!d.has(t)){C.add(a);r(t,{report:I.bind(void 0,o,i),resolve:T,location:f,type:n,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:N.bind(void 0,o)},{node:A,location:$,error:R}),(null==$?void 0:$.source.absoluteRef)&&u.refTypes&&u.refTypes.set(null==$?void 0:$.source.absoluteRef,n)}}if(void 0!==A&&$&&"scalar"!==n.name){P=$;const o=null===(y=null===(g=p[n.name])||void 0===g?void 0:g.has)||void 0===y?void 0:y.call(g,A);let s=!1;const c=l.any.enter.concat((null===(v=l[n.name])||void 0===v?void 0:v.enter)||[]),u=[];for(const{context:e,visit:r,skip:a,ruleId:l,severity:p}of c)if(e.isSkippedLevel)!e.parent.activatedOn||e.parent.activatedOn.value.nextLevelTypeActivated||e.seen.has(t)||(e.seen.add(t),s=!0,u.push(e));else if(e.parent&&e.parent.activatedOn&&(null===(b=e.activatedOn)||void 0===b?void 0:b.value.withParentNode)!==e.parent.activatedOn.value.node&&(null===(w=e.parent.activatedOn.value.nextLevelTypeActivated)||void 0===w?void 0:w.value)!==n||!e.parent&&!o){u.push(e);const t={node:A,location:$,nextLevelTypeActivated:null,withParentNode:null===(k=null===(x=e.parent)||void 0===x?void 0:x.activatedOn)||void 0===k?void 0:k.value.node,skipped:null!==(S=(null===(O=null===(_=e.parent)||void 0===_?void 0:_.activatedOn)||void 0===O?void 0:O.value.skipped)||(null==a?void 0:a(A,m)))&&void 0!==S&&S};e.activatedOn=i.pushStack(e.activatedOn,t);let o=e.parent;for(;o;)o.activatedOn.value.nextLevelTypeActivated=i.pushStack(o.activatedOn.value.nextLevelTypeActivated,n),o=o.parent;if(!t.skipped){s=!0,C.add(e);const{ignoreNextVisitorsOnNode:t}=j(r,A,e,l,p);if(t)break}}if(s||!o)if(p[n.name]=p[n.name]||new Set,p[n.name].add(A),Array.isArray(A)){const t=n.items;if(void 0!==t)for(let n=0;n!o.includes(e)))),r.isRef(t)&&o.push(...Object.keys(t).filter((e=>"$ref"!==e&&!o.includes(e))));for(const i of o){let o=A[i],s=$;void 0===o&&(o=t[i],s=f);let l=n.properties[i];void 0===l&&(l=n.additionalProperties),"function"==typeof l&&(l=l(o,i)),!a.isNamedType(l)&&(null==l?void 0:l.directResolveAs)&&(l=l.directResolveAs,o={$ref:o}),l&&void 0===l.name&&!1!==l.resolvable&&(l={name:"scalar",properties:{}}),a.isNamedType(l)&&("scalar"!==l.name||r.isRef(o))&&e(o,l,s.child([i]),A,i)}}const d=l.any.leave,h=((null===(E=l[n.name])||void 0===E?void 0:E.leave)||[]).concat(d);for(const e of u.reverse())if(e.isSkippedLevel)e.seen.delete(A);else if(e.activatedOn=i.popStack(e.activatedOn),e.parent){let t=e.parent;for(;t;)t.activatedOn.value.nextLevelTypeActivated=i.popStack(t.activatedOn.value.nextLevelTypeActivated),t=t.parent}for(const{context:e,visit:t,ruleId:n,severity:r}of h)!e.isSkippedLevel&&C.has(e)&&j(t,A,e,n,r)}if(P=f,r.isRef(t)){const e=l.ref.leave;for(const{visit:r,ruleId:o,severity:i,context:a}of e)if(C.has(a)){r(t,{report:I.bind(void 0,o,i),resolve:T,location:f,type:n,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:N.bind(void 0,o)},{node:A,location:$,error:R})}}function j(e,t,r,o,i){const a=I.bind(void 0,o,i);let l=!1;return e(t,{report:a,resolve:T,location:P,type:n,parent:h,key:m,parentLocations:s(r),oasVersion:u.oasVersion,ignoreNextVisitorsOnNode:()=>{l=!0},getVisitorData:N.bind(void 0,o)},function(e){var t;const n={};for(;e.parent;)n[e.parent.type.name]=null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.node,e=e.parent;return n}(r),r),{ignoreNextVisitorsOnNode:l}}function T(e,t=P.source.absoluteRef){if(!r.isRef(e))return{location:f,node:e};const n=o.makeRefId(t,e.$ref),i=c.get(n);if(!i)return{location:void 0,node:void 0};const{resolved:a,node:s,document:l,nodePointer:u,error:p}=i;return{location:a?new r.Location(l.source,u):p instanceof o.YamlParseError?new r.Location(p.source,""):void 0,node:s,error:p}}function I(e,t,n){const r=n.location?Array.isArray(n.location)?n.location:[n.location]:[Object.assign(Object.assign({},P),{reportOnKey:!1})];u.problems.push(Object.assign(Object.assign({ruleId:n.ruleId||e,severity:n.forceSeverity||t},n),{suggest:n.suggest||[],location:r.map((e=>Object.assign(Object.assign(Object.assign({},P),{reportOnKey:!1}),e)))}))}function N(e){return u.visitorsData[e]=u.visitorsData[e]||{},u.visitorsData[e]}}(t.parsed,n,new r.Location(t.source,"#/"),void 0,"")}},5019:function(e,t,n){var r=n(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(o).split("\\{").join(i).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(u)):[]};var o="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(o).join("\\").split(i).join("{").split(a).join("}").split(s).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var o=n.pre,i=n.body,a=n.post,s=o.split(",");s[s.length-1]+="{"+i+"}";var l=p(a);return a.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function d(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function m(e,t){return e>=t}function g(e,t){var n=[],o=r("{","}",e);if(!o)return[e];var i=o.pre,s=o.post.length?g(o.post,!1):[""];if(/\$$/.test(o.pre))for(var l=0;l=0;if(!x&&!k)return o.post.match(/,.*\}/)?g(e=o.pre+"{"+o.body+a+o.post):[e];if(x)y=o.body.split(/\.\./);else if(1===(y=p(o.body)).length&&1===(y=g(y[0],!1).map(d)).length)return s.map((function(e){return o.pre+y[0]+e}));if(x){var _=c(y[0]),O=c(y[1]),S=Math.max(y[0].length,y[1].length),E=3==y.length?Math.abs(c(y[2])):1,P=h;O<_&&(E*=-1,P=m);var A=y.some(f);v=[];for(var $=_;P($,O);$+=E){var R;if(w)"\\"===(R=String.fromCharCode($))&&(R="");else if(R=String($),A){var C=S-R.length;if(C>0){var j=new Array(C+1).join("0");R=$<0?"-"+j+R.slice(1):j+R}}v.push(R)}}else{v=[];for(var T=0;T(g(t),!(!n.nocomment&&"#"===t.charAt(0))&&new v(t,n).match(e));e.exports=r;const o=n(5751);r.sep=o.sep;const i=Symbol("globstar **");r.GLOBSTAR=i;const a=n(5019),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},l="[^/]",c="[^/]*?",u=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),p=u("().*{}+?[]^$\\!"),d=u("[.("),f=/\/+/;r.filter=(e,t={})=>(n,o,i)=>r(n,e,t);const h=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};r.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return r;const t=r,n=(n,r,o)=>t(n,r,h(e,o));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,h(e,n))}}).defaults=n=>t.defaults(h(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,h(e,r)),n.defaults=n=>t.defaults(h(e,n)),n.makeRe=(n,r)=>t.makeRe(n,h(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,h(e,r)),n.match=(n,r,o)=>t.match(n,r,h(e,o)),n},r.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(g(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:a(e)),g=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");r.makeRe=(e,t)=>new v(e,t||{}).makeRe(),r.match=(e,t,n={})=>{const r=new v(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};class v{constructor(e,t){g(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(f))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r>> no match, partial?",e,d,t,f),d!==s))}if("string"==typeof u?(c=p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(o===s&&a===l)return!0;if(o===s)return n;if(a===l)return o===s-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return m(this.pattern,this.options)}parse(e,t){g(e);const n=this.options;if("**"===e){if(!n.noglobstar)return i;e="*"}if(""===e)return"";let r="",o=!!n.nocase,a=!1;const u=[],f=[];let h,m,v,b,w=!1,x=-1,k=-1;const _="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",O=()=>{if(h){switch(h){case"*":r+=c,o=!0;break;case"?":r+=l,o=!0;break;default:r+="\\"+h}this.debug("clearStateChar %j %j",h,r),h=!1}};for(let t,i=0;i(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,v,r);const t="*"===v.type?c:"?"===v.type?l:"\\"+v.type;o=!0,r=r.slice(0,v.reStart)+t+"\\("+e}O(),a&&(r+="\\\\");const S=d[r.charAt(0)];for(let e=f.length-1;e>-1;e--){const n=f[e],o=r.slice(0,n.reStart),i=r.slice(n.reStart,n.reEnd-8);let a=r.slice(n.reEnd);const s=r.slice(n.reEnd-8,n.reEnd)+a,l=o.split("(").length-1;let c=a;for(let e=0;e((e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===i?i:e._src)).reduce(((e,t)=>(e[e.length-1]===i&&t===i||e.push(t),e)),[])).forEach(((t,r)=>{t===i&&e[r-1]!==i&&(0===r?e.length>1?e[r+1]="(?:\\/|"+n+"\\/)?"+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+="(?:\\/|"+n+")?":(e[r-1]+="(?:\\/|\\/"+n+"\\/)"+e[r+1],e[r+1]=i))})),e.filter((e=>e!==i)).join("/")))).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==o.sep&&(e=e.split(o.sep).join("/")),e=e.split(f),this.debug(this.pattern,"split",e);const r=this.set;let i;this.debug(this.pattern,"set",r);for(let t=e.length-1;t>=0&&(i=e[t],!i);t--);for(let o=0;o=0&&c>0){if(e===t)return[l,c];for(r=[],i=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?s=[r.pop(),c]:((o=r.pop())=0?l:c;r.length&&(s=[i,a])}return s}e.exports=t,t.range=r},4480:function(e,t,n){"use strict";var r=n.g.process&&process.nextTick||n.g.setImmediate||function(e){setTimeout(e,0)};e.exports=function(e,t){return e?void t.then((function(t){r((function(){e(null,t)}))}),(function(t){r((function(){e(t)}))})):t}},4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;ti=>n?e+(~(i+="").indexOf(t,4)?i.replace(r,o):i)+t:i,o=(e,t)=>r(`[${e}m`,`[${t}m`,new RegExp(`\\x1b\\[${t}m`,"g"),`[${e}m`);t.options=Object.defineProperty({},"enabled",{get:()=>n,set:e=>n=e}),t.reset=o(0,0),t.bold=r("","",/\x1b\[22m/g,""),t.dim=r("","",/\x1b\[22m/g,""),t.italic=o(3,23),t.underline=o(4,24),t.inverse=o(7,27),t.hidden=o(8,28),t.strikethrough=o(9,29),t.black=o(30,39),t.red=o(31,39),t.green=o(32,39),t.yellow=o(33,39),t.blue=o(34,39),t.magenta=o(35,39),t.cyan=o(36,39),t.white=o(37,39),t.gray=o(90,39),t.bgBlack=o(40,49),t.bgRed=o(41,49),t.bgGreen=o(42,49),t.bgYellow=o(43,49),t.bgBlue=o(44,49),t.bgMagenta=o(45,49),t.bgCyan=o(46,49),t.bgWhite=o(47,49),t.blackBright=o(90,39),t.redBright=o(91,39),t.greenBright=o(92,39),t.yellowBright=o(93,39),t.blueBright=o(94,39),t.magentaBright=o(95,39),t.cyanBright=o(96,39),t.whiteBright=o(97,39),t.bgBlackBright=o(100,49),t.bgRedBright=o(101,49),t.bgGreenBright=o(102,49),t.bgYellowBright=o(103,49),t.bgBlueBright=o(104,49),t.bgMagentaBright=o(105,49),t.bgCyanBright=o(106,49),t.bgWhiteBright=o(107,49)},9266:function(e,t,n){n(2222),n(1539),n(2526),n(2443),n(1817),n(2401),n(8722),n(2165),n(9007),n(6066),n(3510),n(1840),n(6982),n(2159),n(6649),n(9341),n(543),n(3706),n(408),n(1299);var r=n(857);e.exports=r.Symbol},3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},1318:function(e,t,n){var r=n(5656),o=n(7466),i=n(1400),a=function(e){return function(t,n,a){var s,l=r(t),c=o(l.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),o=n(8361),i=n(7908),a=n(7466),s=n(5417),l=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,p=6==e,d=7==e,f=5==e||p;return function(h,m,g,y){for(var v,b,w=i(h),x=o(w),k=r(m,g,3),_=a(x.length),O=0,S=y||s,E=t?S(h,_):n||d?S(h,0):void 0;_>O;O++)if((f||O in x)&&(b=k(v=x[O],O,w),e))if(t)E[O]=b;else if(b)switch(e){case 3:return!0;case 5:return v;case 6:return O;case 2:l.call(E,v)}else switch(e){case 4:return!1;case 7:l.call(E,v)}return p?-1:c||u?u:E}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},1194:function(e,t,n){var r=n(7293),o=n(5112),i=n(7392),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},5417:function(e,t,n){var r=n(111),o=n(3157),i=n(5112)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),o=n(4326),i=n(5112)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),o=n(3887),i=n(1236),a=n(3070);e.exports=function(e,t){for(var n=o(t),s=a.f,l=i.f,c=0;c=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),o=n(1236).f,i=n(8880),a=n(1320),s=n(3505),l=n(9920),c=n(4705);e.exports=function(e,t){var n,u,p,d,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(u in t){if(d=t[u],p=e.noTargetGet?(f=o(n,u))&&f.value:n[u],!c(m?u:h+(g?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;l(d,p)}(e.sham||p&&p.sham)&&i(d,"sham",!0),a(n,u,d,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},5005:function(e,t,n){var r=n(857),o=n(7854),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e,t,n){var r=n(7908),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},3501:function(e){e.exports={}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),o=n(7293),i=n(317);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(e,t,n){var r=n(7293),o=n(4326),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},2788:function(e,t,n){var r=n(5465),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,o,i,a=n(8536),s=n(7854),l=n(111),c=n(8880),u=n(6656),p=n(5465),d=n(6200),f=n(3501),h="Object already initialized",m=s.WeakMap;if(a||p.state){var g=p.state||(p.state=new m),y=g.get,v=g.has,b=g.set;r=function(e,t){if(v.call(g,e))throw new TypeError(h);return t.facade=e,b.call(g,e,t),t},o=function(e){return y.call(g,e)||{}},i=function(e){return v.call(g,e)}}else{var w=d("state");f[w]=!0,r=function(e,t){if(u(e,w))throw new TypeError(h);return t.facade=e,c(e,w,t),t},o=function(e){return u(e,w)?e[w]:{}},i=function(e){return u(e,w)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},133:function(e,t,n){var r=n(7392),o=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:function(e,t,n){var r=n(7854),o=n(2788),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},30:function(e,t,n){var r,o=n(9670),i=n(6048),a=n(748),s=n(3501),l=n(490),c=n(317),u=n(6200)("IE_PROTO"),p=function(){},d=function(e){return" -{% else %} - -{% endif %} - - - - - - - diff --git a/cookbook/templates/no_space_info.html b/cookbook/templates/no_space_info.html deleted file mode 100644 index 980ce68c..00000000 --- a/cookbook/templates/no_space_info.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends "base.html" %} -{% load crispy_forms_filters %} -{% load static %} -{% load i18n %} - -{% block title %}{% trans "No Space" %}{% endblock %} - - -{% block content %} - -
- -

{% trans 'No Space' %}

- -
-
- {% trans 'Recipes, foods, shopping lists and more are organized in spaces of one or more people.' %} - {% trans 'You can either be invited into an existing space or create your own one.' %} -
-
- - -
-
- -
- - -
-
- {% trans 'Join Space' %} -
-
-
{% trans 'Join an existing space.' %}
-

{% trans 'To join an existing space either enter your invite token or click on the invite link the space owner send you.' %}

- -
- {% csrf_token %} - {{ join_form | crispy }} - -
- -
-
- -
-
- {% trans 'Create Space' %} -
-
-
{% trans 'Create your own recipe space.' %}
-

{% trans 'Start your own recipe space and invite other users to it.' %}

-
- {% csrf_token %} - {{ create_form | crispy }} - -
-
-
- - -
-
- -
- -
- -{% endblock %} - diff --git a/cookbook/templates/space.html b/cookbook/templates/space.html deleted file mode 100644 index 67bc354a..00000000 --- a/cookbook/templates/space.html +++ /dev/null @@ -1,186 +0,0 @@ -{% extends "base.html" %} -{% load django_tables2 %} -{% load crispy_forms_tags %} -{% load crispy_forms_filters %} -{% load static %} -{% load i18n %} - -{%block title %} {% trans "Space Settings" %} {% endblock %} - -{% block extra_head %} - {{ form.media }} - {{ space_form.media }} - {% include 'include/vue_base.html' %} -{% endblock %} - -{% block content %} - - - -

- {% trans 'Space:' %} {{ request.space.name }} - {% if HOSTED %} {% trans 'Manage Subscription' %}{% endif %} -

- -
- -
-
-
-
{% trans 'Number of objects' %}
-
    -
  • - {% trans 'Recipes' %} : - {{ counts.recipes }} / {% if request.space.max_recipes > 0 %} {{ request.space.max_recipes }}{% else %}∞{% endif %} -
  • -
  • - {% trans 'Keywords' %} : {{ counts.keywords }} -
  • -
  • - {% trans 'Units' %} : {{ counts.units }} -
  • -
  • - {% trans 'Ingredients' %} : - {{ counts.ingredients }} -
  • -
  • - {% trans 'Recipe Imports' %} : - {{ counts.recipe_import }} -
  • -
-
-
-
-
-
{% trans 'Objects stats' %}
-
    -
  • - {% trans 'Recipes without Keywords' %} : - {{ counts.recipes_no_keyword }} -
  • -
  • - {% trans 'External Recipes' %} : - {{ counts.recipes_external }} -
  • -
  • - {% trans 'Internal Recipes' %} : - {{ counts.recipes_internal }} -
  • -
  • - {% trans 'Comments' %} : {{ counts.comments }} -
  • -
-
-
-
-
-
-
{% csrf_token %} {{ user_name_form|crispy }}
-
-
-

- {% trans 'Members' %} - {{ space_users|length }}/{% if request.space.max_users > 0 %} {{ request.space.max_users }}{% else %}∞{% endif %} - - {% trans 'Invite User' %} -

-
-
-
- -
-
- {% if space_users %} - - - - - - - {% for u in space_users %} - - - - - - {% endfor %} -
{% trans 'User' %}{% trans 'Groups' %}{% trans 'Edit' %}
{{ u.user.username }}{{ u.user.groups.all |join:", " }} - {% if u.user != request.user %} -
- - - {% trans 'Update' %} - -
- {% else %} {% trans 'You cannot edit yourself.' %} {% endif %} -
- {% else %} -

{% trans 'There are no members in your space yet!' %}

- {% endif %} -
-
- -
-
-

{% trans 'Invite Links' %}

- {% render_table invite_links %} -
-
-
- -
-

{% trans 'Space Settings' %}

-
- {% csrf_token %} - {{ space_form|crispy }} - -
-
-
- -
-
-
- -{% endblock %} {% block script %} - - - -{% endblock %} diff --git a/cookbook/templates/space_manage.html b/cookbook/templates/space_manage.html new file mode 100644 index 00000000..52db3f4e --- /dev/null +++ b/cookbook/templates/space_manage.html @@ -0,0 +1,55 @@ +{% extends "base.html" %} +{% load render_bundle from webpack_loader %} +{% load static %} +{% load i18n %} +{% load l10n %} + +{% block title %}{% trans 'Search' %}{% endblock %} + +{% block content %} + +
+ + + +
+ +
+
+

+ {% trans 'Space:' %} {{ request.space.name }} + {% if HOSTED %} {% trans 'Manage Subscription' %} + {% endif %} +

+
+ +
+ +
+ +
+ + +{% endblock %} + + +{% block script %} + {% if debug %} + + {% else %} + + {% endif %} + + + + {% render_bundle 'space_manage_view' %} +{% endblock %} \ No newline at end of file diff --git a/cookbook/templates/space_overview.html b/cookbook/templates/space_overview.html new file mode 100644 index 00000000..0966cc76 --- /dev/null +++ b/cookbook/templates/space_overview.html @@ -0,0 +1,111 @@ +{% extends "base.html" %} +{% load crispy_forms_filters %} +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Overview" %}{% endblock %} + + +{% block content %} + +
+ +

{% trans 'Space' %}

+ +
+
+ {% trans 'Recipes, foods, shopping lists and more are organized in spaces of one or more people.' %} + {% trans 'You can either be invited into an existing space or create your own one.' %} +
+
+ + {% if request.user.userspace_set.all|length > 0 %} +
+
+
{% trans 'Your Spaces' %}
+
+
+ +
+
+
+ {% for us in request.user.userspace_set.all %} + +
+
+
{{ us.space.name }} +
+{# {% if us.active %}#} +{# #} +{# {% else %}#} +{# #} +{# {% endif %}#} +

{% trans 'Owner' %}: {{ us.space.created_by }} + {% if us.space.created_by != us.user %} +

{% trans 'Leave Space' %} + {% endif %} + +

+
+
+ {% endfor %} +
+
+ +
+ {% endif %} + +
+
+ +
+ + +
+
+ {% trans 'Join Space' %} +
+
+
{% trans 'Join an existing space.' %}
+

{% trans 'To join an existing space either enter your invite token or click on the invite link the space owner send you.' %}

+ +
+ {% csrf_token %} + {{ join_form | crispy }} + +
+ +
+
+ +
+
+ {% trans 'Create Space' %} +
+
+
{% trans 'Create your own recipe space.' %}
+

{% trans 'Start your own recipe space and invite other users to it.' %}

+
+ {% csrf_token %} + {{ create_form | crispy }} + +
+
+
+ + +
+
+ +
+ +
+ +{% endblock %} + diff --git a/cookbook/templatetags/custom_tags.py b/cookbook/templatetags/custom_tags.py index 7f09613b..e76dc09a 100644 --- a/cookbook/templatetags/custom_tags.py +++ b/cookbook/templatetags/custom_tags.py @@ -111,8 +111,12 @@ def page_help(page_name): @register.simple_tag -def message_of_the_day(): - return Space.objects.first().message +def message_of_the_day(request): + try: + if request.space.message: + return request.space.message + except (AttributeError, KeyError, ValueError): + pass @register.simple_tag @@ -163,8 +167,7 @@ def base_path(request, path_type): @register.simple_tag def user_prefs(request): - from cookbook.serializer import \ - UserPreferenceSerializer # putting it with imports caused circular execution + from cookbook.serializer import UserPreferenceSerializer # putting it with imports caused circular execution try: return UserPreferenceSerializer(request.user.userpreference, context={'request': request}).data except AttributeError: diff --git a/cookbook/tests/api/test_api_invitelinke.py b/cookbook/tests/api/test_api_invitelinke.py new file mode 100644 index 00000000..0c228e84 --- /dev/null +++ b/cookbook/tests/api/test_api_invitelinke.py @@ -0,0 +1,119 @@ +import json + +import pytest +from django.contrib import auth +from django.db.models import OuterRef, Subquery +from django.urls import reverse +from django_scopes import scopes_disabled + +from cookbook.models import Ingredient, Step, InviteLink + +LIST_URL = 'api:invitelink-list' +DETAIL_URL = 'api:invitelink-detail' + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403, 0], + ['g1_s1', 403, 0], + ['u1_s1', 403, 0], + ['a1_s1', 200, 1], + ['a2_s1', 200, 0], +]) +def test_list_permission(arg, request, space_1, g1_s1, u1_s1, a1_s1): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + InviteLink.objects.create(group_id=1, created_by=auth.get_user(a1_s1), space=space_1) + + c = request.getfixturevalue(arg[0]) + result = c.get(reverse(LIST_URL)) + assert result.status_code == arg[1] + if arg[1] == 200: + assert len(json.loads(result.content)) == arg[2] + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 403], + ['u1_s1', 403], + ['a1_s1', 200], + ['g1_s2', 403], + ['u1_s2', 403], + ['a1_s2', 404], +]) +def test_update(arg, request, space_1, u1_s1, a1_s1): + with scopes_disabled(): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + + il = InviteLink.objects.create(group_id=1, created_by=auth.get_user(a1_s1), space=space_1) + + c = request.getfixturevalue(arg[0]) + r = c.patch( + reverse( + DETAIL_URL, + args={il.id} + ), + {'email': 'test@mail.de'}, + content_type='application/json' + ) + response = json.loads(r.content) + print(response) + assert r.status_code == arg[1] + if r.status_code == 200: + assert response['email'] == 'test@mail.de' + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 403], + ['u1_s1', 403], + ['a1_s1', 201], + ['a2_s1', 403], +]) +def test_add(arg, request, a1_s1, space_1): + with scopes_disabled(): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + c = request.getfixturevalue(arg[0]) + r = c.post( + reverse(LIST_URL), + {'group': {'id': 3, 'name': 'admin'}}, + content_type='application/json' + ) + print(r.content) + assert r.status_code == arg[1] + + +def test_delete(u1_s1, u1_s2, a1_s1, a2_s1, space_1): + with scopes_disabled(): + il = InviteLink.objects.create(group_id=1, created_by=auth.get_user(a1_s1), space=space_1) + + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + + # user cant delete + r = u1_s1.delete( + reverse( + DETAIL_URL, + args={il.id} + ) + ) + assert r.status_code == 403 + + # admin cant delete + r = a2_s1.delete( + reverse( + DETAIL_URL, + args={il.id} + ) + ) + assert r.status_code == 404 + + # owner can delete + r = a1_s1.delete( + reverse( + DETAIL_URL, + args={il.id} + ) + ) + assert r.status_code == 204 diff --git a/cookbook/tests/api/test_api_related_recipe.py b/cookbook/tests/api/test_api_related_recipe.py index 1a381ed5..08c56cf7 100644 --- a/cookbook/tests/api/test_api_related_recipe.py +++ b/cookbook/tests/api/test_api_related_recipe.py @@ -56,9 +56,9 @@ def test_get_related_recipes(request, arg, recipe, related_count, u1_s1, space_2 ({'steps__food_recipe_count': {'step': 0, 'count': 1}}), # shopping list from recipe with food recipe ({'steps__food_recipe_count': {'step': 0, 'count': 1}, 'steps__recipe_count': 1}), # shopping list from recipe with StepRecipe and food recipe ], indirect=['recipe']) -def test_related_mixed_space(request, recipe, u1_s2): +def test_related_mixed_space(request, recipe, u1_s2, space_2): with scopes_disabled(): - recipe.space = auth.get_user(u1_s2).userpreference.space + recipe.space = space_2 recipe.save() assert len(json.loads( u1_s2.get( diff --git a/cookbook/tests/api/test_api_shopping_list_entryv2.py b/cookbook/tests/api/test_api_shopping_list_entryv2.py index 0a8e35de..6f60a64d 100644 --- a/cookbook/tests/api/test_api_shopping_list_entryv2.py +++ b/cookbook/tests/api/test_api_shopping_list_entryv2.py @@ -32,7 +32,7 @@ def sle_2(request): u = request.getfixturevalue(params.get('user', 'u1_s1')) user = auth.get_user(u) count = params.get('count', 10) - return ShoppingListEntryFactory.create_batch(count, space=user.userpreference.space, created_by=user) + return ShoppingListEntryFactory.create_batch(count, space=user.userspace_set.filter(active=1).first().space, created_by=user) @ pytest.mark.parametrize("arg", [ diff --git a/cookbook/tests/api/test_api_shopping_recipe.py b/cookbook/tests/api/test_api_shopping_recipe.py index bbf3cb8f..376f5fef 100644 --- a/cookbook/tests/api/test_api_shopping_recipe.py +++ b/cookbook/tests/api/test_api_shopping_recipe.py @@ -204,11 +204,11 @@ def test_shopping_recipe_userpreference(recipe, sle_count, use_mealplan, user2): assert len(json.loads(user2.get(reverse(SHOPPING_LIST_URL)).content)) == sle_count[1] -def test_shopping_recipe_mixed_authors(u1_s1, u2_s1): +def test_shopping_recipe_mixed_authors(u1_s1, u2_s1,space_1): with scopes_disabled(): user1 = auth.get_user(u1_s1) user2 = auth.get_user(u2_s1) - space = user1.userpreference.space + space = space_1 user3 = UserFactory(space=space) recipe1 = RecipeFactory(created_by=user1, space=space) recipe2 = RecipeFactory(created_by=user2, space=space) diff --git a/cookbook/tests/api/test_api_space.py b/cookbook/tests/api/test_api_space.py new file mode 100644 index 00000000..bd9e326d --- /dev/null +++ b/cookbook/tests/api/test_api_space.py @@ -0,0 +1,102 @@ +import json + +import pytest +from django.contrib import auth +from django.db.models import OuterRef, Subquery +from django.urls import reverse +from django_scopes import scopes_disabled + +from cookbook.models import Ingredient, Step + +LIST_URL = 'api:space-list' +DETAIL_URL = 'api:space-detail' + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403, 0], + ['g1_s1', 403, 0], + ['u1_s1', 403, 0], + ['a1_s1', 200, 1], + ['a2_s1', 200, 0], +]) +def test_list_permission(arg, request, space_1, a1_s1): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + c = request.getfixturevalue(arg[0]) + result = c.get(reverse(LIST_URL)) + assert result.status_code == arg[1] + if arg[1] == 200: + assert len(json.loads(result.content)) == arg[2] + + +def test_list_permission_owner(u1_s1, space_1): + assert len(json.loads(u1_s1.get(reverse(LIST_URL)).content)) == 0 + space_1.created_by = auth.get_user(u1_s1) + space_1.save() + assert len(json.loads(u1_s1.get(reverse(LIST_URL)).content)) == 1 + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 404], + ['u1_s1', 404], + ['a1_s1', 200], + ['g1_s2', 404], + ['u1_s2', 404], + ['a1_s2', 404], +]) +def test_update(arg, request, space_1, a1_s1): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + with scopes_disabled(): + c = request.getfixturevalue(arg[0]) + r = c.patch( + reverse( + DETAIL_URL, + args={space_1.id} + ), + {'message': 'new'}, + content_type='application/json' + ) + response = json.loads(r.content) + assert r.status_code == arg[1] + if r.status_code == 200: + assert response['message'] == 'new' + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 405], + ['u1_s1', 405], + ['a1_s1', 405], +]) +def test_add(arg, request, u1_s2): + c = request.getfixturevalue(arg[0]) + r = c.post( + reverse(LIST_URL), + {'name': 'test'}, + content_type='application/json' + ) + assert r.status_code == arg[1] + + +def test_delete(u1_s1, u1_s2, a1_s1, space_1): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + # user cannot delete space + r = u1_s1.delete( + reverse( + DETAIL_URL, + args={space_1.id} + ) + ) + assert r.status_code == 405 + + # event the space owner cannot delete his space over the api (this might change later but for now it's only available in the UI) + r = a1_s1.delete( + reverse( + DETAIL_URL, + args={space_1.id} + ) + ) + assert r.status_code == 204 diff --git a/cookbook/tests/api/test_api_username.py b/cookbook/tests/api/test_api_username.py index c545003a..9ab5d346 100644 --- a/cookbook/tests/api/test_api_username.py +++ b/cookbook/tests/api/test_api_username.py @@ -5,6 +5,8 @@ import pytest from django.contrib import auth from django.urls import reverse +from cookbook.models import UserSpace + LIST_URL = 'api:username-list' DETAIL_URL = 'api:username-detail' @@ -62,8 +64,8 @@ def test_list_space(u1_s1, u2_s1, u1_s2, space_2): assert len(json.loads(u1_s2.get(reverse(LIST_URL)).content)) == 1 u = auth.get_user(u2_s1) - u.userpreference.space = space_2 - u.userpreference.save() + u.userspace_set.first().delete() + UserSpace.objects.create(user=u, space=space_2) assert len(json.loads(u1_s1.get(reverse(LIST_URL)).content)) == 1 assert len(json.loads(u1_s2.get(reverse(LIST_URL)).content)) == 2 diff --git a/cookbook/tests/api/test_api_userpreference.py b/cookbook/tests/api/test_api_userpreference.py index c31e473f..2ade8a6a 100644 --- a/cookbook/tests/api/test_api_userpreference.py +++ b/cookbook/tests/api/test_api_userpreference.py @@ -13,16 +13,16 @@ DETAIL_URL = 'api:userpreference-detail' def test_add(u1_s1, u2_s1): r = u1_s1.post(reverse(LIST_URL)) - assert r.status_code == 400 + assert r.status_code == 405 with scopes_disabled(): UserPreference.objects.filter(user=auth.get_user(u1_s1)).delete() r = u2_s1.post(reverse(LIST_URL), {'user': auth.get_user(u1_s1).id, 'plan_share': []}, content_type='application/json') - assert r.status_code == 404 + assert r.status_code == 405 r = u1_s1.post(reverse(LIST_URL), {'user': auth.get_user(u1_s1).id, 'plan_share': []}, content_type='application/json') - assert r.status_code == 200 + assert r.status_code == 405 def test_preference_list(u1_s1, u2_s1, u1_s2): @@ -51,7 +51,7 @@ def test_preference_retrieve(arg, request, u1_s1): def test_preference_update(u1_s1, u2_s1): # can update users preference - r = u1_s1.put( + r = u1_s1.patch( reverse( DETAIL_URL, args={auth.get_user(u1_s1).id} @@ -63,8 +63,8 @@ def test_preference_update(u1_s1, u2_s1): assert r.status_code == 200 assert response['theme'] == UserPreference.DARKLY - # cant set another users non existent pref - r = u1_s1.put( + # can't set another users non-existent pref + r = u1_s1.patch( reverse( DETAIL_URL, args={auth.get_user(u2_s1).id} @@ -74,11 +74,11 @@ def test_preference_update(u1_s1, u2_s1): ) assert r.status_code == 404 - # cant set another users existent pref + # can't set another users existent pref with scopes_disabled(): UserPreference.objects.filter(user=auth.get_user(u2_s1)).delete() - r = u1_s1.put( + r = u1_s1.patch( reverse( DETAIL_URL, args={auth.get_user(u2_s1).id} @@ -92,23 +92,23 @@ def test_preference_update(u1_s1, u2_s1): def test_preference_delete(u1_s1, u2_s1): - # cant delete other preference + # can't delete other preference r = u1_s1.delete( reverse( DETAIL_URL, args={auth.get_user(u2_s1).id} ) ) - assert r.status_code == 404 + assert r.status_code == 405 - # can delete own preference + # can't delete own preference r = u1_s1.delete( reverse( DETAIL_URL, args={auth.get_user(u1_s1).id} ) ) - assert r.status_code == 204 + assert r.status_code == 405 def test_default_inherit_fields(u1_s1, u1_s2, space_1, space_2): @@ -120,7 +120,7 @@ def test_default_inherit_fields(u1_s1, u1_s2, space_1, space_2): r = u1_s1.get( reverse(DETAIL_URL, args={auth.get_user(u1_s1).id}), ) - assert len([x['field'] for x in json.loads(r.content)['food_inherit_default']]) == 0 + #assert len([x['field'] for x in json.loads(r.content)['food_inherit_default']]) == 0 # inherit all possible fields with scope(space=space_1): diff --git a/cookbook/tests/api/test_api_userspace.py b/cookbook/tests/api/test_api_userspace.py new file mode 100644 index 00000000..deccd7ed --- /dev/null +++ b/cookbook/tests/api/test_api_userspace.py @@ -0,0 +1,113 @@ +import json + +import pytest +from django.contrib import auth +from django.db.models import OuterRef, Subquery +from django.urls import reverse +from django_scopes import scopes_disabled + +from cookbook.models import Ingredient, Step + +LIST_URL = 'api:userspace-list' +DETAIL_URL = 'api:userspace-detail' + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403, 0], + ['g1_s1', 200, 1], # sees only own user space + ['u1_s1', 200, 1], + ['a1_s1', 200, 3], # sees user space of all users in space + ['a2_s1', 200, 1], +]) +def test_list_permission(arg, request, space_1, g1_s1, u1_s1, a1_s1): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + + c = request.getfixturevalue(arg[0]) + result = c.get(reverse(LIST_URL)) + assert result.status_code == arg[1] + if arg[1] == 200: + assert len(json.loads(result.content)) == arg[2] + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 403], + ['u1_s1', 403], + ['a1_s1', 200], + ['g1_s2', 403], + ['u1_s2', 403], + ['a1_s2', 403], +]) +def test_update(arg, request, space_1, u1_s1, a1_s1): + with scopes_disabled(): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + + user_space = auth.get_user(u1_s1).userspace_set.first() + + c = request.getfixturevalue(arg[0]) + r = c.patch( + reverse( + DETAIL_URL, + args={user_space.id} + ), + {'groups': [{'id': 3, 'name': 'admin'}]}, + content_type='application/json' + ) + response = json.loads(r.content) + assert r.status_code == arg[1] + if r.status_code == 200: + assert response['groups'] == [{'id': 3, 'name': 'admin'}] + + +def test_update_space_owner(a1_s1, space_1): + # space owners cannot modify their own permission so that they can't lock themselves out + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + r = a1_s1.patch( + reverse( + DETAIL_URL, + args={auth.get_user(a1_s1).userspace_set.first().id} + ), + {'groups': [{'id': 2, 'name': 'user'}]}, + content_type='application/json' + ) + assert r.status_code == 400 + + +@pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 405], + ['u1_s1', 405], + ['a1_s1', 405], +]) +def test_add(arg, request, u1_s1, space_1): + c = request.getfixturevalue(arg[0]) + r = c.post( + reverse(LIST_URL), + {'user': {'id': auth.get_user(u1_s1).id, 'space': space_1.id}}, + content_type='application/json' + ) + assert r.status_code == arg[1] + + +def test_delete(u1_s1, u1_s2, a1_s1, space_1): + space_1.created_by = auth.get_user(a1_s1) + space_1.save() + + r = u1_s1.delete( + reverse( + DETAIL_URL, + args={auth.get_user(u1_s1).userspace_set.first().id} + ) + ) + assert r.status_code == 403 + + r = a1_s1.delete( + reverse( + DETAIL_URL, + args={auth.get_user(u1_s1).userspace_set.first().id} + ) + ) + assert r.status_code == 204 diff --git a/cookbook/tests/factories/__init__.py b/cookbook/tests/factories/__init__.py index 77b59199..f909d98c 100644 --- a/cookbook/tests/factories/__init__.py +++ b/cookbook/tests/factories/__init__.py @@ -10,7 +10,7 @@ from django_scopes import scopes_disabled from faker import Factory as FakerFactory from pytest_factoryboy import register -from cookbook.models import Recipe, Step +from cookbook.models import Recipe, Step, UserSpace # this code will run immediately prior to creating the model object useful when you want a reverse relationship # log = factory.RelatedFactory( @@ -65,7 +65,8 @@ class UserFactory(factory.django.DjangoModelFactory): return if extracted: - self.groups.add(Group.objects.get(name=extracted)) + us = UserSpace.objects.create(space=self.space, user=self, active=True) + us.groups.add(Group.objects.get(name=extracted)) @factory.post_generation def userpreference(self, create, extracted, **kwargs): @@ -75,8 +76,6 @@ class UserFactory(factory.django.DjangoModelFactory): if extracted: for prefs in extracted: self.userpreference[prefs] = extracted[prefs]/0 # intentionally break so it can be debugged later - self.userpreference.space = self.space - self.userpreference.save() class Meta: model = User diff --git a/cookbook/tests/other/test_permission_helper.py b/cookbook/tests/other/test_permission_helper.py new file mode 100644 index 00000000..be407daf --- /dev/null +++ b/cookbook/tests/other/test_permission_helper.py @@ -0,0 +1,96 @@ +import pytest +from django.contrib import auth +from django.contrib.auth.models import Group +from django.urls import reverse +from django_scopes import scopes_disabled + +from cookbook.forms import ImportExportBase +from cookbook.helper.ingredient_parser import IngredientParser +from cookbook.helper.permission_helper import has_group_permission, is_space_owner, switch_user_active_space, is_object_owner +from cookbook.models import ExportLog, UserSpace, Food, Space, Comment, RecipeBook, RecipeBookEntry + + +def test_has_group_permission(u1_s1, a_u, space_2): + with scopes_disabled(): + # test that a normal user has user permissions + assert has_group_permission(auth.get_user(u1_s1), ('guest',)) + assert has_group_permission(auth.get_user(u1_s1), ('user',)) + assert not has_group_permission(auth.get_user(u1_s1), ('admin',)) + + # test that permissions are not taken from non active spaces + us = UserSpace.objects.create(user=auth.get_user(u1_s1), space=space_2, active=False) + us.groups.add(Group.objects.get(name='admin')) + assert not has_group_permission(auth.get_user(u1_s1), ('admin',)) + + # disable all spaces and enable space 2 permission to check if permission is now valid + auth.get_user(u1_s1).userspace_set.update(active=False) + us.active = True + us.save() + assert has_group_permission(auth.get_user(u1_s1), ('admin',)) + + # test that group permission checks fail if more than one userspace is active + auth.get_user(u1_s1).userspace_set.update(active=True) + assert not has_group_permission(auth.get_user(u1_s1), ('user',)) + + # test that anonymous users don't have any permissions + assert not has_group_permission(auth.get_user(a_u), ('guest',)) + assert not has_group_permission(auth.get_user(a_u), ('user',)) + assert not has_group_permission(auth.get_user(a_u), ('admin',)) + + +def test_is_owner(u1_s1, u2_s1, u1_s2, a_u, space_1, recipe_1_s1): + with scopes_disabled(): + s = Space.objects.create(name='Test', created_by=auth.get_user(u1_s1)) + + assert is_object_owner(auth.get_user(u1_s1), s) + assert not is_object_owner(auth.get_user(u2_s1), s) + assert not is_object_owner(auth.get_user(u1_s2), s) + assert not is_object_owner(auth.get_user(a_u), s) + + rb = RecipeBook.objects.create(name='Test', created_by=auth.get_user(u1_s1), space=space_1) + + assert is_object_owner(auth.get_user(u1_s1), rb) + assert not is_object_owner(auth.get_user(u2_s1), rb) + assert not is_object_owner(auth.get_user(u1_s2), rb) + assert not is_object_owner(auth.get_user(a_u), rb) + + rbe = RecipeBookEntry.objects.create(book=rb, recipe=recipe_1_s1) + + assert is_object_owner(auth.get_user(u1_s1), rbe) + assert not is_object_owner(auth.get_user(u2_s1), rbe) + assert not is_object_owner(auth.get_user(u1_s2), rbe) + assert not is_object_owner(auth.get_user(a_u), rbe) + + +def test_is_space_owner(u1_s1, u2_s1, space_1, space_2): + with scopes_disabled(): + f = Food.objects.create(name='Test', space=space_1) + space_1.created_by = auth.get_user(u1_s1) + space_1.save() + + assert is_space_owner(auth.get_user(u1_s1), f) + assert is_space_owner(space_1.created_by, f) + assert not is_space_owner(auth.get_user(u2_s1), f) + + f.space = space_2 + f.save() + + assert not is_space_owner(auth.get_user(u1_s1), f) + assert not is_space_owner(space_1.created_by, f) + assert not is_space_owner(auth.get_user(u2_s1), f) + + +def test_switch_user_active_space(u1_s1, u1_s2, space_1, space_2): + with scopes_disabled(): + # can switch to already active space + assert switch_user_active_space(auth.get_user(u1_s1), space_1) == auth.get_user(u1_s1).userspace_set.filter(active=True).get() + + # cannot switch to a space the user does not belong to + assert switch_user_active_space(auth.get_user(u1_s1), space_2) is None + + # can join another space and be member of two spaces + us = UserSpace.objects.create(user=auth.get_user(u1_s1), space=space_2, active=False) + assert len(auth.get_user(u1_s1).userspace_set.all()) == 2 + + # can switch into newly created space + assert switch_user_active_space(auth.get_user(u1_s1), space_2) == us diff --git a/cookbook/tests/other/test_url_import.py b/cookbook/tests/other/test_url_import.py index bebf061d..ae4677c0 100644 --- a/cookbook/tests/other/test_url_import.py +++ b/cookbook/tests/other/test_url_import.py @@ -22,8 +22,8 @@ DATA_DIR = "cookbook/tests/other/test_data/" @pytest.mark.parametrize("arg", [ - ['a_u', 302], - ['g1_s1', 302], + ['a_u', 403], + ['g1_s1', 403], ['u1_s1', 405], ['a1_s1', 405], ]) diff --git a/cookbook/urls.py b/cookbook/urls.py index b82737a6..5933787c 100644 --- a/cookbook/urls.py +++ b/cookbook/urls.py @@ -12,7 +12,7 @@ from recipes.version import VERSION_NUMBER from .models import (Automation, Comment, CustomFilter, Food, InviteLink, Keyword, MealPlan, Recipe, RecipeBook, RecipeBookEntry, RecipeImport, ShoppingList, Step, Storage, Supermarket, SupermarketCategory, Sync, SyncLog, Unit, UserFile, - get_model_name) + get_model_name, UserSpace, Space) from .views import api, data, delete, edit, import_export, lists, new, telegram, views from .views.api import CustomAuthToken @@ -25,7 +25,9 @@ router.register(r'food', api.FoodViewSet) router.register(r'food-inherit-field', api.FoodInheritFieldViewSet) router.register(r'import-log', api.ImportLogViewSet) router.register(r'export-log', api.ExportLogViewSet) +router.register(r'group', api.GroupViewSet) router.register(r'ingredient', api.IngredientViewSet) +router.register(r'invite-link', api.InviteLinkViewSet) router.register(r'keyword', api.KeywordViewSet) router.register(r'meal-plan', api.MealPlanViewSet) router.register(r'meal-type', api.MealTypeViewSet) @@ -35,6 +37,7 @@ router.register(r'recipe-book-entry', api.RecipeBookEntryViewSet) router.register(r'shopping-list', api.ShoppingListViewSet) router.register(r'shopping-list-entry', api.ShoppingListEntryViewSet) router.register(r'shopping-list-recipe', api.ShoppingListRecipeViewSet) +router.register(r'space', api.SpaceViewSet) router.register(r'step', api.StepViewSet) router.register(r'storage', api.StorageViewSet) router.register(r'supermarket', api.SupermarketViewSet) @@ -46,18 +49,17 @@ router.register(r'unit', api.UnitViewSet) router.register(r'user-file', api.UserFileViewSet) router.register(r'user-name', api.UserNameViewSet, basename='username') router.register(r'user-preference', api.UserPreferenceViewSet) +router.register(r'user-space', api.UserSpaceViewSet) router.register(r'view-log', api.ViewLogViewSet) urlpatterns = [ path('', views.index, name='index'), path('setup/', views.setup, name='view_setup'), - path('space/', views.space, name='view_space'), - path('space/member///', views.space_change_member, - name='change_space_member'), path('no-group', views.no_groups, name='view_no_group'), - path('no-space', views.no_space, name='view_no_space'), + path('space-overview', views.space_overview, name='view_space_overview'), + path('space-manage/', views.space_manage, name='view_space_manage'), + path('switch-space/', views.switch_space, name='view_switch_space'), path('no-perm', views.no_perm, name='view_no_perm'), - path('signup/', views.signup, name='view_signup'), # TODO deprecated with 0.16.2 remove at some point path('invite/', views.invite_link, name='view_invite'), path('system/', views.system, name='view_system'), path('search/', views.search, name='view_search'), @@ -114,6 +116,9 @@ urlpatterns = [ path('api/ingredient-from-string/', api.ingredient_from_string, name='api_ingredient_from_string'), path('api/share-link/', api.share_link, name='api_share_link'), path('api/get_facets/', api.get_facets, name='api_get_facets'), + path('api/reset-food-inheritance/', api.reset_food_inheritance, name='api_reset_food_inheritance'), + path('api/switch-active-space//', api.switch_active_space, name='api_switch_active_space'), + path('dal/keyword/', dal.KeywordAutocomplete.as_view(), name='dal_keyword'), # TODO is this deprecated? not yet, some old forms remain, could likely be changed to generic API endpoints @@ -145,7 +150,7 @@ urlpatterns = [ generic_models = ( Recipe, RecipeImport, Storage, RecipeBook, MealPlan, SyncLog, Sync, - Comment, RecipeBookEntry, ShoppingList, InviteLink + Comment, RecipeBookEntry, ShoppingList, InviteLink, UserSpace, Space ) for m in generic_models: diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 7f8640af..b03b448a 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -2,6 +2,7 @@ import io import json import mimetypes import re +import traceback import uuid from collections import OrderedDict @@ -11,7 +12,7 @@ from PIL import UnidentifiedImageError from annoying.decorators import ajax_request from annoying.functions import get_object_or_None from django.contrib import messages -from django.contrib.auth.models import User +from django.contrib.auth.models import User, Group from django.contrib.postgres.search import TrigramSimilarity from django.core.exceptions import FieldError, ValidationError from django.core.files import File @@ -29,26 +30,22 @@ from requests.exceptions import MissingSchema from rest_framework import decorators, status, viewsets from rest_framework.authtoken.models import Token from rest_framework.authtoken.views import ObtainAuthToken -from rest_framework.decorators import api_view, permission_classes, schema +from rest_framework.decorators import api_view, permission_classes from rest_framework.exceptions import APIException, PermissionDenied -from rest_framework.generics import CreateAPIView from rest_framework.pagination import PageNumberPagination from rest_framework.parsers import MultiPartParser from rest_framework.renderers import JSONRenderer, TemplateHTMLRenderer from rest_framework.response import Response -from rest_framework.schemas import AutoSchema from rest_framework.throttling import AnonRateThrottle -from rest_framework.views import APIView from rest_framework.viewsets import ViewSetMixin from treebeard.exceptions import InvalidMoveToDescendant, InvalidPosition, PathOverflow -from validators import ValidationFailure from cookbook.helper.HelperFunctions import str2bool from cookbook.helper.image_processing import handle_image from cookbook.helper.ingredient_parser import IngredientParser from cookbook.helper.permission_helper import (CustomIsAdmin, CustomIsGuest, CustomIsOwner, CustomIsShare, CustomIsShared, CustomIsUser, - group_required) + group_required, CustomIsSpaceOwner, switch_user_active_space, is_space_owner) from cookbook.helper.recipe_html_import import get_recipe_from_source from cookbook.helper.recipe_search import RecipeFacet, RecipeSearch, old_search from cookbook.helper.shopping_helper import RecipeShoppingEditor, shopping_helper @@ -57,7 +54,7 @@ from cookbook.models import (Automation, BookmarkletImport, CookLog, CustomFilte Recipe, RecipeBook, RecipeBookEntry, ShareLink, ShoppingList, ShoppingListEntry, ShoppingListRecipe, Step, Storage, Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync, SyncLog, Unit, - UserFile, UserPreference, ViewLog) + UserFile, UserPreference, ViewLog, Space, UserSpace, InviteLink) from cookbook.provider.dropbox import Dropbox from cookbook.provider.local import Local from cookbook.provider.nextcloud import Nextcloud @@ -78,7 +75,7 @@ from cookbook.serializer import (AutomationSerializer, BookmarkletImportSerializ SupermarketCategorySerializer, SupermarketSerializer, SyncLogSerializer, SyncSerializer, UnitSerializer, UserFileSerializer, UserNameSerializer, UserPreferenceSerializer, - ViewLogSerializer, IngredientSimpleSerializer, BookmarkletImportListSerializer, RecipeFromSourceSerializer) + ViewLogSerializer, IngredientSimpleSerializer, BookmarkletImportListSerializer, RecipeFromSourceSerializer, SpaceSerializer, UserSpaceSerializer, GroupSerializer, InviteLinkSerializer) from recipes import settings @@ -176,9 +173,9 @@ class FuzzyFilterMixin(ViewSetMixin, ExtendedRecipeMixin): self.queryset = ( self.queryset - .annotate(starts=Case(When(name__istartswith=query, then=(Value(100))), - default=Value(0))) # put exact matches at the top of the result set - .filter(filter).order_by('-starts', Lower('name').asc()) + .annotate(starts=Case(When(name__istartswith=query, then=(Value(100))), + default=Value(0))) # put exact matches at the top of the result set + .filter(filter).order_by('-starts', Lower('name').asc()) ) updated_at = self.request.query_params.get('updated_at', None) @@ -358,7 +355,7 @@ class UserNameViewSet(viewsets.ReadOnlyModelViewSet): http_method_names = ['get'] def get_queryset(self): - queryset = self.queryset.filter(userpreference__space=self.request.space) + queryset = self.queryset.filter(userspace__space=self.request.space) try: filter_list = self.request.query_params.get('filter_list', None) if filter_list is not None: @@ -369,13 +366,50 @@ class UserNameViewSet(viewsets.ReadOnlyModelViewSet): return queryset +class GroupViewSet(viewsets.ModelViewSet): + queryset = Group.objects.all() + serializer_class = GroupSerializer + permission_classes = [CustomIsAdmin] + http_method_names = ['get', ] + + +class SpaceViewSet(viewsets.ModelViewSet): + queryset = Space.objects + serializer_class = SpaceSerializer + permission_classes = [CustomIsOwner & CustomIsAdmin] + http_method_names = ['get', 'patch'] + + def get_queryset(self): + return self.queryset.filter(id=self.request.space.id, created_by=self.request.user) + + +class UserSpaceViewSet(viewsets.ModelViewSet): + queryset = UserSpace.objects + serializer_class = UserSpaceSerializer + permission_classes = [CustomIsSpaceOwner] + http_method_names = ['get', 'patch', 'delete'] + + def destroy(self, request, *args, **kwargs): + if request.space.created_by == UserSpace.objects.get(pk=kwargs['pk']).user: + raise APIException('Cannot delete Space owner permission.') + return super().destroy(request, *args, **kwargs) + + def get_queryset(self): + if is_space_owner(self.request.user, self.request.space): + return self.queryset.filter(space=self.request.space) + else: + return self.queryset.filter(user=self.request.user, space=self.request.space) + + class UserPreferenceViewSet(viewsets.ModelViewSet): queryset = UserPreference.objects serializer_class = UserPreferenceSerializer permission_classes = [CustomIsOwner, ] + http_method_names = ['get', 'patch', ] def get_queryset(self): - return self.queryset.filter(user=self.request.user) + with scopes_disabled(): # need to disable scopes as user preference is no longer a spaced method + return self.queryset.filter(user=self.request.user) class StorageViewSet(viewsets.ModelViewSet): @@ -1021,6 +1055,19 @@ class AutomationViewSet(viewsets.ModelViewSet, StandardFilterMixin): return super().get_queryset() +class InviteLinkViewSet(viewsets.ModelViewSet, StandardFilterMixin): + queryset = InviteLink.objects + serializer_class = InviteLinkSerializer + permission_classes = [CustomIsSpaceOwner & CustomIsAdmin] + + def get_queryset(self): + if is_space_owner(self.request.user, self.request.space): + self.queryset = self.queryset.filter(space=self.request.space).all() + return super().get_queryset() + else: + return None + + class CustomFilterViewSet(viewsets.ModelViewSet, StandardFilterMixin): queryset = CustomFilter.objects serializer_class = CustomFilterSerializer @@ -1123,6 +1170,42 @@ def recipe_from_source(request): return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) +@api_view(['GET']) +# @schema(AutoSchema()) #TODO add proper schema +@permission_classes([CustomIsAdmin]) +# TODO add rate limiting +def reset_food_inheritance(request): + """ + function to reset inheritance from api, see food method for docs + """ + try: + Food.reset_inheritance(space=request.space) + return Response({'message': 'success', }, status=status.HTTP_200_OK) + except Exception as e: + traceback.print_exc() + return Response(str(e), status=status.HTTP_400_BAD_REQUEST) + + +@api_view(['GET']) +# @schema(AutoSchema()) #TODO add proper schema +@permission_classes([CustomIsAdmin]) +# TODO add rate limiting +def switch_active_space(request, space_id): + """ + api endpoint to switch space function + """ + try: + space = get_object_or_404(Space, id=space_id) + user_space = switch_user_active_space(request.user, space) + if user_space: + return Response(UserSpaceSerializer().to_representation(instance=user_space), status=status.HTTP_200_OK) + else: + return Response("not found", status=status.HTTP_404_NOT_FOUND) + except Exception as e: + traceback.print_exc() + return Response(str(e), status=status.HTTP_400_BAD_REQUEST) + + def get_recipe_provider(recipe): if recipe.storage.method == Storage.DROPBOX: return Dropbox @@ -1167,7 +1250,7 @@ def sync_all(request): _('This feature is not yet available in the hosted version of tandoor!')) return redirect('index') - monitors = Sync.objects.filter(active=True).filter(space=request.user.userpreference.space) + monitors = Sync.objects.filter(active=True).filter(space=request.user.userspace_set.filter(active=1).first().space) error = False for monitor in monitors: @@ -1230,7 +1313,7 @@ def log_cooking(request, recipe_id): def get_plan_ical(request, from_date, to_date): queryset = MealPlan.objects.filter( Q(created_by=request.user) | Q(shared=request.user) - ).filter(space=request.user.userpreference.space).distinct().all() + ).filter(space=request.user.userspace_set.filter(active=1).first().space).distinct().all() if from_date is not None: queryset = queryset.filter(date__gte=from_date) diff --git a/cookbook/views/delete.py b/cookbook/views/delete.py index 6b94298c..eefe6f38 100644 --- a/cookbook/views/delete.py +++ b/cookbook/views/delete.py @@ -9,7 +9,7 @@ from django.views.generic import DeleteView from cookbook.helper.permission_helper import GroupRequiredMixin, OwnerRequiredMixin, group_required from cookbook.models import (Comment, InviteLink, MealPlan, Recipe, RecipeBook, RecipeBookEntry, - RecipeImport, Storage, Sync) + RecipeImport, Storage, Sync, UserSpace, Space) from cookbook.provider.dropbox import Dropbox from cookbook.provider.local import Local from cookbook.provider.nextcloud import Nextcloud @@ -188,3 +188,30 @@ class InviteLinkDelete(OwnerRequiredMixin, DeleteView): context = super(InviteLinkDelete, self).get_context_data(**kwargs) context['title'] = _("Invite Link") return context + + +class UserSpaceDelete(OwnerRequiredMixin, DeleteView): + template_name = "generic/delete_template.html" + model = UserSpace + success_url = reverse_lazy('view_space_overview') + + def get_context_data(self, **kwargs): + context = super(UserSpaceDelete, self).get_context_data(**kwargs) + context['title'] = _("Space Membership") + return context + + +class SpaceDelete(OwnerRequiredMixin, DeleteView): + template_name = "generic/delete_template.html" + model = Space + success_url = reverse_lazy('view_space_overview') + + def delete(self, request, *args, **kwargs): + self.object = self.get_object() + self.object.safe_delete() + return HttpResponseRedirect(self.get_success_url()) + + def get_context_data(self, **kwargs): + context = super(SpaceDelete, self).get_context_data(**kwargs) + context['title'] = _("Space") + return context diff --git a/cookbook/views/new.py b/cookbook/views/new.py index d6e28cc8..01478da0 100644 --- a/cookbook/views/new.py +++ b/cookbook/views/new.py @@ -190,59 +190,3 @@ class MealPlanCreate(GroupRequiredMixin, CreateView, SpaceFormMixing): return context -class InviteLinkCreate(GroupRequiredMixin, CreateView): - groups_required = ['admin'] - template_name = "generic/new_template.html" - model = InviteLink - form_class = InviteLinkForm - - def form_valid(self, form): - obj = form.save(commit=False) - obj.created_by = self.request.user - - # verify given space is actually owned by the user creating the link - if obj.space.created_by != self.request.user: - obj.space = self.request.space - obj.save() - if obj.email: - try: - if InviteLink.objects.filter(space=self.request.space, created_at__gte=datetime.now() - timedelta(hours=4)).count() < 20: - message = _('Hello') + '!\n\n' + _('You have been invited by ') + escape(self.request.user.username) - message += _(' to join their Tandoor Recipes space ') + escape(self.request.space.name) + '.\n\n' - message += _('Click the following link to activate your account: ') + self.request.build_absolute_uri(reverse('view_invite', args=[str(obj.uuid)])) + '\n\n' - message += _('If the link does not work use the following code to manually join the space: ') + str(obj.uuid) + '\n\n' - message += _('The invitation is valid until ') + str(obj.valid_until) + '\n\n' - message += _('Tandoor Recipes is an Open Source recipe manager. Check it out on GitHub ') + 'https://github.com/vabene1111/recipes/' - - send_mail( - _('Tandoor Recipes Invite'), - message, - None, - [obj.email], - fail_silently=False, - ) - messages.add_message(self.request, messages.SUCCESS, - _('Invite link successfully send to user.')) - else: - messages.add_message(self.request, messages.ERROR, - _('You have send to many emails, please share the link manually or wait a few hours.')) - except (SMTPException, BadHeaderError, TimeoutError): - messages.add_message(self.request, messages.ERROR, _('Email could not be sent to user. Please share the link manually.')) - - return HttpResponseRedirect(reverse('view_space')) - - def get_context_data(self, **kwargs): - context = super(InviteLinkCreate, self).get_context_data(**kwargs) - context['title'] = _("Invite Link") - return context - - def get_form_kwargs(self): - kwargs = super().get_form_kwargs() - kwargs.update({'user': self.request.user}) - return kwargs - - def get_initial(self): - return dict( - space=self.request.space, - group=Group.objects.get(name='user') - ) diff --git a/cookbook/views/views.py b/cookbook/views/views.py index f22030c1..6a4aac7a 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -26,10 +26,10 @@ from cookbook.filters import RecipeFilter from cookbook.forms import (CommentForm, Recipe, SearchPreferenceForm, ShoppingPreferenceForm, SpaceCreateForm, SpaceJoinForm, SpacePreferenceForm, User, UserCreateForm, UserNameForm, UserPreference, UserPreferenceForm) -from cookbook.helper.permission_helper import group_required, has_group_permission, share_link_valid +from cookbook.helper.permission_helper import group_required, has_group_permission, share_link_valid, switch_user_active_space from cookbook.models import (Comment, CookLog, Food, InviteLink, Keyword, MealPlan, RecipeImport, SearchFields, SearchPreference, ShareLink, - Space, Unit, ViewLog) + Space, Unit, ViewLog, UserSpace) from cookbook.tables import (CookLogTable, InviteLinkTable, RecipeTable, RecipeTableSmall, ViewLogTable) from cookbook.views.data import Object @@ -61,7 +61,7 @@ def search(request): if request.user.userpreference.search_style == UserPreference.NEW: return search_v2(request) f = RecipeFilter(request.GET, - queryset=Recipe.objects.filter(space=request.user.userpreference.space).all().order_by( + queryset=Recipe.objects.filter(space=request.space).all().order_by( Lower('name').asc()), space=request.space) if request.user.userpreference.search_style == UserPreference.LARGE: @@ -72,7 +72,7 @@ def search(request): if request.GET == {} and request.user.userpreference.show_recent: qs = Recipe.objects.filter(viewlog__created_by=request.user).filter( - space=request.user.userpreference.space).order_by('-viewlog__created_at').all() + space=request.space).order_by('-viewlog__created_at').all() recent_list = [] for r in qs: @@ -103,10 +103,7 @@ def no_groups(request): @login_required -def no_space(request): - if request.user.userpreference.space: - return HttpResponseRedirect(reverse('index')) - +def space_overview(request): if request.POST: create_form = SpaceCreateForm(request.POST, prefix='create') join_form = SpaceJoinForm(request.POST, prefix='join') @@ -120,21 +117,19 @@ def no_space(request): allow_sharing=settings.SPACE_DEFAULT_ALLOW_SHARING, ) - request.user.userpreference.space = created_space - request.user.userpreference.save() - request.user.groups.add(Group.objects.filter(name='admin').get()) + user_space = UserSpace.objects.create(space=created_space, user=request.user, active=False) + user_space.groups.add(Group.objects.filter(name='admin').get()) messages.add_message(request, messages.SUCCESS, _('You have successfully created your own recipe space. Start by adding some recipes or invite other people to join you.')) - return HttpResponseRedirect(reverse('index')) + return HttpResponseRedirect(reverse('view_switch_space', args=[user_space.space.pk])) if join_form.is_valid(): return HttpResponseRedirect(reverse('view_invite', args=[join_form.cleaned_data['token']])) else: if settings.SOCIAL_DEFAULT_ACCESS: - request.user.userpreference.space = Space.objects.first() - request.user.userpreference.save() - request.user.groups.add(Group.objects.get(name=settings.SOCIAL_DEFAULT_GROUP)) + user_space = UserSpace.objects.create(space=Space.objects.first(), user=request.user, active=True) + user_space.groups.add(Group.objects.filter(name=settings.SOCIAL_DEFAULT_GROUP).get()) return HttpResponseRedirect(reverse('index')) if 'signup_token' in request.session: return HttpResponseRedirect(reverse('view_invite', args=[request.session.pop('signup_token', '')])) @@ -142,7 +137,14 @@ def no_space(request): create_form = SpaceCreateForm(initial={'name': f'{request.user.username}\'s Space'}) join_form = SpaceJoinForm() - return render(request, 'no_space_info.html', {'create_form': create_form, 'join_form': join_form}) + return render(request, 'space_overview.html', {'create_form': create_form, 'join_form': join_form}) + + +@login_required +def switch_space(request, space_id): + space = get_object_or_404(Space, id=space_id) + switch_user_active_space(request.user, space) + return HttpResponseRedirect(reverse('index')) def no_perm(request): @@ -383,7 +385,7 @@ def user_settings(request): up.shopping_auto_sync = settings.SHOPPING_MIN_AUTOSYNC_INTERVAL up.save() if up: - preference_form = UserPreferenceForm(instance=up) + preference_form = UserPreferenceForm(instance=up, space=request.space) shopping_form = ShoppingPreferenceForm(instance=up) else: preference_form = UserPreferenceForm(space=request.space) @@ -473,14 +475,6 @@ def setup(request): user.set_password(form.cleaned_data['password']) user.save() - user.groups.add(Group.objects.get(name='admin')) - - user.userpreference.space = Space.objects.first() - user.userpreference.save() - - for x in Space.objects.all(): - x.created_by = user - x.save() messages.add_message(request, messages.SUCCESS, _('User has been created, please login!')) return HttpResponseRedirect(reverse('account_login')) except ValidationError as e: @@ -501,102 +495,33 @@ def invite_link(request, token): return HttpResponseRedirect(reverse('index')) if link := InviteLink.objects.filter(valid_until__gte=datetime.today(), used_by=None, uuid=token).first(): - if request.user.is_authenticated: - if request.user.userpreference.space: - messages.add_message(request, messages.WARNING, - _('You are already member of a space and therefore cannot join this one.')) - return HttpResponseRedirect(reverse('index')) - + if request.user.is_authenticated and not request.user.userspace_set.filter(space=link.space).exists(): link.used_by = request.user link.save() - request.user.groups.clear() - request.user.groups.add(link.group) - request.user.userpreference.space = link.space - request.user.userpreference.save() + user_space = UserSpace.objects.create(user=request.user, space=link.space, active=False) + + if request.user.userspace_set.count() == 1: + user_space.active = True + user_space.save() + + user_space.groups.add(link.group) messages.add_message(request, messages.SUCCESS, _('Successfully joined space.')) - return HttpResponseRedirect(reverse('index')) + return HttpResponseRedirect(reverse('view_space_overview')) else: request.session['signup_token'] = str(token) return HttpResponseRedirect(reverse('account_signup')) messages.add_message(request, messages.ERROR, _('Invite Link not valid or already used!')) - return HttpResponseRedirect(reverse('index')) - - -# TODO deprecated with 0.16.2 remove at some point -def signup(request, token): - return HttpResponseRedirect(reverse('view_invite', args=[token])) + return HttpResponseRedirect(reverse('view_space_overview')) @group_required('admin') -def space(request): - space_users = UserPreference.objects.filter(space=request.space).all() - - counts = Object() - counts.recipes = Recipe.objects.filter(space=request.space).count() - counts.keywords = Keyword.objects.filter(space=request.space).count() - counts.recipe_import = RecipeImport.objects.filter(space=request.space).count() - counts.units = Unit.objects.filter(space=request.space).count() - counts.ingredients = Food.objects.filter(space=request.space).count() - counts.comments = Comment.objects.filter(recipe__space=request.space).count() - - counts.recipes_internal = Recipe.objects.filter(internal=True, space=request.space).count() - counts.recipes_external = counts.recipes - counts.recipes_internal - - counts.recipes_no_keyword = Recipe.objects.filter(keywords=None, space=request.space).count() - - invite_links = InviteLinkTable( - InviteLink.objects.filter(valid_until__gte=datetime.today(), used_by=None, space=request.space).all()) - RequestConfig(request, paginate={'per_page': 25}).configure(invite_links) - - space_form = SpacePreferenceForm(instance=request.space) - - space_form.base_fields['food_inherit'].queryset = Food.inheritable_fields - if request.method == "POST" and 'space_form' in request.POST: - form = SpacePreferenceForm(request.POST, prefix='space') - if form.is_valid(): - request.space.food_inherit.set(form.cleaned_data['food_inherit']) - request.space.show_facet_count = form.cleaned_data['show_facet_count'] - request.space.save() - if form.cleaned_data['reset_food_inherit']: - Food.reset_inheritance(space=request.space) - - return render(request, 'space.html', { - 'space_users': space_users, - 'counts': counts, - 'invite_links': invite_links, - 'space_form': space_form - }) - - -# TODO super hacky and quick solution, safe but needs rework -# TODO move group settings to space to prevent permissions from one space to move to another -@group_required('admin') -def space_change_member(request, user_id, space_id, group): - m_space = get_object_or_404(Space, pk=space_id) - m_user = get_object_or_404(User, pk=user_id) - if request.user == m_space.created_by and m_user != m_space.created_by: - if m_user.userpreference.space == m_space: - if group == 'admin': - m_user.groups.clear() - m_user.groups.add(Group.objects.get(name='admin')) - return HttpResponseRedirect(reverse('view_space')) - if group == 'user': - m_user.groups.clear() - m_user.groups.add(Group.objects.get(name='user')) - return HttpResponseRedirect(reverse('view_space')) - if group == 'guest': - m_user.groups.clear() - m_user.groups.add(Group.objects.get(name='guest')) - return HttpResponseRedirect(reverse('view_space')) - if group == 'remove': - m_user.groups.clear() - m_user.userpreference.space = None - m_user.userpreference.save() - return HttpResponseRedirect(reverse('view_space')) - return HttpResponseRedirect(reverse('view_space')) +def space_manage(request, space_id): + space = get_object_or_404(Space, id=space_id) + switch_user_active_space(request.user, space) + return render(request, 'space_manage.html', {}) def report_share_abuse(request, token): diff --git a/vue/src/apps/SpaceManageView/SpaceManageView.vue b/vue/src/apps/SpaceManageView/SpaceManageView.vue new file mode 100644 index 00000000..442602db --- /dev/null +++ b/vue/src/apps/SpaceManageView/SpaceManageView.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/vue/src/apps/SpaceManageView/main.js b/vue/src/apps/SpaceManageView/main.js new file mode 100644 index 00000000..91e5c85f --- /dev/null +++ b/vue/src/apps/SpaceManageView/main.js @@ -0,0 +1,18 @@ +import Vue from 'vue' +import App from './SpaceManageView.vue' +import i18n from '@/i18n' + +Vue.config.productionTip = false + +// TODO move this and other default stuff to centralized JS file (verify nothing breaks) +let publicPath = localStorage.STATIC_URL + 'vue/' +if (process.env.NODE_ENV === 'development') { + publicPath = 'http://localhost:8080/' +} +export default __webpack_public_path__ = publicPath // eslint-disable-line + + +new Vue({ + i18n, + render: h => h(App), +}).$mount('#app') diff --git a/vue/src/components/Modals/DateInput.vue b/vue/src/components/Modals/DateInput.vue new file mode 100644 index 00000000..be53c8d2 --- /dev/null +++ b/vue/src/components/Modals/DateInput.vue @@ -0,0 +1,36 @@ + + + diff --git a/vue/src/components/Modals/GenericModalForm.vue b/vue/src/components/Modals/GenericModalForm.vue index 6073ee70..00689746 100644 --- a/vue/src/components/Modals/GenericModalForm.vue +++ b/vue/src/components/Modals/GenericModalForm.vue @@ -14,6 +14,7 @@ +