From 9aa0056bacc1a95e0b03a13280f26cf2e360d12b Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Thu, 4 Sep 2025 16:59:41 +0200 Subject: [PATCH] Backup --- src/new/src/PSC/Shop/MediaBundle/Api/One.php | 15 ++- .../src/PSC/Shop/OrderBundle/Service/Calc.php | 51 +++++--- .../Transformer/Order/Position.php | 116 ++++++++++-------- .../ProductBundle/Transformer/Product.php | 107 +++++++++------- .../src/PSC/Shop/ShippingBundle/Api/All.php | 80 ++++++------ .../src/PSC/Shop/ShippingBundle/Api/One.php | 28 ++--- .../System/SettingsBundle/Api/Paper/All.php | 51 ++++---- .../System/SettingsBundle/Api/Paper/One.php | 51 ++++---- .../SettingsBundle/Api/Paper/Update.php | 45 +++---- .../SettingsBundle/Api/Papercontainer/Get.php | 36 +++--- .../Api/Papercontainer/Update.php | 50 ++++---- .../System/SettingsBundle/Api/Status/All.php | 58 +++++---- .../tests/PSC/Shop/Media/Api/UploadTest.php | 3 + .../Service/CalcContactAccountTypeTest.php | 12 +- .../tests/PSC/Shop/Order/Service/CalcTest.php | 9 +- .../System/PSC/XmlCalc/Api/GetPriceTest.php | 27 +++- .../components/app/preview/RenderElements.vue | 6 + .../app/preview/elements/MediaElement.vue | 28 +++++ .../FormBuilder/FormBuilderTS/src/lib/api.ts | 6 +- .../FormBuilder/FormBuilderTS/vite.config.ts | 2 +- .../public/formbuilderts/assets/index.js | 102 +++++++-------- .../views/backend/order/send.html.twig | 5 +- .../System/PSC/XmlCalc/Api/GetPrice.php | 36 +++--- 23 files changed, 502 insertions(+), 422 deletions(-) create mode 100644 src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/preview/elements/MediaElement.vue diff --git a/src/new/src/PSC/Shop/MediaBundle/Api/One.php b/src/new/src/PSC/Shop/MediaBundle/Api/One.php index 2971bf50d..30ad18dfd 100644 --- a/src/new/src/PSC/Shop/MediaBundle/Api/One.php +++ b/src/new/src/PSC/Shop/MediaBundle/Api/One.php @@ -8,8 +8,11 @@ use Nelmio\ApiDocBundle\Attribute\Model; use OpenApi\Attributes\JsonContent; use OpenApi\Attributes\Response; use OpenApi\Attributes\Tag; +use PSC\Shop\MediaBundle\Document\Media as PSCMedia; use PSC\Shop\MediaBundle\Model\Media; +use PSC\Shop\MediaBundle\Transformer\Media as AliasedMedia; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Response as SymfonyResponse; use Symfony\Component\Routing\Attribute\Route; class One extends AbstractController @@ -17,13 +20,19 @@ class One extends AbstractController public function __construct( private readonly DocumentManager $dm, private readonly PaginatorInterface $paginator, + private readonly AliasedMedia $mediaTransformer, ) {} #[Response(response: 200, description: 'get media', content: new JsonContent(ref: new Model(type: Media::class)))] - #[Route(path: '/media/{uuid}', methods: ['GET'])] + #[Route(path: '/{uuid}', methods: ['GET'])] #[Tag('Media')] - public function one(string $uuid): string + public function one(string $uuid): SymfonyResponse { - return $this->json(new Media()); + $media = $this->dm->getRepository(PSCMedia::class)->find($uuid); + + $model = new Media(); + $this->mediaTransformer->fromDb($model, $media); + + return $this->json($model); } } diff --git a/src/new/src/PSC/Shop/OrderBundle/Service/Calc.php b/src/new/src/PSC/Shop/OrderBundle/Service/Calc.php index f81ae1e59..c715605ee 100755 --- a/src/new/src/PSC/Shop/OrderBundle/Service/Calc.php +++ b/src/new/src/PSC/Shop/OrderBundle/Service/Calc.php @@ -12,26 +12,23 @@ use PSC\Shop\VoucherBundle\Service\Calc as CalcVoucher; use PSC\Shop\VoucherBundle\Transformer\Voucher as PSCVoucher; use PSC\System\PluginBundle\Service\ProductType; -class Calc +readonly class Calc { public function __construct( - private readonly Price $pricePayment, - private readonly Shop $shopTransformer, - private readonly \PSC\Shop\ShippingBundle\Service\Price $priceShipping, - private readonly ProductType $productTypeRegistry, - private readonly Shipping $shippingTransformer, - private readonly Payment $paymentTransformer, - private readonly VatCalc $vatCalcService, - private readonly CalcVoucher $voucherCalcService, - private readonly PSCVoucher $voucherTransformer - ) { - - } + private Price $pricePayment, + private Shop $shopTransformer, + private \PSC\Shop\ShippingBundle\Service\Price $priceShipping, + private ProductType $productTypeRegistry, + private Shipping $shippingTransformer, + private Payment $paymentTransformer, + private VatCalc $vatCalcService, + private CalcVoucher $voucherCalcService, + private PSCVoucher $voucherTransformer, + ) {} public function calcOrder(\PSC\Shop\OrderBundle\Model\Base $order) { - - if ($order->getShop()->getUuid() != "") { + if ($order->getShop()->getUuid() != '') { $this->shopTransformer->parseModel($order->getShop()); } $priceNet = Money::ofMinor(0, 'EUR'); @@ -45,19 +42,33 @@ class Calc $priceVat = $priceVat->plus(Money::ofMinor($order->getPayment()->getCalcPrice()->vat, 'EUR')); $priceGross = $priceGross->plus(Money::ofMinor($order->getPayment()->getCalcPrice()->gross, 'EUR')); - $order->setPaymentCosts(Money::ofMinor($order->getPayment()->getCalcPrice()->net, 'EUR')->getMinorAmount()->toInt()); + $order->setPaymentCosts( + Money::ofMinor($order->getPayment()->getCalcPrice()->net, 'EUR')->getMinorAmount()->toInt(), + ); $order->addTax($order->getPayment()->getCalcPrice()->tax); $this->shippingTransformer->parseModel($order->getShipping()); - $this->priceShipping->getPrice($order->getShipping(), $order->getNet(), $order->getWeight(), (string)$order->getDeliveryAddress()->getCountry(), (int)$order->getDeliveryAddress()->getZip()); + $this->priceShipping->getPrice( + $order->getShipping(), + $order->getNet(), + $order->getWeight(), + (string) $order->getDeliveryAddress()->getCountry(), + (int) $order->getDeliveryAddress()->getZip(), + ); $priceNet = $priceNet->plus(Money::ofMinor($order->getShipping()->getCalcPrice()->net, 'EUR')); $priceVat = $priceVat->plus(Money::ofMinor($order->getShipping()->getCalcPrice()->vat, 'EUR')); $priceGross = $priceGross->plus(Money::ofMinor($order->getShipping()->getCalcPrice()->gross, 'EUR')); - $order->setShippingCosts(Money::ofMinor($order->getShipping()->getCalcPrice()->net, 'EUR')->getMinorAmount()->toInt()); + $order->setShippingCosts( + Money::ofMinor($order->getShipping()->getCalcPrice()->net, 'EUR')->getMinorAmount()->toInt(), + ); $order->addTax($order->getShipping()->getCalcPrice()->tax); foreach ($order->getPositions() as $position) { $position->getProduct()->setShopUuid($order->getShop()->getUuid()); - if ($this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())) { - $specialProductTransformer = $this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())->getProducer(); + if ( + $this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp()) + ) { + $specialProductTransformer = $this->productTypeRegistry + ->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp()) + ->getProducer(); if ($specialProductTransformer) { if ($specialProductTransformer instanceof ICalcNeedContact) { $specialProductTransformer->setContact($order->getContact()); diff --git a/src/new/src/PSC/Shop/OrderBundle/Transformer/Order/Position.php b/src/new/src/PSC/Shop/OrderBundle/Transformer/Order/Position.php index 0bed39f51..10aa655fa 100755 --- a/src/new/src/PSC/Shop/OrderBundle/Transformer/Order/Position.php +++ b/src/new/src/PSC/Shop/OrderBundle/Transformer/Order/Position.php @@ -27,15 +27,21 @@ class Position extends Base private ProductType $productTypeRegistry; #[\Symfony\Contracts\Service\Attribute\Required] - public function setProductService(\PSC\Shop\ProductBundle\Service\Product $productService, ProductType $productTypeRegistry, \PSC\Shop\ProductBundle\Hydrate\Product $productHydrate) - { + public function setProductService( + \PSC\Shop\ProductBundle\Service\Product $productService, + ProductType $productTypeRegistry, + \PSC\Shop\ProductBundle\Hydrate\Product $productHydrate, + ) { $this->productService = $productService; $this->productTypeRegistry = $productTypeRegistry; $this->productHydrate = $productHydrate; } - public function toDb(\PSC\Shop\OrderBundle\Model\Order\Position $position, Orderpos $positionEntity, \PSC\Shop\EntityBundle\Document\Position $positionDoc): void - { + public function toDb( + \PSC\Shop\OrderBundle\Model\Order\Position $position, + Orderpos $positionEntity, + \PSC\Shop\EntityBundle\Document\Position $positionDoc, + ): void { $positionEntity->setPos($position->getPos()); $positionEntity->setUuid($position->getUuid()); $positionEntity->setTyp($position->getProduct()->getSpecialProductTypeObject()->getTyp()); @@ -50,15 +56,16 @@ class Position extends Base $positionEntity->setPriceAllSteuer($position->getPrice()->getAllVat() / 100); $positionEntity->setPriceOneSteuer($position->getPrice()->getVat() / 100); $positionEntity->setResalePrice(0); - $positionEntity->setBasketField1((string)$position->getBasketField1()); - $positionEntity->setBasketField2((string)$position->getBasketField2()); + $positionEntity->setBasketField1((string) $position->getBasketField1()); + $positionEntity->setBasketField2((string) $position->getBasketField2()); if ($position->getProduct()->getUuid()) { /** - * @var Product $product -*/ + * @var Product $product + */ $product = $this->entityManager - ->getRepository('PSC\Shop\EntityBundle\Entity\Product')->findOneBy(array('uuid' => $position->getProduct()->getUuid())); + ->getRepository('PSC\Shop\EntityBundle\Entity\Product') + ->findOneBy(['uuid' => $position->getProduct()->getUuid()]); if ($position->isCopyProduct()) { $product = $this->productService->copy($product, false, true); @@ -68,8 +75,8 @@ class Position extends Base } /** - * DOC -*/ + * DOC + */ $temp = []; foreach ($position->getAdditionalInfos() as $key => $info) { if (is_object($info) && method_exists($info, 'asArray')) { @@ -81,13 +88,19 @@ class Position extends Base $positionDoc->setAdditionalInfos($temp); $positionDoc->setCustomerInfo($position->getCustomerInfo()); $positionDoc->setExternalOrderNumber($position->getExternalOrderNumber()); - $positionDoc->setSpecialProductTypeObject($position->getProduct()->getSpecialProductTypeObject()->getPositionData()); + $positionDoc->setSpecialProductTypeObject( + $position->getProduct()->getSpecialProductTypeObject()->getPositionData(), + ); /** - * Plugin Special Savings -*/ - if ($this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())) { - $specialProductTransformer = $this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp())->getPositionProductTransformer(); + * Plugin Special Savings + */ + if ( + $this->productTypeRegistry->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp()) + ) { + $specialProductTransformer = $this->productTypeRegistry + ->getProductType($position->getProduct()->getSpecialProductTypeObject()->getTyp()) + ->getPositionProductTransformer(); $specialProductTransformer->toDb($position, $positionEntity, $positionDoc); } else { $position->getProduct()->setSpecialProductTypeObject(new DummyProductTypeObject()); @@ -95,50 +108,49 @@ class Position extends Base $positionEntity->setWeight($position->getWeight()); } - public function fromDb(\PSC\Shop\OrderBundle\Model\Order\Position $position, Orderpos $pos, \PSC\Shop\EntityBundle\Document\Position $positionDoc): void - { + public function fromDb( + \PSC\Shop\OrderBundle\Model\Order\Position $position, + Orderpos $pos, + \PSC\Shop\EntityBundle\Document\Position $positionDoc, + ): void { $position->setProduct(new \PSC\Shop\ProductBundle\Model\Product()); - if ($pos->getProduct()) { - $position->setProduct($this->productHydrate->hydrateToModel($pos->getProduct())); $tax = new Tax(); - $tax->setName((int)$pos->getProduct()->getMwert() * 100); - $tax->setBasisAmount((int)$pos->getPriceAllNetto() * 100); - $tax->setCalculatedAmount((int)$pos->getPriceAllSteuer() * 100); + $tax->setName(((int) $pos->getProduct()->getMwert()) * 100); + $tax->setBasisAmount(((int) $pos->getPriceAllNetto()) * 100); + $tax->setCalculatedAmount(((int) $pos->getPriceAllSteuer()) * 100); $position->getPrice()->setTax($tax); - } else { $tax = new Tax(); $position->getPrice()->setTax($tax); - } $position->setPos($pos->getPos()); $position->setUuid($pos->getUuid()); $position->setUid($pos->getId()); $position->getPrice()->setCount($pos->getCount()); - $position->getPrice()->setNet((int)($pos->getPriceOneNetto() * 100)); - $position->getPrice()->setAllNet((int)($pos->getPriceAllNetto() * 100)); - $position->getPrice()->setVat((int)($pos->getPriceOneSteuer() * 100)); - $position->getPrice()->setAllVat((int)($pos->getPriceAllSteuer() * 100)); - $position->getPrice()->setGross((int)($pos->getPriceOneBrutto() * 100)); - $position->getPrice()->setAllGross((int)($pos->getPriceAllBrutto() * 100)); + $position->getPrice()->setNet((int) ($pos->getPriceOneNetto() * 100)); + $position->getPrice()->setAllNet((int) ($pos->getPriceAllNetto() * 100)); + $position->getPrice()->setVat((int) ($pos->getPriceOneSteuer() * 100)); + $position->getPrice()->setAllVat((int) ($pos->getPriceAllSteuer() * 100)); + $position->getPrice()->setGross((int) ($pos->getPriceOneBrutto() * 100)); + $position->getPrice()->setAllGross((int) ($pos->getPriceAllBrutto() * 100)); $position->setReOrder($positionDoc->isReOrder()); $position->setReOrderOrder($positionDoc->getReOrderOrder()); $position->setReOrderPos($positionDoc->getReOrderPos()); $position->setStatus($pos->getStatus()); $position->setData($pos->getData()); $position->setDownloadAllowed($positionDoc->isDownloadAllowed()); - $position->setBasketField1((string)$pos->getBasketField1()); - $position->setBasketField2((string)$pos->getBasketField2()); - $position->setLayouterMode((int)$pos->getLayouterMode()); - $position->setWeight((int)$pos->getWeight()); - $position->setUploadMode((string)$positionDoc->getUploadMode()); + $position->setBasketField1((string) $pos->getBasketField1()); + $position->setBasketField2((string) $pos->getBasketField2()); + $position->setLayouterMode((int) $pos->getLayouterMode()); + $position->setWeight((int) $pos->getWeight()); + $position->setUploadMode((string) $positionDoc->getUploadMode()); /** - * @var \PSC\Shop\EntityBundle\Document\Tracking $tracking -*/ + * @var \PSC\Shop\EntityBundle\Document\Tracking $tracking + */ foreach ($positionDoc->getTrackings() as $tracking) { $tr = new Tracking(); $tr->setShippingProvider($tracking->getShippingProvider()); @@ -148,21 +160,21 @@ class Position extends Base } /** - * @var \PSC\Shop\EntityBundle\Entity\Upload $up -*/ + * @var \PSC\Shop\EntityBundle\Entity\Upload $up + */ foreach ($pos->getUploads() as $up) { $upload = new Upload(); - $upload->setFileName((string)$up->getName()); - $upload->setChunkTitle((string)$up->getChunktitle()); - $upload->setTyp((string)$up->getTyp()); - $upload->setUuid((string)$up->getUuid()); - $upload->setPath((string)$up->getPath()); + $upload->setFileName((string) $up->getName()); + $upload->setChunkTitle((string) $up->getChunktitle()); + $upload->setTyp((string) $up->getTyp()); + $upload->setUuid((string) $up->getUuid()); + $upload->setPath((string) $up->getPath()); $position->addUpload($upload); } /** - * DOC -*/ + * DOC + */ if ($positionDoc->getExternalOrderNumber()) { $position->setExternalOrderNumber($positionDoc->getExternalOrderNumber()); @@ -170,18 +182,22 @@ class Position extends Base if (is_array($positionDoc->getAdditionalInfos())) { $position->setAdditionalInfos($positionDoc->getAdditionalInfos()); } - $position->setCustomerInfo((string)$positionDoc->getCustomerInfo()); + $position->setCustomerInfo((string) $positionDoc->getCustomerInfo()); if ($pos->getProduct()) { if ($this->productTypeRegistry->getProductType($pos->getProduct()->getType())) { - $specialProductTransformer = $this->productTypeRegistry->getProductType($pos->getProduct()->getType())->getPositionProductTransformer(); + $specialProductTransformer = $this->productTypeRegistry + ->getProductType($pos->getProduct()->getType()) + ->getPositionProductTransformer(); $specialProductTransformer->fromDb($position, $pos, $positionDoc); } else { $position->getProduct()->setSpecialProductTypeObject(new DummyProductTypeObject()); } } else { if ($this->productTypeRegistry->getProductType($pos->getTyp())) { - $specialProductTransformer = $this->productTypeRegistry->getProductType($pos->getTyp())->getPositionProductTransformer(); + $specialProductTransformer = $this->productTypeRegistry + ->getProductType($pos->getTyp()) + ->getPositionProductTransformer(); $specialProductTransformer->fromDb($position, $pos, $positionDoc); } else { $position->getProduct()->setSpecialProductTypeObject(new DummyProductTypeObject()); diff --git a/src/new/src/PSC/Shop/ProductBundle/Transformer/Product.php b/src/new/src/PSC/Shop/ProductBundle/Transformer/Product.php index 4b0b6f638..9fd44df3a 100755 --- a/src/new/src/PSC/Shop/ProductBundle/Transformer/Product.php +++ b/src/new/src/PSC/Shop/ProductBundle/Transformer/Product.php @@ -14,21 +14,30 @@ use PSC\Shop\ProductBundle\Model\OriginalProduct; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -class Product +readonly class Product { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly DocumentManager $documentManager, private readonly \PSC\Shop\MediaBundle\Transformer\Media $mediaTransformer) - { + public function __construct( + private EntityManagerInterface $entityManager, + private DocumentManager $documentManager, + private \PSC\Shop\MediaBundle\Transformer\Media $mediaTransformer, + ) {} + + public function toDb( + \PSC\Shop\ProductBundle\Model\Product $product, + \PSC\Shop\EntityBundle\Entity\Product $productEntity, + \PSC\Shop\EntityBundle\Document\Product $productDoc, + ): void { } - public function toDb(\PSC\Shop\ProductBundle\Model\Product $product, \PSC\Shop\EntityBundle\Entity\Product $productEntity, \PSC\Shop\EntityBundle\Document\Product $productDoc): void - { - - } - - public function fromDb(\PSC\Shop\ProductBundle\Model\Product $product, \PSC\Shop\EntityBundle\Entity\Product $productEntity, ?\PSC\Shop\EntityBundle\Document\Product $productDoc = null): void - { - if($productDoc === null) { - $productDoc = $this->documentManager->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)->findOneBy(['uid' => $productEntity->getUid()]); + public function fromDb( + \PSC\Shop\ProductBundle\Model\Product $product, + \PSC\Shop\EntityBundle\Entity\Product $productEntity, + null|\PSC\Shop\EntityBundle\Document\Product $productDoc = null, + ): void { + if ($productDoc === null) { + $productDoc = $this->documentManager + ->getRepository(\PSC\Shop\EntityBundle\Document\Product::class) + ->findOneBy(['uid' => $productEntity->getUid()]); } $product->setUid($productEntity->getUID()); @@ -36,61 +45,68 @@ class Product $product->setUuid($productEntity->getUUID()); $product->setLanguage($productEntity->getLanguage()); $product->setLangData($productEntity->getLangData()); - $product->setTextArt((string)$productEntity->getTextArt()); - $product->setPrice((int)$productEntity->getPrice()); + $product->setTextArt((string) $productEntity->getTextArt()); + $product->setPrice((int) $productEntity->getPrice()); $product->setPackageFormat($productEntity->getPackageFormat()); - $product->setDescription((string)$productEntity->getDescription()); + $product->setDescription((string) $productEntity->getDescription()); $product->setShopUuid($productEntity->getShop()->getUuid()); - $product->setNrIntern((string)$productEntity->getNrIntern()); - $product->setNrExtern((string)$productEntity->getNrExtern()); - $product->setCustom1((string)$productDoc->getCustom1()); - $product->setCustom2((string)$productDoc->getCustom2()); - $product->setCustom3((string)$productDoc->getCustom3()); - $product->setCustom4((string)$productDoc->getCustom4()); - $product->setCustom5((string)$productDoc->getCustom5()); - $product->setCustom6((string)$productDoc->getCustom6()); - $product->setCustom7((string)$productDoc->getCustom7()); - $product->setCustom8((string)$productDoc->getCustom8()); - $product->setCustom9((string)$productDoc->getCustom9()); - $product->setCustom10((string)$productDoc->getCustom10()); + $product->setNrIntern((string) $productEntity->getNrIntern()); + $product->setNrExtern((string) $productEntity->getNrExtern()); + $product->setCustom1((string) $productDoc->getCustom1()); + $product->setCustom2((string) $productDoc->getCustom2()); + $product->setCustom3((string) $productDoc->getCustom3()); + $product->setCustom4((string) $productDoc->getCustom4()); + $product->setCustom5((string) $productDoc->getCustom5()); + $product->setCustom6((string) $productDoc->getCustom6()); + $product->setCustom7((string) $productDoc->getCustom7()); + $product->setCustom8((string) $productDoc->getCustom8()); + $product->setCustom9((string) $productDoc->getCustom9()); + $product->setCustom10((string) $productDoc->getCustom10()); - if($productDoc->getUploadProvidedFile() != "") { - $mediaDoc = $this->documentManager->getRepository(Media::class)->find(new ObjectId($productDoc->getUploadProvidedFile())); - if($mediaDoc) { + if ($productDoc->getUploadProvidedFile() != '') { + $mediaDoc = $this->documentManager + ->getRepository(Media::class) + ->find(new ObjectId($productDoc->getUploadProvidedFile())); + if ($mediaDoc) { $media = new \PSC\Shop\MediaBundle\Model\Media(); $this->mediaTransformer->fromDb($media, $mediaDoc); $product->setUploadProvidedFile($media); } } - if ($productEntity->getImage1() != "") { + if ($productEntity->getImage1() != '') { $file1 = $this->entityManager - ->getRepository('PSC\Shop\EntityBundle\Entity\Image')->findOneBy(['uid' => $productEntity->getImage1()]); + ->getRepository('PSC\Shop\EntityBundle\Entity\Image') + ->findOneBy(['uid' => $productEntity->getImage1()]); if ($file1) { $media = new \PSC\Shop\MediaBundle\Model\Media(); $media->setUrl($file1->getPath()); $product->setImage1($media); - }else{ - $mediaDoc = $this->documentManager->getRepository(Media::class)->find(new ObjectId($productEntity->getImage1())); - if($mediaDoc) { + } else { + $mediaDoc = $this->documentManager + ->getRepository(Media::class) + ->find(new ObjectId($productEntity->getImage1())); + if ($mediaDoc) { $media = new \PSC\Shop\MediaBundle\Model\Media(); $this->mediaTransformer->fromDb($media, $mediaDoc); $product->setImage1($media); } } - } - if ($productEntity->getImage2() != "") { + if ($productEntity->getImage2() != '') { $file2 = $this->entityManager - ->getRepository('PSC\Shop\EntityBundle\Entity\Image')->findOneBy(['uid' => $productEntity->getImage2()]); + ->getRepository('PSC\Shop\EntityBundle\Entity\Image') + ->findOneBy(['uid' => $productEntity->getImage2()]); if ($file2) { $media = new \PSC\Shop\MediaBundle\Model\Media(); $media->setUrl($file2->getPath()); $product->setImage2($media); - }else{ - $mediaDoc = $this->documentManager->getRepository(Media::class)->find(new ObjectId($productEntity->getImage2())); - if($mediaDoc) { + } else { + $mediaDoc = $this->documentManager + ->getRepository(Media::class) + ->find(new ObjectId($productEntity->getImage2())); + if ($mediaDoc) { $media = new \PSC\Shop\MediaBundle\Model\Media(); $this->mediaTransformer->fromDb($media, $mediaDoc); $product->setImage2($media); @@ -98,11 +114,13 @@ class Product } } - if($productEntity->getOriginalProduct() != 0) { + if ($productEntity->getOriginalProduct() != 0) { /** @var PSCProduct $subProduct */ - $subProduct = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class)->find($productEntity->getOriginalProduct()); + $subProduct = $this->entityManager + ->getRepository(\PSC\Shop\EntityBundle\Entity\Product::class) + ->find($productEntity->getOriginalProduct()); - if($subProduct) { + if ($subProduct) { $subProductObj = new OriginalProduct(); $subProductObj->setTitle($subProduct->getTitle()); $subProductObj->setUuid($subProduct->getUUID()); @@ -111,6 +129,5 @@ class Product $product->setOriginalProduct($subProductObj); } } - } } diff --git a/src/new/src/PSC/Shop/ShippingBundle/Api/All.php b/src/new/src/PSC/Shop/ShippingBundle/Api/All.php index 9ff2f9000..933ecb5d2 100755 --- a/src/new/src/PSC/Shop/ShippingBundle/Api/All.php +++ b/src/new/src/PSC/Shop/ShippingBundle/Api/All.php @@ -3,18 +3,20 @@ namespace PSC\Shop\ShippingBundle\Api; use Doctrine\ORM\EntityManagerInterface; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\Shop\EntityBundle\Entity\Shipping; use PSC\Shop\ShippingBundle\Dto\All\Output; use PSC\Shop\ShippingBundle\Model\Shipping as PSCShipping; use PSC\System\SettingsBundle\Service\Shop; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Nelmio\ApiDocBundle\Annotation\Security; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; +use Symfony\Component\Security\Http\Attribute\IsGranted; class All extends AbstractController { @@ -24,28 +26,29 @@ class All extends AbstractController private TokenStorageInterface $tokenStorage; - public function __construct(EntityManagerInterface $entityManager, Shop $shopService, TokenStorageInterface $tokenStorage) - { + public function __construct( + EntityManagerInterface $entityManager, + Shop $shopService, + TokenStorageInterface $tokenStorage, + ) { $this->entityManager = $entityManager; $this->shopService = $shopService; $this->tokenStorage = $tokenStorage; } - /** - * get all shipments - * - * @OA\Response( - * response=200, - * description="shipments", - * @OA\JsonContent(ref=@Model(type=\PSC\Shop\ShippingBundle\Dto\All\Output::class)) - * ) - * @OA\Tag(name="Shipping") - */ + #[Response( + response: 200, + description: 'get shippments', + content: new JsonContent(ref: new Model(type: Output::class)), + )] + #[Tag(name: 'Shipping')] #[Route(path: '/', methods: ['GET'])] public function all(): JsonResponse { $output = []; - $result = $this->entityManager->getRepository(Shipping::class)->findBy(['shop' => $this->shopService->getShopByDomain(), 'private' => 0]); + $result = $this->entityManager + ->getRepository(Shipping::class) + ->findBy(['shop' => $this->shopService->getShopByDomain(), 'private' => 0]); foreach ($result as $shipping) { $shipObj = new PSCShipping(); $shipObj->setUid($shipping->getUid()); @@ -56,17 +59,13 @@ class All extends AbstractController return $this->json(new Output($output)); } - /** - * get all shipments for shop Uuid - * - * @OA\Response( - * response=200, - * description="shipments", - * @OA\JsonContent(ref=@Model(type=\PSC\Shop\ShippingBundle\Dto\All\Output::class)) - * ) - * @OA\Tag(name="Shipping") - * @Security(name="Bearer") - */ + #[Response( + response: 200, + description: 'get shippments by shop uuid', + content: new JsonContent(ref: new Model(type: Output::class)), + )] + #[Tag(name: 'Shipping')] + #[Security(name: 'Bearer')] #[Route(path: '/by/shop/{shopUuid}', methods: ['GET'])] #[IsGranted('ROLE_SHOP')] public function byShops(string $shopUuid): JsonResponse @@ -85,23 +84,20 @@ class All extends AbstractController return $this->json(new Output($output)); } - /** - * get all shipments - * - * @OA\Response( - * response=200, - * description="shipments", - * @OA\JsonContent(ref=@Model(type=\PSC\Shop\ShippingBundle\Dto\All\Output::class)) - * ) - * @OA\Tag(name="Shipping") - * @Security(name="Bearer") - */ + #[Response( + response: 200, + description: 'get my shipments', + content: new JsonContent(ref: new Model(type: Output::class)), + )] + #[Tag(name: 'Shipping')] + #[Security(name: 'Bearer')] #[Route(path: '/my', methods: ['GET'])] - #[IsGranted('ROLE_USER')] public function my(): JsonResponse { $output = []; - $result = $this->entityManager->getRepository(Shipping::class)->findBy(['shop' => $this->shopService->getShopByDomain(), 'private' => 0]); + $result = $this->entityManager + ->getRepository(Shipping::class) + ->findBy(['shop' => $this->shopService->getShopByDomain(), 'private' => 0]); foreach ($result as $shipping) { $shipObj = new PSCShipping(); $shipObj->setUid($shipping->getUid()); diff --git a/src/new/src/PSC/Shop/ShippingBundle/Api/One.php b/src/new/src/PSC/Shop/ShippingBundle/Api/One.php index a53b85aaa..5055d76d7 100755 --- a/src/new/src/PSC/Shop/ShippingBundle/Api/One.php +++ b/src/new/src/PSC/Shop/ShippingBundle/Api/One.php @@ -3,15 +3,17 @@ namespace PSC\Shop\ShippingBundle\Api; use Doctrine\ORM\EntityManagerInterface; +use Nelmio\ApiDocBundle\Attribute\Model; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\Component\ApiBundle\Dto\Error\NotFound; use PSC\Shop\EntityBundle\Entity\Shipping as PSCShipping; use PSC\Shop\ShippingBundle\Model\Shipping; use PSC\System\SettingsBundle\Service\Shop; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; +use Symfony\Component\Routing\Attribute\Route; class One extends AbstractController { @@ -25,20 +27,18 @@ class One extends AbstractController $this->shopService = $shopService; } - /** - * get all shipment - * - * @OA\Response( - * response=200, - * description="shippings", - * @OA\JsonContent(ref=@Model(type=\PSC\Shop\ShippingBundle\Model\Shipping::class)) - * ) - * @OA\Tag(name="Shipping") - */ + #[Response( + response: 200, + description: 'get one shipping', + content: new JsonContent(ref: new Model(type: Shipping::class)), + )] + #[Tag(name: 'Shipping')] #[Route(path: '/{id}', methods: ['GET'])] public function one(string $id): JsonResponse { - $result = $this->entityManager->getRepository(PSCShipping::class)->findOneBy(['shop' => $this->shopService->getShopByDomain(), 'private' => 0, 'uid' => $id]); + $result = $this->entityManager + ->getRepository(PSCShipping::class) + ->findOneBy(['shop' => $this->shopService->getShopByDomain(), 'private' => 0, 'uid' => $id]); if ($result) { $output = new Shipping(); diff --git a/src/new/src/PSC/System/SettingsBundle/Api/Paper/All.php b/src/new/src/PSC/System/SettingsBundle/Api/Paper/All.php index 9c558255e..13a9a9554 100755 --- a/src/new/src/PSC/System/SettingsBundle/Api/Paper/All.php +++ b/src/new/src/PSC/System/SettingsBundle/Api/Paper/All.php @@ -4,34 +4,33 @@ namespace PSC\System\SettingsBundle\Api\Paper; use Doctrine\ODM\MongoDB\DocumentManager; use Doctrine\ORM\EntityManagerInterface; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\Shop\EntityBundle\Entity\Paper; -use PSC\System\SettingsBundle\Service\Shop; +use PSC\System\SettingsBundle\Dto\Paper\All\Output; +use PSC\System\SettingsBundle\Model\Paper as PSCPaper; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use PSC\System\SettingsBundle\Dto\Paper\All\Output; -use Nelmio\ApiDocBundle\Annotation\Model; -use PSC\System\SettingsBundle\Model\Paper as PSCPaper; -use Nelmio\ApiDocBundle\Annotation\Security; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; +use Symfony\Component\Routing\Attribute\Route; +use Symfony\Component\Security\Http\Attribute\IsGranted; class All extends AbstractController { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly DocumentManager $documentManager) - { - } - /** - * get all paper - * - * @OA\Response( - * response=200, - * description="get all paper", - * @OA\JsonContent(ref=@Model(type=\PSC\System\SettingsBundle\Dto\Paper\All\Output::class)) - * ) - * @OA\Tag(name="PaperDB") - * @Security(name="ApiKeyAuth") - */ + public function __construct( + private readonly EntityManagerInterface $entityManager, + private readonly DocumentManager $documentManager, + ) {} + + #[Response( + response: 200, + description: 'get all paper', + content: new JsonContent(ref: new Model(type: Output::class)), + )] + #[Tag(name: 'PaperDB')] + #[Security(name: 'ApiKeyAuth')] #[Route(path: '/paperdb', methods: ['GET'])] #[IsGranted('ROLE_API')] public function all(): JsonResponse @@ -42,7 +41,7 @@ class All extends AbstractController /** @var \PSC\Shop\EntityBundle\Document\Paper $paperDoc */ $paperDoc = $this->documentManager ->getRepository('PSC\Shop\EntityBundle\Document\Paper') - ->findOneBy(array('uid' => (string)$paper->getId())); + ->findOneBy(['uid' => (string) $paper->getId()]); $paperObj = new PSCPaper(); if ($paperDoc) { if ($paperDoc->isPapierTyp1()) { @@ -111,9 +110,9 @@ class All extends AbstractController } $paperObj->setId($paper->getId()); $paperObj->setArtNr($paper->getArtNr()); - $paperObj->setDescription1((string)$paper->getDescription1()); - $paperObj->setDescription2((string)$paper->getDescription2()); - $paperObj->setGrammatur((int)$paper->getGrammatur()); + $paperObj->setDescription1((string) $paper->getDescription1()); + $paperObj->setDescription2((string) $paper->getDescription2()); + $paperObj->setGrammatur((int) $paper->getGrammatur()); $paperObj->setPrice($paper->getPreis()); $output[] = $paperObj; } diff --git a/src/new/src/PSC/System/SettingsBundle/Api/Paper/One.php b/src/new/src/PSC/System/SettingsBundle/Api/Paper/One.php index 91f157a77..7da87bbb4 100755 --- a/src/new/src/PSC/System/SettingsBundle/Api/Paper/One.php +++ b/src/new/src/PSC/System/SettingsBundle/Api/Paper/One.php @@ -4,34 +4,33 @@ namespace PSC\System\SettingsBundle\Api\Paper; use Doctrine\ODM\MongoDB\DocumentManager; use Doctrine\ORM\EntityManagerInterface; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\Component\ApiBundle\Dto\Error\NotFound; use PSC\Shop\EntityBundle\Entity\Paper; -use PSC\System\SettingsBundle\Service\Shop; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; use PSC\System\SettingsBundle\Model\Paper as PSCPaper; use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Nelmio\ApiDocBundle\Annotation\Security; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\Routing\Attribute\Route; class One extends AbstractController { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly DocumentManager $documentManager) - { - } - /** - * get one paper - * - * @OA\Response( - * response=200, - * description="get one paper", - * @OA\JsonContent(ref=@Model(type=\PSC\System\SettingsBundle\Model\Paper::class)) - * ) - * @Security(name="ApiKeyAuth") - * @OA\Tag(name="PaperDB") - */ + public function __construct( + private readonly EntityManagerInterface $entityManager, + private readonly DocumentManager $documentManager, + ) {} + + #[Response( + response: 200, + description: 'get one paper', + content: new JsonContent(ref: new Model(type: Paper::class)), + )] + #[Tag(name: 'PaperDB')] + #[Security(name: 'ApiKeyAuth')] #[Route(path: '/paperdb/{artNr}', methods: ['GET'])] #[IsGranted('ROLE_API')] public function one(string $artNr): JsonResponse @@ -41,7 +40,7 @@ class One extends AbstractController /** @var \PSC\Shop\EntityBundle\Document\Paper $paperDoc */ $paperDoc = $this->documentManager ->getRepository('PSC\Shop\EntityBundle\Document\Paper') - ->findOneBy(array('uid' => (string)$paper->getId())); + ->findOneBy(['uid' => (string) $paper->getId()]); $paperObj = new PSCPaper(); if ($paperDoc) { if ($paperDoc->isPapierTyp1()) { @@ -111,12 +110,12 @@ class One extends AbstractController $paperObj->setId($paper->getId()); $paperObj->setArtNr($paper->getArtNr()); - $paperObj->setDescription1((string)$paper->getDescription1()); - $paperObj->setDescription2((string)$paper->getDescription2()); - $paperObj->setGrammatur((int)$paper->getGrammatur()); + $paperObj->setDescription1((string) $paper->getDescription1()); + $paperObj->setDescription2((string) $paper->getDescription2()); + $paperObj->setGrammatur((int) $paper->getGrammatur()); $paperObj->setPrice($paper->getPreis()); } else { - $paperObj = new NotFound("paper not found"); + $paperObj = new NotFound('paper not found'); } return $this->json($paperObj); } diff --git a/src/new/src/PSC/System/SettingsBundle/Api/Paper/Update.php b/src/new/src/PSC/System/SettingsBundle/Api/Paper/Update.php index ff144fe51..e1e28c8c3 100755 --- a/src/new/src/PSC/System/SettingsBundle/Api/Paper/Update.php +++ b/src/new/src/PSC/System/SettingsBundle/Api/Paper/Update.php @@ -2,19 +2,22 @@ namespace PSC\System\SettingsBundle\Api\Paper; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Doctrine\ORM\EntityManagerInterface; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\RequestBody; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\Component\ApiBundle\Dto\Error\NotFound; use PSC\Shop\EntityBundle\Entity\Paper as PSCPaper; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use PSC\System\SettingsBundle\Model\Paper; -use Symfony\Component\HttpFoundation\JsonResponse; -use Nelmio\ApiDocBundle\Annotation\Security; use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; +use Symfony\Component\Routing\Attribute\Route; class Update extends AbstractController { @@ -25,25 +28,17 @@ class Update extends AbstractController $this->entityManager = $entityManager; } - /** - * change paper - * - * @OA\Response( - * response=200, - * description="update paper", - * @OA\JsonContent(ref=@Model(type=\PSC\System\SettingsBundle\Model\Paper::class)) - * ) - * @OA\RequestBody( - * description="This is a request body", - * @Model(type=\PSC\System\SettingsBundle\Model\Paper::class) - * ) - * @OA\Tag(name="PaperDB") - * @Security(name="ApiKeyAuth") - */ + #[Response( + response: 200, + description: 'update paper', + content: new JsonContent(ref: new Model(type: Paper::class)), + )] + #[RequestBody(ref: new Model(type: Paper::class))] + #[Tag(name: 'PaperDB')] + #[Security(name: 'ApiKeyAuth')] #[Route(path: '/paperdb/update/{artNr}', methods: ['PUT'])] - #[ParamConverter('paperObj', class: '\PSC\System\SettingsBundle\Model\Paper', converter: 'psc_rest.request_body')] #[IsGranted('ROLE_API')] - public function update(string $artNr, Paper $paperObj): JsonResponse + public function update(string $artNr, #[MapRequestPayload] Paper $paperObj): JsonResponse { $paper = $this->entityManager->getRepository(PSCPaper::class)->findOneBy(['artNr' => $artNr]); diff --git a/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Get.php b/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Get.php index 053e856e2..329d02b44 100755 --- a/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Get.php +++ b/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Get.php @@ -2,38 +2,34 @@ namespace PSC\System\SettingsBundle\Api\Papercontainer; -use Doctrine\ORM\EntityManagerInterface; -use PSC\Component\ApiBundle\Dto\Error\NotFound; -use PSC\Shop\EntityBundle\Entity\Paper; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\System\SettingsBundle\Model\Papercontainer; use PSC\System\SettingsBundle\Service\Shop; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; -use PSC\System\SettingsBundle\Model\Paper as PSCPaper; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Nelmio\ApiDocBundle\Annotation\Security; +use Symfony\Component\Routing\Attribute\Route; +use Symfony\Component\Security\Http\Attribute\IsGranted; class Get extends AbstractController { private Shop $shopService; + public function __construct(Shop $shopService) { $this->shopService = $shopService; } - /** - * get papercontainer - * - * @OA\Response( - * response=200, - * description="get papercontainer", - * @OA\JsonContent(ref=@Model(type=\PSC\System\SettingsBundle\Model\Papercontainer::class)) - * ) - * @Security(name="Bearer") - * @OA\Tag(name="PaperDB") - */ + + #[Response( + response: 200, + description: 'get papercontainer', + content: new JsonContent(ref: new Model(type: Papercontainer::class)), + )] + #[Tag(name: 'PaperDB')] + #[Security(name: 'Bearer')] #[Route(path: '/papercontainer', methods: ['GET'])] #[IsGranted('ROLE_USER')] public function getPapercontainer(): JsonResponse diff --git a/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Update.php b/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Update.php index 34ac4621b..de526ce6e 100755 --- a/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Update.php +++ b/src/new/src/PSC/System/SettingsBundle/Api/Papercontainer/Update.php @@ -2,20 +2,20 @@ namespace PSC\System\SettingsBundle\Api\Papercontainer; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Doctrine\ORM\EntityManagerInterface; -use PSC\Component\ApiBundle\Dto\Error\NotFound; -use PSC\Shop\EntityBundle\Entity\Paper; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\RequestBody; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use PSC\System\SettingsBundle\Model\Papercontainer; use PSC\System\SettingsBundle\Service\Shop; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; -use PSC\System\SettingsBundle\Model\Paper as PSCPaper; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Nelmio\ApiDocBundle\Annotation\Security; +use Symfony\Component\Routing\Attribute\Route; +use Symfony\Component\Security\Http\Attribute\IsGranted; class Update extends AbstractController { @@ -28,24 +28,22 @@ class Update extends AbstractController $this->shopService = $shopService; $this->entityManager = $entityManager; } - /** - * update papercontainer - * - * @OA\Response( - * response=200, - * description="update papercontainer", - * @OA\JsonContent(ref=@Model(type=\PSC\System\SettingsBundle\Model\Papercontainer::class)) - * ) - * @OA\RequestBody( - * description="This is a request body", - * @Model(type=\PSC\System\SettingsBundle\Model\Papercontainer::class)) - * ) - * @IsGranted("ROLE_USER") - * @Security(name="Bearer") - * @OA\Tag(name="PaperDB") - */ + + #[Response( + response: 200, + description: 'update papercontainer', + content: new JsonContent(ref: new Model(type: Papercontainer::class)), + )] + #[Tag(name: 'PaperDB')] + #[Security(name: 'Bearer')] #[Route(path: '/papercontainer', methods: ['PUT'])] - #[ParamConverter('papercontainer', class: '\PSC\System\SettingsBundle\Model\Papercontainer', converter: 'psc_rest.request_body')] + #[RequestBody(ref: new Model(type: Papercontainer::class))] + #[ParamConverter( + 'papercontainer', + class: '\PSC\System\SettingsBundle\Model\Papercontainer', + converter: 'psc_rest.request_body', + )] + #[IsGranted('ROLE_USER')] public function updatePapercontainer(Papercontainer $papercontainer): JsonResponse { $install = $this->shopService->getShopByDomain()->getInstall(); diff --git a/src/new/src/PSC/System/SettingsBundle/Api/Status/All.php b/src/new/src/PSC/System/SettingsBundle/Api/Status/All.php index f33978c51..e2c4f2f91 100755 --- a/src/new/src/PSC/System/SettingsBundle/Api/Status/All.php +++ b/src/new/src/PSC/System/SettingsBundle/Api/Status/All.php @@ -3,16 +3,18 @@ namespace PSC\System\SettingsBundle\Api\Status; use Doctrine\ODM\MongoDB\DocumentManager; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; +use PSC\System\SettingsBundle\Document\Status as StatusDoc; +use PSC\System\SettingsBundle\Dto\Status\All\Output; +use PSC\System\SettingsBundle\Model\Status; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use PSC\System\SettingsBundle\Dto\Status\All\Output; -use Nelmio\ApiDocBundle\Annotation\Model; -use Nelmio\ApiDocBundle\Annotation\Security; -use PSC\System\SettingsBundle\Model\Status; -use PSC\System\SettingsBundle\Document\Status as StatusDoc; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; +use Symfony\Component\Routing\Attribute\Route; +use Symfony\Component\Security\Http\Attribute\IsGranted; class All extends AbstractController { @@ -22,18 +24,14 @@ class All extends AbstractController { $this->documentManager = $documentManager; } - /** - * get all statuse - * - * @OA\Response( - * response=200, - * description="get all paper", - * @OA\JsonContent(ref=@Model(type=\PSC\System\SettingsBundle\Dto\Status\All\Output::class)) - * ) - * @OA\Tag(name="Status") - * @Security(name="ApiKeyAuth") - * @Security(name="Bearer") - */ + + #[Response( + response: 200, + description: 'get all paper', + content: new JsonContent(ref: new Model(type: Output::class)), + )] + #[Tag(name: 'Status')] + #[Security(name: 'ApiKeyAuth')] #[Route(path: '/status', methods: ['GET'])] #[IsGranted('ROLE_SHOP')] public function all(): JsonResponse @@ -50,11 +48,11 @@ class All extends AbstractController foreach ($statusOrder as $status) { $tmp = new Status(); - $tmp->setCode((int)$status->getCode()); - $tmp->setColor((string)$status->getColor()); - $tmp->setExternalName((string)$status->getExternalName()); - $tmp->setInternalName((string)$status->getInternalName()); - $tmp->setUuid((string)$status->getId()); + $tmp->setCode((int) $status->getCode()); + $tmp->setColor((string) $status->getColor()); + $tmp->setExternalName((string) $status->getExternalName()); + $tmp->setInternalName((string) $status->getInternalName()); + $tmp->setUuid((string) $status->getId()); $tmpOrder[] = $tmp; } @@ -62,11 +60,11 @@ class All extends AbstractController foreach ($statusPosition as $status) { $tmp = new Status(); - $tmp->setCode((int)$status->getCode()); - $tmp->setColor((string)$status->getColor()); - $tmp->setExternalName((string)$status->getExternalName()); - $tmp->setInternalName((string)$status->getInternalName()); - $tmp->setUuid((string)$status->getId()); + $tmp->setCode((int) $status->getCode()); + $tmp->setColor((string) $status->getColor()); + $tmp->setExternalName((string) $status->getExternalName()); + $tmp->setInternalName((string) $status->getInternalName()); + $tmp->setUuid((string) $status->getId()); $tmpPos[] = $tmp; } diff --git a/src/new/tests/PSC/Shop/Media/Api/UploadTest.php b/src/new/tests/PSC/Shop/Media/Api/UploadTest.php index 8bcdb6734..7d9a1b117 100644 --- a/src/new/tests/PSC/Shop/Media/Api/UploadTest.php +++ b/src/new/tests/PSC/Shop/Media/Api/UploadTest.php @@ -52,5 +52,8 @@ class UploadTest extends WebTestCase $client->request('GET', '/api/media/' . $media['uuid'], [], []); $this->assertResponseIsSuccessful(); + + $media = json_decode($client->getResponse()->getContent(), true); + self::assertSame('kenney.jpg', $media['title']); } } diff --git a/src/new/tests/PSC/Shop/Order/Service/CalcContactAccountTypeTest.php b/src/new/tests/PSC/Shop/Order/Service/CalcContactAccountTypeTest.php index c44f5d2c7..067e669e3 100644 --- a/src/new/tests/PSC/Shop/Order/Service/CalcContactAccountTypeTest.php +++ b/src/new/tests/PSC/Shop/Order/Service/CalcContactAccountTypeTest.php @@ -2,11 +2,10 @@ namespace App\Tests\PSC\Shop\Order\Service; -use PSC\Shop\ContactBundle\Model\AccountType; -use PSC\Shop\ContactBundle\Model\Contact; -use Tests\RefreshDatabaseTrait; use PSC\Component\ApiBundle\Model\Shop; +use PSC\Shop\ContactBundle\Model\AccountType; use PSC\Shop\ContactBundle\Model\Address; +use PSC\Shop\ContactBundle\Model\Contact; use PSC\Shop\OrderBundle\Model\Order\Position; use PSC\Shop\OrderBundle\Service\Calc; use PSC\Shop\PaymentBundle\Model\Payment; @@ -14,6 +13,7 @@ use PSC\Shop\ProductBundle\Model\Product; use PSC\Shop\ProductBundle\Model\ProductSpecialObject; use PSC\Shop\ShippingBundle\Model\Shipping; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Tests\RefreshDatabaseTrait; class CalcContactAccountTypeTest extends KernelTestCase { @@ -29,7 +29,7 @@ class CalcContactAccountTypeTest extends KernelTestCase $calcService = $container->get(Calc::class); $shop = new Shop(); - $shop->setUuid('shop1'); + $shop->setUuid('771a1176-d531-48ed-93b8-eec1fd4b917f'); $order = new \PSC\Shop\OrderBundle\Model\Order(); $order->setShop($shop); @@ -132,7 +132,7 @@ class CalcContactAccountTypeTest extends KernelTestCase $calcService = $container->get(Calc::class); $shop = new Shop(); - $shop->setUuid('shop1'); + $shop->setUuid('771a1176-d531-48ed-93b8-eec1fd4b917f'); $order = new \PSC\Shop\OrderBundle\Model\Order(); $order->setShop($shop); @@ -232,7 +232,7 @@ class CalcContactAccountTypeTest extends KernelTestCase $calcService = $container->get(Calc::class); $shop = new Shop(); - $shop->setUuid('shop1'); + $shop->setUuid('771a1176-d531-48ed-93b8-eec1fd4b917f'); $order = new \PSC\Shop\OrderBundle\Model\Order(); $order->setShop($shop); diff --git a/src/new/tests/PSC/Shop/Order/Service/CalcTest.php b/src/new/tests/PSC/Shop/Order/Service/CalcTest.php index fbfeaab37..d34ea8ccf 100755 --- a/src/new/tests/PSC/Shop/Order/Service/CalcTest.php +++ b/src/new/tests/PSC/Shop/Order/Service/CalcTest.php @@ -2,7 +2,6 @@ namespace App\Tests\PSC\Shop\Order\Service; -use Tests\RefreshDatabaseTrait; use PSC\Component\ApiBundle\Model\Shop; use PSC\Shop\ContactBundle\Model\Address; use PSC\Shop\OrderBundle\Model\Order\Position; @@ -12,6 +11,7 @@ use PSC\Shop\ProductBundle\Model\Product; use PSC\Shop\ProductBundle\Model\ProductSpecialObject; use PSC\Shop\ShippingBundle\Model\Shipping; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Tests\RefreshDatabaseTrait; class CalcTest extends KernelTestCase { @@ -27,7 +27,7 @@ class CalcTest extends KernelTestCase $calcService = $container->get(Calc::class); $shop = new Shop(); - $shop->setUuid('shop1'); + $shop->setUuid('771a1176-d531-48ed-93b8-eec1fd4b917f'); $order = new \PSC\Shop\OrderBundle\Model\Order(); $order->setShop($shop); @@ -54,7 +54,7 @@ class CalcTest extends KernelTestCase $specialProductSettingsW0 = new ProductSpecialObject(); $specialProductSettingsW0->setCent(true); - $specialProductSettingsW0->setNet(13.12*100); + $specialProductSettingsW0->setNet(13.12 * 100); $productW0->setSpecialProductTypeObject($specialProductSettingsW0); @@ -116,4 +116,5 @@ class CalcTest extends KernelTestCase $this->assertSame(3897, $order->getVat()); $this->assertSame(24749, $order->getGross()); } -} \ No newline at end of file +} + diff --git a/src/new/tests/Plugins/System/PSC/XmlCalc/Api/GetPriceTest.php b/src/new/tests/Plugins/System/PSC/XmlCalc/Api/GetPriceTest.php index a6c693f2f..167783cd4 100644 --- a/src/new/tests/Plugins/System/PSC/XmlCalc/Api/GetPriceTest.php +++ b/src/new/tests/Plugins/System/PSC/XmlCalc/Api/GetPriceTest.php @@ -14,12 +14,17 @@ class GetPriceTest extends WebTestCase { $client = static::createClient(); - $client->jsonRequest('POST', '/api/plugin/system/psc/xmlcalc/price', ['product' => '01938686-0e4d-7da9-bae3-b2e1b1681f9f'], []); + $client->jsonRequest( + 'POST', + '/api/plugin/system/psc/xmlcalc/price', + ['product' => '01938686-0e4d-7da9-bae3-b2e1b1681f9f'], + [], + ); $this->assertResponseIsSuccessful(); $data = json_decode($client->getResponse()->getContent(), true); - self::assertSame(2600, $data['netto']); + self::assertSame(260, $data['netto']); } public function testGetPriceWithCompany(): void @@ -31,12 +36,17 @@ class GetPriceTest extends WebTestCase $client->loginUser($testUser, 'api'); - $client->jsonRequest('POST', '/api/plugin/system/psc/xmlcalc/price', ['product' => '01938686-0e4d-7da9-bae3-b2e1b1681f9f'], []); + $client->jsonRequest( + 'POST', + '/api/plugin/system/psc/xmlcalc/price', + ['product' => '01938686-0e4d-7da9-bae3-b2e1b1681f9f'], + [], + ); $this->assertResponseIsSuccessful(); $data = json_decode($client->getResponse()->getContent(), true); - self::assertSame(16640, $data['netto']); + self::assertSame(1664, $data['netto']); } public function testGetPriceWithAssociation(): void @@ -48,11 +58,16 @@ class GetPriceTest extends WebTestCase $client->loginUser($testUser, 'api'); - $client->jsonRequest('POST', '/api/plugin/system/psc/xmlcalc/price', ['product' => '01938686-0e4d-7da9-bae3-b2e1b1681f9f'], []); + $client->jsonRequest( + 'POST', + '/api/plugin/system/psc/xmlcalc/price', + ['product' => '01938686-0e4d-7da9-bae3-b2e1b1681f9f'], + [], + ); $this->assertResponseIsSuccessful(); $data = json_decode($client->getResponse()->getContent(), true); - self::assertSame(1300, $data['netto']); + self::assertSame(130, $data['netto']); } } diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/preview/RenderElements.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/preview/RenderElements.vue index 29d6c1eb4..c0adc18a5 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/preview/RenderElements.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/preview/RenderElements.vue @@ -8,6 +8,7 @@ import HiddenElement from './elements/HiddenElement.vue'; import HeadlineElement from './elements/HeadlineElement.vue'; import SelectElement from './elements/SelectElement.vue'; import RowElement from './elements/RowElement.vue'; +import MediaElement from './elements/MediaElement.vue'; const props = defineProps<{ items: PreviewElement[] @@ -28,6 +29,11 @@ const handleUpdate = (payload: { elementId: string, newValue: any }) => { :item="item" @update:value="handleUpdate" /> + +import type { PreviewElement } from '../../../../model/preview/types'; +import { ref, onMounted } from 'vue' +import { fetchMediaUrl } from '../../../../lib/api'; + +const props = defineProps<{ + item: PreviewElement +}>() + +let src = ref('') + +onMounted(async () => { + if (props.item.value) { + try { + src = await fetchMediaUrl(props.item.value); + } catch (error) { + console.error('Failed to fetch media URL', error); + } + } +}); + + + + diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts index f2f81724c..1f60854f9 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts @@ -177,12 +177,12 @@ export const fetchPreview = async (shopUuid: string, json: object[], values?: Re export const fetchMediaUrl = async (uuid: string) => { try { const response = await api.get(`api/media/${uuid}`); - const data:any = await response.json(); - return data.data.attributes.url; + const data: any = await response.json(); + return data.url; } catch (error) { console.error(`Error fetching media url for ${uuid}:`, error); throw error; } }; -export default api; \ No newline at end of file +export default api; diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts index 8d6551196..093b74107 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts @@ -33,7 +33,7 @@ export default defineConfig({ changeOrigin: true, configure: (proxy) => { proxy.on('proxyReq', (proxyReq) => { - proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTY3MzE1MDEsImV4cCI6MTc1NjczNTEwMSwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.Krs-TxmU9J3-p9Tt9cgFbm94wNz7wG9zRUe6yGMFG5USngDNzg4f3FL46JAWUx1liZBiU5K_Qnir5ol1--T6o2MNWIqxj3DTMgx6weWscv0Uw0eXOvhXhZp3wjaFnaqnqdN-vDqdEljs4V8ZA7RmbrL4SNgH-XoKrn0GEI9uVUYtd3wwR4SZFDEvZC1MTRi17zVMdpAxNaZ5KWTvcaARmUmDT5uKmgFOaM0z0mUT9mbL9KetqdId4aq_o6o6cPI--CDVmGNElvh4b3Ogf4yFe1hSuh9Yt1jM9rhqA7JDMpTRm3Ffx1nEdOyuA02hFFttuGICLc4NFTLbsY8qfp0H5A'); + proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTY5OTYyODUsImV4cCI6MTc1Njk5OTg4NSwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.GscgpB_vAN_oq4LHqzQ4K8vU0j4U9S4xLh0hCgRaAGTQuYpdHRzO21fCXob4-maN8njEtsHLq7Jpez4k0u47QhRknYrtDT_vw0EKilLpnTYFtxErAY7XqGgitam_C4BtjXKGybGkLrwfSFmlZh1yR_dJA2-hPcOlBjfpjLgOPGmpqClgLH3uv2kBn5E39kveNL5AtEOz18l--At6-UgGQDOXoKPxNNYokUK9_yaWEOezf7LThfBqgeKwOFzKlcbBNGkPWyQjbOaexWfv4DwVUtFuSJrJRYYAMbjPbx0sOThBI-AgpzooiXpLbEZFYOjkCXgyPBVBwp9JI-d0DbpGvA'); }); }, }, diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js index 84d3b70e5..cf72a42df 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js @@ -1,34 +1,34 @@ -var qT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var ZT=(t,e,n)=>e in t?qT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var de=(t,e,n)=>ZT(t,typeof e!="symbol"?e+"":e,n),zT=(t,e,n)=>e.has(t)||e$("Cannot "+n);var va=(t,e,n)=>(zT(t,e,"read from private field"),n?n.call(t):e.get(t)),t$=(t,e,n)=>e.has(t)?e$("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();/** +var ZT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var zT=(t,e,n)=>e in t?ZT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var de=(t,e,n)=>zT(t,typeof e!="symbol"?e+"":e,n),YT=(t,e,n)=>e.has(t)||e$("Cannot "+n);var va=(t,e,n)=>(YT(t,e,"read from private field"),n?n.call(t):e.get(t)),t$=(t,e,n)=>e.has(t)?e$("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();/** * @vue/shared v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function ZO(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const We={},xo=[],oi=()=>{},YT=()=>!1,Wl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Bp=t=>t.startsWith("onUpdate:"),Ot=Object.assign,Gp=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},MT=Object.prototype.hasOwnProperty,tt=(t,e)=>MT.call(t,e),ve=Array.isArray,wo=t=>sa(t)==="[object Map]",Fs=t=>sa(t)==="[object Set]",n$=t=>sa(t)==="[object Date]",IT=t=>sa(t)==="[object RegExp]",Ce=t=>typeof t=="function",pt=t=>typeof t=="string",$i=t=>typeof t=="symbol",ot=t=>t!==null&&typeof t=="object",Fp=t=>(ot(t)||Ce(t))&&Ce(t.then)&&Ce(t.catch),Zv=Object.prototype.toString,sa=t=>Zv.call(t),UT=t=>sa(t).slice(8,-1),zO=t=>sa(t)==="[object Object]",Hp=t=>pt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,To=ZO(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),YO=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},DT=/-(\w)/g,Wt=YO(t=>t.replace(DT,(e,n)=>n?n.toUpperCase():"")),LT=/\B([A-Z])/g,Vn=YO(t=>t.replace(LT,"-$1").toLowerCase()),Nl=YO(t=>t.charAt(0).toUpperCase()+t.slice(1)),ko=YO(t=>t?`on${Nl(t)}`:""),$n=(t,e)=>!Object.is(t,e),Ro=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},Au=t=>{const e=parseFloat(t);return isNaN(e)?t:e},qu=t=>{const e=pt(t)?Number(t):NaN;return isNaN(e)?t:e};let i$;const MO=()=>i$||(i$=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),WT="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",NT=ZO(WT);function Fn(t){if(ve(t)){const e={};for(let n=0;n{if(n){const i=n.split(BT);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function St(t){let e="";if(pt(t))e=t;else if(ve(t))for(let n=0;nrs(n,e))}const Mv=t=>!!(t&&t.__v_isRef===!0),H=t=>pt(t)?t:t==null?"":ve(t)||ot(t)&&(t.toString===Zv||!Ce(t.toString))?Mv(t)?H(t.value):JSON.stringify(t,Iv,2):String(t),Iv=(t,e)=>Mv(e)?Iv(t,e.value):wo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,r],s)=>(n[Mf(i,s)+" =>"]=r,n),{})}:Fs(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Mf(n))}:$i(e)?Mf(e):ot(e)&&!ve(e)&&!zO(e)?String(e):e,Mf=(t,e="")=>{var n;return $i(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**//*! #__NO_SIDE_EFFECTS__ */function ZO(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const We={},xo=[],oi=()=>{},MT=()=>!1,Wl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Bp=t=>t.startsWith("onUpdate:"),Ot=Object.assign,Gp=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},IT=Object.prototype.hasOwnProperty,tt=(t,e)=>IT.call(t,e),ve=Array.isArray,wo=t=>sa(t)==="[object Map]",Fs=t=>sa(t)==="[object Set]",n$=t=>sa(t)==="[object Date]",UT=t=>sa(t)==="[object RegExp]",Ce=t=>typeof t=="function",mt=t=>typeof t=="string",$i=t=>typeof t=="symbol",ot=t=>t!==null&&typeof t=="object",Fp=t=>(ot(t)||Ce(t))&&Ce(t.then)&&Ce(t.catch),Zv=Object.prototype.toString,sa=t=>Zv.call(t),DT=t=>sa(t).slice(8,-1),zO=t=>sa(t)==="[object Object]",Hp=t=>mt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,To=ZO(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),YO=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},LT=/-(\w)/g,Wt=YO(t=>t.replace(LT,(e,n)=>n?n.toUpperCase():"")),WT=/\B([A-Z])/g,Vn=YO(t=>t.replace(WT,"-$1").toLowerCase()),Nl=YO(t=>t.charAt(0).toUpperCase()+t.slice(1)),ko=YO(t=>t?`on${Nl(t)}`:""),$n=(t,e)=>!Object.is(t,e),Ro=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},Au=t=>{const e=parseFloat(t);return isNaN(e)?t:e},qu=t=>{const e=mt(t)?Number(t):NaN;return isNaN(e)?t:e};let i$;const MO=()=>i$||(i$=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),NT="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",jT=ZO(NT);function Hn(t){if(ve(t)){const e={};for(let n=0;n{if(n){const i=n.split(GT);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function St(t){let e="";if(mt(t))e=t;else if(ve(t))for(let n=0;nrs(n,e))}const Mv=t=>!!(t&&t.__v_isRef===!0),H=t=>mt(t)?t:t==null?"":ve(t)||ot(t)&&(t.toString===Zv||!Ce(t.toString))?Mv(t)?H(t.value):JSON.stringify(t,Iv,2):String(t),Iv=(t,e)=>Mv(e)?Iv(t,e.value):wo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,r],s)=>(n[Mf(i,s)+" =>"]=r,n),{})}:Fs(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Mf(n))}:$i(e)?Mf(e):ot(e)&&!ve(e)&&!zO(e)?String(e):e,Mf=(t,e="")=>{var n;return $i(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** * @vue/reactivity v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ln;class Kp{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ln,!e&&ln&&(this.index=(ln.scopes||(ln.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0&&--this._on===0&&(ln=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(Ga){let e=Ga;for(Ga=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Ba;){let e=Ba;for(Ba=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lv(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Wv(t){let e,n=t.depsTail,i=n;for(;i;){const r=i.prevDep;i.version===-1?(i===n&&(n=r),tm(i),ek(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}t.deps=e,t.depsTail=n}function th(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Nv(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Nv(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===cl)||(t.globalVersion=cl,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!th(t))))return;t.flags|=2;const e=t.dep,n=dt,i=gi;dt=t,gi=!0;try{Lv(t);const r=t.fn(t._value);(e.version===0||$n(r,t._value))&&(t.flags|=128,t._value=r,e.version++)}catch(r){throw e.version++,r}finally{dt=n,gi=i,Wv(t),t.flags&=-3}}function tm(t,e=!1){const{dep:n,prevSub:i,nextSub:r}=t;if(i&&(i.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)tm(s,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function ek(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function tk(t,e){t.effect instanceof ll&&(t=t.effect.fn);const n=new ll(t);e&&Ot(n,e);try{n.run()}catch(r){throw n.stop(),r}const i=n.run.bind(n);return i.effect=n,i}function nk(t){t.effect.stop()}let gi=!0;const jv=[];function br(){jv.push(gi),gi=!1}function vr(){const t=jv.pop();gi=t===void 0?!0:t}function r$(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=dt;dt=void 0;try{e()}finally{dt=n}}}let cl=0;class ik{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class DO{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!dt||!gi||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new ik(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,Bv(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=i)}return n}trigger(e){this.version++,cl++,this.notify(e)}notify(e){Jp();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{em()}}}function Bv(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Bv(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Zu=new WeakMap,qs=Symbol(""),nh=Symbol(""),ul=Symbol("");function un(t,e,n){if(gi&&dt){let i=Zu.get(t);i||Zu.set(t,i=new Map);let r=i.get(n);r||(i.set(n,r=new DO),r.map=i,r.key=n),r.track()}}function ur(t,e,n,i,r,s){const o=Zu.get(t);if(!o){cl++;return}const a=l=>{l&&l.trigger()};if(Jp(),e==="clear")o.forEach(a);else{const l=ve(t),c=l&&Hp(n);if(l&&n==="length"){const u=Number(i);o.forEach((O,f)=>{(f==="length"||f===ul||!$i(f)&&f>=u)&&a(O)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(ul)),e){case"add":l?c&&a(o.get("length")):(a(o.get(qs)),wo(t)&&a(o.get(nh)));break;case"delete":l||(a(o.get(qs)),wo(t)&&a(o.get(nh)));break;case"set":wo(t)&&a(o.get(qs));break}}em()}function rk(t,e){const n=Zu.get(t);return n&&n.get(e)}function ro(t){const e=Ue(t);return e===t?e:(un(e,"iterate",ul),jn(t)?e:e.map(en))}function LO(t){return un(t=Ue(t),"iterate",ul),t}const sk={__proto__:null,[Symbol.iterator](){return Uf(this,Symbol.iterator,en)},concat(...t){return ro(this).concat(...t.map(e=>ve(e)?ro(e):e))},entries(){return Uf(this,"entries",t=>(t[1]=en(t[1]),t))},every(t,e){return ir(this,"every",t,e,void 0,arguments)},filter(t,e){return ir(this,"filter",t,e,n=>n.map(en),arguments)},find(t,e){return ir(this,"find",t,e,en,arguments)},findIndex(t,e){return ir(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ir(this,"findLast",t,e,en,arguments)},findLastIndex(t,e){return ir(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ir(this,"forEach",t,e,void 0,arguments)},includes(...t){return Df(this,"includes",t)},indexOf(...t){return Df(this,"indexOf",t)},join(t){return ro(this).join(t)},lastIndexOf(...t){return Df(this,"lastIndexOf",t)},map(t,e){return ir(this,"map",t,e,void 0,arguments)},pop(){return Sa(this,"pop")},push(...t){return Sa(this,"push",t)},reduce(t,...e){return s$(this,"reduce",t,e)},reduceRight(t,...e){return s$(this,"reduceRight",t,e)},shift(){return Sa(this,"shift")},some(t,e){return ir(this,"some",t,e,void 0,arguments)},splice(...t){return Sa(this,"splice",t)},toReversed(){return ro(this).toReversed()},toSorted(t){return ro(this).toSorted(t)},toSpliced(...t){return ro(this).toSpliced(...t)},unshift(...t){return Sa(this,"unshift",t)},values(){return Uf(this,"values",en)}};function Uf(t,e,n){const i=LO(t),r=i[e]();return i!==t&&!jn(t)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=n(s.value)),s}),r}const ok=Array.prototype;function ir(t,e,n,i,r,s){const o=LO(t),a=o!==t&&!jn(t),l=o[e];if(l!==ok[e]){const O=l.apply(t,s);return a?en(O):O}let c=n;o!==t&&(a?c=function(O,f){return n.call(this,en(O),f,t)}:n.length>2&&(c=function(O,f){return n.call(this,O,f,t)}));const u=l.call(o,c,i);return a&&r?r(u):u}function s$(t,e,n,i){const r=LO(t);let s=n;return r!==t&&(jn(t)?n.length>3&&(s=function(o,a,l){return n.call(this,o,a,l,t)}):s=function(o,a,l){return n.call(this,o,en(a),l,t)}),r[e](s,...i)}function Df(t,e,n){const i=Ue(t);un(i,"iterate",ul);const r=i[e](...n);return(r===-1||r===!1)&&BO(n[0])?(n[0]=Ue(n[0]),i[e](...n)):r}function Sa(t,e,n=[]){br(),Jp();const i=Ue(t)[e].apply(t,n);return em(),vr(),i}const ak=ZO("__proto__,__v_isRef,__isVue"),Gv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter($i));function lk(t){$i(t)||(t=String(t));const e=Ue(this);return un(e,"has",t),e.hasOwnProperty(t)}class Fv{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(r?s?nS:tS:s?eS:Jv).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ve(e);if(!r){let l;if(o&&(l=sk[n]))return l;if(n==="hasOwnProperty")return lk}const a=Reflect.get(e,n,He(e)?e:i);return($i(n)?Gv.has(n):ak(n))||(r||un(e,"get",n),s)?a:He(a)?o&&Hp(n)?a:a.value:ot(a)?r?NO(a):Sr(a):a}}class Hv extends Fv{constructor(e=!1){super(!1,e)}set(e,n,i,r){let s=e[n];if(!this._isShallow){const l=Pr(s);if(!jn(i)&&!Pr(i)&&(s=Ue(s),i=Ue(i)),!ve(e)&&He(s)&&!He(i))return l?!1:(s.value=i,!0)}const o=ve(e)&&Hp(n)?Number(n)t,Qc=t=>Reflect.getPrototypeOf(t);function dk(t,e,n){return function(...i){const r=this.__v_raw,s=Ue(r),o=wo(s),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=r[t](...i),u=n?ih:e?zu:en;return!e&&un(s,"iterate",l?nh:qs),{next(){const{value:O,done:f}=c.next();return f?{value:O,done:f}:{value:a?[u(O[0]),u(O[1])]:u(O),done:f}},[Symbol.iterator](){return this}}}}function yc(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function hk(t,e){const n={get(r){const s=this.__v_raw,o=Ue(s),a=Ue(r);t||($n(r,a)&&un(o,"get",r),un(o,"get",a));const{has:l}=Qc(o),c=e?ih:t?zu:en;if(l.call(o,r))return c(s.get(r));if(l.call(o,a))return c(s.get(a));s!==o&&s.get(r)},get size(){const r=this.__v_raw;return!t&&un(Ue(r),"iterate",qs),Reflect.get(r,"size",r)},has(r){const s=this.__v_raw,o=Ue(s),a=Ue(r);return t||($n(r,a)&&un(o,"has",r),un(o,"has",a)),r===a?s.has(r):s.has(r)||s.has(a)},forEach(r,s){const o=this,a=o.__v_raw,l=Ue(a),c=e?ih:t?zu:en;return!t&&un(l,"iterate",qs),a.forEach((u,O)=>r.call(s,c(u),c(O),o))}};return Ot(n,t?{add:yc("add"),set:yc("set"),delete:yc("delete"),clear:yc("clear")}:{add(r){!e&&!jn(r)&&!Pr(r)&&(r=Ue(r));const s=Ue(this);return Qc(s).has.call(s,r)||(s.add(r),ur(s,"add",r,r)),this},set(r,s){!e&&!jn(s)&&!Pr(s)&&(s=Ue(s));const o=Ue(this),{has:a,get:l}=Qc(o);let c=a.call(o,r);c||(r=Ue(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,s),c?$n(s,u)&&ur(o,"set",r,s):ur(o,"add",r,s),this},delete(r){const s=Ue(this),{has:o,get:a}=Qc(s);let l=o.call(s,r);l||(r=Ue(r),l=o.call(s,r)),a&&a.call(s,r);const c=s.delete(r);return l&&ur(s,"delete",r,void 0),c},clear(){const r=Ue(this),s=r.size!==0,o=r.clear();return s&&ur(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=dk(r,t,e)}),n}function WO(t,e){const n=hk(t,e);return(i,r,s)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?i:Reflect.get(tt(n,r)&&r in i?n:i,r,s)}const pk={get:WO(!1,!1)},mk={get:WO(!1,!0)},gk={get:WO(!0,!1)},$k={get:WO(!0,!0)},Jv=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap;function Qk(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function yk(t){return t.__v_skip||!Object.isExtensible(t)?0:Qk(UT(t))}function Sr(t){return Pr(t)?t:jO(t,!1,ck,pk,Jv)}function iS(t){return jO(t,!1,Ok,mk,eS)}function NO(t){return jO(t,!0,uk,gk,tS)}function ks(t){return jO(t,!0,fk,$k,nS)}function jO(t,e,n,i,r){if(!ot(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=yk(t);if(s===0)return t;const o=r.get(t);if(o)return o;const a=new Proxy(t,s===2?i:n);return r.set(t,a),a}function Ui(t){return Pr(t)?Ui(t.__v_raw):!!(t&&t.__v_isReactive)}function Pr(t){return!!(t&&t.__v_isReadonly)}function jn(t){return!!(t&&t.__v_isShallow)}function BO(t){return t?!!t.__v_raw:!1}function Ue(t){const e=t&&t.__v_raw;return e?Ue(e):t}function Bl(t){return!tt(t,"__v_skip")&&Object.isExtensible(t)&&zv(t,"__v_skip",!0),t}const en=t=>ot(t)?Sr(t):t,zu=t=>ot(t)?NO(t):t;function He(t){return t?t.__v_isRef===!0:!1}function ne(t){return rS(t,!1)}function gr(t){return rS(t,!0)}function rS(t,e){return He(t)?t:new bk(t,e)}class bk{constructor(e,n){this.dep=new DO,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:Ue(e),this._value=n?e:en(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||jn(e)||Pr(e);e=i?e:Ue(e),$n(e,n)&&(this._rawValue=e,this._value=i?e:en(e),this.dep.trigger())}}function vk(t){t.dep&&t.dep.trigger()}function m(t){return He(t)?t.value:t}function sn(t){return Ce(t)?t():m(t)}const Sk={get:(t,e,n)=>e==="__v_raw"?t:m(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const r=t[e];return He(r)&&!He(n)?(r.value=n,!0):Reflect.set(t,e,n,i)}};function nm(t){return Ui(t)?t:new Proxy(t,Sk)}class Pk{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new DO,{get:i,set:r}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function im(t){return new Pk(t)}function an(t){const e=ve(t)?new Array(t.length):{};for(const n in t)e[n]=oS(t,n);return e}class _k{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return rk(Ue(this._object),this._key)}}class xk{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function sS(t,e,n){return He(t)?t:Ce(t)?new xk(t):ot(t)&&arguments.length>1?oS(t,e,n):ne(t)}function oS(t,e,n){const i=t[e];return He(i)?i:new _k(t,e,n)}class wk{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new DO(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=cl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&dt!==this)return Dv(this,!0),!0}get value(){const e=this.dep.track();return Nv(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Tk(t,e,n=!1){let i,r;return Ce(t)?i=t:(i=t.get,r=t.set),new wk(i,r,n)}const kk={GET:"get",HAS:"has",ITERATE:"iterate"},Rk={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},bc={},Yu=new WeakMap;let Lr;function Ck(){return Lr}function aS(t,e=!1,n=Lr){if(n){let i=Yu.get(n);i||Yu.set(n,i=[]),i.push(t)}}function Xk(t,e,n=We){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:a,call:l}=n,c=y=>r?y:jn(y)||r===!1||r===0?Or(y,1):Or(y);let u,O,f,d,h=!1,p=!1;if(He(t)?(O=()=>t.value,h=jn(t)):Ui(t)?(O=()=>c(t),h=!0):ve(t)?(p=!0,h=t.some(y=>Ui(y)||jn(y)),O=()=>t.map(y=>{if(He(y))return y.value;if(Ui(y))return c(y);if(Ce(y))return l?l(y,2):y()})):Ce(t)?e?O=l?()=>l(t,2):t:O=()=>{if(f){br();try{f()}finally{vr()}}const y=Lr;Lr=u;try{return l?l(t,3,[d]):t(d)}finally{Lr=y}}:O=oi,e&&r){const y=O,v=r===!0?1/0:r;O=()=>Or(y(),v)}const $=jl(),g=()=>{u.stop(),$&&$.active&&Gp($.effects,u)};if(s&&e){const y=e;e=(...v)=>{y(...v),g()}}let b=p?new Array(t.length).fill(bc):bc;const Q=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const v=u.run();if(r||h||(p?v.some((S,P)=>$n(S,b[P])):$n(v,b))){f&&f();const S=Lr;Lr=u;try{const P=[v,b===bc?void 0:p&&b[0]===bc?[]:b,d];b=v,l?l(e,3,P):e(...P)}finally{Lr=S}}}else u.run()};return a&&a(Q),u=new ll(O),u.scheduler=o?()=>o(Q,!1):Q,d=y=>aS(y,!1,u),f=u.onStop=()=>{const y=Yu.get(u);if(y){if(l)l(y,4);else for(const v of y)v();Yu.delete(u)}},e?i?Q(!0):b=u.run():o?o(Q.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function Or(t,e=1/0,n){if(e<=0||!ot(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,He(t))Or(t.value,e,n);else if(ve(t))for(let i=0;i{Or(i,e,n)});else if(zO(t)){for(const i in t)Or(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Or(t[i],e,n)}return t}/** +**/let ln;class Kp{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ln,!e&&ln&&(this.index=(ln.scopes||(ln.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0&&--this._on===0&&(ln=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(Ga){let e=Ga;for(Ga=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Ba;){let e=Ba;for(Ba=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lv(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Wv(t){let e,n=t.depsTail,i=n;for(;i;){const r=i.prevDep;i.version===-1?(i===n&&(n=r),tm(i),tk(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}t.deps=e,t.depsTail=n}function th(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Nv(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Nv(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===cl)||(t.globalVersion=cl,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!th(t))))return;t.flags|=2;const e=t.dep,n=ht,i=gi;ht=t,gi=!0;try{Lv(t);const r=t.fn(t._value);(e.version===0||$n(r,t._value))&&(t.flags|=128,t._value=r,e.version++)}catch(r){throw e.version++,r}finally{ht=n,gi=i,Wv(t),t.flags&=-3}}function tm(t,e=!1){const{dep:n,prevSub:i,nextSub:r}=t;if(i&&(i.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)tm(s,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function tk(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function nk(t,e){t.effect instanceof ll&&(t=t.effect.fn);const n=new ll(t);e&&Ot(n,e);try{n.run()}catch(r){throw n.stop(),r}const i=n.run.bind(n);return i.effect=n,i}function ik(t){t.effect.stop()}let gi=!0;const jv=[];function br(){jv.push(gi),gi=!1}function vr(){const t=jv.pop();gi=t===void 0?!0:t}function r$(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=ht;ht=void 0;try{e()}finally{ht=n}}}let cl=0;class rk{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class DO{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!ht||!gi||ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ht)n=this.activeLink=new rk(ht,this),ht.deps?(n.prevDep=ht.depsTail,ht.depsTail.nextDep=n,ht.depsTail=n):ht.deps=ht.depsTail=n,Bv(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=ht.depsTail,n.nextDep=void 0,ht.depsTail.nextDep=n,ht.depsTail=n,ht.deps===n&&(ht.deps=i)}return n}trigger(e){this.version++,cl++,this.notify(e)}notify(e){Jp();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{em()}}}function Bv(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Bv(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Zu=new WeakMap,qs=Symbol(""),nh=Symbol(""),ul=Symbol("");function un(t,e,n){if(gi&&ht){let i=Zu.get(t);i||Zu.set(t,i=new Map);let r=i.get(n);r||(i.set(n,r=new DO),r.map=i,r.key=n),r.track()}}function ur(t,e,n,i,r,s){const o=Zu.get(t);if(!o){cl++;return}const a=l=>{l&&l.trigger()};if(Jp(),e==="clear")o.forEach(a);else{const l=ve(t),c=l&&Hp(n);if(l&&n==="length"){const u=Number(i);o.forEach((O,f)=>{(f==="length"||f===ul||!$i(f)&&f>=u)&&a(O)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(ul)),e){case"add":l?c&&a(o.get("length")):(a(o.get(qs)),wo(t)&&a(o.get(nh)));break;case"delete":l||(a(o.get(qs)),wo(t)&&a(o.get(nh)));break;case"set":wo(t)&&a(o.get(qs));break}}em()}function sk(t,e){const n=Zu.get(t);return n&&n.get(e)}function ro(t){const e=Ue(t);return e===t?e:(un(e,"iterate",ul),Bn(t)?e:e.map(en))}function LO(t){return un(t=Ue(t),"iterate",ul),t}const ok={__proto__:null,[Symbol.iterator](){return Uf(this,Symbol.iterator,en)},concat(...t){return ro(this).concat(...t.map(e=>ve(e)?ro(e):e))},entries(){return Uf(this,"entries",t=>(t[1]=en(t[1]),t))},every(t,e){return ir(this,"every",t,e,void 0,arguments)},filter(t,e){return ir(this,"filter",t,e,n=>n.map(en),arguments)},find(t,e){return ir(this,"find",t,e,en,arguments)},findIndex(t,e){return ir(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ir(this,"findLast",t,e,en,arguments)},findLastIndex(t,e){return ir(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ir(this,"forEach",t,e,void 0,arguments)},includes(...t){return Df(this,"includes",t)},indexOf(...t){return Df(this,"indexOf",t)},join(t){return ro(this).join(t)},lastIndexOf(...t){return Df(this,"lastIndexOf",t)},map(t,e){return ir(this,"map",t,e,void 0,arguments)},pop(){return Sa(this,"pop")},push(...t){return Sa(this,"push",t)},reduce(t,...e){return s$(this,"reduce",t,e)},reduceRight(t,...e){return s$(this,"reduceRight",t,e)},shift(){return Sa(this,"shift")},some(t,e){return ir(this,"some",t,e,void 0,arguments)},splice(...t){return Sa(this,"splice",t)},toReversed(){return ro(this).toReversed()},toSorted(t){return ro(this).toSorted(t)},toSpliced(...t){return ro(this).toSpliced(...t)},unshift(...t){return Sa(this,"unshift",t)},values(){return Uf(this,"values",en)}};function Uf(t,e,n){const i=LO(t),r=i[e]();return i!==t&&!Bn(t)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=n(s.value)),s}),r}const ak=Array.prototype;function ir(t,e,n,i,r,s){const o=LO(t),a=o!==t&&!Bn(t),l=o[e];if(l!==ak[e]){const O=l.apply(t,s);return a?en(O):O}let c=n;o!==t&&(a?c=function(O,f){return n.call(this,en(O),f,t)}:n.length>2&&(c=function(O,f){return n.call(this,O,f,t)}));const u=l.call(o,c,i);return a&&r?r(u):u}function s$(t,e,n,i){const r=LO(t);let s=n;return r!==t&&(Bn(t)?n.length>3&&(s=function(o,a,l){return n.call(this,o,a,l,t)}):s=function(o,a,l){return n.call(this,o,en(a),l,t)}),r[e](s,...i)}function Df(t,e,n){const i=Ue(t);un(i,"iterate",ul);const r=i[e](...n);return(r===-1||r===!1)&&BO(n[0])?(n[0]=Ue(n[0]),i[e](...n)):r}function Sa(t,e,n=[]){br(),Jp();const i=Ue(t)[e].apply(t,n);return em(),vr(),i}const lk=ZO("__proto__,__v_isRef,__isVue"),Gv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter($i));function ck(t){$i(t)||(t=String(t));const e=Ue(this);return un(e,"has",t),e.hasOwnProperty(t)}class Fv{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(r?s?nS:tS:s?eS:Jv).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ve(e);if(!r){let l;if(o&&(l=ok[n]))return l;if(n==="hasOwnProperty")return ck}const a=Reflect.get(e,n,He(e)?e:i);return($i(n)?Gv.has(n):lk(n))||(r||un(e,"get",n),s)?a:He(a)?o&&Hp(n)?a:a.value:ot(a)?r?NO(a):Sr(a):a}}class Hv extends Fv{constructor(e=!1){super(!1,e)}set(e,n,i,r){let s=e[n];if(!this._isShallow){const l=Pr(s);if(!Bn(i)&&!Pr(i)&&(s=Ue(s),i=Ue(i)),!ve(e)&&He(s)&&!He(i))return l?!1:(s.value=i,!0)}const o=ve(e)&&Hp(n)?Number(n)t,Qc=t=>Reflect.getPrototypeOf(t);function hk(t,e,n){return function(...i){const r=this.__v_raw,s=Ue(r),o=wo(s),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=r[t](...i),u=n?ih:e?zu:en;return!e&&un(s,"iterate",l?nh:qs),{next(){const{value:O,done:f}=c.next();return f?{value:O,done:f}:{value:a?[u(O[0]),u(O[1])]:u(O),done:f}},[Symbol.iterator](){return this}}}}function yc(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function pk(t,e){const n={get(r){const s=this.__v_raw,o=Ue(s),a=Ue(r);t||($n(r,a)&&un(o,"get",r),un(o,"get",a));const{has:l}=Qc(o),c=e?ih:t?zu:en;if(l.call(o,r))return c(s.get(r));if(l.call(o,a))return c(s.get(a));s!==o&&s.get(r)},get size(){const r=this.__v_raw;return!t&&un(Ue(r),"iterate",qs),Reflect.get(r,"size",r)},has(r){const s=this.__v_raw,o=Ue(s),a=Ue(r);return t||($n(r,a)&&un(o,"has",r),un(o,"has",a)),r===a?s.has(r):s.has(r)||s.has(a)},forEach(r,s){const o=this,a=o.__v_raw,l=Ue(a),c=e?ih:t?zu:en;return!t&&un(l,"iterate",qs),a.forEach((u,O)=>r.call(s,c(u),c(O),o))}};return Ot(n,t?{add:yc("add"),set:yc("set"),delete:yc("delete"),clear:yc("clear")}:{add(r){!e&&!Bn(r)&&!Pr(r)&&(r=Ue(r));const s=Ue(this);return Qc(s).has.call(s,r)||(s.add(r),ur(s,"add",r,r)),this},set(r,s){!e&&!Bn(s)&&!Pr(s)&&(s=Ue(s));const o=Ue(this),{has:a,get:l}=Qc(o);let c=a.call(o,r);c||(r=Ue(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,s),c?$n(s,u)&&ur(o,"set",r,s):ur(o,"add",r,s),this},delete(r){const s=Ue(this),{has:o,get:a}=Qc(s);let l=o.call(s,r);l||(r=Ue(r),l=o.call(s,r)),a&&a.call(s,r);const c=s.delete(r);return l&&ur(s,"delete",r,void 0),c},clear(){const r=Ue(this),s=r.size!==0,o=r.clear();return s&&ur(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=hk(r,t,e)}),n}function WO(t,e){const n=pk(t,e);return(i,r,s)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?i:Reflect.get(tt(n,r)&&r in i?n:i,r,s)}const mk={get:WO(!1,!1)},gk={get:WO(!1,!0)},$k={get:WO(!0,!1)},Qk={get:WO(!0,!0)},Jv=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap;function yk(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bk(t){return t.__v_skip||!Object.isExtensible(t)?0:yk(DT(t))}function Sr(t){return Pr(t)?t:jO(t,!1,uk,mk,Jv)}function iS(t){return jO(t,!1,fk,gk,eS)}function NO(t){return jO(t,!0,Ok,$k,tS)}function ks(t){return jO(t,!0,dk,Qk,nS)}function jO(t,e,n,i,r){if(!ot(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=bk(t);if(s===0)return t;const o=r.get(t);if(o)return o;const a=new Proxy(t,s===2?i:n);return r.set(t,a),a}function Ui(t){return Pr(t)?Ui(t.__v_raw):!!(t&&t.__v_isReactive)}function Pr(t){return!!(t&&t.__v_isReadonly)}function Bn(t){return!!(t&&t.__v_isShallow)}function BO(t){return t?!!t.__v_raw:!1}function Ue(t){const e=t&&t.__v_raw;return e?Ue(e):t}function Bl(t){return!tt(t,"__v_skip")&&Object.isExtensible(t)&&zv(t,"__v_skip",!0),t}const en=t=>ot(t)?Sr(t):t,zu=t=>ot(t)?NO(t):t;function He(t){return t?t.__v_isRef===!0:!1}function ne(t){return rS(t,!1)}function gr(t){return rS(t,!0)}function rS(t,e){return He(t)?t:new vk(t,e)}class vk{constructor(e,n){this.dep=new DO,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:Ue(e),this._value=n?e:en(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Bn(e)||Pr(e);e=i?e:Ue(e),$n(e,n)&&(this._rawValue=e,this._value=i?e:en(e),this.dep.trigger())}}function Sk(t){t.dep&&t.dep.trigger()}function m(t){return He(t)?t.value:t}function sn(t){return Ce(t)?t():m(t)}const Pk={get:(t,e,n)=>e==="__v_raw"?t:m(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const r=t[e];return He(r)&&!He(n)?(r.value=n,!0):Reflect.set(t,e,n,i)}};function nm(t){return Ui(t)?t:new Proxy(t,Pk)}class _k{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new DO,{get:i,set:r}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function im(t){return new _k(t)}function an(t){const e=ve(t)?new Array(t.length):{};for(const n in t)e[n]=oS(t,n);return e}class xk{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return sk(Ue(this._object),this._key)}}class wk{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function sS(t,e,n){return He(t)?t:Ce(t)?new wk(t):ot(t)&&arguments.length>1?oS(t,e,n):ne(t)}function oS(t,e,n){const i=t[e];return He(i)?i:new xk(t,e,n)}class Tk{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new DO(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=cl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return Dv(this,!0),!0}get value(){const e=this.dep.track();return Nv(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function kk(t,e,n=!1){let i,r;return Ce(t)?i=t:(i=t.get,r=t.set),new Tk(i,r,n)}const Rk={GET:"get",HAS:"has",ITERATE:"iterate"},Ck={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},bc={},Yu=new WeakMap;let Lr;function Xk(){return Lr}function aS(t,e=!1,n=Lr){if(n){let i=Yu.get(n);i||Yu.set(n,i=[]),i.push(t)}}function Vk(t,e,n=We){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:a,call:l}=n,c=y=>r?y:Bn(y)||r===!1||r===0?Or(y,1):Or(y);let u,O,f,d,h=!1,p=!1;if(He(t)?(O=()=>t.value,h=Bn(t)):Ui(t)?(O=()=>c(t),h=!0):ve(t)?(p=!0,h=t.some(y=>Ui(y)||Bn(y)),O=()=>t.map(y=>{if(He(y))return y.value;if(Ui(y))return c(y);if(Ce(y))return l?l(y,2):y()})):Ce(t)?e?O=l?()=>l(t,2):t:O=()=>{if(f){br();try{f()}finally{vr()}}const y=Lr;Lr=u;try{return l?l(t,3,[d]):t(d)}finally{Lr=y}}:O=oi,e&&r){const y=O,v=r===!0?1/0:r;O=()=>Or(y(),v)}const $=jl(),g=()=>{u.stop(),$&&$.active&&Gp($.effects,u)};if(s&&e){const y=e;e=(...v)=>{y(...v),g()}}let b=p?new Array(t.length).fill(bc):bc;const Q=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const v=u.run();if(r||h||(p?v.some((S,P)=>$n(S,b[P])):$n(v,b))){f&&f();const S=Lr;Lr=u;try{const P=[v,b===bc?void 0:p&&b[0]===bc?[]:b,d];b=v,l?l(e,3,P):e(...P)}finally{Lr=S}}}else u.run()};return a&&a(Q),u=new ll(O),u.scheduler=o?()=>o(Q,!1):Q,d=y=>aS(y,!1,u),f=u.onStop=()=>{const y=Yu.get(u);if(y){if(l)l(y,4);else for(const v of y)v();Yu.delete(u)}},e?i?Q(!0):b=u.run():o?o(Q.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function Or(t,e=1/0,n){if(e<=0||!ot(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,He(t))Or(t.value,e,n);else if(ve(t))for(let i=0;i{Or(i,e,n)});else if(zO(t)){for(const i in t)Or(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Or(t[i],e,n)}return t}/** * @vue/runtime-core v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const lS=[];function Vk(t){lS.push(t)}function Ek(){lS.pop()}function Ak(t,e){}const qk={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},Zk={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function aa(t,e,n,i){try{return i?t(...i):t()}catch(r){Ks(r,e,n)}}function ci(t,e,n,i){if(Ce(t)){const r=aa(t,e,n,i);return r&&Fp(r)&&r.catch(s=>{Ks(s,e,n)}),r}if(ve(t)){const r=[];for(let s=0;s>>1,r=Qn[i],s=fl(r);s=fl(n)?Qn.push(t):Qn.splice(Yk(e),0,t),t.flags|=1,uS()}}function uS(){Mu||(Mu=cS.then(OS))}function Ol(t){ve(t)?Co.push(...t):Wr&&t.id===-1?Wr.splice(fo+1,0,t):t.flags&1||(Co.push(t),t.flags|=1),uS()}function o$(t,e,n=Vi+1){for(;nfl(n)-fl(i));if(Co.length=0,Wr){Wr.push(...e);return}for(Wr=e,fo=0;fot.id==null?t.flags&2?-1:1/0:t.id;function OS(t){try{for(Vi=0;Viho.emit(r,...s)),vc=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{fS(s,e)}),setTimeout(()=>{ho||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,vc=[])},3e3)):vc=[]}let Lt=null,GO=null;function dl(t){const e=Lt;return Lt=t,GO=t&&t.type.__scopeId||null,e}function Mk(t){GO=t}function Ik(){GO=null}const Uk=t=>V;function V(t,e=Lt,n){if(!e||t._n)return t;const i=(...r)=>{i._d&&Oh(-1);const s=dl(e);let o;try{o=t(...r)}finally{dl(s),i._d&&Oh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function la(t,e){if(Lt===null)return t;const n=Hl(Lt),i=t.dirs||(t.dirs=[]);for(let r=0;rt.__isTeleport,Fa=t=>t&&(t.disabled||t.disabled===""),a$=t=>t&&(t.defer||t.defer===""),l$=t=>typeof SVGElement<"u"&&t instanceof SVGElement,c$=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,rh=(t,e)=>{const n=t&&t.to;return pt(n)?e?e(n):null:n},pS={name:"Teleport",__isTeleport:!0,process(t,e,n,i,r,s,o,a,l,c){const{mc:u,pc:O,pbc:f,o:{insert:d,querySelector:h,createText:p,createComment:$}}=c,g=Fa(e.props);let{shapeFlag:b,children:Q,dynamicChildren:y}=e;if(t==null){const v=e.el=p(""),S=e.anchor=p("");d(v,n,i),d(S,n,i);const P=(C,Z)=>{b&16&&(r&&r.isCE&&(r.ce._teleportTarget=C),u(Q,C,Z,r,s,o,a,l))},x=()=>{const C=e.target=rh(e.props,h),Z=mS(C,e,p,d);C&&(o!=="svg"&&l$(C)?o="svg":o!=="mathml"&&c$(C)&&(o="mathml"),g||(P(C,Z),pu(e,!1)))};g&&(P(n,S),pu(e,!0)),a$(e.props)?(e.el.__isMounted=!1,Mt(()=>{x(),delete e.el.__isMounted},s)):x()}else{if(a$(e.props)&&t.el.__isMounted===!1){Mt(()=>{pS.process(t,e,n,i,r,s,o,a,l,c)},s);return}e.el=t.el,e.targetStart=t.targetStart;const v=e.anchor=t.anchor,S=e.target=t.target,P=e.targetAnchor=t.targetAnchor,x=Fa(t.props),C=x?n:S,Z=x?v:P;if(o==="svg"||l$(S)?o="svg":(o==="mathml"||c$(S))&&(o="mathml"),y?(f(t.dynamicChildren,y,C,r,s,o,a),gm(t,e,!0)):l||O(t,e,C,Z,r,s,o,a,!1),g)x?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Sc(e,n,v,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const W=e.target=rh(e.props,h);W&&Sc(e,W,null,c,0)}else x&&Sc(e,S,P,c,1);pu(e,g)}},remove(t,e,n,{um:i,o:{remove:r}},s){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:O,props:f}=t;if(O&&(r(c),r(u)),s&&r(l),o&16){const d=s||!Fa(f);for(let h=0;h{t.isMounted=!0}),Js(()=>{t.isUnmounting=!0}),t}const Jn=[Function,Array],am={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Jn,onEnter:Jn,onAfterEnter:Jn,onEnterCancelled:Jn,onBeforeLeave:Jn,onLeave:Jn,onAfterLeave:Jn,onLeaveCancelled:Jn,onBeforeAppear:Jn,onAppear:Jn,onAfterAppear:Jn,onAppearCancelled:Jn},gS=t=>{const e=t.subTree;return e.component?gS(e.component):e},Lk={name:"BaseTransition",props:am,setup(t,{slots:e}){const n=Qt(),i=om();return()=>{const r=e.default&&FO(e.default(),!0);if(!r||!r.length)return;const s=$S(r),o=Ue(t),{mode:a}=o;if(i.isLeaving)return Lf(s);const l=u$(s);if(!l)return Lf(s);let c=Mo(l,o,i,n,O=>c=O);l.type!==kt&&_r(l,c);let u=n.subTree&&u$(n.subTree);if(u&&u.type!==kt&&!hi(l,u)&&gS(n).type!==kt){let O=Mo(u,o,i,n);if(_r(u,O),a==="out-in"&&l.type!==kt)return i.isLeaving=!0,O.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete O.afterLeave,u=void 0},Lf(s);a==="in-out"&&l.type!==kt?O.delayLeave=(f,d,h)=>{const p=yS(i,u);p[String(u.key)]=u,f[Nr]=()=>{d(),f[Nr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return s}}};function $S(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==kt){e=n;break}}return e}const QS=Lk;function yS(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function Mo(t,e,n,i,r){const{appear:s,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:O,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:$,onAppear:g,onAfterAppear:b,onAppearCancelled:Q}=e,y=String(t.key),v=yS(n,t),S=(C,Z)=>{C&&ci(C,i,9,Z)},P=(C,Z)=>{const W=Z[1];S(C,Z),ve(C)?C.every(E=>E.length<=1)&&W():C.length<=1&&W()},x={mode:o,persisted:a,beforeEnter(C){let Z=l;if(!n.isMounted)if(s)Z=$||l;else return;C[Nr]&&C[Nr](!0);const W=v[y];W&&hi(t,W)&&W.el[Nr]&&W.el[Nr](),S(Z,[C])},enter(C){let Z=c,W=u,E=O;if(!n.isMounted)if(s)Z=g||c,W=b||u,E=Q||O;else return;let te=!1;const se=C[Pc]=le=>{te||(te=!0,le?S(E,[C]):S(W,[C]),x.delayedLeave&&x.delayedLeave(),C[Pc]=void 0)};Z?P(Z,[C,se]):se()},leave(C,Z){const W=String(t.key);if(C[Pc]&&C[Pc](!0),n.isUnmounting)return Z();S(f,[C]);let E=!1;const te=C[Nr]=se=>{E||(E=!0,Z(),se?S(p,[C]):S(h,[C]),C[Nr]=void 0,v[W]===t&&delete v[W])};v[W]=t,d?P(d,[C,te]):te()},clone(C){const Z=Mo(C,e,n,i,r);return r&&r(Z),Z}};return x}function Lf(t){if(Gl(t))return t=Qi(t),t.children=null,t}function u$(t){if(!Gl(t))return hS(t.type)&&t.children?$S(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Ce(n.default))return n.default()}}function _r(t,e){t.shapeFlag&6&&t.component?(t.transition=e,_r(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function FO(t,e=!1,n){let i=[],r=0;for(let s=0;s1)for(let s=0;sn.value,set:s=>n.value=s})}return n}function hl(t,e,n,i,r=!1){if(ve(t)){t.forEach((h,p)=>hl(h,e&&(ve(e)?e[p]:e),n,i,r));return}if(ns(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&hl(t,e,n,i.component.subTree);return}const s=i.shapeFlag&4?Hl(i.component):i.el,o=r?null:s,{i:a,r:l}=t,c=e&&e.r,u=a.refs===We?a.refs={}:a.refs,O=a.setupState,f=Ue(O),d=O===We?()=>!1:h=>tt(f,h);if(c!=null&&c!==l&&(pt(c)?(u[c]=null,d(c)&&(O[c]=null)):He(c)&&(c.value=null)),Ce(l))aa(l,a,12,[o,u]);else{const h=pt(l),p=He(l);if(h||p){const $=()=>{if(t.f){const g=h?d(l)?O[l]:u[l]:l.value;r?ve(g)&&Gp(g,s):ve(g)?g.includes(s)||g.push(s):h?(u[l]=[s],d(l)&&(O[l]=u[l])):(l.value=[s],t.k&&(u[t.k]=l.value))}else h?(u[l]=o,d(l)&&(O[l]=o)):p&&(l.value=o,t.k&&(u[t.k]=o))};o?($.id=-1,Mt($,n)):$()}}}let O$=!1;const so=()=>{O$||(console.error("Hydration completed but contains mismatches."),O$=!0)},Nk=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",jk=t=>t.namespaceURI.includes("MathML"),_c=t=>{if(t.nodeType===1){if(Nk(t))return"svg";if(jk(t))return"mathml"}},yo=t=>t.nodeType===8;function Bk(t){const{mt:e,p:n,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:a,insert:l,createComment:c}}=t,u=(Q,y)=>{if(!y.hasChildNodes()){n(null,Q,y),Iu(),y._vnode=Q;return}O(y.firstChild,Q,null,null,null),Iu(),y._vnode=Q},O=(Q,y,v,S,P,x=!1)=>{x=x||!!y.dynamicChildren;const C=yo(Q)&&Q.data==="[",Z=()=>p(Q,y,v,S,P,C),{type:W,ref:E,shapeFlag:te,patchFlag:se}=y;let le=Q.nodeType;y.el=Q,se===-2&&(x=!1,y.dynamicChildren=null);let F=null;switch(W){case $r:le!==3?y.children===""?(l(y.el=r(""),o(Q),Q),F=Q):F=Z():(Q.data!==y.children&&(so(),Q.data=y.children),F=s(Q));break;case kt:b(Q)?(F=s(Q),g(y.el=Q.content.firstChild,Q,v)):le!==8||C?F=Z():F=s(Q);break;case zs:if(C&&(Q=s(Q),le=Q.nodeType),le===1||le===3){F=Q;const I=!y.children.length;for(let z=0;z{x=x||!!y.dynamicChildren;const{type:C,props:Z,patchFlag:W,shapeFlag:E,dirs:te,transition:se}=y,le=C==="input"||C==="option";if(le||W!==-1){te&&Ei(y,null,v,"created");let F=!1;if(b(Q)){F=NS(null,se)&&v&&v.vnode.props&&v.vnode.props.appear;const z=Q.content.firstChild;if(F){const J=z.getAttribute("class");J&&(z.$cls=J),se.beforeEnter(z)}g(z,Q,v),y.el=Q=z}if(E&16&&!(Z&&(Z.innerHTML||Z.textContent))){let z=d(Q.firstChild,y,Q,v,S,P,x);for(;z;){xc(Q,1)||so();const J=z;z=z.nextSibling,a(J)}}else if(E&8){let z=y.children;z[0]===` -`&&(Q.tagName==="PRE"||Q.tagName==="TEXTAREA")&&(z=z.slice(1)),Q.textContent!==z&&(xc(Q,0)||so(),Q.textContent=y.children)}if(Z){if(le||!x||W&48){const z=Q.tagName.includes("-");for(const J in Z)(le&&(J.endsWith("value")||J==="indeterminate")||Wl(J)&&!To(J)||J[0]==="."||z)&&i(Q,J,null,Z[J],void 0,v)}else if(Z.onClick)i(Q,"onClick",null,Z.onClick,void 0,v);else if(W&4&&Ui(Z.style))for(const z in Z.style)Z.style[z]}let I;(I=Z&&Z.onVnodeBeforeMount)&&Tn(I,v,y),te&&Ei(y,null,v,"beforeMount"),((I=Z&&Z.onVnodeMounted)||te||F)&&t0(()=>{I&&Tn(I,v,y),F&&se.enter(Q),te&&Ei(y,null,v,"mounted")},S)}return Q.nextSibling},d=(Q,y,v,S,P,x,C)=>{C=C||!!y.dynamicChildren;const Z=y.children,W=Z.length;for(let E=0;E{const{slotScopeIds:C}=y;C&&(P=P?P.concat(C):C);const Z=o(Q),W=d(s(Q),y,Z,v,S,P,x);return W&&yo(W)&&W.data==="]"?s(y.anchor=W):(so(),l(y.anchor=c("]"),Z,W),W)},p=(Q,y,v,S,P,x)=>{if(xc(Q.parentElement,1)||so(),y.el=null,x){const W=$(Q);for(;;){const E=s(Q);if(E&&E!==W)a(E);else break}}const C=s(Q),Z=o(Q);return a(Q),n(null,y,Z,C,v,S,_c(Z),P),v&&(v.vnode.el=y.el,tf(v,y.el)),C},$=(Q,y="[",v="]")=>{let S=0;for(;Q;)if(Q=s(Q),Q&&yo(Q)&&(Q.data===y&&S++,Q.data===v)){if(S===0)return s(Q);S--}return Q},g=(Q,y,v)=>{const S=y.parentNode;S&&S.replaceChild(Q,y);let P=v;for(;P;)P.vnode.el===y&&(P.vnode.el=P.subTree.el=Q),P=P.parent},b=Q=>Q.nodeType===1&&Q.tagName==="TEMPLATE";return[u,O]}const f$="data-allow-mismatch",Gk={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function xc(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(f$);)t=t.parentElement;const n=t&&t.getAttribute(f$);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:n.split(",").includes(Gk[e])}}const Fk=MO().requestIdleCallback||(t=>setTimeout(t,1)),Hk=MO().cancelIdleCallback||(t=>clearTimeout(t)),Kk=(t=1e4)=>e=>{const n=Fk(e,{timeout:t});return()=>Hk(n)};function Jk(t){const{top:e,left:n,bottom:i,right:r}=t.getBoundingClientRect(),{innerHeight:s,innerWidth:o}=window;return(e>0&&e0&&i0&&n0&&r(e,n)=>{const i=new IntersectionObserver(r=>{for(const s of r)if(s.isIntersecting){i.disconnect(),e();break}},t);return n(r=>{if(r instanceof Element){if(Jk(r))return e(),i.disconnect(),!1;i.observe(r)}}),()=>i.disconnect()},tR=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},nR=(t=[])=>(e,n)=>{pt(t)&&(t=[t]);let i=!1;const r=o=>{i||(i=!0,s(),e(),o.target.dispatchEvent(new o.constructor(o.type,o)))},s=()=>{n(o=>{for(const a of t)o.removeEventListener(a,r)})};return n(o=>{for(const a of t)o.addEventListener(a,r,{once:!0})}),s};function iR(t,e){if(yo(t)&&t.data==="["){let n=1,i=t.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(yo(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else e(t)}const ns=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function rR(t){Ce(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:r=200,hydrate:s,timeout:o,suspensible:a=!0,onError:l}=t;let c=null,u,O=0;const f=()=>(O++,c=null,d()),d=()=>{let h;return c||(h=c=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),l)return new Promise(($,g)=>{l(p,()=>$(f()),()=>g(p),O+1)});throw p}).then(p=>h!==c&&c?c:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return M({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(h,p,$){const g=s?()=>{const Q=s(()=>{$()},y=>iR(h,y));Q&&(p.bum||(p.bum=[])).push(Q),(p.u||(p.u=[])).push(()=>!0)}:$;u?g():d().then(()=>!p.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const h=Ut;if(lm(h),u)return()=>Wf(u,h);const p=Q=>{c=null,Ks(Q,h,13,!i)};if(a&&h.suspense||Io)return d().then(Q=>()=>Wf(Q,h)).catch(Q=>(p(Q),()=>i?R(i,{error:Q}):null));const $=ne(!1),g=ne(),b=ne(!!r);return r&&setTimeout(()=>{b.value=!1},r),o!=null&&setTimeout(()=>{if(!$.value&&!g.value){const Q=new Error(`Async component timed out after ${o}ms.`);p(Q),g.value=Q}},o),d().then(()=>{$.value=!0,h.parent&&Gl(h.parent.vnode)&&h.parent.update()}).catch(Q=>{p(Q),g.value=Q}),()=>{if($.value&&u)return Wf(u,h);if(g.value&&i)return R(i,{error:g.value});if(n&&!b.value)return R(n)}}})}function Wf(t,e){const{ref:n,props:i,children:r,ce:s}=e.vnode,o=R(t,i,r);return o.ref=n,o.ce=s,delete e.vnode.ce,o}const Gl=t=>t.type.__isKeepAlive,sR={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=Qt(),i=n.ctx;if(!i.renderer)return()=>{const b=e.default&&e.default();return b&&b.length===1?b[0]:b};const r=new Map,s=new Set;let o=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:O}}}=i,f=O("div");i.activate=(b,Q,y,v,S)=>{const P=b.component;c(b,Q,y,0,a),l(P.vnode,b,Q,y,P,a,v,b.slotScopeIds,S),Mt(()=>{P.isDeactivated=!1,P.a&&Ro(P.a);const x=b.props&&b.props.onVnodeMounted;x&&Tn(x,P.parent,b)},a)},i.deactivate=b=>{const Q=b.component;Du(Q.m),Du(Q.a),c(b,f,null,1,a),Mt(()=>{Q.da&&Ro(Q.da);const y=b.props&&b.props.onVnodeUnmounted;y&&Tn(y,Q.parent,b),Q.isDeactivated=!0},a)};function d(b){Nf(b),u(b,n,a,!0)}function h(b){r.forEach((Q,y)=>{const v=mh(Q.type);v&&!b(v)&&p(y)})}function p(b){const Q=r.get(b);Q&&(!o||!hi(Q,o))?d(Q):o&&Nf(o),r.delete(b),s.delete(b)}Re(()=>[t.include,t.exclude],([b,Q])=>{b&&h(y=>Za(b,y)),Q&&h(y=>!Za(Q,y))},{flush:"post",deep:!0});let $=null;const g=()=>{$!=null&&(Lu(n.subTree.type)?Mt(()=>{r.set($,wc(n.subTree))},n.subTree.suspense):r.set($,wc(n.subTree)))};return yt(g),KO(g),Js(()=>{r.forEach(b=>{const{subTree:Q,suspense:y}=n,v=wc(Q);if(b.type===v.type&&b.key===v.key){Nf(v);const S=v.component.da;S&&Mt(S,y);return}d(b)})}),()=>{if($=null,!e.default)return o=null;const b=e.default(),Q=b[0];if(b.length>1)return o=null,b;if(!xr(Q)||!(Q.shapeFlag&4)&&!(Q.shapeFlag&128))return o=null,Q;let y=wc(Q);if(y.type===kt)return o=null,y;const v=y.type,S=mh(ns(y)?y.type.__asyncResolved||{}:v),{include:P,exclude:x,max:C}=t;if(P&&(!S||!Za(P,S))||x&&S&&Za(x,S))return y.shapeFlag&=-257,o=y,Q;const Z=y.key==null?v:y.key,W=r.get(Z);return y.el&&(y=Qi(y),Q.shapeFlag&128&&(Q.ssContent=y)),$=Z,W?(y.el=W.el,y.component=W.component,y.transition&&_r(y,y.transition),y.shapeFlag|=512,s.delete(Z),s.add(Z)):(s.add(Z),C&&s.size>parseInt(C,10)&&p(s.values().next().value)),y.shapeFlag|=256,o=y,Lu(Q.type)?Q:y}}},oR=sR;function Za(t,e){return ve(t)?t.some(n=>Za(n,e)):pt(t)?t.split(",").includes(e):IT(t)?(t.lastIndex=0,t.test(e)):!1}function bS(t,e){SS(t,"a",e)}function vS(t,e){SS(t,"da",e)}function SS(t,e,n=Ut){const i=t.__wdc||(t.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return t()});if(HO(e,i,n),n){let r=n.parent;for(;r&&r.parent;)Gl(r.parent.vnode)&&aR(i,e,n,r),r=r.parent}}function aR(t,e,n,i){const r=HO(e,t,i,!0);Fi(()=>{Gp(i[e],r)},n)}function Nf(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function wc(t){return t.shapeFlag&128?t.ssContent:t}function HO(t,e,n=Ut,i=!1){if(n){const r=n[t]||(n[t]=[]),s=e.__weh||(e.__weh=(...o)=>{br();const a=Ds(n),l=ci(e,n,t,o);return a(),vr(),l});return i?r.unshift(s):r.push(s),s}}const Xr=t=>(e,n=Ut)=>{(!Io||t==="sp")&&HO(t,(...i)=>e(...i),n)},PS=Xr("bm"),yt=Xr("m"),cm=Xr("bu"),KO=Xr("u"),Js=Xr("bum"),Fi=Xr("um"),_S=Xr("sp"),xS=Xr("rtg"),wS=Xr("rtc");function TS(t,e=Ut){HO("ec",t,e)}const um="components",lR="directives";function Om(t,e){return fm(um,t,!0,e)||t}const kS=Symbol.for("v-ndc");function JO(t){return pt(t)?fm(um,t,!1)||t:t||kS}function cR(t){return fm(lR,t)}function fm(t,e,n=!0,i=!1){const r=Lt||Ut;if(r){const s=r.type;if(t===um){const a=mh(s,!1);if(a&&(a===e||a===Wt(e)||a===Nl(Wt(e))))return s}const o=d$(r[t]||s[t],e)||d$(r.appContext[t],e);return!o&&i?s:o}}function d$(t,e){return t&&(t[e]||t[Wt(e)]||t[Nl(Wt(e))])}function xt(t,e,n,i){let r;const s=n&&n[i],o=ve(t);if(o||pt(t)){const a=o&&Ui(t);let l=!1,c=!1;a&&(l=!jn(t),c=Pr(t),t=LO(t)),r=new Array(t.length);for(let u=0,O=t.length;ue(a,l,void 0,s&&s[l]));else{const a=Object.keys(t);r=new Array(a.length);for(let l=0,c=a.length;l{const s=i.fn(...r);return s&&(s.key=i.key),s}:i.fn)}return t}function re(t,e,n={},i,r){if(Lt.ce||Lt.parent&&ns(Lt.parent)&&Lt.parent.ce)return e!=="default"&&(n.name=e),w(),D(ke,null,[R("slot",n,i&&i())],64);let s=t[e];s&&s._c&&(s._d=!1),w();const o=s&&dm(s(n)),a=n.key||o&&o.key,l=D(ke,{key:(a&&!$i(a)?a:`_${e}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&t._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function dm(t){return t.some(e=>xr(e)?!(e.type===kt||e.type===ke&&!dm(e.children)):!0)?t:null}function OR(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:ko(i)]=t[i];return n}const sh=t=>t?o0(t)?Hl(t):sh(t.parent):null,Ha=Ot(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>sh(t.parent),$root:t=>sh(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>hm(t),$forceUpdate:t=>t.f||(t.f=()=>{rm(t.update)}),$nextTick:t=>t.n||(t.n=Dt.bind(t.proxy)),$watch:t=>YR.bind(t)}),jf=(t,e)=>t!==We&&!t.__isScriptSetup&&tt(t,e),oh={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:r,props:s,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return r[e];case 4:return n[e];case 3:return s[e]}else{if(jf(i,e))return o[e]=1,i[e];if(r!==We&&tt(r,e))return o[e]=2,r[e];if((c=t.propsOptions[0])&&tt(c,e))return o[e]=3,s[e];if(n!==We&&tt(n,e))return o[e]=4,n[e];ah&&(o[e]=0)}}const u=Ha[e];let O,f;if(u)return e==="$attrs"&&un(t.attrs,"get",""),u(t);if((O=a.__cssModules)&&(O=O[e]))return O;if(n!==We&&tt(n,e))return o[e]=4,n[e];if(f=l.config.globalProperties,tt(f,e))return f[e]},set({_:t},e,n){const{data:i,setupState:r,ctx:s}=t;return jf(r,e)?(r[e]=n,!0):i!==We&&tt(i,e)?(i[e]=n,!0):tt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!n[o]||t!==We&&tt(t,o)||jf(e,o)||(a=s[0])&&tt(a,o)||tt(i,o)||tt(Ha,o)||tt(r.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:tt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},fR=Ot({},oh,{get(t,e){if(e!==Symbol.unscopables)return oh.get(t,e,t)},has(t,e){return e[0]!=="_"&&!NT(e)}});function dR(){return null}function hR(){return null}function pR(t){}function mR(t){}function gR(){return null}function $R(){}function QR(t,e){return null}function yR(){return RS().slots}function bR(){return RS().attrs}function RS(){const t=Qt();return t.setupContext||(t.setupContext=c0(t))}function pl(t){return ve(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function CS(t,e){const n=pl(t);for(const i in e){if(i.startsWith("__skip"))continue;let r=n[i];r?ve(r)||Ce(r)?r=n[i]={type:r,default:e[i]}:r.default=e[i]:r===null&&(r=n[i]={default:e[i]}),r&&e[`__skip_${i}`]&&(r.skipFactory=!0)}return n}function vR(t,e){return!t||!e?t||e:ve(t)&&ve(e)?t.concat(e):Ot({},pl(t),pl(e))}function SR(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function PR(t){const e=Qt();let n=t();return dh(),Fp(n)&&(n=n.catch(i=>{throw Ds(e),i})),[n,()=>Ds(e)]}let ah=!0;function _R(t){const e=hm(t),n=t.proxy,i=t.ctx;ah=!1,e.beforeCreate&&h$(e.beforeCreate,t,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:O,mounted:f,beforeUpdate:d,updated:h,activated:p,deactivated:$,beforeDestroy:g,beforeUnmount:b,destroyed:Q,unmounted:y,render:v,renderTracked:S,renderTriggered:P,errorCaptured:x,serverPrefetch:C,expose:Z,inheritAttrs:W,components:E,directives:te,filters:se}=e;if(c&&xR(c,i,null),o)for(const I in o){const z=o[I];Ce(z)&&(i[I]=z.bind(n))}if(r){const I=r.call(n,n);ot(I)&&(t.data=Sr(I))}if(ah=!0,s)for(const I in s){const z=s[I],J=Ce(z)?z.bind(n,n):Ce(z.get)?z.get.bind(n,n):oi,ue=!Ce(z)&&Ce(z.set)?z.set.bind(n):oi,Se=G({get:J,set:ue});Object.defineProperty(i,I,{enumerable:!0,configurable:!0,get:()=>Se.value,set:fe=>Se.value=fe})}if(a)for(const I in a)XS(a[I],i,n,I);if(l){const I=Ce(l)?l.call(n):l;Reflect.ownKeys(I).forEach(z=>{fr(z,I[z])})}u&&h$(u,t,"c");function F(I,z){ve(z)?z.forEach(J=>I(J.bind(n))):z&&I(z.bind(n))}if(F(PS,O),F(yt,f),F(cm,d),F(KO,h),F(bS,p),F(vS,$),F(TS,x),F(wS,S),F(xS,P),F(Js,b),F(Fi,y),F(_S,C),ve(Z))if(Z.length){const I=t.exposed||(t.exposed={});Z.forEach(z=>{Object.defineProperty(I,z,{get:()=>n[z],set:J=>n[z]=J})})}else t.exposed||(t.exposed={});v&&t.render===oi&&(t.render=v),W!=null&&(t.inheritAttrs=W),E&&(t.components=E),te&&(t.directives=te),C&&lm(t)}function xR(t,e,n=oi){ve(t)&&(t=lh(t));for(const i in t){const r=t[i];let s;ot(r)?"default"in r?s=bn(r.from||i,r.default,!0):s=bn(r.from||i):s=bn(r),He(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function h$(t,e,n){ci(ve(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function XS(t,e,n,i){let r=i.includes(".")?HS(n,i):()=>n[i];if(pt(t)){const s=e[t];Ce(s)&&Re(r,s)}else if(Ce(t))Re(r,t.bind(n));else if(ot(t))if(ve(t))t.forEach(s=>XS(s,e,n,i));else{const s=Ce(t.handler)?t.handler.bind(n):e[t.handler];Ce(s)&&Re(r,s,t)}}function hm(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!n&&!i?l=e:(l={},r.length&&r.forEach(c=>Uu(l,c,o,!0)),Uu(l,e,o)),ot(e)&&s.set(e,l),l}function Uu(t,e,n,i=!1){const{mixins:r,extends:s}=e;s&&Uu(t,s,n,!0),r&&r.forEach(o=>Uu(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=wR[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const wR={data:p$,props:m$,emits:m$,methods:za,computed:za,beforeCreate:mn,created:mn,beforeMount:mn,mounted:mn,beforeUpdate:mn,updated:mn,beforeDestroy:mn,beforeUnmount:mn,destroyed:mn,unmounted:mn,activated:mn,deactivated:mn,errorCaptured:mn,serverPrefetch:mn,components:za,directives:za,watch:kR,provide:p$,inject:TR};function p$(t,e){return e?t?function(){return Ot(Ce(t)?t.call(this,this):t,Ce(e)?e.call(this,this):e)}:e:t}function TR(t,e){return za(lh(t),lh(e))}function lh(t){if(ve(t)){const e={};for(let n=0;n1)return n&&Ce(e)?e.call(i&&i.proxy):e}}function ES(){return!!(Ut||Lt||Zs)}const AS={},qS=()=>Object.create(AS),ZS=t=>Object.getPrototypeOf(t)===AS;function XR(t,e,n,i=!1){const r={},s=qS();t.propsDefaults=Object.create(null),zS(t,e,r,s);for(const o in t.propsOptions[0])o in r||(r[o]=void 0);n?t.props=i?r:iS(r):t.type.props?t.props=r:t.props=s,t.attrs=s}function VR(t,e,n,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=t,a=Ue(r),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let O=0;O{l=!0;const[f,d]=YS(O,e,!0);Ot(o,f),d&&a.push(...d)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!l)return ot(t)&&i.set(t,xo),xo;if(ve(s))for(let u=0;ut[0]==="_"||t==="$stable",mm=t=>ve(t)?t.map(kn):[kn(t)],AR=(t,e,n)=>{if(e._n)return e;const i=V((...r)=>mm(e(...r)),n);return i._c=!1,i},MS=(t,e,n)=>{const i=t._ctx;for(const r in t){if(pm(r))continue;const s=t[r];if(Ce(s))e[r]=AR(r,s,i);else if(s!=null){const o=mm(s);e[r]=()=>o}}},IS=(t,e)=>{const n=mm(e);t.slots.default=()=>n},US=(t,e,n)=>{for(const i in e)(n||!pm(i))&&(t[i]=e[i])},qR=(t,e,n)=>{const i=t.slots=qS();if(t.vnode.shapeFlag&32){const r=e._;r?(US(i,e,n),n&&zv(i,"_",r,!0)):MS(e,i)}else e&&IS(t,e)},ZR=(t,e,n)=>{const{vnode:i,slots:r}=t;let s=!0,o=We;if(i.shapeFlag&32){const a=e._;a?n&&a===1?s=!1:US(r,e,n):(s=!e.$stable,MS(e,r)),o=e}else e&&(IS(t,e),o={default:1});if(s)for(const a in r)!pm(a)&&o[a]==null&&delete r[a]},Mt=t0;function DS(t){return WS(t)}function LS(t){return WS(t,Bk)}function WS(t,e){const n=MO();n.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:O,nextSibling:f,setScopeId:d=oi,insertStaticContent:h}=t,p=(X,q,j,oe=null,ie=null,_=null,T=void 0,Y=null,N=!!q.dynamicChildren)=>{if(X===q)return;X&&!hi(X,q)&&(oe=Xe(X),fe(X,ie,_,!0),X=null),q.patchFlag===-2&&(N=!1,q.dynamicChildren=null);const{type:ee,ref:ae,shapeFlag:A}=q;switch(ee){case $r:$(X,q,j,oe);break;case kt:g(X,q,j,oe);break;case zs:X==null&&b(q,j,oe,T);break;case ke:E(X,q,j,oe,ie,_,T,Y,N);break;default:A&1?v(X,q,j,oe,ie,_,T,Y,N):A&6?te(X,q,j,oe,ie,_,T,Y,N):(A&64||A&128)&&ee.process(X,q,j,oe,ie,_,T,Y,N,ft)}ae!=null&&ie&&hl(ae,X&&X.ref,_,q||X,!q)},$=(X,q,j,oe)=>{if(X==null)i(q.el=a(q.children),j,oe);else{const ie=q.el=X.el;q.children!==X.children&&c(ie,q.children)}},g=(X,q,j,oe)=>{X==null?i(q.el=l(q.children||""),j,oe):q.el=X.el},b=(X,q,j,oe)=>{[X.el,X.anchor]=h(X.children,q,j,oe,X.el,X.anchor)},Q=({el:X,anchor:q},j,oe)=>{let ie;for(;X&&X!==q;)ie=f(X),i(X,j,oe),X=ie;i(q,j,oe)},y=({el:X,anchor:q})=>{let j;for(;X&&X!==q;)j=f(X),r(X),X=j;r(q)},v=(X,q,j,oe,ie,_,T,Y,N)=>{q.type==="svg"?T="svg":q.type==="math"&&(T="mathml"),X==null?S(q,j,oe,ie,_,T,Y,N):C(X,q,ie,_,T,Y,N)},S=(X,q,j,oe,ie,_,T,Y)=>{let N,ee;const{props:ae,shapeFlag:A,transition:L,dirs:he}=X;if(N=X.el=o(X.type,_,ae&&ae.is,ae),A&8?u(N,X.children):A&16&&x(X.children,N,null,oe,ie,Bf(X,_),T,Y),he&&Ei(X,null,oe,"created"),P(N,X,X.scopeId,T,oe),ae){for(const Be in ae)Be!=="value"&&!To(Be)&&s(N,Be,null,ae[Be],_,oe);"value"in ae&&s(N,"value",null,ae.value,_),(ee=ae.onVnodeBeforeMount)&&Tn(ee,oe,X)}he&&Ei(X,null,oe,"beforeMount");const we=NS(ie,L);we&&L.beforeEnter(N),i(N,q,j),((ee=ae&&ae.onVnodeMounted)||we||he)&&Mt(()=>{ee&&Tn(ee,oe,X),we&&L.enter(N),he&&Ei(X,null,oe,"mounted")},ie)},P=(X,q,j,oe,ie)=>{if(j&&d(X,j),oe)for(let _=0;_{for(let ee=N;ee{const Y=q.el=X.el;let{patchFlag:N,dynamicChildren:ee,dirs:ae}=q;N|=X.patchFlag&16;const A=X.props||We,L=q.props||We;let he;if(j&&_s(j,!1),(he=L.onVnodeBeforeUpdate)&&Tn(he,j,q,X),ae&&Ei(q,X,j,"beforeUpdate"),j&&_s(j,!0),(A.innerHTML&&L.innerHTML==null||A.textContent&&L.textContent==null)&&u(Y,""),ee?Z(X.dynamicChildren,ee,Y,j,oe,Bf(q,ie),_):T||z(X,q,Y,null,j,oe,Bf(q,ie),_,!1),N>0){if(N&16)W(Y,A,L,j,ie);else if(N&2&&A.class!==L.class&&s(Y,"class",null,L.class,ie),N&4&&s(Y,"style",A.style,L.style,ie),N&8){const we=q.dynamicProps;for(let Be=0;Be{he&&Tn(he,j,q,X),ae&&Ei(q,X,j,"updated")},oe)},Z=(X,q,j,oe,ie,_,T)=>{for(let Y=0;Y{if(q!==j){if(q!==We)for(const _ in q)!To(_)&&!(_ in j)&&s(X,_,q[_],null,ie,oe);for(const _ in j){if(To(_))continue;const T=j[_],Y=q[_];T!==Y&&_!=="value"&&s(X,_,Y,T,ie,oe)}"value"in j&&s(X,"value",q.value,j.value,ie)}},E=(X,q,j,oe,ie,_,T,Y,N)=>{const ee=q.el=X?X.el:a(""),ae=q.anchor=X?X.anchor:a("");let{patchFlag:A,dynamicChildren:L,slotScopeIds:he}=q;he&&(Y=Y?Y.concat(he):he),X==null?(i(ee,j,oe),i(ae,j,oe),x(q.children||[],j,ae,ie,_,T,Y,N)):A>0&&A&64&&L&&X.dynamicChildren?(Z(X.dynamicChildren,L,j,ie,_,T,Y),(q.key!=null||ie&&q===ie.subTree)&&gm(X,q,!0)):z(X,q,j,ae,ie,_,T,Y,N)},te=(X,q,j,oe,ie,_,T,Y,N)=>{q.slotScopeIds=Y,X==null?q.shapeFlag&512?ie.ctx.activate(q,j,oe,T,N):se(q,j,oe,ie,_,T,N):le(X,q,N)},se=(X,q,j,oe,ie,_,T)=>{const Y=X.component=s0(X,oe,ie);if(Gl(X)&&(Y.ctx.renderer=ft),a0(Y,!1,T),Y.asyncDep){if(ie&&ie.registerDep(Y,F,T),!X.el){const N=Y.subTree=R(kt);g(null,N,q,j)}}else F(Y,X,q,j,ie,_,T)},le=(X,q,j)=>{const oe=q.component=X.component;if(WR(X,q,j))if(oe.asyncDep&&!oe.asyncResolved){I(oe,q,j);return}else oe.next=q,oe.update();else q.el=X.el,oe.vnode=q},F=(X,q,j,oe,ie,_,T)=>{const Y=()=>{if(X.isMounted){let{next:A,bu:L,u:he,parent:we,vnode:Be}=X;{const zn=jS(X);if(zn){A&&(A.el=Be.el,I(X,A,T)),zn.asyncDep.then(()=>{X.isUnmounted||Y()});return}}let Ge=A,Xt;_s(X,!1),A?(A.el=Be.el,I(X,A,T)):A=Be,L&&Ro(L),(Xt=A.props&&A.props.onVnodeBeforeUpdate)&&Tn(Xt,we,A,Be),_s(X,!0);const Bt=gu(X),Kn=X.subTree;X.subTree=Bt,p(Kn,Bt,O(Kn.el),Xe(Kn),X,ie,_),A.el=Bt.el,Ge===null&&tf(X,Bt.el),he&&Mt(he,ie),(Xt=A.props&&A.props.onVnodeUpdated)&&Mt(()=>Tn(Xt,we,A,Be),ie)}else{let A;const{el:L,props:he}=q,{bm:we,m:Be,parent:Ge,root:Xt,type:Bt}=X,Kn=ns(q);if(_s(X,!1),we&&Ro(we),!Kn&&(A=he&&he.onVnodeBeforeMount)&&Tn(A,Ge,q),_s(X,!0),L&&wt){const zn=()=>{X.subTree=gu(X),wt(L,X.subTree,X,ie,null)};Kn&&Bt.__asyncHydrate?Bt.__asyncHydrate(L,X,zn):zn()}else{Xt.ce&&Xt.ce._injectChildStyle(Bt);const zn=X.subTree=gu(X);p(null,zn,j,oe,X,ie,_),q.el=zn.el}if(Be&&Mt(Be,ie),!Kn&&(A=he&&he.onVnodeMounted)){const zn=q;Mt(()=>Tn(A,Ge,zn),ie)}(q.shapeFlag&256||Ge&&ns(Ge.vnode)&&Ge.vnode.shapeFlag&256)&&X.a&&Mt(X.a,ie),X.isMounted=!0,q=j=oe=null}};X.scope.on();const N=X.effect=new ll(Y);X.scope.off();const ee=X.update=N.run.bind(N),ae=X.job=N.runIfDirty.bind(N);ae.i=X,ae.id=X.uid,N.scheduler=()=>rm(ae),_s(X,!0),ee()},I=(X,q,j)=>{q.component=X;const oe=X.vnode.props;X.vnode=q,X.next=null,VR(X,q.props,oe,j),ZR(X,q.children,j),br(),o$(X),vr()},z=(X,q,j,oe,ie,_,T,Y,N=!1)=>{const ee=X&&X.children,ae=X?X.shapeFlag:0,A=q.children,{patchFlag:L,shapeFlag:he}=q;if(L>0){if(L&128){ue(ee,A,j,oe,ie,_,T,Y,N);return}else if(L&256){J(ee,A,j,oe,ie,_,T,Y,N);return}}he&8?(ae&16&&Ze(ee,ie,_),A!==ee&&u(j,A)):ae&16?he&16?ue(ee,A,j,oe,ie,_,T,Y,N):Ze(ee,ie,_,!0):(ae&8&&u(j,""),he&16&&x(A,j,oe,ie,_,T,Y,N))},J=(X,q,j,oe,ie,_,T,Y,N)=>{X=X||xo,q=q||xo;const ee=X.length,ae=q.length,A=Math.min(ee,ae);let L;for(L=0;Lae?Ze(X,ie,_,!0,!1,A):x(q,j,oe,ie,_,T,Y,N,A)},ue=(X,q,j,oe,ie,_,T,Y,N)=>{let ee=0;const ae=q.length;let A=X.length-1,L=ae-1;for(;ee<=A&&ee<=L;){const he=X[ee],we=q[ee]=N?jr(q[ee]):kn(q[ee]);if(hi(he,we))p(he,we,j,null,ie,_,T,Y,N);else break;ee++}for(;ee<=A&&ee<=L;){const he=X[A],we=q[L]=N?jr(q[L]):kn(q[L]);if(hi(he,we))p(he,we,j,null,ie,_,T,Y,N);else break;A--,L--}if(ee>A){if(ee<=L){const he=L+1,we=heL)for(;ee<=A;)fe(X[ee],ie,_,!0),ee++;else{const he=ee,we=ee,Be=new Map;for(ee=we;ee<=L;ee++){const Yn=q[ee]=N?jr(q[ee]):kn(q[ee]);Yn.key!=null&&Be.set(Yn.key,ee)}let Ge,Xt=0;const Bt=L-we+1;let Kn=!1,zn=0;const ba=new Array(Bt);for(ee=0;ee=Bt){fe(Yn,ie,_,!0);continue}let xi;if(Yn.key!=null)xi=Be.get(Yn.key);else for(Ge=we;Ge<=L;Ge++)if(ba[Ge-we]===0&&hi(Yn,q[Ge])){xi=Ge;break}xi===void 0?fe(Yn,ie,_,!0):(ba[xi-we]=ee+1,xi>=zn?zn=xi:Kn=!0,p(Yn,q[xi],j,null,ie,_,T,Y,N),Xt++)}const Kg=Kn?zR(ba):xo;for(Ge=Kg.length-1,ee=Bt-1;ee>=0;ee--){const Yn=we+ee,xi=q[Yn],Jg=Yn+1{const{el:_,type:T,transition:Y,children:N,shapeFlag:ee}=X;if(ee&6){Se(X.component.subTree,q,j,oe);return}if(ee&128){X.suspense.move(q,j,oe);return}if(ee&64){T.move(X,q,j,ft);return}if(T===ke){i(_,q,j);for(let A=0;AY.enter(_),ie);else{const{leave:A,delayLeave:L,afterLeave:he}=Y,we=()=>{X.ctx.isUnmounted?r(_):i(_,q,j)},Be=()=>{A(_,()=>{we(),he&&he()})};L?L(_,we,Be):Be()}else i(_,q,j)},fe=(X,q,j,oe=!1,ie=!1)=>{const{type:_,props:T,ref:Y,children:N,dynamicChildren:ee,shapeFlag:ae,patchFlag:A,dirs:L,cacheIndex:he}=X;if(A===-2&&(ie=!1),Y!=null&&(br(),hl(Y,null,j,X,!0),vr()),he!=null&&(q.renderCache[he]=void 0),ae&256){q.ctx.deactivate(X);return}const we=ae&1&&L,Be=!ns(X);let Ge;if(Be&&(Ge=T&&T.onVnodeBeforeUnmount)&&Tn(Ge,q,X),ae&6)Ke(X.component,j,oe);else{if(ae&128){X.suspense.unmount(j,oe);return}we&&Ei(X,null,q,"beforeUnmount"),ae&64?X.type.remove(X,q,j,ft,oe):ee&&!ee.hasOnce&&(_!==ke||A>0&&A&64)?Ze(ee,q,j,!1,!0):(_===ke&&A&384||!ie&&ae&16)&&Ze(N,q,j),oe&&Te(X)}(Be&&(Ge=T&&T.onVnodeUnmounted)||we)&&Mt(()=>{Ge&&Tn(Ge,q,X),we&&Ei(X,null,q,"unmounted")},j)},Te=X=>{const{type:q,el:j,anchor:oe,transition:ie}=X;if(q===ke){Ee(j,oe);return}if(q===zs){y(X);return}const _=()=>{r(j),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(X.shapeFlag&1&&ie&&!ie.persisted){const{leave:T,delayLeave:Y}=ie,N=()=>T(j,_);Y?Y(X.el,_,N):N()}else _()},Ee=(X,q)=>{let j;for(;X!==q;)j=f(X),r(X),X=j;r(q)},Ke=(X,q,j)=>{const{bum:oe,scope:ie,job:_,subTree:T,um:Y,m:N,a:ee,parent:ae,slots:{__:A}}=X;Du(N),Du(ee),oe&&Ro(oe),ae&&ve(A)&&A.forEach(L=>{ae.renderCache[L]=void 0}),ie.stop(),_&&(_.flags|=8,fe(T,X,q,j)),Y&&Mt(Y,q),Mt(()=>{X.isUnmounted=!0},q),q&&q.pendingBranch&&!q.isUnmounted&&X.asyncDep&&!X.asyncResolved&&X.suspenseId===q.pendingId&&(q.deps--,q.deps===0&&q.resolve())},Ze=(X,q,j,oe=!1,ie=!1,_=0)=>{for(let T=_;T{if(X.shapeFlag&6)return Xe(X.component.subTree);if(X.shapeFlag&128)return X.suspense.next();const q=f(X.anchor||X.el),j=q&&q[dS];return j?f(j):q};let it=!1;const je=(X,q,j)=>{X==null?q._vnode&&fe(q._vnode,null,null,!0):p(q._vnode||null,X,q,null,null,null,j),q._vnode=X,it||(it=!0,o$(),Iu(),it=!1)},ft={p,um:fe,m:Se,r:Te,mt:se,mc:x,pc:z,pbc:Z,n:Xe,o:t};let Ht,wt;return e&&([Ht,wt]=e(ft)),{render:je,hydrate:Ht,createApp:CR(je,Ht)}}function Bf({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function _s({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function NS(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function gm(t,e,n=!1){const i=t.children,r=e.children;if(ve(i)&&ve(r))for(let s=0;s>1,t[n[a]]0&&(e[i]=n[s-1]),n[s]=i)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=e[o];return n}function jS(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:jS(e)}function Du(t){if(t)for(let e=0;ebn(BS);function Zt(t,e){return Fl(t,null,e)}function $m(t,e){return Fl(t,null,{flush:"post"})}function FS(t,e){return Fl(t,null,{flush:"sync"})}function Re(t,e,n){return Fl(t,e,n)}function Fl(t,e,n=We){const{immediate:i,deep:r,flush:s,once:o}=n,a=Ot({},n),l=e&&i||!e&&s!=="post";let c;if(Io){if(s==="sync"){const d=GS();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=oi,d.resume=oi,d.pause=oi,d}}const u=Ut;a.call=(d,h,p)=>ci(d,u,h,p);let O=!1;s==="post"?a.scheduler=d=>{Mt(d,u&&u.suspense)}:s!=="sync"&&(O=!0,a.scheduler=(d,h)=>{h?d():rm(d)}),a.augmentJob=d=>{e&&(d.flags|=4),O&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const f=Xk(t,e,a);return Io&&(c?c.push(f):l&&f()),f}function YR(t,e,n){const i=this.proxy,r=pt(t)?t.includes(".")?HS(i,t):()=>i[t]:t.bind(i,i);let s;Ce(e)?s=e:(s=e.handler,n=e);const o=Ds(this),a=Fl(r,s.bind(i),n);return o(),a}function HS(t,e){const n=e.split(".");return()=>{let i=t;for(let r=0;r{let u,O=We,f;return FS(()=>{const d=t[r];$n(u,d)&&(u=d,c())}),{get(){return l(),n.get?n.get(u):u},set(d){const h=n.set?n.set(d):d;if(!$n(h,u)&&!(O!==We&&$n(d,O)))return;const p=i.vnode.props;p&&(e in p||r in p||s in p)&&(`onUpdate:${e}`in p||`onUpdate:${r}`in p||`onUpdate:${s}`in p)||(u=d,c()),i.emit(`update:${e}`,h),$n(d,h)&&$n(d,O)&&!$n(h,f)&&c(),O=d,f=h}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||We:a,done:!1}:{done:!0}}}},a}const KS=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Wt(e)}Modifiers`]||t[`${Vn(e)}Modifiers`];function IR(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||We;let r=n;const s=e.startsWith("update:"),o=s&&KS(i,e.slice(7));o&&(o.trim&&(r=n.map(u=>pt(u)?u.trim():u)),o.number&&(r=n.map(Au)));let a,l=i[a=ko(e)]||i[a=ko(Wt(e))];!l&&s&&(l=i[a=ko(Vn(e))]),l&&ci(l,t,6,r);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,ci(c,t,6,r)}}function JS(t,e,n=!1){const i=e.emitsCache,r=i.get(t);if(r!==void 0)return r;const s=t.emits;let o={},a=!1;if(!Ce(t)){const l=c=>{const u=JS(c,e,!0);u&&(a=!0,Ot(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!s&&!a?(ot(t)&&i.set(t,null),null):(ve(s)?s.forEach(l=>o[l]=null):Ot(o,s),ot(t)&&i.set(t,o),o)}function ef(t,e){return!t||!Wl(e)?!1:(e=e.slice(2).replace(/Once$/,""),tt(t,e[0].toLowerCase()+e.slice(1))||tt(t,Vn(e))||tt(t,e))}function gu(t){const{type:e,vnode:n,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:O,data:f,setupState:d,ctx:h,inheritAttrs:p}=t,$=dl(t);let g,b;try{if(n.shapeFlag&4){const y=r||i,v=y;g=kn(c.call(v,y,u,O,d,f,h)),b=a}else{const y=e;g=kn(y.length>1?y(O,{attrs:a,slots:o,emit:l}):y(O,null)),b=e.props?a:DR(a)}}catch(y){Ka.length=0,Ks(y,t,1),g=R(kt)}let Q=g;if(b&&p!==!1){const y=Object.keys(b),{shapeFlag:v}=Q;y.length&&v&7&&(s&&y.some(Bp)&&(b=LR(b,s)),Q=Qi(Q,b,!1,!0))}return n.dirs&&(Q=Qi(Q,null,!1,!0),Q.dirs=Q.dirs?Q.dirs.concat(n.dirs):n.dirs),n.transition&&_r(Q,n.transition),g=Q,dl($),g}function UR(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||Wl(n))&&((e||(e={}))[n]=t[n]);return e},LR=(t,e)=>{const n={};for(const i in t)(!Bp(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function WR(t,e,n){const{props:i,children:r,component:s}=t,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?$$(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let O=0;Ot.__isSuspense;let uh=0;const NR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,r,s,o,a,l,c){if(t==null)BR(e,n,i,r,s,o,a,l,c);else{if(s&&s.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}GR(t,e,n,i,r,o,a,l,c)}},hydrate:FR,normalize:HR},jR=NR;function ml(t,e){const n=t.props&&t.props[e];Ce(n)&&n()}function BR(t,e,n,i,r,s,o,a,l){const{p:c,o:{createElement:u}}=l,O=u("div"),f=t.suspense=e0(t,r,i,e,O,n,s,o,a,l);c(null,f.pendingBranch=t.ssContent,O,null,i,f,s,o),f.deps>0?(ml(t,"onPending"),ml(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,s,o),Xo(f,t.ssFallback)):f.resolve(!1,!0)}function GR(t,e,n,i,r,s,o,a,{p:l,um:c,o:{createElement:u}}){const O=e.suspense=t.suspense;O.vnode=e,e.el=t.el;const f=e.ssContent,d=e.ssFallback,{activeBranch:h,pendingBranch:p,isInFallback:$,isHydrating:g}=O;if(p)O.pendingBranch=f,hi(f,p)?(l(p,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0?O.resolve():$&&(g||(l(h,d,n,i,r,null,s,o,a),Xo(O,d)))):(O.pendingId=uh++,g?(O.isHydrating=!1,O.activeBranch=p):c(p,r,O),O.deps=0,O.effects.length=0,O.hiddenContainer=u("div"),$?(l(null,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0?O.resolve():(l(h,d,n,i,r,null,s,o,a),Xo(O,d))):h&&hi(f,h)?(l(h,f,n,i,r,O,s,o,a),O.resolve(!0)):(l(null,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0&&O.resolve()));else if(h&&hi(f,h))l(h,f,n,i,r,O,s,o,a),Xo(O,f);else if(ml(e,"onPending"),O.pendingBranch=f,f.shapeFlag&512?O.pendingId=f.component.suspenseId:O.pendingId=uh++,l(null,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0)O.resolve();else{const{timeout:b,pendingId:Q}=O;b>0?setTimeout(()=>{O.pendingId===Q&&O.fallback(d)},b):b===0&&O.fallback(d)}}function e0(t,e,n,i,r,s,o,a,l,c,u=!1){const{p:O,m:f,um:d,n:h,o:{parentNode:p,remove:$}}=c;let g;const b=KR(t);b&&e&&e.pendingBranch&&(g=e.pendingId,e.deps++);const Q=t.props?qu(t.props.timeout):void 0,y=s,v={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:uh++,timeout:typeof Q=="number"?Q:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,P=!1){const{vnode:x,activeBranch:C,pendingBranch:Z,pendingId:W,effects:E,parentComponent:te,container:se}=v;let le=!1;v.isHydrating?v.isHydrating=!1:S||(le=C&&Z.transition&&Z.transition.mode==="out-in",le&&(C.transition.afterLeave=()=>{W===v.pendingId&&(f(Z,se,s===y?h(C):s,0),Ol(E))}),C&&(p(C.el)===se&&(s=h(C)),d(C,te,v,!0)),le||f(Z,se,s,0)),Xo(v,Z),v.pendingBranch=null,v.isInFallback=!1;let F=v.parent,I=!1;for(;F;){if(F.pendingBranch){F.effects.push(...E),I=!0;break}F=F.parent}!I&&!le&&Ol(E),v.effects=[],b&&e&&e.pendingBranch&&g===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),ml(x,"onResolve")},fallback(S){if(!v.pendingBranch)return;const{vnode:P,activeBranch:x,parentComponent:C,container:Z,namespace:W}=v;ml(P,"onFallback");const E=h(x),te=()=>{v.isInFallback&&(O(null,S,Z,E,C,null,W,a,l),Xo(v,S))},se=S.transition&&S.transition.mode==="out-in";se&&(x.transition.afterLeave=te),v.isInFallback=!0,d(x,C,null,!0),se||te()},move(S,P,x){v.activeBranch&&f(v.activeBranch,S,P,x),v.container=S},next(){return v.activeBranch&&h(v.activeBranch)},registerDep(S,P,x){const C=!!v.pendingBranch;C&&v.deps++;const Z=S.vnode.el;S.asyncDep.catch(W=>{Ks(W,S,0)}).then(W=>{if(S.isUnmounted||v.isUnmounted||v.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:E}=S;hh(S,W,!1),Z&&(E.el=Z);const te=!Z&&S.subTree.el;P(S,E,p(Z||S.subTree.el),Z?null:h(S.subTree),v,o,x),te&&$(te),tf(S,E.el),C&&--v.deps===0&&v.resolve()})},unmount(S,P){v.isUnmounted=!0,v.activeBranch&&d(v.activeBranch,n,S,P),v.pendingBranch&&d(v.pendingBranch,n,S,P)}};return v}function FR(t,e,n,i,r,s,o,a,l){const c=e.suspense=e0(e,i,n,t.parentNode,document.createElement("div"),null,r,s,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,s,o);return c.deps===0&&c.resolve(!1,!0),u}function HR(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=Q$(i?n.default:n),t.ssFallback=i?Q$(n.fallback):R(kt)}function Q$(t){let e;if(Ce(t)){const n=Us&&t._c;n&&(t._d=!1,w()),t=t(),n&&(t._d=!0,e=fn,n0())}return ve(t)&&(t=UR(t)),t=kn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function t0(t,e){e&&e.pendingBranch?ve(t)?e.effects.push(...t):e.effects.push(t):Ol(t)}function Xo(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let r=e.el;for(;!r&&e.component;)e=e.component.subTree,r=e.el;n.el=r,i&&i.subTree===n&&(i.vnode.el=r,tf(i,r))}function KR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const ke=Symbol.for("v-fgt"),$r=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),zs=Symbol.for("v-stc"),Ka=[];let fn=null;function w(t=!1){Ka.push(fn=t?null:[])}function n0(){Ka.pop(),fn=Ka[Ka.length-1]||null}let Us=1;function Oh(t,e=!1){Us+=t,t<0&&fn&&e&&(fn.hasOnce=!0)}function i0(t){return t.dynamicChildren=Us>0?fn||xo:null,n0(),Us>0&&fn&&fn.push(t),t}function B(t,e,n,i,r,s){return i0(U(t,e,n,i,r,s,!0))}function D(t,e,n,i,r){return i0(R(t,e,n,i,r,!0))}function xr(t){return t?t.__v_isVNode===!0:!1}function hi(t,e){return t.type===e.type&&t.key===e.key}function JR(t){}const r0=({key:t})=>t??null,$u=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?pt(t)||He(t)||Ce(t)?{i:Lt,r:t,k:e,f:!!n}:t:null);function U(t,e=null,n=null,i=0,r=null,s=t===ke?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&r0(e),ref:e&&$u(e),scopeId:GO,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Lt};return a?(ym(l,n),s&128&&t.normalize(l)):n&&(l.shapeFlag|=pt(n)?8:16),Us>0&&!o&&fn&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&fn.push(l),l}const R=eC;function eC(t,e=null,n=null,i=0,r=null,s=!1){if((!t||t===kS)&&(t=kt),xr(t)){const a=Qi(t,e,!0);return n&&ym(a,n),Us>0&&!s&&fn&&(a.shapeFlag&6?fn[fn.indexOf(t)]=a:fn.push(a)),a.patchFlag=-2,a}if(aC(t)&&(t=t.__vccOpts),e){e=gs(e);let{class:a,style:l}=e;a&&!pt(a)&&(e.class=St(a)),ot(l)&&(BO(l)&&!ve(l)&&(l=Ot({},l)),e.style=Fn(l))}const o=pt(t)?1:Lu(t)?128:hS(t)?64:ot(t)?4:Ce(t)?2:0;return U(t,e,n,i,r,o,s,!0)}function gs(t){return t?BO(t)||ZS(t)?Ot({},t):t:null}function Qi(t,e,n=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:l}=t,c=e?pe(r||{},e):r,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&r0(c),ref:e&&e.ref?n&&s?ve(s)?s.concat($u(e)):[s,$u(e)]:$u(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ke?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Qi(t.ssContent),ssFallback:t.ssFallback&&Qi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&_r(u,l.clone(u)),u}function _e(t=" ",e=0){return R($r,null,t,e)}function Qm(t,e){const n=R(zs,null,t);return n.staticCount=e,n}function ge(t="",e=!1){return e?(w(),D(kt,null,t)):R(kt,null,t)}function kn(t){return t==null||typeof t=="boolean"?R(kt):ve(t)?R(ke,null,t.slice()):xr(t)?jr(t):R($r,null,String(t))}function jr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Qi(t)}function ym(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(ve(e))n=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),ym(t,r()),r._c&&(r._d=!0));return}else{n=32;const r=e._;!r&&!ZS(e)?e._ctx=Lt:r===3&&Lt&&(Lt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ce(e)?(e={default:e,_ctx:Lt},n=32):(e=String(e),i&64?(n=16,e=[_e(e)]):n=8);t.children=e,t.shapeFlag|=n}function pe(...t){const e={};for(let n=0;nUt||Lt;let Wu,fh;{const t=MO(),e=(n,i)=>{let r;return(r=t[n])||(r=t[n]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};Wu=e("__VUE_INSTANCE_SETTERS__",n=>Ut=n),fh=e("__VUE_SSR_SETTERS__",n=>Io=n)}const Ds=t=>{const e=Ut;return Wu(t),t.scope.on(),()=>{t.scope.off(),Wu(e)}},dh=()=>{Ut&&Ut.scope.off(),Wu(null)};function o0(t){return t.vnode.shapeFlag&4}let Io=!1;function a0(t,e=!1,n=!1){e&&fh(e);const{props:i,children:r}=t.vnode,s=o0(t);XR(t,i,s,e),qR(t,r,n||e);const o=s?iC(t,e):void 0;return e&&fh(!1),o}function iC(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,oh);const{setup:i}=n;if(i){br();const r=t.setupContext=i.length>1?c0(t):null,s=Ds(t),o=aa(i,t,0,[t.props,r]),a=Fp(o);if(vr(),s(),(a||t.sp)&&!ns(t)&&lm(t),a){if(o.then(dh,dh),e)return o.then(l=>{hh(t,l,e)}).catch(l=>{Ks(l,t,0)});t.asyncDep=o}else hh(t,o,e)}else l0(t,e)}function hh(t,e,n){Ce(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ot(e)&&(t.setupState=nm(e)),l0(t,n)}let Nu,ph;function rC(t){Nu=t,ph=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,fR))}}const sC=()=>!Nu;function l0(t,e,n){const i=t.type;if(!t.render){if(!e&&Nu&&!i.render){const r=i.template||hm(t).template;if(r){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=Ot(Ot({isCustomElement:s,delimiters:a},o),l);i.render=Nu(r,c)}}t.render=i.render||oi,ph&&ph(t)}{const r=Ds(t);br();try{_R(t)}finally{vr(),r()}}}const oC={get(t,e){return un(t,"get",""),t[e]}};function c0(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,oC),slots:t.slots,emit:t.emit,expose:e}}function Hl(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(nm(Bl(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Ha)return Ha[n](t)},has(e,n){return n in e||n in Ha}})):t.proxy}function mh(t,e=!0){return Ce(t)?t.displayName||t.name:t.name||e&&t.__name}function aC(t){return Ce(t)&&"__vccOpts"in t}const G=(t,e)=>Tk(t,e,Io);function vn(t,e,n){const i=arguments.length;return i===2?ot(e)&&!ve(e)?xr(e)?R(t,null,[e]):R(t,e):R(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&xr(n)&&(n=[n]),R(t,e,n))}function lC(){}function cC(t,e,n,i){const r=n[i];if(r&&u0(r,t))return r;const s=e();return s.memo=t.slice(),s.cacheIndex=i,n[i]=s}function u0(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i0&&fn&&fn.push(t),!0}const O0="3.5.16",uC=oi,OC=Zk,fC=ho,dC=fS,hC={createComponentInstance:s0,setupComponent:a0,renderComponentRoot:gu,setCurrentRenderingInstance:dl,isVNode:xr,normalizeVNode:kn,getComponentPublicInstance:Hl,ensureValidVNode:dm,pushWarningContext:Vk,popWarningContext:Ek},pC=hC,mC=null,gC=null,$C=null;/** +**/const lS=[];function Ek(t){lS.push(t)}function Ak(){lS.pop()}function qk(t,e){}const Zk={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},zk={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function aa(t,e,n,i){try{return i?t(...i):t()}catch(r){Ks(r,e,n)}}function ci(t,e,n,i){if(Ce(t)){const r=aa(t,e,n,i);return r&&Fp(r)&&r.catch(s=>{Ks(s,e,n)}),r}if(ve(t)){const r=[];for(let s=0;s>>1,r=Qn[i],s=fl(r);s=fl(n)?Qn.push(t):Qn.splice(Mk(e),0,t),t.flags|=1,uS()}}function uS(){Mu||(Mu=cS.then(OS))}function Ol(t){ve(t)?Co.push(...t):Wr&&t.id===-1?Wr.splice(fo+1,0,t):t.flags&1||(Co.push(t),t.flags|=1),uS()}function o$(t,e,n=Vi+1){for(;nfl(n)-fl(i));if(Co.length=0,Wr){Wr.push(...e);return}for(Wr=e,fo=0;fot.id==null?t.flags&2?-1:1/0:t.id;function OS(t){try{for(Vi=0;Viho.emit(r,...s)),vc=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{fS(s,e)}),setTimeout(()=>{ho||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,vc=[])},3e3)):vc=[]}let Lt=null,GO=null;function dl(t){const e=Lt;return Lt=t,GO=t&&t.type.__scopeId||null,e}function Ik(t){GO=t}function Uk(){GO=null}const Dk=t=>V;function V(t,e=Lt,n){if(!e||t._n)return t;const i=(...r)=>{i._d&&Oh(-1);const s=dl(e);let o;try{o=t(...r)}finally{dl(s),i._d&&Oh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function la(t,e){if(Lt===null)return t;const n=Hl(Lt),i=t.dirs||(t.dirs=[]);for(let r=0;rt.__isTeleport,Fa=t=>t&&(t.disabled||t.disabled===""),a$=t=>t&&(t.defer||t.defer===""),l$=t=>typeof SVGElement<"u"&&t instanceof SVGElement,c$=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,rh=(t,e)=>{const n=t&&t.to;return mt(n)?e?e(n):null:n},pS={name:"Teleport",__isTeleport:!0,process(t,e,n,i,r,s,o,a,l,c){const{mc:u,pc:O,pbc:f,o:{insert:d,querySelector:h,createText:p,createComment:$}}=c,g=Fa(e.props);let{shapeFlag:b,children:Q,dynamicChildren:y}=e;if(t==null){const v=e.el=p(""),S=e.anchor=p("");d(v,n,i),d(S,n,i);const P=(C,Z)=>{b&16&&(r&&r.isCE&&(r.ce._teleportTarget=C),u(Q,C,Z,r,s,o,a,l))},x=()=>{const C=e.target=rh(e.props,h),Z=mS(C,e,p,d);C&&(o!=="svg"&&l$(C)?o="svg":o!=="mathml"&&c$(C)&&(o="mathml"),g||(P(C,Z),pu(e,!1)))};g&&(P(n,S),pu(e,!0)),a$(e.props)?(e.el.__isMounted=!1,Mt(()=>{x(),delete e.el.__isMounted},s)):x()}else{if(a$(e.props)&&t.el.__isMounted===!1){Mt(()=>{pS.process(t,e,n,i,r,s,o,a,l,c)},s);return}e.el=t.el,e.targetStart=t.targetStart;const v=e.anchor=t.anchor,S=e.target=t.target,P=e.targetAnchor=t.targetAnchor,x=Fa(t.props),C=x?n:S,Z=x?v:P;if(o==="svg"||l$(S)?o="svg":(o==="mathml"||c$(S))&&(o="mathml"),y?(f(t.dynamicChildren,y,C,r,s,o,a),gm(t,e,!0)):l||O(t,e,C,Z,r,s,o,a,!1),g)x?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Sc(e,n,v,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const W=e.target=rh(e.props,h);W&&Sc(e,W,null,c,0)}else x&&Sc(e,S,P,c,1);pu(e,g)}},remove(t,e,n,{um:i,o:{remove:r}},s){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:O,props:f}=t;if(O&&(r(c),r(u)),s&&r(l),o&16){const d=s||!Fa(f);for(let h=0;h{t.isMounted=!0}),Js(()=>{t.isUnmounting=!0}),t}const Jn=[Function,Array],am={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Jn,onEnter:Jn,onAfterEnter:Jn,onEnterCancelled:Jn,onBeforeLeave:Jn,onLeave:Jn,onAfterLeave:Jn,onLeaveCancelled:Jn,onBeforeAppear:Jn,onAppear:Jn,onAfterAppear:Jn,onAppearCancelled:Jn},gS=t=>{const e=t.subTree;return e.component?gS(e.component):e},Wk={name:"BaseTransition",props:am,setup(t,{slots:e}){const n=yt(),i=om();return()=>{const r=e.default&&FO(e.default(),!0);if(!r||!r.length)return;const s=$S(r),o=Ue(t),{mode:a}=o;if(i.isLeaving)return Lf(s);const l=u$(s);if(!l)return Lf(s);let c=Mo(l,o,i,n,O=>c=O);l.type!==kt&&_r(l,c);let u=n.subTree&&u$(n.subTree);if(u&&u.type!==kt&&!hi(l,u)&&gS(n).type!==kt){let O=Mo(u,o,i,n);if(_r(u,O),a==="out-in"&&l.type!==kt)return i.isLeaving=!0,O.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete O.afterLeave,u=void 0},Lf(s);a==="in-out"&&l.type!==kt?O.delayLeave=(f,d,h)=>{const p=yS(i,u);p[String(u.key)]=u,f[Nr]=()=>{d(),f[Nr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return s}}};function $S(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==kt){e=n;break}}return e}const QS=Wk;function yS(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function Mo(t,e,n,i,r){const{appear:s,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:O,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:$,onAppear:g,onAfterAppear:b,onAppearCancelled:Q}=e,y=String(t.key),v=yS(n,t),S=(C,Z)=>{C&&ci(C,i,9,Z)},P=(C,Z)=>{const W=Z[1];S(C,Z),ve(C)?C.every(E=>E.length<=1)&&W():C.length<=1&&W()},x={mode:o,persisted:a,beforeEnter(C){let Z=l;if(!n.isMounted)if(s)Z=$||l;else return;C[Nr]&&C[Nr](!0);const W=v[y];W&&hi(t,W)&&W.el[Nr]&&W.el[Nr](),S(Z,[C])},enter(C){let Z=c,W=u,E=O;if(!n.isMounted)if(s)Z=g||c,W=b||u,E=Q||O;else return;let te=!1;const se=C[Pc]=le=>{te||(te=!0,le?S(E,[C]):S(W,[C]),x.delayedLeave&&x.delayedLeave(),C[Pc]=void 0)};Z?P(Z,[C,se]):se()},leave(C,Z){const W=String(t.key);if(C[Pc]&&C[Pc](!0),n.isUnmounting)return Z();S(f,[C]);let E=!1;const te=C[Nr]=se=>{E||(E=!0,Z(),se?S(p,[C]):S(h,[C]),C[Nr]=void 0,v[W]===t&&delete v[W])};v[W]=t,d?P(d,[C,te]):te()},clone(C){const Z=Mo(C,e,n,i,r);return r&&r(Z),Z}};return x}function Lf(t){if(Gl(t))return t=Qi(t),t.children=null,t}function u$(t){if(!Gl(t))return hS(t.type)&&t.children?$S(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Ce(n.default))return n.default()}}function _r(t,e){t.shapeFlag&6&&t.component?(t.transition=e,_r(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function FO(t,e=!1,n){let i=[],r=0;for(let s=0;s1)for(let s=0;sn.value,set:s=>n.value=s})}return n}function hl(t,e,n,i,r=!1){if(ve(t)){t.forEach((h,p)=>hl(h,e&&(ve(e)?e[p]:e),n,i,r));return}if(ns(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&hl(t,e,n,i.component.subTree);return}const s=i.shapeFlag&4?Hl(i.component):i.el,o=r?null:s,{i:a,r:l}=t,c=e&&e.r,u=a.refs===We?a.refs={}:a.refs,O=a.setupState,f=Ue(O),d=O===We?()=>!1:h=>tt(f,h);if(c!=null&&c!==l&&(mt(c)?(u[c]=null,d(c)&&(O[c]=null)):He(c)&&(c.value=null)),Ce(l))aa(l,a,12,[o,u]);else{const h=mt(l),p=He(l);if(h||p){const $=()=>{if(t.f){const g=h?d(l)?O[l]:u[l]:l.value;r?ve(g)&&Gp(g,s):ve(g)?g.includes(s)||g.push(s):h?(u[l]=[s],d(l)&&(O[l]=u[l])):(l.value=[s],t.k&&(u[t.k]=l.value))}else h?(u[l]=o,d(l)&&(O[l]=o)):p&&(l.value=o,t.k&&(u[t.k]=o))};o?($.id=-1,Mt($,n)):$()}}}let O$=!1;const so=()=>{O$||(console.error("Hydration completed but contains mismatches."),O$=!0)},jk=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",Bk=t=>t.namespaceURI.includes("MathML"),_c=t=>{if(t.nodeType===1){if(jk(t))return"svg";if(Bk(t))return"mathml"}},yo=t=>t.nodeType===8;function Gk(t){const{mt:e,p:n,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:a,insert:l,createComment:c}}=t,u=(Q,y)=>{if(!y.hasChildNodes()){n(null,Q,y),Iu(),y._vnode=Q;return}O(y.firstChild,Q,null,null,null),Iu(),y._vnode=Q},O=(Q,y,v,S,P,x=!1)=>{x=x||!!y.dynamicChildren;const C=yo(Q)&&Q.data==="[",Z=()=>p(Q,y,v,S,P,C),{type:W,ref:E,shapeFlag:te,patchFlag:se}=y;let le=Q.nodeType;y.el=Q,se===-2&&(x=!1,y.dynamicChildren=null);let F=null;switch(W){case $r:le!==3?y.children===""?(l(y.el=r(""),o(Q),Q),F=Q):F=Z():(Q.data!==y.children&&(so(),Q.data=y.children),F=s(Q));break;case kt:b(Q)?(F=s(Q),g(y.el=Q.content.firstChild,Q,v)):le!==8||C?F=Z():F=s(Q);break;case zs:if(C&&(Q=s(Q),le=Q.nodeType),le===1||le===3){F=Q;const I=!y.children.length;for(let z=0;z{x=x||!!y.dynamicChildren;const{type:C,props:Z,patchFlag:W,shapeFlag:E,dirs:te,transition:se}=y,le=C==="input"||C==="option";if(le||W!==-1){te&&Ei(y,null,v,"created");let F=!1;if(b(Q)){F=NS(null,se)&&v&&v.vnode.props&&v.vnode.props.appear;const z=Q.content.firstChild;if(F){const J=z.getAttribute("class");J&&(z.$cls=J),se.beforeEnter(z)}g(z,Q,v),y.el=Q=z}if(E&16&&!(Z&&(Z.innerHTML||Z.textContent))){let z=d(Q.firstChild,y,Q,v,S,P,x);for(;z;){xc(Q,1)||so();const J=z;z=z.nextSibling,a(J)}}else if(E&8){let z=y.children;z[0]===` +`&&(Q.tagName==="PRE"||Q.tagName==="TEXTAREA")&&(z=z.slice(1)),Q.textContent!==z&&(xc(Q,0)||so(),Q.textContent=y.children)}if(Z){if(le||!x||W&48){const z=Q.tagName.includes("-");for(const J in Z)(le&&(J.endsWith("value")||J==="indeterminate")||Wl(J)&&!To(J)||J[0]==="."||z)&&i(Q,J,null,Z[J],void 0,v)}else if(Z.onClick)i(Q,"onClick",null,Z.onClick,void 0,v);else if(W&4&&Ui(Z.style))for(const z in Z.style)Z.style[z]}let I;(I=Z&&Z.onVnodeBeforeMount)&&Tn(I,v,y),te&&Ei(y,null,v,"beforeMount"),((I=Z&&Z.onVnodeMounted)||te||F)&&t0(()=>{I&&Tn(I,v,y),F&&se.enter(Q),te&&Ei(y,null,v,"mounted")},S)}return Q.nextSibling},d=(Q,y,v,S,P,x,C)=>{C=C||!!y.dynamicChildren;const Z=y.children,W=Z.length;for(let E=0;E{const{slotScopeIds:C}=y;C&&(P=P?P.concat(C):C);const Z=o(Q),W=d(s(Q),y,Z,v,S,P,x);return W&&yo(W)&&W.data==="]"?s(y.anchor=W):(so(),l(y.anchor=c("]"),Z,W),W)},p=(Q,y,v,S,P,x)=>{if(xc(Q.parentElement,1)||so(),y.el=null,x){const W=$(Q);for(;;){const E=s(Q);if(E&&E!==W)a(E);else break}}const C=s(Q),Z=o(Q);return a(Q),n(null,y,Z,C,v,S,_c(Z),P),v&&(v.vnode.el=y.el,tf(v,y.el)),C},$=(Q,y="[",v="]")=>{let S=0;for(;Q;)if(Q=s(Q),Q&&yo(Q)&&(Q.data===y&&S++,Q.data===v)){if(S===0)return s(Q);S--}return Q},g=(Q,y,v)=>{const S=y.parentNode;S&&S.replaceChild(Q,y);let P=v;for(;P;)P.vnode.el===y&&(P.vnode.el=P.subTree.el=Q),P=P.parent},b=Q=>Q.nodeType===1&&Q.tagName==="TEMPLATE";return[u,O]}const f$="data-allow-mismatch",Fk={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function xc(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(f$);)t=t.parentElement;const n=t&&t.getAttribute(f$);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:n.split(",").includes(Fk[e])}}const Hk=MO().requestIdleCallback||(t=>setTimeout(t,1)),Kk=MO().cancelIdleCallback||(t=>clearTimeout(t)),Jk=(t=1e4)=>e=>{const n=Hk(e,{timeout:t});return()=>Kk(n)};function eR(t){const{top:e,left:n,bottom:i,right:r}=t.getBoundingClientRect(),{innerHeight:s,innerWidth:o}=window;return(e>0&&e0&&i0&&n0&&r(e,n)=>{const i=new IntersectionObserver(r=>{for(const s of r)if(s.isIntersecting){i.disconnect(),e();break}},t);return n(r=>{if(r instanceof Element){if(eR(r))return e(),i.disconnect(),!1;i.observe(r)}}),()=>i.disconnect()},nR=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},iR=(t=[])=>(e,n)=>{mt(t)&&(t=[t]);let i=!1;const r=o=>{i||(i=!0,s(),e(),o.target.dispatchEvent(new o.constructor(o.type,o)))},s=()=>{n(o=>{for(const a of t)o.removeEventListener(a,r)})};return n(o=>{for(const a of t)o.addEventListener(a,r,{once:!0})}),s};function rR(t,e){if(yo(t)&&t.data==="["){let n=1,i=t.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(yo(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else e(t)}const ns=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function sR(t){Ce(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:r=200,hydrate:s,timeout:o,suspensible:a=!0,onError:l}=t;let c=null,u,O=0;const f=()=>(O++,c=null,d()),d=()=>{let h;return c||(h=c=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),l)return new Promise(($,g)=>{l(p,()=>$(f()),()=>g(p),O+1)});throw p}).then(p=>h!==c&&c?c:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return M({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(h,p,$){const g=s?()=>{const Q=s(()=>{$()},y=>rR(h,y));Q&&(p.bum||(p.bum=[])).push(Q),(p.u||(p.u=[])).push(()=>!0)}:$;u?g():d().then(()=>!p.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const h=Ut;if(lm(h),u)return()=>Wf(u,h);const p=Q=>{c=null,Ks(Q,h,13,!i)};if(a&&h.suspense||Io)return d().then(Q=>()=>Wf(Q,h)).catch(Q=>(p(Q),()=>i?R(i,{error:Q}):null));const $=ne(!1),g=ne(),b=ne(!!r);return r&&setTimeout(()=>{b.value=!1},r),o!=null&&setTimeout(()=>{if(!$.value&&!g.value){const Q=new Error(`Async component timed out after ${o}ms.`);p(Q),g.value=Q}},o),d().then(()=>{$.value=!0,h.parent&&Gl(h.parent.vnode)&&h.parent.update()}).catch(Q=>{p(Q),g.value=Q}),()=>{if($.value&&u)return Wf(u,h);if(g.value&&i)return R(i,{error:g.value});if(n&&!b.value)return R(n)}}})}function Wf(t,e){const{ref:n,props:i,children:r,ce:s}=e.vnode,o=R(t,i,r);return o.ref=n,o.ce=s,delete e.vnode.ce,o}const Gl=t=>t.type.__isKeepAlive,oR={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=yt(),i=n.ctx;if(!i.renderer)return()=>{const b=e.default&&e.default();return b&&b.length===1?b[0]:b};const r=new Map,s=new Set;let o=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:O}}}=i,f=O("div");i.activate=(b,Q,y,v,S)=>{const P=b.component;c(b,Q,y,0,a),l(P.vnode,b,Q,y,P,a,v,b.slotScopeIds,S),Mt(()=>{P.isDeactivated=!1,P.a&&Ro(P.a);const x=b.props&&b.props.onVnodeMounted;x&&Tn(x,P.parent,b)},a)},i.deactivate=b=>{const Q=b.component;Du(Q.m),Du(Q.a),c(b,f,null,1,a),Mt(()=>{Q.da&&Ro(Q.da);const y=b.props&&b.props.onVnodeUnmounted;y&&Tn(y,Q.parent,b),Q.isDeactivated=!0},a)};function d(b){Nf(b),u(b,n,a,!0)}function h(b){r.forEach((Q,y)=>{const v=mh(Q.type);v&&!b(v)&&p(y)})}function p(b){const Q=r.get(b);Q&&(!o||!hi(Q,o))?d(Q):o&&Nf(o),r.delete(b),s.delete(b)}Re(()=>[t.include,t.exclude],([b,Q])=>{b&&h(y=>Za(b,y)),Q&&h(y=>!Za(Q,y))},{flush:"post",deep:!0});let $=null;const g=()=>{$!=null&&(Lu(n.subTree.type)?Mt(()=>{r.set($,wc(n.subTree))},n.subTree.suspense):r.set($,wc(n.subTree)))};return ft(g),KO(g),Js(()=>{r.forEach(b=>{const{subTree:Q,suspense:y}=n,v=wc(Q);if(b.type===v.type&&b.key===v.key){Nf(v);const S=v.component.da;S&&Mt(S,y);return}d(b)})}),()=>{if($=null,!e.default)return o=null;const b=e.default(),Q=b[0];if(b.length>1)return o=null,b;if(!xr(Q)||!(Q.shapeFlag&4)&&!(Q.shapeFlag&128))return o=null,Q;let y=wc(Q);if(y.type===kt)return o=null,y;const v=y.type,S=mh(ns(y)?y.type.__asyncResolved||{}:v),{include:P,exclude:x,max:C}=t;if(P&&(!S||!Za(P,S))||x&&S&&Za(x,S))return y.shapeFlag&=-257,o=y,Q;const Z=y.key==null?v:y.key,W=r.get(Z);return y.el&&(y=Qi(y),Q.shapeFlag&128&&(Q.ssContent=y)),$=Z,W?(y.el=W.el,y.component=W.component,y.transition&&_r(y,y.transition),y.shapeFlag|=512,s.delete(Z),s.add(Z)):(s.add(Z),C&&s.size>parseInt(C,10)&&p(s.values().next().value)),y.shapeFlag|=256,o=y,Lu(Q.type)?Q:y}}},aR=oR;function Za(t,e){return ve(t)?t.some(n=>Za(n,e)):mt(t)?t.split(",").includes(e):UT(t)?(t.lastIndex=0,t.test(e)):!1}function bS(t,e){SS(t,"a",e)}function vS(t,e){SS(t,"da",e)}function SS(t,e,n=Ut){const i=t.__wdc||(t.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return t()});if(HO(e,i,n),n){let r=n.parent;for(;r&&r.parent;)Gl(r.parent.vnode)&&lR(i,e,n,r),r=r.parent}}function lR(t,e,n,i){const r=HO(e,t,i,!0);Fi(()=>{Gp(i[e],r)},n)}function Nf(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function wc(t){return t.shapeFlag&128?t.ssContent:t}function HO(t,e,n=Ut,i=!1){if(n){const r=n[t]||(n[t]=[]),s=e.__weh||(e.__weh=(...o)=>{br();const a=Ds(n),l=ci(e,n,t,o);return a(),vr(),l});return i?r.unshift(s):r.push(s),s}}const Xr=t=>(e,n=Ut)=>{(!Io||t==="sp")&&HO(t,(...i)=>e(...i),n)},PS=Xr("bm"),ft=Xr("m"),cm=Xr("bu"),KO=Xr("u"),Js=Xr("bum"),Fi=Xr("um"),_S=Xr("sp"),xS=Xr("rtg"),wS=Xr("rtc");function TS(t,e=Ut){HO("ec",t,e)}const um="components",cR="directives";function Om(t,e){return fm(um,t,!0,e)||t}const kS=Symbol.for("v-ndc");function JO(t){return mt(t)?fm(um,t,!1)||t:t||kS}function uR(t){return fm(cR,t)}function fm(t,e,n=!0,i=!1){const r=Lt||Ut;if(r){const s=r.type;if(t===um){const a=mh(s,!1);if(a&&(a===e||a===Wt(e)||a===Nl(Wt(e))))return s}const o=d$(r[t]||s[t],e)||d$(r.appContext[t],e);return!o&&i?s:o}}function d$(t,e){return t&&(t[e]||t[Wt(e)]||t[Nl(Wt(e))])}function xt(t,e,n,i){let r;const s=n&&n[i],o=ve(t);if(o||mt(t)){const a=o&&Ui(t);let l=!1,c=!1;a&&(l=!Bn(t),c=Pr(t),t=LO(t)),r=new Array(t.length);for(let u=0,O=t.length;ue(a,l,void 0,s&&s[l]));else{const a=Object.keys(t);r=new Array(a.length);for(let l=0,c=a.length;l{const s=i.fn(...r);return s&&(s.key=i.key),s}:i.fn)}return t}function re(t,e,n={},i,r){if(Lt.ce||Lt.parent&&ns(Lt.parent)&&Lt.parent.ce)return e!=="default"&&(n.name=e),w(),D(ke,null,[R("slot",n,i&&i())],64);let s=t[e];s&&s._c&&(s._d=!1),w();const o=s&&dm(s(n)),a=n.key||o&&o.key,l=D(ke,{key:(a&&!$i(a)?a:`_${e}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&t._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function dm(t){return t.some(e=>xr(e)?!(e.type===kt||e.type===ke&&!dm(e.children)):!0)?t:null}function fR(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:ko(i)]=t[i];return n}const sh=t=>t?o0(t)?Hl(t):sh(t.parent):null,Ha=Ot(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>sh(t.parent),$root:t=>sh(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>hm(t),$forceUpdate:t=>t.f||(t.f=()=>{rm(t.update)}),$nextTick:t=>t.n||(t.n=Dt.bind(t.proxy)),$watch:t=>MR.bind(t)}),jf=(t,e)=>t!==We&&!t.__isScriptSetup&&tt(t,e),oh={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:r,props:s,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return r[e];case 4:return n[e];case 3:return s[e]}else{if(jf(i,e))return o[e]=1,i[e];if(r!==We&&tt(r,e))return o[e]=2,r[e];if((c=t.propsOptions[0])&&tt(c,e))return o[e]=3,s[e];if(n!==We&&tt(n,e))return o[e]=4,n[e];ah&&(o[e]=0)}}const u=Ha[e];let O,f;if(u)return e==="$attrs"&&un(t.attrs,"get",""),u(t);if((O=a.__cssModules)&&(O=O[e]))return O;if(n!==We&&tt(n,e))return o[e]=4,n[e];if(f=l.config.globalProperties,tt(f,e))return f[e]},set({_:t},e,n){const{data:i,setupState:r,ctx:s}=t;return jf(r,e)?(r[e]=n,!0):i!==We&&tt(i,e)?(i[e]=n,!0):tt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!n[o]||t!==We&&tt(t,o)||jf(e,o)||(a=s[0])&&tt(a,o)||tt(i,o)||tt(Ha,o)||tt(r.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:tt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},dR=Ot({},oh,{get(t,e){if(e!==Symbol.unscopables)return oh.get(t,e,t)},has(t,e){return e[0]!=="_"&&!jT(e)}});function hR(){return null}function pR(){return null}function mR(t){}function gR(t){}function $R(){return null}function QR(){}function yR(t,e){return null}function bR(){return RS().slots}function vR(){return RS().attrs}function RS(){const t=yt();return t.setupContext||(t.setupContext=c0(t))}function pl(t){return ve(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function CS(t,e){const n=pl(t);for(const i in e){if(i.startsWith("__skip"))continue;let r=n[i];r?ve(r)||Ce(r)?r=n[i]={type:r,default:e[i]}:r.default=e[i]:r===null&&(r=n[i]={default:e[i]}),r&&e[`__skip_${i}`]&&(r.skipFactory=!0)}return n}function SR(t,e){return!t||!e?t||e:ve(t)&&ve(e)?t.concat(e):Ot({},pl(t),pl(e))}function PR(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function _R(t){const e=yt();let n=t();return dh(),Fp(n)&&(n=n.catch(i=>{throw Ds(e),i})),[n,()=>Ds(e)]}let ah=!0;function xR(t){const e=hm(t),n=t.proxy,i=t.ctx;ah=!1,e.beforeCreate&&h$(e.beforeCreate,t,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:O,mounted:f,beforeUpdate:d,updated:h,activated:p,deactivated:$,beforeDestroy:g,beforeUnmount:b,destroyed:Q,unmounted:y,render:v,renderTracked:S,renderTriggered:P,errorCaptured:x,serverPrefetch:C,expose:Z,inheritAttrs:W,components:E,directives:te,filters:se}=e;if(c&&wR(c,i,null),o)for(const I in o){const z=o[I];Ce(z)&&(i[I]=z.bind(n))}if(r){const I=r.call(n,n);ot(I)&&(t.data=Sr(I))}if(ah=!0,s)for(const I in s){const z=s[I],J=Ce(z)?z.bind(n,n):Ce(z.get)?z.get.bind(n,n):oi,ue=!Ce(z)&&Ce(z.set)?z.set.bind(n):oi,Se=G({get:J,set:ue});Object.defineProperty(i,I,{enumerable:!0,configurable:!0,get:()=>Se.value,set:fe=>Se.value=fe})}if(a)for(const I in a)XS(a[I],i,n,I);if(l){const I=Ce(l)?l.call(n):l;Reflect.ownKeys(I).forEach(z=>{fr(z,I[z])})}u&&h$(u,t,"c");function F(I,z){ve(z)?z.forEach(J=>I(J.bind(n))):z&&I(z.bind(n))}if(F(PS,O),F(ft,f),F(cm,d),F(KO,h),F(bS,p),F(vS,$),F(TS,x),F(wS,S),F(xS,P),F(Js,b),F(Fi,y),F(_S,C),ve(Z))if(Z.length){const I=t.exposed||(t.exposed={});Z.forEach(z=>{Object.defineProperty(I,z,{get:()=>n[z],set:J=>n[z]=J})})}else t.exposed||(t.exposed={});v&&t.render===oi&&(t.render=v),W!=null&&(t.inheritAttrs=W),E&&(t.components=E),te&&(t.directives=te),C&&lm(t)}function wR(t,e,n=oi){ve(t)&&(t=lh(t));for(const i in t){const r=t[i];let s;ot(r)?"default"in r?s=bn(r.from||i,r.default,!0):s=bn(r.from||i):s=bn(r),He(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function h$(t,e,n){ci(ve(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function XS(t,e,n,i){let r=i.includes(".")?HS(n,i):()=>n[i];if(mt(t)){const s=e[t];Ce(s)&&Re(r,s)}else if(Ce(t))Re(r,t.bind(n));else if(ot(t))if(ve(t))t.forEach(s=>XS(s,e,n,i));else{const s=Ce(t.handler)?t.handler.bind(n):e[t.handler];Ce(s)&&Re(r,s,t)}}function hm(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!n&&!i?l=e:(l={},r.length&&r.forEach(c=>Uu(l,c,o,!0)),Uu(l,e,o)),ot(e)&&s.set(e,l),l}function Uu(t,e,n,i=!1){const{mixins:r,extends:s}=e;s&&Uu(t,s,n,!0),r&&r.forEach(o=>Uu(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=TR[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const TR={data:p$,props:m$,emits:m$,methods:za,computed:za,beforeCreate:mn,created:mn,beforeMount:mn,mounted:mn,beforeUpdate:mn,updated:mn,beforeDestroy:mn,beforeUnmount:mn,destroyed:mn,unmounted:mn,activated:mn,deactivated:mn,errorCaptured:mn,serverPrefetch:mn,components:za,directives:za,watch:RR,provide:p$,inject:kR};function p$(t,e){return e?t?function(){return Ot(Ce(t)?t.call(this,this):t,Ce(e)?e.call(this,this):e)}:e:t}function kR(t,e){return za(lh(t),lh(e))}function lh(t){if(ve(t)){const e={};for(let n=0;n1)return n&&Ce(e)?e.call(i&&i.proxy):e}}function ES(){return!!(Ut||Lt||Zs)}const AS={},qS=()=>Object.create(AS),ZS=t=>Object.getPrototypeOf(t)===AS;function VR(t,e,n,i=!1){const r={},s=qS();t.propsDefaults=Object.create(null),zS(t,e,r,s);for(const o in t.propsOptions[0])o in r||(r[o]=void 0);n?t.props=i?r:iS(r):t.type.props?t.props=r:t.props=s,t.attrs=s}function ER(t,e,n,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=t,a=Ue(r),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let O=0;O{l=!0;const[f,d]=YS(O,e,!0);Ot(o,f),d&&a.push(...d)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!l)return ot(t)&&i.set(t,xo),xo;if(ve(s))for(let u=0;ut[0]==="_"||t==="$stable",mm=t=>ve(t)?t.map(kn):[kn(t)],qR=(t,e,n)=>{if(e._n)return e;const i=V((...r)=>mm(e(...r)),n);return i._c=!1,i},MS=(t,e,n)=>{const i=t._ctx;for(const r in t){if(pm(r))continue;const s=t[r];if(Ce(s))e[r]=qR(r,s,i);else if(s!=null){const o=mm(s);e[r]=()=>o}}},IS=(t,e)=>{const n=mm(e);t.slots.default=()=>n},US=(t,e,n)=>{for(const i in e)(n||!pm(i))&&(t[i]=e[i])},ZR=(t,e,n)=>{const i=t.slots=qS();if(t.vnode.shapeFlag&32){const r=e._;r?(US(i,e,n),n&&zv(i,"_",r,!0)):MS(e,i)}else e&&IS(t,e)},zR=(t,e,n)=>{const{vnode:i,slots:r}=t;let s=!0,o=We;if(i.shapeFlag&32){const a=e._;a?n&&a===1?s=!1:US(r,e,n):(s=!e.$stable,MS(e,r)),o=e}else e&&(IS(t,e),o={default:1});if(s)for(const a in r)!pm(a)&&o[a]==null&&delete r[a]},Mt=t0;function DS(t){return WS(t)}function LS(t){return WS(t,Gk)}function WS(t,e){const n=MO();n.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:O,nextSibling:f,setScopeId:d=oi,insertStaticContent:h}=t,p=(X,q,B,oe=null,ie=null,_=null,T=void 0,Y=null,N=!!q.dynamicChildren)=>{if(X===q)return;X&&!hi(X,q)&&(oe=Xe(X),fe(X,ie,_,!0),X=null),q.patchFlag===-2&&(N=!1,q.dynamicChildren=null);const{type:ee,ref:ae,shapeFlag:A}=q;switch(ee){case $r:$(X,q,B,oe);break;case kt:g(X,q,B,oe);break;case zs:X==null&&b(q,B,oe,T);break;case ke:E(X,q,B,oe,ie,_,T,Y,N);break;default:A&1?v(X,q,B,oe,ie,_,T,Y,N):A&6?te(X,q,B,oe,ie,_,T,Y,N):(A&64||A&128)&&ee.process(X,q,B,oe,ie,_,T,Y,N,dt)}ae!=null&&ie&&hl(ae,X&&X.ref,_,q||X,!q)},$=(X,q,B,oe)=>{if(X==null)i(q.el=a(q.children),B,oe);else{const ie=q.el=X.el;q.children!==X.children&&c(ie,q.children)}},g=(X,q,B,oe)=>{X==null?i(q.el=l(q.children||""),B,oe):q.el=X.el},b=(X,q,B,oe)=>{[X.el,X.anchor]=h(X.children,q,B,oe,X.el,X.anchor)},Q=({el:X,anchor:q},B,oe)=>{let ie;for(;X&&X!==q;)ie=f(X),i(X,B,oe),X=ie;i(q,B,oe)},y=({el:X,anchor:q})=>{let B;for(;X&&X!==q;)B=f(X),r(X),X=B;r(q)},v=(X,q,B,oe,ie,_,T,Y,N)=>{q.type==="svg"?T="svg":q.type==="math"&&(T="mathml"),X==null?S(q,B,oe,ie,_,T,Y,N):C(X,q,ie,_,T,Y,N)},S=(X,q,B,oe,ie,_,T,Y)=>{let N,ee;const{props:ae,shapeFlag:A,transition:L,dirs:he}=X;if(N=X.el=o(X.type,_,ae&&ae.is,ae),A&8?u(N,X.children):A&16&&x(X.children,N,null,oe,ie,Bf(X,_),T,Y),he&&Ei(X,null,oe,"created"),P(N,X,X.scopeId,T,oe),ae){for(const Be in ae)Be!=="value"&&!To(Be)&&s(N,Be,null,ae[Be],_,oe);"value"in ae&&s(N,"value",null,ae.value,_),(ee=ae.onVnodeBeforeMount)&&Tn(ee,oe,X)}he&&Ei(X,null,oe,"beforeMount");const we=NS(ie,L);we&&L.beforeEnter(N),i(N,q,B),((ee=ae&&ae.onVnodeMounted)||we||he)&&Mt(()=>{ee&&Tn(ee,oe,X),we&&L.enter(N),he&&Ei(X,null,oe,"mounted")},ie)},P=(X,q,B,oe,ie)=>{if(B&&d(X,B),oe)for(let _=0;_{for(let ee=N;ee{const Y=q.el=X.el;let{patchFlag:N,dynamicChildren:ee,dirs:ae}=q;N|=X.patchFlag&16;const A=X.props||We,L=q.props||We;let he;if(B&&_s(B,!1),(he=L.onVnodeBeforeUpdate)&&Tn(he,B,q,X),ae&&Ei(q,X,B,"beforeUpdate"),B&&_s(B,!0),(A.innerHTML&&L.innerHTML==null||A.textContent&&L.textContent==null)&&u(Y,""),ee?Z(X.dynamicChildren,ee,Y,B,oe,Bf(q,ie),_):T||z(X,q,Y,null,B,oe,Bf(q,ie),_,!1),N>0){if(N&16)W(Y,A,L,B,ie);else if(N&2&&A.class!==L.class&&s(Y,"class",null,L.class,ie),N&4&&s(Y,"style",A.style,L.style,ie),N&8){const we=q.dynamicProps;for(let Be=0;Be{he&&Tn(he,B,q,X),ae&&Ei(q,X,B,"updated")},oe)},Z=(X,q,B,oe,ie,_,T)=>{for(let Y=0;Y{if(q!==B){if(q!==We)for(const _ in q)!To(_)&&!(_ in B)&&s(X,_,q[_],null,ie,oe);for(const _ in B){if(To(_))continue;const T=B[_],Y=q[_];T!==Y&&_!=="value"&&s(X,_,Y,T,ie,oe)}"value"in B&&s(X,"value",q.value,B.value,ie)}},E=(X,q,B,oe,ie,_,T,Y,N)=>{const ee=q.el=X?X.el:a(""),ae=q.anchor=X?X.anchor:a("");let{patchFlag:A,dynamicChildren:L,slotScopeIds:he}=q;he&&(Y=Y?Y.concat(he):he),X==null?(i(ee,B,oe),i(ae,B,oe),x(q.children||[],B,ae,ie,_,T,Y,N)):A>0&&A&64&&L&&X.dynamicChildren?(Z(X.dynamicChildren,L,B,ie,_,T,Y),(q.key!=null||ie&&q===ie.subTree)&&gm(X,q,!0)):z(X,q,B,ae,ie,_,T,Y,N)},te=(X,q,B,oe,ie,_,T,Y,N)=>{q.slotScopeIds=Y,X==null?q.shapeFlag&512?ie.ctx.activate(q,B,oe,T,N):se(q,B,oe,ie,_,T,N):le(X,q,N)},se=(X,q,B,oe,ie,_,T)=>{const Y=X.component=s0(X,oe,ie);if(Gl(X)&&(Y.ctx.renderer=dt),a0(Y,!1,T),Y.asyncDep){if(ie&&ie.registerDep(Y,F,T),!X.el){const N=Y.subTree=R(kt);g(null,N,q,B)}}else F(Y,X,q,B,ie,_,T)},le=(X,q,B)=>{const oe=q.component=X.component;if(NR(X,q,B))if(oe.asyncDep&&!oe.asyncResolved){I(oe,q,B);return}else oe.next=q,oe.update();else q.el=X.el,oe.vnode=q},F=(X,q,B,oe,ie,_,T)=>{const Y=()=>{if(X.isMounted){let{next:A,bu:L,u:he,parent:we,vnode:Be}=X;{const Yn=jS(X);if(Yn){A&&(A.el=Be.el,I(X,A,T)),Yn.asyncDep.then(()=>{X.isUnmounted||Y()});return}}let Ge=A,Xt;_s(X,!1),A?(A.el=Be.el,I(X,A,T)):A=Be,L&&Ro(L),(Xt=A.props&&A.props.onVnodeBeforeUpdate)&&Tn(Xt,we,A,Be),_s(X,!0);const Bt=gu(X),Kn=X.subTree;X.subTree=Bt,p(Kn,Bt,O(Kn.el),Xe(Kn),X,ie,_),A.el=Bt.el,Ge===null&&tf(X,Bt.el),he&&Mt(he,ie),(Xt=A.props&&A.props.onVnodeUpdated)&&Mt(()=>Tn(Xt,we,A,Be),ie)}else{let A;const{el:L,props:he}=q,{bm:we,m:Be,parent:Ge,root:Xt,type:Bt}=X,Kn=ns(q);if(_s(X,!1),we&&Ro(we),!Kn&&(A=he&&he.onVnodeBeforeMount)&&Tn(A,Ge,q),_s(X,!0),L&&wt){const Yn=()=>{X.subTree=gu(X),wt(L,X.subTree,X,ie,null)};Kn&&Bt.__asyncHydrate?Bt.__asyncHydrate(L,X,Yn):Yn()}else{Xt.ce&&Xt.ce._injectChildStyle(Bt);const Yn=X.subTree=gu(X);p(null,Yn,B,oe,X,ie,_),q.el=Yn.el}if(Be&&Mt(Be,ie),!Kn&&(A=he&&he.onVnodeMounted)){const Yn=q;Mt(()=>Tn(A,Ge,Yn),ie)}(q.shapeFlag&256||Ge&&ns(Ge.vnode)&&Ge.vnode.shapeFlag&256)&&X.a&&Mt(X.a,ie),X.isMounted=!0,q=B=oe=null}};X.scope.on();const N=X.effect=new ll(Y);X.scope.off();const ee=X.update=N.run.bind(N),ae=X.job=N.runIfDirty.bind(N);ae.i=X,ae.id=X.uid,N.scheduler=()=>rm(ae),_s(X,!0),ee()},I=(X,q,B)=>{q.component=X;const oe=X.vnode.props;X.vnode=q,X.next=null,ER(X,q.props,oe,B),zR(X,q.children,B),br(),o$(X),vr()},z=(X,q,B,oe,ie,_,T,Y,N=!1)=>{const ee=X&&X.children,ae=X?X.shapeFlag:0,A=q.children,{patchFlag:L,shapeFlag:he}=q;if(L>0){if(L&128){ue(ee,A,B,oe,ie,_,T,Y,N);return}else if(L&256){J(ee,A,B,oe,ie,_,T,Y,N);return}}he&8?(ae&16&&Ze(ee,ie,_),A!==ee&&u(B,A)):ae&16?he&16?ue(ee,A,B,oe,ie,_,T,Y,N):Ze(ee,ie,_,!0):(ae&8&&u(B,""),he&16&&x(A,B,oe,ie,_,T,Y,N))},J=(X,q,B,oe,ie,_,T,Y,N)=>{X=X||xo,q=q||xo;const ee=X.length,ae=q.length,A=Math.min(ee,ae);let L;for(L=0;Lae?Ze(X,ie,_,!0,!1,A):x(q,B,oe,ie,_,T,Y,N,A)},ue=(X,q,B,oe,ie,_,T,Y,N)=>{let ee=0;const ae=q.length;let A=X.length-1,L=ae-1;for(;ee<=A&&ee<=L;){const he=X[ee],we=q[ee]=N?jr(q[ee]):kn(q[ee]);if(hi(he,we))p(he,we,B,null,ie,_,T,Y,N);else break;ee++}for(;ee<=A&&ee<=L;){const he=X[A],we=q[L]=N?jr(q[L]):kn(q[L]);if(hi(he,we))p(he,we,B,null,ie,_,T,Y,N);else break;A--,L--}if(ee>A){if(ee<=L){const he=L+1,we=heL)for(;ee<=A;)fe(X[ee],ie,_,!0),ee++;else{const he=ee,we=ee,Be=new Map;for(ee=we;ee<=L;ee++){const Mn=q[ee]=N?jr(q[ee]):kn(q[ee]);Mn.key!=null&&Be.set(Mn.key,ee)}let Ge,Xt=0;const Bt=L-we+1;let Kn=!1,Yn=0;const ba=new Array(Bt);for(ee=0;ee=Bt){fe(Mn,ie,_,!0);continue}let xi;if(Mn.key!=null)xi=Be.get(Mn.key);else for(Ge=we;Ge<=L;Ge++)if(ba[Ge-we]===0&&hi(Mn,q[Ge])){xi=Ge;break}xi===void 0?fe(Mn,ie,_,!0):(ba[xi-we]=ee+1,xi>=Yn?Yn=xi:Kn=!0,p(Mn,q[xi],B,null,ie,_,T,Y,N),Xt++)}const Kg=Kn?YR(ba):xo;for(Ge=Kg.length-1,ee=Bt-1;ee>=0;ee--){const Mn=we+ee,xi=q[Mn],Jg=Mn+1{const{el:_,type:T,transition:Y,children:N,shapeFlag:ee}=X;if(ee&6){Se(X.component.subTree,q,B,oe);return}if(ee&128){X.suspense.move(q,B,oe);return}if(ee&64){T.move(X,q,B,dt);return}if(T===ke){i(_,q,B);for(let A=0;AY.enter(_),ie);else{const{leave:A,delayLeave:L,afterLeave:he}=Y,we=()=>{X.ctx.isUnmounted?r(_):i(_,q,B)},Be=()=>{A(_,()=>{we(),he&&he()})};L?L(_,we,Be):Be()}else i(_,q,B)},fe=(X,q,B,oe=!1,ie=!1)=>{const{type:_,props:T,ref:Y,children:N,dynamicChildren:ee,shapeFlag:ae,patchFlag:A,dirs:L,cacheIndex:he}=X;if(A===-2&&(ie=!1),Y!=null&&(br(),hl(Y,null,B,X,!0),vr()),he!=null&&(q.renderCache[he]=void 0),ae&256){q.ctx.deactivate(X);return}const we=ae&1&&L,Be=!ns(X);let Ge;if(Be&&(Ge=T&&T.onVnodeBeforeUnmount)&&Tn(Ge,q,X),ae&6)Ke(X.component,B,oe);else{if(ae&128){X.suspense.unmount(B,oe);return}we&&Ei(X,null,q,"beforeUnmount"),ae&64?X.type.remove(X,q,B,dt,oe):ee&&!ee.hasOnce&&(_!==ke||A>0&&A&64)?Ze(ee,q,B,!1,!0):(_===ke&&A&384||!ie&&ae&16)&&Ze(N,q,B),oe&&Te(X)}(Be&&(Ge=T&&T.onVnodeUnmounted)||we)&&Mt(()=>{Ge&&Tn(Ge,q,X),we&&Ei(X,null,q,"unmounted")},B)},Te=X=>{const{type:q,el:B,anchor:oe,transition:ie}=X;if(q===ke){Ee(B,oe);return}if(q===zs){y(X);return}const _=()=>{r(B),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(X.shapeFlag&1&&ie&&!ie.persisted){const{leave:T,delayLeave:Y}=ie,N=()=>T(B,_);Y?Y(X.el,_,N):N()}else _()},Ee=(X,q)=>{let B;for(;X!==q;)B=f(X),r(X),X=B;r(q)},Ke=(X,q,B)=>{const{bum:oe,scope:ie,job:_,subTree:T,um:Y,m:N,a:ee,parent:ae,slots:{__:A}}=X;Du(N),Du(ee),oe&&Ro(oe),ae&&ve(A)&&A.forEach(L=>{ae.renderCache[L]=void 0}),ie.stop(),_&&(_.flags|=8,fe(T,X,q,B)),Y&&Mt(Y,q),Mt(()=>{X.isUnmounted=!0},q),q&&q.pendingBranch&&!q.isUnmounted&&X.asyncDep&&!X.asyncResolved&&X.suspenseId===q.pendingId&&(q.deps--,q.deps===0&&q.resolve())},Ze=(X,q,B,oe=!1,ie=!1,_=0)=>{for(let T=_;T{if(X.shapeFlag&6)return Xe(X.component.subTree);if(X.shapeFlag&128)return X.suspense.next();const q=f(X.anchor||X.el),B=q&&q[dS];return B?f(B):q};let it=!1;const je=(X,q,B)=>{X==null?q._vnode&&fe(q._vnode,null,null,!0):p(q._vnode||null,X,q,null,null,null,B),q._vnode=X,it||(it=!0,o$(),Iu(),it=!1)},dt={p,um:fe,m:Se,r:Te,mt:se,mc:x,pc:z,pbc:Z,n:Xe,o:t};let Ht,wt;return e&&([Ht,wt]=e(dt)),{render:je,hydrate:Ht,createApp:XR(je,Ht)}}function Bf({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function _s({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function NS(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function gm(t,e,n=!1){const i=t.children,r=e.children;if(ve(i)&&ve(r))for(let s=0;s>1,t[n[a]]0&&(e[i]=n[s-1]),n[s]=i)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=e[o];return n}function jS(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:jS(e)}function Du(t){if(t)for(let e=0;ebn(BS);function Zt(t,e){return Fl(t,null,e)}function $m(t,e){return Fl(t,null,{flush:"post"})}function FS(t,e){return Fl(t,null,{flush:"sync"})}function Re(t,e,n){return Fl(t,e,n)}function Fl(t,e,n=We){const{immediate:i,deep:r,flush:s,once:o}=n,a=Ot({},n),l=e&&i||!e&&s!=="post";let c;if(Io){if(s==="sync"){const d=GS();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=oi,d.resume=oi,d.pause=oi,d}}const u=Ut;a.call=(d,h,p)=>ci(d,u,h,p);let O=!1;s==="post"?a.scheduler=d=>{Mt(d,u&&u.suspense)}:s!=="sync"&&(O=!0,a.scheduler=(d,h)=>{h?d():rm(d)}),a.augmentJob=d=>{e&&(d.flags|=4),O&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const f=Vk(t,e,a);return Io&&(c?c.push(f):l&&f()),f}function MR(t,e,n){const i=this.proxy,r=mt(t)?t.includes(".")?HS(i,t):()=>i[t]:t.bind(i,i);let s;Ce(e)?s=e:(s=e.handler,n=e);const o=Ds(this),a=Fl(r,s.bind(i),n);return o(),a}function HS(t,e){const n=e.split(".");return()=>{let i=t;for(let r=0;r{let u,O=We,f;return FS(()=>{const d=t[r];$n(u,d)&&(u=d,c())}),{get(){return l(),n.get?n.get(u):u},set(d){const h=n.set?n.set(d):d;if(!$n(h,u)&&!(O!==We&&$n(d,O)))return;const p=i.vnode.props;p&&(e in p||r in p||s in p)&&(`onUpdate:${e}`in p||`onUpdate:${r}`in p||`onUpdate:${s}`in p)||(u=d,c()),i.emit(`update:${e}`,h),$n(d,h)&&$n(d,O)&&!$n(h,f)&&c(),O=d,f=h}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||We:a,done:!1}:{done:!0}}}},a}const KS=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Wt(e)}Modifiers`]||t[`${Vn(e)}Modifiers`];function UR(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||We;let r=n;const s=e.startsWith("update:"),o=s&&KS(i,e.slice(7));o&&(o.trim&&(r=n.map(u=>mt(u)?u.trim():u)),o.number&&(r=n.map(Au)));let a,l=i[a=ko(e)]||i[a=ko(Wt(e))];!l&&s&&(l=i[a=ko(Vn(e))]),l&&ci(l,t,6,r);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,ci(c,t,6,r)}}function JS(t,e,n=!1){const i=e.emitsCache,r=i.get(t);if(r!==void 0)return r;const s=t.emits;let o={},a=!1;if(!Ce(t)){const l=c=>{const u=JS(c,e,!0);u&&(a=!0,Ot(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!s&&!a?(ot(t)&&i.set(t,null),null):(ve(s)?s.forEach(l=>o[l]=null):Ot(o,s),ot(t)&&i.set(t,o),o)}function ef(t,e){return!t||!Wl(e)?!1:(e=e.slice(2).replace(/Once$/,""),tt(t,e[0].toLowerCase()+e.slice(1))||tt(t,Vn(e))||tt(t,e))}function gu(t){const{type:e,vnode:n,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:O,data:f,setupState:d,ctx:h,inheritAttrs:p}=t,$=dl(t);let g,b;try{if(n.shapeFlag&4){const y=r||i,v=y;g=kn(c.call(v,y,u,O,d,f,h)),b=a}else{const y=e;g=kn(y.length>1?y(O,{attrs:a,slots:o,emit:l}):y(O,null)),b=e.props?a:LR(a)}}catch(y){Ka.length=0,Ks(y,t,1),g=R(kt)}let Q=g;if(b&&p!==!1){const y=Object.keys(b),{shapeFlag:v}=Q;y.length&&v&7&&(s&&y.some(Bp)&&(b=WR(b,s)),Q=Qi(Q,b,!1,!0))}return n.dirs&&(Q=Qi(Q,null,!1,!0),Q.dirs=Q.dirs?Q.dirs.concat(n.dirs):n.dirs),n.transition&&_r(Q,n.transition),g=Q,dl($),g}function DR(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||Wl(n))&&((e||(e={}))[n]=t[n]);return e},WR=(t,e)=>{const n={};for(const i in t)(!Bp(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function NR(t,e,n){const{props:i,children:r,component:s}=t,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?$$(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let O=0;Ot.__isSuspense;let uh=0;const jR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,r,s,o,a,l,c){if(t==null)GR(e,n,i,r,s,o,a,l,c);else{if(s&&s.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}FR(t,e,n,i,r,o,a,l,c)}},hydrate:HR,normalize:KR},BR=jR;function ml(t,e){const n=t.props&&t.props[e];Ce(n)&&n()}function GR(t,e,n,i,r,s,o,a,l){const{p:c,o:{createElement:u}}=l,O=u("div"),f=t.suspense=e0(t,r,i,e,O,n,s,o,a,l);c(null,f.pendingBranch=t.ssContent,O,null,i,f,s,o),f.deps>0?(ml(t,"onPending"),ml(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,s,o),Xo(f,t.ssFallback)):f.resolve(!1,!0)}function FR(t,e,n,i,r,s,o,a,{p:l,um:c,o:{createElement:u}}){const O=e.suspense=t.suspense;O.vnode=e,e.el=t.el;const f=e.ssContent,d=e.ssFallback,{activeBranch:h,pendingBranch:p,isInFallback:$,isHydrating:g}=O;if(p)O.pendingBranch=f,hi(f,p)?(l(p,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0?O.resolve():$&&(g||(l(h,d,n,i,r,null,s,o,a),Xo(O,d)))):(O.pendingId=uh++,g?(O.isHydrating=!1,O.activeBranch=p):c(p,r,O),O.deps=0,O.effects.length=0,O.hiddenContainer=u("div"),$?(l(null,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0?O.resolve():(l(h,d,n,i,r,null,s,o,a),Xo(O,d))):h&&hi(f,h)?(l(h,f,n,i,r,O,s,o,a),O.resolve(!0)):(l(null,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0&&O.resolve()));else if(h&&hi(f,h))l(h,f,n,i,r,O,s,o,a),Xo(O,f);else if(ml(e,"onPending"),O.pendingBranch=f,f.shapeFlag&512?O.pendingId=f.component.suspenseId:O.pendingId=uh++,l(null,f,O.hiddenContainer,null,r,O,s,o,a),O.deps<=0)O.resolve();else{const{timeout:b,pendingId:Q}=O;b>0?setTimeout(()=>{O.pendingId===Q&&O.fallback(d)},b):b===0&&O.fallback(d)}}function e0(t,e,n,i,r,s,o,a,l,c,u=!1){const{p:O,m:f,um:d,n:h,o:{parentNode:p,remove:$}}=c;let g;const b=JR(t);b&&e&&e.pendingBranch&&(g=e.pendingId,e.deps++);const Q=t.props?qu(t.props.timeout):void 0,y=s,v={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:uh++,timeout:typeof Q=="number"?Q:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,P=!1){const{vnode:x,activeBranch:C,pendingBranch:Z,pendingId:W,effects:E,parentComponent:te,container:se}=v;let le=!1;v.isHydrating?v.isHydrating=!1:S||(le=C&&Z.transition&&Z.transition.mode==="out-in",le&&(C.transition.afterLeave=()=>{W===v.pendingId&&(f(Z,se,s===y?h(C):s,0),Ol(E))}),C&&(p(C.el)===se&&(s=h(C)),d(C,te,v,!0)),le||f(Z,se,s,0)),Xo(v,Z),v.pendingBranch=null,v.isInFallback=!1;let F=v.parent,I=!1;for(;F;){if(F.pendingBranch){F.effects.push(...E),I=!0;break}F=F.parent}!I&&!le&&Ol(E),v.effects=[],b&&e&&e.pendingBranch&&g===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),ml(x,"onResolve")},fallback(S){if(!v.pendingBranch)return;const{vnode:P,activeBranch:x,parentComponent:C,container:Z,namespace:W}=v;ml(P,"onFallback");const E=h(x),te=()=>{v.isInFallback&&(O(null,S,Z,E,C,null,W,a,l),Xo(v,S))},se=S.transition&&S.transition.mode==="out-in";se&&(x.transition.afterLeave=te),v.isInFallback=!0,d(x,C,null,!0),se||te()},move(S,P,x){v.activeBranch&&f(v.activeBranch,S,P,x),v.container=S},next(){return v.activeBranch&&h(v.activeBranch)},registerDep(S,P,x){const C=!!v.pendingBranch;C&&v.deps++;const Z=S.vnode.el;S.asyncDep.catch(W=>{Ks(W,S,0)}).then(W=>{if(S.isUnmounted||v.isUnmounted||v.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:E}=S;hh(S,W,!1),Z&&(E.el=Z);const te=!Z&&S.subTree.el;P(S,E,p(Z||S.subTree.el),Z?null:h(S.subTree),v,o,x),te&&$(te),tf(S,E.el),C&&--v.deps===0&&v.resolve()})},unmount(S,P){v.isUnmounted=!0,v.activeBranch&&d(v.activeBranch,n,S,P),v.pendingBranch&&d(v.pendingBranch,n,S,P)}};return v}function HR(t,e,n,i,r,s,o,a,l){const c=e.suspense=e0(e,i,n,t.parentNode,document.createElement("div"),null,r,s,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,s,o);return c.deps===0&&c.resolve(!1,!0),u}function KR(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=Q$(i?n.default:n),t.ssFallback=i?Q$(n.fallback):R(kt)}function Q$(t){let e;if(Ce(t)){const n=Us&&t._c;n&&(t._d=!1,w()),t=t(),n&&(t._d=!0,e=fn,n0())}return ve(t)&&(t=DR(t)),t=kn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function t0(t,e){e&&e.pendingBranch?ve(t)?e.effects.push(...t):e.effects.push(t):Ol(t)}function Xo(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let r=e.el;for(;!r&&e.component;)e=e.component.subTree,r=e.el;n.el=r,i&&i.subTree===n&&(i.vnode.el=r,tf(i,r))}function JR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const ke=Symbol.for("v-fgt"),$r=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),zs=Symbol.for("v-stc"),Ka=[];let fn=null;function w(t=!1){Ka.push(fn=t?null:[])}function n0(){Ka.pop(),fn=Ka[Ka.length-1]||null}let Us=1;function Oh(t,e=!1){Us+=t,t<0&&fn&&e&&(fn.hasOnce=!0)}function i0(t){return t.dynamicChildren=Us>0?fn||xo:null,n0(),Us>0&&fn&&fn.push(t),t}function j(t,e,n,i,r,s){return i0(U(t,e,n,i,r,s,!0))}function D(t,e,n,i,r){return i0(R(t,e,n,i,r,!0))}function xr(t){return t?t.__v_isVNode===!0:!1}function hi(t,e){return t.type===e.type&&t.key===e.key}function eC(t){}const r0=({key:t})=>t??null,$u=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?mt(t)||He(t)||Ce(t)?{i:Lt,r:t,k:e,f:!!n}:t:null);function U(t,e=null,n=null,i=0,r=null,s=t===ke?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&r0(e),ref:e&&$u(e),scopeId:GO,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Lt};return a?(ym(l,n),s&128&&t.normalize(l)):n&&(l.shapeFlag|=mt(n)?8:16),Us>0&&!o&&fn&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&fn.push(l),l}const R=tC;function tC(t,e=null,n=null,i=0,r=null,s=!1){if((!t||t===kS)&&(t=kt),xr(t)){const a=Qi(t,e,!0);return n&&ym(a,n),Us>0&&!s&&fn&&(a.shapeFlag&6?fn[fn.indexOf(t)]=a:fn.push(a)),a.patchFlag=-2,a}if(lC(t)&&(t=t.__vccOpts),e){e=gs(e);let{class:a,style:l}=e;a&&!mt(a)&&(e.class=St(a)),ot(l)&&(BO(l)&&!ve(l)&&(l=Ot({},l)),e.style=Hn(l))}const o=mt(t)?1:Lu(t)?128:hS(t)?64:ot(t)?4:Ce(t)?2:0;return U(t,e,n,i,r,o,s,!0)}function gs(t){return t?BO(t)||ZS(t)?Ot({},t):t:null}function Qi(t,e,n=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:l}=t,c=e?me(r||{},e):r,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&r0(c),ref:e&&e.ref?n&&s?ve(s)?s.concat($u(e)):[s,$u(e)]:$u(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ke?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Qi(t.ssContent),ssFallback:t.ssFallback&&Qi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&_r(u,l.clone(u)),u}function _e(t=" ",e=0){return R($r,null,t,e)}function Qm(t,e){const n=R(zs,null,t);return n.staticCount=e,n}function pe(t="",e=!1){return e?(w(),D(kt,null,t)):R(kt,null,t)}function kn(t){return t==null||typeof t=="boolean"?R(kt):ve(t)?R(ke,null,t.slice()):xr(t)?jr(t):R($r,null,String(t))}function jr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Qi(t)}function ym(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(ve(e))n=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),ym(t,r()),r._c&&(r._d=!0));return}else{n=32;const r=e._;!r&&!ZS(e)?e._ctx=Lt:r===3&&Lt&&(Lt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ce(e)?(e={default:e,_ctx:Lt},n=32):(e=String(e),i&64?(n=16,e=[_e(e)]):n=8);t.children=e,t.shapeFlag|=n}function me(...t){const e={};for(let n=0;nUt||Lt;let Wu,fh;{const t=MO(),e=(n,i)=>{let r;return(r=t[n])||(r=t[n]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};Wu=e("__VUE_INSTANCE_SETTERS__",n=>Ut=n),fh=e("__VUE_SSR_SETTERS__",n=>Io=n)}const Ds=t=>{const e=Ut;return Wu(t),t.scope.on(),()=>{t.scope.off(),Wu(e)}},dh=()=>{Ut&&Ut.scope.off(),Wu(null)};function o0(t){return t.vnode.shapeFlag&4}let Io=!1;function a0(t,e=!1,n=!1){e&&fh(e);const{props:i,children:r}=t.vnode,s=o0(t);VR(t,i,s,e),ZR(t,r,n||e);const o=s?rC(t,e):void 0;return e&&fh(!1),o}function rC(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,oh);const{setup:i}=n;if(i){br();const r=t.setupContext=i.length>1?c0(t):null,s=Ds(t),o=aa(i,t,0,[t.props,r]),a=Fp(o);if(vr(),s(),(a||t.sp)&&!ns(t)&&lm(t),a){if(o.then(dh,dh),e)return o.then(l=>{hh(t,l,e)}).catch(l=>{Ks(l,t,0)});t.asyncDep=o}else hh(t,o,e)}else l0(t,e)}function hh(t,e,n){Ce(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ot(e)&&(t.setupState=nm(e)),l0(t,n)}let Nu,ph;function sC(t){Nu=t,ph=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,dR))}}const oC=()=>!Nu;function l0(t,e,n){const i=t.type;if(!t.render){if(!e&&Nu&&!i.render){const r=i.template||hm(t).template;if(r){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=Ot(Ot({isCustomElement:s,delimiters:a},o),l);i.render=Nu(r,c)}}t.render=i.render||oi,ph&&ph(t)}{const r=Ds(t);br();try{xR(t)}finally{vr(),r()}}}const aC={get(t,e){return un(t,"get",""),t[e]}};function c0(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,aC),slots:t.slots,emit:t.emit,expose:e}}function Hl(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(nm(Bl(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Ha)return Ha[n](t)},has(e,n){return n in e||n in Ha}})):t.proxy}function mh(t,e=!0){return Ce(t)?t.displayName||t.name:t.name||e&&t.__name}function lC(t){return Ce(t)&&"__vccOpts"in t}const G=(t,e)=>kk(t,e,Io);function vn(t,e,n){const i=arguments.length;return i===2?ot(e)&&!ve(e)?xr(e)?R(t,null,[e]):R(t,e):R(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&xr(n)&&(n=[n]),R(t,e,n))}function cC(){}function uC(t,e,n,i){const r=n[i];if(r&&u0(r,t))return r;const s=e();return s.memo=t.slice(),s.cacheIndex=i,n[i]=s}function u0(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i0&&fn&&fn.push(t),!0}const O0="3.5.16",OC=oi,fC=zk,dC=ho,hC=fS,pC={createComponentInstance:s0,setupComponent:a0,renderComponentRoot:gu,setCurrentRenderingInstance:dl,isVNode:xr,normalizeVNode:kn,getComponentPublicInstance:Hl,ensureValidVNode:dm,pushWarningContext:Ek,popWarningContext:Ak},mC=pC,gC=null,$C=null,QC=null;/** * @vue/runtime-dom v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let gh;const y$=typeof window<"u"&&window.trustedTypes;if(y$)try{gh=y$.createPolicy("vue",{createHTML:t=>t})}catch{}const f0=gh?t=>gh.createHTML(t):t=>t,QC="http://www.w3.org/2000/svg",yC="http://www.w3.org/1998/Math/MathML",lr=typeof document<"u"?document:null,b$=lr&&lr.createElement("template"),bC={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r=e==="svg"?lr.createElementNS(QC,t):e==="mathml"?lr.createElementNS(yC,t):n?lr.createElement(t,{is:n}):lr.createElement(t);return t==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:t=>lr.createTextNode(t),createComment:t=>lr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>lr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,s){const o=n?n.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{b$.innerHTML=f0(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=b$.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Ar="transition",Pa="animation",Uo=Symbol("_vtc"),d0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},h0=Ot({},am,d0),vC=t=>(t.displayName="Transition",t.props=h0,t),SC=vC((t,{slots:e})=>vn(QS,p0(t),e)),xs=(t,e=[])=>{ve(t)?t.forEach(n=>n(...e)):t&&t(...e)},v$=t=>t?ve(t)?t.some(e=>e.length>1):t.length>1:!1;function p0(t){const e={};for(const E in t)E in d0||(e[E]=t[E]);if(t.css===!1)return e;const{name:n="v",type:i,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:O=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=t,h=PC(r),p=h&&h[0],$=h&&h[1],{onBeforeEnter:g,onEnter:b,onEnterCancelled:Q,onLeave:y,onLeaveCancelled:v,onBeforeAppear:S=g,onAppear:P=b,onAppearCancelled:x=Q}=e,C=(E,te,se,le)=>{E._enterCancelled=le,Ir(E,te?u:a),Ir(E,te?c:o),se&&se()},Z=(E,te)=>{E._isLeaving=!1,Ir(E,O),Ir(E,d),Ir(E,f),te&&te()},W=E=>(te,se)=>{const le=E?P:b,F=()=>C(te,E,se);xs(le,[te,F]),S$(()=>{Ir(te,E?l:s),Ci(te,E?u:a),v$(le)||P$(te,i,p,F)})};return Ot(e,{onBeforeEnter(E){xs(g,[E]),Ci(E,s),Ci(E,o)},onBeforeAppear(E){xs(S,[E]),Ci(E,l),Ci(E,c)},onEnter:W(!1),onAppear:W(!0),onLeave(E,te){E._isLeaving=!0;const se=()=>Z(E,te);Ci(E,O),E._enterCancelled?(Ci(E,f),$h()):($h(),Ci(E,f)),S$(()=>{E._isLeaving&&(Ir(E,O),Ci(E,d),v$(y)||P$(E,i,$,se))}),xs(y,[E,se])},onEnterCancelled(E){C(E,!1,void 0,!0),xs(Q,[E])},onAppearCancelled(E){C(E,!0,void 0,!0),xs(x,[E])},onLeaveCancelled(E){Z(E),xs(v,[E])}})}function PC(t){if(t==null)return null;if(ot(t))return[Gf(t.enter),Gf(t.leave)];{const e=Gf(t);return[e,e]}}function Gf(t){return qu(t)}function Ci(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Uo]||(t[Uo]=new Set)).add(e)}function Ir(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[Uo];n&&(n.delete(e),n.size||(t[Uo]=void 0))}function S$(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _C=0;function P$(t,e,n,i){const r=t._endId=++_C,s=()=>{r===t._endId&&i()};if(n!=null)return setTimeout(s,n);const{type:o,timeout:a,propCount:l}=m0(t,e);if(!o)return i();const c=o+"end";let u=0;const O=()=>{t.removeEventListener(c,f),s()},f=d=>{d.target===t&&++u>=l&&O()};setTimeout(()=>{u(n[h]||"").split(", "),r=i(`${Ar}Delay`),s=i(`${Ar}Duration`),o=_$(r,s),a=i(`${Pa}Delay`),l=i(`${Pa}Duration`),c=_$(a,l);let u=null,O=0,f=0;e===Ar?o>0&&(u=Ar,O=o,f=s.length):e===Pa?c>0&&(u=Pa,O=c,f=l.length):(O=Math.max(o,c),u=O>0?o>c?Ar:Pa:null,f=u?u===Ar?s.length:l.length:0);const d=u===Ar&&/\b(transform|all)(,|$)/.test(i(`${Ar}Property`).toString());return{type:u,timeout:O,propCount:f,hasTransform:d}}function _$(t,e){for(;t.lengthx$(n)+x$(t[i])))}function x$(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function $h(){return document.body.offsetHeight}function xC(t,e,n){const i=t[Uo];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const ju=Symbol("_vod"),g0=Symbol("_vsh"),bm={beforeMount(t,{value:e},{transition:n}){t[ju]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):_a(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),_a(t,!0),i.enter(t)):i.leave(t,()=>{_a(t,!1)}):_a(t,e))},beforeUnmount(t,{value:e}){_a(t,e)}};function _a(t,e){t.style.display=e?t[ju]:"none",t[g0]=!e}function wC(){bm.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const $0=Symbol("");function TC(t){const e=Qt();if(!e)return;const n=e.ut=(r=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(s=>Bu(s,r))},i=()=>{const r=t(e.proxy);e.ce?Bu(e.ce,r):Qh(e.subTree,r),n(r)};cm(()=>{Ol(i)}),yt(()=>{Re(i,oi,{flush:"post"});const r=new MutationObserver(i);r.observe(e.subTree.el.parentNode,{childList:!0}),Fi(()=>r.disconnect())})}function Qh(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Qh(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Bu(t.el,e);else if(t.type===ke)t.children.forEach(n=>Qh(n,e));else if(t.type===zs){let{el:n,anchor:i}=t;for(;n&&(Bu(n,e),n!==i);)n=n.nextSibling}}function Bu(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const r in e)n.setProperty(`--${r}`,e[r]),i+=`--${r}: ${e[r]};`;n[$0]=i}}const kC=/(^|;)\s*display\s*:/;function RC(t,e,n){const i=t.style,r=pt(n);let s=!1;if(n&&!r){if(e)if(pt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Qu(i,a,"")}else for(const o in e)n[o]==null&&Qu(i,o,"");for(const o in n)o==="display"&&(s=!0),Qu(i,o,n[o])}else if(r){if(e!==n){const o=i[$0];o&&(n+=";"+o),i.cssText=n,s=kC.test(n)}}else e&&t.removeAttribute("style");ju in t&&(t[ju]=s?i.display:"",t[g0]&&(i.display="none"))}const w$=/\s*!important$/;function Qu(t,e,n){if(ve(n))n.forEach(i=>Qu(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=CC(t,e);w$.test(n)?t.setProperty(Vn(i),n.replace(w$,""),"important"):t[i]=n}}const T$=["Webkit","Moz","ms"],Ff={};function CC(t,e){const n=Ff[e];if(n)return n;let i=Wt(e);if(i!=="filter"&&i in t)return Ff[e]=i;i=Nl(i);for(let r=0;rHf||(AC.then(()=>Hf=0),Hf=Date.now());function ZC(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;ci(zC(i,n.value),e,5,[i])};return n.value=t,n.attached=qC(),n}function zC(t,e){if(ve(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const E$=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,YC=(t,e,n,i,r,s)=>{const o=r==="svg";e==="class"?xC(t,i,o):e==="style"?RC(t,n,i):Wl(e)?Bp(e)||VC(t,e,n,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):MC(t,e,i,o))?(C$(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&R$(t,e,i,o,s,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!pt(i))?C$(t,Wt(e),i,s,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),R$(t,e,i,o))};function MC(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&E$(e)&&Ce(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return E$(e)&&pt(n)?!1:e in t}const A$={};/*! #__NO_SIDE_EFFECTS__ */function Q0(t,e,n){const i=M(t,e);zO(i)&&Ot(i,e);class r extends nf{constructor(o){super(i,o,n)}}return r.def=i,r}/*! #__NO_SIDE_EFFECTS__ */const IC=(t,e)=>Q0(t,e,R0),UC=typeof HTMLElement<"u"?HTMLElement:class{};class nf extends UC{constructor(e,n={},i=Fu){super(),this._def=e,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==Fu?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof nf){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,Dt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{for(const r of i)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(i,r=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:s,styles:o}=i;let a;if(s&&!ve(s))for(const l in s){const c=s[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=qu(this._props[l])),(a||(a=Object.create(null)))[Wt(l)]=!0)}this._numberProps=a,this._resolveProps(i),this.shadowRoot&&this._applyStyles(o),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>e(this._def=i,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)tt(this,i)||Object.defineProperty(this,i,{get:()=>m(n[i])})}_resolveProps(e){const{props:n}=e,i=ve(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&i.includes(r)&&this._setProp(r,this[r]);for(const r of i.map(Wt))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let i=n?this.getAttribute(e):A$;const r=Wt(e);n&&this._numberProps&&this._numberProps[r]&&(i=qu(i)),this._setProp(r,i,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,r=!1){if(n!==this._props[e]&&(n===A$?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),r&&this._instance&&this._update(),i)){const s=this._ob;s&&s.disconnect(),n===!0?this.setAttribute(Vn(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Vn(e),n+""):n||this.removeAttribute(Vn(e)),s&&s.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),k0(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=R(this._def,Ot(e,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const r=(s,o)=>{this.dispatchEvent(new CustomEvent(s,zO(o[0])?Ot({detail:o},o[0]):{detail:o}))};i.emit=(s,...o)=>{r(s,o),Vn(s)!==s&&r(Vn(s),o)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let r=e.length-1;r>=0;r--){const s=document.createElement("style");i&&s.setAttribute("nonce",i),s.textContent=e[r],this.shadowRoot.prepend(s)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(e[i]||(e[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let i=0;i(delete t.props.mode,t),NC=WC({name:"TransitionGroup",props:Ot({},h0,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Qt(),i=om();let r,s;return KO(()=>{if(!r.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!HC(r[0].el,n.vnode.el,o)){r=[];return}r.forEach(BC),r.forEach(GC);const a=r.filter(FC);$h(),a.forEach(l=>{const c=l.el,u=c.style;Ci(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const O=c[Gu]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",O),c[Gu]=null,Ir(c,o))};c.addEventListener("transitionend",O)}),r=[]}),()=>{const o=Ue(t),a=p0(o);let l=o.tag||ke;if(r=[],s)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(i);const{hasTransform:o}=m0(i);return s.removeChild(i),o}const ss=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ve(e)?n=>Ro(e,n):e};function KC(t){t.target.composing=!0}function Z$(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ai=Symbol("_assign"),Do={created(t,{modifiers:{lazy:e,trim:n,number:i}},r){t[ai]=ss(r);const s=i||r.props&&r.props.type==="number";dr(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),s&&(a=Au(a)),t[ai](a)}),n&&dr(t,"change",()=>{t.value=t.value.trim()}),e||(dr(t,"compositionstart",KC),dr(t,"compositionend",Z$),dr(t,"change",Z$))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:r,number:s}},o){if(t[ai]=ss(o),t.composing)return;const a=(s||t.type==="number")&&!/^0\d/.test(t.value)?Au(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||r&&t.value.trim()===l)||(t.value=l))}},vm={deep:!0,created(t,e,n){t[ai]=ss(n),dr(t,"change",()=>{const i=t._modelValue,r=Lo(t),s=t.checked,o=t[ai];if(ve(i)){const a=IO(i,r),l=a!==-1;if(s&&!l)o(i.concat(r));else if(!s&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Fs(i)){const a=new Set(i);s?a.add(r):a.delete(r),o(a)}else o(S0(t,s))})},mounted:z$,beforeUpdate(t,e,n){t[ai]=ss(n),z$(t,e,n)}};function z$(t,{value:e,oldValue:n},i){t._modelValue=e;let r;if(ve(e))r=IO(e,i.props.value)>-1;else if(Fs(e))r=e.has(i.props.value);else{if(e===n)return;r=rs(e,S0(t,!0))}t.checked!==r&&(t.checked=r)}const Sm={created(t,{value:e},n){t.checked=rs(e,n.props.value),t[ai]=ss(n),dr(t,"change",()=>{t[ai](Lo(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[ai]=ss(i),e!==n&&(t.checked=rs(e,i.props.value))}},rf={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const r=Fs(e);dr(t,"change",()=>{const s=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?Au(Lo(o)):Lo(o));t[ai](t.multiple?r?new Set(s):s:s[0]),t._assigning=!0,Dt(()=>{t._assigning=!1})}),t[ai]=ss(i)},mounted(t,{value:e}){Y$(t,e)},beforeUpdate(t,e,n){t[ai]=ss(n)},updated(t,{value:e}){t._assigning||Y$(t,e)}};function Y$(t,e){const n=t.multiple,i=ve(e);if(!(n&&!i&&!Fs(e))){for(let r=0,s=t.options.length;rString(c)===String(a)):o.selected=IO(e,a)>-1}else o.selected=e.has(a);else if(rs(Lo(o),e)){t.selectedIndex!==r&&(t.selectedIndex=r);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Lo(t){return"_value"in t?t._value:t.value}function S0(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const P0={created(t,e,n){Tc(t,e,n,null,"created")},mounted(t,e,n){Tc(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Tc(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Tc(t,e,n,i,"updated")}};function _0(t,e){switch(t){case"SELECT":return rf;case"TEXTAREA":return Do;default:switch(e){case"checkbox":return vm;case"radio":return Sm;default:return Do}}}function Tc(t,e,n,i,r){const o=_0(t.tagName,n.props&&n.props.type)[r];o&&o(t,e,n,i)}function JC(){Do.getSSRProps=({value:t})=>({value:t}),Sm.getSSRProps=({value:t},e)=>{if(e.props&&rs(e.props.value,t))return{checked:!0}},vm.getSSRProps=({value:t},e)=>{if(ve(t)){if(e.props&&IO(t,e.props.value)>-1)return{checked:!0}}else if(Fs(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},P0.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=_0(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const eX=["ctrl","shift","alt","meta"],tX={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>eX.some(n=>t[`${n}Key`]&&!e.includes(n))},on=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(r,...s)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=r=>{if(!("key"in r))return;const s=Vn(r.key);if(e.some(o=>o===s||nX[o]===s))return t(r)})},x0=Ot({patchProp:YC},bC);let Ja,M$=!1;function w0(){return Ja||(Ja=DS(x0))}function T0(){return Ja=M$?Ja:LS(x0),M$=!0,Ja}const k0=(...t)=>{w0().render(...t)},iX=(...t)=>{T0().hydrate(...t)},Fu=(...t)=>{const e=w0().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=X0(i);if(!r)return;const s=e._component;!Ce(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,C0(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e},R0=(...t)=>{const e=T0().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=X0(i);if(r)return n(r,!0,C0(r))},e};function C0(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function X0(t){return pt(t)?document.querySelector(t):t}let I$=!1;const rX=()=>{I$||(I$=!0,JC(),wC())};/** +**/let gh;const y$=typeof window<"u"&&window.trustedTypes;if(y$)try{gh=y$.createPolicy("vue",{createHTML:t=>t})}catch{}const f0=gh?t=>gh.createHTML(t):t=>t,yC="http://www.w3.org/2000/svg",bC="http://www.w3.org/1998/Math/MathML",lr=typeof document<"u"?document:null,b$=lr&&lr.createElement("template"),vC={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r=e==="svg"?lr.createElementNS(yC,t):e==="mathml"?lr.createElementNS(bC,t):n?lr.createElement(t,{is:n}):lr.createElement(t);return t==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:t=>lr.createTextNode(t),createComment:t=>lr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>lr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,s){const o=n?n.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{b$.innerHTML=f0(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=b$.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Ar="transition",Pa="animation",Uo=Symbol("_vtc"),d0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},h0=Ot({},am,d0),SC=t=>(t.displayName="Transition",t.props=h0,t),PC=SC((t,{slots:e})=>vn(QS,p0(t),e)),xs=(t,e=[])=>{ve(t)?t.forEach(n=>n(...e)):t&&t(...e)},v$=t=>t?ve(t)?t.some(e=>e.length>1):t.length>1:!1;function p0(t){const e={};for(const E in t)E in d0||(e[E]=t[E]);if(t.css===!1)return e;const{name:n="v",type:i,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:O=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=t,h=_C(r),p=h&&h[0],$=h&&h[1],{onBeforeEnter:g,onEnter:b,onEnterCancelled:Q,onLeave:y,onLeaveCancelled:v,onBeforeAppear:S=g,onAppear:P=b,onAppearCancelled:x=Q}=e,C=(E,te,se,le)=>{E._enterCancelled=le,Ir(E,te?u:a),Ir(E,te?c:o),se&&se()},Z=(E,te)=>{E._isLeaving=!1,Ir(E,O),Ir(E,d),Ir(E,f),te&&te()},W=E=>(te,se)=>{const le=E?P:b,F=()=>C(te,E,se);xs(le,[te,F]),S$(()=>{Ir(te,E?l:s),Ci(te,E?u:a),v$(le)||P$(te,i,p,F)})};return Ot(e,{onBeforeEnter(E){xs(g,[E]),Ci(E,s),Ci(E,o)},onBeforeAppear(E){xs(S,[E]),Ci(E,l),Ci(E,c)},onEnter:W(!1),onAppear:W(!0),onLeave(E,te){E._isLeaving=!0;const se=()=>Z(E,te);Ci(E,O),E._enterCancelled?(Ci(E,f),$h()):($h(),Ci(E,f)),S$(()=>{E._isLeaving&&(Ir(E,O),Ci(E,d),v$(y)||P$(E,i,$,se))}),xs(y,[E,se])},onEnterCancelled(E){C(E,!1,void 0,!0),xs(Q,[E])},onAppearCancelled(E){C(E,!0,void 0,!0),xs(x,[E])},onLeaveCancelled(E){Z(E),xs(v,[E])}})}function _C(t){if(t==null)return null;if(ot(t))return[Gf(t.enter),Gf(t.leave)];{const e=Gf(t);return[e,e]}}function Gf(t){return qu(t)}function Ci(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Uo]||(t[Uo]=new Set)).add(e)}function Ir(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[Uo];n&&(n.delete(e),n.size||(t[Uo]=void 0))}function S$(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let xC=0;function P$(t,e,n,i){const r=t._endId=++xC,s=()=>{r===t._endId&&i()};if(n!=null)return setTimeout(s,n);const{type:o,timeout:a,propCount:l}=m0(t,e);if(!o)return i();const c=o+"end";let u=0;const O=()=>{t.removeEventListener(c,f),s()},f=d=>{d.target===t&&++u>=l&&O()};setTimeout(()=>{u(n[h]||"").split(", "),r=i(`${Ar}Delay`),s=i(`${Ar}Duration`),o=_$(r,s),a=i(`${Pa}Delay`),l=i(`${Pa}Duration`),c=_$(a,l);let u=null,O=0,f=0;e===Ar?o>0&&(u=Ar,O=o,f=s.length):e===Pa?c>0&&(u=Pa,O=c,f=l.length):(O=Math.max(o,c),u=O>0?o>c?Ar:Pa:null,f=u?u===Ar?s.length:l.length:0);const d=u===Ar&&/\b(transform|all)(,|$)/.test(i(`${Ar}Property`).toString());return{type:u,timeout:O,propCount:f,hasTransform:d}}function _$(t,e){for(;t.lengthx$(n)+x$(t[i])))}function x$(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function $h(){return document.body.offsetHeight}function wC(t,e,n){const i=t[Uo];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const ju=Symbol("_vod"),g0=Symbol("_vsh"),bm={beforeMount(t,{value:e},{transition:n}){t[ju]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):_a(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),_a(t,!0),i.enter(t)):i.leave(t,()=>{_a(t,!1)}):_a(t,e))},beforeUnmount(t,{value:e}){_a(t,e)}};function _a(t,e){t.style.display=e?t[ju]:"none",t[g0]=!e}function TC(){bm.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const $0=Symbol("");function kC(t){const e=yt();if(!e)return;const n=e.ut=(r=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(s=>Bu(s,r))},i=()=>{const r=t(e.proxy);e.ce?Bu(e.ce,r):Qh(e.subTree,r),n(r)};cm(()=>{Ol(i)}),ft(()=>{Re(i,oi,{flush:"post"});const r=new MutationObserver(i);r.observe(e.subTree.el.parentNode,{childList:!0}),Fi(()=>r.disconnect())})}function Qh(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Qh(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Bu(t.el,e);else if(t.type===ke)t.children.forEach(n=>Qh(n,e));else if(t.type===zs){let{el:n,anchor:i}=t;for(;n&&(Bu(n,e),n!==i);)n=n.nextSibling}}function Bu(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const r in e)n.setProperty(`--${r}`,e[r]),i+=`--${r}: ${e[r]};`;n[$0]=i}}const RC=/(^|;)\s*display\s*:/;function CC(t,e,n){const i=t.style,r=mt(n);let s=!1;if(n&&!r){if(e)if(mt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Qu(i,a,"")}else for(const o in e)n[o]==null&&Qu(i,o,"");for(const o in n)o==="display"&&(s=!0),Qu(i,o,n[o])}else if(r){if(e!==n){const o=i[$0];o&&(n+=";"+o),i.cssText=n,s=RC.test(n)}}else e&&t.removeAttribute("style");ju in t&&(t[ju]=s?i.display:"",t[g0]&&(i.display="none"))}const w$=/\s*!important$/;function Qu(t,e,n){if(ve(n))n.forEach(i=>Qu(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=XC(t,e);w$.test(n)?t.setProperty(Vn(i),n.replace(w$,""),"important"):t[i]=n}}const T$=["Webkit","Moz","ms"],Ff={};function XC(t,e){const n=Ff[e];if(n)return n;let i=Wt(e);if(i!=="filter"&&i in t)return Ff[e]=i;i=Nl(i);for(let r=0;rHf||(qC.then(()=>Hf=0),Hf=Date.now());function zC(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;ci(YC(i,n.value),e,5,[i])};return n.value=t,n.attached=ZC(),n}function YC(t,e){if(ve(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const E$=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,MC=(t,e,n,i,r,s)=>{const o=r==="svg";e==="class"?wC(t,i,o):e==="style"?CC(t,n,i):Wl(e)?Bp(e)||EC(t,e,n,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IC(t,e,i,o))?(C$(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&R$(t,e,i,o,s,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!mt(i))?C$(t,Wt(e),i,s,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),R$(t,e,i,o))};function IC(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&E$(e)&&Ce(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return E$(e)&&mt(n)?!1:e in t}const A$={};/*! #__NO_SIDE_EFFECTS__ */function Q0(t,e,n){const i=M(t,e);zO(i)&&Ot(i,e);class r extends nf{constructor(o){super(i,o,n)}}return r.def=i,r}/*! #__NO_SIDE_EFFECTS__ */const UC=(t,e)=>Q0(t,e,R0),DC=typeof HTMLElement<"u"?HTMLElement:class{};class nf extends DC{constructor(e,n={},i=Fu){super(),this._def=e,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==Fu?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof nf){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,Dt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{for(const r of i)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(i,r=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:s,styles:o}=i;let a;if(s&&!ve(s))for(const l in s){const c=s[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=qu(this._props[l])),(a||(a=Object.create(null)))[Wt(l)]=!0)}this._numberProps=a,this._resolveProps(i),this.shadowRoot&&this._applyStyles(o),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>e(this._def=i,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)tt(this,i)||Object.defineProperty(this,i,{get:()=>m(n[i])})}_resolveProps(e){const{props:n}=e,i=ve(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&i.includes(r)&&this._setProp(r,this[r]);for(const r of i.map(Wt))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let i=n?this.getAttribute(e):A$;const r=Wt(e);n&&this._numberProps&&this._numberProps[r]&&(i=qu(i)),this._setProp(r,i,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,r=!1){if(n!==this._props[e]&&(n===A$?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),r&&this._instance&&this._update(),i)){const s=this._ob;s&&s.disconnect(),n===!0?this.setAttribute(Vn(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Vn(e),n+""):n||this.removeAttribute(Vn(e)),s&&s.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),k0(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=R(this._def,Ot(e,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const r=(s,o)=>{this.dispatchEvent(new CustomEvent(s,zO(o[0])?Ot({detail:o},o[0]):{detail:o}))};i.emit=(s,...o)=>{r(s,o),Vn(s)!==s&&r(Vn(s),o)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let r=e.length-1;r>=0;r--){const s=document.createElement("style");i&&s.setAttribute("nonce",i),s.textContent=e[r],this.shadowRoot.prepend(s)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(e[i]||(e[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let i=0;i(delete t.props.mode,t),jC=NC({name:"TransitionGroup",props:Ot({},h0,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=yt(),i=om();let r,s;return KO(()=>{if(!r.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!KC(r[0].el,n.vnode.el,o)){r=[];return}r.forEach(GC),r.forEach(FC);const a=r.filter(HC);$h(),a.forEach(l=>{const c=l.el,u=c.style;Ci(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const O=c[Gu]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",O),c[Gu]=null,Ir(c,o))};c.addEventListener("transitionend",O)}),r=[]}),()=>{const o=Ue(t),a=p0(o);let l=o.tag||ke;if(r=[],s)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(i);const{hasTransform:o}=m0(i);return s.removeChild(i),o}const ss=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ve(e)?n=>Ro(e,n):e};function JC(t){t.target.composing=!0}function Z$(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ai=Symbol("_assign"),Do={created(t,{modifiers:{lazy:e,trim:n,number:i}},r){t[ai]=ss(r);const s=i||r.props&&r.props.type==="number";dr(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),s&&(a=Au(a)),t[ai](a)}),n&&dr(t,"change",()=>{t.value=t.value.trim()}),e||(dr(t,"compositionstart",JC),dr(t,"compositionend",Z$),dr(t,"change",Z$))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:r,number:s}},o){if(t[ai]=ss(o),t.composing)return;const a=(s||t.type==="number")&&!/^0\d/.test(t.value)?Au(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||r&&t.value.trim()===l)||(t.value=l))}},vm={deep:!0,created(t,e,n){t[ai]=ss(n),dr(t,"change",()=>{const i=t._modelValue,r=Lo(t),s=t.checked,o=t[ai];if(ve(i)){const a=IO(i,r),l=a!==-1;if(s&&!l)o(i.concat(r));else if(!s&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Fs(i)){const a=new Set(i);s?a.add(r):a.delete(r),o(a)}else o(S0(t,s))})},mounted:z$,beforeUpdate(t,e,n){t[ai]=ss(n),z$(t,e,n)}};function z$(t,{value:e,oldValue:n},i){t._modelValue=e;let r;if(ve(e))r=IO(e,i.props.value)>-1;else if(Fs(e))r=e.has(i.props.value);else{if(e===n)return;r=rs(e,S0(t,!0))}t.checked!==r&&(t.checked=r)}const Sm={created(t,{value:e},n){t.checked=rs(e,n.props.value),t[ai]=ss(n),dr(t,"change",()=>{t[ai](Lo(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[ai]=ss(i),e!==n&&(t.checked=rs(e,i.props.value))}},rf={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const r=Fs(e);dr(t,"change",()=>{const s=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?Au(Lo(o)):Lo(o));t[ai](t.multiple?r?new Set(s):s:s[0]),t._assigning=!0,Dt(()=>{t._assigning=!1})}),t[ai]=ss(i)},mounted(t,{value:e}){Y$(t,e)},beforeUpdate(t,e,n){t[ai]=ss(n)},updated(t,{value:e}){t._assigning||Y$(t,e)}};function Y$(t,e){const n=t.multiple,i=ve(e);if(!(n&&!i&&!Fs(e))){for(let r=0,s=t.options.length;rString(c)===String(a)):o.selected=IO(e,a)>-1}else o.selected=e.has(a);else if(rs(Lo(o),e)){t.selectedIndex!==r&&(t.selectedIndex=r);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Lo(t){return"_value"in t?t._value:t.value}function S0(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const P0={created(t,e,n){Tc(t,e,n,null,"created")},mounted(t,e,n){Tc(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Tc(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Tc(t,e,n,i,"updated")}};function _0(t,e){switch(t){case"SELECT":return rf;case"TEXTAREA":return Do;default:switch(e){case"checkbox":return vm;case"radio":return Sm;default:return Do}}}function Tc(t,e,n,i,r){const o=_0(t.tagName,n.props&&n.props.type)[r];o&&o(t,e,n,i)}function eX(){Do.getSSRProps=({value:t})=>({value:t}),Sm.getSSRProps=({value:t},e)=>{if(e.props&&rs(e.props.value,t))return{checked:!0}},vm.getSSRProps=({value:t},e)=>{if(ve(t)){if(e.props&&IO(t,e.props.value)>-1)return{checked:!0}}else if(Fs(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},P0.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=_0(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const tX=["ctrl","shift","alt","meta"],nX={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>tX.some(n=>t[`${n}Key`]&&!e.includes(n))},on=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(r,...s)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=r=>{if(!("key"in r))return;const s=Vn(r.key);if(e.some(o=>o===s||iX[o]===s))return t(r)})},x0=Ot({patchProp:MC},vC);let Ja,M$=!1;function w0(){return Ja||(Ja=DS(x0))}function T0(){return Ja=M$?Ja:LS(x0),M$=!0,Ja}const k0=(...t)=>{w0().render(...t)},rX=(...t)=>{T0().hydrate(...t)},Fu=(...t)=>{const e=w0().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=X0(i);if(!r)return;const s=e._component;!Ce(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,C0(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e},R0=(...t)=>{const e=T0().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=X0(i);if(r)return n(r,!0,C0(r))},e};function C0(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function X0(t){return mt(t)?document.querySelector(t):t}let I$=!1;const sX=()=>{I$||(I$=!0,eX(),TC())};/** * vue v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const sX=()=>{},oX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:QS,BaseTransitionPropsValidators:am,Comment:kt,DeprecationTypes:$C,EffectScope:Kp,ErrorCodes:qk,ErrorTypeStrings:OC,Fragment:ke,KeepAlive:oR,ReactiveEffect:ll,Static:zs,Suspense:jR,Teleport:sm,Text:$r,TrackOpTypes:kk,Transition:SC,TransitionGroup:jC,TriggerOpTypes:Rk,VueElement:nf,assertNumber:Ak,callWithAsyncErrorHandling:ci,callWithErrorHandling:aa,camelize:Wt,capitalize:Nl,cloneVNode:Qi,compatUtils:gC,compile:sX,computed:G,createApp:Fu,createBlock:D,createCommentVNode:ge,createElementBlock:B,createElementVNode:U,createHydrationRenderer:LS,createPropsRestProxy:SR,createRenderer:DS,createSSRApp:R0,createSlots:uR,createStaticVNode:Qm,createTextVNode:_e,createVNode:R,customRef:im,defineAsyncComponent:rR,defineComponent:M,defineCustomElement:Q0,defineEmits:hR,defineExpose:pR,defineModel:$R,defineOptions:mR,defineProps:dR,defineSSRCustomElement:IC,defineSlots:gR,devtools:fC,effect:tk,effectScope:oa,getCurrentInstance:Qt,getCurrentScope:jl,getCurrentWatcher:Ck,getTransitionRawChildren:FO,guardReactiveProps:gs,h:vn,handleError:Ks,hasInjectionContext:ES,hydrate:iX,hydrateOnIdle:Kk,hydrateOnInteraction:nR,hydrateOnMediaQuery:tR,hydrateOnVisible:eR,initCustomFormatter:lC,initDirectivesForSSR:rX,inject:bn,isMemoSame:u0,isProxy:BO,isReactive:Ui,isReadonly:Pr,isRef:He,isRuntimeOnly:sC,isShallow:jn,isVNode:xr,markRaw:Bl,mergeDefaults:CS,mergeModels:vR,mergeProps:pe,nextTick:Dt,normalizeClass:St,normalizeProps:Hs,normalizeStyle:Fn,onActivated:bS,onBeforeMount:PS,onBeforeUnmount:Js,onBeforeUpdate:cm,onDeactivated:vS,onErrorCaptured:TS,onMounted:yt,onRenderTracked:wS,onRenderTriggered:xS,onScopeDispose:UO,onServerPrefetch:_S,onUnmounted:Fi,onUpdated:KO,onWatcherCleanup:aS,openBlock:w,popScopeId:Ik,provide:fr,proxyRefs:nm,pushScopeId:Mk,queuePostFlushCb:Ol,reactive:Sr,readonly:NO,ref:ne,registerRuntimeCompiler:rC,render:k0,renderList:xt,renderSlot:re,resolveComponent:Om,resolveDirective:cR,resolveDynamicComponent:JO,resolveFilter:mC,resolveTransitionHooks:Mo,setBlockTracking:Oh,setDevtoolsHook:dC,setTransitionHooks:_r,shallowReactive:iS,shallowReadonly:ks,shallowRef:gr,ssrContextKey:BS,ssrUtils:pC,stop:nk,toDisplayString:H,toHandlerKey:ko,toHandlers:OR,toRaw:Ue,toRef:sS,toRefs:an,toValue:sn,transformVNodeArgs:JR,triggerRef:vk,unref:m,useAttrs:bR,useCssModule:LC,useCssVars:TC,useHost:y0,useId:mu,useModel:MR,useSSRContext:GS,useShadowRoot:DC,useSlots:yR,useTemplateRef:Wk,useTransitionState:om,vModelCheckbox:vm,vModelDynamic:P0,vModelRadio:Sm,vModelSelect:rf,vModelText:Do,vShow:bm,version:O0,warn:uC,watch:Re,watchEffect:Zt,watchPostEffect:$m,watchSyncEffect:FS,withAsyncContext:PR,withCtx:V,withDefaults:QR,withDirectives:la,withKeys:sf,withMemo:cC,withModifiers:on,withScopeId:Uk},Symbol.toStringTag,{value:"Module"}));/*! +**/const oX=()=>{},aX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:QS,BaseTransitionPropsValidators:am,Comment:kt,DeprecationTypes:QC,EffectScope:Kp,ErrorCodes:Zk,ErrorTypeStrings:fC,Fragment:ke,KeepAlive:aR,ReactiveEffect:ll,Static:zs,Suspense:BR,Teleport:sm,Text:$r,TrackOpTypes:Rk,Transition:PC,TransitionGroup:BC,TriggerOpTypes:Ck,VueElement:nf,assertNumber:qk,callWithAsyncErrorHandling:ci,callWithErrorHandling:aa,camelize:Wt,capitalize:Nl,cloneVNode:Qi,compatUtils:$C,compile:oX,computed:G,createApp:Fu,createBlock:D,createCommentVNode:pe,createElementBlock:j,createElementVNode:U,createHydrationRenderer:LS,createPropsRestProxy:PR,createRenderer:DS,createSSRApp:R0,createSlots:OR,createStaticVNode:Qm,createTextVNode:_e,createVNode:R,customRef:im,defineAsyncComponent:sR,defineComponent:M,defineCustomElement:Q0,defineEmits:pR,defineExpose:mR,defineModel:QR,defineOptions:gR,defineProps:hR,defineSSRCustomElement:UC,defineSlots:$R,devtools:dC,effect:nk,effectScope:oa,getCurrentInstance:yt,getCurrentScope:jl,getCurrentWatcher:Xk,getTransitionRawChildren:FO,guardReactiveProps:gs,h:vn,handleError:Ks,hasInjectionContext:ES,hydrate:rX,hydrateOnIdle:Jk,hydrateOnInteraction:iR,hydrateOnMediaQuery:nR,hydrateOnVisible:tR,initCustomFormatter:cC,initDirectivesForSSR:sX,inject:bn,isMemoSame:u0,isProxy:BO,isReactive:Ui,isReadonly:Pr,isRef:He,isRuntimeOnly:oC,isShallow:Bn,isVNode:xr,markRaw:Bl,mergeDefaults:CS,mergeModels:SR,mergeProps:me,nextTick:Dt,normalizeClass:St,normalizeProps:Hs,normalizeStyle:Hn,onActivated:bS,onBeforeMount:PS,onBeforeUnmount:Js,onBeforeUpdate:cm,onDeactivated:vS,onErrorCaptured:TS,onMounted:ft,onRenderTracked:wS,onRenderTriggered:xS,onScopeDispose:UO,onServerPrefetch:_S,onUnmounted:Fi,onUpdated:KO,onWatcherCleanup:aS,openBlock:w,popScopeId:Uk,provide:fr,proxyRefs:nm,pushScopeId:Ik,queuePostFlushCb:Ol,reactive:Sr,readonly:NO,ref:ne,registerRuntimeCompiler:sC,render:k0,renderList:xt,renderSlot:re,resolveComponent:Om,resolveDirective:uR,resolveDynamicComponent:JO,resolveFilter:gC,resolveTransitionHooks:Mo,setBlockTracking:Oh,setDevtoolsHook:hC,setTransitionHooks:_r,shallowReactive:iS,shallowReadonly:ks,shallowRef:gr,ssrContextKey:BS,ssrUtils:mC,stop:ik,toDisplayString:H,toHandlerKey:ko,toHandlers:fR,toRaw:Ue,toRef:sS,toRefs:an,toValue:sn,transformVNodeArgs:eC,triggerRef:Sk,unref:m,useAttrs:vR,useCssModule:WC,useCssVars:kC,useHost:y0,useId:mu,useModel:IR,useSSRContext:GS,useShadowRoot:LC,useSlots:bR,useTemplateRef:Nk,useTransitionState:om,vModelCheckbox:vm,vModelDynamic:P0,vModelRadio:Sm,vModelSelect:rf,vModelText:Do,vShow:bm,version:O0,warn:OC,watch:Re,watchEffect:Zt,watchPostEffect:$m,watchSyncEffect:FS,withAsyncContext:_R,withCtx:V,withDefaults:yR,withDirectives:la,withKeys:sf,withMemo:uC,withModifiers:on,withScopeId:Dk},Symbol.toStringTag,{value:"Module"}));/*! * pinia v3.0.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let V0;const of=t=>V0=t,E0=Symbol();function yh(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var el;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(el||(el={}));function aX(){const t=oa(!0),e=t.run(()=>ne({}));let n=[],i=[];const r=Bl({install(s){of(r),r._a=s,s.provide(E0,r),s.config.globalProperties.$pinia=r,i.forEach(o=>n.push(o)),i=[]},use(s){return this._a?n.push(s):i.push(s),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const A0=()=>{};function U$(t,e,n,i=A0){t.push(e);const r=()=>{const s=t.indexOf(e);s>-1&&(t.splice(s,1),i())};return!n&&jl()&&UO(r),r}function oo(t,...e){t.slice().forEach(n=>{n(...e)})}const lX=t=>t(),D$=Symbol(),Kf=Symbol();function bh(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],r=t[n];yh(r)&&yh(i)&&t.hasOwnProperty(n)&&!He(i)&&!Ui(i)?t[n]=bh(r,i):t[n]=i}return t}const cX=Symbol();function uX(t){return!yh(t)||!Object.prototype.hasOwnProperty.call(t,cX)}const{assign:Ur}=Object;function OX(t){return!!(He(t)&&t.effect)}function fX(t,e,n,i){const{state:r,actions:s,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=r?r():{});const u=an(n.state.value[t]);return Ur(u,s,Object.keys(o||{}).reduce((O,f)=>(O[f]=Bl(G(()=>{of(n);const d=n._s.get(t);return o[f].call(d,d)})),O),{}))}return l=q0(t,c,e,n,i,!0),l}function q0(t,e,n={},i,r,s){let o;const a=Ur({actions:{}},n),l={deep:!0};let c,u,O=[],f=[],d;const h=i.state.value[t];!s&&!h&&(i.state.value[t]={}),ne({});let p;function $(x){let C;c=u=!1,typeof x=="function"?(x(i.state.value[t]),C={type:el.patchFunction,storeId:t,events:d}):(bh(i.state.value[t],x),C={type:el.patchObject,payload:x,storeId:t,events:d});const Z=p=Symbol();Dt().then(()=>{p===Z&&(c=!0)}),u=!0,oo(O,C,i.state.value[t])}const g=s?function(){const{state:C}=n,Z=C?C():{};this.$patch(W=>{Ur(W,Z)})}:A0;function b(){o.stop(),O=[],f=[],i._s.delete(t)}const Q=(x,C="")=>{if(D$ in x)return x[Kf]=C,x;const Z=function(){of(i);const W=Array.from(arguments),E=[],te=[];function se(I){E.push(I)}function le(I){te.push(I)}oo(f,{args:W,name:Z[Kf],store:v,after:se,onError:le});let F;try{F=x.apply(this&&this.$id===t?this:v,W)}catch(I){throw oo(te,I),I}return F instanceof Promise?F.then(I=>(oo(E,I),I)).catch(I=>(oo(te,I),Promise.reject(I))):(oo(E,F),F)};return Z[D$]=!0,Z[Kf]=C,Z},y={_p:i,$id:t,$onAction:U$.bind(null,f),$patch:$,$reset:g,$subscribe(x,C={}){const Z=U$(O,x,C.detached,()=>W()),W=o.run(()=>Re(()=>i.state.value[t],E=>{(C.flush==="sync"?u:c)&&x({storeId:t,type:el.direct,events:d},E)},Ur({},l,C)));return Z},$dispose:b},v=Sr(y);i._s.set(t,v);const P=(i._a&&i._a.runWithContext||lX)(()=>i._e.run(()=>(o=oa()).run(()=>e({action:Q}))));for(const x in P){const C=P[x];if(He(C)&&!OX(C)||Ui(C))s||(h&&uX(C)&&(He(C)?C.value=h[x]:bh(C,h[x])),i.state.value[t][x]=C);else if(typeof C=="function"){const Z=Q(C,x);P[x]=Z,a.actions[x]=C}}return Ur(v,P),Ur(Ue(v),P),Object.defineProperty(v,"$state",{get:()=>i.state.value[t],set:x=>{$(C=>{Ur(C,x)})}}),i._p.forEach(x=>{Ur(v,o.run(()=>x({store:v,app:i._a,pinia:i,options:a})))}),h&&s&&n.hydrate&&n.hydrate(v.$state,h),c=!0,u=!0,v}/*! #__NO_SIDE_EFFECTS__ */function Z0(t,e,n){let i;const r=typeof e=="function";i=r?n:e;function s(o,a){const l=ES();return o=o||(l?bn(E0,null):null),o&&of(o),o=V0,o._s.has(t)||(r?q0(t,e,i,o):fX(t,i,o)),o._s.get(t)}return s.$id=t,s}function dX(t){if(!He(t))return Sr(t);const e=new Proxy({},{get(n,i,r){return m(Reflect.get(t.value,i,r))},set(n,i,r){return He(t.value[i])&&!He(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Sr(e)}function hX(t){return dX(G(t))}function at(t,...e){const n=e.flat(),i=n[0];return hX(()=>Object.fromEntries(typeof i=="function"?Object.entries(an(t)).filter(([r,s])=>!i(sn(s),r)):Object.entries(an(t)).filter(r=>!n.includes(r[0]))))}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const pX=t=>typeof t<"u";function mX(t){return JSON.parse(JSON.stringify(t))}function z0(t,e,n,i={}){var r,s,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:O,shouldEmit:f}=i,d=Qt(),h=n||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((o=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let p=c;p=p||`update:${e.toString()}`;const $=Q=>a?typeof a=="function"?a(Q):mX(Q):Q,g=()=>pX(t[e])?$(t[e]):O,b=Q=>{f?f(Q)&&h(p,Q):h(p,Q)};if(l){const Q=g(),y=ne(Q);let v=!1;return Re(()=>t[e],S=>{v||(v=!0,y.value=$(S),Dt(()=>v=!1))}),Re(y,S=>{!v&&(S!==t[e]||u)&&b(S)},{deep:u}),y}else return G({get(){return g()},set(Q){b(Q)}})}/** + */let V0;const of=t=>V0=t,E0=Symbol();function yh(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var el;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(el||(el={}));function lX(){const t=oa(!0),e=t.run(()=>ne({}));let n=[],i=[];const r=Bl({install(s){of(r),r._a=s,s.provide(E0,r),s.config.globalProperties.$pinia=r,i.forEach(o=>n.push(o)),i=[]},use(s){return this._a?n.push(s):i.push(s),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const A0=()=>{};function U$(t,e,n,i=A0){t.push(e);const r=()=>{const s=t.indexOf(e);s>-1&&(t.splice(s,1),i())};return!n&&jl()&&UO(r),r}function oo(t,...e){t.slice().forEach(n=>{n(...e)})}const cX=t=>t(),D$=Symbol(),Kf=Symbol();function bh(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],r=t[n];yh(r)&&yh(i)&&t.hasOwnProperty(n)&&!He(i)&&!Ui(i)?t[n]=bh(r,i):t[n]=i}return t}const uX=Symbol();function OX(t){return!yh(t)||!Object.prototype.hasOwnProperty.call(t,uX)}const{assign:Ur}=Object;function fX(t){return!!(He(t)&&t.effect)}function dX(t,e,n,i){const{state:r,actions:s,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=r?r():{});const u=an(n.state.value[t]);return Ur(u,s,Object.keys(o||{}).reduce((O,f)=>(O[f]=Bl(G(()=>{of(n);const d=n._s.get(t);return o[f].call(d,d)})),O),{}))}return l=q0(t,c,e,n,i,!0),l}function q0(t,e,n={},i,r,s){let o;const a=Ur({actions:{}},n),l={deep:!0};let c,u,O=[],f=[],d;const h=i.state.value[t];!s&&!h&&(i.state.value[t]={}),ne({});let p;function $(x){let C;c=u=!1,typeof x=="function"?(x(i.state.value[t]),C={type:el.patchFunction,storeId:t,events:d}):(bh(i.state.value[t],x),C={type:el.patchObject,payload:x,storeId:t,events:d});const Z=p=Symbol();Dt().then(()=>{p===Z&&(c=!0)}),u=!0,oo(O,C,i.state.value[t])}const g=s?function(){const{state:C}=n,Z=C?C():{};this.$patch(W=>{Ur(W,Z)})}:A0;function b(){o.stop(),O=[],f=[],i._s.delete(t)}const Q=(x,C="")=>{if(D$ in x)return x[Kf]=C,x;const Z=function(){of(i);const W=Array.from(arguments),E=[],te=[];function se(I){E.push(I)}function le(I){te.push(I)}oo(f,{args:W,name:Z[Kf],store:v,after:se,onError:le});let F;try{F=x.apply(this&&this.$id===t?this:v,W)}catch(I){throw oo(te,I),I}return F instanceof Promise?F.then(I=>(oo(E,I),I)).catch(I=>(oo(te,I),Promise.reject(I))):(oo(E,F),F)};return Z[D$]=!0,Z[Kf]=C,Z},y={_p:i,$id:t,$onAction:U$.bind(null,f),$patch:$,$reset:g,$subscribe(x,C={}){const Z=U$(O,x,C.detached,()=>W()),W=o.run(()=>Re(()=>i.state.value[t],E=>{(C.flush==="sync"?u:c)&&x({storeId:t,type:el.direct,events:d},E)},Ur({},l,C)));return Z},$dispose:b},v=Sr(y);i._s.set(t,v);const P=(i._a&&i._a.runWithContext||cX)(()=>i._e.run(()=>(o=oa()).run(()=>e({action:Q}))));for(const x in P){const C=P[x];if(He(C)&&!fX(C)||Ui(C))s||(h&&OX(C)&&(He(C)?C.value=h[x]:bh(C,h[x])),i.state.value[t][x]=C);else if(typeof C=="function"){const Z=Q(C,x);P[x]=Z,a.actions[x]=C}}return Ur(v,P),Ur(Ue(v),P),Object.defineProperty(v,"$state",{get:()=>i.state.value[t],set:x=>{$(C=>{Ur(C,x)})}}),i._p.forEach(x=>{Ur(v,o.run(()=>x({store:v,app:i._a,pinia:i,options:a})))}),h&&s&&n.hydrate&&n.hydrate(v.$state,h),c=!0,u=!0,v}/*! #__NO_SIDE_EFFECTS__ */function Z0(t,e,n){let i;const r=typeof e=="function";i=r?n:e;function s(o,a){const l=ES();return o=o||(l?bn(E0,null):null),o&&of(o),o=V0,o._s.has(t)||(r?q0(t,e,i,o):dX(t,i,o)),o._s.get(t)}return s.$id=t,s}function hX(t){if(!He(t))return Sr(t);const e=new Proxy({},{get(n,i,r){return m(Reflect.get(t.value,i,r))},set(n,i,r){return He(t.value[i])&&!He(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Sr(e)}function pX(t){return hX(G(t))}function at(t,...e){const n=e.flat(),i=n[0];return pX(()=>Object.fromEntries(typeof i=="function"?Object.entries(an(t)).filter(([r,s])=>!i(sn(s),r)):Object.entries(an(t)).filter(r=>!n.includes(r[0]))))}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const mX=t=>typeof t<"u";function gX(t){return JSON.parse(JSON.stringify(t))}function z0(t,e,n,i={}){var r,s,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:O,shouldEmit:f}=i,d=yt(),h=n||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((o=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let p=c;p=p||`update:${e.toString()}`;const $=Q=>a?typeof a=="function"?a(Q):gX(Q):Q,g=()=>mX(t[e])?$(t[e]):O,b=Q=>{f?f(Q)&&h(p,Q):h(p,Q)};if(l){const Q=g(),y=ne(Q);let v=!1;return Re(()=>t[e],S=>{v||(v=!0,y.value=$(S),Dt(()=>v=!1))}),Re(y,S=>{!v&&(S!==t[e]||u)&&b(S)},{deep:u}),y}else return G({get(){return g()},set(Q){b(Q)}})}/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L$=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gX=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase()),$X=t=>{const e=gX(t);return e.charAt(0).toUpperCase()+e.slice(1)},QX=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/** + */const L$=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$X=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase()),QX=t=>{const e=$X(t);return e.charAt(0).toUpperCase()+e.slice(1)},yX=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. @@ -38,12 +38,12 @@ var qT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var ZT=(t,e,n)=>e in * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yX=({size:t,strokeWidth:e=2,absoluteStrokeWidth:n,color:i,iconNode:r,name:s,class:o,...a},{slots:l})=>vn("svg",{...kc,width:t||kc.width,height:t||kc.height,stroke:i||kc.stroke,"stroke-width":n?Number(e)*24/Number(t):e,class:QX("lucide",...s?[`lucide-${L$($X(s))}-icon`,`lucide-${L$(s)}`]:["lucide-icon"]),...a},[...r.map(c=>vn(...c)),...l.default?[l.default()]:[]]);/** + */const bX=({size:t,strokeWidth:e=2,absoluteStrokeWidth:n,color:i,iconNode:r,name:s,class:o,...a},{slots:l})=>vn("svg",{...kc,width:t||kc.width,height:t||kc.height,stroke:i||kc.stroke,"stroke-width":n?Number(e)*24/Number(t):e,class:yX("lucide",...s?[`lucide-${L$(QX(s))}-icon`,`lucide-${L$(s)}`]:["lucide-icon"]),...a},[...r.map(c=>vn(...c)),...l.default?[l.default()]:[]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bt=(t,e)=>(n,{slots:i})=>vn(yX,{...n,iconNode:e,name:t},i);/** + */const bt=(t,e)=>(n,{slots:i})=>vn(bX,{...n,iconNode:e,name:t},i);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. @@ -63,7 +63,7 @@ var qT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var ZT=(t,e,n)=>e in * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bX=bt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const vX=bt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. @@ -73,7 +73,7 @@ var qT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var ZT=(t,e,n)=>e in * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vX=bt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const SX=bt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. @@ -83,131 +83,131 @@ var qT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var ZT=(t,e,n)=>e in * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SX=bt("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]]);/** + */const PX=bt("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PX=bt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + */const _X=bt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _X=bt("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + */const xX=bt("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xX=bt("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/** + */const wX=bt("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wX=bt("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + */const TX=bt("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TX=bt("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** + */const kX=bt("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kX=bt("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/** + */const RX=bt("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RX=bt("rows-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/** + */const CX=bt("rows-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CX=bt("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const XX=bt("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XX=bt("square-chevron-down",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]);/** + */const VX=bt("square-chevron-down",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VX=bt("square-dashed",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]]);/** + */const EX=bt("square-dashed",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EX=bt("square-dot",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/** + */const AX=bt("square-dot",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const AX=bt("square-menu",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 8h10",key:"1jw688"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** + */const qX=bt("square-menu",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 8h10",key:"1jw688"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qX=bt("square-parking",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 17V7h4a3 3 0 0 1 0 6H9",key:"1dfk2c"}]]);/** + */const ZX=bt("square-parking",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 17V7h4a3 3 0 0 1 0 6H9",key:"1dfk2c"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZX=bt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** + */const zX=bt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zX=bt("table-cells-merge",[["path",{d:"M12 21v-6",key:"lihzve"}],["path",{d:"M12 9V3",key:"da5inc"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M3 9h18",key:"1pudct"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** + */const YX=bt("table-cells-merge",[["path",{d:"M12 21v-6",key:"lihzve"}],["path",{d:"M12 9V3",key:"da5inc"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M3 9h18",key:"1pudct"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YX=bt("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** + */const MX=bt("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const I0=bt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function W$(t){return typeof t=="string"?`'${t}'`:new MX().serialize(t)}const MX=function(){var e;class t{constructor(){t$(this,e,new Map)}compare(i,r){const s=typeof i,o=typeof r;return s==="string"&&o==="string"?i.localeCompare(r):s==="number"&&o==="number"?i-r:String.prototype.localeCompare.call(this.serialize(i,!0),this.serialize(r,!0))}serialize(i,r){if(i===null)return"null";switch(typeof i){case"string":return r?i:`'${i}'`;case"bigint":return`${i}n`;case"object":return this.$object(i);case"function":return this.$function(i)}return String(i)}serializeObject(i){const r=Object.prototype.toString.call(i);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),i);const s=i.constructor,o=s===Object||s===void 0?"":s.name;if(o!==""&&globalThis[o]===s)return this.serializeBuiltInType(o,i);if(typeof i.toJSON=="function"){const a=i.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(i))}serializeBuiltInType(i,r){const s=this["$"+i];if(s)return s.call(this,r);if(typeof(r==null?void 0:r.entries)=="function")return this.serializeObjectEntries(i,r.entries());throw new Error(`Cannot serialize ${i}`)}serializeObjectEntries(i,r){const s=Array.from(r).sort((a,l)=>this.compare(a[0],l[0]));let o=`${i}{`;for(let a=0;athis.compare(r,s)))}`}$Map(i){return this.serializeObjectEntries("Map",i.entries())}}e=new WeakMap;for(const n of["Error","RegExp","URL"])t.prototype["$"+n]=function(i){return`${n}(${i})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join("n,")}${i.length>0?"n":""}]`};return t}();function Hu(t,e){return t===e||W$(t)===W$(e)}function IX(t,e){if(t.length!==e.length)return!1;for(let n=0;n{const a=bn(i,o);if(a||a===null)return a;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(fr(i,o),o)]}function Sn(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function xm(t,e,n){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),i.dispatchEvent(r)}function gl(t){return t==null}function j$(t,e){return gl(t)?!1:Array.isArray(t)?t.some(n=>Hu(n,e)):Hu(t,e)}function wm(t){return t?t.flatMap(e=>e.type===ke?wm(e.children):[e]):[]}const[af,M9]=hn("ConfigProvider");function UX(t,e){var n;const i=gr();return Zt(()=>{i.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),NO(i)}function lf(t){return jl()?(UO(t),!0):!1}function DX(t){let e=!1,n;const i=oa(!0);return(...r)=>(e||(n=i.run(()=>t(...r)),e=!0),n)}function LX(t){let e=0,n,i;const r=()=>{e-=1,i&&e<=0&&(i.stop(),n=void 0,i=void 0)};return(...s)=>(e+=1,i||(i=oa(!0),n=i.run(()=>t(...s))),lf(r),n)}const $s=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const WX=t=>typeof t<"u",NX=Object.prototype.toString,jX=t=>NX.call(t)==="[object Object]",B$=BX();function BX(){var t,e;return $s&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function GX(t){return Qt()}function Jf(t){return Array.isArray(t)?t:[t]}function FX(t,e=1e4){return im((n,i)=>{let r=sn(t),s;const o=()=>setTimeout(()=>{r=sn(t),i()},sn(e));return lf(()=>{clearTimeout(s)}),{get(){return n(),r},set(a){r=a,i(),clearTimeout(s),s=o()}}})}const HX=sn;function KX(t,e){GX()&&Js(t,e)}function JX(t,e,n){return Re(t,e,{...n,immediate:!0})}const cf=$s?window:void 0;function ji(t){var e;const n=sn(t);return(e=n==null?void 0:n.$el)!=null?e:n}function U0(...t){const e=[],n=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),r=G(()=>{const a=Jf(sn(t[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),s=JX(()=>{var a,l;return[(l=(a=r.value)==null?void 0:a.map(c=>ji(c)))!=null?l:[cf].filter(c=>c!=null),Jf(sn(r.value?t[1]:t[0])),Jf(m(r.value?t[2]:t[1])),sn(r.value?t[3]:t[2])]},([a,l,c,u])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const O=jX(u)?{...u}:u;e.push(...a.flatMap(f=>l.flatMap(d=>c.map(h=>i(f,d,h,O)))))},{flush:"post"}),o=()=>{s(),n()};return lf(n),o}function D0(){const t=gr(!1),e=Qt();return e&&yt(()=>{t.value=!0},e),t}function eV(t){const e=D0();return G(()=>(e.value,!!t()))}function tV(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function nV(...t){let e,n,i={};t.length===3?(e=t[0],n=t[1],i=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],i=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:r=cf,eventName:s="keydown",passive:o=!1,dedupe:a=!1}=i,l=tV(e);return U0(r,s,u=>{u.repeat&&sn(a)||l(u)&&n(u)},o)}function iV(t){return JSON.parse(JSON.stringify(t))}function rV(t,e,n={}){const{window:i=cf,...r}=n;let s;const o=eV(()=>i&&"ResizeObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},l=G(()=>{const O=sn(t);return Array.isArray(O)?O.map(f=>ji(f)):[ji(O)]}),c=Re(l,O=>{if(a(),o.value&&i){s=new ResizeObserver(e);for(const f of O)f&&s.observe(f,r)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return lf(u),{isSupported:o,stop:u}}function os(t,e,n,i={}){var r,s,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:O,shouldEmit:f}=i,d=Qt(),h=n||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((o=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let p=c;e||(e="modelValue"),p=p||`update:${e.toString()}`;const $=Q=>a?typeof a=="function"?a(Q):iV(Q):Q,g=()=>WX(t[e])?$(t[e]):O,b=Q=>{f?f(Q)&&h(p,Q):h(p,Q)};if(l){const Q=g(),y=ne(Q);let v=!1;return Re(()=>t[e],S=>{v||(v=!0,y.value=$(S),Dt(()=>v=!1))}),Re(y,S=>{!v&&(S!==t[e]||u)&&b(S)},{deep:u}),y}else return G({get(){return g()},set(Q){b(Q)}})}function ed(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Sh(t,e,n=".",i){if(!ed(e))return Sh(t,{},n,i);const r=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const o=t[s];o!=null&&(i&&i(r,s,o,n)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:ed(o)&&ed(r[s])?r[s]=Sh(o,r[s],(n?`${n}.`:"")+s.toString(),i):r[s]=o))}return r}function sV(t){return(...e)=>e.reduce((n,i)=>Sh(n,i,"",t),{})}const oV=sV(),aV=LX(()=>{const t=ne(new Map),e=ne(),n=G(()=>{for(const o of t.value.values())if(o)return!0;return!1}),i=af({scrollBody:ne(!0)});let r=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",B$&&(r==null||r()),e.value=void 0};return Re(n,(o,a)=>{var O;if(!$s)return;if(!o){a&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=(O=i.scrollBody)!=null&&O.value?typeof i.scrollBody.value=="object"?oV({padding:i.scrollBody.value.padding===!0?l:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?l:i.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),B$&&(r=U0(document,"touchmove",f=>lV(f),{passive:!1})),Dt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function L0(t){const e=Math.random().toString(36).substring(2,7),n=aV();n.value.set(e,t??!1);const i=G({get:()=>n.value.get(e)??!1,set:r=>n.value.set(e,r)});return KX(()=>{n.value.delete(e)}),i}function W0(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function uf(t){const e=af({dir:ne("ltr")});return G(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function Of(t){const e=Qt(),n=e==null?void 0:e.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(r=>{i[ko(Wt(r))]=(...s)=>t(r,...s)}),i}let td=0;function cV(){Zt(t=>{if(!$s)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??G$()),document.body.insertAdjacentElement("beforeend",e[1]??G$()),td++,t(()=>{td===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),td--})})}function G$(){const t=document.createElement("span");return t.setAttribute("data-reka-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function Tm(t){return G(()=>{var e;return HX(t)?!!((e=ji(t))!=null&&e.closest("form")):!0})}function Me(){const t=Qt(),e=ne(),n=G(()=>{var o,a;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(a=e.value)==null?void 0:a.$el.nextElementSibling:ji(e)}),i=Object.assign({},t.exposed),r={};for(const o in t.props)Object.defineProperty(r,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(i).length>0)for(const o in i)Object.defineProperty(r,o,{enumerable:!0,configurable:!0,get:()=>i[o]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=r;function s(o){e.value=o,o&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=r)}return{forwardRef:s,currentRef:e,currentElement:n}}function Oi(t){const e=Qt(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((r,s)=>{const o=(e==null?void 0:e.type.props[s]).default;return o!==void 0&&(r[s]=o),r},{}),i=sS(t);return G(()=>{const r={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(o=>{r[Wt(o)]=s[o]}),Object.keys({...n,...r}).reduce((o,a)=>(i.value[a]!==void 0&&(o[a]=i.value[a]),o),{})})}function Zn(t,e){const n=Oi(t),i=e?Of(e):{};return G(()=>({...n.value,...i}))}var uV=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ao=new WeakMap,Rc=new WeakMap,Cc={},nd=0,N0=function(t){return t&&(t.host||N0(t.parentNode))},OV=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=N0(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},fV=function(t,e,n,i){var r=OV(e,Array.isArray(t)?t:[t]);Cc[n]||(Cc[n]=new WeakMap);var s=Cc[n],o=[],a=new Set,l=new Set(r),c=function(O){!O||a.has(O)||(a.add(O),c(O.parentNode))};r.forEach(c);var u=function(O){!O||l.has(O)||Array.prototype.forEach.call(O.children,function(f){if(a.has(f))u(f);else try{var d=f.getAttribute(i),h=d!==null&&d!=="false",p=(ao.get(f)||0)+1,$=(s.get(f)||0)+1;ao.set(f,p),s.set(f,$),o.push(f),p===1&&h&&Rc.set(f,!0),$===1&&f.setAttribute(n,"true"),h||f.setAttribute(i,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return u(e),a.clear(),nd++,function(){o.forEach(function(O){var f=ao.get(O)-1,d=s.get(O)-1;ao.set(O,f),s.set(O,d),f||(Rc.has(O)||O.removeAttribute(i),Rc.delete(O)),d||O.removeAttribute(n)}),nd--,nd||(ao=new WeakMap,ao=new WeakMap,Rc=new WeakMap,Cc={})}},dV=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=uV(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),fV(i,r,n,"aria-hidden")):function(){return null}};function j0(t){let e;Re(()=>ji(t),n=>{n?e=dV(n):e&&e()}),Fi(()=>{e&&e()})}let hV=0;function yi(t,e="reka"){if(t)return t;if("useId"in oX)return`${e}-${mu==null?void 0:mu()}`;const n=af({useId:void 0});return n.useId?`${e}-${n.useId()}`:`${e}-${++hV}`}function pV(t){const e=ne(),n=G(()=>{var r;return((r=e.value)==null?void 0:r.width)??0}),i=G(()=>{var r;return((r=e.value)==null?void 0:r.height)??0});return yt(()=>{const r=ji(t);if(r){e.value={width:r.offsetWidth,height:r.offsetHeight};const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,O=Array.isArray(u)?u[0]:u;l=O.inlineSize,c=O.blockSize}else l=r.offsetWidth,c=r.offsetHeight;e.value={width:l,height:c}});return s.observe(r,{box:"border-box"}),()=>s.unobserve(r)}else e.value=void 0}),{width:n,height:i}}function mV(t,e){const n=ne(t);function i(s){return e[n.value][s]??n.value}return{state:n,dispatch:s=>{n.value=i(s)}}}function B0(t){const e=FX("",1e3);return{search:e,handleTypeaheadSearch:(r,s)=>{e.value=e.value+r;{const o=Sn(),a=s.map(f=>{var d,h;return{...f,textValue:((d=f.value)==null?void 0:d.textValue)??((h=f.ref.textContent)==null?void 0:h.trim())??""}}),l=a.find(f=>f.ref===o),c=a.map(f=>f.textValue),u=$V(c,e.value,l==null?void 0:l.textValue),O=a.find(f=>f.textValue===u);return O&&O.ref.focus(),O==null?void 0:O.ref}},resetTypeahead:()=>{e.value=""}}}function gV(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function $V(t,e,n){const r=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=gV(t,Math.max(s,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function QV(t,e){var $;const n=ne({}),i=ne("none"),r=ne(t),s=t.value?"mounted":"unmounted";let o;const a=(($=e.value)==null?void 0:$.ownerDocument.defaultView)??cf,{state:l,dispatch:c}=mV(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=g=>{var b;if($s){const Q=new CustomEvent(g,{bubbles:!1,cancelable:!1});(b=e.value)==null||b.dispatchEvent(Q)}};Re(t,async(g,b)=>{var y;const Q=b!==g;if(await Dt(),Q){const v=i.value,S=Xc(e.value);g?(c("MOUNT"),u("enter"),S==="none"&&u("after-enter")):S==="none"||S==="undefined"||((y=n.value)==null?void 0:y.display)==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):b&&v!==S?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const O=g=>{const b=Xc(e.value),Q=b.includes(g.animationName),y=l.value==="mounted"?"enter":"leave";if(g.target===e.value&&Q&&(u(`after-${y}`),c("ANIMATION_END"),!r.value)){const v=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=a==null?void 0:a.setTimeout(()=>{var S;((S=e.value)==null?void 0:S.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=v)})}g.target===e.value&&b==="none"&&c("ANIMATION_END")},f=g=>{g.target===e.value&&(i.value=Xc(e.value))},d=Re(e,(g,b)=>{g?(n.value=getComputedStyle(g),g.addEventListener("animationstart",f),g.addEventListener("animationcancel",O),g.addEventListener("animationend",O)):(c("ANIMATION_END"),o!==void 0&&(a==null||a.clearTimeout(o)),b==null||b.removeEventListener("animationstart",f),b==null||b.removeEventListener("animationcancel",O),b==null||b.removeEventListener("animationend",O))},{immediate:!0}),h=Re(l,()=>{const g=Xc(e.value);i.value=l.value==="mounted"?g:"none"});return Fi(()=>{d(),h()}),{isPresent:G(()=>["mounted","unmountSuspended"].includes(l.value))}}function Xc(t){return t&&getComputedStyle(t).animationName||"none"}var Jl=M({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var c;const{present:i,forceMount:r}=an(t),s=ne(),{isPresent:o}=QV(i,s);n({present:o});let a=e.default({present:o.value});a=wm(a||[]);const l=Qt();if(a&&(a==null?void 0:a.length)>1){const u=(c=l==null?void 0:l.parent)!=null&&c.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(O=>` - ${O}`).join(` + */const I0=bt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function W$(t){return typeof t=="string"?`'${t}'`:new IX().serialize(t)}const IX=function(){var e;class t{constructor(){t$(this,e,new Map)}compare(i,r){const s=typeof i,o=typeof r;return s==="string"&&o==="string"?i.localeCompare(r):s==="number"&&o==="number"?i-r:String.prototype.localeCompare.call(this.serialize(i,!0),this.serialize(r,!0))}serialize(i,r){if(i===null)return"null";switch(typeof i){case"string":return r?i:`'${i}'`;case"bigint":return`${i}n`;case"object":return this.$object(i);case"function":return this.$function(i)}return String(i)}serializeObject(i){const r=Object.prototype.toString.call(i);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),i);const s=i.constructor,o=s===Object||s===void 0?"":s.name;if(o!==""&&globalThis[o]===s)return this.serializeBuiltInType(o,i);if(typeof i.toJSON=="function"){const a=i.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(i))}serializeBuiltInType(i,r){const s=this["$"+i];if(s)return s.call(this,r);if(typeof(r==null?void 0:r.entries)=="function")return this.serializeObjectEntries(i,r.entries());throw new Error(`Cannot serialize ${i}`)}serializeObjectEntries(i,r){const s=Array.from(r).sort((a,l)=>this.compare(a[0],l[0]));let o=`${i}{`;for(let a=0;athis.compare(r,s)))}`}$Map(i){return this.serializeObjectEntries("Map",i.entries())}}e=new WeakMap;for(const n of["Error","RegExp","URL"])t.prototype["$"+n]=function(i){return`${n}(${i})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join("n,")}${i.length>0?"n":""}]`};return t}();function Hu(t,e){return t===e||W$(t)===W$(e)}function UX(t,e){if(t.length!==e.length)return!1;for(let n=0;n{const a=bn(i,o);if(a||a===null)return a;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(fr(i,o),o)]}function Sn(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function xm(t,e,n){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),i.dispatchEvent(r)}function gl(t){return t==null}function j$(t,e){return gl(t)?!1:Array.isArray(t)?t.some(n=>Hu(n,e)):Hu(t,e)}function wm(t){return t?t.flatMap(e=>e.type===ke?wm(e.children):[e]):[]}const[af,L9]=hn("ConfigProvider");function DX(t,e){var n;const i=gr();return Zt(()=>{i.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),NO(i)}function lf(t){return jl()?(UO(t),!0):!1}function LX(t){let e=!1,n;const i=oa(!0);return(...r)=>(e||(n=i.run(()=>t(...r)),e=!0),n)}function WX(t){let e=0,n,i;const r=()=>{e-=1,i&&e<=0&&(i.stop(),n=void 0,i=void 0)};return(...s)=>(e+=1,i||(i=oa(!0),n=i.run(()=>t(...s))),lf(r),n)}const $s=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const NX=t=>typeof t<"u",jX=Object.prototype.toString,BX=t=>jX.call(t)==="[object Object]",B$=GX();function GX(){var t,e;return $s&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function FX(t){return yt()}function Jf(t){return Array.isArray(t)?t:[t]}function HX(t,e=1e4){return im((n,i)=>{let r=sn(t),s;const o=()=>setTimeout(()=>{r=sn(t),i()},sn(e));return lf(()=>{clearTimeout(s)}),{get(){return n(),r},set(a){r=a,i(),clearTimeout(s),s=o()}}})}const KX=sn;function JX(t,e){FX()&&Js(t,e)}function eV(t,e,n){return Re(t,e,{...n,immediate:!0})}const cf=$s?window:void 0;function ji(t){var e;const n=sn(t);return(e=n==null?void 0:n.$el)!=null?e:n}function U0(...t){const e=[],n=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),r=G(()=>{const a=Jf(sn(t[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),s=eV(()=>{var a,l;return[(l=(a=r.value)==null?void 0:a.map(c=>ji(c)))!=null?l:[cf].filter(c=>c!=null),Jf(sn(r.value?t[1]:t[0])),Jf(m(r.value?t[2]:t[1])),sn(r.value?t[3]:t[2])]},([a,l,c,u])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const O=BX(u)?{...u}:u;e.push(...a.flatMap(f=>l.flatMap(d=>c.map(h=>i(f,d,h,O)))))},{flush:"post"}),o=()=>{s(),n()};return lf(n),o}function D0(){const t=gr(!1),e=yt();return e&&ft(()=>{t.value=!0},e),t}function tV(t){const e=D0();return G(()=>(e.value,!!t()))}function nV(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function iV(...t){let e,n,i={};t.length===3?(e=t[0],n=t[1],i=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],i=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:r=cf,eventName:s="keydown",passive:o=!1,dedupe:a=!1}=i,l=nV(e);return U0(r,s,u=>{u.repeat&&sn(a)||l(u)&&n(u)},o)}function rV(t){return JSON.parse(JSON.stringify(t))}function sV(t,e,n={}){const{window:i=cf,...r}=n;let s;const o=tV(()=>i&&"ResizeObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},l=G(()=>{const O=sn(t);return Array.isArray(O)?O.map(f=>ji(f)):[ji(O)]}),c=Re(l,O=>{if(a(),o.value&&i){s=new ResizeObserver(e);for(const f of O)f&&s.observe(f,r)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return lf(u),{isSupported:o,stop:u}}function os(t,e,n,i={}){var r,s,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:O,shouldEmit:f}=i,d=yt(),h=n||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((o=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let p=c;e||(e="modelValue"),p=p||`update:${e.toString()}`;const $=Q=>a?typeof a=="function"?a(Q):rV(Q):Q,g=()=>NX(t[e])?$(t[e]):O,b=Q=>{f?f(Q)&&h(p,Q):h(p,Q)};if(l){const Q=g(),y=ne(Q);let v=!1;return Re(()=>t[e],S=>{v||(v=!0,y.value=$(S),Dt(()=>v=!1))}),Re(y,S=>{!v&&(S!==t[e]||u)&&b(S)},{deep:u}),y}else return G({get(){return g()},set(Q){b(Q)}})}function ed(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Sh(t,e,n=".",i){if(!ed(e))return Sh(t,{},n,i);const r=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const o=t[s];o!=null&&(i&&i(r,s,o,n)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:ed(o)&&ed(r[s])?r[s]=Sh(o,r[s],(n?`${n}.`:"")+s.toString(),i):r[s]=o))}return r}function oV(t){return(...e)=>e.reduce((n,i)=>Sh(n,i,"",t),{})}const aV=oV(),lV=WX(()=>{const t=ne(new Map),e=ne(),n=G(()=>{for(const o of t.value.values())if(o)return!0;return!1}),i=af({scrollBody:ne(!0)});let r=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",B$&&(r==null||r()),e.value=void 0};return Re(n,(o,a)=>{var O;if(!$s)return;if(!o){a&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=(O=i.scrollBody)!=null&&O.value?typeof i.scrollBody.value=="object"?aV({padding:i.scrollBody.value.padding===!0?l:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?l:i.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),B$&&(r=U0(document,"touchmove",f=>cV(f),{passive:!1})),Dt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function L0(t){const e=Math.random().toString(36).substring(2,7),n=lV();n.value.set(e,t??!1);const i=G({get:()=>n.value.get(e)??!1,set:r=>n.value.set(e,r)});return JX(()=>{n.value.delete(e)}),i}function W0(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function uf(t){const e=af({dir:ne("ltr")});return G(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function Of(t){const e=yt(),n=e==null?void 0:e.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(r=>{i[ko(Wt(r))]=(...s)=>t(r,...s)}),i}let td=0;function uV(){Zt(t=>{if(!$s)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??G$()),document.body.insertAdjacentElement("beforeend",e[1]??G$()),td++,t(()=>{td===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),td--})})}function G$(){const t=document.createElement("span");return t.setAttribute("data-reka-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function Tm(t){return G(()=>{var e;return KX(t)?!!((e=ji(t))!=null&&e.closest("form")):!0})}function Me(){const t=yt(),e=ne(),n=G(()=>{var o,a;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(a=e.value)==null?void 0:a.$el.nextElementSibling:ji(e)}),i=Object.assign({},t.exposed),r={};for(const o in t.props)Object.defineProperty(r,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(i).length>0)for(const o in i)Object.defineProperty(r,o,{enumerable:!0,configurable:!0,get:()=>i[o]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=r;function s(o){e.value=o,o&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=r)}return{forwardRef:s,currentRef:e,currentElement:n}}function Oi(t){const e=yt(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((r,s)=>{const o=(e==null?void 0:e.type.props[s]).default;return o!==void 0&&(r[s]=o),r},{}),i=sS(t);return G(()=>{const r={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(o=>{r[Wt(o)]=s[o]}),Object.keys({...n,...r}).reduce((o,a)=>(i.value[a]!==void 0&&(o[a]=i.value[a]),o),{})})}function Zn(t,e){const n=Oi(t),i=e?Of(e):{};return G(()=>({...n.value,...i}))}var OV=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ao=new WeakMap,Rc=new WeakMap,Cc={},nd=0,N0=function(t){return t&&(t.host||N0(t.parentNode))},fV=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=N0(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},dV=function(t,e,n,i){var r=fV(e,Array.isArray(t)?t:[t]);Cc[n]||(Cc[n]=new WeakMap);var s=Cc[n],o=[],a=new Set,l=new Set(r),c=function(O){!O||a.has(O)||(a.add(O),c(O.parentNode))};r.forEach(c);var u=function(O){!O||l.has(O)||Array.prototype.forEach.call(O.children,function(f){if(a.has(f))u(f);else try{var d=f.getAttribute(i),h=d!==null&&d!=="false",p=(ao.get(f)||0)+1,$=(s.get(f)||0)+1;ao.set(f,p),s.set(f,$),o.push(f),p===1&&h&&Rc.set(f,!0),$===1&&f.setAttribute(n,"true"),h||f.setAttribute(i,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return u(e),a.clear(),nd++,function(){o.forEach(function(O){var f=ao.get(O)-1,d=s.get(O)-1;ao.set(O,f),s.set(O,d),f||(Rc.has(O)||O.removeAttribute(i),Rc.delete(O)),d||O.removeAttribute(n)}),nd--,nd||(ao=new WeakMap,ao=new WeakMap,Rc=new WeakMap,Cc={})}},hV=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=OV(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),dV(i,r,n,"aria-hidden")):function(){return null}};function j0(t){let e;Re(()=>ji(t),n=>{n?e=hV(n):e&&e()}),Fi(()=>{e&&e()})}let pV=0;function yi(t,e="reka"){if(t)return t;if("useId"in aX)return`${e}-${mu==null?void 0:mu()}`;const n=af({useId:void 0});return n.useId?`${e}-${n.useId()}`:`${e}-${++pV}`}function mV(t){const e=ne(),n=G(()=>{var r;return((r=e.value)==null?void 0:r.width)??0}),i=G(()=>{var r;return((r=e.value)==null?void 0:r.height)??0});return ft(()=>{const r=ji(t);if(r){e.value={width:r.offsetWidth,height:r.offsetHeight};const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,O=Array.isArray(u)?u[0]:u;l=O.inlineSize,c=O.blockSize}else l=r.offsetWidth,c=r.offsetHeight;e.value={width:l,height:c}});return s.observe(r,{box:"border-box"}),()=>s.unobserve(r)}else e.value=void 0}),{width:n,height:i}}function gV(t,e){const n=ne(t);function i(s){return e[n.value][s]??n.value}return{state:n,dispatch:s=>{n.value=i(s)}}}function B0(t){const e=HX("",1e3);return{search:e,handleTypeaheadSearch:(r,s)=>{e.value=e.value+r;{const o=Sn(),a=s.map(f=>{var d,h;return{...f,textValue:((d=f.value)==null?void 0:d.textValue)??((h=f.ref.textContent)==null?void 0:h.trim())??""}}),l=a.find(f=>f.ref===o),c=a.map(f=>f.textValue),u=QV(c,e.value,l==null?void 0:l.textValue),O=a.find(f=>f.textValue===u);return O&&O.ref.focus(),O==null?void 0:O.ref}},resetTypeahead:()=>{e.value=""}}}function $V(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function QV(t,e,n){const r=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=$V(t,Math.max(s,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function yV(t,e){var $;const n=ne({}),i=ne("none"),r=ne(t),s=t.value?"mounted":"unmounted";let o;const a=(($=e.value)==null?void 0:$.ownerDocument.defaultView)??cf,{state:l,dispatch:c}=gV(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=g=>{var b;if($s){const Q=new CustomEvent(g,{bubbles:!1,cancelable:!1});(b=e.value)==null||b.dispatchEvent(Q)}};Re(t,async(g,b)=>{var y;const Q=b!==g;if(await Dt(),Q){const v=i.value,S=Xc(e.value);g?(c("MOUNT"),u("enter"),S==="none"&&u("after-enter")):S==="none"||S==="undefined"||((y=n.value)==null?void 0:y.display)==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):b&&v!==S?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const O=g=>{const b=Xc(e.value),Q=b.includes(g.animationName),y=l.value==="mounted"?"enter":"leave";if(g.target===e.value&&Q&&(u(`after-${y}`),c("ANIMATION_END"),!r.value)){const v=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=a==null?void 0:a.setTimeout(()=>{var S;((S=e.value)==null?void 0:S.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=v)})}g.target===e.value&&b==="none"&&c("ANIMATION_END")},f=g=>{g.target===e.value&&(i.value=Xc(e.value))},d=Re(e,(g,b)=>{g?(n.value=getComputedStyle(g),g.addEventListener("animationstart",f),g.addEventListener("animationcancel",O),g.addEventListener("animationend",O)):(c("ANIMATION_END"),o!==void 0&&(a==null||a.clearTimeout(o)),b==null||b.removeEventListener("animationstart",f),b==null||b.removeEventListener("animationcancel",O),b==null||b.removeEventListener("animationend",O))},{immediate:!0}),h=Re(l,()=>{const g=Xc(e.value);i.value=l.value==="mounted"?g:"none"});return Fi(()=>{d(),h()}),{isPresent:G(()=>["mounted","unmountSuspended"].includes(l.value))}}function Xc(t){return t&&getComputedStyle(t).animationName||"none"}var Jl=M({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var c;const{present:i,forceMount:r}=an(t),s=ne(),{isPresent:o}=yV(i,s);n({present:o});let a=e.default({present:o.value});a=wm(a||[]);const l=yt();if(a&&(a==null?void 0:a.length)>1){const u=(c=l==null?void 0:l.parent)!=null&&c.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(O=>` - ${O}`).join(` `)].join(` -`))}return()=>r.value||i.value||o.value?vn(e.default({present:o.value})[0],{ref:u=>{const O=ji(u);return typeof(O==null?void 0:O.hasAttribute)>"u"||(O!=null&&O.hasAttribute("data-reka-popper-content-wrapper")?s.value=O.firstElementChild:s.value=O),O}}):null}});const Ph=M({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var l;if(!n.default)return null;const i=wm(n.default()),r=i.findIndex(c=>c.type!==kt);if(r===-1)return i;const s=i[r];(l=s.props)==null||delete l.ref;const o=s.props?pe(e,s.props):e,a=Qi({...s,props:{}},o);return i.length===1?a:(i[r]=a,i)}}}),yV=["area","img","input"],Ae=M({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const i=t.asChild?"template":t.as;return typeof i=="string"&&yV.includes(i)?()=>vn(i,e):i!=="template"?()=>vn(t.as,e,{default:n.default}):()=>vn(Ph,e,{default:n.default})}});function _h(){const t=ne(),e=G(()=>{var n,i;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(i=t.value)==null?void 0:i.$el.nextElementSibling:ji(t)});return{primitiveElement:t,currentElement:e}}const[Hi,bV]=hn("DialogRoot");var vV=M({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=os(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=ne(),o=ne(),{modal:a}=an(n);return bV({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:o}),(l,c)=>re(l.$slots,"default",{open:m(r),close:()=>r.value=!1})}}),G0=vV,SV=M({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=Hi();return(i,r)=>(w(),D(m(Ae),pe(e,{type:i.as==="button"?"button":void 0,onClick:r[0]||(r[0]=s=>m(n).onOpenChange(!1))}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["type"]))}}),km=SV;const PV="dismissableLayer.pointerDownOutside",_V="dismissableLayer.focusOutside";function F0(t,e){const n=e.closest("[data-dismissable-layer]"),i=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),r=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(i===n||r.indexOf(i){});return Zt(a=>{if(!$s||!sn(n))return;const l=async u=>{const O=u.target;if(!(!(e!=null&&e.value)||!O)){if(F0(e.value,O)){r.value=!1;return}if(u.target&&!r.value){let h=function(){xm(PV,t,d)};var f=h;const d={originalEvent:u};u.pointerType==="touch"?(i.removeEventListener("click",s.value),s.value=h,i.addEventListener("click",s.value,{once:!0})):h()}else i.removeEventListener("click",s.value);r.value=!1}},c=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(c),i.removeEventListener("pointerdown",l),i.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>{sn(n)&&(r.value=!0)}}}function wV(t,e,n=!0){var s;const i=((s=e==null?void 0:e.value)==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=ne(!1);return Zt(o=>{if(!$s||!sn(n))return;const a=async l=>{if(!(e!=null&&e.value))return;await Dt(),await Dt();const c=l.target;!e.value||!c||F0(e.value,c)||l.target&&!r.value&&xm(_V,t,{originalEvent:l})};i.addEventListener("focusin",a),o(()=>i.removeEventListener("focusin",a))}),{onFocusCapture:()=>{sn(n)&&(r.value=!0)},onBlurCapture:()=>{sn(n)&&(r.value=!1)}}}const rr=Sr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var TV=M({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Me(),o=G(()=>{var h;return((h=s.value)==null?void 0:h.ownerDocument)??globalThis.document}),a=G(()=>rr.layersRoot),l=G(()=>s.value?Array.from(a.value).indexOf(s.value):-1),c=G(()=>rr.layersWithOutsidePointerEventsDisabled.size>0),u=G(()=>{const h=Array.from(a.value),[p]=[...rr.layersWithOutsidePointerEventsDisabled].slice(-1),$=h.indexOf(p);return l.value>=$}),O=xV(async h=>{const p=[...rr.branches].some($=>$==null?void 0:$.contains(h.target));!u.value||p||(i("pointerDownOutside",h),i("interactOutside",h),await Dt(),h.defaultPrevented||i("dismiss"))},s),f=wV(h=>{[...rr.branches].some($=>$==null?void 0:$.contains(h.target))||(i("focusOutside",h),i("interactOutside",h),h.defaultPrevented||i("dismiss"))},s);nV("Escape",h=>{l.value===a.value.size-1&&(i("escapeKeyDown",h),h.defaultPrevented||i("dismiss"))});let d;return Zt(h=>{s.value&&(n.disableOutsidePointerEvents&&(rr.layersWithOutsidePointerEventsDisabled.size===0&&(d=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),rr.layersWithOutsidePointerEventsDisabled.add(s.value)),a.value.add(s.value),h(()=>{n.disableOutsidePointerEvents&&rr.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=d)}))}),Zt(h=>{h(()=>{s.value&&(a.value.delete(s.value),rr.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(h,p)=>(w(),D(m(Ae),{ref:m(r),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:Fn({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:m(f).onFocusCapture,onBlurCapture:m(f).onBlurCapture,onPointerdownCapture:m(O).onPointerDownCapture},{default:V(()=>[re(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),H0=TV;const kV=DX(()=>ne([]));function RV(){const t=kV();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=F$(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=F$(t.value,e),(n=t.value[0])==null||n.resume()}}}function F$(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function CV(t){return t.filter(e=>e.tagName!=="A")}const id="focusScope.autoFocusOnMount",rd="focusScope.autoFocusOnUnmount",H$={bubbles:!1,cancelable:!0};function XV(t,{select:e=!1}={}){const n=Sn();for(const i of t)if(Dr(i,{select:e}),Sn()!==n)return!0}function VV(t){const e=K0(t),n=K$(e,t),i=K$(e.reverse(),t);return[n,i]}function K0(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function K$(t,e){for(const n of t)if(!EV(n,{upTo:e}))return n}function EV(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function AV(t){return t instanceof HTMLInputElement&&"select"in t}function Dr(t,{select:e=!1}={}){if(t&&t.focus){const n=Sn();t.focus({preventScroll:!0}),t!==n&&AV(t)&&e&&t.select()}}var qV=M({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,i=e,{currentRef:r,currentElement:s}=Me(),o=ne(null),a=RV(),l=Sr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Zt(u=>{if(!$s)return;const O=s.value;if(!n.trapped)return;function f($){if(l.paused||!O)return;const g=$.target;O.contains(g)?o.value=g:Dr(o.value,{select:!0})}function d($){if(l.paused||!O)return;const g=$.relatedTarget;g!==null&&(O.contains(g)||Dr(o.value,{select:!0}))}function h($){O.contains(o.value)||Dr(O)}document.addEventListener("focusin",f),document.addEventListener("focusout",d);const p=new MutationObserver(h);O&&p.observe(O,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",d),p.disconnect()})}),Zt(async u=>{const O=s.value;if(await Dt(),!O)return;a.add(l);const f=Sn();if(!O.contains(f)){const h=new CustomEvent(id,H$);O.addEventListener(id,p=>i("mountAutoFocus",p)),O.dispatchEvent(h),h.defaultPrevented||(XV(CV(K0(O)),{select:!0}),Sn()===f&&Dr(O))}u(()=>{O.removeEventListener(id,$=>i("mountAutoFocus",$));const h=new CustomEvent(rd,H$),p=$=>{i("unmountAutoFocus",$)};O.addEventListener(rd,p),O.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Dr(f??document.body,{select:!0}),O.removeEventListener(rd,p),a.remove(l)},0)})});function c(u){if(!n.loop&&!n.trapped||l.paused)return;const O=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,f=Sn();if(O&&f){const d=u.currentTarget,[h,p]=VV(d);h&&p?!u.shiftKey&&f===p?(u.preventDefault(),n.loop&&Dr(h,{select:!0})):u.shiftKey&&f===h&&(u.preventDefault(),n.loop&&Dr(p,{select:!0})):f===d&&u.preventDefault()}}return(u,O)=>(w(),D(m(Ae),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:V(()=>[re(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),J0=qV;function ZV(t){return t?"open":"closed"}function J$(t){const e=Sn();for(const n of t)if(n===e||(n.focus(),Sn()!==e))return}var zV=M({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=Hi(),{forwardRef:s,currentElement:o}=Me();return r.titleId||(r.titleId=yi(void 0,"reka-dialog-title")),r.descriptionId||(r.descriptionId=yi(void 0,"reka-dialog-description")),yt(()=>{r.contentElement=o,Sn()!==document.body&&(r.triggerElement.value=Sn())}),(a,l)=>(w(),D(m(J0),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>i("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>i("closeAutoFocus",c))},{default:V(()=>[R(m(H0),pe({id:m(r).contentId,ref:m(s),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(r).descriptionId,"aria-labelledby":m(r).titleId,"data-state":m(ZV)(m(r).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>m(r).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>i("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>i("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>i("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>i("pointerDownOutside",c))}),{default:V(()=>[re(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),e1=zV,YV=M({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=Hi(),s=Of(i),{forwardRef:o,currentElement:a}=Me();return j0(a),(l,c)=>(w(),D(e1,pe({...n,...m(s)},{ref:m(o),"trap-focus":m(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(u.preventDefault(),(O=m(r).triggerElement.value)==null||O.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const O=u.detail.originalEvent,f=O.button===0&&O.ctrlKey===!0;(O.button===2||f)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:V(()=>[re(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),MV=YV,IV=M({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=Of(e);Me();const s=Hi(),o=ne(!1),a=ne(!1);return(l,c)=>(w(),D(e1,pe({...n,...m(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(o.value||(O=m(s).triggerElement.value)==null||O.focus(),u.preventDefault()),o.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=u=>{var d;u.defaultPrevented||(o.value=!0,u.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const O=u.target;((d=m(s).triggerElement.value)==null?void 0:d.contains(O))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&a.value&&u.preventDefault()})}),{default:V(()=>[re(l.$slots,"default")]),_:3},16))}}),UV=IV,DV=M({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=Hi(),s=Of(i),{forwardRef:o}=Me();return(a,l)=>(w(),D(m(Jl),{present:a.forceMount||m(r).open.value},{default:V(()=>[m(r).modal.value?(w(),D(MV,pe({key:0,ref:m(o)},{...n,...m(s),...a.$attrs}),{default:V(()=>[re(a.$slots,"default")]),_:3},16)):(w(),D(UV,pe({key:1,ref:m(o)},{...n,...m(s),...a.$attrs}),{default:V(()=>[re(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),t1=DV,LV=M({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(t){const e=t;Me();const n=Hi();return(i,r)=>(w(),D(m(Ae),pe(e,{id:m(n).descriptionId}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["id"]))}}),n1=LV,WV=M({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Hi();return L0(!0),Me(),(n,i)=>(w(),D(m(Ae),{as:n.as,"as-child":n.asChild,"data-state":m(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:V(()=>[re(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),NV=WV,jV=M({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Hi(),{forwardRef:n}=Me();return(i,r)=>{var s;return(s=m(e))!=null&&s.modal.value?(w(),D(m(Jl),{key:0,present:i.forceMount||m(e).open.value},{default:V(()=>[R(NV,pe(i.$attrs,{ref:m(n),as:i.as,"as-child":i.asChild}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):ge("v-if",!0)}}}),i1=jV,BV=M({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=D0();return(n,i)=>m(e)||n.forceMount?(w(),D(sm,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[re(n.$slots,"default")],8,["to","disabled","defer"])):ge("v-if",!0)}}),r1=BV,GV=M({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(w(),D(m(r1),Hs(gs(e)),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),s1=GV,FV=M({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(t){const e=t,n=Hi();return Me(),(i,r)=>(w(),D(m(Ae),pe(e,{id:m(n).titleId}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["id"]))}}),o1=FV,HV=M({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=Hi(),{forwardRef:i,currentElement:r}=Me();return n.contentId||(n.contentId=yi(void 0,"reka-dialog-content")),yt(()=>{n.triggerElement.value=r.value}),(s,o)=>(w(),D(m(Ae),pe(e,{ref:m(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":m(n).open.value||!1,"aria-controls":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).open.value?"open":"closed",onClick:m(n).onOpenToggle}),{default:V(()=>[re(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),KV=HV;const eQ="data-reka-collection-item";function Qs(t={}){const{key:e="",isProvider:n=!1}=t,i=`${e}CollectionProvider`;let r;if(n){const u=ne(new Map);r={collectionRef:ne(),itemMap:u},fr(i,r)}else r=bn(i);const s=(u=!1)=>{const O=r.collectionRef.value;if(!O)return[];const f=Array.from(O.querySelectorAll(`[${eQ}]`)),h=Array.from(r.itemMap.value.values()).sort((p,$)=>f.indexOf(p.ref)-f.indexOf($.ref));return u?h:h.filter(p=>p.ref.dataset.disabled!=="")},o=M({name:"CollectionSlot",setup(u,{slots:O}){const{primitiveElement:f,currentElement:d}=_h();return Re(d,()=>{r.collectionRef.value=d.value}),()=>vn(Ph,{ref:f},O)}}),a=M({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:O,attrs:f}){const{primitiveElement:d,currentElement:h}=_h();return Zt(p=>{if(h.value){const $=Bl(h.value);r.itemMap.value.set($,{ref:h.value,value:u.value}),p(()=>r.itemMap.value.delete($))}}),()=>vn(Ph,{...f,[eQ]:"",ref:d},O)}}),l=G(()=>Array.from(r.itemMap.value.values())),c=G(()=>r.itemMap.value.size);return{getItems:s,reactiveItems:l,itemMapSize:c,CollectionSlot:o,CollectionItem:a}}const JV="rovingFocusGroup.onEntryFocus",e5={bubbles:!1,cancelable:!0},t5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function n5(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function i5(t,e,n){const i=n5(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return t5[i]}function a1(t,e=!1){const n=Sn();for(const i of t)if(i===n||(i.focus({preventScroll:e}),Sn()!==n))return}function r5(t,e){return t.map((n,i)=>t[(e+i)%t.length])}const[s5,o5]=hn("RovingFocusGroup");var a5=M({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const i=t,r=n,{loop:s,orientation:o,dir:a}=an(i),l=uf(a),c=os(i,"currentTabStopId",r,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),u=ne(!1),O=ne(!1),f=ne(0),{getItems:d,CollectionSlot:h}=Qs({isProvider:!0});function p(g){const b=!O.value;if(g.currentTarget&&g.target===g.currentTarget&&b&&!u.value){const Q=new CustomEvent(JV,e5);if(g.currentTarget.dispatchEvent(Q),r("entryFocus",Q),!Q.defaultPrevented){const y=d().map(x=>x.ref).filter(x=>x.dataset.disabled!==""),v=y.find(x=>x.getAttribute("data-active")===""),S=y.find(x=>x.id===c.value),P=[v,S,...y].filter(Boolean);a1(P,i.preventScrollOnEntryFocus)}}O.value=!1}function $(){setTimeout(()=>{O.value=!1},1)}return e({getItems:d}),o5({loop:s,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(g,b)=>(w(),D(m(h),null,{default:V(()=>[R(m(Ae),{tabindex:u.value||f.value===0?-1:0,"data-orientation":m(o),as:g.as,"as-child":g.asChild,dir:m(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=Q=>O.value=!0),onMouseup:$,onFocus:p,onBlur:b[1]||(b[1]=Q=>u.value=!1)},{default:V(()=>[re(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),l5=a5,c5=M({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=s5(),i=yi(),r=G(()=>e.tabStopId||i),s=G(()=>n.currentTabStopId.value===r.value),{getItems:o,CollectionItem:a}=Qs();yt(()=>{e.focusable&&n.onFocusableItemAdd()}),Fi(()=>{e.focusable&&n.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=i5(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!e.allowShiftKey&&c.shiftKey)return;c.preventDefault();let O=[...o().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")O.reverse();else if(u==="prev"||u==="next"){u==="prev"&&O.reverse();const f=O.indexOf(c.currentTarget);O=n.loop.value?r5(O,f+1):O.slice(f+1)}Dt(()=>a1(O))}}return(c,u)=>(w(),D(m(a),null,{default:V(()=>[R(m(Ae),{tabindex:s.value?0:-1,"data-orientation":m(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=O=>{c.focusable?m(n).onItemFocus(r.value):O.preventDefault()}),onFocus:u[1]||(u[1]=O=>m(n).onItemFocus(r.value)),onKeydown:l},{default:V(()=>[re(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),l1=c5,u5=M({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(w(),D(m(Ae),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:V(()=>[re(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),c1=u5,O5=M({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:i}=_h(),r=G(()=>e.checked??e.value);return Re(r,(s,o)=>{if(!i.value)return;const a=i.value,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(u&&s!==o){const O=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});u.call(a,s),a.dispatchEvent(O),a.dispatchEvent(f)}}),(s,o)=>(w(),D(c1,pe({ref_key:"primitiveElement",ref:n},{...e,...s.$attrs},{as:"input"}),null,16))}}),tQ=O5,f5=M({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,n=G(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=G(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((r,s)=>typeof r=="object"?Object.entries(r).map(([o,a])=>({name:`${e.name}[${s}][${o}]`,value:a})):{name:`${e.name}[${s}]`,value:r}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([r,s])=>({name:`${e.name}[${r}]`,value:s})):[]);return(r,s)=>(w(),B(ke,null,[ge(" We render single input if it's required "),n.value?(w(),D(tQ,pe({key:r.name},{...e,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(w(!0),B(ke,{key:1},xt(i.value,o=>(w(),D(tQ,pe({key:o.name},{ref_for:!0},{...e,...r.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),u1=f5;const[d5,I9]=hn("CheckboxGroupRoot");function Ku(t){return t==="indeterminate"}function O1(t){return Ku(t)?"indeterminate":t?"checked":"unchecked"}const[h5,p5]=hn("CheckboxRoot");var m5=M({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String],required:!1},modelValue:{type:[Boolean,String,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Me(),o=d5(null),a=os(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),l=G(()=>(o==null?void 0:o.disabled.value)||n.disabled),c=G(()=>gl(o==null?void 0:o.modelValue.value)?a.value==="indeterminate"?"indeterminate":a.value:j$(o.modelValue.value,n.value));function u(){if(gl(o==null?void 0:o.modelValue.value))a.value=Ku(a.value)?!0:!a.value;else{const d=[...o.modelValue.value||[]];if(j$(d,n.value)){const h=d.findIndex(p=>Hu(p,n.value));d.splice(h,1)}else d.push(n.value);o.modelValue.value=d}}const O=Tm(s),f=G(()=>{var d;return n.id&&s.value?(d=document.querySelector(`[for="${n.id}"]`))==null?void 0:d.innerText:void 0});return p5({disabled:l,state:c}),(d,h)=>{var p,$;return w(),D(JO((p=m(o))!=null&&p.rovingFocus.value?m(l1):m(Ae)),pe(d.$attrs,{id:d.id,ref:m(r),role:"checkbox","as-child":d.asChild,as:d.as,type:d.as==="button"?"button":void 0,"aria-checked":m(Ku)(c.value)?"mixed":c.value,"aria-required":d.required,"aria-label":d.$attrs["aria-label"]||f.value,"data-state":m(O1)(c.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:($=m(o))!=null&&$.rovingFocus.value?!l.value:void 0,onKeydown:sf(on(()=>{},["prevent"]),["enter"]),onClick:u}),{default:V(()=>[re(d.$slots,"default",{modelValue:m(a),state:c.value}),m(O)&&d.name&&!m(o)?(w(),D(m(u1),{key:0,type:"checkbox",checked:!!c.value,name:d.name,value:d.value,disabled:l.value,required:d.required},null,8,["checked","name","value","disabled","required"])):ge("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),g5=m5,$5=M({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const{forwardRef:e}=Me(),n=h5();return(i,r)=>(w(),D(m(Jl),{present:i.forceMount||m(Ku)(m(n).state.value)||m(n).state.value===!0},{default:V(()=>[R(m(Ae),pe({ref:m(e),"data-state":m(O1)(m(n).state.value),"data-disabled":m(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),Q5=$5;const[f1,y5]=hn("PopperRoot");var b5=M({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=ne();return y5({anchor:e,onAnchorChange:n=>e.value=n}),(n,i)=>re(n.$slots,"default")}}),v5=b5,S5=M({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Me(),r=f1();return $m(()=>{r.onAnchorChange(e.reference??i.value)}),(s,o)=>(w(),D(m(Ae),{ref:m(n),as:s.as,"as-child":s.asChild},{default:V(()=>[re(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),P5=S5;function _5(t){return t!==null}function x5(t){return{name:"transformOrigin",options:t,fn(e){var $,g,b;const{placement:n,rects:i,middlewareData:r}=e,o=(($=r.arrow)==null?void 0:$.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=xh(n),O={start:"0%",center:"50%",end:"100%"}[u],f=(((g=r.arrow)==null?void 0:g.x)??0)+a/2,d=(((b=r.arrow)==null?void 0:b.y)??0)+l/2;let h="",p="";return c==="bottom"?(h=o?O:`${f}px`,p=`${-l}px`):c==="top"?(h=o?O:`${f}px`,p=`${i.floating.height+l}px`):c==="right"?(h=`${-l}px`,p=o?O:`${d}px`):c==="left"&&(h=`${i.floating.width+l}px`,p=o?O:`${d}px`),{data:{x:h,y:p}}}}}function xh(t){const[e,n="center"]=t.split("-");return[e,n]}const w5=["top","right","bottom","left"],as=Math.min,Wn=Math.max,Ju=Math.round,Vc=Math.floor,Di=t=>({x:t,y:t}),T5={left:"right",right:"left",bottom:"top",top:"bottom"},k5={start:"end",end:"start"};function wh(t,e,n){return Wn(t,as(e,n))}function wr(t,e){return typeof t=="function"?t(e):t}function Tr(t){return t.split("-")[0]}function ca(t){return t.split("-")[1]}function Rm(t){return t==="x"?"y":"x"}function Cm(t){return t==="y"?"height":"width"}function zi(t){return["top","bottom"].includes(Tr(t))?"y":"x"}function Xm(t){return Rm(zi(t))}function R5(t,e,n){n===void 0&&(n=!1);const i=ca(t),r=Xm(t),s=Cm(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=eO(o)),[o,eO(o)]}function C5(t){const e=eO(t);return[Th(t),e,Th(e)]}function Th(t){return t.replace(/start|end/g,e=>k5[e])}function X5(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function V5(t,e,n,i){const r=ca(t);let s=X5(Tr(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(Th)))),s}function eO(t){return t.replace(/left|right|bottom|top/g,e=>T5[e])}function E5(t){return{top:0,right:0,bottom:0,left:0,...t}}function d1(t){return typeof t!="number"?E5(t):{top:t,right:t,bottom:t,left:t}}function tO(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function nQ(t,e,n){let{reference:i,floating:r}=t;const s=zi(e),o=Xm(e),a=Cm(o),l=Tr(e),c=s==="y",u=i.x+i.width/2-r.width/2,O=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:O};break;case"left":d={x:i.x-r.width,y:O};break;default:d={x:i.x,y:i.y}}switch(ca(e)){case"start":d[o]-=f*(n&&c?-1:1);break;case"end":d[o]+=f*(n&&c?-1:1);break}return d}const A5=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:O}=nQ(c,i,l),f=i,d={},h=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=wr(t,e)||{};if(c==null)return{};const O=d1(u),f={x:n,y:i},d=Xm(r),h=Cm(d),p=await o.getDimensions(c),$=d==="y",g=$?"top":"left",b=$?"bottom":"right",Q=$?"clientHeight":"clientWidth",y=s.reference[h]+s.reference[d]-f[d]-s.floating[h],v=f[d]-s.reference[d],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let P=S?S[Q]:0;(!P||!await(o.isElement==null?void 0:o.isElement(S)))&&(P=a.floating[Q]||s.floating[h]);const x=y/2-v/2,C=P/2-p[h]/2-1,Z=as(O[g],C),W=as(O[b],C),E=Z,te=P-p[h]-W,se=P/2-p[h]/2+x,le=wh(E,se,te),F=!l.arrow&&ca(r)!=null&&se!==le&&s.reference[h]/2-(sese<=0)){var W,E;const se=(((W=s.flip)==null?void 0:W.index)||0)+1,le=P[se];if(le&&(!(O==="alignment"?b!==zi(le):!1)||Z.every(z=>z.overflows[0]>0&&zi(z.placement)===b)))return{data:{index:se,overflows:Z},reset:{placement:le}};let F=(E=Z.filter(I=>I.overflows[0]<=0).sort((I,z)=>I.overflows[1]-z.overflows[1])[0])==null?void 0:E.placement;if(!F)switch(d){case"bestFit":{var te;const I=(te=Z.filter(z=>{if(S){const J=zi(z.placement);return J===b||J==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(J=>J>0).reduce((J,ue)=>J+ue,0)]).sort((z,J)=>z[1]-J[1])[0])==null?void 0:te[0];I&&(F=I);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function iQ(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function rQ(t){return w5.some(e=>t[e]>=0)}const z5=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=wr(t,e);switch(i){case"referenceHidden":{const s=await $l(e,{...r,elementContext:"reference"}),o=iQ(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:rQ(o)}}}case"escaped":{const s=await $l(e,{...r,altBoundary:!0}),o=iQ(s,n.floating);return{data:{escapedOffsets:o,escaped:rQ(o)}}}default:return{}}}}};async function Y5(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Tr(n),a=ca(n),l=zi(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,O=wr(e,t);let{mainAxis:f,crossAxis:d,alignmentAxis:h}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return a&&typeof h=="number"&&(d=a==="end"?h*-1:h),l?{x:d*u,y:f*c}:{x:f*c,y:d*u}}const M5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await Y5(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},I5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:$=>{let{x:g,y:b}=$;return{x:g,y:b}}},...l}=wr(t,e),c={x:n,y:i},u=await $l(e,l),O=zi(Tr(r)),f=Rm(O);let d=c[f],h=c[O];if(s){const $=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=d+u[$],Q=d-u[g];d=wh(b,d,Q)}if(o){const $=O==="y"?"top":"left",g=O==="y"?"bottom":"right",b=h+u[$],Q=h-u[g];h=wh(b,h,Q)}const p=a.fn({...e,[f]:d,[O]:h});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[f]:s,[O]:o}}}}}},U5=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=wr(t,e),u={x:n,y:i},O=zi(r),f=Rm(O);let d=u[f],h=u[O];const p=wr(a,e),$=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const Q=f==="y"?"height":"width",y=s.reference[f]-s.floating[Q]+$.mainAxis,v=s.reference[f]+s.reference[Q]-$.mainAxis;dv&&(d=v)}if(c){var g,b;const Q=f==="y"?"width":"height",y=["top","left"].includes(Tr(r)),v=s.reference[O]-s.floating[Q]+(y&&((g=o.offset)==null?void 0:g[O])||0)+(y?0:$.crossAxis),S=s.reference[O]+s.reference[Q]+(y?0:((b=o.offset)==null?void 0:b[O])||0)-(y?$.crossAxis:0);hS&&(h=S)}return{[f]:d,[O]:h}}}},D5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=wr(t,e),u=await $l(e,c),O=Tr(r),f=ca(r),d=zi(r)==="y",{width:h,height:p}=s.floating;let $,g;O==="top"||O==="bottom"?($=O,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=O,$=f==="end"?"top":"bottom");const b=p-u.top-u.bottom,Q=h-u.left-u.right,y=as(p-u[$],b),v=as(h-u[g],Q),S=!e.middlewareData.shift;let P=y,x=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(x=Q),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(P=b),S&&!f){const Z=Wn(u.left,0),W=Wn(u.right,0),E=Wn(u.top,0),te=Wn(u.bottom,0);d?x=h-2*(Z!==0||W!==0?Z+W:Wn(u.left,u.right)):P=p-2*(E!==0||te!==0?E+te:Wn(u.top,u.bottom))}await l({...e,availableWidth:x,availableHeight:P});const C=await o.getDimensions(a.floating);return h!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}};function ff(){return typeof window<"u"}function eo(t){return Vm(t)?(t.nodeName||"").toLowerCase():"#document"}function Bn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ki(t){var e;return(e=(Vm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Vm(t){return ff()?t instanceof Node||t instanceof Bn(t).Node:!1}function bi(t){return ff()?t instanceof Element||t instanceof Bn(t).Element:!1}function Bi(t){return ff()?t instanceof HTMLElement||t instanceof Bn(t).HTMLElement:!1}function sQ(t){return!ff()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Bn(t).ShadowRoot}function ec(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=vi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function L5(t){return["table","td","th"].includes(eo(t))}function df(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Em(t){const e=Am(),n=bi(t)?vi(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function W5(t){let e=ls(t);for(;Bi(e)&&!Wo(e);){if(Em(e))return e;if(df(e))return null;e=ls(e)}return null}function Am(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wo(t){return["html","body","#document"].includes(eo(t))}function vi(t){return Bn(t).getComputedStyle(t)}function hf(t){return bi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ls(t){if(eo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||sQ(t)&&t.host||Ki(t);return sQ(e)?e.host:e}function h1(t){const e=ls(t);return Wo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Bi(e)&&ec(e)?e:h1(e)}function Ql(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=h1(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=Bn(r);if(s){const a=kh(o);return e.concat(o,o.visualViewport||[],ec(r)?r:[],a&&n?Ql(a):[])}return e.concat(r,Ql(r,[],n))}function kh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function p1(t){const e=vi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Bi(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=Ju(n)!==s||Ju(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function qm(t){return bi(t)?t:t.contextElement}function Vo(t){const e=qm(t);if(!Bi(e))return Di(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=p1(e);let o=(s?Ju(n.width):n.width)/i,a=(s?Ju(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const N5=Di(0);function m1(t){const e=Bn(t);return!Am()||!e.visualViewport?N5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function j5(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Bn(t)?!1:e}function Ls(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=qm(t);let o=Di(1);e&&(i?bi(i)&&(o=Vo(i)):o=Vo(t));const a=j5(s,n,i)?m1(s):Di(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,O=r.height/o.y;if(s){const f=Bn(s),d=i&&bi(i)?Bn(i):i;let h=f,p=kh(h);for(;p&&i&&d!==h;){const $=Vo(p),g=p.getBoundingClientRect(),b=vi(p),Q=g.left+(p.clientLeft+parseFloat(b.paddingLeft))*$.x,y=g.top+(p.clientTop+parseFloat(b.paddingTop))*$.y;l*=$.x,c*=$.y,u*=$.x,O*=$.y,l+=Q,c+=y,h=Bn(p),p=kh(h)}}return tO({width:u,height:O,x:l,y:c})}function Zm(t,e){const n=hf(t).scrollLeft;return e?e.left+n:Ls(Ki(t)).left+n}function g1(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:Zm(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function B5(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=Ki(i),a=e?df(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Di(1);const u=Di(0),O=Bi(i);if((O||!O&&!s)&&((eo(i)!=="body"||ec(o))&&(l=hf(i)),Bi(i))){const d=Ls(i);c=Vo(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}const f=o&&!O&&!s?g1(o,l,!0):Di(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function G5(t){return Array.from(t.getClientRects())}function F5(t){const e=Ki(t),n=hf(t),i=t.ownerDocument.body,r=Wn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Wn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Zm(t);const a=-n.scrollTop;return vi(i).direction==="rtl"&&(o+=Wn(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function H5(t,e){const n=Bn(t),i=Ki(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=Am();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function K5(t,e){const n=Ls(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Bi(t)?Vo(t):Di(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function oQ(t,e,n){let i;if(e==="viewport")i=H5(t,n);else if(e==="document")i=F5(Ki(t));else if(bi(e))i=K5(e,n);else{const r=m1(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return tO(i)}function $1(t,e){const n=ls(t);return n===e||!bi(n)||Wo(n)?!1:vi(n).position==="fixed"||$1(n,e)}function J5(t,e){const n=e.get(t);if(n)return n;let i=Ql(t,[],!1).filter(a=>bi(a)&&eo(a)!=="body"),r=null;const s=vi(t).position==="fixed";let o=s?ls(t):t;for(;bi(o)&&!Wo(o);){const a=vi(o),l=Em(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ec(o)&&!l&&$1(t,o))?i=i.filter(u=>u!==o):r=a,o=ls(o)}return e.set(t,i),i}function eE(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?df(e)?[]:J5(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const O=oQ(e,u,r);return c.top=Wn(O.top,c.top),c.right=as(O.right,c.right),c.bottom=as(O.bottom,c.bottom),c.left=Wn(O.left,c.left),c},oQ(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tE(t){const{width:e,height:n}=p1(t);return{width:e,height:n}}function nE(t,e,n){const i=Bi(e),r=Ki(e),s=n==="fixed",o=Ls(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Di(0);function c(){l.x=Zm(r)}if(i||!i&&!s)if((eo(e)!=="body"||ec(r))&&(a=hf(e)),i){const d=Ls(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&c();s&&!i&&r&&c();const u=r&&!i&&!s?g1(r,a):Di(0),O=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:O,y:f,width:o.width,height:o.height}}function sd(t){return vi(t).position==="static"}function aQ(t,e){if(!Bi(t)||vi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ki(t)===n&&(n=n.ownerDocument.body),n}function Q1(t,e){const n=Bn(t);if(df(t))return n;if(!Bi(t)){let r=ls(t);for(;r&&!Wo(r);){if(bi(r)&&!sd(r))return r;r=ls(r)}return n}let i=aQ(t,e);for(;i&&L5(i)&&sd(i);)i=aQ(i,e);return i&&Wo(i)&&sd(i)&&!Em(i)?n:i||W5(t)||n}const iE=async function(t){const e=this.getOffsetParent||Q1,n=this.getDimensions,i=await n(t.floating);return{reference:nE(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function rE(t){return vi(t).direction==="rtl"}const sE={convertOffsetParentRelativeRectToViewportRelativeRect:B5,getDocumentElement:Ki,getClippingRect:eE,getOffsetParent:Q1,getElementRects:iE,getClientRects:G5,getDimensions:tE,getScale:Vo,isElement:bi,isRTL:rE};function y1(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function oE(t,e){let n=null,i;const r=Ki(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:O,width:f,height:d}=c;if(a||e(),!f||!d)return;const h=Vc(O),p=Vc(r.clientWidth-(u+f)),$=Vc(r.clientHeight-(O+d)),g=Vc(u),Q={rootMargin:-h+"px "+-p+"px "+-$+"px "+-g+"px",threshold:Wn(0,as(1,l))||1};let y=!0;function v(S){const P=S[0].intersectionRatio;if(P!==l){if(!y)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!y1(c,t.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(v,{...Q,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,Q)}n.observe(t)}return o(!0),s}function aE(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=qm(t),u=r||s?[...c?Ql(c):[],...Ql(e)]:[];u.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const O=c&&a?oE(c,n):null;let f=-1,d=null;o&&(d=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var Q;(Q=d)==null||Q.observe(e)})),n()}),c&&!l&&d.observe(c),d.observe(e));let h,p=l?Ls(t):null;l&&$();function $(){const g=Ls(t);p&&!y1(p,g)&&n(),p=g,h=requestAnimationFrame($)}return n(),()=>{var g;u.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),O==null||O(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const lE=M5,cE=I5,lQ=Z5,uE=D5,OE=z5,fE=q5,dE=U5,hE=(t,e,n)=>{const i=new Map,r={platform:sE,...n},s={...r.platform,_c:i};return A5(t,e,{...r,platform:s})};function pE(t){return t!=null&&typeof t=="object"&&"$el"in t}function Rh(t){if(pE(t)){const e=t.$el;return Vm(e)&&eo(e)==="#comment"?null:e}return t}function po(t){return typeof t=="function"?t():m(t)}function mE(t){return{name:"arrow",options:t,fn(e){const n=Rh(po(t.element));return n==null?{}:fE({element:n,padding:t.padding}).fn(e)}}}function b1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cQ(t,e){const n=b1(t);return Math.round(e*n)/n}function gE(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,r=G(()=>{var P;return(P=po(n.open))!=null?P:!0}),s=G(()=>po(n.middleware)),o=G(()=>{var P;return(P=po(n.placement))!=null?P:"bottom"}),a=G(()=>{var P;return(P=po(n.strategy))!=null?P:"absolute"}),l=G(()=>{var P;return(P=po(n.transform))!=null?P:!0}),c=G(()=>Rh(t.value)),u=G(()=>Rh(e.value)),O=ne(0),f=ne(0),d=ne(a.value),h=ne(o.value),p=gr({}),$=ne(!1),g=G(()=>{const P={position:d.value,left:"0",top:"0"};if(!u.value)return P;const x=cQ(u.value,O.value),C=cQ(u.value,f.value);return l.value?{...P,transform:"translate("+x+"px, "+C+"px)",...b1(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:x+"px",top:C+"px"}});let b;function Q(){if(c.value==null||u.value==null)return;const P=r.value;hE(c.value,u.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(x=>{O.value=x.x,f.value=x.y,d.value=x.strategy,h.value=x.placement,p.value=x.middlewareData,$.value=P!==!1})}function y(){typeof b=="function"&&(b(),b=void 0)}function v(){if(y(),i===void 0){Q();return}if(c.value!=null&&u.value!=null){b=i(c.value,u.value,Q);return}}function S(){r.value||($.value=!1)}return Re([s,o,a,r],Q,{flush:"sync"}),Re([c,u],v,{flush:"sync"}),Re(r,S,{flush:"sync"}),jl()&&UO(y),{x:ks(O),y:ks(f),strategy:ks(d),placement:ks(h),middlewareData:ks(p),isPositioned:ks($),floatingStyles:g,update:Q}}const $E={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[U9,QE]=hn("PopperContent");var yE=M({inheritAttrs:!1,__name:"PopperContent",props:CS({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...$E}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,r=f1(),{forwardRef:s,currentElement:o}=Me(),a=ne(),l=ne(),{width:c,height:u}=pV(l),O=G(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=G(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=G(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=G(()=>({padding:f.value,boundary:d.value.filter(_5),altBoundary:d.value.length>0})),p=G(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),$=UX(()=>[lE({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&lQ({...h.value,...p.value}),n.avoidCollisions&&cE({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?dE():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&lQ({...h.value,...p.value}),uE({...h.value,apply:({elements:E,rects:te,availableWidth:se,availableHeight:le})=>{const{width:F,height:I}=te.reference,z=E.floating.style;z.setProperty("--reka-popper-available-width",`${se}px`),z.setProperty("--reka-popper-available-height",`${le}px`),z.setProperty("--reka-popper-anchor-width",`${F}px`),z.setProperty("--reka-popper-anchor-height",`${I}px`)}}),l.value&&mE({element:l.value,padding:n.arrowPadding}),x5({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&OE({strategy:"referenceHidden",...h.value})]),g=G(()=>n.reference??r.anchor.value),{floatingStyles:b,placement:Q,isPositioned:y,middlewareData:v}=gE(g,a,{strategy:n.positionStrategy,placement:O,whileElementsMounted:(...E)=>aE(...E,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:$}),S=G(()=>xh(Q.value)[0]),P=G(()=>xh(Q.value)[1]);$m(()=>{y.value&&i("placed")});const x=G(()=>{var E;return((E=v.value.arrow)==null?void 0:E.centerOffset)!==0}),C=ne("");Zt(()=>{o.value&&(C.value=window.getComputedStyle(o.value).zIndex)});const Z=G(()=>{var E;return((E=v.value.arrow)==null?void 0:E.x)??0}),W=G(()=>{var E;return((E=v.value.arrow)==null?void 0:E.y)??0});return QE({placedSide:S,onArrowChange:E=>l.value=E,arrowX:Z,arrowY:W,shouldHideArrow:x}),(E,te)=>{var se,le,F;return w(),B("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Fn({...m(b),transform:m(y)?m(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:C.value,"--reka-popper-transform-origin":[(se=m(v).transformOrigin)==null?void 0:se.x,(le=m(v).transformOrigin)==null?void 0:le.y].join(" "),...((F=m(v).hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[R(m(Ae),pe({ref:m(s)},E.$attrs,{"as-child":n.asChild,as:E.as,"data-side":S.value,"data-align":P.value,style:{animation:m(y)?void 0:"none"}}),{default:V(()=>[re(E.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),bE=yE;function v1(t){const e=af({nonce:ne()});return G(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}var vE=M({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const e=t;return Me(),(n,i)=>(w(),D(m(Ae),pe(e,{onMousedown:i[0]||(i[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),SE=vE,PE=M({__name:"PaginationEllipsis",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Me(),(n,i)=>(w(),D(m(Ae),pe(e,{"data-type":"ellipsis"}),{default:V(()=>[re(n.$slots,"default",{},()=>[i[0]||(i[0]=_e("…"))])]),_:3},16))}}),_E=PE;const[pf,xE]=hn("PaginationRoot");var wE=M({__name:"PaginationRoot",props:{page:{type:Number,required:!1},defaultPage:{type:Number,required:!1,default:1},itemsPerPage:{type:Number,required:!0},total:{type:Number,required:!1,default:0},siblingCount:{type:Number,required:!1,default:2},disabled:{type:Boolean,required:!1},showEdges:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:page"],setup(t,{emit:e}){const n=t,i=e,{siblingCount:r,disabled:s,showEdges:o}=an(n);Me();const a=os(n,"page",i,{defaultValue:n.defaultPage,passive:n.page===void 0}),l=G(()=>Math.max(1,Math.ceil(n.total/(n.itemsPerPage||1))));return xE({page:a,onPageChange(c){a.value=c},pageCount:l,siblingCount:r,disabled:s,showEdges:o}),(c,u)=>(w(),D(m(Ae),{as:c.as,"as-child":c.asChild},{default:V(()=>[re(c.$slots,"default",{page:m(a),pageCount:l.value})]),_:3},8,["as","as-child"]))}}),TE=wE;function qr(t,e){const n=e-t+1;return Array.from({length:n},(i,r)=>r+t)}function kE(t){return t.map(e=>typeof e=="number"?{type:"page",value:e}:{type:"ellipsis"})}const Ec="ellipsis";function RE(t,e,n,i){const s=e,o=Math.max(t-n,1),a=Math.min(t+n,s);if(i){const c=Math.min(2*n+5,e)-2,u=o>3&&Math.abs(s-c-1+1)>2&&Math.abs(o-1)>2,O=a2&&Math.abs(s-a)>2;if(!u&&O)return[...qr(1,c),Ec,s];if(u&&!O){const d=qr(s-c+1,s);return[1,Ec,...d]}if(u&&O){const d=qr(o,a);return[1,Ec,...d,Ec,s]}return qr(1,s)}else{const l=n*2+1;return ekE(RE(n.page.value,n.pageCount.value,n.siblingCount.value,n.showEdges.value)));return(r,s)=>(w(),D(m(Ae),Hs(gs(e)),{default:V(()=>[re(r.$slots,"default",{items:i.value})]),_:3},16))}}),XE=CE,VE=M({__name:"PaginationListItem",props:{value:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=pf(),i=G(()=>n.page.value===e.value),r=G(()=>n.disabled.value);return(s,o)=>(w(),D(m(Ae),pe(e,{"data-type":"page","aria-label":`Page ${s.value}`,"aria-current":i.value?"page":void 0,"data-selected":i.value?"true":void 0,disabled:r.value,type:s.as==="button"?"button":void 0,onClick:o[0]||(o[0]=a=>!r.value&&m(n).onPageChange(s.value))}),{default:V(()=>[re(s.$slots,"default",{},()=>[_e(H(s.value),1)])]),_:3},16,["aria-label","aria-current","data-selected","disabled","type"]))}}),EE=VE,AE=M({__name:"PaginationNext",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=pf(),i=G(()=>n.page.value===n.pageCount.value||n.disabled.value);return(r,s)=>(w(),D(m(Ae),pe(e,{"aria-label":"Next Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value+1))}),{default:V(()=>[re(r.$slots,"default",{},()=>[s[1]||(s[1]=_e("Next page"))])]),_:3},16,["type","disabled"]))}}),qE=AE,ZE=M({__name:"PaginationPrev",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=pf(),i=G(()=>n.page.value===1||n.disabled.value);return(r,s)=>(w(),D(m(Ae),pe(e,{"aria-label":"Previous Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value-1))}),{default:V(()=>[re(r.$slots,"default",{},()=>[s[1]||(s[1]=_e("Prev page"))])]),_:3},16,["type","disabled"]))}}),zE=ZE,YE=M({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(t){const e=t,n=ne();return Re(()=>e.value,(i,r)=>{const s=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==r&&a&&n.value){const l=new Event("change",{bubbles:!0});a.call(n.value,i),n.value.dispatchEvent(l)}}),(i,r)=>(w(),D(m(c1),{"as-child":""},{default:V(()=>[U("select",pe({ref_key:"selectElement",ref:n},e),[re(i.$slots,"default")],16)]),_:3}))}}),ME=YE;const IE=[" ","Enter","ArrowUp","ArrowDown"],UE=[" ","Enter"],di=10;function nO(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(i=>Ch(i,e,n)):Ch(t,e,n)}function Ch(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?(t==null?void 0:t[n])===(e==null?void 0:e[n]):Hu(t,e)}function DE(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const LE={key:0,value:""},[to,S1]=hn("SelectRoot");var WE=M({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,i=e,{required:r,disabled:s,multiple:o,dir:a}=an(n),l=os(n,"modelValue",i,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),c=os(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=ne(),O=ne(),f=ne({x:0,y:0}),d=G(()=>{var Q;return o.value&&Array.isArray(l.value)?((Q=l.value)==null?void 0:Q.length)===0:gl(l.value)});Qs({isProvider:!0});const h=uf(a),p=Tm(u),$=ne(new Set),g=G(()=>Array.from($.value).map(Q=>Q.value).join(";"));function b(Q){if(o.value){const y=Array.isArray(l.value)?[...l.value]:[],v=y.findIndex(S=>Ch(S,Q,n.by));v===-1?y.push(Q):y.splice(v,1),l.value=[...y]}else l.value=Q}return S1({triggerElement:u,onTriggerChange:Q=>{u.value=Q},valueElement:O,onValueElementChange:Q=>{O.value=Q},contentId:"",modelValue:l,onValueChange:b,by:n.by,open:c,multiple:o,required:r,onOpenChange:Q=>{c.value=Q},dir:h,triggerPointerDownPosRef:f,disabled:s,isEmptyModelValue:d,optionsSet:$,onOptionAdd:Q=>$.value.add(Q),onOptionRemove:Q=>$.value.delete(Q)}),(Q,y)=>(w(),D(m(v5),null,{default:V(()=>[re(Q.$slots,"default",{modelValue:m(l),open:m(c)}),m(p)?(w(),D(ME,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:m(o),required:m(r),name:Q.name,autocomplete:Q.autocomplete,disabled:m(s),value:m(l)},{default:V(()=>[m(gl)(m(l))?(w(),B("option",LE)):ge("v-if",!0),(w(!0),B(ke,null,xt(Array.from($.value),v=>(w(),B("option",pe({key:v.value??""},{ref_for:!0},v),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):ge("v-if",!0)]),_:3}))}}),NE=WE,jE=M({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:di},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const n=Oi(t);return(i,r)=>(w(),D(m(bE),pe(m(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:V(()=>[re(i.$slots,"default")]),_:3},16))}}),BE=jE;const GE={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[no,P1]=hn("SelectContent");var FE=M({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=to();cV(),L0(n.bodyLock);const{CollectionSlot:s,getItems:o}=Qs(),a=ne();j0(a);const{search:l,handleTypeaheadSearch:c}=B0(),u=ne(),O=ne(),f=ne(),d=ne(!1),h=ne(!1),p=ne(!1);function $(){O.value&&a.value&&J$([O.value,a.value])}Re(d,()=>{$()});const{onOpenChange:g,triggerPointerDownPosRef:b}=r;Zt(S=>{if(!a.value)return;let P={x:0,y:0};const x=Z=>{var W,E;P={x:Math.abs(Math.round(Z.pageX)-(((W=b.value)==null?void 0:W.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((E=b.value)==null?void 0:E.y)??0))}},C=Z=>{var W;Z.pointerType!=="touch"&&(P.x<=10&&P.y<=10?Z.preventDefault():(W=a.value)!=null&&W.contains(Z.target)||g(!1),document.removeEventListener("pointermove",x),b.value=null)};b.value!==null&&(document.addEventListener("pointermove",x),document.addEventListener("pointerup",C,{capture:!0,once:!0})),S(()=>{document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",C,{capture:!0})})});function Q(S){const P=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!P&&S.key.length===1&&c(S.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let C=[...o().map(Z=>Z.ref)];if(["ArrowUp","End"].includes(S.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const Z=S.target,W=C.indexOf(Z);C=C.slice(W+1)}setTimeout(()=>J$(C)),S.preventDefault()}}const y=G(()=>n.position==="popper"?n:{}),v=Oi(y.value);return P1({content:a,viewport:u,onViewportChange:S=>{u.value=S},itemRefCallback:(S,P,x)=>{const C=!h.value&&!x,Z=nO(r.modelValue.value,P,r.by);if(r.multiple.value){if(p.value)return;(Z||C)&&(O.value=S,Z&&(p.value=!0))}else(Z||C)&&(O.value=S);C&&(h.value=!0)},selectedItem:O,selectedItemText:f,onItemLeave:()=>{var S;(S=a.value)==null||S.focus()},itemTextRefCallback:(S,P,x)=>{const C=!h.value&&!x;(nO(r.modelValue.value,P,r.by)||C)&&(f.value=S)},focusSelectedItem:$,position:n.position,isPositioned:d,searchRef:l}),(S,P)=>(w(),D(m(s),null,{default:V(()=>[R(m(J0),{"as-child":"",onMountAutoFocus:P[6]||(P[6]=on(()=>{},["prevent"])),onUnmountAutoFocus:P[7]||(P[7]=x=>{var C;i("closeAutoFocus",x),!x.defaultPrevented&&((C=m(r).triggerElement.value)==null||C.focus({preventScroll:!0}),x.preventDefault())})},{default:V(()=>[R(m(H0),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:P[2]||(P[2]=on(()=>{},["prevent"])),onDismiss:P[3]||(P[3]=x=>m(r).onOpenChange(!1)),onEscapeKeyDown:P[4]||(P[4]=x=>i("escapeKeyDown",x)),onPointerDownOutside:P[5]||(P[5]=x=>i("pointerDownOutside",x))},{default:V(()=>[(w(),D(JO(S.position==="popper"?BE:e8),pe({...S.$attrs,...m(v)},{id:m(r).contentId,ref:x=>{a.value=m(ji)(x)},role:"listbox","data-state":m(r).open.value?"open":"closed",dir:m(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:P[0]||(P[0]=on(()=>{},["prevent"])),onPlaced:P[1]||(P[1]=x=>d.value=!0),onKeydown:Q}),{default:V(()=>[re(S.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),HE=FE;const[zm,KE]=hn("SelectItemAlignedPosition");var JE=M({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(t,{emit:e}){const n=t,i=e,{getItems:r}=Qs(),s=to(),o=no(),a=ne(!1),l=ne(!0),c=ne(),{forwardRef:u,currentElement:O}=Me(),{viewport:f,selectedItem:d,selectedItemText:h,focusSelectedItem:p}=o;function $(){if(s.triggerElement.value&&s.valueElement.value&&c.value&&O.value&&(f!=null&&f.value)&&(d!=null&&d.value)&&(h!=null&&h.value)){const Q=s.triggerElement.value.getBoundingClientRect(),y=O.value.getBoundingClientRect(),v=s.valueElement.value.getBoundingClientRect(),S=h.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const Xe=S.left-y.left,it=v.left-Xe,je=Q.left-it,ft=Q.width+je,Ht=Math.max(ft,y.width),wt=window.innerWidth-di,X=N$(it,di,Math.max(di,wt-Ht));c.value.style.minWidth=`${ft}px`,c.value.style.left=`${X}px`}else{const Xe=y.right-S.right,it=window.innerWidth-v.right-Xe,je=window.innerWidth-Q.right-it,ft=Q.width+je,Ht=Math.max(ft,y.width),wt=window.innerWidth-di,X=N$(it,di,Math.max(di,wt-Ht));c.value.style.minWidth=`${ft}px`,c.value.style.right=`${X}px`}const P=r().map(Xe=>Xe.ref),x=window.innerHeight-di*2,C=f.value.scrollHeight,Z=window.getComputedStyle(O.value),W=Number.parseInt(Z.borderTopWidth,10),E=Number.parseInt(Z.paddingTop,10),te=Number.parseInt(Z.borderBottomWidth,10),se=Number.parseInt(Z.paddingBottom,10),le=W+E+C+se+te,F=Math.min(d.value.offsetHeight*5,le),I=window.getComputedStyle(f.value),z=Number.parseInt(I.paddingTop,10),J=Number.parseInt(I.paddingBottom,10),ue=Q.top+Q.height/2-di,Se=x-ue,fe=d.value.offsetHeight/2,Te=d.value.offsetTop+fe,Ee=W+E+Te,Ke=le-Ee;if(Ee<=ue){const Xe=d.value===P[P.length-1];c.value.style.bottom="0px";const it=O.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,je=Math.max(Se,fe+(Xe?J:0)+it+te),ft=Ee+je;c.value.style.height=`${ft}px`}else{const Xe=d.value===P[0];c.value.style.top="0px";const je=Math.max(ue,W+f.value.offsetTop+(Xe?z:0)+fe)+Ke;c.value.style.height=`${je}px`,f.value.scrollTop=Ee-ue+f.value.offsetTop}c.value.style.margin=`${di}px 0`,c.value.style.minHeight=`${F}px`,c.value.style.maxHeight=`${x}px`,i("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=ne("");yt(async()=>{await Dt(),$(),O.value&&(g.value=window.getComputedStyle(O.value).zIndex)});function b(Q){Q&&l.value===!0&&($(),p==null||p(),l.value=!1)}return rV(s.triggerElement,()=>{$()}),KE({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:b}),(Q,y)=>(w(),B("div",{ref_key:"contentWrapperElement",ref:c,style:Fn({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[R(m(Ae),pe({ref:m(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...Q.$attrs,...n}),{default:V(()=>[re(Q.$slots,"default")]),_:3},16)],4))}}),e8=JE,t8=M({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(t){return S1(t.context),P1(GE),(n,i)=>re(n.$slots,"default")}}),n8=t8;const i8={key:1};var r8=M({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Zn(n,e),s=to(),o=ne();yt(()=>{o.value=new DocumentFragment});const a=ne(),l=G(()=>n.forceMount||s.open.value),c=ne(l.value);return Re(l,()=>{setTimeout(()=>c.value=l.value)}),(u,O)=>{var f;return l.value||c.value||(f=a.value)!=null&&f.present?(w(),D(m(Jl),{key:0,ref_key:"presenceRef",ref:a,present:l.value},{default:V(()=>[R(HE,Hs(gs({...m(r),...u.$attrs})),{default:V(()=>[re(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):o.value?(w(),B("div",i8,[(w(),D(sm,{to:o.value},[R(n8,{context:m(s)},{default:V(()=>[re(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):ge("v-if",!0)}}}),s8=r8;const[D9,o8]=hn("SelectGroup");var a8=M({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=yi(void 0,"reka-select-group");return o8({id:n}),(i,r)=>(w(),D(m(Ae),pe({role:"group"},e,{"aria-labelledby":m(n)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),l8=a8,c8=M({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(w(),D(m(Ae),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:V(()=>[re(e.$slots,"default",{},()=>[n[0]||(n[0]=_e("▼"))])]),_:3},8,["as","as-child"]))}}),u8=c8;const[_1,O8]=hn("SelectItem");var f8=M({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=an(n),s=to(),o=no(),{forwardRef:a,currentElement:l}=Me(),{CollectionItem:c}=Qs(),u=G(()=>{var y;return nO((y=s.modelValue)==null?void 0:y.value,n.value,s.by)}),O=ne(!1),f=ne(n.textValue??""),d=yi(void 0,"reka-select-item-text"),h="select.select";async function p(y){if(y.defaultPrevented)return;const v={originalEvent:y,value:n.value};xm(h,$,v)}async function $(y){await Dt(),i("select",y),!y.defaultPrevented&&(r.value||(s.onValueChange(n.value),s.multiple.value||s.onOpenChange(!1)))}async function g(y){var v,S;await Dt(),!y.defaultPrevented&&(r.value?(v=o.onItemLeave)==null||v.call(o):(S=y.currentTarget)==null||S.focus({preventScroll:!0}))}async function b(y){var v;await Dt(),!y.defaultPrevented&&y.currentTarget===Sn()&&((v=o.onItemLeave)==null||v.call(o))}async function Q(y){var S;await Dt(),!(y.defaultPrevented||((S=o.searchRef)==null?void 0:S.value)!==""&&y.key===" ")&&(UE.includes(y.key)&&p(y),y.key===" "&&y.preventDefault())}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return yt(()=>{l.value&&o.itemRefCallback(l.value,n.value,n.disabled)}),O8({value:n.value,disabled:r,textId:d,isSelected:u,onItemTextChange:y=>{f.value=((f.value||(y==null?void 0:y.textContent))??"").trim()}}),(y,v)=>(w(),D(m(c),{value:{textValue:f.value}},{default:V(()=>[R(m(Ae),{ref:m(a),role:"option","aria-labelledby":m(d),"data-highlighted":O.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":m(r)||void 0,"data-disabled":m(r)?"":void 0,tabindex:m(r)?void 0:-1,as:y.as,"as-child":y.asChild,onFocus:v[0]||(v[0]=S=>O.value=!0),onBlur:v[1]||(v[1]=S=>O.value=!1),onPointerup:p,onPointerdown:v[2]||(v[2]=S=>{S.currentTarget.focus({preventScroll:!0})}),onTouchend:v[3]||(v[3]=on(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:b,onKeydown:Q},{default:V(()=>[re(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),d8=f8,h8=M({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=_1();return(i,r)=>m(n).isSelected.value?(w(),D(m(Ae),pe({key:0,"aria-hidden":"true"},e),{default:V(()=>[re(i.$slots,"default")]),_:3},16)):ge("v-if",!0)}}),p8=h8,m8=M({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=to(),i=no(),r=_1(),{forwardRef:s,currentElement:o}=Me(),a=G(()=>{var l,c;return{value:r.value,disabled:r.disabled.value,textContent:((l=o.value)==null?void 0:l.textContent)??((c=r.value)==null?void 0:c.toString())??""}});return yt(()=>{o.value&&(r.onItemTextChange(o.value),i.itemTextRefCallback(o.value,r.value,r.disabled.value),n.onOptionAdd(a.value))}),Fi(()=>{n.onOptionRemove(a.value)}),(l,c)=>(w(),D(m(Ae),pe({id:m(r).textId,ref:m(s)},{...e,...l.$attrs}),{default:V(()=>[re(l.$slots,"default")]),_:3},16,["id"]))}}),g8=m8,$8=M({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(w(),D(m(r1),Hs(gs(e)),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),Q8=$8,y8=M({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{getItems:i}=Qs(),r=no(),s=ne(null);function o(){s.value!==null&&(window.clearInterval(s.value),s.value=null)}Zt(()=>{const c=i().map(u=>u.ref).find(u=>u===Sn());c==null||c.scrollIntoView({block:"nearest"})});function a(){s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}function l(){var c;(c=r.onItemLeave)==null||c.call(r),s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}return Js(()=>o()),(c,u)=>{var O;return w(),D(m(Ae),pe({"aria-hidden":"true",style:{flexShrink:0}},(O=c.$parent)==null?void 0:O.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:V(()=>[re(c.$slots,"default")]),_:3},16)}}}),x1=y8,b8=M({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=no(),n=e.position==="item-aligned"?zm():void 0,{forwardRef:i,currentElement:r}=Me(),s=ne(!1);return Zt(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){const f=u.scrollHeight-u.clientHeight;s.value=Math.ceil(u.scrollTop)u.removeEventListener("scroll",O))}}),Re(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(w(),D(x1,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:V(()=>[re(o.$slots,"default")]),_:3},512)):ge("v-if",!0)}}),v8=b8,S8=M({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=no(),n=e.position==="item-aligned"?zm():void 0,{forwardRef:i,currentElement:r}=Me(),s=ne(!1);return Zt(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){s.value=u.scrollTop>0};var a=O;const u=e.viewport.value;O(),u.addEventListener("scroll",O),o(()=>u.removeEventListener("scroll",O))}}),Re(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(w(),D(x1,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:V(()=>[re(o.$slots,"default")]),_:3},512)):ge("v-if",!0)}}),P8=S8,_8=M({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=to(),{forwardRef:i,currentElement:r}=Me(),s=G(()=>{var f;return((f=n.disabled)==null?void 0:f.value)||e.disabled});n.contentId||(n.contentId=yi(void 0,"reka-select-content")),yt(()=>{n.onTriggerChange(r.value)});const{getItems:o}=Qs(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=B0();function u(){s.value||(n.onOpenChange(!0),c())}function O(f){u(),n.triggerPointerDownPosRef.value={x:Math.round(f.pageX),y:Math.round(f.pageY)}}return(f,d)=>(w(),D(m(P5),{"as-child":"",reference:f.reference},{default:V(()=>{var h,p,$,g;return[R(m(Ae),{ref:m(i),role:"combobox",type:f.as==="button"?"button":void 0,"aria-controls":m(n).contentId,"aria-expanded":m(n).open.value||!1,"aria-required":(h=m(n).required)==null?void 0:h.value,"aria-autocomplete":"none",disabled:s.value,dir:(p=m(n))==null?void 0:p.dir.value,"data-state":($=m(n))!=null&&$.open.value?"open":"closed","data-disabled":s.value?"":void 0,"data-placeholder":m(DE)((g=m(n).modelValue)==null?void 0:g.value)?"":void 0,"as-child":f.asChild,as:f.as,onClick:d[0]||(d[0]=b=>{var Q;(Q=b==null?void 0:b.currentTarget)==null||Q.focus()}),onPointerdown:d[1]||(d[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const Q=b.target;Q.hasPointerCapture(b.pointerId)&&Q.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(O(b),b.preventDefault())}),onPointerup:d[2]||(d[2]=on(b=>{b.pointerType==="touch"&&O(b)},["prevent"])),onKeydown:d[3]||(d[3]=b=>{const Q=m(a)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&Q&&b.key===" "||(m(l)(b.key,m(o)()),m(IE).includes(b.key)&&(u(),b.preventDefault()))})},{default:V(()=>[re(f.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),x8=_8,w8=M({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Me(),r=to();yt(()=>{r.valueElement=i});const s=G(()=>{var u;let a=[];const l=Array.from(r.optionsSet.value),c=O=>l.find(f=>nO(O,f.value,r.by));return Array.isArray(r.modelValue.value)?a=r.modelValue.value.map(O=>{var f;return((f=c(O))==null?void 0:f.textContent)??""}):a=[((u=c(r.modelValue.value))==null?void 0:u.textContent)??""],a.filter(Boolean)}),o=G(()=>s.value.length?s.value.join(", "):e.placeholder);return(a,l)=>(w(),D(m(Ae),{ref:m(n),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":s.value.length?void 0:e.placeholder},{default:V(()=>[re(a.$slots,"default",{selectedLabel:s.value,modelValue:m(r).modelValue.value},()=>[_e(H(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),T8=w8,k8=M({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{nonce:n}=an(e),i=v1(n),r=no(),s=r.position==="item-aligned"?zm():void 0,{forwardRef:o,currentElement:a}=Me();yt(()=>{r==null||r.onViewportChange(a.value)});const l=ne(0);function c(u){const O=u.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:d}=s??{};if(f!=null&&f.value&&(d!=null&&d.value)){const h=Math.abs(l.value-O.scrollTop);if(h>0){const p=window.innerHeight-di*2,$=Number.parseFloat(d.value.style.minHeight),g=Number.parseFloat(d.value.style.height),b=Math.max($,g);if(b0?v:0,d.value.style.justifyContent="flex-end")}}}l.value=O.scrollTop}return(u,O)=>(w(),B(ke,null,[R(m(Ae),pe({ref:m(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:V(()=>[re(u.$slots,"default")]),_:3},16),R(m(Ae),{as:"style",nonce:m(i)},{default:V(()=>O[0]||(O[0]=[_e(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),R8=k8;function Ye(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}function w1(t,e=document){var i;if(!Kl)return null;if(e instanceof HTMLElement&&((i=e==null?void 0:e.dataset)==null?void 0:i.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function mf(t,e=document){if(!Kl)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function T1(t,e,n=document){return Kl?yl(t,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e)??null:null}function yl(t,e=document){return Kl?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function C8(t,e,n,i=document){var c,u;const r=mf(e,i),s=yl(t,i),o=r?s.indexOf(r):-1,a=((c=n[o])==null?void 0:c.id)??null,l=((u=n[o+1])==null?void 0:u.id)??null;return[a,l]}function k1(t){return t.type==="keydown"}function R1(t){return t.type.startsWith("mouse")}function C1(t){return t.type.startsWith("touch")}function gf(t){if(R1(t))return{x:t.clientX,y:t.clientY};if(C1(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function X1(t,e){const n=t==="horizontal",{x:i,y:r}=gf(e);return n?i:r}function X8(t,e,n,i,r){const s=n==="horizontal",o=mf(e,r);Ye(o);const a=o.getAttribute("data-panel-group-id");Ye(a);const{initialCursorPosition:l}=i,c=X1(n,t),u=w1(a,r);Ye(u);const O=u.getBoundingClientRect(),f=s?O.width:O.height;return(c-l)/f*100}function V8(t,e,n,i,r,s){if(k1(t)){const o=n==="horizontal";let a=0;t.shiftKey?a=100:a=r??10;let l=0;switch(t.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return i==null?0:X8(t,e,n,i,s)}function E8({layout:t,panelsArray:e,pivotIndices:n}){let i=0,r=100,s=0,o=0;const a=n[0];Ye(a!=null),e.forEach((O,f)=>{const{constraints:d}=O,{maxSize:h=100,minSize:p=0}=d;f===a?(i=p,r=h):(s+=p,o+=h)});const l=Math.min(r,100-s),c=Math.max(i,100-o),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function A8({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(s=>s.constraints);let i=0,r=100;for(let s=0;s{const s=t[r];Ye(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:c=0,collapsible:u}=a,O=n[l];if(O==null||i!==O){n[l]=i;const{onCollapse:f,onExpand:d,onResize:h}=o;h&&h(i,O),u&&(f||d)&&(d&&(O==null||O===c)&&i!==c&&d(),f&&(O==null||O!==c)&&i===c&&f())}})}function q8(t,e=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...r)},e)}}const Ym=10;function bl(t,e,n=Ym){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const i=t-e;return i===0?0:i>0?1:-1}function Dn(t,e,n){return bl(t,e,n)===0}function bo({panelConstraints:t,panelIndex:e,size:n}){const i=t[e];Ye(i!=null);const{collapsedSize:r=0,collapsible:s,maxSize:o=100,minSize:a=0}=i;if(bl(n,a)<0)if(s){const l=(r+a)/2;bl(n,l)<0?n=r:n=a}else n=a;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed(Ym)),n}function Ac(t,e){if(t.length!==e.length)return!1;for(let n=0;n0&&(t=t<0?0-$:$)}}}{const u=t<0?o:a,O=n[u];Ye(O);const{collapsible:f}=O;if(f){const d=e[u];Ye(d!=null);const h=n[u];Ye(h);const{collapsedSize:p=0,minSize:$=0}=h;if(Dn(d,$)){const g=d-p;bl(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const u=t<0?1:-1;let O=t<0?a:o,f=0;for(;;){const h=e[O];Ye(h!=null);const $=bo({panelConstraints:n,panelIndex:O,size:100})-h;if(f+=$,O+=u,O<0||O>=n.length)break}const d=Math.min(Math.abs(t),Math.abs(f));t=t<0?0-d:d}{let O=t<0?o:a;for(;O>=0&&O=0))break;t<0?O--:O++}}if(Dn(l,0))return e;{const u=t<0?a:o,O=e[u];Ye(O!=null);const f=O+l,d=bo({panelConstraints:n,panelIndex:u,size:f});if(s[u]=d,!Dn(d,f)){let h=f-d,$=t<0?a:o;for(;$>=0&&$0?$--:$++}}}const c=s.reduce((u,O)=>O+u,0);return Dn(c,100)?s:e}function V1(t,e,n){const i=T1(t,e,n);return i!=null?[i,i+1]:[-1,-1]}function Z8(t,e,n){return t.xe.x&&t.ye.y}function z8(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:fQ(t),b:fQ(e)};let i;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),i=t;Ye(i);const r={a:OQ(uQ(n.a)),b:OQ(uQ(n.b))};if(r.a===r.b){const s=i.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(r.a-r.b)}const Y8=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function M8(t){const e=getComputedStyle(E1(t)).display;return e==="flex"||e==="inline-flex"}function I8(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||M8(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Y8.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function uQ(t){let e=t.length;for(;e--;){const n=t[e];if(Ye(n),I8(n))return n}return null}function OQ(t){return t&&Number(getComputedStyle(t).zIndex)||0}function fQ(t){const e=[];for(;t;)e.push(t),t=E1(t);return e}function E1(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}const A1=1,q1=2,Z1=4,z1=8;function U8(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const D8=U8()==="coarse",cs=[];let $f=!1;const Fr=new Map,Qf=new Map,vl=new Set;function L8(t,e,n,i,r,s){const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:i,nonce:r,setResizeHandlerState:s},l=Fr.get(o)??0;return Fr.set(o,l+1),vl.add(a),iO(),function(){Qf.delete(t),vl.delete(a);const u=Fr.get(o)??1;Fr.set(o,u-1),iO(),M1(),u===1&&Fr.delete(o)}}function qc(t){const{target:e}=t,{x:n,y:i}=gf(t);$f=!0,Mm({target:e,x:n,y:i}),iO(),cs.length>0&&(Im("down",t),t.preventDefault())}function Zr(t){const{x:e,y:n}=gf(t);if(!$f){const{target:i}=t;Mm({target:i,x:e,y:n})}Im("move",t),Y1(),cs.length>0&&t.preventDefault()}function zr(t){const{target:e}=t,{x:n,y:i}=gf(t);Qf.clear(),$f=!1,cs.length>0&&t.preventDefault(),Im("up",t),Mm({target:e,x:n,y:i}),Y1(),iO()}function Mm({target:t,x:e,y:n}){cs.splice(0);let i=null;t instanceof HTMLElement&&(i=t),vl.forEach(r=>{const{element:s,hitAreaMargins:o}=r,a=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:O}=a,f=D8?o.coarse:o.fine;if(e>=c-f&&e<=u+f&&n>=O-f&&n<=l+f){if(i!==null&&s!==i&&!s.contains(i)&&!i.contains(s)&&z8(i,s)>0){let h=i,p=!1;for(;h&&!h.contains(s);){if(Z8(h.getBoundingClientRect(),a)){p=!0;break}h=h.parentElement}if(p)return}cs.push(r)}})}function od(t,e){Qf.set(t,e)}function Y1(){let t=!1,e=!1,n;cs.forEach(r=>{const{direction:s,nonce:o}=r;s.value==="horizontal"?t=!0:e=!0,n=o.value});let i=0;Qf.forEach(r=>{i|=r}),t&&e?ad("intersection",i,n):t?ad("horizontal",i,n):e?ad("vertical",i,n):M1()}function iO(){Fr.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",zr),n.removeEventListener("mousedown",qc),n.removeEventListener("mouseleave",Zr),n.removeEventListener("mousemove",Zr),n.removeEventListener("touchmove",Zr),n.removeEventListener("touchstart",qc)}),window.removeEventListener("mouseup",zr),window.removeEventListener("touchcancel",zr),window.removeEventListener("touchend",zr),vl.size>0&&($f?(cs.length>0&&Fr.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",zr),n.addEventListener("mouseleave",Zr),n.addEventListener("mousemove",Zr),n.addEventListener("touchmove",Zr,{passive:!1}))}),window.addEventListener("mouseup",zr),window.addEventListener("touchcancel",zr),window.addEventListener("touchend",zr)):Fr.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",qc),n.addEventListener("mousemove",Zr),n.addEventListener("touchmove",Zr,{passive:!1}),n.addEventListener("touchstart",qc))}))}function Im(t,e){vl.forEach(n=>{const{setResizeHandlerState:i}=n,r=cs.includes(n);i(t,r,e)})}let Xh=null,Hr=null;function W8(t,e){if(e){const n=(e&A1)!==0,i=(e&q1)!==0,r=(e&Z1)!==0,s=(e&z1)!==0;if(n)return r?"se-resize":s?"ne-resize":"e-resize";if(i)return r?"sw-resize":s?"nw-resize":"w-resize";if(r)return"s-resize";if(s)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function M1(){Hr!==null&&(document.head.removeChild(Hr),Xh=null,Hr=null)}function ad(t,e,n){const i=W8(t,e);Xh!==i&&(Xh=i,Hr===null&&(Hr=document.createElement("style"),n&&(Hr.nonce=n),document.head.appendChild(Hr)),Hr.innerHTML=`*{cursor: ${i}!important;}`)}function N8({defaultSize:t,dragState:e,layout:n,panelData:i,panelIndex:r,precision:s=3}){const o=n[r];let a;return o==null?a=t!==void 0?t.toPrecision(s):"1":i.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function j8({layout:t,panelConstraints:e}){const n=[...t],i=n.reduce((s,o)=>s+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!Dn(i,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(s=>`${s}%`).join(", ")}. Layout normalization will be applied.`);for(let s=0;s{const a=r.value;if(!a)return;const l=yl(e,a);for(let c=0;c{l.forEach(c=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})})}),Zt(o=>{const a=r.value;if(!a)return;const l=t.value;Ye(l);const{panelDataArray:c}=l,u=w1(e,a);Ye(u!=null,`No group found for id "${e}"`);const O=yl(e,a);Ye(O);const f=O.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Ye(h);const[p,$]=C8(e,h,c,a);if(p==null||$==null)return()=>{};const g=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const Q=c.findIndex(y=>y.id===p);if(Q>=0){const y=c[Q];Ye(y);const v=n.value[Q],{collapsedSize:S=0,collapsible:P,minSize:x=0}=y.constraints;if(v!=null&&P){const C=Ya({delta:Dn(v,S)?x-S:S-v,layout:n.value,panelConstraints:c.map(Z=>Z.constraints),pivotIndices:V1(e,h,a),trigger:"keyboard"});n.value!==C&&s(C)}}break}}};return d.addEventListener("keydown",g),()=>{d.removeEventListener("keydown",g)}});o(()=>{f.forEach(d=>d())})})}function dQ(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function I1(t){return`reka:${t}`}function U1(t){return t.map(e=>{const{constraints:n,id:i,idIsFromProps:r,order:s}=e;return r?i:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function D1(t,e){try{const n=I1(t),i=e.getItem(n);if(i){const r=JSON.parse(i);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function G8(t,e,n){const i=D1(t,n)??{},r=U1(e);return i[r]??null}function F8(t,e,n,i,r){const s=I1(t),o=U1(e),a=D1(t,r)??{};a[o]={expandToSizes:Object.fromEntries(n.entries()),layout:i};try{r.setItem(s,JSON.stringify(a))}catch(l){console.error(l)}}const H8=100,Ma={getItem:t=>(dQ(Ma),Ma.getItem(t)),setItem:(t,e)=>{dQ(Ma),Ma.setItem(t,e)}},[L1,K8]=hn("PanelGroup");var J8=M({__name:"SplitterGroup",props:{id:{type:[String,null],required:!1},autoSaveId:{type:[String,null],required:!1,default:null},direction:{type:String,required:!0},keyboardResizeBy:{type:[Number,null],required:!1,default:10},storage:{type:Object,required:!1,default:()=>Ma},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r={},{direction:s}=an(n),o=yi(n.id,"reka-splitter-group"),a=uf(),{forwardRef:l,currentElement:c}=Me(),u=ne(null),O=ne([]),f=ne({}),d=ne(new Map),h=ne(0),p=G(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:u.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),$=ne({layout:O.value,panelDataArray:[],panelDataArrayChanged:!1}),g=I=>O.value=I;B8({eagerValuesRef:$,groupId:o,layout:O,panelDataArray:$.value.panelDataArray,setLayout:g,panelGroupElement:c}),Zt(()=>{const{panelDataArray:I}=$.value,{autoSaveId:z}=n;if(z){if(O.value.length===0||O.value.length!==I.length)return;let J=r[z];J||(J=q8(F8,H8),r[z]=J);const ue=[...I],Se=new Map(d.value);J(z,ue,Se,O.value,n.storage)}});function b(I,z){const{panelDataArray:J}=$.value,ue=le(J,I);return N8({defaultSize:z,dragState:u.value,layout:O.value,panelData:J,panelIndex:ue})}function Q(I){const{panelDataArray:z}=$.value;z.push(I),z.sort((J,ue)=>{const Se=J.order,fe=ue.order;return Se==null&&fe==null?0:Se==null?-1:fe==null?1:Se-fe}),$.value.panelDataArrayChanged=!0}Re(()=>$.value.panelDataArrayChanged,()=>{if($.value.panelDataArrayChanged){$.value.panelDataArrayChanged=!1;const{autoSaveId:I,storage:z}=p.value,{layout:J,panelDataArray:ue}=$.value;let Se=null;if(I){const Te=G8(I,ue,z);Te&&(d.value=new Map(Object.entries(Te.expandToSizes)),Se=Te.layout)}Se===null&&(Se=A8({panelDataArray:ue}));const fe=j8({layout:Se,panelConstraints:ue.map(Te=>Te.constraints)});IX(J,fe)||(g(fe),$.value.layout=fe,i("layout",fe),xa(ue,fe,f.value))}});function y(I){return function(J){J.preventDefault();const ue=c.value;if(!ue)return()=>null;const{direction:Se,dragState:fe,id:Te,keyboardResizeBy:Ee}=p.value,{layout:Ke,panelDataArray:Ze}=$.value,{initialLayout:Xe}=fe??{},it=V1(Te,I,ue);let je=V8(J,I,Se,fe,Ee,ue);if(je===0)return;const ft=Se==="horizontal";a.value==="rtl"&&ft&&(je=-je);const Ht=Ze.map(q=>q.constraints),wt=Ya({delta:je,layout:Xe??Ke,panelConstraints:Ht,pivotIndices:it,trigger:k1(J)?"keyboard":"mouse-or-touch"}),X=!Ac(Ke,wt);(R1(J)||C1(J))&&h.value!==je&&(h.value=je,X?od(I,0):ft?od(I,je<0?A1:q1):od(I,je<0?Z1:z1)),X&&(g(wt),$.value.layout=wt,i("layout",wt),xa(Ze,wt,f.value))}}function v(I,z){const{layout:J,panelDataArray:ue}=$.value,Se=ue.map(Xe=>Xe.constraints),{panelSize:fe,pivotIndices:Te}=F(ue,I,J);Ye(fe!=null);const Ke=le(ue,I)===ue.length-1?fe-z:z-fe,Ze=Ya({delta:Ke,layout:J,panelConstraints:Se,pivotIndices:Te,trigger:"imperative-api"});Ac(J,Ze)||(g(Ze),$.value.layout=Ze,i("layout",Ze),xa(ue,Ze,f.value))}function S(I,z){const{layout:J,panelDataArray:ue}=$.value,Se=le(ue,I);ue[Se]=I,$.value.panelDataArrayChanged=!0;const{collapsedSize:fe=0,collapsible:Te}=z,{collapsedSize:Ee=0,collapsible:Ke,maxSize:Ze=100,minSize:Xe=0}=I.constraints,{panelSize:it}=F(ue,I,J);it!==null&&(Te&&Ke&&it===fe?fe!==Ee&&v(I,Ee):itZe&&v(I,Ze))}function P(I,z){const{direction:J}=p.value,{layout:ue}=$.value;if(!c.value)return;const Se=mf(I,c.value);Ye(Se);const fe=X1(J,z);u.value={dragHandleId:I,dragHandleRect:Se.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:ue}}function x(){u.value=null}function C(I){const{panelDataArray:z}=$.value,J=le(z,I);J>=0&&(z.splice(J,1),delete f.value[I.id],$.value.panelDataArrayChanged=!0)}function Z(I){const{layout:z,panelDataArray:J}=$.value;if(I.constraints.collapsible){const ue=J.map(Ee=>Ee.constraints),{collapsedSize:Se=0,panelSize:fe,pivotIndices:Te}=F(J,I,z);if(Ye(fe!=null,`Panel size not found for panel "${I.id}"`),fe!==Se){d.value.set(I.id,fe);const Ke=le(J,I)===J.length-1?fe-Se:Se-fe,Ze=Ya({delta:Ke,layout:z,panelConstraints:ue,pivotIndices:Te,trigger:"imperative-api"});Ac(z,Ze)||(g(Ze),$.value.layout=Ze,i("layout",Ze),xa(J,Ze,f.value))}}}function W(I){const{layout:z,panelDataArray:J}=$.value;if(I.constraints.collapsible){const ue=J.map(Ke=>Ke.constraints),{collapsedSize:Se=0,panelSize:fe,minSize:Te=0,pivotIndices:Ee}=F(J,I,z);if(fe===Se){const Ke=d.value.get(I.id),Ze=Ke!=null&&Ke>=Te?Ke:Te,it=le(J,I)===J.length-1?fe-Ze:Ze-fe,je=Ya({delta:it,layout:z,panelConstraints:ue,pivotIndices:Ee,trigger:"imperative-api"});Ac(z,je)||(g(je),$.value.layout=je,i("layout",je),xa(J,je,f.value))}}}function E(I){const{layout:z,panelDataArray:J}=$.value,{panelSize:ue}=F(J,I,z);return Ye(ue!=null,`Panel size not found for panel "${I.id}"`),ue}function te(I){const{layout:z,panelDataArray:J}=$.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=F(J,I,z);return Se?fe===void 0?I.constraints.defaultSize===I.constraints.collapsedSize:fe===ue:!1}function se(I){const{layout:z,panelDataArray:J}=$.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=F(J,I,z);return Ye(fe!=null,`Panel size not found for panel "${I.id}"`),!Se||fe>ue}K8({direction:s,dragState:u.value,groupId:o,reevaluatePanelConstraints:S,registerPanel:Q,registerResizeHandle:y,resizePanel:v,startDragging:P,stopDragging:x,unregisterPanel:C,panelGroupElement:c,collapsePanel:Z,expandPanel:W,isPanelCollapsed:te,isPanelExpanded:se,getPanelSize:E,getPanelStyle:b});function le(I,z){return I.findIndex(J=>J===z||J.id===z.id)}function F(I,z,J){const ue=le(I,z),fe=ue===I.length-1?[ue-1,ue]:[ue,ue+1],Te=J[ue];return{...z.constraints,panelSize:Te,pivotIndices:fe}}return(I,z)=>(w(),D(m(Ae),{ref:m(l),as:I.as,"as-child":I.asChild,style:Fn({display:"flex",flexDirection:m(s)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":m(s),"data-panel-group-id":m(o)},{default:V(()=>[re(I.$slots,"default",{layout:O.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),eA=J8,tA=M({__name:"SplitterPanel",props:{collapsedSize:{type:Number,required:!1},collapsible:{type:Boolean,required:!1},defaultSize:{type:Number,required:!1},id:{type:String,required:!1},maxSize:{type:Number,required:!1},minSize:{type:Number,required:!1},order:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const i=t,r=n,s=L1();if(s===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:a,getPanelSize:l,getPanelStyle:c,isPanelCollapsed:u,resizePanel:O,groupId:f,reevaluatePanelConstraints:d,registerPanel:h,unregisterPanel:p}=s,$=yi(i.id,"reka-splitter-panel"),g=G(()=>({callbacks:{onCollapse:()=>r("collapse"),onExpand:()=>r("expand"),onResize:(...x)=>r("resize",...x)},constraints:{collapsedSize:i.collapsedSize&&Number.parseFloat(i.collapsedSize.toFixed(Ym)),collapsible:i.collapsible,defaultSize:i.defaultSize,maxSize:i.maxSize,minSize:i.minSize},id:$,idIsFromProps:i.id!==void 0,order:i.order}));Re(()=>g.value.constraints,(x,C)=>{(C.collapsedSize!==x.collapsedSize||C.collapsible!==x.collapsible||C.maxSize!==x.maxSize||C.minSize!==x.minSize)&&d(g.value,C)},{deep:!0}),yt(()=>{const x=g.value;h(x),Fi(()=>{p(x)})});const b=G(()=>c(g.value,i.defaultSize)),Q=G(()=>u(g.value)),y=G(()=>!Q.value);function v(){o(g.value)}function S(){a(g.value)}function P(x){O(g.value,x)}return e({collapse:v,expand:S,getSize(){return l(g.value)},resize:P,isCollapsed:Q,isExpanded:y}),(x,C)=>(w(),D(m(Ae),{id:m($),style:Fn(b.value),as:x.as,"as-child":x.asChild,"data-panel":"","data-panel-collapsible":x.collapsible||void 0,"data-panel-group-id":m(f),"data-panel-id":m($),"data-panel-size":Number.parseFloat(`${b.value.flexGrow}`).toFixed(1),"data-state":x.collapsible?Q.value?"collapsed":"expanded":void 0},{default:V(()=>[re(x.$slots,"default",{isCollapsed:Q.value,isExpanded:y.value,expand:S,collapse:v,resize:P})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}}),nA=tA;function iA({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:i}){Zt(r=>{const s=i.value;if(t.value||n.value===null||s===null)return;const o=mf(e,s);if(o==null)return;const a=l=>{var c;if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),(c=n.value)==null||c.call(n,l);break}case"F6":{l.preventDefault();const u=o.getAttribute("data-panel-group-id");Ye(u);const O=yl(u,s),f=T1(u,e,s);Ye(f!==null);const d=l.shiftKey?f>0?f-1:O.length-1:f+1{o.removeEventListener("keydown",a)})})}var rA=M({__name:"SplitterResizeHandle",props:{id:{type:String,required:!1},hitAreaMargins:{type:Object,required:!1},tabindex:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Me(),{disabled:o}=an(n),a=L1();if(a===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:l,groupId:c,registerResizeHandle:u,startDragging:O,stopDragging:f,panelGroupElement:d}=a,h=yi(n.id,"reka-splitter-resize-handle"),p=ne("inactive"),$=ne(!1),g=ne(null),{nonce:b}=an(n),Q=v1(b);return Re(o,()=>{Kl&&(o.value?g.value=null:g.value=u(h))},{immediate:!0}),Zt(y=>{var P,x;if(o.value||g.value===null)return;const v=s.value;if(!v)return;Ye(v);const S=(C,Z,W)=>{var E;if(Z)switch(C){case"down":{p.value="drag",O(h,W),i("dragging",!0);break}case"move":{p.value!=="drag"&&(p.value="hover"),(E=g.value)==null||E.call(g,W);break}case"up":{p.value="hover",f(),i("dragging",!1);break}}else p.value="inactive"};y(L8(h,v,l,{coarse:((P=n.hitAreaMargins)==null?void 0:P.coarse)??15,fine:((x=n.hitAreaMargins)==null?void 0:x.fine)??5},Q,S))}),iA({disabled:o,resizeHandler:g,handleId:h,panelGroupElement:d}),(y,v)=>(w(),D(m(Ae),{id:m(h),ref:m(r),style:{touchAction:"none",userSelect:"none"},as:y.as,"as-child":y.asChild,role:"separator","data-resize-handle":"",tabindex:y.tabindex,"data-state":p.value,"data-disabled":m(o)?"":void 0,"data-orientation":m(l),"data-panel-group-id":m(c),"data-resize-handle-active":p.value==="drag"?"pointer":$.value?"keyboard":void 0,"data-resize-handle-state":p.value,"data-panel-resize-handle-enabled":!m(o),"data-panel-resize-handle-id":m(h),onBlur:v[0]||(v[0]=S=>$.value=!1),onFocus:v[1]||(v[1]=S=>$.value=!1)},{default:V(()=>[re(y.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),sA=rA;const[oA,aA]=hn("SwitchRoot");var lA=M({__name:"SwitchRoot",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=an(n),s=os(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function o(){r.value||(s.value=!s.value)}const{forwardRef:a,currentElement:l}=Me(),c=Tm(l),u=G(()=>{var O;return n.id&&l.value?(O=document.querySelector(`[for="${n.id}"]`))==null?void 0:O.innerText:void 0});return aA({modelValue:s,toggleCheck:o,disabled:r}),(O,f)=>(w(),D(m(Ae),pe(O.$attrs,{id:O.id,ref:m(a),role:"switch",type:O.as==="button"?"button":void 0,value:O.value,"aria-label":O.$attrs["aria-label"]||u.value,"aria-checked":m(s),"aria-required":O.required,"data-state":m(s)?"checked":"unchecked","data-disabled":m(r)?"":void 0,"as-child":O.asChild,as:O.as,disabled:m(r),onClick:o,onKeydown:sf(on(o,["prevent"]),["enter"])}),{default:V(()=>[re(O.$slots,"default",{modelValue:m(s)}),m(c)&&O.name?(w(),D(m(u1),{key:0,type:"checkbox",name:O.name,disabled:m(r),required:O.required,value:O.value,checked:!!m(s)},null,8,["name","disabled","required","value","checked"])):ge("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),cA=lA,uA=M({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=oA();return Me(),(n,i)=>{var r;return w(),D(m(Ae),{"data-state":(r=m(e).modelValue)!=null&&r.value?"checked":"unchecked","data-disabled":m(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:V(()=>[re(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),OA=uA;const[Um,fA]=hn("TabsRoot");var dA=M({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{orientation:r,unmountOnHide:s,dir:o}=an(n),a=uf(o);Me();const l=os(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=ne();return fA({modelValue:l,changeModelValue:u=>{l.value=u},orientation:r,dir:a,unmountOnHide:s,activationMode:n.activationMode,baseId:yi(void 0,"reka-tabs"),tabsList:c}),(u,O)=>(w(),D(m(Ae),{dir:m(a),"data-orientation":m(r),"as-child":u.asChild,as:u.as},{default:V(()=>[re(u.$slots,"default",{modelValue:m(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),hA=dA;function W1(t,e){return`${t}-trigger-${e}`}function N1(t,e){return`${t}-content-${e}`}var pA=M({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=Me(),i=Um(),r=G(()=>W1(i.baseId,e.value)),s=G(()=>N1(i.baseId,e.value)),o=G(()=>e.value===i.modelValue.value),a=ne(o.value);return yt(()=>{requestAnimationFrame(()=>{a.value=!1})}),(l,c)=>(w(),D(m(Jl),{present:l.forceMount||o.value,"force-mount":""},{default:V(({present:u})=>[R(m(Ae),{id:s.value,ref:m(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":m(i).orientation.value,"aria-labelledby":r.value,hidden:!u,tabindex:"0",style:Fn({animationDuration:a.value?"0s":void 0})},{default:V(()=>[!m(i).unmountOnHide.value||u?re(l.$slots,"default",{key:0}):ge("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),mA=pA,gA=M({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{loop:n}=an(e),{forwardRef:i,currentElement:r}=Me(),s=Um();return s.tabsList=r,(o,a)=>(w(),D(m(l5),{"as-child":"",orientation:m(s).orientation.value,dir:m(s).dir.value,loop:m(n)},{default:V(()=>[R(m(Ae),{ref:m(i),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":m(s).orientation.value},{default:V(()=>[re(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),$A=gA,QA=M({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,{forwardRef:n}=Me(),i=Um(),r=G(()=>W1(i.baseId,e.value)),s=G(()=>N1(i.baseId,e.value)),o=G(()=>e.value===i.modelValue.value);return(a,l)=>(w(),D(m(l1),{"as-child":"",focusable:!a.disabled,active:o.value},{default:V(()=>[R(m(Ae),{id:r.value,ref:m(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":s.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":m(i).orientation.value,onMousedown:l[0]||(l[0]=on(c=>{!a.disabled&&c.ctrlKey===!1?m(i).changeModelValue(a.value):c.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=sf(c=>m(i).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const c=m(i).activationMode!=="manual";!o.value&&!a.disabled&&c&&m(i).changeModelValue(a.value)})},{default:V(()=>[re(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),yA=QA;function j1(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e{const e=SA(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(Dm);return a[0]===""&&a.length!==1&&a.shift(),G1(a,e)||vA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},G1=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?G1(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const s=t.join(Dm);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},hQ=/^\[(.+)\]$/,vA=t=>{if(hQ.test(t)){const e=hQ.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},SA=t=>{const{theme:e,classGroups:n}=t,i={nextPart:new Map,validators:[]};for(const r in n)Vh(n[r],i,r,e);return i},Vh=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const s=r===""?e:pQ(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(PA(r)){Vh(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{Vh(o,pQ(e,s),n,i)})})},pQ=(t,e)=>{let n=t;return e.split(Dm).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},PA=t=>t.isThemeGetter,_A=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return r(s,o),o},set(s,o){n.has(s)?n.set(s,o):r(s,o)}}},Eh="!",Ah=":",xA=Ah.length,wA=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=r=>{const s=[];let o=0,a=0,l=0,c;for(let h=0;hl?c-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:O,maybePostfixModifierPosition:d}};if(e){const r=e+Ah,s=i;i=o=>o.startsWith(r)?s(o.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const r=i;i=s=>n({className:s,parseClassName:r})}return i},TA=t=>t.endsWith(Eh)?t.substring(0,t.length-1):t.startsWith(Eh)?t.substring(1):t,kA=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const r=[];let s=[];return i.forEach(o=>{o[0]==="["||e[o]?(r.push(...s.sort(),o),s=[]):s.push(o)}),r.push(...s.sort()),r}},RA=t=>({cache:_A(t.cacheSize),parseClassName:wA(t),sortModifiers:kA(t),...bA(t)}),CA=/\s+/,XA=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:s}=e,o=[],a=t.trim().split(CA);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:O,modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);if(O){l=u+(l.length>0?" "+l:l);continue}let $=!!p,g=i($?h.substring(0,p):h);if(!g){if(!$){l=u+(l.length>0?" "+l:l);continue}if(g=i(h),!g){l=u+(l.length>0?" "+l:l);continue}$=!1}const b=s(f).join(":"),Q=d?b+Eh:b,y=Q+g;if(o.includes(y))continue;o.push(y);const v=r(g,$);for(let S=0;S0?" "+l:l)}return l};function VA(){let t=0,e,n,i="";for(;t{if(typeof t=="string")return t;let e,n="";for(let i=0;iO(u),t());return n=RA(c),i=n.cache.get,r=n.cache.set,s=a,a(l)}function a(l){const c=i(l);if(c)return c;const u=XA(l,n);return r(l,u),u}return function(){return s(VA.apply(null,arguments))}}const Yt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},H1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,K1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AA=/^\d+\/\d+$/,qA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZA=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lo=t=>AA.test(t),ze=t=>!!t&&!Number.isNaN(Number(t)),Yr=t=>!!t&&Number.isInteger(Number(t)),ld=t=>t.endsWith("%")&&ze(t.slice(0,-1)),sr=t=>qA.test(t),IA=()=>!0,UA=t=>ZA.test(t)&&!zA.test(t),J1=()=>!1,DA=t=>YA.test(t),LA=t=>MA.test(t),WA=t=>!ye(t)&&!be(t),NA=t=>ua(t,nP,J1),ye=t=>H1.test(t),ws=t=>ua(t,iP,UA),cd=t=>ua(t,HA,ze),mQ=t=>ua(t,eP,J1),jA=t=>ua(t,tP,LA),Zc=t=>ua(t,rP,DA),be=t=>K1.test(t),wa=t=>Oa(t,iP),BA=t=>Oa(t,KA),gQ=t=>Oa(t,eP),GA=t=>Oa(t,nP),FA=t=>Oa(t,tP),zc=t=>Oa(t,rP,!0),ua=(t,e,n)=>{const i=H1.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},Oa=(t,e,n=!1)=>{const i=K1.exec(t);return i?i[1]?e(i[1]):n:!1},eP=t=>t==="position"||t==="percentage",tP=t=>t==="image"||t==="url",nP=t=>t==="length"||t==="size"||t==="bg-size",iP=t=>t==="length",HA=t=>t==="number",KA=t=>t==="family-name",rP=t=>t==="shadow",JA=()=>{const t=Yt("color"),e=Yt("font"),n=Yt("text"),i=Yt("font-weight"),r=Yt("tracking"),s=Yt("leading"),o=Yt("breakpoint"),a=Yt("container"),l=Yt("spacing"),c=Yt("radius"),u=Yt("shadow"),O=Yt("inset-shadow"),f=Yt("text-shadow"),d=Yt("drop-shadow"),h=Yt("blur"),p=Yt("perspective"),$=Yt("aspect"),g=Yt("ease"),b=Yt("animate"),Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...y(),be,ye],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],x=()=>[be,ye,l],C=()=>[lo,"full","auto",...x()],Z=()=>[Yr,"none","subgrid",be,ye],W=()=>["auto",{span:["full",Yr,be,ye]},Yr,be,ye],E=()=>[Yr,"auto",be,ye],te=()=>["auto","min","max","fr",be,ye],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...x()],I=()=>[lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],z=()=>[t,be,ye],J=()=>[...y(),gQ,mQ,{position:[be,ye]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",GA,NA,{size:[be,ye]}],fe=()=>[ld,wa,ws],Te=()=>["","none","full",c,be,ye],Ee=()=>["",ze,wa,ws],Ke=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Xe=()=>[ze,ld,gQ,mQ],it=()=>["","none",h,be,ye],je=()=>["none",ze,be,ye],ft=()=>["none",ze,be,ye],Ht=()=>[ze,be,ye],wt=()=>[lo,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sr],breakpoint:[sr],color:[IA],container:[sr],"drop-shadow":[sr],ease:["in","out","in-out"],font:[WA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sr],shadow:[sr],spacing:["px",ze],text:[sr],"text-shadow":[sr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lo,ye,be,$]}],container:["container"],columns:[{columns:[ze,ye,be,a]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Yr,"auto",be,ye]}],basis:[{basis:[lo,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,lo,"auto","initial","none",ye]}],grow:[{grow:["",ze,be,ye]}],shrink:[{shrink:["",ze,be,ye]}],order:[{order:[Yr,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[a,"screen",...I()]}],"min-w":[{"min-w":[a,"screen","none",...I()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,wa,ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,be,cd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ld,ye]}],"font-family":[{font:[BA,ye,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,be,ye]}],"line-clamp":[{"line-clamp":[ze,"none",be,cd]}],leading:[{leading:[s,...x()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",be,ws]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ze,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yr,be,ye],radial:["",be,ye],conic:[Yr,be,ye]},FA,jA]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:Ee()}],"border-w-x":[{"border-x":Ee()}],"border-w-y":[{"border-y":Ee()}],"border-w-s":[{"border-s":Ee()}],"border-w-e":[{"border-e":Ee()}],"border-w-t":[{"border-t":Ee()}],"border-w-r":[{"border-r":Ee()}],"border-w-b":[{"border-b":Ee()}],"border-w-l":[{"border-l":Ee()}],"divide-x":[{"divide-x":Ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ke(),"hidden","none"]}],"divide-style":[{divide:[...Ke(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,be,ye]}],"outline-w":[{outline:["",ze,wa,ws]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,zc,Zc]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",O,zc,Zc]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ze,ws]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":Ee()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",f,zc,Zc]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ze,be,ye]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Xe()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Xe()}],"mask-image-t-to-pos":[{"mask-t-to":Xe()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Xe()}],"mask-image-r-to-pos":[{"mask-r-to":Xe()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Xe()}],"mask-image-b-to-pos":[{"mask-b-to":Xe()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Xe()}],"mask-image-l-to-pos":[{"mask-l-to":Xe()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Xe()}],"mask-image-x-to-pos":[{"mask-x-to":Xe()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Xe()}],"mask-image-y-to-pos":[{"mask-y-to":Xe()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":Xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Xe()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Xe()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:it()}],brightness:[{brightness:[ze,be,ye]}],contrast:[{contrast:[ze,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",d,zc,Zc]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ze,be,ye]}],"hue-rotate":[{"hue-rotate":[ze,be,ye]}],invert:[{invert:["",ze,be,ye]}],saturate:[{saturate:[ze,be,ye]}],sepia:[{sepia:["",ze,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":it()}],"backdrop-brightness":[{"backdrop-brightness":[ze,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[ze,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",ze,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[ze,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[ze,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",be,ye]}],ease:[{ease:["linear","initial",g,be,ye]}],delay:[{delay:[ze,be,ye]}],animate:[{animate:["none",b,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,be,ye]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:Ht()}],"skew-x":[{"skew-x":Ht()}],"skew-y":[{"skew-y":Ht()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:wt()}],"translate-x":[{"translate-x":wt()}],"translate-y":[{"translate-y":wt()}],"translate-z":[{"translate-z":wt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ye]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ze,wa,ws,cd]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},e2=EA(JA);function Le(...t){return e2(B1(t))}const t2={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},sP=M({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},nonce:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class","withHandle"),s=Zn(r,i);return(o,a)=>(w(),D(m(sA),pe({"data-slot":"resizable-handle"},m(s),{class:m(Le)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:V(()=>[n.withHandle?(w(),B("div",t2,[R(m(_X),{class:"size-2.5"})])):ge("",!0)]),_:1},16,["class"]))}}),rO=M({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},emits:["collapse","expand","resize"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(nA),pe({"data-slot":"resizable-panel"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),oP=M({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(eA),pe({"data-slot":"resizable-panel-group"},m(s),{class:m(Le)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:V(()=>[re(o.$slots,"default")]),_:3},16,["class"]))}}),n2=M({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(hA),pe({"data-slot":"tabs"},m(s),{class:m(Le)("flex flex-col gap-2",n.class)}),{default:V(()=>[re(o.$slots,"default")]),_:3},16,["class"]))}}),co=M({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(mA),pe({"data-slot":"tabs-content",class:m(Le)("flex-1 outline-none",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),i2=M({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m($A),pe({"data-slot":"tabs-list"},m(n),{class:m(Le)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-b-lg p-[3px]",e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),uo=M({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(yA),pe({"data-slot":"tabs-trigger"},m(i),{class:m(Le)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[re(r.$slots,"default")]),_:3},16,["class"]))}}),$Q=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,QQ=B1,r2=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return QQ(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],O=s==null?void 0:s[c];if(u===null)return null;const f=$Q(u)||$Q(O);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[O,f]=u;return f===void 0||(c[O]=f),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:O,className:f,...d}=u;return Object.entries(d).every(h=>{let[p,$]=h;return Array.isArray($)?$.includes({...s,...a}[p]):{...s,...a}[p]===$})?[...c,O,f]:c},[]);return QQ(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},qt=M({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(t){const e=t;return(n,i)=>(w(),D(m(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:St(m(Le)(m(yf)({variant:n.variant,size:n.size}),e.class))},{default:V(()=>[re(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),yf=r2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Kt=[];for(let t=0;t<256;++t)Kt.push((t+256).toString(16).slice(1));function s2(t,e=0){return(Kt[t[e+0]]+Kt[t[e+1]]+Kt[t[e+2]]+Kt[t[e+3]]+"-"+Kt[t[e+4]]+Kt[t[e+5]]+"-"+Kt[t[e+6]]+Kt[t[e+7]]+"-"+Kt[t[e+8]]+Kt[t[e+9]]+"-"+Kt[t[e+10]]+Kt[t[e+11]]+Kt[t[e+12]]+Kt[t[e+13]]+Kt[t[e+14]]+Kt[t[e+15]]).toLowerCase()}let ud;const o2=new Uint8Array(16);function a2(){if(!ud){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ud=crypto.getRandomValues.bind(crypto)}return ud(o2)}const l2=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yQ={randomUUID:l2};function No(t,e,n){var r;if(yQ.randomUUID&&!t)return yQ.randomUUID();t=t||{};const i=t.random??((r=t.rng)==null?void 0:r.call(t))??a2();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,s2(i)}class aP{constructor(){de(this,"uuid","");de(this,"formula","");de(this,"calcValue","");de(this,"calcValue1","");de(this,"calcValue2","");de(this,"calcValue3","");de(this,"calcValue4","");de(this,"calcValue5","");de(this,"calcValue6","");de(this,"calcValue7","");de(this,"calcValue8","");de(this,"calcValue9","");de(this,"calcValue10","");de(this,"flatRate","");de(this,"value","");de(this,"dependencys",[]);this.uuid=No()}addDependency(e){this.dependencys.push(e)}toJSON(){return{formula:this.formula,calcValue:this.calcValue,calcValue1:this.calcValue1,calcValue2:this.calcValue2,calcValue3:this.calcValue3,calcValue4:this.calcValue4,calcValue5:this.calcValue5,calcValue6:this.calcValue6,calcValue7:this.calcValue7,calcValue8:this.calcValue8,calcValue9:this.calcValue9,calcValue10:this.calcValue10,flatRate:this.flatRate,value:this.value,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.formula=e.formula,this.value=e.value,this.flatRate=e.flatRate,this.calcValue=e.calcValue,this.calcValue1=e.calcValue1,this.calcValue2=e.calcValue2,this.calcValue3=e.calcValue3,this.calcValue4=e.calcValue4,this.calcValue5=e.calcValue5,this.calcValue6=e.calcValue6,this.calcValue7=e.calcValue7,this.calcValue8=e.calcValue8,this.calcValue9=e.calcValue9,this.calcValue10=e.calcValue10,e.dependencys.map(n=>{const i=new fa;i.fromJSON(n),this.dependencys.push(i)})}}class fa{constructor(){de(this,"uuid","");de(this,"relation","");de(this,"formula","");de(this,"borders",[]);this.uuid=No()}addBorder(e){this.borders.push(e)}toJSON(){return{formula:this.formula,relation:this.relation,borders:this.borders.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.relation=e.relation,this.formula=e.formula,e.borders.map(n=>{const i=new aP;i.fromJSON(n),this.borders.push(i)})}}class Ji{constructor(){de(this,"uuid","");de(this,"id","");de(this,"type",1);de(this,"isFocused",!1);de(this,"dependencys",[]);this.uuid=No(),this.id=this.uuid}hasDependencys(){return this.dependencys.length>0}toJSON(){return{id:this.id,type:this.type,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}getIdRecursiv(e){}fromJSON(e){this.id=e.id,this.type=e.type,e.dependencys.map(n=>{const i=new fa;i.fromJSON(n),this.dependencys.push(i)})}changeFocus(e){this.uuid==e?this.isFocused=!0:this.isFocused=!1}addDependency(e){this.dependencys.push(e)}insertItem(e,n){return!1}cutItem(e){return null}deleteItem(e){return!1}}var lP=(t=>(t[t.Product=1]="Product",t[t.CMS=2]="CMS",t[t.News=3]="News",t))(lP||{});class bQ extends Error{constructor(n,i,r){const s=n.status||n.status===0?n.status:"",o=n.statusText||"",a=`${s} ${o}`.trim(),l=a?`status code ${a}`:"an unknown error";super(`Request failed with ${l}: ${i.method} ${i.url}`);de(this,"response");de(this,"request");de(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=r}}class cP extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);de(this,"request");this.name="TimeoutError",this.request=n}}const vQ=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(r){if(r instanceof Error&&r.message==="unsupported BodyInit type")return!1;throw r}return t&&!e})(),c2=typeof globalThis.AbortController=="function",u2=typeof globalThis.ReadableStream=="function",O2=typeof globalThis.FormData=="function",uP=["get","post","put","patch","head","delete"],f2={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Od=2147483647,d2=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,OP=Symbol("stop"),h2={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},p2={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},m2=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,i]of t)e+=d2,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},g2=(t,e)=>{const n=Number(t.headers.get("content-length"))||0;let i=0;return t.status===204?(e&&e({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(r){const s=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function o(){const{done:a,value:l}=await s.read();if(a){r.close();return}if(e){i+=l.byteLength;const c=n===0?0:i/n;e({percent:c,transferredBytes:i,totalBytes:n},l)}r.enqueue(l),await o()}await o()}}),{status:t.status,statusText:t.statusText,headers:t.headers})},$2=(t,e)=>{const n=m2(t.body);let i=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(r){const s=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();async function o(){const{done:a,value:l}=await s.read();if(a){e&&e({percent:1,transferredBytes:i,totalBytes:Math.max(n,i)},new Uint8Array),r.close();return}i+=l.byteLength;let c=n===0?0:i/n;(nt!==null&&typeof t=="object",Yc=(...t)=>{for(const e of t)if((!Ia(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Lm({},...t)},fP=(t={},e={})=>{const n=new globalThis.Headers(t),i=e instanceof globalThis.Headers,r=new globalThis.Headers(e);for(const[s,o]of r.entries())i&&o==="undefined"||o===void 0?n.delete(s):n.set(s,o);return n};function Mc(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:Lm(t[n]??[],e[n]??[])}const dP=(t={},e={})=>({beforeRequest:Mc(t,e,"beforeRequest"),beforeRetry:Mc(t,e,"beforeRetry"),afterResponse:Mc(t,e,"afterResponse"),beforeError:Mc(t,e,"beforeError")}),Lm=(...t)=>{let e={},n={},i={};for(const r of t)if(Array.isArray(r))Array.isArray(e)||(e=[]),e=[...e,...r];else if(Ia(r)){for(let[s,o]of Object.entries(r))Ia(o)&&s in e&&(o=Lm(e[s],o)),e={...e,[s]:o};Ia(r.hooks)&&(i=dP(i,r.hooks),e.hooks=i),Ia(r.headers)&&(n=fP(n,r.headers),e.headers=n)}return e},Q2=t=>uP.includes(t)?t.toUpperCase():t,y2=["get","put","head","delete","options","trace"],b2=[408,413,429,500,502,503,504],v2=[413,429,503],SQ={limit:2,methods:y2,statusCodes:b2,afterStatusCodes:v2,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},S2=(t={})=>{if(typeof t=="number")return{...SQ,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...SQ,...t}};async function P2(t,e,n,i){return new Promise((r,s)=>{const o=setTimeout(()=>{n&&n.abort(),s(new cP(t))},i.timeout);i.fetch(t,e).then(r).catch(s).then(()=>{clearTimeout(o)})})}async function _2(t,{signal:e}){return new Promise((n,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",r,{once:!0}));function r(){clearTimeout(s),i(e.reason)}const s=setTimeout(()=>{e==null||e.removeEventListener("abort",r),n()},t)})}const x2=(t,e)=>{const n={};for(const i in e)!(i in p2)&&!(i in h2)&&!(i in t)&&(n[i]=e[i]);return n};class sO{constructor(e,n={}){de(this,"request");de(this,"abortController");de(this,"_retryCount",0);de(this,"_input");de(this,"_options");var i,r;if(this._input=e,this._options={...n,headers:fP(this._input.headers,n.headers),hooks:dP({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:Q2(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:S2(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(c2){const s=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=s?AbortSignal.any([s,this.abortController.signal]):this.abortController.signal}if(vQ&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((r=(i=this._options).stringifyJson)==null?void 0:r.call(i,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(O2&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!vQ)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=$2(this.request,this._options.onUploadProgress))}}static create(e,n){const i=new sO(e,n),r=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>Od)throw new RangeError(`The \`timeout\` option cannot be greater than ${Od}`);await Promise.resolve();let a=await i._fetch();for(const l of i._options.hooks.afterResponse){const c=await l(i.request,i._options,i._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(i._decorateResponse(a),!a.ok&&i._options.throwHttpErrors){let l=new bQ(a,i.request,i._options);for(const c of i._options.hooks.beforeError)l=await c(l);throw l}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!u2)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return g2(a.clone(),i._options.onDownloadProgress)}return a},o=(i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(r):r()).finally(async()=>{var a;i.request.bodyUsed||await((a=i.request.body)==null?void 0:a.cancel())});for(const[a,l]of Object.entries(f2))o[a]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||l);const c=await o;if(a==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await c.text())}return c[a]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof cP)throw e;if(e instanceof bQ){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(e.response.status)){let r=Number(i)*1e3;Number.isNaN(r)?r=Date.parse(i)-Date.now():r>=Date.parse("2024-01-01")&&(r-=Date.now());const s=this._options.retry.maxRetryAfter??r;return rthis._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){const i=Math.min(this._calculateRetryDelay(n),Od);if(this._retryCount<1)throw n;await _2(i,{signal:this._options.signal});for(const r of this._options.hooks.beforeRetry)if(await r({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===OP)return;return this._retry(e)}}async _fetch(){for(const i of this._options.hooks.beforeRequest){const r=await i(this.request,this._options);if(r instanceof Request){this.request=r;break}if(r instanceof Response)return r}const e=x2(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,e):P2(n,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const qh=t=>{const e=(n,i)=>sO.create(n,Yc(t,i));for(const n of uP)e[n]=(i,r)=>sO.create(i,Yc(t,r,{method:n}));return e.create=n=>qh(Yc(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),qh(Yc(t,n))),e.stop=OP,e},fd=qh(),Hn=fd.create({prefixUrl:"/apps",timeout:1e4,hooks:{afterResponse:[(t,e,n)=>(console.log(n),n),async(t,e,n)=>{if(n.status===403){const i=await fd("https://example.com/token").text();return t.headers.set("Authorization",`token ${i}`),fd(t)}}]}}),w2=async t=>{try{return await(await Hn.post("api/plugin/system/psc/xmlcalc/product/config",{json:{product:t}})).json()}catch(e){throw console.error("Error loading JSON from API:",e),e}},T2=async t=>{try{return await(await Hn.post("api/plugin/system/psc/xmlcalc/price",{json:{product:t}})).json()}catch(e){throw console.error("Error loading price from API:",e),e}},k2=async(t,e,n)=>{try{return await(await Hn.post("api/plugin/system/psc/xmlcalc/product/design",{json:{product:t,shop:e,jsonProduct:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},R2=async(t,e)=>{try{return await(await Hn.post("api/plugin/system/psc/xmlcalc/product/xml",{json:{product:t,xml:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},C2=async(t,e)=>{try{return await(await Hn.put("api/plugin/system/psc/xmlcalc/product/"+t,{json:{calcXml:e}})).json()}catch(n){throw console.error("Error XML to PRODUCT API:",n),n}},X2=async(t,e,n)=>{try{return await(await Hn.put("api/plugin/system/psc/xmlcalc/shop/"+t,{json:{formel:e,parameter:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},V2=async(t,e)=>{try{return await(await Hn.put("api/system/papercontainer",{json:{content:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},E2=async(t,e,n)=>{const i=new FormData;i.append("file",t),i.append("folder",e);try{return await(await Hn.post("api/media/create",{body:i,onDownloadProgress:s=>{n(Math.round(s.percent*100))}})).json()}catch(r){throw console.error("Error uploading file:",r),r}},hP=async()=>{try{return await(await Hn.get("api/media/folder/all")).json()}catch(t){throw console.error("Error fetching media directories:",t),t}},A2=async(t,e=1)=>{try{return await(await Hn.get(`api/media/folder/${t}/page/${e}/12`)).json()}catch(n){throw console.error(`Error fetching media for folder ${t}:`,n),n}},q2=async(t,e,n)=>{try{return await(await Hn.post("api/plugin/custom/psc/formbuilder/layouts/add",{json:{title:t,data:n,shop:e}})).json()}catch(i){throw console.error("Error saving layout:",i),i}},Z2=async t=>{try{return await(await Hn.get("api/plugin/custom/psc/formbuilder/layouts/all/"+t)).json()}catch(e){throw console.error("Error fetching layouts:",e),e}},z2=async(t,e,n)=>{try{return await(await Hn.post("api/plugin/system/psc/xmlcalc/product/pd",{json:{shop:t,json:e,values:n}})).json()}catch(i){throw console.error("Error fetching preview:",i),i}};class PQ extends Ji{constructor(){super();de(this,"default","");de(this,"placeHolder","Placeholder");de(this,"required",!1);de(this,"name","");de(this,"xmlType","input");de(this,"minValue",0);de(this,"minCalc","");de(this,"maxCalc","");de(this,"maxValue",0);this.type=2}toJSON(){return Object.assign(super.toJSON(),{placeHolder:this.placeHolder,default:this.default,name:this.name,minValue:this.minValue,minCalc:this.minCalc,maxValue:this.maxValue,maxCalc:this.maxCalc,required:this.required})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.required=n.required,this.placeHolder=n.placeHolder,this.minValue=n.minValue,this.minCalc=n.minCalc,this.maxValue=n.maxValue,this.maxCalc=n.maxCalc}}class Ys extends Ji{constructor(){super();de(this,"items",[]);this.type=8}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),n.options.map(i=>{const r=io.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s{if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class pP extends Ji{constructor(){super();de(this,"columns",[]);this.type=7}addColumnAtTheEnd(n){this.columns.push(n)}addColumnAtTheBeginning(n){this.columns.unshift(n)}getIdRecursiv(n){this.columns.forEach(i=>{i.getIdRecursiv(n)})}deleteColumnAt(n){return this.columns.some((i,r)=>{if(i.uuid===n)return this.columns.splice(r,1)[0],!0})}addColumnAt(n,i){let r=!1;for(let s=0;s(n.push(i.toJSON()),n),[])})}cutItem(n){let i=null;return this.columns.some(r=>{if(i=r.cutItem(n),i!==null)return!0}),i}insertItem(n,i){return this.columns.some(r=>{if(r.insertItem(n,i))return!0}),!1}deleteItem(n){return this.columns.some(i=>{if(i.deleteItem(n))return!0}),!1}insertItemInEmptyColumn(n,i,r){return this.uuid==i?(r.items.push(n),!0):!1}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const r=new Ys;r.fromJSON(i),this.columns.push(r)})}}class mP extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","img");de(this,"url","");this.type=9}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class gP extends Ji{constructor(){super();de(this,"items",[]);de(this,"label","");this.type=12}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{label:this.label,options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),this.label=n.label,n.options.map(i=>{const r=io.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s{if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class $P extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","hidden");this.type=1,this.name="hidden"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}let QP=class{constructor(e){de(this,"uuid","");de(this,"id","");de(this,"name","");de(this,"dependencys",[]);this.uuid=No(),this.id=e}addDependency(e){this.dependencys.push(e)}toJSON(){return{id:this.id,name:this.name,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.name=e.name,this.id=e.id,e.dependencys.map(n=>{const i=new fa;i.fromJSON(n),this.dependencys.push(i)})}};class yP extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","select");de(this,"options",[]);de(this,"mode","normal");de(this,"container","");this.type=3}addOption(n){this.options.push(n)}hasDependencys(){return this.options.reduce((i,r)=>(r.dependencys.length>0&&(i=!0),i),!1)||super.hasDependencys()}toJSON(){return Object.assign(super.toJSON(),{default:this.default,mode:this.mode,container:this.container,options:this.options.reduce((n,i)=>(n.push(i.toJSON()),n),[]),name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.mode=n.mode,this.container=n.container,this.default=n.default,n.options.map(i=>{const r=new QP("");r.fromJSON(i),this.options.push(r)})}}class Y2 extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","text");this.type=4,this.default="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class M2 extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","text");this.type=5}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class bP extends Ji{constructor(){super();de(this,"default","");de(this,"variant","1");de(this,"name","");de(this,"xmlType","text");this.type=6,this.default="Headline"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name,variant:this.variant})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.variant=n.variant}}let io=class{static getModelForType(e){switch(e){case 12:return new gP;case 9:return new mP;case 8:return new Ys;case 7:return new pP;case 6:return new bP;case 5:return new M2;case 4:return new Y2;case 3:return new yP;case 2:return new PQ;case 1:return new $P;default:return new PQ}}};const Vr=Z0("items",{state:()=>({uuid:No(),items:[],name:No()}),getters:{getCount:t=>t.items.length,getIdRecursiv(t){let e=[];return t.items.forEach(n=>{e.push(n.id),n.getIdRecursiv(e)}),e},getItems:t=>t.items,getUuid:t=>t.uuid},actions:{loadJSON(){let t=this.items.reduce((e,n)=>(e.push(n.toJSON()),e),[]);return[{uuid:this.uuid,name:this.name,options:t}]},parseJSON(t){this.items=[];let e=JSON.parse(t);this.name=e[0].name,e[0].uuid&&(this.uuid=e[0].uuid),e[0].options.map(n=>{const i=io.getModelForType(n.type);i.fromJSON(n),this.addElement(i)})},addElement(t){this.items.push(t)},deleteItem(t){return this.items.some((e,n)=>{if(e.uuid===t.uuid)return t=this.items.splice(n,1)[0],!0;if(e.deleteItem(t))return!0})},moveItemBefore(t,e){const n=this.cutItem(t);return n?this.insertItem(this.items,n,e):!1},addElementAfter(t,e){this.insertItem(this.items,t,e)},cutItem(t){let e=null;return this.items.some((n,i)=>{if(n.uuid===t)return e=this.items.splice(i,1)[0],!0;if(e===null&&(e=n.cutItem(t),e!==null))return!0}),e},insertItem(t,e,n){let i=!1;for(let r=0;r({activeItem:{},formulaData:[],formulaError:"",productUuid:"",isFormulaLoading:!1,showProperties:!1,showDependency:!1,showOptions:!1,showPreview:!1,showSaveLayoutDialog:!1,showLoadLayoutDialog:!1,sourceDragUuid:"",dragMode:"",json:"",xml:"",formulas:"",paperContainer:"",parameter:"",shopUuid:"",mode:lP.Product,saving:!1,syncing:!1,currentTab:"designer",previewData:null,isPreviewLoading:!1,previewError:""}),getters:{getActiveItem:t=>t.activeItem,isShowPropierties:t=>t.showProperties,isShowDependency:t=>t.showDependency,isShowOptions:t=>t.showOptions,isShowPreview:t=>t.showPreview,getSourceDragUuid:t=>t.sourceDragUuid,getShopUuid:t=>t.shopUuid,getDragMode:t=>t.dragMode,getFormulaData:t=>t.formulaData,getFormulaError:t=>t.formulaError,getPreviewData:t=>t.previewData},actions:{setXml(t){this.xml=t},setFormulas(t){this.formulas=t},setPaperContainer(t){this.paperContainer=t},setParameter(t){this.parameter=t},setMode(t){this.mode=t},setJson(t){this.json=t},setShowDependency(t){this.showDependency=t},setShowOptions(t){this.showOptions=t},setShowProperties(t){this.showProperties=t},setProductUuid(t){this.productUuid=t},setShowPreview(t){this.showPreview=t},setActiveItem(t){this.activeItem=t},setSourceDragUuid(t){this.sourceDragUuid=t},setDragMode(t){this.dragMode=t},setShowSaveLayoutDialog(t){this.showSaveLayoutDialog=t},setShowLoadLayoutDialog(t){this.showLoadLayoutDialog=t},setShopUuid(t){this.shopUuid=t},async loadConfigFromProductApi(t){const e=await w2(t);return this.json=e.json,this.xml=e.xml,this.parameter=e.parameter,this.formulas=e.formulas,this.paperContainer=e.paperContainer,this.shopUuid=e.shopUuid,e.json},async loadFormulaAnalyserDataFromApi(t){if(!(this.formulaData&&this.formulaData.length>0)){this.isFormulaLoading=!0,this.formulaError="";try{const e=await T2(t);if(e&&e.debug&&e.debug.graphJson)this.formulaData=JSON.parse(e.debug.graphJson);else throw new Error("Invalid or empty response format from API.")}catch(e){this.formulaError=`Failed to load formula data: ${e.message}`,console.error(e)}finally{this.isFormulaLoading=!1}}},setXML(t){this.xml=t},setJSON(t){this.json=t},saveDesign(t){k2(this.productUuid,this.shopUuid,t).then(e=>{this.setXML(e.xml),this.setJSON(e.json),this.formulaData=JSON.parse(e.jsonGraph)})},manualSave(){this.saving=!0,C2(this.productUuid,this.xml).then(t=>{this.saving=!1})},manualSync(){this.syncing=!0,this.currentTab=="xml"&&R2(this.productUuid,this.xml).then(t=>{this.setXML(t.xml),this.setJSON(t.json),this.formulaData=JSON.parse(t.jsonGraph),this.syncing=!1,Vr().parseJSON(t.json)}),(this.currentTab=="formulas"||this.currentTab=="parameter")&&X2(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1}),this.currentTab=="paperdb"&&V2(this.shopUuid,this.paperContainer).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setCurrentTab(t){this.currentTab=t},async loadPreview(t,e){this.previewError="";try{const n=await z2(this.shopUuid,t,e);this.previewData=n}catch(n){this.previewError=`Failed to load preview data: ${n.message}`,console.error(n)}finally{this.isPreviewLoading=!1}}}}),I2={class:"w-full p-2 flex gap-2"},U2=M({__name:"TopBar",setup(t){const e=zt();function n(){e.manualSave()}function i(){e.setShowSaveLayoutDialog(!0)}return(r,s)=>(w(),B("div",I2,[R(m(qt),{onClick:n,disabled:m(e).saving},{default:V(()=>[_e(H(m(e).saving?r.$t("saving"):r.$t("save")),1)]),_:1},8,["disabled"]),R(m(qt),{onClick:i,variant:"outline"},{default:V(()=>[_e(H(r.$t("save_layout")),1)]),_:1})]))}}),D2=M({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(cA),pe({"data-slot":"switch"},m(s),{class:m(Le)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[R(m(OA),{"data-slot":"switch-thumb",class:St(m(Le)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:V(()=>[re(o.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),Wm=M({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(SE),pe({"data-slot":"label"},m(n),{class:m(Le)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}});/*! +`))}return()=>r.value||i.value||o.value?vn(e.default({present:o.value})[0],{ref:u=>{const O=ji(u);return typeof(O==null?void 0:O.hasAttribute)>"u"||(O!=null&&O.hasAttribute("data-reka-popper-content-wrapper")?s.value=O.firstElementChild:s.value=O),O}}):null}});const Ph=M({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var l;if(!n.default)return null;const i=wm(n.default()),r=i.findIndex(c=>c.type!==kt);if(r===-1)return i;const s=i[r];(l=s.props)==null||delete l.ref;const o=s.props?me(e,s.props):e,a=Qi({...s,props:{}},o);return i.length===1?a:(i[r]=a,i)}}}),bV=["area","img","input"],Ae=M({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const i=t.asChild?"template":t.as;return typeof i=="string"&&bV.includes(i)?()=>vn(i,e):i!=="template"?()=>vn(t.as,e,{default:n.default}):()=>vn(Ph,e,{default:n.default})}});function _h(){const t=ne(),e=G(()=>{var n,i;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(i=t.value)==null?void 0:i.$el.nextElementSibling:ji(t)});return{primitiveElement:t,currentElement:e}}const[Hi,vV]=hn("DialogRoot");var SV=M({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=os(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=ne(),o=ne(),{modal:a}=an(n);return vV({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:o}),(l,c)=>re(l.$slots,"default",{open:m(r),close:()=>r.value=!1})}}),G0=SV,PV=M({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=Hi();return(i,r)=>(w(),D(m(Ae),me(e,{type:i.as==="button"?"button":void 0,onClick:r[0]||(r[0]=s=>m(n).onOpenChange(!1))}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["type"]))}}),km=PV;const _V="dismissableLayer.pointerDownOutside",xV="dismissableLayer.focusOutside";function F0(t,e){const n=e.closest("[data-dismissable-layer]"),i=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),r=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(i===n||r.indexOf(i){});return Zt(a=>{if(!$s||!sn(n))return;const l=async u=>{const O=u.target;if(!(!(e!=null&&e.value)||!O)){if(F0(e.value,O)){r.value=!1;return}if(u.target&&!r.value){let h=function(){xm(_V,t,d)};var f=h;const d={originalEvent:u};u.pointerType==="touch"?(i.removeEventListener("click",s.value),s.value=h,i.addEventListener("click",s.value,{once:!0})):h()}else i.removeEventListener("click",s.value);r.value=!1}},c=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(c),i.removeEventListener("pointerdown",l),i.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>{sn(n)&&(r.value=!0)}}}function TV(t,e,n=!0){var s;const i=((s=e==null?void 0:e.value)==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=ne(!1);return Zt(o=>{if(!$s||!sn(n))return;const a=async l=>{if(!(e!=null&&e.value))return;await Dt(),await Dt();const c=l.target;!e.value||!c||F0(e.value,c)||l.target&&!r.value&&xm(xV,t,{originalEvent:l})};i.addEventListener("focusin",a),o(()=>i.removeEventListener("focusin",a))}),{onFocusCapture:()=>{sn(n)&&(r.value=!0)},onBlurCapture:()=>{sn(n)&&(r.value=!1)}}}const rr=Sr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var kV=M({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Me(),o=G(()=>{var h;return((h=s.value)==null?void 0:h.ownerDocument)??globalThis.document}),a=G(()=>rr.layersRoot),l=G(()=>s.value?Array.from(a.value).indexOf(s.value):-1),c=G(()=>rr.layersWithOutsidePointerEventsDisabled.size>0),u=G(()=>{const h=Array.from(a.value),[p]=[...rr.layersWithOutsidePointerEventsDisabled].slice(-1),$=h.indexOf(p);return l.value>=$}),O=wV(async h=>{const p=[...rr.branches].some($=>$==null?void 0:$.contains(h.target));!u.value||p||(i("pointerDownOutside",h),i("interactOutside",h),await Dt(),h.defaultPrevented||i("dismiss"))},s),f=TV(h=>{[...rr.branches].some($=>$==null?void 0:$.contains(h.target))||(i("focusOutside",h),i("interactOutside",h),h.defaultPrevented||i("dismiss"))},s);iV("Escape",h=>{l.value===a.value.size-1&&(i("escapeKeyDown",h),h.defaultPrevented||i("dismiss"))});let d;return Zt(h=>{s.value&&(n.disableOutsidePointerEvents&&(rr.layersWithOutsidePointerEventsDisabled.size===0&&(d=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),rr.layersWithOutsidePointerEventsDisabled.add(s.value)),a.value.add(s.value),h(()=>{n.disableOutsidePointerEvents&&rr.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=d)}))}),Zt(h=>{h(()=>{s.value&&(a.value.delete(s.value),rr.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(h,p)=>(w(),D(m(Ae),{ref:m(r),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:Hn({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:m(f).onFocusCapture,onBlurCapture:m(f).onBlurCapture,onPointerdownCapture:m(O).onPointerDownCapture},{default:V(()=>[re(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),H0=kV;const RV=LX(()=>ne([]));function CV(){const t=RV();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=F$(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=F$(t.value,e),(n=t.value[0])==null||n.resume()}}}function F$(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function XV(t){return t.filter(e=>e.tagName!=="A")}const id="focusScope.autoFocusOnMount",rd="focusScope.autoFocusOnUnmount",H$={bubbles:!1,cancelable:!0};function VV(t,{select:e=!1}={}){const n=Sn();for(const i of t)if(Dr(i,{select:e}),Sn()!==n)return!0}function EV(t){const e=K0(t),n=K$(e,t),i=K$(e.reverse(),t);return[n,i]}function K0(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function K$(t,e){for(const n of t)if(!AV(n,{upTo:e}))return n}function AV(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function qV(t){return t instanceof HTMLInputElement&&"select"in t}function Dr(t,{select:e=!1}={}){if(t&&t.focus){const n=Sn();t.focus({preventScroll:!0}),t!==n&&qV(t)&&e&&t.select()}}var ZV=M({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,i=e,{currentRef:r,currentElement:s}=Me(),o=ne(null),a=CV(),l=Sr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Zt(u=>{if(!$s)return;const O=s.value;if(!n.trapped)return;function f($){if(l.paused||!O)return;const g=$.target;O.contains(g)?o.value=g:Dr(o.value,{select:!0})}function d($){if(l.paused||!O)return;const g=$.relatedTarget;g!==null&&(O.contains(g)||Dr(o.value,{select:!0}))}function h($){O.contains(o.value)||Dr(O)}document.addEventListener("focusin",f),document.addEventListener("focusout",d);const p=new MutationObserver(h);O&&p.observe(O,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",d),p.disconnect()})}),Zt(async u=>{const O=s.value;if(await Dt(),!O)return;a.add(l);const f=Sn();if(!O.contains(f)){const h=new CustomEvent(id,H$);O.addEventListener(id,p=>i("mountAutoFocus",p)),O.dispatchEvent(h),h.defaultPrevented||(VV(XV(K0(O)),{select:!0}),Sn()===f&&Dr(O))}u(()=>{O.removeEventListener(id,$=>i("mountAutoFocus",$));const h=new CustomEvent(rd,H$),p=$=>{i("unmountAutoFocus",$)};O.addEventListener(rd,p),O.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Dr(f??document.body,{select:!0}),O.removeEventListener(rd,p),a.remove(l)},0)})});function c(u){if(!n.loop&&!n.trapped||l.paused)return;const O=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,f=Sn();if(O&&f){const d=u.currentTarget,[h,p]=EV(d);h&&p?!u.shiftKey&&f===p?(u.preventDefault(),n.loop&&Dr(h,{select:!0})):u.shiftKey&&f===h&&(u.preventDefault(),n.loop&&Dr(p,{select:!0})):f===d&&u.preventDefault()}}return(u,O)=>(w(),D(m(Ae),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:V(()=>[re(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),J0=ZV;function zV(t){return t?"open":"closed"}function J$(t){const e=Sn();for(const n of t)if(n===e||(n.focus(),Sn()!==e))return}var YV=M({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=Hi(),{forwardRef:s,currentElement:o}=Me();return r.titleId||(r.titleId=yi(void 0,"reka-dialog-title")),r.descriptionId||(r.descriptionId=yi(void 0,"reka-dialog-description")),ft(()=>{r.contentElement=o,Sn()!==document.body&&(r.triggerElement.value=Sn())}),(a,l)=>(w(),D(m(J0),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>i("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>i("closeAutoFocus",c))},{default:V(()=>[R(m(H0),me({id:m(r).contentId,ref:m(s),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(r).descriptionId,"aria-labelledby":m(r).titleId,"data-state":m(zV)(m(r).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>m(r).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>i("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>i("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>i("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>i("pointerDownOutside",c))}),{default:V(()=>[re(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),e1=YV,MV=M({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=Hi(),s=Of(i),{forwardRef:o,currentElement:a}=Me();return j0(a),(l,c)=>(w(),D(e1,me({...n,...m(s)},{ref:m(o),"trap-focus":m(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(u.preventDefault(),(O=m(r).triggerElement.value)==null||O.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const O=u.detail.originalEvent,f=O.button===0&&O.ctrlKey===!0;(O.button===2||f)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:V(()=>[re(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),IV=MV,UV=M({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=Of(e);Me();const s=Hi(),o=ne(!1),a=ne(!1);return(l,c)=>(w(),D(e1,me({...n,...m(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(o.value||(O=m(s).triggerElement.value)==null||O.focus(),u.preventDefault()),o.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=u=>{var d;u.defaultPrevented||(o.value=!0,u.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const O=u.target;((d=m(s).triggerElement.value)==null?void 0:d.contains(O))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&a.value&&u.preventDefault()})}),{default:V(()=>[re(l.$slots,"default")]),_:3},16))}}),DV=UV,LV=M({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=Hi(),s=Of(i),{forwardRef:o}=Me();return(a,l)=>(w(),D(m(Jl),{present:a.forceMount||m(r).open.value},{default:V(()=>[m(r).modal.value?(w(),D(IV,me({key:0,ref:m(o)},{...n,...m(s),...a.$attrs}),{default:V(()=>[re(a.$slots,"default")]),_:3},16)):(w(),D(DV,me({key:1,ref:m(o)},{...n,...m(s),...a.$attrs}),{default:V(()=>[re(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),t1=LV,WV=M({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(t){const e=t;Me();const n=Hi();return(i,r)=>(w(),D(m(Ae),me(e,{id:m(n).descriptionId}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["id"]))}}),n1=WV,NV=M({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Hi();return L0(!0),Me(),(n,i)=>(w(),D(m(Ae),{as:n.as,"as-child":n.asChild,"data-state":m(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:V(()=>[re(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),jV=NV,BV=M({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Hi(),{forwardRef:n}=Me();return(i,r)=>{var s;return(s=m(e))!=null&&s.modal.value?(w(),D(m(Jl),{key:0,present:i.forceMount||m(e).open.value},{default:V(()=>[R(jV,me(i.$attrs,{ref:m(n),as:i.as,"as-child":i.asChild}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):pe("v-if",!0)}}}),i1=BV,GV=M({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=D0();return(n,i)=>m(e)||n.forceMount?(w(),D(sm,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[re(n.$slots,"default")],8,["to","disabled","defer"])):pe("v-if",!0)}}),r1=GV,FV=M({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(w(),D(m(r1),Hs(gs(e)),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),s1=FV,HV=M({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(t){const e=t,n=Hi();return Me(),(i,r)=>(w(),D(m(Ae),me(e,{id:m(n).titleId}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["id"]))}}),o1=HV,KV=M({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=Hi(),{forwardRef:i,currentElement:r}=Me();return n.contentId||(n.contentId=yi(void 0,"reka-dialog-content")),ft(()=>{n.triggerElement.value=r.value}),(s,o)=>(w(),D(m(Ae),me(e,{ref:m(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":m(n).open.value||!1,"aria-controls":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).open.value?"open":"closed",onClick:m(n).onOpenToggle}),{default:V(()=>[re(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),JV=KV;const eQ="data-reka-collection-item";function Qs(t={}){const{key:e="",isProvider:n=!1}=t,i=`${e}CollectionProvider`;let r;if(n){const u=ne(new Map);r={collectionRef:ne(),itemMap:u},fr(i,r)}else r=bn(i);const s=(u=!1)=>{const O=r.collectionRef.value;if(!O)return[];const f=Array.from(O.querySelectorAll(`[${eQ}]`)),h=Array.from(r.itemMap.value.values()).sort((p,$)=>f.indexOf(p.ref)-f.indexOf($.ref));return u?h:h.filter(p=>p.ref.dataset.disabled!=="")},o=M({name:"CollectionSlot",setup(u,{slots:O}){const{primitiveElement:f,currentElement:d}=_h();return Re(d,()=>{r.collectionRef.value=d.value}),()=>vn(Ph,{ref:f},O)}}),a=M({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:O,attrs:f}){const{primitiveElement:d,currentElement:h}=_h();return Zt(p=>{if(h.value){const $=Bl(h.value);r.itemMap.value.set($,{ref:h.value,value:u.value}),p(()=>r.itemMap.value.delete($))}}),()=>vn(Ph,{...f,[eQ]:"",ref:d},O)}}),l=G(()=>Array.from(r.itemMap.value.values())),c=G(()=>r.itemMap.value.size);return{getItems:s,reactiveItems:l,itemMapSize:c,CollectionSlot:o,CollectionItem:a}}const e5="rovingFocusGroup.onEntryFocus",t5={bubbles:!1,cancelable:!0},n5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function i5(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function r5(t,e,n){const i=i5(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return n5[i]}function a1(t,e=!1){const n=Sn();for(const i of t)if(i===n||(i.focus({preventScroll:e}),Sn()!==n))return}function s5(t,e){return t.map((n,i)=>t[(e+i)%t.length])}const[o5,a5]=hn("RovingFocusGroup");var l5=M({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const i=t,r=n,{loop:s,orientation:o,dir:a}=an(i),l=uf(a),c=os(i,"currentTabStopId",r,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),u=ne(!1),O=ne(!1),f=ne(0),{getItems:d,CollectionSlot:h}=Qs({isProvider:!0});function p(g){const b=!O.value;if(g.currentTarget&&g.target===g.currentTarget&&b&&!u.value){const Q=new CustomEvent(e5,t5);if(g.currentTarget.dispatchEvent(Q),r("entryFocus",Q),!Q.defaultPrevented){const y=d().map(x=>x.ref).filter(x=>x.dataset.disabled!==""),v=y.find(x=>x.getAttribute("data-active")===""),S=y.find(x=>x.id===c.value),P=[v,S,...y].filter(Boolean);a1(P,i.preventScrollOnEntryFocus)}}O.value=!1}function $(){setTimeout(()=>{O.value=!1},1)}return e({getItems:d}),a5({loop:s,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(g,b)=>(w(),D(m(h),null,{default:V(()=>[R(m(Ae),{tabindex:u.value||f.value===0?-1:0,"data-orientation":m(o),as:g.as,"as-child":g.asChild,dir:m(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=Q=>O.value=!0),onMouseup:$,onFocus:p,onBlur:b[1]||(b[1]=Q=>u.value=!1)},{default:V(()=>[re(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),c5=l5,u5=M({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=o5(),i=yi(),r=G(()=>e.tabStopId||i),s=G(()=>n.currentTabStopId.value===r.value),{getItems:o,CollectionItem:a}=Qs();ft(()=>{e.focusable&&n.onFocusableItemAdd()}),Fi(()=>{e.focusable&&n.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=r5(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!e.allowShiftKey&&c.shiftKey)return;c.preventDefault();let O=[...o().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")O.reverse();else if(u==="prev"||u==="next"){u==="prev"&&O.reverse();const f=O.indexOf(c.currentTarget);O=n.loop.value?s5(O,f+1):O.slice(f+1)}Dt(()=>a1(O))}}return(c,u)=>(w(),D(m(a),null,{default:V(()=>[R(m(Ae),{tabindex:s.value?0:-1,"data-orientation":m(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=O=>{c.focusable?m(n).onItemFocus(r.value):O.preventDefault()}),onFocus:u[1]||(u[1]=O=>m(n).onItemFocus(r.value)),onKeydown:l},{default:V(()=>[re(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),l1=u5,O5=M({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(w(),D(m(Ae),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:V(()=>[re(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),c1=O5,f5=M({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:i}=_h(),r=G(()=>e.checked??e.value);return Re(r,(s,o)=>{if(!i.value)return;const a=i.value,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(u&&s!==o){const O=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});u.call(a,s),a.dispatchEvent(O),a.dispatchEvent(f)}}),(s,o)=>(w(),D(c1,me({ref_key:"primitiveElement",ref:n},{...e,...s.$attrs},{as:"input"}),null,16))}}),tQ=f5,d5=M({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,n=G(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=G(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((r,s)=>typeof r=="object"?Object.entries(r).map(([o,a])=>({name:`${e.name}[${s}][${o}]`,value:a})):{name:`${e.name}[${s}]`,value:r}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([r,s])=>({name:`${e.name}[${r}]`,value:s})):[]);return(r,s)=>(w(),j(ke,null,[pe(" We render single input if it's required "),n.value?(w(),D(tQ,me({key:r.name},{...e,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(w(!0),j(ke,{key:1},xt(i.value,o=>(w(),D(tQ,me({key:o.name},{ref_for:!0},{...e,...r.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),u1=d5;const[h5,W9]=hn("CheckboxGroupRoot");function Ku(t){return t==="indeterminate"}function O1(t){return Ku(t)?"indeterminate":t?"checked":"unchecked"}const[p5,m5]=hn("CheckboxRoot");var g5=M({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String],required:!1},modelValue:{type:[Boolean,String,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Me(),o=h5(null),a=os(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),l=G(()=>(o==null?void 0:o.disabled.value)||n.disabled),c=G(()=>gl(o==null?void 0:o.modelValue.value)?a.value==="indeterminate"?"indeterminate":a.value:j$(o.modelValue.value,n.value));function u(){if(gl(o==null?void 0:o.modelValue.value))a.value=Ku(a.value)?!0:!a.value;else{const d=[...o.modelValue.value||[]];if(j$(d,n.value)){const h=d.findIndex(p=>Hu(p,n.value));d.splice(h,1)}else d.push(n.value);o.modelValue.value=d}}const O=Tm(s),f=G(()=>{var d;return n.id&&s.value?(d=document.querySelector(`[for="${n.id}"]`))==null?void 0:d.innerText:void 0});return m5({disabled:l,state:c}),(d,h)=>{var p,$;return w(),D(JO((p=m(o))!=null&&p.rovingFocus.value?m(l1):m(Ae)),me(d.$attrs,{id:d.id,ref:m(r),role:"checkbox","as-child":d.asChild,as:d.as,type:d.as==="button"?"button":void 0,"aria-checked":m(Ku)(c.value)?"mixed":c.value,"aria-required":d.required,"aria-label":d.$attrs["aria-label"]||f.value,"data-state":m(O1)(c.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:($=m(o))!=null&&$.rovingFocus.value?!l.value:void 0,onKeydown:sf(on(()=>{},["prevent"]),["enter"]),onClick:u}),{default:V(()=>[re(d.$slots,"default",{modelValue:m(a),state:c.value}),m(O)&&d.name&&!m(o)?(w(),D(m(u1),{key:0,type:"checkbox",checked:!!c.value,name:d.name,value:d.value,disabled:l.value,required:d.required},null,8,["checked","name","value","disabled","required"])):pe("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),$5=g5,Q5=M({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const{forwardRef:e}=Me(),n=p5();return(i,r)=>(w(),D(m(Jl),{present:i.forceMount||m(Ku)(m(n).state.value)||m(n).state.value===!0},{default:V(()=>[R(m(Ae),me({ref:m(e),"data-state":m(O1)(m(n).state.value),"data-disabled":m(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),y5=Q5;const[f1,b5]=hn("PopperRoot");var v5=M({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=ne();return b5({anchor:e,onAnchorChange:n=>e.value=n}),(n,i)=>re(n.$slots,"default")}}),S5=v5,P5=M({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Me(),r=f1();return $m(()=>{r.onAnchorChange(e.reference??i.value)}),(s,o)=>(w(),D(m(Ae),{ref:m(n),as:s.as,"as-child":s.asChild},{default:V(()=>[re(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),_5=P5;function x5(t){return t!==null}function w5(t){return{name:"transformOrigin",options:t,fn(e){var $,g,b;const{placement:n,rects:i,middlewareData:r}=e,o=(($=r.arrow)==null?void 0:$.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=xh(n),O={start:"0%",center:"50%",end:"100%"}[u],f=(((g=r.arrow)==null?void 0:g.x)??0)+a/2,d=(((b=r.arrow)==null?void 0:b.y)??0)+l/2;let h="",p="";return c==="bottom"?(h=o?O:`${f}px`,p=`${-l}px`):c==="top"?(h=o?O:`${f}px`,p=`${i.floating.height+l}px`):c==="right"?(h=`${-l}px`,p=o?O:`${d}px`):c==="left"&&(h=`${i.floating.width+l}px`,p=o?O:`${d}px`),{data:{x:h,y:p}}}}}function xh(t){const[e,n="center"]=t.split("-");return[e,n]}const T5=["top","right","bottom","left"],as=Math.min,Nn=Math.max,Ju=Math.round,Vc=Math.floor,Di=t=>({x:t,y:t}),k5={left:"right",right:"left",bottom:"top",top:"bottom"},R5={start:"end",end:"start"};function wh(t,e,n){return Nn(t,as(e,n))}function wr(t,e){return typeof t=="function"?t(e):t}function Tr(t){return t.split("-")[0]}function ca(t){return t.split("-")[1]}function Rm(t){return t==="x"?"y":"x"}function Cm(t){return t==="y"?"height":"width"}function zi(t){return["top","bottom"].includes(Tr(t))?"y":"x"}function Xm(t){return Rm(zi(t))}function C5(t,e,n){n===void 0&&(n=!1);const i=ca(t),r=Xm(t),s=Cm(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=eO(o)),[o,eO(o)]}function X5(t){const e=eO(t);return[Th(t),e,Th(e)]}function Th(t){return t.replace(/start|end/g,e=>R5[e])}function V5(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function E5(t,e,n,i){const r=ca(t);let s=V5(Tr(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(Th)))),s}function eO(t){return t.replace(/left|right|bottom|top/g,e=>k5[e])}function A5(t){return{top:0,right:0,bottom:0,left:0,...t}}function d1(t){return typeof t!="number"?A5(t):{top:t,right:t,bottom:t,left:t}}function tO(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function nQ(t,e,n){let{reference:i,floating:r}=t;const s=zi(e),o=Xm(e),a=Cm(o),l=Tr(e),c=s==="y",u=i.x+i.width/2-r.width/2,O=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:O};break;case"left":d={x:i.x-r.width,y:O};break;default:d={x:i.x,y:i.y}}switch(ca(e)){case"start":d[o]-=f*(n&&c?-1:1);break;case"end":d[o]+=f*(n&&c?-1:1);break}return d}const q5=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:O}=nQ(c,i,l),f=i,d={},h=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=wr(t,e)||{};if(c==null)return{};const O=d1(u),f={x:n,y:i},d=Xm(r),h=Cm(d),p=await o.getDimensions(c),$=d==="y",g=$?"top":"left",b=$?"bottom":"right",Q=$?"clientHeight":"clientWidth",y=s.reference[h]+s.reference[d]-f[d]-s.floating[h],v=f[d]-s.reference[d],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let P=S?S[Q]:0;(!P||!await(o.isElement==null?void 0:o.isElement(S)))&&(P=a.floating[Q]||s.floating[h]);const x=y/2-v/2,C=P/2-p[h]/2-1,Z=as(O[g],C),W=as(O[b],C),E=Z,te=P-p[h]-W,se=P/2-p[h]/2+x,le=wh(E,se,te),F=!l.arrow&&ca(r)!=null&&se!==le&&s.reference[h]/2-(sese<=0)){var W,E;const se=(((W=s.flip)==null?void 0:W.index)||0)+1,le=P[se];if(le&&(!(O==="alignment"?b!==zi(le):!1)||Z.every(z=>z.overflows[0]>0&&zi(z.placement)===b)))return{data:{index:se,overflows:Z},reset:{placement:le}};let F=(E=Z.filter(I=>I.overflows[0]<=0).sort((I,z)=>I.overflows[1]-z.overflows[1])[0])==null?void 0:E.placement;if(!F)switch(d){case"bestFit":{var te;const I=(te=Z.filter(z=>{if(S){const J=zi(z.placement);return J===b||J==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(J=>J>0).reduce((J,ue)=>J+ue,0)]).sort((z,J)=>z[1]-J[1])[0])==null?void 0:te[0];I&&(F=I);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function iQ(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function rQ(t){return T5.some(e=>t[e]>=0)}const Y5=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=wr(t,e);switch(i){case"referenceHidden":{const s=await $l(e,{...r,elementContext:"reference"}),o=iQ(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:rQ(o)}}}case"escaped":{const s=await $l(e,{...r,altBoundary:!0}),o=iQ(s,n.floating);return{data:{escapedOffsets:o,escaped:rQ(o)}}}default:return{}}}}};async function M5(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Tr(n),a=ca(n),l=zi(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,O=wr(e,t);let{mainAxis:f,crossAxis:d,alignmentAxis:h}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return a&&typeof h=="number"&&(d=a==="end"?h*-1:h),l?{x:d*u,y:f*c}:{x:f*c,y:d*u}}const I5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await M5(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},U5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:$=>{let{x:g,y:b}=$;return{x:g,y:b}}},...l}=wr(t,e),c={x:n,y:i},u=await $l(e,l),O=zi(Tr(r)),f=Rm(O);let d=c[f],h=c[O];if(s){const $=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=d+u[$],Q=d-u[g];d=wh(b,d,Q)}if(o){const $=O==="y"?"top":"left",g=O==="y"?"bottom":"right",b=h+u[$],Q=h-u[g];h=wh(b,h,Q)}const p=a.fn({...e,[f]:d,[O]:h});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[f]:s,[O]:o}}}}}},D5=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=wr(t,e),u={x:n,y:i},O=zi(r),f=Rm(O);let d=u[f],h=u[O];const p=wr(a,e),$=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const Q=f==="y"?"height":"width",y=s.reference[f]-s.floating[Q]+$.mainAxis,v=s.reference[f]+s.reference[Q]-$.mainAxis;dv&&(d=v)}if(c){var g,b;const Q=f==="y"?"width":"height",y=["top","left"].includes(Tr(r)),v=s.reference[O]-s.floating[Q]+(y&&((g=o.offset)==null?void 0:g[O])||0)+(y?0:$.crossAxis),S=s.reference[O]+s.reference[Q]+(y?0:((b=o.offset)==null?void 0:b[O])||0)-(y?$.crossAxis:0);hS&&(h=S)}return{[f]:d,[O]:h}}}},L5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=wr(t,e),u=await $l(e,c),O=Tr(r),f=ca(r),d=zi(r)==="y",{width:h,height:p}=s.floating;let $,g;O==="top"||O==="bottom"?($=O,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=O,$=f==="end"?"top":"bottom");const b=p-u.top-u.bottom,Q=h-u.left-u.right,y=as(p-u[$],b),v=as(h-u[g],Q),S=!e.middlewareData.shift;let P=y,x=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(x=Q),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(P=b),S&&!f){const Z=Nn(u.left,0),W=Nn(u.right,0),E=Nn(u.top,0),te=Nn(u.bottom,0);d?x=h-2*(Z!==0||W!==0?Z+W:Nn(u.left,u.right)):P=p-2*(E!==0||te!==0?E+te:Nn(u.top,u.bottom))}await l({...e,availableWidth:x,availableHeight:P});const C=await o.getDimensions(a.floating);return h!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}};function ff(){return typeof window<"u"}function eo(t){return Vm(t)?(t.nodeName||"").toLowerCase():"#document"}function Gn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ki(t){var e;return(e=(Vm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Vm(t){return ff()?t instanceof Node||t instanceof Gn(t).Node:!1}function bi(t){return ff()?t instanceof Element||t instanceof Gn(t).Element:!1}function Bi(t){return ff()?t instanceof HTMLElement||t instanceof Gn(t).HTMLElement:!1}function sQ(t){return!ff()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Gn(t).ShadowRoot}function ec(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=vi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function W5(t){return["table","td","th"].includes(eo(t))}function df(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Em(t){const e=Am(),n=bi(t)?vi(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function N5(t){let e=ls(t);for(;Bi(e)&&!Wo(e);){if(Em(e))return e;if(df(e))return null;e=ls(e)}return null}function Am(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wo(t){return["html","body","#document"].includes(eo(t))}function vi(t){return Gn(t).getComputedStyle(t)}function hf(t){return bi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ls(t){if(eo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||sQ(t)&&t.host||Ki(t);return sQ(e)?e.host:e}function h1(t){const e=ls(t);return Wo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Bi(e)&&ec(e)?e:h1(e)}function Ql(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=h1(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=Gn(r);if(s){const a=kh(o);return e.concat(o,o.visualViewport||[],ec(r)?r:[],a&&n?Ql(a):[])}return e.concat(r,Ql(r,[],n))}function kh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function p1(t){const e=vi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Bi(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=Ju(n)!==s||Ju(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function qm(t){return bi(t)?t:t.contextElement}function Vo(t){const e=qm(t);if(!Bi(e))return Di(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=p1(e);let o=(s?Ju(n.width):n.width)/i,a=(s?Ju(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const j5=Di(0);function m1(t){const e=Gn(t);return!Am()||!e.visualViewport?j5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function B5(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Gn(t)?!1:e}function Ls(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=qm(t);let o=Di(1);e&&(i?bi(i)&&(o=Vo(i)):o=Vo(t));const a=B5(s,n,i)?m1(s):Di(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,O=r.height/o.y;if(s){const f=Gn(s),d=i&&bi(i)?Gn(i):i;let h=f,p=kh(h);for(;p&&i&&d!==h;){const $=Vo(p),g=p.getBoundingClientRect(),b=vi(p),Q=g.left+(p.clientLeft+parseFloat(b.paddingLeft))*$.x,y=g.top+(p.clientTop+parseFloat(b.paddingTop))*$.y;l*=$.x,c*=$.y,u*=$.x,O*=$.y,l+=Q,c+=y,h=Gn(p),p=kh(h)}}return tO({width:u,height:O,x:l,y:c})}function Zm(t,e){const n=hf(t).scrollLeft;return e?e.left+n:Ls(Ki(t)).left+n}function g1(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:Zm(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function G5(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=Ki(i),a=e?df(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Di(1);const u=Di(0),O=Bi(i);if((O||!O&&!s)&&((eo(i)!=="body"||ec(o))&&(l=hf(i)),Bi(i))){const d=Ls(i);c=Vo(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}const f=o&&!O&&!s?g1(o,l,!0):Di(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function F5(t){return Array.from(t.getClientRects())}function H5(t){const e=Ki(t),n=hf(t),i=t.ownerDocument.body,r=Nn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Nn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Zm(t);const a=-n.scrollTop;return vi(i).direction==="rtl"&&(o+=Nn(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function K5(t,e){const n=Gn(t),i=Ki(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=Am();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function J5(t,e){const n=Ls(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Bi(t)?Vo(t):Di(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function oQ(t,e,n){let i;if(e==="viewport")i=K5(t,n);else if(e==="document")i=H5(Ki(t));else if(bi(e))i=J5(e,n);else{const r=m1(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return tO(i)}function $1(t,e){const n=ls(t);return n===e||!bi(n)||Wo(n)?!1:vi(n).position==="fixed"||$1(n,e)}function eE(t,e){const n=e.get(t);if(n)return n;let i=Ql(t,[],!1).filter(a=>bi(a)&&eo(a)!=="body"),r=null;const s=vi(t).position==="fixed";let o=s?ls(t):t;for(;bi(o)&&!Wo(o);){const a=vi(o),l=Em(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ec(o)&&!l&&$1(t,o))?i=i.filter(u=>u!==o):r=a,o=ls(o)}return e.set(t,i),i}function tE(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?df(e)?[]:eE(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const O=oQ(e,u,r);return c.top=Nn(O.top,c.top),c.right=as(O.right,c.right),c.bottom=as(O.bottom,c.bottom),c.left=Nn(O.left,c.left),c},oQ(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nE(t){const{width:e,height:n}=p1(t);return{width:e,height:n}}function iE(t,e,n){const i=Bi(e),r=Ki(e),s=n==="fixed",o=Ls(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Di(0);function c(){l.x=Zm(r)}if(i||!i&&!s)if((eo(e)!=="body"||ec(r))&&(a=hf(e)),i){const d=Ls(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&c();s&&!i&&r&&c();const u=r&&!i&&!s?g1(r,a):Di(0),O=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:O,y:f,width:o.width,height:o.height}}function sd(t){return vi(t).position==="static"}function aQ(t,e){if(!Bi(t)||vi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ki(t)===n&&(n=n.ownerDocument.body),n}function Q1(t,e){const n=Gn(t);if(df(t))return n;if(!Bi(t)){let r=ls(t);for(;r&&!Wo(r);){if(bi(r)&&!sd(r))return r;r=ls(r)}return n}let i=aQ(t,e);for(;i&&W5(i)&&sd(i);)i=aQ(i,e);return i&&Wo(i)&&sd(i)&&!Em(i)?n:i||N5(t)||n}const rE=async function(t){const e=this.getOffsetParent||Q1,n=this.getDimensions,i=await n(t.floating);return{reference:iE(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function sE(t){return vi(t).direction==="rtl"}const oE={convertOffsetParentRelativeRectToViewportRelativeRect:G5,getDocumentElement:Ki,getClippingRect:tE,getOffsetParent:Q1,getElementRects:rE,getClientRects:F5,getDimensions:nE,getScale:Vo,isElement:bi,isRTL:sE};function y1(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function aE(t,e){let n=null,i;const r=Ki(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:O,width:f,height:d}=c;if(a||e(),!f||!d)return;const h=Vc(O),p=Vc(r.clientWidth-(u+f)),$=Vc(r.clientHeight-(O+d)),g=Vc(u),Q={rootMargin:-h+"px "+-p+"px "+-$+"px "+-g+"px",threshold:Nn(0,as(1,l))||1};let y=!0;function v(S){const P=S[0].intersectionRatio;if(P!==l){if(!y)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!y1(c,t.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(v,{...Q,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,Q)}n.observe(t)}return o(!0),s}function lE(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=qm(t),u=r||s?[...c?Ql(c):[],...Ql(e)]:[];u.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const O=c&&a?aE(c,n):null;let f=-1,d=null;o&&(d=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var Q;(Q=d)==null||Q.observe(e)})),n()}),c&&!l&&d.observe(c),d.observe(e));let h,p=l?Ls(t):null;l&&$();function $(){const g=Ls(t);p&&!y1(p,g)&&n(),p=g,h=requestAnimationFrame($)}return n(),()=>{var g;u.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),O==null||O(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const cE=I5,uE=U5,lQ=z5,OE=L5,fE=Y5,dE=Z5,hE=D5,pE=(t,e,n)=>{const i=new Map,r={platform:oE,...n},s={...r.platform,_c:i};return q5(t,e,{...r,platform:s})};function mE(t){return t!=null&&typeof t=="object"&&"$el"in t}function Rh(t){if(mE(t)){const e=t.$el;return Vm(e)&&eo(e)==="#comment"?null:e}return t}function po(t){return typeof t=="function"?t():m(t)}function gE(t){return{name:"arrow",options:t,fn(e){const n=Rh(po(t.element));return n==null?{}:dE({element:n,padding:t.padding}).fn(e)}}}function b1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cQ(t,e){const n=b1(t);return Math.round(e*n)/n}function $E(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,r=G(()=>{var P;return(P=po(n.open))!=null?P:!0}),s=G(()=>po(n.middleware)),o=G(()=>{var P;return(P=po(n.placement))!=null?P:"bottom"}),a=G(()=>{var P;return(P=po(n.strategy))!=null?P:"absolute"}),l=G(()=>{var P;return(P=po(n.transform))!=null?P:!0}),c=G(()=>Rh(t.value)),u=G(()=>Rh(e.value)),O=ne(0),f=ne(0),d=ne(a.value),h=ne(o.value),p=gr({}),$=ne(!1),g=G(()=>{const P={position:d.value,left:"0",top:"0"};if(!u.value)return P;const x=cQ(u.value,O.value),C=cQ(u.value,f.value);return l.value?{...P,transform:"translate("+x+"px, "+C+"px)",...b1(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:x+"px",top:C+"px"}});let b;function Q(){if(c.value==null||u.value==null)return;const P=r.value;pE(c.value,u.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(x=>{O.value=x.x,f.value=x.y,d.value=x.strategy,h.value=x.placement,p.value=x.middlewareData,$.value=P!==!1})}function y(){typeof b=="function"&&(b(),b=void 0)}function v(){if(y(),i===void 0){Q();return}if(c.value!=null&&u.value!=null){b=i(c.value,u.value,Q);return}}function S(){r.value||($.value=!1)}return Re([s,o,a,r],Q,{flush:"sync"}),Re([c,u],v,{flush:"sync"}),Re(r,S,{flush:"sync"}),jl()&&UO(y),{x:ks(O),y:ks(f),strategy:ks(d),placement:ks(h),middlewareData:ks(p),isPositioned:ks($),floatingStyles:g,update:Q}}const QE={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[N9,yE]=hn("PopperContent");var bE=M({inheritAttrs:!1,__name:"PopperContent",props:CS({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...QE}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,r=f1(),{forwardRef:s,currentElement:o}=Me(),a=ne(),l=ne(),{width:c,height:u}=mV(l),O=G(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=G(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=G(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=G(()=>({padding:f.value,boundary:d.value.filter(x5),altBoundary:d.value.length>0})),p=G(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),$=DX(()=>[cE({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&lQ({...h.value,...p.value}),n.avoidCollisions&&uE({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?hE():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&lQ({...h.value,...p.value}),OE({...h.value,apply:({elements:E,rects:te,availableWidth:se,availableHeight:le})=>{const{width:F,height:I}=te.reference,z=E.floating.style;z.setProperty("--reka-popper-available-width",`${se}px`),z.setProperty("--reka-popper-available-height",`${le}px`),z.setProperty("--reka-popper-anchor-width",`${F}px`),z.setProperty("--reka-popper-anchor-height",`${I}px`)}}),l.value&&gE({element:l.value,padding:n.arrowPadding}),w5({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&fE({strategy:"referenceHidden",...h.value})]),g=G(()=>n.reference??r.anchor.value),{floatingStyles:b,placement:Q,isPositioned:y,middlewareData:v}=$E(g,a,{strategy:n.positionStrategy,placement:O,whileElementsMounted:(...E)=>lE(...E,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:$}),S=G(()=>xh(Q.value)[0]),P=G(()=>xh(Q.value)[1]);$m(()=>{y.value&&i("placed")});const x=G(()=>{var E;return((E=v.value.arrow)==null?void 0:E.centerOffset)!==0}),C=ne("");Zt(()=>{o.value&&(C.value=window.getComputedStyle(o.value).zIndex)});const Z=G(()=>{var E;return((E=v.value.arrow)==null?void 0:E.x)??0}),W=G(()=>{var E;return((E=v.value.arrow)==null?void 0:E.y)??0});return yE({placedSide:S,onArrowChange:E=>l.value=E,arrowX:Z,arrowY:W,shouldHideArrow:x}),(E,te)=>{var se,le,F;return w(),j("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Hn({...m(b),transform:m(y)?m(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:C.value,"--reka-popper-transform-origin":[(se=m(v).transformOrigin)==null?void 0:se.x,(le=m(v).transformOrigin)==null?void 0:le.y].join(" "),...((F=m(v).hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[R(m(Ae),me({ref:m(s)},E.$attrs,{"as-child":n.asChild,as:E.as,"data-side":S.value,"data-align":P.value,style:{animation:m(y)?void 0:"none"}}),{default:V(()=>[re(E.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),vE=bE;function v1(t){const e=af({nonce:ne()});return G(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}var SE=M({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const e=t;return Me(),(n,i)=>(w(),D(m(Ae),me(e,{onMousedown:i[0]||(i[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),PE=SE,_E=M({__name:"PaginationEllipsis",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Me(),(n,i)=>(w(),D(m(Ae),me(e,{"data-type":"ellipsis"}),{default:V(()=>[re(n.$slots,"default",{},()=>[i[0]||(i[0]=_e("…"))])]),_:3},16))}}),xE=_E;const[pf,wE]=hn("PaginationRoot");var TE=M({__name:"PaginationRoot",props:{page:{type:Number,required:!1},defaultPage:{type:Number,required:!1,default:1},itemsPerPage:{type:Number,required:!0},total:{type:Number,required:!1,default:0},siblingCount:{type:Number,required:!1,default:2},disabled:{type:Boolean,required:!1},showEdges:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:page"],setup(t,{emit:e}){const n=t,i=e,{siblingCount:r,disabled:s,showEdges:o}=an(n);Me();const a=os(n,"page",i,{defaultValue:n.defaultPage,passive:n.page===void 0}),l=G(()=>Math.max(1,Math.ceil(n.total/(n.itemsPerPage||1))));return wE({page:a,onPageChange(c){a.value=c},pageCount:l,siblingCount:r,disabled:s,showEdges:o}),(c,u)=>(w(),D(m(Ae),{as:c.as,"as-child":c.asChild},{default:V(()=>[re(c.$slots,"default",{page:m(a),pageCount:l.value})]),_:3},8,["as","as-child"]))}}),kE=TE;function qr(t,e){const n=e-t+1;return Array.from({length:n},(i,r)=>r+t)}function RE(t){return t.map(e=>typeof e=="number"?{type:"page",value:e}:{type:"ellipsis"})}const Ec="ellipsis";function CE(t,e,n,i){const s=e,o=Math.max(t-n,1),a=Math.min(t+n,s);if(i){const c=Math.min(2*n+5,e)-2,u=o>3&&Math.abs(s-c-1+1)>2&&Math.abs(o-1)>2,O=a2&&Math.abs(s-a)>2;if(!u&&O)return[...qr(1,c),Ec,s];if(u&&!O){const d=qr(s-c+1,s);return[1,Ec,...d]}if(u&&O){const d=qr(o,a);return[1,Ec,...d,Ec,s]}return qr(1,s)}else{const l=n*2+1;return eRE(CE(n.page.value,n.pageCount.value,n.siblingCount.value,n.showEdges.value)));return(r,s)=>(w(),D(m(Ae),Hs(gs(e)),{default:V(()=>[re(r.$slots,"default",{items:i.value})]),_:3},16))}}),VE=XE,EE=M({__name:"PaginationListItem",props:{value:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=pf(),i=G(()=>n.page.value===e.value),r=G(()=>n.disabled.value);return(s,o)=>(w(),D(m(Ae),me(e,{"data-type":"page","aria-label":`Page ${s.value}`,"aria-current":i.value?"page":void 0,"data-selected":i.value?"true":void 0,disabled:r.value,type:s.as==="button"?"button":void 0,onClick:o[0]||(o[0]=a=>!r.value&&m(n).onPageChange(s.value))}),{default:V(()=>[re(s.$slots,"default",{},()=>[_e(H(s.value),1)])]),_:3},16,["aria-label","aria-current","data-selected","disabled","type"]))}}),AE=EE,qE=M({__name:"PaginationNext",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=pf(),i=G(()=>n.page.value===n.pageCount.value||n.disabled.value);return(r,s)=>(w(),D(m(Ae),me(e,{"aria-label":"Next Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value+1))}),{default:V(()=>[re(r.$slots,"default",{},()=>[s[1]||(s[1]=_e("Next page"))])]),_:3},16,["type","disabled"]))}}),ZE=qE,zE=M({__name:"PaginationPrev",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Me();const n=pf(),i=G(()=>n.page.value===1||n.disabled.value);return(r,s)=>(w(),D(m(Ae),me(e,{"aria-label":"Previous Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value-1))}),{default:V(()=>[re(r.$slots,"default",{},()=>[s[1]||(s[1]=_e("Prev page"))])]),_:3},16,["type","disabled"]))}}),YE=zE,ME=M({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(t){const e=t,n=ne();return Re(()=>e.value,(i,r)=>{const s=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==r&&a&&n.value){const l=new Event("change",{bubbles:!0});a.call(n.value,i),n.value.dispatchEvent(l)}}),(i,r)=>(w(),D(m(c1),{"as-child":""},{default:V(()=>[U("select",me({ref_key:"selectElement",ref:n},e),[re(i.$slots,"default")],16)]),_:3}))}}),IE=ME;const UE=[" ","Enter","ArrowUp","ArrowDown"],DE=[" ","Enter"],di=10;function nO(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(i=>Ch(i,e,n)):Ch(t,e,n)}function Ch(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?(t==null?void 0:t[n])===(e==null?void 0:e[n]):Hu(t,e)}function LE(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const WE={key:0,value:""},[to,S1]=hn("SelectRoot");var NE=M({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,i=e,{required:r,disabled:s,multiple:o,dir:a}=an(n),l=os(n,"modelValue",i,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),c=os(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=ne(),O=ne(),f=ne({x:0,y:0}),d=G(()=>{var Q;return o.value&&Array.isArray(l.value)?((Q=l.value)==null?void 0:Q.length)===0:gl(l.value)});Qs({isProvider:!0});const h=uf(a),p=Tm(u),$=ne(new Set),g=G(()=>Array.from($.value).map(Q=>Q.value).join(";"));function b(Q){if(o.value){const y=Array.isArray(l.value)?[...l.value]:[],v=y.findIndex(S=>Ch(S,Q,n.by));v===-1?y.push(Q):y.splice(v,1),l.value=[...y]}else l.value=Q}return S1({triggerElement:u,onTriggerChange:Q=>{u.value=Q},valueElement:O,onValueElementChange:Q=>{O.value=Q},contentId:"",modelValue:l,onValueChange:b,by:n.by,open:c,multiple:o,required:r,onOpenChange:Q=>{c.value=Q},dir:h,triggerPointerDownPosRef:f,disabled:s,isEmptyModelValue:d,optionsSet:$,onOptionAdd:Q=>$.value.add(Q),onOptionRemove:Q=>$.value.delete(Q)}),(Q,y)=>(w(),D(m(S5),null,{default:V(()=>[re(Q.$slots,"default",{modelValue:m(l),open:m(c)}),m(p)?(w(),D(IE,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:m(o),required:m(r),name:Q.name,autocomplete:Q.autocomplete,disabled:m(s),value:m(l)},{default:V(()=>[m(gl)(m(l))?(w(),j("option",WE)):pe("v-if",!0),(w(!0),j(ke,null,xt(Array.from($.value),v=>(w(),j("option",me({key:v.value??""},{ref_for:!0},v),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):pe("v-if",!0)]),_:3}))}}),jE=NE,BE=M({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:di},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const n=Oi(t);return(i,r)=>(w(),D(m(vE),me(m(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:V(()=>[re(i.$slots,"default")]),_:3},16))}}),GE=BE;const FE={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[no,P1]=hn("SelectContent");var HE=M({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=to();uV(),L0(n.bodyLock);const{CollectionSlot:s,getItems:o}=Qs(),a=ne();j0(a);const{search:l,handleTypeaheadSearch:c}=B0(),u=ne(),O=ne(),f=ne(),d=ne(!1),h=ne(!1),p=ne(!1);function $(){O.value&&a.value&&J$([O.value,a.value])}Re(d,()=>{$()});const{onOpenChange:g,triggerPointerDownPosRef:b}=r;Zt(S=>{if(!a.value)return;let P={x:0,y:0};const x=Z=>{var W,E;P={x:Math.abs(Math.round(Z.pageX)-(((W=b.value)==null?void 0:W.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((E=b.value)==null?void 0:E.y)??0))}},C=Z=>{var W;Z.pointerType!=="touch"&&(P.x<=10&&P.y<=10?Z.preventDefault():(W=a.value)!=null&&W.contains(Z.target)||g(!1),document.removeEventListener("pointermove",x),b.value=null)};b.value!==null&&(document.addEventListener("pointermove",x),document.addEventListener("pointerup",C,{capture:!0,once:!0})),S(()=>{document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",C,{capture:!0})})});function Q(S){const P=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!P&&S.key.length===1&&c(S.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let C=[...o().map(Z=>Z.ref)];if(["ArrowUp","End"].includes(S.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const Z=S.target,W=C.indexOf(Z);C=C.slice(W+1)}setTimeout(()=>J$(C)),S.preventDefault()}}const y=G(()=>n.position==="popper"?n:{}),v=Oi(y.value);return P1({content:a,viewport:u,onViewportChange:S=>{u.value=S},itemRefCallback:(S,P,x)=>{const C=!h.value&&!x,Z=nO(r.modelValue.value,P,r.by);if(r.multiple.value){if(p.value)return;(Z||C)&&(O.value=S,Z&&(p.value=!0))}else(Z||C)&&(O.value=S);C&&(h.value=!0)},selectedItem:O,selectedItemText:f,onItemLeave:()=>{var S;(S=a.value)==null||S.focus()},itemTextRefCallback:(S,P,x)=>{const C=!h.value&&!x;(nO(r.modelValue.value,P,r.by)||C)&&(f.value=S)},focusSelectedItem:$,position:n.position,isPositioned:d,searchRef:l}),(S,P)=>(w(),D(m(s),null,{default:V(()=>[R(m(J0),{"as-child":"",onMountAutoFocus:P[6]||(P[6]=on(()=>{},["prevent"])),onUnmountAutoFocus:P[7]||(P[7]=x=>{var C;i("closeAutoFocus",x),!x.defaultPrevented&&((C=m(r).triggerElement.value)==null||C.focus({preventScroll:!0}),x.preventDefault())})},{default:V(()=>[R(m(H0),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:P[2]||(P[2]=on(()=>{},["prevent"])),onDismiss:P[3]||(P[3]=x=>m(r).onOpenChange(!1)),onEscapeKeyDown:P[4]||(P[4]=x=>i("escapeKeyDown",x)),onPointerDownOutside:P[5]||(P[5]=x=>i("pointerDownOutside",x))},{default:V(()=>[(w(),D(JO(S.position==="popper"?GE:t8),me({...S.$attrs,...m(v)},{id:m(r).contentId,ref:x=>{a.value=m(ji)(x)},role:"listbox","data-state":m(r).open.value?"open":"closed",dir:m(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:P[0]||(P[0]=on(()=>{},["prevent"])),onPlaced:P[1]||(P[1]=x=>d.value=!0),onKeydown:Q}),{default:V(()=>[re(S.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),KE=HE;const[zm,JE]=hn("SelectItemAlignedPosition");var e8=M({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(t,{emit:e}){const n=t,i=e,{getItems:r}=Qs(),s=to(),o=no(),a=ne(!1),l=ne(!0),c=ne(),{forwardRef:u,currentElement:O}=Me(),{viewport:f,selectedItem:d,selectedItemText:h,focusSelectedItem:p}=o;function $(){if(s.triggerElement.value&&s.valueElement.value&&c.value&&O.value&&(f!=null&&f.value)&&(d!=null&&d.value)&&(h!=null&&h.value)){const Q=s.triggerElement.value.getBoundingClientRect(),y=O.value.getBoundingClientRect(),v=s.valueElement.value.getBoundingClientRect(),S=h.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const Xe=S.left-y.left,it=v.left-Xe,je=Q.left-it,dt=Q.width+je,Ht=Math.max(dt,y.width),wt=window.innerWidth-di,X=N$(it,di,Math.max(di,wt-Ht));c.value.style.minWidth=`${dt}px`,c.value.style.left=`${X}px`}else{const Xe=y.right-S.right,it=window.innerWidth-v.right-Xe,je=window.innerWidth-Q.right-it,dt=Q.width+je,Ht=Math.max(dt,y.width),wt=window.innerWidth-di,X=N$(it,di,Math.max(di,wt-Ht));c.value.style.minWidth=`${dt}px`,c.value.style.right=`${X}px`}const P=r().map(Xe=>Xe.ref),x=window.innerHeight-di*2,C=f.value.scrollHeight,Z=window.getComputedStyle(O.value),W=Number.parseInt(Z.borderTopWidth,10),E=Number.parseInt(Z.paddingTop,10),te=Number.parseInt(Z.borderBottomWidth,10),se=Number.parseInt(Z.paddingBottom,10),le=W+E+C+se+te,F=Math.min(d.value.offsetHeight*5,le),I=window.getComputedStyle(f.value),z=Number.parseInt(I.paddingTop,10),J=Number.parseInt(I.paddingBottom,10),ue=Q.top+Q.height/2-di,Se=x-ue,fe=d.value.offsetHeight/2,Te=d.value.offsetTop+fe,Ee=W+E+Te,Ke=le-Ee;if(Ee<=ue){const Xe=d.value===P[P.length-1];c.value.style.bottom="0px";const it=O.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,je=Math.max(Se,fe+(Xe?J:0)+it+te),dt=Ee+je;c.value.style.height=`${dt}px`}else{const Xe=d.value===P[0];c.value.style.top="0px";const je=Math.max(ue,W+f.value.offsetTop+(Xe?z:0)+fe)+Ke;c.value.style.height=`${je}px`,f.value.scrollTop=Ee-ue+f.value.offsetTop}c.value.style.margin=`${di}px 0`,c.value.style.minHeight=`${F}px`,c.value.style.maxHeight=`${x}px`,i("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=ne("");ft(async()=>{await Dt(),$(),O.value&&(g.value=window.getComputedStyle(O.value).zIndex)});function b(Q){Q&&l.value===!0&&($(),p==null||p(),l.value=!1)}return sV(s.triggerElement,()=>{$()}),JE({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:b}),(Q,y)=>(w(),j("div",{ref_key:"contentWrapperElement",ref:c,style:Hn({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[R(m(Ae),me({ref:m(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...Q.$attrs,...n}),{default:V(()=>[re(Q.$slots,"default")]),_:3},16)],4))}}),t8=e8,n8=M({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(t){return S1(t.context),P1(FE),(n,i)=>re(n.$slots,"default")}}),i8=n8;const r8={key:1};var s8=M({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Zn(n,e),s=to(),o=ne();ft(()=>{o.value=new DocumentFragment});const a=ne(),l=G(()=>n.forceMount||s.open.value),c=ne(l.value);return Re(l,()=>{setTimeout(()=>c.value=l.value)}),(u,O)=>{var f;return l.value||c.value||(f=a.value)!=null&&f.present?(w(),D(m(Jl),{key:0,ref_key:"presenceRef",ref:a,present:l.value},{default:V(()=>[R(KE,Hs(gs({...m(r),...u.$attrs})),{default:V(()=>[re(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):o.value?(w(),j("div",r8,[(w(),D(sm,{to:o.value},[R(i8,{context:m(s)},{default:V(()=>[re(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):pe("v-if",!0)}}}),o8=s8;const[j9,a8]=hn("SelectGroup");var l8=M({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=yi(void 0,"reka-select-group");return a8({id:n}),(i,r)=>(w(),D(m(Ae),me({role:"group"},e,{"aria-labelledby":m(n)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),c8=l8,u8=M({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(w(),D(m(Ae),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:V(()=>[re(e.$slots,"default",{},()=>[n[0]||(n[0]=_e("▼"))])]),_:3},8,["as","as-child"]))}}),O8=u8;const[_1,f8]=hn("SelectItem");var d8=M({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=an(n),s=to(),o=no(),{forwardRef:a,currentElement:l}=Me(),{CollectionItem:c}=Qs(),u=G(()=>{var y;return nO((y=s.modelValue)==null?void 0:y.value,n.value,s.by)}),O=ne(!1),f=ne(n.textValue??""),d=yi(void 0,"reka-select-item-text"),h="select.select";async function p(y){if(y.defaultPrevented)return;const v={originalEvent:y,value:n.value};xm(h,$,v)}async function $(y){await Dt(),i("select",y),!y.defaultPrevented&&(r.value||(s.onValueChange(n.value),s.multiple.value||s.onOpenChange(!1)))}async function g(y){var v,S;await Dt(),!y.defaultPrevented&&(r.value?(v=o.onItemLeave)==null||v.call(o):(S=y.currentTarget)==null||S.focus({preventScroll:!0}))}async function b(y){var v;await Dt(),!y.defaultPrevented&&y.currentTarget===Sn()&&((v=o.onItemLeave)==null||v.call(o))}async function Q(y){var S;await Dt(),!(y.defaultPrevented||((S=o.searchRef)==null?void 0:S.value)!==""&&y.key===" ")&&(DE.includes(y.key)&&p(y),y.key===" "&&y.preventDefault())}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return ft(()=>{l.value&&o.itemRefCallback(l.value,n.value,n.disabled)}),f8({value:n.value,disabled:r,textId:d,isSelected:u,onItemTextChange:y=>{f.value=((f.value||(y==null?void 0:y.textContent))??"").trim()}}),(y,v)=>(w(),D(m(c),{value:{textValue:f.value}},{default:V(()=>[R(m(Ae),{ref:m(a),role:"option","aria-labelledby":m(d),"data-highlighted":O.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":m(r)||void 0,"data-disabled":m(r)?"":void 0,tabindex:m(r)?void 0:-1,as:y.as,"as-child":y.asChild,onFocus:v[0]||(v[0]=S=>O.value=!0),onBlur:v[1]||(v[1]=S=>O.value=!1),onPointerup:p,onPointerdown:v[2]||(v[2]=S=>{S.currentTarget.focus({preventScroll:!0})}),onTouchend:v[3]||(v[3]=on(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:b,onKeydown:Q},{default:V(()=>[re(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),h8=d8,p8=M({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=_1();return(i,r)=>m(n).isSelected.value?(w(),D(m(Ae),me({key:0,"aria-hidden":"true"},e),{default:V(()=>[re(i.$slots,"default")]),_:3},16)):pe("v-if",!0)}}),m8=p8,g8=M({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=to(),i=no(),r=_1(),{forwardRef:s,currentElement:o}=Me(),a=G(()=>{var l,c;return{value:r.value,disabled:r.disabled.value,textContent:((l=o.value)==null?void 0:l.textContent)??((c=r.value)==null?void 0:c.toString())??""}});return ft(()=>{o.value&&(r.onItemTextChange(o.value),i.itemTextRefCallback(o.value,r.value,r.disabled.value),n.onOptionAdd(a.value))}),Fi(()=>{n.onOptionRemove(a.value)}),(l,c)=>(w(),D(m(Ae),me({id:m(r).textId,ref:m(s)},{...e,...l.$attrs}),{default:V(()=>[re(l.$slots,"default")]),_:3},16,["id"]))}}),$8=g8,Q8=M({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(w(),D(m(r1),Hs(gs(e)),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),y8=Q8,b8=M({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{getItems:i}=Qs(),r=no(),s=ne(null);function o(){s.value!==null&&(window.clearInterval(s.value),s.value=null)}Zt(()=>{const c=i().map(u=>u.ref).find(u=>u===Sn());c==null||c.scrollIntoView({block:"nearest"})});function a(){s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}function l(){var c;(c=r.onItemLeave)==null||c.call(r),s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}return Js(()=>o()),(c,u)=>{var O;return w(),D(m(Ae),me({"aria-hidden":"true",style:{flexShrink:0}},(O=c.$parent)==null?void 0:O.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:V(()=>[re(c.$slots,"default")]),_:3},16)}}}),x1=b8,v8=M({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=no(),n=e.position==="item-aligned"?zm():void 0,{forwardRef:i,currentElement:r}=Me(),s=ne(!1);return Zt(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){const f=u.scrollHeight-u.clientHeight;s.value=Math.ceil(u.scrollTop)u.removeEventListener("scroll",O))}}),Re(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(w(),D(x1,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:V(()=>[re(o.$slots,"default")]),_:3},512)):pe("v-if",!0)}}),S8=v8,P8=M({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=no(),n=e.position==="item-aligned"?zm():void 0,{forwardRef:i,currentElement:r}=Me(),s=ne(!1);return Zt(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){s.value=u.scrollTop>0};var a=O;const u=e.viewport.value;O(),u.addEventListener("scroll",O),o(()=>u.removeEventListener("scroll",O))}}),Re(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(w(),D(x1,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:V(()=>[re(o.$slots,"default")]),_:3},512)):pe("v-if",!0)}}),_8=P8,x8=M({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=to(),{forwardRef:i,currentElement:r}=Me(),s=G(()=>{var f;return((f=n.disabled)==null?void 0:f.value)||e.disabled});n.contentId||(n.contentId=yi(void 0,"reka-select-content")),ft(()=>{n.onTriggerChange(r.value)});const{getItems:o}=Qs(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=B0();function u(){s.value||(n.onOpenChange(!0),c())}function O(f){u(),n.triggerPointerDownPosRef.value={x:Math.round(f.pageX),y:Math.round(f.pageY)}}return(f,d)=>(w(),D(m(_5),{"as-child":"",reference:f.reference},{default:V(()=>{var h,p,$,g;return[R(m(Ae),{ref:m(i),role:"combobox",type:f.as==="button"?"button":void 0,"aria-controls":m(n).contentId,"aria-expanded":m(n).open.value||!1,"aria-required":(h=m(n).required)==null?void 0:h.value,"aria-autocomplete":"none",disabled:s.value,dir:(p=m(n))==null?void 0:p.dir.value,"data-state":($=m(n))!=null&&$.open.value?"open":"closed","data-disabled":s.value?"":void 0,"data-placeholder":m(LE)((g=m(n).modelValue)==null?void 0:g.value)?"":void 0,"as-child":f.asChild,as:f.as,onClick:d[0]||(d[0]=b=>{var Q;(Q=b==null?void 0:b.currentTarget)==null||Q.focus()}),onPointerdown:d[1]||(d[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const Q=b.target;Q.hasPointerCapture(b.pointerId)&&Q.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(O(b),b.preventDefault())}),onPointerup:d[2]||(d[2]=on(b=>{b.pointerType==="touch"&&O(b)},["prevent"])),onKeydown:d[3]||(d[3]=b=>{const Q=m(a)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&Q&&b.key===" "||(m(l)(b.key,m(o)()),m(UE).includes(b.key)&&(u(),b.preventDefault()))})},{default:V(()=>[re(f.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),w8=x8,T8=M({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Me(),r=to();ft(()=>{r.valueElement=i});const s=G(()=>{var u;let a=[];const l=Array.from(r.optionsSet.value),c=O=>l.find(f=>nO(O,f.value,r.by));return Array.isArray(r.modelValue.value)?a=r.modelValue.value.map(O=>{var f;return((f=c(O))==null?void 0:f.textContent)??""}):a=[((u=c(r.modelValue.value))==null?void 0:u.textContent)??""],a.filter(Boolean)}),o=G(()=>s.value.length?s.value.join(", "):e.placeholder);return(a,l)=>(w(),D(m(Ae),{ref:m(n),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":s.value.length?void 0:e.placeholder},{default:V(()=>[re(a.$slots,"default",{selectedLabel:s.value,modelValue:m(r).modelValue.value},()=>[_e(H(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),k8=T8,R8=M({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{nonce:n}=an(e),i=v1(n),r=no(),s=r.position==="item-aligned"?zm():void 0,{forwardRef:o,currentElement:a}=Me();ft(()=>{r==null||r.onViewportChange(a.value)});const l=ne(0);function c(u){const O=u.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:d}=s??{};if(f!=null&&f.value&&(d!=null&&d.value)){const h=Math.abs(l.value-O.scrollTop);if(h>0){const p=window.innerHeight-di*2,$=Number.parseFloat(d.value.style.minHeight),g=Number.parseFloat(d.value.style.height),b=Math.max($,g);if(b0?v:0,d.value.style.justifyContent="flex-end")}}}l.value=O.scrollTop}return(u,O)=>(w(),j(ke,null,[R(m(Ae),me({ref:m(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:V(()=>[re(u.$slots,"default")]),_:3},16),R(m(Ae),{as:"style",nonce:m(i)},{default:V(()=>O[0]||(O[0]=[_e(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),C8=R8;function Ye(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}function w1(t,e=document){var i;if(!Kl)return null;if(e instanceof HTMLElement&&((i=e==null?void 0:e.dataset)==null?void 0:i.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function mf(t,e=document){if(!Kl)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function T1(t,e,n=document){return Kl?yl(t,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e)??null:null}function yl(t,e=document){return Kl?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function X8(t,e,n,i=document){var c,u;const r=mf(e,i),s=yl(t,i),o=r?s.indexOf(r):-1,a=((c=n[o])==null?void 0:c.id)??null,l=((u=n[o+1])==null?void 0:u.id)??null;return[a,l]}function k1(t){return t.type==="keydown"}function R1(t){return t.type.startsWith("mouse")}function C1(t){return t.type.startsWith("touch")}function gf(t){if(R1(t))return{x:t.clientX,y:t.clientY};if(C1(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function X1(t,e){const n=t==="horizontal",{x:i,y:r}=gf(e);return n?i:r}function V8(t,e,n,i,r){const s=n==="horizontal",o=mf(e,r);Ye(o);const a=o.getAttribute("data-panel-group-id");Ye(a);const{initialCursorPosition:l}=i,c=X1(n,t),u=w1(a,r);Ye(u);const O=u.getBoundingClientRect(),f=s?O.width:O.height;return(c-l)/f*100}function E8(t,e,n,i,r,s){if(k1(t)){const o=n==="horizontal";let a=0;t.shiftKey?a=100:a=r??10;let l=0;switch(t.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return i==null?0:V8(t,e,n,i,s)}function A8({layout:t,panelsArray:e,pivotIndices:n}){let i=0,r=100,s=0,o=0;const a=n[0];Ye(a!=null),e.forEach((O,f)=>{const{constraints:d}=O,{maxSize:h=100,minSize:p=0}=d;f===a?(i=p,r=h):(s+=p,o+=h)});const l=Math.min(r,100-s),c=Math.max(i,100-o),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function q8({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(s=>s.constraints);let i=0,r=100;for(let s=0;s{const s=t[r];Ye(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:c=0,collapsible:u}=a,O=n[l];if(O==null||i!==O){n[l]=i;const{onCollapse:f,onExpand:d,onResize:h}=o;h&&h(i,O),u&&(f||d)&&(d&&(O==null||O===c)&&i!==c&&d(),f&&(O==null||O!==c)&&i===c&&f())}})}function Z8(t,e=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...r)},e)}}const Ym=10;function bl(t,e,n=Ym){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const i=t-e;return i===0?0:i>0?1:-1}function Ln(t,e,n){return bl(t,e,n)===0}function bo({panelConstraints:t,panelIndex:e,size:n}){const i=t[e];Ye(i!=null);const{collapsedSize:r=0,collapsible:s,maxSize:o=100,minSize:a=0}=i;if(bl(n,a)<0)if(s){const l=(r+a)/2;bl(n,l)<0?n=r:n=a}else n=a;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed(Ym)),n}function Ac(t,e){if(t.length!==e.length)return!1;for(let n=0;n0&&(t=t<0?0-$:$)}}}{const u=t<0?o:a,O=n[u];Ye(O);const{collapsible:f}=O;if(f){const d=e[u];Ye(d!=null);const h=n[u];Ye(h);const{collapsedSize:p=0,minSize:$=0}=h;if(Ln(d,$)){const g=d-p;bl(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const u=t<0?1:-1;let O=t<0?a:o,f=0;for(;;){const h=e[O];Ye(h!=null);const $=bo({panelConstraints:n,panelIndex:O,size:100})-h;if(f+=$,O+=u,O<0||O>=n.length)break}const d=Math.min(Math.abs(t),Math.abs(f));t=t<0?0-d:d}{let O=t<0?o:a;for(;O>=0&&O=0))break;t<0?O--:O++}}if(Ln(l,0))return e;{const u=t<0?a:o,O=e[u];Ye(O!=null);const f=O+l,d=bo({panelConstraints:n,panelIndex:u,size:f});if(s[u]=d,!Ln(d,f)){let h=f-d,$=t<0?a:o;for(;$>=0&&$0?$--:$++}}}const c=s.reduce((u,O)=>O+u,0);return Ln(c,100)?s:e}function V1(t,e,n){const i=T1(t,e,n);return i!=null?[i,i+1]:[-1,-1]}function z8(t,e,n){return t.xe.x&&t.ye.y}function Y8(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:fQ(t),b:fQ(e)};let i;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),i=t;Ye(i);const r={a:OQ(uQ(n.a)),b:OQ(uQ(n.b))};if(r.a===r.b){const s=i.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(r.a-r.b)}const M8=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function I8(t){const e=getComputedStyle(E1(t)).display;return e==="flex"||e==="inline-flex"}function U8(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||I8(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||M8.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function uQ(t){let e=t.length;for(;e--;){const n=t[e];if(Ye(n),U8(n))return n}return null}function OQ(t){return t&&Number(getComputedStyle(t).zIndex)||0}function fQ(t){const e=[];for(;t;)e.push(t),t=E1(t);return e}function E1(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}const A1=1,q1=2,Z1=4,z1=8;function D8(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const L8=D8()==="coarse",cs=[];let $f=!1;const Fr=new Map,Qf=new Map,vl=new Set;function W8(t,e,n,i,r,s){const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:i,nonce:r,setResizeHandlerState:s},l=Fr.get(o)??0;return Fr.set(o,l+1),vl.add(a),iO(),function(){Qf.delete(t),vl.delete(a);const u=Fr.get(o)??1;Fr.set(o,u-1),iO(),M1(),u===1&&Fr.delete(o)}}function qc(t){const{target:e}=t,{x:n,y:i}=gf(t);$f=!0,Mm({target:e,x:n,y:i}),iO(),cs.length>0&&(Im("down",t),t.preventDefault())}function Zr(t){const{x:e,y:n}=gf(t);if(!$f){const{target:i}=t;Mm({target:i,x:e,y:n})}Im("move",t),Y1(),cs.length>0&&t.preventDefault()}function zr(t){const{target:e}=t,{x:n,y:i}=gf(t);Qf.clear(),$f=!1,cs.length>0&&t.preventDefault(),Im("up",t),Mm({target:e,x:n,y:i}),Y1(),iO()}function Mm({target:t,x:e,y:n}){cs.splice(0);let i=null;t instanceof HTMLElement&&(i=t),vl.forEach(r=>{const{element:s,hitAreaMargins:o}=r,a=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:O}=a,f=L8?o.coarse:o.fine;if(e>=c-f&&e<=u+f&&n>=O-f&&n<=l+f){if(i!==null&&s!==i&&!s.contains(i)&&!i.contains(s)&&Y8(i,s)>0){let h=i,p=!1;for(;h&&!h.contains(s);){if(z8(h.getBoundingClientRect(),a)){p=!0;break}h=h.parentElement}if(p)return}cs.push(r)}})}function od(t,e){Qf.set(t,e)}function Y1(){let t=!1,e=!1,n;cs.forEach(r=>{const{direction:s,nonce:o}=r;s.value==="horizontal"?t=!0:e=!0,n=o.value});let i=0;Qf.forEach(r=>{i|=r}),t&&e?ad("intersection",i,n):t?ad("horizontal",i,n):e?ad("vertical",i,n):M1()}function iO(){Fr.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",zr),n.removeEventListener("mousedown",qc),n.removeEventListener("mouseleave",Zr),n.removeEventListener("mousemove",Zr),n.removeEventListener("touchmove",Zr),n.removeEventListener("touchstart",qc)}),window.removeEventListener("mouseup",zr),window.removeEventListener("touchcancel",zr),window.removeEventListener("touchend",zr),vl.size>0&&($f?(cs.length>0&&Fr.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",zr),n.addEventListener("mouseleave",Zr),n.addEventListener("mousemove",Zr),n.addEventListener("touchmove",Zr,{passive:!1}))}),window.addEventListener("mouseup",zr),window.addEventListener("touchcancel",zr),window.addEventListener("touchend",zr)):Fr.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",qc),n.addEventListener("mousemove",Zr),n.addEventListener("touchmove",Zr,{passive:!1}),n.addEventListener("touchstart",qc))}))}function Im(t,e){vl.forEach(n=>{const{setResizeHandlerState:i}=n,r=cs.includes(n);i(t,r,e)})}let Xh=null,Hr=null;function N8(t,e){if(e){const n=(e&A1)!==0,i=(e&q1)!==0,r=(e&Z1)!==0,s=(e&z1)!==0;if(n)return r?"se-resize":s?"ne-resize":"e-resize";if(i)return r?"sw-resize":s?"nw-resize":"w-resize";if(r)return"s-resize";if(s)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function M1(){Hr!==null&&(document.head.removeChild(Hr),Xh=null,Hr=null)}function ad(t,e,n){const i=N8(t,e);Xh!==i&&(Xh=i,Hr===null&&(Hr=document.createElement("style"),n&&(Hr.nonce=n),document.head.appendChild(Hr)),Hr.innerHTML=`*{cursor: ${i}!important;}`)}function j8({defaultSize:t,dragState:e,layout:n,panelData:i,panelIndex:r,precision:s=3}){const o=n[r];let a;return o==null?a=t!==void 0?t.toPrecision(s):"1":i.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function B8({layout:t,panelConstraints:e}){const n=[...t],i=n.reduce((s,o)=>s+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!Ln(i,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(s=>`${s}%`).join(", ")}. Layout normalization will be applied.`);for(let s=0;s{const a=r.value;if(!a)return;const l=yl(e,a);for(let c=0;c{l.forEach(c=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})})}),Zt(o=>{const a=r.value;if(!a)return;const l=t.value;Ye(l);const{panelDataArray:c}=l,u=w1(e,a);Ye(u!=null,`No group found for id "${e}"`);const O=yl(e,a);Ye(O);const f=O.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Ye(h);const[p,$]=X8(e,h,c,a);if(p==null||$==null)return()=>{};const g=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const Q=c.findIndex(y=>y.id===p);if(Q>=0){const y=c[Q];Ye(y);const v=n.value[Q],{collapsedSize:S=0,collapsible:P,minSize:x=0}=y.constraints;if(v!=null&&P){const C=Ya({delta:Ln(v,S)?x-S:S-v,layout:n.value,panelConstraints:c.map(Z=>Z.constraints),pivotIndices:V1(e,h,a),trigger:"keyboard"});n.value!==C&&s(C)}}break}}};return d.addEventListener("keydown",g),()=>{d.removeEventListener("keydown",g)}});o(()=>{f.forEach(d=>d())})})}function dQ(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function I1(t){return`reka:${t}`}function U1(t){return t.map(e=>{const{constraints:n,id:i,idIsFromProps:r,order:s}=e;return r?i:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function D1(t,e){try{const n=I1(t),i=e.getItem(n);if(i){const r=JSON.parse(i);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function F8(t,e,n){const i=D1(t,n)??{},r=U1(e);return i[r]??null}function H8(t,e,n,i,r){const s=I1(t),o=U1(e),a=D1(t,r)??{};a[o]={expandToSizes:Object.fromEntries(n.entries()),layout:i};try{r.setItem(s,JSON.stringify(a))}catch(l){console.error(l)}}const K8=100,Ma={getItem:t=>(dQ(Ma),Ma.getItem(t)),setItem:(t,e)=>{dQ(Ma),Ma.setItem(t,e)}},[L1,J8]=hn("PanelGroup");var eA=M({__name:"SplitterGroup",props:{id:{type:[String,null],required:!1},autoSaveId:{type:[String,null],required:!1,default:null},direction:{type:String,required:!0},keyboardResizeBy:{type:[Number,null],required:!1,default:10},storage:{type:Object,required:!1,default:()=>Ma},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r={},{direction:s}=an(n),o=yi(n.id,"reka-splitter-group"),a=uf(),{forwardRef:l,currentElement:c}=Me(),u=ne(null),O=ne([]),f=ne({}),d=ne(new Map),h=ne(0),p=G(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:u.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),$=ne({layout:O.value,panelDataArray:[],panelDataArrayChanged:!1}),g=I=>O.value=I;G8({eagerValuesRef:$,groupId:o,layout:O,panelDataArray:$.value.panelDataArray,setLayout:g,panelGroupElement:c}),Zt(()=>{const{panelDataArray:I}=$.value,{autoSaveId:z}=n;if(z){if(O.value.length===0||O.value.length!==I.length)return;let J=r[z];J||(J=Z8(H8,K8),r[z]=J);const ue=[...I],Se=new Map(d.value);J(z,ue,Se,O.value,n.storage)}});function b(I,z){const{panelDataArray:J}=$.value,ue=le(J,I);return j8({defaultSize:z,dragState:u.value,layout:O.value,panelData:J,panelIndex:ue})}function Q(I){const{panelDataArray:z}=$.value;z.push(I),z.sort((J,ue)=>{const Se=J.order,fe=ue.order;return Se==null&&fe==null?0:Se==null?-1:fe==null?1:Se-fe}),$.value.panelDataArrayChanged=!0}Re(()=>$.value.panelDataArrayChanged,()=>{if($.value.panelDataArrayChanged){$.value.panelDataArrayChanged=!1;const{autoSaveId:I,storage:z}=p.value,{layout:J,panelDataArray:ue}=$.value;let Se=null;if(I){const Te=F8(I,ue,z);Te&&(d.value=new Map(Object.entries(Te.expandToSizes)),Se=Te.layout)}Se===null&&(Se=q8({panelDataArray:ue}));const fe=B8({layout:Se,panelConstraints:ue.map(Te=>Te.constraints)});UX(J,fe)||(g(fe),$.value.layout=fe,i("layout",fe),xa(ue,fe,f.value))}});function y(I){return function(J){J.preventDefault();const ue=c.value;if(!ue)return()=>null;const{direction:Se,dragState:fe,id:Te,keyboardResizeBy:Ee}=p.value,{layout:Ke,panelDataArray:Ze}=$.value,{initialLayout:Xe}=fe??{},it=V1(Te,I,ue);let je=E8(J,I,Se,fe,Ee,ue);if(je===0)return;const dt=Se==="horizontal";a.value==="rtl"&&dt&&(je=-je);const Ht=Ze.map(q=>q.constraints),wt=Ya({delta:je,layout:Xe??Ke,panelConstraints:Ht,pivotIndices:it,trigger:k1(J)?"keyboard":"mouse-or-touch"}),X=!Ac(Ke,wt);(R1(J)||C1(J))&&h.value!==je&&(h.value=je,X?od(I,0):dt?od(I,je<0?A1:q1):od(I,je<0?Z1:z1)),X&&(g(wt),$.value.layout=wt,i("layout",wt),xa(Ze,wt,f.value))}}function v(I,z){const{layout:J,panelDataArray:ue}=$.value,Se=ue.map(Xe=>Xe.constraints),{panelSize:fe,pivotIndices:Te}=F(ue,I,J);Ye(fe!=null);const Ke=le(ue,I)===ue.length-1?fe-z:z-fe,Ze=Ya({delta:Ke,layout:J,panelConstraints:Se,pivotIndices:Te,trigger:"imperative-api"});Ac(J,Ze)||(g(Ze),$.value.layout=Ze,i("layout",Ze),xa(ue,Ze,f.value))}function S(I,z){const{layout:J,panelDataArray:ue}=$.value,Se=le(ue,I);ue[Se]=I,$.value.panelDataArrayChanged=!0;const{collapsedSize:fe=0,collapsible:Te}=z,{collapsedSize:Ee=0,collapsible:Ke,maxSize:Ze=100,minSize:Xe=0}=I.constraints,{panelSize:it}=F(ue,I,J);it!==null&&(Te&&Ke&&it===fe?fe!==Ee&&v(I,Ee):itZe&&v(I,Ze))}function P(I,z){const{direction:J}=p.value,{layout:ue}=$.value;if(!c.value)return;const Se=mf(I,c.value);Ye(Se);const fe=X1(J,z);u.value={dragHandleId:I,dragHandleRect:Se.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:ue}}function x(){u.value=null}function C(I){const{panelDataArray:z}=$.value,J=le(z,I);J>=0&&(z.splice(J,1),delete f.value[I.id],$.value.panelDataArrayChanged=!0)}function Z(I){const{layout:z,panelDataArray:J}=$.value;if(I.constraints.collapsible){const ue=J.map(Ee=>Ee.constraints),{collapsedSize:Se=0,panelSize:fe,pivotIndices:Te}=F(J,I,z);if(Ye(fe!=null,`Panel size not found for panel "${I.id}"`),fe!==Se){d.value.set(I.id,fe);const Ke=le(J,I)===J.length-1?fe-Se:Se-fe,Ze=Ya({delta:Ke,layout:z,panelConstraints:ue,pivotIndices:Te,trigger:"imperative-api"});Ac(z,Ze)||(g(Ze),$.value.layout=Ze,i("layout",Ze),xa(J,Ze,f.value))}}}function W(I){const{layout:z,panelDataArray:J}=$.value;if(I.constraints.collapsible){const ue=J.map(Ke=>Ke.constraints),{collapsedSize:Se=0,panelSize:fe,minSize:Te=0,pivotIndices:Ee}=F(J,I,z);if(fe===Se){const Ke=d.value.get(I.id),Ze=Ke!=null&&Ke>=Te?Ke:Te,it=le(J,I)===J.length-1?fe-Ze:Ze-fe,je=Ya({delta:it,layout:z,panelConstraints:ue,pivotIndices:Ee,trigger:"imperative-api"});Ac(z,je)||(g(je),$.value.layout=je,i("layout",je),xa(J,je,f.value))}}}function E(I){const{layout:z,panelDataArray:J}=$.value,{panelSize:ue}=F(J,I,z);return Ye(ue!=null,`Panel size not found for panel "${I.id}"`),ue}function te(I){const{layout:z,panelDataArray:J}=$.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=F(J,I,z);return Se?fe===void 0?I.constraints.defaultSize===I.constraints.collapsedSize:fe===ue:!1}function se(I){const{layout:z,panelDataArray:J}=$.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=F(J,I,z);return Ye(fe!=null,`Panel size not found for panel "${I.id}"`),!Se||fe>ue}J8({direction:s,dragState:u.value,groupId:o,reevaluatePanelConstraints:S,registerPanel:Q,registerResizeHandle:y,resizePanel:v,startDragging:P,stopDragging:x,unregisterPanel:C,panelGroupElement:c,collapsePanel:Z,expandPanel:W,isPanelCollapsed:te,isPanelExpanded:se,getPanelSize:E,getPanelStyle:b});function le(I,z){return I.findIndex(J=>J===z||J.id===z.id)}function F(I,z,J){const ue=le(I,z),fe=ue===I.length-1?[ue-1,ue]:[ue,ue+1],Te=J[ue];return{...z.constraints,panelSize:Te,pivotIndices:fe}}return(I,z)=>(w(),D(m(Ae),{ref:m(l),as:I.as,"as-child":I.asChild,style:Hn({display:"flex",flexDirection:m(s)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":m(s),"data-panel-group-id":m(o)},{default:V(()=>[re(I.$slots,"default",{layout:O.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),tA=eA,nA=M({__name:"SplitterPanel",props:{collapsedSize:{type:Number,required:!1},collapsible:{type:Boolean,required:!1},defaultSize:{type:Number,required:!1},id:{type:String,required:!1},maxSize:{type:Number,required:!1},minSize:{type:Number,required:!1},order:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const i=t,r=n,s=L1();if(s===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:a,getPanelSize:l,getPanelStyle:c,isPanelCollapsed:u,resizePanel:O,groupId:f,reevaluatePanelConstraints:d,registerPanel:h,unregisterPanel:p}=s,$=yi(i.id,"reka-splitter-panel"),g=G(()=>({callbacks:{onCollapse:()=>r("collapse"),onExpand:()=>r("expand"),onResize:(...x)=>r("resize",...x)},constraints:{collapsedSize:i.collapsedSize&&Number.parseFloat(i.collapsedSize.toFixed(Ym)),collapsible:i.collapsible,defaultSize:i.defaultSize,maxSize:i.maxSize,minSize:i.minSize},id:$,idIsFromProps:i.id!==void 0,order:i.order}));Re(()=>g.value.constraints,(x,C)=>{(C.collapsedSize!==x.collapsedSize||C.collapsible!==x.collapsible||C.maxSize!==x.maxSize||C.minSize!==x.minSize)&&d(g.value,C)},{deep:!0}),ft(()=>{const x=g.value;h(x),Fi(()=>{p(x)})});const b=G(()=>c(g.value,i.defaultSize)),Q=G(()=>u(g.value)),y=G(()=>!Q.value);function v(){o(g.value)}function S(){a(g.value)}function P(x){O(g.value,x)}return e({collapse:v,expand:S,getSize(){return l(g.value)},resize:P,isCollapsed:Q,isExpanded:y}),(x,C)=>(w(),D(m(Ae),{id:m($),style:Hn(b.value),as:x.as,"as-child":x.asChild,"data-panel":"","data-panel-collapsible":x.collapsible||void 0,"data-panel-group-id":m(f),"data-panel-id":m($),"data-panel-size":Number.parseFloat(`${b.value.flexGrow}`).toFixed(1),"data-state":x.collapsible?Q.value?"collapsed":"expanded":void 0},{default:V(()=>[re(x.$slots,"default",{isCollapsed:Q.value,isExpanded:y.value,expand:S,collapse:v,resize:P})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}}),iA=nA;function rA({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:i}){Zt(r=>{const s=i.value;if(t.value||n.value===null||s===null)return;const o=mf(e,s);if(o==null)return;const a=l=>{var c;if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),(c=n.value)==null||c.call(n,l);break}case"F6":{l.preventDefault();const u=o.getAttribute("data-panel-group-id");Ye(u);const O=yl(u,s),f=T1(u,e,s);Ye(f!==null);const d=l.shiftKey?f>0?f-1:O.length-1:f+1{o.removeEventListener("keydown",a)})})}var sA=M({__name:"SplitterResizeHandle",props:{id:{type:String,required:!1},hitAreaMargins:{type:Object,required:!1},tabindex:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Me(),{disabled:o}=an(n),a=L1();if(a===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:l,groupId:c,registerResizeHandle:u,startDragging:O,stopDragging:f,panelGroupElement:d}=a,h=yi(n.id,"reka-splitter-resize-handle"),p=ne("inactive"),$=ne(!1),g=ne(null),{nonce:b}=an(n),Q=v1(b);return Re(o,()=>{Kl&&(o.value?g.value=null:g.value=u(h))},{immediate:!0}),Zt(y=>{var P,x;if(o.value||g.value===null)return;const v=s.value;if(!v)return;Ye(v);const S=(C,Z,W)=>{var E;if(Z)switch(C){case"down":{p.value="drag",O(h,W),i("dragging",!0);break}case"move":{p.value!=="drag"&&(p.value="hover"),(E=g.value)==null||E.call(g,W);break}case"up":{p.value="hover",f(),i("dragging",!1);break}}else p.value="inactive"};y(W8(h,v,l,{coarse:((P=n.hitAreaMargins)==null?void 0:P.coarse)??15,fine:((x=n.hitAreaMargins)==null?void 0:x.fine)??5},Q,S))}),rA({disabled:o,resizeHandler:g,handleId:h,panelGroupElement:d}),(y,v)=>(w(),D(m(Ae),{id:m(h),ref:m(r),style:{touchAction:"none",userSelect:"none"},as:y.as,"as-child":y.asChild,role:"separator","data-resize-handle":"",tabindex:y.tabindex,"data-state":p.value,"data-disabled":m(o)?"":void 0,"data-orientation":m(l),"data-panel-group-id":m(c),"data-resize-handle-active":p.value==="drag"?"pointer":$.value?"keyboard":void 0,"data-resize-handle-state":p.value,"data-panel-resize-handle-enabled":!m(o),"data-panel-resize-handle-id":m(h),onBlur:v[0]||(v[0]=S=>$.value=!1),onFocus:v[1]||(v[1]=S=>$.value=!1)},{default:V(()=>[re(y.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),oA=sA;const[aA,lA]=hn("SwitchRoot");var cA=M({__name:"SwitchRoot",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=an(n),s=os(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function o(){r.value||(s.value=!s.value)}const{forwardRef:a,currentElement:l}=Me(),c=Tm(l),u=G(()=>{var O;return n.id&&l.value?(O=document.querySelector(`[for="${n.id}"]`))==null?void 0:O.innerText:void 0});return lA({modelValue:s,toggleCheck:o,disabled:r}),(O,f)=>(w(),D(m(Ae),me(O.$attrs,{id:O.id,ref:m(a),role:"switch",type:O.as==="button"?"button":void 0,value:O.value,"aria-label":O.$attrs["aria-label"]||u.value,"aria-checked":m(s),"aria-required":O.required,"data-state":m(s)?"checked":"unchecked","data-disabled":m(r)?"":void 0,"as-child":O.asChild,as:O.as,disabled:m(r),onClick:o,onKeydown:sf(on(o,["prevent"]),["enter"])}),{default:V(()=>[re(O.$slots,"default",{modelValue:m(s)}),m(c)&&O.name?(w(),D(m(u1),{key:0,type:"checkbox",name:O.name,disabled:m(r),required:O.required,value:O.value,checked:!!m(s)},null,8,["name","disabled","required","value","checked"])):pe("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),uA=cA,OA=M({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=aA();return Me(),(n,i)=>{var r;return w(),D(m(Ae),{"data-state":(r=m(e).modelValue)!=null&&r.value?"checked":"unchecked","data-disabled":m(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:V(()=>[re(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),fA=OA;const[Um,dA]=hn("TabsRoot");var hA=M({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{orientation:r,unmountOnHide:s,dir:o}=an(n),a=uf(o);Me();const l=os(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=ne();return dA({modelValue:l,changeModelValue:u=>{l.value=u},orientation:r,dir:a,unmountOnHide:s,activationMode:n.activationMode,baseId:yi(void 0,"reka-tabs"),tabsList:c}),(u,O)=>(w(),D(m(Ae),{dir:m(a),"data-orientation":m(r),"as-child":u.asChild,as:u.as},{default:V(()=>[re(u.$slots,"default",{modelValue:m(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),pA=hA;function W1(t,e){return`${t}-trigger-${e}`}function N1(t,e){return`${t}-content-${e}`}var mA=M({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=Me(),i=Um(),r=G(()=>W1(i.baseId,e.value)),s=G(()=>N1(i.baseId,e.value)),o=G(()=>e.value===i.modelValue.value),a=ne(o.value);return ft(()=>{requestAnimationFrame(()=>{a.value=!1})}),(l,c)=>(w(),D(m(Jl),{present:l.forceMount||o.value,"force-mount":""},{default:V(({present:u})=>[R(m(Ae),{id:s.value,ref:m(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":m(i).orientation.value,"aria-labelledby":r.value,hidden:!u,tabindex:"0",style:Hn({animationDuration:a.value?"0s":void 0})},{default:V(()=>[!m(i).unmountOnHide.value||u?re(l.$slots,"default",{key:0}):pe("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),gA=mA,$A=M({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{loop:n}=an(e),{forwardRef:i,currentElement:r}=Me(),s=Um();return s.tabsList=r,(o,a)=>(w(),D(m(c5),{"as-child":"",orientation:m(s).orientation.value,dir:m(s).dir.value,loop:m(n)},{default:V(()=>[R(m(Ae),{ref:m(i),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":m(s).orientation.value},{default:V(()=>[re(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),QA=$A,yA=M({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,{forwardRef:n}=Me(),i=Um(),r=G(()=>W1(i.baseId,e.value)),s=G(()=>N1(i.baseId,e.value)),o=G(()=>e.value===i.modelValue.value);return(a,l)=>(w(),D(m(l1),{"as-child":"",focusable:!a.disabled,active:o.value},{default:V(()=>[R(m(Ae),{id:r.value,ref:m(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":s.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":m(i).orientation.value,onMousedown:l[0]||(l[0]=on(c=>{!a.disabled&&c.ctrlKey===!1?m(i).changeModelValue(a.value):c.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=sf(c=>m(i).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const c=m(i).activationMode!=="manual";!o.value&&!a.disabled&&c&&m(i).changeModelValue(a.value)})},{default:V(()=>[re(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),bA=yA;function j1(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e{const e=PA(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(Dm);return a[0]===""&&a.length!==1&&a.shift(),G1(a,e)||SA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},G1=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?G1(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const s=t.join(Dm);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},hQ=/^\[(.+)\]$/,SA=t=>{if(hQ.test(t)){const e=hQ.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},PA=t=>{const{theme:e,classGroups:n}=t,i={nextPart:new Map,validators:[]};for(const r in n)Vh(n[r],i,r,e);return i},Vh=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const s=r===""?e:pQ(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(_A(r)){Vh(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{Vh(o,pQ(e,s),n,i)})})},pQ=(t,e)=>{let n=t;return e.split(Dm).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},_A=t=>t.isThemeGetter,xA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return r(s,o),o},set(s,o){n.has(s)?n.set(s,o):r(s,o)}}},Eh="!",Ah=":",wA=Ah.length,TA=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=r=>{const s=[];let o=0,a=0,l=0,c;for(let h=0;hl?c-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:O,maybePostfixModifierPosition:d}};if(e){const r=e+Ah,s=i;i=o=>o.startsWith(r)?s(o.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const r=i;i=s=>n({className:s,parseClassName:r})}return i},kA=t=>t.endsWith(Eh)?t.substring(0,t.length-1):t.startsWith(Eh)?t.substring(1):t,RA=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const r=[];let s=[];return i.forEach(o=>{o[0]==="["||e[o]?(r.push(...s.sort(),o),s=[]):s.push(o)}),r.push(...s.sort()),r}},CA=t=>({cache:xA(t.cacheSize),parseClassName:TA(t),sortModifiers:RA(t),...vA(t)}),XA=/\s+/,VA=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:s}=e,o=[],a=t.trim().split(XA);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:O,modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);if(O){l=u+(l.length>0?" "+l:l);continue}let $=!!p,g=i($?h.substring(0,p):h);if(!g){if(!$){l=u+(l.length>0?" "+l:l);continue}if(g=i(h),!g){l=u+(l.length>0?" "+l:l);continue}$=!1}const b=s(f).join(":"),Q=d?b+Eh:b,y=Q+g;if(o.includes(y))continue;o.push(y);const v=r(g,$);for(let S=0;S0?" "+l:l)}return l};function EA(){let t=0,e,n,i="";for(;t{if(typeof t=="string")return t;let e,n="";for(let i=0;iO(u),t());return n=CA(c),i=n.cache.get,r=n.cache.set,s=a,a(l)}function a(l){const c=i(l);if(c)return c;const u=VA(l,n);return r(l,u),u}return function(){return s(EA.apply(null,arguments))}}const Yt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},H1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,K1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qA=/^\d+\/\d+$/,ZA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zA=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lo=t=>qA.test(t),ze=t=>!!t&&!Number.isNaN(Number(t)),Yr=t=>!!t&&Number.isInteger(Number(t)),ld=t=>t.endsWith("%")&&ze(t.slice(0,-1)),sr=t=>ZA.test(t),UA=()=>!0,DA=t=>zA.test(t)&&!YA.test(t),J1=()=>!1,LA=t=>MA.test(t),WA=t=>IA.test(t),NA=t=>!ye(t)&&!be(t),jA=t=>ua(t,nP,J1),ye=t=>H1.test(t),ws=t=>ua(t,iP,DA),cd=t=>ua(t,KA,ze),mQ=t=>ua(t,eP,J1),BA=t=>ua(t,tP,WA),Zc=t=>ua(t,rP,LA),be=t=>K1.test(t),wa=t=>Oa(t,iP),GA=t=>Oa(t,JA),gQ=t=>Oa(t,eP),FA=t=>Oa(t,nP),HA=t=>Oa(t,tP),zc=t=>Oa(t,rP,!0),ua=(t,e,n)=>{const i=H1.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},Oa=(t,e,n=!1)=>{const i=K1.exec(t);return i?i[1]?e(i[1]):n:!1},eP=t=>t==="position"||t==="percentage",tP=t=>t==="image"||t==="url",nP=t=>t==="length"||t==="size"||t==="bg-size",iP=t=>t==="length",KA=t=>t==="number",JA=t=>t==="family-name",rP=t=>t==="shadow",e2=()=>{const t=Yt("color"),e=Yt("font"),n=Yt("text"),i=Yt("font-weight"),r=Yt("tracking"),s=Yt("leading"),o=Yt("breakpoint"),a=Yt("container"),l=Yt("spacing"),c=Yt("radius"),u=Yt("shadow"),O=Yt("inset-shadow"),f=Yt("text-shadow"),d=Yt("drop-shadow"),h=Yt("blur"),p=Yt("perspective"),$=Yt("aspect"),g=Yt("ease"),b=Yt("animate"),Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...y(),be,ye],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],x=()=>[be,ye,l],C=()=>[lo,"full","auto",...x()],Z=()=>[Yr,"none","subgrid",be,ye],W=()=>["auto",{span:["full",Yr,be,ye]},Yr,be,ye],E=()=>[Yr,"auto",be,ye],te=()=>["auto","min","max","fr",be,ye],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...x()],I=()=>[lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],z=()=>[t,be,ye],J=()=>[...y(),gQ,mQ,{position:[be,ye]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",FA,jA,{size:[be,ye]}],fe=()=>[ld,wa,ws],Te=()=>["","none","full",c,be,ye],Ee=()=>["",ze,wa,ws],Ke=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Xe=()=>[ze,ld,gQ,mQ],it=()=>["","none",h,be,ye],je=()=>["none",ze,be,ye],dt=()=>["none",ze,be,ye],Ht=()=>[ze,be,ye],wt=()=>[lo,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sr],breakpoint:[sr],color:[UA],container:[sr],"drop-shadow":[sr],ease:["in","out","in-out"],font:[NA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sr],shadow:[sr],spacing:["px",ze],text:[sr],"text-shadow":[sr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lo,ye,be,$]}],container:["container"],columns:[{columns:[ze,ye,be,a]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Yr,"auto",be,ye]}],basis:[{basis:[lo,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,lo,"auto","initial","none",ye]}],grow:[{grow:["",ze,be,ye]}],shrink:[{shrink:["",ze,be,ye]}],order:[{order:[Yr,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[a,"screen",...I()]}],"min-w":[{"min-w":[a,"screen","none",...I()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,wa,ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,be,cd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ld,ye]}],"font-family":[{font:[GA,ye,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,be,ye]}],"line-clamp":[{"line-clamp":[ze,"none",be,cd]}],leading:[{leading:[s,...x()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",be,ws]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ze,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yr,be,ye],radial:["",be,ye],conic:[Yr,be,ye]},HA,BA]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:Ee()}],"border-w-x":[{"border-x":Ee()}],"border-w-y":[{"border-y":Ee()}],"border-w-s":[{"border-s":Ee()}],"border-w-e":[{"border-e":Ee()}],"border-w-t":[{"border-t":Ee()}],"border-w-r":[{"border-r":Ee()}],"border-w-b":[{"border-b":Ee()}],"border-w-l":[{"border-l":Ee()}],"divide-x":[{"divide-x":Ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ke(),"hidden","none"]}],"divide-style":[{divide:[...Ke(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,be,ye]}],"outline-w":[{outline:["",ze,wa,ws]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,zc,Zc]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",O,zc,Zc]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ze,ws]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":Ee()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",f,zc,Zc]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ze,be,ye]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Xe()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Xe()}],"mask-image-t-to-pos":[{"mask-t-to":Xe()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Xe()}],"mask-image-r-to-pos":[{"mask-r-to":Xe()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Xe()}],"mask-image-b-to-pos":[{"mask-b-to":Xe()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Xe()}],"mask-image-l-to-pos":[{"mask-l-to":Xe()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Xe()}],"mask-image-x-to-pos":[{"mask-x-to":Xe()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Xe()}],"mask-image-y-to-pos":[{"mask-y-to":Xe()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":Xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Xe()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Xe()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:it()}],brightness:[{brightness:[ze,be,ye]}],contrast:[{contrast:[ze,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",d,zc,Zc]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ze,be,ye]}],"hue-rotate":[{"hue-rotate":[ze,be,ye]}],invert:[{invert:["",ze,be,ye]}],saturate:[{saturate:[ze,be,ye]}],sepia:[{sepia:["",ze,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":it()}],"backdrop-brightness":[{"backdrop-brightness":[ze,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[ze,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",ze,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[ze,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[ze,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",be,ye]}],ease:[{ease:["linear","initial",g,be,ye]}],delay:[{delay:[ze,be,ye]}],animate:[{animate:["none",b,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,be,ye]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:dt()}],"scale-x":[{"scale-x":dt()}],"scale-y":[{"scale-y":dt()}],"scale-z":[{"scale-z":dt()}],"scale-3d":["scale-3d"],skew:[{skew:Ht()}],"skew-x":[{"skew-x":Ht()}],"skew-y":[{"skew-y":Ht()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:wt()}],"translate-x":[{"translate-x":wt()}],"translate-y":[{"translate-y":wt()}],"translate-z":[{"translate-z":wt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ye]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ze,wa,ws,cd]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},t2=AA(e2);function Le(...t){return t2(B1(t))}const n2={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},sP=M({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},nonce:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class","withHandle"),s=Zn(r,i);return(o,a)=>(w(),D(m(oA),me({"data-slot":"resizable-handle"},m(s),{class:m(Le)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:V(()=>[n.withHandle?(w(),j("div",n2,[R(m(xX),{class:"size-2.5"})])):pe("",!0)]),_:1},16,["class"]))}}),rO=M({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},emits:["collapse","expand","resize"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(iA),me({"data-slot":"resizable-panel"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),oP=M({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(tA),me({"data-slot":"resizable-panel-group"},m(s),{class:m(Le)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:V(()=>[re(o.$slots,"default")]),_:3},16,["class"]))}}),i2=M({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(pA),me({"data-slot":"tabs"},m(s),{class:m(Le)("flex flex-col gap-2",n.class)}),{default:V(()=>[re(o.$slots,"default")]),_:3},16,["class"]))}}),co=M({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(gA),me({"data-slot":"tabs-content",class:m(Le)("flex-1 outline-none",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),r2=M({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(QA),me({"data-slot":"tabs-list"},m(n),{class:m(Le)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-b-lg p-[3px]",e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),uo=M({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(bA),me({"data-slot":"tabs-trigger"},m(i),{class:m(Le)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[re(r.$slots,"default")]),_:3},16,["class"]))}}),$Q=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,QQ=B1,s2=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return QQ(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],O=s==null?void 0:s[c];if(u===null)return null;const f=$Q(u)||$Q(O);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[O,f]=u;return f===void 0||(c[O]=f),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:O,className:f,...d}=u;return Object.entries(d).every(h=>{let[p,$]=h;return Array.isArray($)?$.includes({...s,...a}[p]):{...s,...a}[p]===$})?[...c,O,f]:c},[]);return QQ(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},qt=M({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(t){const e=t;return(n,i)=>(w(),D(m(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:St(m(Le)(m(yf)({variant:n.variant,size:n.size}),e.class))},{default:V(()=>[re(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),yf=s2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Kt=[];for(let t=0;t<256;++t)Kt.push((t+256).toString(16).slice(1));function o2(t,e=0){return(Kt[t[e+0]]+Kt[t[e+1]]+Kt[t[e+2]]+Kt[t[e+3]]+"-"+Kt[t[e+4]]+Kt[t[e+5]]+"-"+Kt[t[e+6]]+Kt[t[e+7]]+"-"+Kt[t[e+8]]+Kt[t[e+9]]+"-"+Kt[t[e+10]]+Kt[t[e+11]]+Kt[t[e+12]]+Kt[t[e+13]]+Kt[t[e+14]]+Kt[t[e+15]]).toLowerCase()}let ud;const a2=new Uint8Array(16);function l2(){if(!ud){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ud=crypto.getRandomValues.bind(crypto)}return ud(a2)}const c2=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yQ={randomUUID:c2};function No(t,e,n){var r;if(yQ.randomUUID&&!t)return yQ.randomUUID();t=t||{};const i=t.random??((r=t.rng)==null?void 0:r.call(t))??l2();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,o2(i)}class aP{constructor(){de(this,"uuid","");de(this,"formula","");de(this,"calcValue","");de(this,"calcValue1","");de(this,"calcValue2","");de(this,"calcValue3","");de(this,"calcValue4","");de(this,"calcValue5","");de(this,"calcValue6","");de(this,"calcValue7","");de(this,"calcValue8","");de(this,"calcValue9","");de(this,"calcValue10","");de(this,"flatRate","");de(this,"value","");de(this,"dependencys",[]);this.uuid=No()}addDependency(e){this.dependencys.push(e)}toJSON(){return{formula:this.formula,calcValue:this.calcValue,calcValue1:this.calcValue1,calcValue2:this.calcValue2,calcValue3:this.calcValue3,calcValue4:this.calcValue4,calcValue5:this.calcValue5,calcValue6:this.calcValue6,calcValue7:this.calcValue7,calcValue8:this.calcValue8,calcValue9:this.calcValue9,calcValue10:this.calcValue10,flatRate:this.flatRate,value:this.value,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.formula=e.formula,this.value=e.value,this.flatRate=e.flatRate,this.calcValue=e.calcValue,this.calcValue1=e.calcValue1,this.calcValue2=e.calcValue2,this.calcValue3=e.calcValue3,this.calcValue4=e.calcValue4,this.calcValue5=e.calcValue5,this.calcValue6=e.calcValue6,this.calcValue7=e.calcValue7,this.calcValue8=e.calcValue8,this.calcValue9=e.calcValue9,this.calcValue10=e.calcValue10,e.dependencys.map(n=>{const i=new fa;i.fromJSON(n),this.dependencys.push(i)})}}class fa{constructor(){de(this,"uuid","");de(this,"relation","");de(this,"formula","");de(this,"borders",[]);this.uuid=No()}addBorder(e){this.borders.push(e)}toJSON(){return{formula:this.formula,relation:this.relation,borders:this.borders.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.relation=e.relation,this.formula=e.formula,e.borders.map(n=>{const i=new aP;i.fromJSON(n),this.borders.push(i)})}}class Ji{constructor(){de(this,"uuid","");de(this,"id","");de(this,"type",1);de(this,"isFocused",!1);de(this,"dependencys",[]);this.uuid=No(),this.id=this.uuid}hasDependencys(){return this.dependencys.length>0}toJSON(){return{id:this.id,type:this.type,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}getIdRecursiv(e){}fromJSON(e){this.id=e.id,this.type=e.type,e.dependencys.map(n=>{const i=new fa;i.fromJSON(n),this.dependencys.push(i)})}changeFocus(e){this.uuid==e?this.isFocused=!0:this.isFocused=!1}addDependency(e){this.dependencys.push(e)}insertItem(e,n){return!1}cutItem(e){return null}deleteItem(e){return!1}}var lP=(t=>(t[t.Product=1]="Product",t[t.CMS=2]="CMS",t[t.News=3]="News",t))(lP||{});class bQ extends Error{constructor(n,i,r){const s=n.status||n.status===0?n.status:"",o=n.statusText||"",a=`${s} ${o}`.trim(),l=a?`status code ${a}`:"an unknown error";super(`Request failed with ${l}: ${i.method} ${i.url}`);de(this,"response");de(this,"request");de(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=r}}class cP extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);de(this,"request");this.name="TimeoutError",this.request=n}}const vQ=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(r){if(r instanceof Error&&r.message==="unsupported BodyInit type")return!1;throw r}return t&&!e})(),u2=typeof globalThis.AbortController=="function",O2=typeof globalThis.ReadableStream=="function",f2=typeof globalThis.FormData=="function",uP=["get","post","put","patch","head","delete"],d2={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Od=2147483647,h2=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,OP=Symbol("stop"),p2={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},m2={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},g2=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,i]of t)e+=h2,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},$2=(t,e)=>{const n=Number(t.headers.get("content-length"))||0;let i=0;return t.status===204?(e&&e({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(r){const s=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function o(){const{done:a,value:l}=await s.read();if(a){r.close();return}if(e){i+=l.byteLength;const c=n===0?0:i/n;e({percent:c,transferredBytes:i,totalBytes:n},l)}r.enqueue(l),await o()}await o()}}),{status:t.status,statusText:t.statusText,headers:t.headers})},Q2=(t,e)=>{const n=g2(t.body);let i=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(r){const s=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();async function o(){const{done:a,value:l}=await s.read();if(a){e&&e({percent:1,transferredBytes:i,totalBytes:Math.max(n,i)},new Uint8Array),r.close();return}i+=l.byteLength;let c=n===0?0:i/n;(nt!==null&&typeof t=="object",Yc=(...t)=>{for(const e of t)if((!Ia(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Lm({},...t)},fP=(t={},e={})=>{const n=new globalThis.Headers(t),i=e instanceof globalThis.Headers,r=new globalThis.Headers(e);for(const[s,o]of r.entries())i&&o==="undefined"||o===void 0?n.delete(s):n.set(s,o);return n};function Mc(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:Lm(t[n]??[],e[n]??[])}const dP=(t={},e={})=>({beforeRequest:Mc(t,e,"beforeRequest"),beforeRetry:Mc(t,e,"beforeRetry"),afterResponse:Mc(t,e,"afterResponse"),beforeError:Mc(t,e,"beforeError")}),Lm=(...t)=>{let e={},n={},i={};for(const r of t)if(Array.isArray(r))Array.isArray(e)||(e=[]),e=[...e,...r];else if(Ia(r)){for(let[s,o]of Object.entries(r))Ia(o)&&s in e&&(o=Lm(e[s],o)),e={...e,[s]:o};Ia(r.hooks)&&(i=dP(i,r.hooks),e.hooks=i),Ia(r.headers)&&(n=fP(n,r.headers),e.headers=n)}return e},y2=t=>uP.includes(t)?t.toUpperCase():t,b2=["get","put","head","delete","options","trace"],v2=[408,413,429,500,502,503,504],S2=[413,429,503],SQ={limit:2,methods:b2,statusCodes:v2,afterStatusCodes:S2,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},P2=(t={})=>{if(typeof t=="number")return{...SQ,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...SQ,...t}};async function _2(t,e,n,i){return new Promise((r,s)=>{const o=setTimeout(()=>{n&&n.abort(),s(new cP(t))},i.timeout);i.fetch(t,e).then(r).catch(s).then(()=>{clearTimeout(o)})})}async function x2(t,{signal:e}){return new Promise((n,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",r,{once:!0}));function r(){clearTimeout(s),i(e.reason)}const s=setTimeout(()=>{e==null||e.removeEventListener("abort",r),n()},t)})}const w2=(t,e)=>{const n={};for(const i in e)!(i in m2)&&!(i in p2)&&!(i in t)&&(n[i]=e[i]);return n};class sO{constructor(e,n={}){de(this,"request");de(this,"abortController");de(this,"_retryCount",0);de(this,"_input");de(this,"_options");var i,r;if(this._input=e,this._options={...n,headers:fP(this._input.headers,n.headers),hooks:dP({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:y2(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:P2(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(u2){const s=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=s?AbortSignal.any([s,this.abortController.signal]):this.abortController.signal}if(vQ&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((r=(i=this._options).stringifyJson)==null?void 0:r.call(i,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(f2&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!vQ)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=Q2(this.request,this._options.onUploadProgress))}}static create(e,n){const i=new sO(e,n),r=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>Od)throw new RangeError(`The \`timeout\` option cannot be greater than ${Od}`);await Promise.resolve();let a=await i._fetch();for(const l of i._options.hooks.afterResponse){const c=await l(i.request,i._options,i._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(i._decorateResponse(a),!a.ok&&i._options.throwHttpErrors){let l=new bQ(a,i.request,i._options);for(const c of i._options.hooks.beforeError)l=await c(l);throw l}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!O2)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return $2(a.clone(),i._options.onDownloadProgress)}return a},o=(i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(r):r()).finally(async()=>{var a;i.request.bodyUsed||await((a=i.request.body)==null?void 0:a.cancel())});for(const[a,l]of Object.entries(d2))o[a]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||l);const c=await o;if(a==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await c.text())}return c[a]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof cP)throw e;if(e instanceof bQ){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(e.response.status)){let r=Number(i)*1e3;Number.isNaN(r)?r=Date.parse(i)-Date.now():r>=Date.parse("2024-01-01")&&(r-=Date.now());const s=this._options.retry.maxRetryAfter??r;return rthis._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){const i=Math.min(this._calculateRetryDelay(n),Od);if(this._retryCount<1)throw n;await x2(i,{signal:this._options.signal});for(const r of this._options.hooks.beforeRetry)if(await r({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===OP)return;return this._retry(e)}}async _fetch(){for(const i of this._options.hooks.beforeRequest){const r=await i(this.request,this._options);if(r instanceof Request){this.request=r;break}if(r instanceof Response)return r}const e=w2(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,e):_2(n,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const qh=t=>{const e=(n,i)=>sO.create(n,Yc(t,i));for(const n of uP)e[n]=(i,r)=>sO.create(i,Yc(t,r,{method:n}));return e.create=n=>qh(Yc(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),qh(Yc(t,n))),e.stop=OP,e},fd=qh(),zn=fd.create({prefixUrl:"/apps",timeout:1e4,hooks:{afterResponse:[(t,e,n)=>(console.log(n),n),async(t,e,n)=>{if(n.status===403){const i=await fd("https://example.com/token").text();return t.headers.set("Authorization",`token ${i}`),fd(t)}}]}}),T2=async t=>{try{return await(await zn.post("api/plugin/system/psc/xmlcalc/product/config",{json:{product:t}})).json()}catch(e){throw console.error("Error loading JSON from API:",e),e}},k2=async t=>{try{return await(await zn.post("api/plugin/system/psc/xmlcalc/price",{json:{product:t}})).json()}catch(e){throw console.error("Error loading price from API:",e),e}},R2=async(t,e,n)=>{try{return await(await zn.post("api/plugin/system/psc/xmlcalc/product/design",{json:{product:t,shop:e,jsonProduct:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},C2=async(t,e)=>{try{return await(await zn.post("api/plugin/system/psc/xmlcalc/product/xml",{json:{product:t,xml:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},X2=async(t,e)=>{try{return await(await zn.put("api/plugin/system/psc/xmlcalc/product/"+t,{json:{calcXml:e}})).json()}catch(n){throw console.error("Error XML to PRODUCT API:",n),n}},V2=async(t,e,n)=>{try{return await(await zn.put("api/plugin/system/psc/xmlcalc/shop/"+t,{json:{formel:e,parameter:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},E2=async(t,e)=>{try{return await(await zn.put("api/system/papercontainer",{json:{content:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},A2=async(t,e,n)=>{const i=new FormData;i.append("file",t),i.append("folder",e);try{return await(await zn.post("api/media/create",{body:i,onDownloadProgress:s=>{n(Math.round(s.percent*100))}})).json()}catch(r){throw console.error("Error uploading file:",r),r}},hP=async()=>{try{return await(await zn.get("api/media/folder/all")).json()}catch(t){throw console.error("Error fetching media directories:",t),t}},q2=async(t,e=1)=>{try{return await(await zn.get(`api/media/folder/${t}/page/${e}/12`)).json()}catch(n){throw console.error(`Error fetching media for folder ${t}:`,n),n}},Z2=async(t,e,n)=>{try{return await(await zn.post("api/plugin/custom/psc/formbuilder/layouts/add",{json:{title:t,data:n,shop:e}})).json()}catch(i){throw console.error("Error saving layout:",i),i}},z2=async t=>{try{return await(await zn.get("api/plugin/custom/psc/formbuilder/layouts/all/"+t)).json()}catch(e){throw console.error("Error fetching layouts:",e),e}},Y2=async(t,e,n)=>{try{return await(await zn.post("api/plugin/system/psc/xmlcalc/product/pd",{json:{shop:t,json:e,values:n}})).json()}catch(i){throw console.error("Error fetching preview:",i),i}},pP=async t=>{try{return(await(await zn.get(`api/media/${t}`)).json()).url}catch(e){throw console.error(`Error fetching media url for ${t}:`,e),e}};class PQ extends Ji{constructor(){super();de(this,"default","");de(this,"placeHolder","Placeholder");de(this,"required",!1);de(this,"name","");de(this,"xmlType","input");de(this,"minValue",0);de(this,"minCalc","");de(this,"maxCalc","");de(this,"maxValue",0);this.type=2}toJSON(){return Object.assign(super.toJSON(),{placeHolder:this.placeHolder,default:this.default,name:this.name,minValue:this.minValue,minCalc:this.minCalc,maxValue:this.maxValue,maxCalc:this.maxCalc,required:this.required})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.required=n.required,this.placeHolder=n.placeHolder,this.minValue=n.minValue,this.minCalc=n.minCalc,this.maxValue=n.maxValue,this.maxCalc=n.maxCalc}}class Ys extends Ji{constructor(){super();de(this,"items",[]);this.type=8}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),n.options.map(i=>{const r=io.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s{if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class mP extends Ji{constructor(){super();de(this,"columns",[]);this.type=7}addColumnAtTheEnd(n){this.columns.push(n)}addColumnAtTheBeginning(n){this.columns.unshift(n)}getIdRecursiv(n){this.columns.forEach(i=>{i.getIdRecursiv(n)})}deleteColumnAt(n){return this.columns.some((i,r)=>{if(i.uuid===n)return this.columns.splice(r,1)[0],!0})}addColumnAt(n,i){let r=!1;for(let s=0;s(n.push(i.toJSON()),n),[])})}cutItem(n){let i=null;return this.columns.some(r=>{if(i=r.cutItem(n),i!==null)return!0}),i}insertItem(n,i){return this.columns.some(r=>{if(r.insertItem(n,i))return!0}),!1}deleteItem(n){return this.columns.some(i=>{if(i.deleteItem(n))return!0}),!1}insertItemInEmptyColumn(n,i,r){return this.uuid==i?(r.items.push(n),!0):!1}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const r=new Ys;r.fromJSON(i),this.columns.push(r)})}}class gP extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","img");de(this,"url","");this.type=9}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class $P extends Ji{constructor(){super();de(this,"items",[]);de(this,"label","");this.type=12}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{label:this.label,options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),this.label=n.label,n.options.map(i=>{const r=io.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s{if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class QP extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","hidden");this.type=1,this.name="hidden"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}let yP=class{constructor(e){de(this,"uuid","");de(this,"id","");de(this,"name","");de(this,"dependencys",[]);this.uuid=No(),this.id=e}addDependency(e){this.dependencys.push(e)}toJSON(){return{id:this.id,name:this.name,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.name=e.name,this.id=e.id,e.dependencys.map(n=>{const i=new fa;i.fromJSON(n),this.dependencys.push(i)})}};class bP extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","select");de(this,"options",[]);de(this,"mode","normal");de(this,"container","");this.type=3}addOption(n){this.options.push(n)}hasDependencys(){return this.options.reduce((i,r)=>(r.dependencys.length>0&&(i=!0),i),!1)||super.hasDependencys()}toJSON(){return Object.assign(super.toJSON(),{default:this.default,mode:this.mode,container:this.container,options:this.options.reduce((n,i)=>(n.push(i.toJSON()),n),[]),name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.mode=n.mode,this.container=n.container,this.default=n.default,n.options.map(i=>{const r=new yP("");r.fromJSON(i),this.options.push(r)})}}class M2 extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","text");this.type=4,this.default="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class I2 extends Ji{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","text");this.type=5}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class vP extends Ji{constructor(){super();de(this,"default","");de(this,"variant","1");de(this,"name","");de(this,"xmlType","text");this.type=6,this.default="Headline"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name,variant:this.variant})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.variant=n.variant}}let io=class{static getModelForType(e){switch(e){case 12:return new $P;case 9:return new gP;case 8:return new Ys;case 7:return new mP;case 6:return new vP;case 5:return new I2;case 4:return new M2;case 3:return new bP;case 2:return new PQ;case 1:return new QP;default:return new PQ}}};const Vr=Z0("items",{state:()=>({uuid:No(),items:[],name:No()}),getters:{getCount:t=>t.items.length,getIdRecursiv(t){let e=[];return t.items.forEach(n=>{e.push(n.id),n.getIdRecursiv(e)}),e},getItems:t=>t.items,getUuid:t=>t.uuid},actions:{loadJSON(){let t=this.items.reduce((e,n)=>(e.push(n.toJSON()),e),[]);return[{uuid:this.uuid,name:this.name,options:t}]},parseJSON(t){this.items=[];let e=JSON.parse(t);this.name=e[0].name,e[0].uuid&&(this.uuid=e[0].uuid),e[0].options.map(n=>{const i=io.getModelForType(n.type);i.fromJSON(n),this.addElement(i)})},addElement(t){this.items.push(t)},deleteItem(t){return this.items.some((e,n)=>{if(e.uuid===t.uuid)return t=this.items.splice(n,1)[0],!0;if(e.deleteItem(t))return!0})},moveItemBefore(t,e){const n=this.cutItem(t);return n?this.insertItem(this.items,n,e):!1},addElementAfter(t,e){this.insertItem(this.items,t,e)},cutItem(t){let e=null;return this.items.some((n,i)=>{if(n.uuid===t)return e=this.items.splice(i,1)[0],!0;if(e===null&&(e=n.cutItem(t),e!==null))return!0}),e},insertItem(t,e,n){let i=!1;for(let r=0;r({activeItem:{},formulaData:[],formulaError:"",productUuid:"",isFormulaLoading:!1,showProperties:!1,showDependency:!1,showOptions:!1,showPreview:!1,showSaveLayoutDialog:!1,showLoadLayoutDialog:!1,sourceDragUuid:"",dragMode:"",json:"",xml:"",formulas:"",paperContainer:"",parameter:"",shopUuid:"",mode:lP.Product,saving:!1,syncing:!1,currentTab:"designer",previewData:null,isPreviewLoading:!1,previewError:""}),getters:{getActiveItem:t=>t.activeItem,isShowPropierties:t=>t.showProperties,isShowDependency:t=>t.showDependency,isShowOptions:t=>t.showOptions,isShowPreview:t=>t.showPreview,getSourceDragUuid:t=>t.sourceDragUuid,getShopUuid:t=>t.shopUuid,getDragMode:t=>t.dragMode,getFormulaData:t=>t.formulaData,getFormulaError:t=>t.formulaError,getPreviewData:t=>t.previewData},actions:{setXml(t){this.xml=t},setFormulas(t){this.formulas=t},setPaperContainer(t){this.paperContainer=t},setParameter(t){this.parameter=t},setMode(t){this.mode=t},setJson(t){this.json=t},setShowDependency(t){this.showDependency=t},setShowOptions(t){this.showOptions=t},setShowProperties(t){this.showProperties=t},setProductUuid(t){this.productUuid=t},setShowPreview(t){this.showPreview=t},setActiveItem(t){this.activeItem=t},setSourceDragUuid(t){this.sourceDragUuid=t},setDragMode(t){this.dragMode=t},setShowSaveLayoutDialog(t){this.showSaveLayoutDialog=t},setShowLoadLayoutDialog(t){this.showLoadLayoutDialog=t},setShopUuid(t){this.shopUuid=t},async loadConfigFromProductApi(t){const e=await T2(t);return this.json=e.json,this.xml=e.xml,this.parameter=e.parameter,this.formulas=e.formulas,this.paperContainer=e.paperContainer,this.shopUuid=e.shopUuid,e.json},async loadFormulaAnalyserDataFromApi(t){if(!(this.formulaData&&this.formulaData.length>0)){this.isFormulaLoading=!0,this.formulaError="";try{const e=await k2(t);if(e&&e.debug&&e.debug.graphJson)this.formulaData=JSON.parse(e.debug.graphJson);else throw new Error("Invalid or empty response format from API.")}catch(e){this.formulaError=`Failed to load formula data: ${e.message}`,console.error(e)}finally{this.isFormulaLoading=!1}}},setXML(t){this.xml=t},setJSON(t){this.json=t},saveDesign(t){R2(this.productUuid,this.shopUuid,t).then(e=>{this.setXML(e.xml),this.setJSON(e.json),this.formulaData=JSON.parse(e.jsonGraph)})},manualSave(){this.saving=!0,X2(this.productUuid,this.xml).then(t=>{this.saving=!1})},manualSync(){this.syncing=!0,this.currentTab=="xml"&&C2(this.productUuid,this.xml).then(t=>{this.setXML(t.xml),this.setJSON(t.json),this.formulaData=JSON.parse(t.jsonGraph),this.syncing=!1,Vr().parseJSON(t.json)}),(this.currentTab=="formulas"||this.currentTab=="parameter")&&V2(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1}),this.currentTab=="paperdb"&&E2(this.shopUuid,this.paperContainer).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setCurrentTab(t){this.currentTab=t},async loadPreview(t,e){this.previewError="";try{const n=await Y2(this.shopUuid,t,e);this.previewData=n}catch(n){this.previewError=`Failed to load preview data: ${n.message}`,console.error(n)}finally{this.isPreviewLoading=!1}}}}),U2={class:"w-full p-2 flex gap-2"},D2=M({__name:"TopBar",setup(t){const e=zt();function n(){e.manualSave()}function i(){e.setShowSaveLayoutDialog(!0)}return(r,s)=>(w(),j("div",U2,[R(m(qt),{onClick:n,disabled:m(e).saving},{default:V(()=>[_e(H(m(e).saving?r.$t("saving"):r.$t("save")),1)]),_:1},8,["disabled"]),R(m(qt),{onClick:i,variant:"outline"},{default:V(()=>[_e(H(r.$t("save_layout")),1)]),_:1})]))}}),L2=M({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(uA),me({"data-slot":"switch"},m(s),{class:m(Le)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[R(m(fA),{"data-slot":"switch-thumb",class:St(m(Le)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:V(()=>[re(o.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),Wm=M({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(PE),me({"data-slot":"label"},m(n),{class:m(Le)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}});/*! * shared v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const oO=typeof window<"u",ys=(t,e=!1)=>e?Symbol.for(t):Symbol(t),L2=(t,e,n)=>W2({l:t,k:e,s:n}),W2=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Et=t=>typeof t=="number"&&isFinite(t),N2=t=>Nm(t)==="[object Date]",jo=t=>Nm(t)==="[object RegExp]",bf=t=>Ie(t)&&Object.keys(t).length===0,Nt=Object.assign,j2=Object.create,st=(t=null)=>j2(t);let _Q;const Vs=()=>_Q||(_Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:st());function xQ(t){return t.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const B2=Object.prototype.hasOwnProperty;function pi(t,e){return B2.call(t,e)}const Tt=Array.isArray,gt=t=>typeof t=="function",Qe=t=>typeof t=="string",et=t=>typeof t=="boolean",nt=t=>t!==null&&typeof t=="object",G2=t=>nt(t)&>(t.then)&>(t.catch),vP=Object.prototype.toString,Nm=t=>vP.call(t),Ie=t=>Nm(t)==="[object Object]",F2=t=>t==null?"":Tt(t)||Ie(t)&&t.toString===vP?JSON.stringify(t,null,2):String(t);function jm(t,e=""){return t.reduce((n,i,r)=>r===0?n+i:n+e+i,"")}function H2(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const Ic=t=>!nt(t)||Tt(t);function yu(t,e){if(Ic(t)||Ic(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:r}=n.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(nt(i[s])&&!nt(r[s])&&(r[s]=Array.isArray(i[s])?[]:st()),Ic(r[s])||Ic(i[s])?r[s]=i[s]:n.push({src:i[s],des:r[s]}))})}}/*! + */const oO=typeof window<"u",ys=(t,e=!1)=>e?Symbol.for(t):Symbol(t),W2=(t,e,n)=>N2({l:t,k:e,s:n}),N2=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Et=t=>typeof t=="number"&&isFinite(t),j2=t=>Nm(t)==="[object Date]",jo=t=>Nm(t)==="[object RegExp]",bf=t=>Ie(t)&&Object.keys(t).length===0,Nt=Object.assign,B2=Object.create,st=(t=null)=>B2(t);let _Q;const Vs=()=>_Q||(_Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:st());function xQ(t){return t.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const G2=Object.prototype.hasOwnProperty;function pi(t,e){return G2.call(t,e)}const Tt=Array.isArray,$t=t=>typeof t=="function",Qe=t=>typeof t=="string",et=t=>typeof t=="boolean",nt=t=>t!==null&&typeof t=="object",F2=t=>nt(t)&&$t(t.then)&&$t(t.catch),SP=Object.prototype.toString,Nm=t=>SP.call(t),Ie=t=>Nm(t)==="[object Object]",H2=t=>t==null?"":Tt(t)||Ie(t)&&t.toString===SP?JSON.stringify(t,null,2):String(t);function jm(t,e=""){return t.reduce((n,i,r)=>r===0?n+i:n+e+i,"")}function K2(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const Ic=t=>!nt(t)||Tt(t);function yu(t,e){if(Ic(t)||Ic(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:r}=n.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(nt(i[s])&&!nt(r[s])&&(r[s]=Array.isArray(i[s])?[]:st()),Ic(r[s])||Ic(i[s])?r[s]=i[s]:n.push({src:i[s],des:r[s]}))})}}/*! * message-compiler v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function K2(t,e,n){return{line:t,column:e,offset:n}}function Zh(t,e,n){return{start:t,end:e}}const rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},J2=17;function vf(t,e,n={}){const{domain:i,messages:r,args:s}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function eq(t){throw t}const or=" ",tq="\r",gn=` -`,nq="\u2028",iq="\u2029";function rq(t){const e=t;let n=0,i=1,r=1,s=0;const o=P=>e[P]===tq&&e[P+1]===gn,a=P=>e[P]===gn,l=P=>e[P]===iq,c=P=>e[P]===nq,u=P=>o(P)||a(P)||l(P)||c(P),O=()=>n,f=()=>i,d=()=>r,h=()=>s,p=P=>o(P)||l(P)||c(P)?gn:e[P],$=()=>p(n),g=()=>p(n+s);function b(){return s=0,u(n)&&(i++,r=0),o(n)&&n++,n++,r++,e[n]}function Q(){return o(n+s)&&s++,s++,e[n+s]}function y(){n=0,i=1,r=1,s=0}function v(P=0){s=P}function S(){const P=n+s;for(;P!==n;)b();s=0}return{index:O,line:f,column:d,peekOffset:h,charAt:p,currentChar:$,currentPeek:g,next:b,peek:Q,reset:y,resetPeek:v,skipToPeek:S}}const Mr=void 0,sq=".",wQ="'",oq="tokenizer";function aq(t,e={}){const n=e.location!==!1,i=rq(t),r=()=>i.index(),s=()=>K2(i.line(),i.column(),i.index()),o=s(),a=r(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function O(_,T,Y,...N){const ee=c();if(T.column+=Y,T.offset+=Y,u){const ae=n?Zh(ee.startLoc,T):null,A=vf(_,ae,{domain:oq,args:N});u(A)}}function f(_,T,Y){_.endLoc=s(),_.currentType=T;const N={type:T};return n&&(N.loc=Zh(_.startLoc,_.endLoc)),Y!=null&&(N.value=Y),N}const d=_=>f(_,13);function h(_,T){return _.currentChar()===T?(_.next(),T):(O(rt.EXPECTED_TOKEN,s(),0,T),"")}function p(_){let T="";for(;_.currentPeek()===or||_.currentPeek()===gn;)T+=_.currentPeek(),_.peek();return T}function $(_){const T=p(_);return _.skipToPeek(),T}function g(_){if(_===Mr)return!1;const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T===95}function b(_){if(_===Mr)return!1;const T=_.charCodeAt(0);return T>=48&&T<=57}function Q(_,T){const{currentType:Y}=T;if(Y!==2)return!1;p(_);const N=g(_.currentPeek());return _.resetPeek(),N}function y(_,T){const{currentType:Y}=T;if(Y!==2)return!1;p(_);const N=_.currentPeek()==="-"?_.peek():_.currentPeek(),ee=b(N);return _.resetPeek(),ee}function v(_,T){const{currentType:Y}=T;if(Y!==2)return!1;p(_);const N=_.currentPeek()===wQ;return _.resetPeek(),N}function S(_,T){const{currentType:Y}=T;if(Y!==7)return!1;p(_);const N=_.currentPeek()===".";return _.resetPeek(),N}function P(_,T){const{currentType:Y}=T;if(Y!==8)return!1;p(_);const N=g(_.currentPeek());return _.resetPeek(),N}function x(_,T){const{currentType:Y}=T;if(!(Y===7||Y===11))return!1;p(_);const N=_.currentPeek()===":";return _.resetPeek(),N}function C(_,T){const{currentType:Y}=T;if(Y!==9)return!1;const N=()=>{const ae=_.currentPeek();return ae==="{"?g(_.peek()):ae==="@"||ae==="|"||ae===":"||ae==="."||ae===or||!ae?!1:ae===gn?(_.peek(),N()):W(_,!1)},ee=N();return _.resetPeek(),ee}function Z(_){p(_);const T=_.currentPeek()==="|";return _.resetPeek(),T}function W(_,T=!0){const Y=(ee=!1,ae="")=>{const A=_.currentPeek();return A==="{"||A==="@"||!A?ee:A==="|"?!(ae===or||ae===gn):A===or?(_.peek(),Y(!0,or)):A===gn?(_.peek(),Y(!0,gn)):!0},N=Y();return T&&_.resetPeek(),N}function E(_,T){const Y=_.currentChar();return Y===Mr?Mr:T(Y)?(_.next(),Y):null}function te(_){const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36}function se(_){return E(_,te)}function le(_){const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36||T===45}function F(_){return E(_,le)}function I(_){const T=_.charCodeAt(0);return T>=48&&T<=57}function z(_){return E(_,I)}function J(_){const T=_.charCodeAt(0);return T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102}function ue(_){return E(_,J)}function Se(_){let T="",Y="";for(;T=z(_);)Y+=T;return Y}function fe(_){let T="";for(;;){const Y=_.currentChar();if(Y==="{"||Y==="}"||Y==="@"||Y==="|"||!Y)break;if(Y===or||Y===gn)if(W(_))T+=Y,_.next();else{if(Z(_))break;T+=Y,_.next()}else T+=Y,_.next()}return T}function Te(_){$(_);let T="",Y="";for(;T=F(_);)Y+=T;return _.currentChar()===Mr&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),Y}function Ee(_){$(_);let T="";return _.currentChar()==="-"?(_.next(),T+=`-${Se(_)}`):T+=Se(_),_.currentChar()===Mr&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),T}function Ke(_){return _!==wQ&&_!==gn}function Ze(_){$(_),h(_,"'");let T="",Y="";for(;T=E(_,Ke);)T==="\\"?Y+=Xe(_):Y+=T;const N=_.currentChar();return N===gn||N===Mr?(O(rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),N===gn&&(_.next(),h(_,"'")),Y):(h(_,"'"),Y)}function Xe(_){const T=_.currentChar();switch(T){case"\\":case"'":return _.next(),`\\${T}`;case"u":return it(_,T,4);case"U":return it(_,T,6);default:return O(rt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,T),""}}function it(_,T,Y){h(_,T);let N="";for(let ee=0;ee{const N=_.currentChar();return N==="{"||N==="@"||N==="|"||N==="("||N===")"||!N||N===or?Y:(Y+=N,_.next(),T(Y))};return T("")}function X(_){$(_);const T=h(_,"|");return $(_),T}function q(_,T){let Y=null;switch(_.currentChar()){case"{":return T.braceNest>=1&&O(rt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),_.next(),Y=f(T,2,"{"),$(_),T.braceNest++,Y;case"}":return T.braceNest>0&&T.currentType===2&&O(rt.EMPTY_PLACEHOLDER,s(),0),_.next(),Y=f(T,3,"}"),T.braceNest--,T.braceNest>0&&$(_),T.inLinked&&T.braceNest===0&&(T.inLinked=!1),Y;case"@":return T.braceNest>0&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),Y=j(_,T)||d(T),T.braceNest=0,Y;default:{let ee=!0,ae=!0,A=!0;if(Z(_))return T.braceNest>0&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),Y=f(T,1,X(_)),T.braceNest=0,T.inLinked=!1,Y;if(T.braceNest>0&&(T.currentType===4||T.currentType===5||T.currentType===6))return O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),T.braceNest=0,oe(_,T);if(ee=Q(_,T))return Y=f(T,4,Te(_)),$(_),Y;if(ae=y(_,T))return Y=f(T,5,Ee(_)),$(_),Y;if(A=v(_,T))return Y=f(T,6,Ze(_)),$(_),Y;if(!ee&&!ae&&!A)return Y=f(T,12,ft(_)),O(rt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,Y.value),$(_),Y;break}}return Y}function j(_,T){const{currentType:Y}=T;let N=null;const ee=_.currentChar();switch((Y===7||Y===8||Y===11||Y===9)&&(ee===gn||ee===or)&&O(rt.INVALID_LINKED_FORMAT,s(),0),ee){case"@":return _.next(),N=f(T,7,"@"),T.inLinked=!0,N;case".":return $(_),_.next(),f(T,8,".");case":":return $(_),_.next(),f(T,9,":");default:return Z(_)?(N=f(T,1,X(_)),T.braceNest=0,T.inLinked=!1,N):S(_,T)||x(_,T)?($(_),j(_,T)):P(_,T)?($(_),f(T,11,Ht(_))):C(_,T)?($(_),ee==="{"?q(_,T)||N:f(T,10,wt(_))):(Y===7&&O(rt.INVALID_LINKED_FORMAT,s(),0),T.braceNest=0,T.inLinked=!1,oe(_,T))}}function oe(_,T){let Y={type:13};if(T.braceNest>0)return q(_,T)||d(T);if(T.inLinked)return j(_,T)||d(T);switch(_.currentChar()){case"{":return q(_,T)||d(T);case"}":return O(rt.UNBALANCED_CLOSING_BRACE,s(),0),_.next(),f(T,3,"}");case"@":return j(_,T)||d(T);default:{if(Z(_))return Y=f(T,1,X(_)),T.braceNest=0,T.inLinked=!1,Y;if(W(_))return f(T,0,fe(_));break}}return Y}function ie(){const{currentType:_,offset:T,startLoc:Y,endLoc:N}=l;return l.lastType=_,l.lastOffset=T,l.lastStartLoc=Y,l.lastEndLoc=N,l.offset=r(),l.startLoc=s(),i.currentChar()===Mr?f(l,13):oe(i,l)}return{nextToken:ie,currentOffset:r,currentPosition:s,context:c}}const lq="parser",cq=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function uq(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function Oq(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,b,Q,y,...v){const S=g.currentPosition();if(S.offset+=y,S.column+=y,n){const P=e?Zh(Q,S):null,x=vf(b,P,{domain:lq,args:v});n(x)}}function r(g,b,Q){const y={type:g};return e&&(y.start=b,y.end=b,y.loc={start:Q,end:Q}),y}function s(g,b,Q,y){e&&(g.end=b,g.loc&&(g.loc.end=Q))}function o(g,b){const Q=g.context(),y=r(3,Q.offset,Q.startLoc);return y.value=b,s(y,g.currentOffset(),g.currentPosition()),y}function a(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(5,y,v);return S.index=parseInt(b,10),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function l(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(4,y,v);return S.key=b,g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function c(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(9,y,v);return S.value=b.replace(cq,uq),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function u(g){const b=g.nextToken(),Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(8,y,v);return b.type!==11?(i(g,rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,Q.lastStartLoc,0),S.value="",s(S,y,v),{nextConsumeToken:b,node:S}):(b.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,wi(b)),S.value=b.value||"",s(S,g.currentOffset(),g.currentPosition()),{node:S})}function O(g,b){const Q=g.context(),y=r(7,Q.offset,Q.startLoc);return y.value=b,s(y,g.currentOffset(),g.currentPosition()),y}function f(g){const b=g.context(),Q=r(6,b.offset,b.startLoc);let y=g.nextToken();if(y.type===8){const v=u(g);Q.modifier=v.node,y=v.nextConsumeToken||g.nextToken()}switch(y.type!==9&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),y=g.nextToken(),y.type===2&&(y=g.nextToken()),y.type){case 10:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=O(g,y.value||"");break;case 4:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=l(g,y.value||"");break;case 5:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=a(g,y.value||"");break;case 6:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=c(g,y.value||"");break;default:{i(g,rt.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const v=g.context(),S=r(7,v.offset,v.startLoc);return S.value="",s(S,v.offset,v.startLoc),Q.key=S,s(Q,v.offset,v.startLoc),{nextConsumeToken:y,node:Q}}}return s(Q,g.currentOffset(),g.currentPosition()),{node:Q}}function d(g){const b=g.context(),Q=b.currentType===1?g.currentOffset():b.offset,y=b.currentType===1?b.endLoc:b.startLoc,v=r(2,Q,y);v.items=[];let S=null;do{const C=S||g.nextToken();switch(S=null,C.type){case 0:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(o(g,C.value||""));break;case 5:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(a(g,C.value||""));break;case 4:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(l(g,C.value||""));break;case 6:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(c(g,C.value||""));break;case 7:{const Z=f(g);v.items.push(Z.node),S=Z.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const P=b.currentType===1?b.lastOffset:g.currentOffset(),x=b.currentType===1?b.lastEndLoc:g.currentPosition();return s(v,P,x),v}function h(g,b,Q,y){const v=g.context();let S=y.items.length===0;const P=r(1,b,Q);P.cases=[],P.cases.push(y);do{const x=d(g);S||(S=x.items.length===0),P.cases.push(x)}while(v.currentType!==13);return S&&i(g,rt.MUST_HAVE_MESSAGES_IN_PLURAL,Q,0),s(P,g.currentOffset(),g.currentPosition()),P}function p(g){const b=g.context(),{offset:Q,startLoc:y}=b,v=d(g);return b.currentType===13?v:h(g,Q,y,v)}function $(g){const b=aq(g,Nt({},t)),Q=b.context(),y=r(0,Q.offset,Q.startLoc);return e&&y.loc&&(y.loc.source=g),y.body=p(b),t.onCacheKey&&(y.cacheKey=t.onCacheKey(g)),Q.currentType!==13&&i(b,rt.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,g[Q.offset]||""),s(y,b.currentOffset(),b.currentPosition()),y}return{parse:$}}function wi(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function fq(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function TQ(t,e){for(let n=0;nkQ(n)),t}function kQ(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;no;function l(p,$){o.code+=p}function c(p,$=!0){const g=$?i:"";l(r?g+" ".repeat(p):g)}function u(p=!0){const $=++o.indentLevel;p&&c($)}function O(p=!0){const $=--o.indentLevel;p&&c($)}function f(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:O,newline:f,helper:p=>`_${p}`,needIndent:()=>o.needIndent}}function mq(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Bo(t,e.key),e.modifier?(t.push(", "),Bo(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function gq(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const r=e.items.length;for(let s=0;s1){t.push(`${n("plural")}([`),t.indent(i());const r=e.cases.length;for(let s=0;s{const n=Qe(e.mode)?e.mode:"normal",i=Qe(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` -`,s=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=pq(t,{filename:i,breakLineCode:r,needIndent:s});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),o.length>0&&(a.push(`const { ${jm(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Bo(a,t),a.deindent(s),a.push("}"),delete t.helpers;const{code:l,map:c}=a.context();return{ast:t,code:l,map:c?c.toJSON():void 0}};function bq(t,e={}){const n=Nt({},e),i=!!n.jit,r=!!n.minify,s=n.optimize==null?!0:n.optimize,a=Oq(n).parse(t);return i?(s&&hq(a),r&&mo(a),{ast:a,code:""}):(dq(a,n),yq(a,n))}/*! + */function J2(t,e,n){return{line:t,column:e,offset:n}}function Zh(t,e,n){return{start:t,end:e}}const rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},eq=17;function vf(t,e,n={}){const{domain:i,messages:r,args:s}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function tq(t){throw t}const or=" ",nq="\r",gn=` +`,iq="\u2028",rq="\u2029";function sq(t){const e=t;let n=0,i=1,r=1,s=0;const o=P=>e[P]===nq&&e[P+1]===gn,a=P=>e[P]===gn,l=P=>e[P]===rq,c=P=>e[P]===iq,u=P=>o(P)||a(P)||l(P)||c(P),O=()=>n,f=()=>i,d=()=>r,h=()=>s,p=P=>o(P)||l(P)||c(P)?gn:e[P],$=()=>p(n),g=()=>p(n+s);function b(){return s=0,u(n)&&(i++,r=0),o(n)&&n++,n++,r++,e[n]}function Q(){return o(n+s)&&s++,s++,e[n+s]}function y(){n=0,i=1,r=1,s=0}function v(P=0){s=P}function S(){const P=n+s;for(;P!==n;)b();s=0}return{index:O,line:f,column:d,peekOffset:h,charAt:p,currentChar:$,currentPeek:g,next:b,peek:Q,reset:y,resetPeek:v,skipToPeek:S}}const Mr=void 0,oq=".",wQ="'",aq="tokenizer";function lq(t,e={}){const n=e.location!==!1,i=sq(t),r=()=>i.index(),s=()=>J2(i.line(),i.column(),i.index()),o=s(),a=r(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function O(_,T,Y,...N){const ee=c();if(T.column+=Y,T.offset+=Y,u){const ae=n?Zh(ee.startLoc,T):null,A=vf(_,ae,{domain:aq,args:N});u(A)}}function f(_,T,Y){_.endLoc=s(),_.currentType=T;const N={type:T};return n&&(N.loc=Zh(_.startLoc,_.endLoc)),Y!=null&&(N.value=Y),N}const d=_=>f(_,13);function h(_,T){return _.currentChar()===T?(_.next(),T):(O(rt.EXPECTED_TOKEN,s(),0,T),"")}function p(_){let T="";for(;_.currentPeek()===or||_.currentPeek()===gn;)T+=_.currentPeek(),_.peek();return T}function $(_){const T=p(_);return _.skipToPeek(),T}function g(_){if(_===Mr)return!1;const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T===95}function b(_){if(_===Mr)return!1;const T=_.charCodeAt(0);return T>=48&&T<=57}function Q(_,T){const{currentType:Y}=T;if(Y!==2)return!1;p(_);const N=g(_.currentPeek());return _.resetPeek(),N}function y(_,T){const{currentType:Y}=T;if(Y!==2)return!1;p(_);const N=_.currentPeek()==="-"?_.peek():_.currentPeek(),ee=b(N);return _.resetPeek(),ee}function v(_,T){const{currentType:Y}=T;if(Y!==2)return!1;p(_);const N=_.currentPeek()===wQ;return _.resetPeek(),N}function S(_,T){const{currentType:Y}=T;if(Y!==7)return!1;p(_);const N=_.currentPeek()===".";return _.resetPeek(),N}function P(_,T){const{currentType:Y}=T;if(Y!==8)return!1;p(_);const N=g(_.currentPeek());return _.resetPeek(),N}function x(_,T){const{currentType:Y}=T;if(!(Y===7||Y===11))return!1;p(_);const N=_.currentPeek()===":";return _.resetPeek(),N}function C(_,T){const{currentType:Y}=T;if(Y!==9)return!1;const N=()=>{const ae=_.currentPeek();return ae==="{"?g(_.peek()):ae==="@"||ae==="|"||ae===":"||ae==="."||ae===or||!ae?!1:ae===gn?(_.peek(),N()):W(_,!1)},ee=N();return _.resetPeek(),ee}function Z(_){p(_);const T=_.currentPeek()==="|";return _.resetPeek(),T}function W(_,T=!0){const Y=(ee=!1,ae="")=>{const A=_.currentPeek();return A==="{"||A==="@"||!A?ee:A==="|"?!(ae===or||ae===gn):A===or?(_.peek(),Y(!0,or)):A===gn?(_.peek(),Y(!0,gn)):!0},N=Y();return T&&_.resetPeek(),N}function E(_,T){const Y=_.currentChar();return Y===Mr?Mr:T(Y)?(_.next(),Y):null}function te(_){const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36}function se(_){return E(_,te)}function le(_){const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36||T===45}function F(_){return E(_,le)}function I(_){const T=_.charCodeAt(0);return T>=48&&T<=57}function z(_){return E(_,I)}function J(_){const T=_.charCodeAt(0);return T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102}function ue(_){return E(_,J)}function Se(_){let T="",Y="";for(;T=z(_);)Y+=T;return Y}function fe(_){let T="";for(;;){const Y=_.currentChar();if(Y==="{"||Y==="}"||Y==="@"||Y==="|"||!Y)break;if(Y===or||Y===gn)if(W(_))T+=Y,_.next();else{if(Z(_))break;T+=Y,_.next()}else T+=Y,_.next()}return T}function Te(_){$(_);let T="",Y="";for(;T=F(_);)Y+=T;return _.currentChar()===Mr&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),Y}function Ee(_){$(_);let T="";return _.currentChar()==="-"?(_.next(),T+=`-${Se(_)}`):T+=Se(_),_.currentChar()===Mr&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),T}function Ke(_){return _!==wQ&&_!==gn}function Ze(_){$(_),h(_,"'");let T="",Y="";for(;T=E(_,Ke);)T==="\\"?Y+=Xe(_):Y+=T;const N=_.currentChar();return N===gn||N===Mr?(O(rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),N===gn&&(_.next(),h(_,"'")),Y):(h(_,"'"),Y)}function Xe(_){const T=_.currentChar();switch(T){case"\\":case"'":return _.next(),`\\${T}`;case"u":return it(_,T,4);case"U":return it(_,T,6);default:return O(rt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,T),""}}function it(_,T,Y){h(_,T);let N="";for(let ee=0;ee{const N=_.currentChar();return N==="{"||N==="@"||N==="|"||N==="("||N===")"||!N||N===or?Y:(Y+=N,_.next(),T(Y))};return T("")}function X(_){$(_);const T=h(_,"|");return $(_),T}function q(_,T){let Y=null;switch(_.currentChar()){case"{":return T.braceNest>=1&&O(rt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),_.next(),Y=f(T,2,"{"),$(_),T.braceNest++,Y;case"}":return T.braceNest>0&&T.currentType===2&&O(rt.EMPTY_PLACEHOLDER,s(),0),_.next(),Y=f(T,3,"}"),T.braceNest--,T.braceNest>0&&$(_),T.inLinked&&T.braceNest===0&&(T.inLinked=!1),Y;case"@":return T.braceNest>0&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),Y=B(_,T)||d(T),T.braceNest=0,Y;default:{let ee=!0,ae=!0,A=!0;if(Z(_))return T.braceNest>0&&O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),Y=f(T,1,X(_)),T.braceNest=0,T.inLinked=!1,Y;if(T.braceNest>0&&(T.currentType===4||T.currentType===5||T.currentType===6))return O(rt.UNTERMINATED_CLOSING_BRACE,s(),0),T.braceNest=0,oe(_,T);if(ee=Q(_,T))return Y=f(T,4,Te(_)),$(_),Y;if(ae=y(_,T))return Y=f(T,5,Ee(_)),$(_),Y;if(A=v(_,T))return Y=f(T,6,Ze(_)),$(_),Y;if(!ee&&!ae&&!A)return Y=f(T,12,dt(_)),O(rt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,Y.value),$(_),Y;break}}return Y}function B(_,T){const{currentType:Y}=T;let N=null;const ee=_.currentChar();switch((Y===7||Y===8||Y===11||Y===9)&&(ee===gn||ee===or)&&O(rt.INVALID_LINKED_FORMAT,s(),0),ee){case"@":return _.next(),N=f(T,7,"@"),T.inLinked=!0,N;case".":return $(_),_.next(),f(T,8,".");case":":return $(_),_.next(),f(T,9,":");default:return Z(_)?(N=f(T,1,X(_)),T.braceNest=0,T.inLinked=!1,N):S(_,T)||x(_,T)?($(_),B(_,T)):P(_,T)?($(_),f(T,11,Ht(_))):C(_,T)?($(_),ee==="{"?q(_,T)||N:f(T,10,wt(_))):(Y===7&&O(rt.INVALID_LINKED_FORMAT,s(),0),T.braceNest=0,T.inLinked=!1,oe(_,T))}}function oe(_,T){let Y={type:13};if(T.braceNest>0)return q(_,T)||d(T);if(T.inLinked)return B(_,T)||d(T);switch(_.currentChar()){case"{":return q(_,T)||d(T);case"}":return O(rt.UNBALANCED_CLOSING_BRACE,s(),0),_.next(),f(T,3,"}");case"@":return B(_,T)||d(T);default:{if(Z(_))return Y=f(T,1,X(_)),T.braceNest=0,T.inLinked=!1,Y;if(W(_))return f(T,0,fe(_));break}}return Y}function ie(){const{currentType:_,offset:T,startLoc:Y,endLoc:N}=l;return l.lastType=_,l.lastOffset=T,l.lastStartLoc=Y,l.lastEndLoc=N,l.offset=r(),l.startLoc=s(),i.currentChar()===Mr?f(l,13):oe(i,l)}return{nextToken:ie,currentOffset:r,currentPosition:s,context:c}}const cq="parser",uq=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Oq(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function fq(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,b,Q,y,...v){const S=g.currentPosition();if(S.offset+=y,S.column+=y,n){const P=e?Zh(Q,S):null,x=vf(b,P,{domain:cq,args:v});n(x)}}function r(g,b,Q){const y={type:g};return e&&(y.start=b,y.end=b,y.loc={start:Q,end:Q}),y}function s(g,b,Q,y){e&&(g.end=b,g.loc&&(g.loc.end=Q))}function o(g,b){const Q=g.context(),y=r(3,Q.offset,Q.startLoc);return y.value=b,s(y,g.currentOffset(),g.currentPosition()),y}function a(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(5,y,v);return S.index=parseInt(b,10),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function l(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(4,y,v);return S.key=b,g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function c(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(9,y,v);return S.value=b.replace(uq,Oq),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function u(g){const b=g.nextToken(),Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(8,y,v);return b.type!==11?(i(g,rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,Q.lastStartLoc,0),S.value="",s(S,y,v),{nextConsumeToken:b,node:S}):(b.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,wi(b)),S.value=b.value||"",s(S,g.currentOffset(),g.currentPosition()),{node:S})}function O(g,b){const Q=g.context(),y=r(7,Q.offset,Q.startLoc);return y.value=b,s(y,g.currentOffset(),g.currentPosition()),y}function f(g){const b=g.context(),Q=r(6,b.offset,b.startLoc);let y=g.nextToken();if(y.type===8){const v=u(g);Q.modifier=v.node,y=v.nextConsumeToken||g.nextToken()}switch(y.type!==9&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),y=g.nextToken(),y.type===2&&(y=g.nextToken()),y.type){case 10:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=O(g,y.value||"");break;case 4:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=l(g,y.value||"");break;case 5:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=a(g,y.value||"");break;case 6:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(y)),Q.key=c(g,y.value||"");break;default:{i(g,rt.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const v=g.context(),S=r(7,v.offset,v.startLoc);return S.value="",s(S,v.offset,v.startLoc),Q.key=S,s(Q,v.offset,v.startLoc),{nextConsumeToken:y,node:Q}}}return s(Q,g.currentOffset(),g.currentPosition()),{node:Q}}function d(g){const b=g.context(),Q=b.currentType===1?g.currentOffset():b.offset,y=b.currentType===1?b.endLoc:b.startLoc,v=r(2,Q,y);v.items=[];let S=null;do{const C=S||g.nextToken();switch(S=null,C.type){case 0:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(o(g,C.value||""));break;case 5:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(a(g,C.value||""));break;case 4:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(l(g,C.value||""));break;case 6:C.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,wi(C)),v.items.push(c(g,C.value||""));break;case 7:{const Z=f(g);v.items.push(Z.node),S=Z.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const P=b.currentType===1?b.lastOffset:g.currentOffset(),x=b.currentType===1?b.lastEndLoc:g.currentPosition();return s(v,P,x),v}function h(g,b,Q,y){const v=g.context();let S=y.items.length===0;const P=r(1,b,Q);P.cases=[],P.cases.push(y);do{const x=d(g);S||(S=x.items.length===0),P.cases.push(x)}while(v.currentType!==13);return S&&i(g,rt.MUST_HAVE_MESSAGES_IN_PLURAL,Q,0),s(P,g.currentOffset(),g.currentPosition()),P}function p(g){const b=g.context(),{offset:Q,startLoc:y}=b,v=d(g);return b.currentType===13?v:h(g,Q,y,v)}function $(g){const b=lq(g,Nt({},t)),Q=b.context(),y=r(0,Q.offset,Q.startLoc);return e&&y.loc&&(y.loc.source=g),y.body=p(b),t.onCacheKey&&(y.cacheKey=t.onCacheKey(g)),Q.currentType!==13&&i(b,rt.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,g[Q.offset]||""),s(y,b.currentOffset(),b.currentPosition()),y}return{parse:$}}function wi(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function dq(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function TQ(t,e){for(let n=0;nkQ(n)),t}function kQ(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;no;function l(p,$){o.code+=p}function c(p,$=!0){const g=$?i:"";l(r?g+" ".repeat(p):g)}function u(p=!0){const $=++o.indentLevel;p&&c($)}function O(p=!0){const $=--o.indentLevel;p&&c($)}function f(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:O,newline:f,helper:p=>`_${p}`,needIndent:()=>o.needIndent}}function gq(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Bo(t,e.key),e.modifier?(t.push(", "),Bo(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function $q(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const r=e.items.length;for(let s=0;s1){t.push(`${n("plural")}([`),t.indent(i());const r=e.cases.length;for(let s=0;s{const n=Qe(e.mode)?e.mode:"normal",i=Qe(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` +`,s=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=mq(t,{filename:i,breakLineCode:r,needIndent:s});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),o.length>0&&(a.push(`const { ${jm(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Bo(a,t),a.deindent(s),a.push("}"),delete t.helpers;const{code:l,map:c}=a.context();return{ast:t,code:l,map:c?c.toJSON():void 0}};function vq(t,e={}){const n=Nt({},e),i=!!n.jit,r=!!n.minify,s=n.optimize==null?!0:n.optimize,a=fq(n).parse(t);return i?(s&&pq(a),r&&mo(a),{ast:a,code:""}):(hq(a,n),bq(a,n))}/*! * core-base v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function vq(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vs().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Li(t){return nt(t)&&Gm(t)===0&&(pi(t,"b")||pi(t,"body"))}const SP=["b","body"];function Sq(t){return bs(t,SP)}const PP=["c","cases"];function Pq(t){return bs(t,PP,[])}const _P=["s","static"];function _q(t){return bs(t,_P)}const xP=["i","items"];function xq(t){return bs(t,xP,[])}const wP=["t","type"];function Gm(t){return bs(t,wP)}const TP=["v","value"];function Uc(t,e){const n=bs(t,TP);if(n!=null)return n;throw Sl(e)}const kP=["m","modifier"];function wq(t){return bs(t,kP)}const RP=["k","key"];function Tq(t){const e=bs(t,RP);if(e)return e;throw Sl(6)}function bs(t,e,n){for(let i=0;ikq(n,t)}function kq(t,e){const n=Sq(e);if(n==null)throw Sl(0);if(Gm(n)===1){const s=Pq(n);return t.plural(s.reduce((o,a)=>[...o,RQ(t,a)],[]))}else return RQ(t,n)}function RQ(t,e){const n=_q(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=xq(e).reduce((r,s)=>[...r,zh(t,s)],[]);return t.normalize(i)}}function zh(t,e){const n=Gm(e);switch(n){case 3:return Uc(e,n);case 9:return Uc(e,n);case 4:{const i=e;if(pi(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(pi(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw Sl(n)}case 5:{const i=e;if(pi(i,"i")&&Et(i.i))return t.interpolate(t.list(i.i));if(pi(i,"index")&&Et(i.index))return t.interpolate(t.list(i.index));throw Sl(n)}case 6:{const i=e,r=wq(i),s=Tq(i);return t.linked(zh(t,s),r?zh(t,r):void 0,t.type)}case 7:return Uc(e,n);case 8:return Uc(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Rq=t=>t;let Dc=st();function Cq(t,e={}){let n=!1;const i=e.onError||eq;return e.onError=r=>{n=!0,i(r)},{...bq(t,e),detectError:n}}function Xq(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Qe(t)){et(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||Rq)(t),r=Dc[i];if(r)return r;const{ast:s,detectError:o}=Cq(t,{...e,location:!1,jit:!0}),a=dd(s);return o?a:Dc[i]=a}else{const n=t.cacheKey;if(n){const i=Dc[n];return i||(Dc[n]=dd(t))}else return dd(t)}}let Pl=null;function Vq(t){Pl=t}function Eq(t,e,n){Pl&&Pl.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const Aq=qq("function:translate");function qq(t){return e=>Pl&&Pl.emit(t,e)}const pr={INVALID_ARGUMENT:J2,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Zq=24;function mr(t){return vf(t,null,void 0)}function Fm(t,e){return e.locale!=null?CQ(e.locale):CQ(t.locale)}let hd;function CQ(t){if(Qe(t))return t;if(gt(t)){if(t.resolvedOnce&&hd!=null)return hd;if(t.constructor.name==="Function"){const e=t();if(G2(e))throw mr(pr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return hd=e}else throw mr(pr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw mr(pr.NOT_SUPPORT_LOCALE_TYPE)}function zq(t,e,n){return[...new Set([n,...Tt(e)?e:nt(e)?Object.keys(e):Qe(e)?[e]:[n]])]}function XP(t,e,n){const i=Qe(n)?n:_l,r=t;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[n];for(;Tt(o);)o=XQ(s,o,e);const a=Tt(e)||!Ie(e)?e:e.default?e.default:null;o=Qe(a)?[a]:a,Tt(o)&&XQ(s,o,!1),r.__localeChainCache.set(i,s)}return s}function XQ(t,e,n){let i=!0;for(let r=0;r{o===void 0?o=a:o+=a},f[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,i=4,f[0]();else{if(r=0,o===void 0||(o=Wq(o),o===!1))return!1;f[1]()}};function d(){const h=t[n+1];if(i===5&&h==="'"||i===6&&h==='"')return n++,a="\\"+h,f[0](),!0}for(;i!==null;)if(n++,s=t[n],!(s==="\\"&&d())){if(l=Lq(s),O=vs[i],c=O[l]||O.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const VQ=new Map;function jq(t,e){return nt(t)?t[e]:null}function Bq(t,e){if(!nt(t))return null;let n=VQ.get(e);if(n||(n=Nq(e),n&&VQ.set(e,n)),!n)return null;const i=n.length;let r=t,s=0;for(;s`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function Fq(){return{upper:(t,e)=>e==="text"&&Qe(t)?t.toUpperCase():e==="vnode"&&nt(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Qe(t)?t.toLowerCase():e==="vnode"&&nt(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Qe(t)?AQ(t):e==="vnode"&&nt(t)&&"__v_isVNode"in t?AQ(t.children):t}}let VP;function Hq(t){VP=t}let EP;function Kq(t){EP=t}let AP;function Jq(t){AP=t}let qP=null;const eZ=t=>{qP=t},tZ=()=>qP;let ZP=null;const qQ=t=>{ZP=t},nZ=()=>ZP;let ZQ=0;function iZ(t={}){const e=gt(t.onWarn)?t.onWarn:H2,n=Qe(t.version)?t.version:Gq,i=Qe(t.locale)||gt(t.locale)?t.locale:_l,r=gt(i)?_l:i,s=Tt(t.fallbackLocale)||Ie(t.fallbackLocale)||Qe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:r,o=Ie(t.messages)?t.messages:pd(r),a=Ie(t.datetimeFormats)?t.datetimeFormats:pd(r),l=Ie(t.numberFormats)?t.numberFormats:pd(r),c=Nt(st(),t.modifiers,Fq()),u=t.pluralRules||st(),O=gt(t.missing)?t.missing:null,f=et(t.missingWarn)||jo(t.missingWarn)?t.missingWarn:!0,d=et(t.fallbackWarn)||jo(t.fallbackWarn)?t.fallbackWarn:!0,h=!!t.fallbackFormat,p=!!t.unresolving,$=gt(t.postTranslation)?t.postTranslation:null,g=Ie(t.processor)?t.processor:null,b=et(t.warnHtmlMessage)?t.warnHtmlMessage:!0,Q=!!t.escapeParameter,y=gt(t.messageCompiler)?t.messageCompiler:VP,v=gt(t.messageResolver)?t.messageResolver:EP||jq,S=gt(t.localeFallbacker)?t.localeFallbacker:AP||zq,P=nt(t.fallbackContext)?t.fallbackContext:void 0,x=t,C=nt(x.__datetimeFormatters)?x.__datetimeFormatters:new Map,Z=nt(x.__numberFormatters)?x.__numberFormatters:new Map,W=nt(x.__meta)?x.__meta:{};ZQ++;const E={version:n,cid:ZQ,locale:i,fallbackLocale:s,messages:o,modifiers:c,pluralRules:u,missing:O,missingWarn:f,fallbackWarn:d,fallbackFormat:h,unresolving:p,postTranslation:$,processor:g,warnHtmlMessage:b,escapeParameter:Q,messageCompiler:y,messageResolver:v,localeFallbacker:S,fallbackContext:P,onWarn:e,__meta:W};return E.datetimeFormats=a,E.numberFormats=l,E.__datetimeFormatters=C,E.__numberFormatters=Z,__INTLIFY_PROD_DEVTOOLS__&&Eq(E,n,W),E}const pd=t=>({[t]:st()});function Hm(t,e,n,i,r){const{missing:s,onWarn:o}=t;if(s!==null){const a=s(t,n,e,r);return Qe(a)?a:e}else return e}function Ta(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function rZ(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function sZ(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i{zP.includes(l)?o[l]=n[l]:s[l]=n[l]}),Qe(i)?s.locale=i:Ie(i)&&(o=i),Ie(r)&&(o=r),[s.key||"",a,s,o]}function YQ(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function MQ(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,O]=Mh(...e),f=et(u.missingWarn)?u.missingWarn:t.missingWarn;et(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const d=!!u.part,h=Fm(t,u),p=o(t,r,h);if(!Qe(l)||l==="")return new Intl.NumberFormat(h,O).format(c);let $={},g,b=null;const Q="number format";for(let S=0;S{YP.includes(l)?o[l]=n[l]:s[l]=n[l]}),Qe(i)?s.locale=i:Ie(i)&&(o=i),Ie(r)&&(o=r),[s.key||"",a,s,o]}function IQ(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const oZ=t=>t,aZ=t=>"",lZ="text",cZ=t=>t.length===0?"":jm(t),uZ=F2;function UQ(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function OZ(t){const e=Et(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Et(t.named.count)||Et(t.named.n))?Et(t.named.count)?t.named.count:Et(t.named.n)?t.named.n:e:e}function fZ(t,e){e.count||(e.count=t),e.n||(e.n=t)}function dZ(t={}){const e=t.locale,n=OZ(t),i=nt(t.pluralRules)&&Qe(e)&>(t.pluralRules[e])?t.pluralRules[e]:UQ,r=nt(t.pluralRules)&&Qe(e)&>(t.pluralRules[e])?UQ:void 0,s=g=>g[i(n,g.length,r)],o=t.list||[],a=g=>o[g],l=t.named||st();Et(t.pluralIndex)&&fZ(n,l);const c=g=>l[g];function u(g,b){const Q=gt(t.messages)?t.messages(g,!!b):nt(t.messages)?t.messages[g]:!1;return Q||(t.parent?t.parent.message(g):aZ)}const O=g=>t.modifiers?t.modifiers[g]:oZ,f=Ie(t.processor)&>(t.processor.normalize)?t.processor.normalize:cZ,d=Ie(t.processor)&>(t.processor.interpolate)?t.processor.interpolate:uZ,h=Ie(t.processor)&&Qe(t.processor.type)?t.processor.type:lZ,$={list:a,named:c,plural:s,linked:(g,...b)=>{const[Q,y]=b;let v="text",S="";b.length===1?nt(Q)?(S=Q.modifier||S,v=Q.type||v):Qe(Q)&&(S=Q||S):b.length===2&&(Qe(Q)&&(S=Q||S),Qe(y)&&(v=y||v));const P=u(g,!0)($),x=v==="vnode"&&Tt(P)&&S?P[0]:P;return S?O(S)(x,v):x},message:u,type:h,interpolate:d,normalize:f,values:Nt(st(),o,l)};return $}const DQ=()=>"",ei=t=>gt(t);function LQ(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=t,[l,c]=Ih(...e),u=et(c.missingWarn)?c.missingWarn:t.missingWarn,O=et(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,f=et(c.escapeParameter)?c.escapeParameter:t.escapeParameter,d=!!c.resolvedMessage,h=Qe(c.default)||et(c.default)?et(c.default)?s?l:()=>l:c.default:n?s?l:()=>l:null,p=n||h!=null&&(Qe(h)||gt(h)),$=Fm(t,c);f&&hZ(c);let[g,b,Q]=d?[l,$,a[$]||st()]:MP(t,l,$,o,O,u),y=g,v=l;if(!d&&!(Qe(y)||Li(y)||ei(y))&&p&&(y=h,v=y),!d&&(!(Qe(y)||Li(y)||ei(y))||!Qe(b)))return r?Sf:l;let S=!1;const P=()=>{S=!0},x=ei(y)?y:IP(t,l,b,y,v,P);if(S)return y;const C=gZ(t,b,Q,c),Z=dZ(C),W=pZ(t,x,Z),E=i?i(W,l):W;if(__INTLIFY_PROD_DEVTOOLS__){const te={timestamp:Date.now(),key:Qe(l)?l:ei(y)?y.key:"",locale:b||(ei(y)?y.locale:""),format:Qe(y)?y:ei(y)?y.source:"",message:E};te.meta=Nt({},t.__meta,tZ()||{}),Aq(te)}return E}function hZ(t){Tt(t.list)?t.list=t.list.map(e=>Qe(e)?xQ(e):e):nt(t.named)&&Object.keys(t.named).forEach(e=>{Qe(t.named[e])&&(t.named[e]=xQ(t.named[e]))})}function MP(t,e,n,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let O=st(),f,d=null;const h="translate";for(let p=0;pi;return c.locale=n,c.key=e,c}const l=o(i,mZ(t,n,r,i,a,s));return l.locale=n,l.key=e,l.source=i,l}function pZ(t,e,n){return e(n)}function Ih(...t){const[e,n,i]=t,r=st();if(!Qe(e)&&!Et(e)&&!ei(e)&&!Li(e))throw mr(pr.INVALID_ARGUMENT);const s=Et(e)?String(e):(ei(e),e);return Et(n)?r.plural=n:Qe(n)?r.default=n:Ie(n)&&!bf(n)?r.named=n:Tt(n)&&(r.list=n),Et(i)?r.plural=i:Qe(i)?r.default=i:Ie(i)&&Nt(r,i),[s,r]}function mZ(t,e,n,i,r,s){return{locale:e,key:n,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>L2(e,n,o)}}function gZ(t,e,n,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,f={locale:e,modifiers:r,pluralRules:s,messages:(d,h)=>{let p=o(n,d);if(p==null&&(u||h)){const[,,$]=MP(u||t,d,e,a,l,c);p=o($,d)}if(Qe(p)||Li(p)){let $=!1;const b=IP(t,d,e,p,d,()=>{$=!0});return $?DQ:b}else return ei(p)?p:DQ}};return t.processor&&(f.processor=t.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),Et(i.plural)&&(f.pluralIndex=i.plural),f}vq();/*! + */function Sq(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vs().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Li(t){return nt(t)&&Gm(t)===0&&(pi(t,"b")||pi(t,"body"))}const PP=["b","body"];function Pq(t){return bs(t,PP)}const _P=["c","cases"];function _q(t){return bs(t,_P,[])}const xP=["s","static"];function xq(t){return bs(t,xP)}const wP=["i","items"];function wq(t){return bs(t,wP,[])}const TP=["t","type"];function Gm(t){return bs(t,TP)}const kP=["v","value"];function Uc(t,e){const n=bs(t,kP);if(n!=null)return n;throw Sl(e)}const RP=["m","modifier"];function Tq(t){return bs(t,RP)}const CP=["k","key"];function kq(t){const e=bs(t,CP);if(e)return e;throw Sl(6)}function bs(t,e,n){for(let i=0;iRq(n,t)}function Rq(t,e){const n=Pq(e);if(n==null)throw Sl(0);if(Gm(n)===1){const s=_q(n);return t.plural(s.reduce((o,a)=>[...o,RQ(t,a)],[]))}else return RQ(t,n)}function RQ(t,e){const n=xq(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=wq(e).reduce((r,s)=>[...r,zh(t,s)],[]);return t.normalize(i)}}function zh(t,e){const n=Gm(e);switch(n){case 3:return Uc(e,n);case 9:return Uc(e,n);case 4:{const i=e;if(pi(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(pi(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw Sl(n)}case 5:{const i=e;if(pi(i,"i")&&Et(i.i))return t.interpolate(t.list(i.i));if(pi(i,"index")&&Et(i.index))return t.interpolate(t.list(i.index));throw Sl(n)}case 6:{const i=e,r=Tq(i),s=kq(i);return t.linked(zh(t,s),r?zh(t,r):void 0,t.type)}case 7:return Uc(e,n);case 8:return Uc(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Cq=t=>t;let Dc=st();function Xq(t,e={}){let n=!1;const i=e.onError||tq;return e.onError=r=>{n=!0,i(r)},{...vq(t,e),detectError:n}}function Vq(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Qe(t)){et(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||Cq)(t),r=Dc[i];if(r)return r;const{ast:s,detectError:o}=Xq(t,{...e,location:!1,jit:!0}),a=dd(s);return o?a:Dc[i]=a}else{const n=t.cacheKey;if(n){const i=Dc[n];return i||(Dc[n]=dd(t))}else return dd(t)}}let Pl=null;function Eq(t){Pl=t}function Aq(t,e,n){Pl&&Pl.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const qq=Zq("function:translate");function Zq(t){return e=>Pl&&Pl.emit(t,e)}const pr={INVALID_ARGUMENT:eq,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},zq=24;function mr(t){return vf(t,null,void 0)}function Fm(t,e){return e.locale!=null?CQ(e.locale):CQ(t.locale)}let hd;function CQ(t){if(Qe(t))return t;if($t(t)){if(t.resolvedOnce&&hd!=null)return hd;if(t.constructor.name==="Function"){const e=t();if(F2(e))throw mr(pr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return hd=e}else throw mr(pr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw mr(pr.NOT_SUPPORT_LOCALE_TYPE)}function Yq(t,e,n){return[...new Set([n,...Tt(e)?e:nt(e)?Object.keys(e):Qe(e)?[e]:[n]])]}function VP(t,e,n){const i=Qe(n)?n:_l,r=t;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[n];for(;Tt(o);)o=XQ(s,o,e);const a=Tt(e)||!Ie(e)?e:e.default?e.default:null;o=Qe(a)?[a]:a,Tt(o)&&XQ(s,o,!1),r.__localeChainCache.set(i,s)}return s}function XQ(t,e,n){let i=!0;for(let r=0;r{o===void 0?o=a:o+=a},f[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,i=4,f[0]();else{if(r=0,o===void 0||(o=Nq(o),o===!1))return!1;f[1]()}};function d(){const h=t[n+1];if(i===5&&h==="'"||i===6&&h==='"')return n++,a="\\"+h,f[0](),!0}for(;i!==null;)if(n++,s=t[n],!(s==="\\"&&d())){if(l=Wq(s),O=vs[i],c=O[l]||O.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const VQ=new Map;function Bq(t,e){return nt(t)?t[e]:null}function Gq(t,e){if(!nt(t))return null;let n=VQ.get(e);if(n||(n=jq(e),n&&VQ.set(e,n)),!n)return null;const i=n.length;let r=t,s=0;for(;s`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function Hq(){return{upper:(t,e)=>e==="text"&&Qe(t)?t.toUpperCase():e==="vnode"&&nt(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Qe(t)?t.toLowerCase():e==="vnode"&&nt(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Qe(t)?AQ(t):e==="vnode"&&nt(t)&&"__v_isVNode"in t?AQ(t.children):t}}let EP;function Kq(t){EP=t}let AP;function Jq(t){AP=t}let qP;function eZ(t){qP=t}let ZP=null;const tZ=t=>{ZP=t},nZ=()=>ZP;let zP=null;const qQ=t=>{zP=t},iZ=()=>zP;let ZQ=0;function rZ(t={}){const e=$t(t.onWarn)?t.onWarn:K2,n=Qe(t.version)?t.version:Fq,i=Qe(t.locale)||$t(t.locale)?t.locale:_l,r=$t(i)?_l:i,s=Tt(t.fallbackLocale)||Ie(t.fallbackLocale)||Qe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:r,o=Ie(t.messages)?t.messages:pd(r),a=Ie(t.datetimeFormats)?t.datetimeFormats:pd(r),l=Ie(t.numberFormats)?t.numberFormats:pd(r),c=Nt(st(),t.modifiers,Hq()),u=t.pluralRules||st(),O=$t(t.missing)?t.missing:null,f=et(t.missingWarn)||jo(t.missingWarn)?t.missingWarn:!0,d=et(t.fallbackWarn)||jo(t.fallbackWarn)?t.fallbackWarn:!0,h=!!t.fallbackFormat,p=!!t.unresolving,$=$t(t.postTranslation)?t.postTranslation:null,g=Ie(t.processor)?t.processor:null,b=et(t.warnHtmlMessage)?t.warnHtmlMessage:!0,Q=!!t.escapeParameter,y=$t(t.messageCompiler)?t.messageCompiler:EP,v=$t(t.messageResolver)?t.messageResolver:AP||Bq,S=$t(t.localeFallbacker)?t.localeFallbacker:qP||Yq,P=nt(t.fallbackContext)?t.fallbackContext:void 0,x=t,C=nt(x.__datetimeFormatters)?x.__datetimeFormatters:new Map,Z=nt(x.__numberFormatters)?x.__numberFormatters:new Map,W=nt(x.__meta)?x.__meta:{};ZQ++;const E={version:n,cid:ZQ,locale:i,fallbackLocale:s,messages:o,modifiers:c,pluralRules:u,missing:O,missingWarn:f,fallbackWarn:d,fallbackFormat:h,unresolving:p,postTranslation:$,processor:g,warnHtmlMessage:b,escapeParameter:Q,messageCompiler:y,messageResolver:v,localeFallbacker:S,fallbackContext:P,onWarn:e,__meta:W};return E.datetimeFormats=a,E.numberFormats=l,E.__datetimeFormatters=C,E.__numberFormatters=Z,__INTLIFY_PROD_DEVTOOLS__&&Aq(E,n,W),E}const pd=t=>({[t]:st()});function Hm(t,e,n,i,r){const{missing:s,onWarn:o}=t;if(s!==null){const a=s(t,n,e,r);return Qe(a)?a:e}else return e}function Ta(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function sZ(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function oZ(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i{YP.includes(l)?o[l]=n[l]:s[l]=n[l]}),Qe(i)?s.locale=i:Ie(i)&&(o=i),Ie(r)&&(o=r),[s.key||"",a,s,o]}function YQ(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function MQ(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,O]=Mh(...e),f=et(u.missingWarn)?u.missingWarn:t.missingWarn;et(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const d=!!u.part,h=Fm(t,u),p=o(t,r,h);if(!Qe(l)||l==="")return new Intl.NumberFormat(h,O).format(c);let $={},g,b=null;const Q="number format";for(let S=0;S{MP.includes(l)?o[l]=n[l]:s[l]=n[l]}),Qe(i)?s.locale=i:Ie(i)&&(o=i),Ie(r)&&(o=r),[s.key||"",a,s,o]}function IQ(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const aZ=t=>t,lZ=t=>"",cZ="text",uZ=t=>t.length===0?"":jm(t),OZ=H2;function UQ(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function fZ(t){const e=Et(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Et(t.named.count)||Et(t.named.n))?Et(t.named.count)?t.named.count:Et(t.named.n)?t.named.n:e:e}function dZ(t,e){e.count||(e.count=t),e.n||(e.n=t)}function hZ(t={}){const e=t.locale,n=fZ(t),i=nt(t.pluralRules)&&Qe(e)&&$t(t.pluralRules[e])?t.pluralRules[e]:UQ,r=nt(t.pluralRules)&&Qe(e)&&$t(t.pluralRules[e])?UQ:void 0,s=g=>g[i(n,g.length,r)],o=t.list||[],a=g=>o[g],l=t.named||st();Et(t.pluralIndex)&&dZ(n,l);const c=g=>l[g];function u(g,b){const Q=$t(t.messages)?t.messages(g,!!b):nt(t.messages)?t.messages[g]:!1;return Q||(t.parent?t.parent.message(g):lZ)}const O=g=>t.modifiers?t.modifiers[g]:aZ,f=Ie(t.processor)&&$t(t.processor.normalize)?t.processor.normalize:uZ,d=Ie(t.processor)&&$t(t.processor.interpolate)?t.processor.interpolate:OZ,h=Ie(t.processor)&&Qe(t.processor.type)?t.processor.type:cZ,$={list:a,named:c,plural:s,linked:(g,...b)=>{const[Q,y]=b;let v="text",S="";b.length===1?nt(Q)?(S=Q.modifier||S,v=Q.type||v):Qe(Q)&&(S=Q||S):b.length===2&&(Qe(Q)&&(S=Q||S),Qe(y)&&(v=y||v));const P=u(g,!0)($),x=v==="vnode"&&Tt(P)&&S?P[0]:P;return S?O(S)(x,v):x},message:u,type:h,interpolate:d,normalize:f,values:Nt(st(),o,l)};return $}const DQ=()=>"",ei=t=>$t(t);function LQ(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=t,[l,c]=Ih(...e),u=et(c.missingWarn)?c.missingWarn:t.missingWarn,O=et(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,f=et(c.escapeParameter)?c.escapeParameter:t.escapeParameter,d=!!c.resolvedMessage,h=Qe(c.default)||et(c.default)?et(c.default)?s?l:()=>l:c.default:n?s?l:()=>l:null,p=n||h!=null&&(Qe(h)||$t(h)),$=Fm(t,c);f&&pZ(c);let[g,b,Q]=d?[l,$,a[$]||st()]:IP(t,l,$,o,O,u),y=g,v=l;if(!d&&!(Qe(y)||Li(y)||ei(y))&&p&&(y=h,v=y),!d&&(!(Qe(y)||Li(y)||ei(y))||!Qe(b)))return r?Sf:l;let S=!1;const P=()=>{S=!0},x=ei(y)?y:UP(t,l,b,y,v,P);if(S)return y;const C=$Z(t,b,Q,c),Z=hZ(C),W=mZ(t,x,Z),E=i?i(W,l):W;if(__INTLIFY_PROD_DEVTOOLS__){const te={timestamp:Date.now(),key:Qe(l)?l:ei(y)?y.key:"",locale:b||(ei(y)?y.locale:""),format:Qe(y)?y:ei(y)?y.source:"",message:E};te.meta=Nt({},t.__meta,nZ()||{}),qq(te)}return E}function pZ(t){Tt(t.list)?t.list=t.list.map(e=>Qe(e)?xQ(e):e):nt(t.named)&&Object.keys(t.named).forEach(e=>{Qe(t.named[e])&&(t.named[e]=xQ(t.named[e]))})}function IP(t,e,n,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let O=st(),f,d=null;const h="translate";for(let p=0;pi;return c.locale=n,c.key=e,c}const l=o(i,gZ(t,n,r,i,a,s));return l.locale=n,l.key=e,l.source=i,l}function mZ(t,e,n){return e(n)}function Ih(...t){const[e,n,i]=t,r=st();if(!Qe(e)&&!Et(e)&&!ei(e)&&!Li(e))throw mr(pr.INVALID_ARGUMENT);const s=Et(e)?String(e):(ei(e),e);return Et(n)?r.plural=n:Qe(n)?r.default=n:Ie(n)&&!bf(n)?r.named=n:Tt(n)&&(r.list=n),Et(i)?r.plural=i:Qe(i)?r.default=i:Ie(i)&&Nt(r,i),[s,r]}function gZ(t,e,n,i,r,s){return{locale:e,key:n,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>W2(e,n,o)}}function $Z(t,e,n,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,f={locale:e,modifiers:r,pluralRules:s,messages:(d,h)=>{let p=o(n,d);if(p==null&&(u||h)){const[,,$]=IP(u||t,d,e,a,l,c);p=o($,d)}if(Qe(p)||Li(p)){let $=!1;const b=UP(t,d,e,p,d,()=>{$=!0});return $?DQ:b}else return ei(p)?p:DQ}};return t.processor&&(f.processor=t.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),Et(i.plural)&&(f.pluralIndex=i.plural),f}Sq();/*! * vue-i18n v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const $Z="11.1.9";function QZ(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Vs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Vs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vs().__INTLIFY_PROD_DEVTOOLS__=!1)}const qn={UNEXPECTED_RETURN_TYPE:Zq,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Gn(t,...e){return vf(t,null,void 0)}const Uh=ys("__translateVNode"),Dh=ys("__datetimeParts"),Lh=ys("__numberParts"),UP=ys("__setPluralRules"),DP=ys("__injectWithOption"),Wh=ys("__dispose");function xl(t){if(!nt(t)||Li(t))return t;for(const e in t)if(pi(t,e))if(!e.includes("."))nt(t[e])&&xl(t[e]);else{const n=e.split("."),i=n.length-1;let r=t,s=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||st(),yu(c,o[l])):yu(c,o)}else Qe(a)&&yu(JSON.parse(a),o)}),r==null&&s)for(const a in o)pi(o,a)&&xl(o[a]);return o}function LP(t){return t.type}function WP(t,e,n){let i=nt(e.messages)?e.messages:st();"__i18nGlobal"in n&&(i=Km(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{t.mergeLocaleMessage(s,i[s])});{if(nt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(nt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function WQ(t){return R($r,null,t,0)}const NQ="__INTLIFY_META__",jQ=()=>[],yZ=()=>!1;let BQ=0;function GQ(t){return(e,n,i,r)=>t(n,i,Qt()||void 0,r)}const bZ=()=>{const t=Qt();let e=null;return t&&(e=LP(t)[NQ])?{[NQ]:e}:null};function Jm(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,r=t.flatJson,s=oO?ne:gr;let o=et(t.inheritLocale)?t.inheritLocale:!0;const a=s(e&&o?e.locale.value:Qe(t.locale)?t.locale:_l),l=s(e&&o?e.fallbackLocale.value:Qe(t.fallbackLocale)||Tt(t.fallbackLocale)||Ie(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),c=s(Km(a.value,t)),u=s(Ie(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),O=s(Ie(t.numberFormats)?t.numberFormats:{[a.value]:{}});let f=e?e.missingWarn:et(t.missingWarn)||jo(t.missingWarn)?t.missingWarn:!0,d=e?e.fallbackWarn:et(t.fallbackWarn)||jo(t.fallbackWarn)?t.fallbackWarn:!0,h=e?e.fallbackRoot:et(t.fallbackRoot)?t.fallbackRoot:!0,p=!!t.fallbackFormat,$=gt(t.missing)?t.missing:null,g=gt(t.missing)?GQ(t.missing):null,b=gt(t.postTranslation)?t.postTranslation:null,Q=e?e.warnHtmlMessage:et(t.warnHtmlMessage)?t.warnHtmlMessage:!0,y=!!t.escapeParameter;const v=e?e.modifiers:Ie(t.modifiers)?t.modifiers:{};let S=t.pluralRules||e&&e.pluralRules,P;P=(()=>{i&&qQ(null);const A={version:$Z,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:v,pluralRules:S,missing:g===null?void 0:g,missingWarn:f,fallbackWarn:d,fallbackFormat:p,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:Q,escapeParameter:y,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};A.datetimeFormats=u.value,A.numberFormats=O.value,A.__datetimeFormatters=Ie(P)?P.__datetimeFormatters:void 0,A.__numberFormatters=Ie(P)?P.__numberFormatters:void 0;const L=iZ(A);return i&&qQ(L),L})(),Ta(P,a.value,l.value);function C(){return[a.value,l.value,c.value,u.value,O.value]}const Z=G({get:()=>a.value,set:A=>{P.locale=A,a.value=A}}),W=G({get:()=>l.value,set:A=>{P.fallbackLocale=A,l.value=A,Ta(P,a.value,A)}}),E=G(()=>c.value),te=G(()=>u.value),se=G(()=>O.value);function le(){return gt(b)?b:null}function F(A){b=A,P.postTranslation=A}function I(){return $}function z(A){A!==null&&(g=GQ(A)),$=A,P.missing=g}const J=(A,L,he,we,Be,Ge)=>{C();let Xt;try{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=e?nZ():void 0),Xt=A(P)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=void 0)}if(he!=="translate exists"&&Et(Xt)&&Xt===Sf||he==="translate exists"&&!Xt){const[Bt,Kn]=L();return e&&h?we(e):Be(Bt)}else{if(Ge(Xt))return Xt;throw Gn(qn.UNEXPECTED_RETURN_TYPE)}};function ue(...A){return J(L=>Reflect.apply(LQ,null,[L,...A]),()=>Ih(...A),"translate",L=>Reflect.apply(L.t,L,[...A]),L=>L,L=>Qe(L))}function Se(...A){const[L,he,we]=A;if(we&&!nt(we))throw Gn(qn.INVALID_ARGUMENT);return ue(L,he,Nt({resolvedMessage:!0},we||{}))}function fe(...A){return J(L=>Reflect.apply(zQ,null,[L,...A]),()=>Yh(...A),"datetime format",L=>Reflect.apply(L.d,L,[...A]),()=>EQ,L=>Qe(L)||Tt(L))}function Te(...A){return J(L=>Reflect.apply(MQ,null,[L,...A]),()=>Mh(...A),"number format",L=>Reflect.apply(L.n,L,[...A]),()=>EQ,L=>Qe(L)||Tt(L))}function Ee(A){return A.map(L=>Qe(L)||Et(L)||et(L)?WQ(String(L)):L)}const Ze={normalize:Ee,interpolate:A=>A,type:"vnode"};function Xe(...A){return J(L=>{let he;const we=L;try{we.processor=Ze,he=Reflect.apply(LQ,null,[we,...A])}finally{we.processor=null}return he},()=>Ih(...A),"translate",L=>L[Uh](...A),L=>[WQ(L)],L=>Tt(L))}function it(...A){return J(L=>Reflect.apply(MQ,null,[L,...A]),()=>Mh(...A),"number format",L=>L[Lh](...A),jQ,L=>Qe(L)||Tt(L))}function je(...A){return J(L=>Reflect.apply(zQ,null,[L,...A]),()=>Yh(...A),"datetime format",L=>L[Dh](...A),jQ,L=>Qe(L)||Tt(L))}function ft(A){S=A,P.pluralRules=S}function Ht(A,L){return J(()=>{if(!A)return!1;const he=Qe(L)?L:a.value,we=q(he),Be=P.messageResolver(we,A);return Li(Be)||ei(Be)||Qe(Be)},()=>[A],"translate exists",he=>Reflect.apply(he.te,he,[A,L]),yZ,he=>et(he))}function wt(A){let L=null;const he=XP(P,l.value,a.value);for(let we=0;we{o&&(a.value=A,P.locale=A,Ta(P,a.value,l.value))}),Re(e.fallbackLocale,A=>{o&&(l.value=A,P.fallbackLocale=A,Ta(P,a.value,l.value))}));const ae={id:BQ,locale:Z,fallbackLocale:W,get inheritLocale(){return o},set inheritLocale(A){o=A,A&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,Ta(P,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:E,get modifiers(){return v},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(A){f=A,P.missingWarn=f},get fallbackWarn(){return d},set fallbackWarn(A){d=A,P.fallbackWarn=d},get fallbackRoot(){return h},set fallbackRoot(A){h=A},get fallbackFormat(){return p},set fallbackFormat(A){p=A,P.fallbackFormat=p},get warnHtmlMessage(){return Q},set warnHtmlMessage(A){Q=A,P.warnHtmlMessage=A},get escapeParameter(){return y},set escapeParameter(A){y=A,P.escapeParameter=A},t:ue,getLocaleMessage:q,setLocaleMessage:j,mergeLocaleMessage:oe,getPostTranslationHandler:le,setPostTranslationHandler:F,getMissingHandler:I,setMissingHandler:z,[UP]:ft};return ae.datetimeFormats=te,ae.numberFormats=se,ae.rt=Se,ae.te=Ht,ae.tm=X,ae.d=fe,ae.n=Te,ae.getDateTimeFormat=ie,ae.setDateTimeFormat=_,ae.mergeDateTimeFormat=T,ae.getNumberFormat=Y,ae.setNumberFormat=N,ae.mergeNumberFormat=ee,ae[DP]=n,ae[Uh]=Xe,ae[Dh]=je,ae[Lh]=it,ae}function vZ(t){const e=Qe(t.locale)?t.locale:_l,n=Qe(t.fallbackLocale)||Tt(t.fallbackLocale)||Ie(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=gt(t.missing)?t.missing:void 0,r=et(t.silentTranslationWarn)||jo(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=et(t.silentFallbackWarn)||jo(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=et(t.fallbackRoot)?t.fallbackRoot:!0,a=!!t.formatFallbackMessages,l=Ie(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=gt(t.postTranslation)?t.postTranslation:void 0,O=Qe(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,f=!!t.escapeParameterHtml,d=et(t.sync)?t.sync:!0;let h=t.messages;if(Ie(t.sharedMessages)){const v=t.sharedMessages;h=Object.keys(v).reduce((P,x)=>{const C=P[x]||(P[x]={});return Nt(C,v[x]),P},h||{})}const{__i18n:p,__root:$,__injectWithOption:g}=t,b=t.datetimeFormats,Q=t.numberFormats,y=t.flatJson;return{locale:e,fallbackLocale:n,messages:h,flatJson:y,datetimeFormats:b,numberFormats:Q,missing:i,missingWarn:r,fallbackWarn:s,fallbackRoot:o,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:O,escapeParameter:f,messageResolver:t.messageResolver,inheritLocale:d,__i18n:p,__root:$,__injectWithOption:g}}function Nh(t={}){const e=Jm(vZ(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(r){e.locale.value=r},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(r){e.fallbackLocale.value=r},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(r){e.setMissingHandler(r)},get silentTranslationWarn(){return et(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(r){e.missingWarn=et(r)?!r:r},get silentFallbackWarn(){return et(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(r){e.fallbackWarn=et(r)?!r:r},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(r){e.fallbackFormat=r},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(r){e.setPostTranslationHandler(r)},get sync(){return e.inheritLocale},set sync(r){e.inheritLocale=r},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){e.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(r){e.escapeParameter=r},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...r){return Reflect.apply(e.t,e,[...r])},rt(...r){return Reflect.apply(e.rt,e,[...r])},te(r,s){return e.te(r,s)},tm(r){return e.tm(r)},getLocaleMessage(r){return e.getLocaleMessage(r)},setLocaleMessage(r,s){e.setLocaleMessage(r,s)},mergeLocaleMessage(r,s){e.mergeLocaleMessage(r,s)},d(...r){return Reflect.apply(e.d,e,[...r])},getDateTimeFormat(r){return e.getDateTimeFormat(r)},setDateTimeFormat(r,s){e.setDateTimeFormat(r,s)},mergeDateTimeFormat(r,s){e.mergeDateTimeFormat(r,s)},n(...r){return Reflect.apply(e.n,e,[...r])},getNumberFormat(r){return e.getNumberFormat(r)},setNumberFormat(r,s){e.setNumberFormat(r,s)},mergeNumberFormat(r,s){e.mergeNumberFormat(r,s)}};return i.__extender=n,i}function SZ(t,e,n){return{beforeCreate(){const i=Qt();if(!i)throw Gn(qn.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const s=r.i18n;if(r.__i18n&&(s.__i18n=r.__i18n),s.__root=e,this===this.$root)this.$i18n=FQ(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Nh(s);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=FQ(t,r);else{this.$i18n=Nh({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;r.__i18nGlobal&&WP(e,r,r),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,o)=>this.$i18n.te(s,o),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=Qt();if(!i)throw Gn(qn.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(i),delete this.$i18n}}}function FQ(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[UP](e.pluralizationRules||t.pluralizationRules);const n=Km(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const eg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function PZ({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,r)=>[...i,...r.type===ke?r.children:[r]],[]):e.reduce((n,i)=>{const r=t[i];return r&&(n[i]=r()),n},st())}function NP(){return ke}const _Z=M({name:"i18n-t",props:Nt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Et(t)||!isNaN(t)}},eg),setup(t,e){const{slots:n,attrs:i}=e,r=t.i18n||da({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(O=>O[0]!=="_"),o=st();t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=Qe(t.plural)?+t.plural:t.plural);const a=PZ(e,s),l=r[Uh](t.keypath,a,o),c=Nt(st(),i),u=Qe(t.tag)||nt(t.tag)?t.tag:NP();return vn(u,c,l)}}}),HQ=_Z;function xZ(t){return Tt(t)&&!Qe(t[0])}function jP(t,e,n,i){const{slots:r,attrs:s}=e;return()=>{const o={part:!0};let a=st();t.locale&&(o.locale=t.locale),Qe(t.format)?o.key=t.format:nt(t.format)&&(Qe(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((f,d)=>n.includes(d)?Nt(st(),f,{[d]:t.format[d]}):f,st()));const l=i(t.value,o,a);let c=[o.key];Tt(l)?c=l.map((f,d)=>{const h=r[f.type],p=h?h({[f.type]:f.value,index:d,parts:l}):[f.value];return xZ(p)&&(p[0].key=`${f.type}-${d}`),p}):Qe(l)&&(c=[l]);const u=Nt(st(),s),O=Qe(t.tag)||nt(t.tag)?t.tag:NP();return vn(O,u,c)}}const wZ=M({name:"i18n-n",props:Nt({value:{type:Number,required:!0},format:{type:[String,Object]}},eg),setup(t,e){const n=t.i18n||da({useScope:t.scope,__useComponent:!0});return jP(t,e,YP,(...i)=>n[Lh](...i))}}),KQ=wZ;function TZ(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function kZ(t){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Gn(qn.UNEXPECTED_ERROR);const c=TZ(t,a.$),u=JQ(l);return[Reflect.apply(c.t,c,[...ey(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);oO&&t.global===c&&(o.__i18nWatcher=Re(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{oO&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=JQ(a);o.textContent=Reflect.apply(l.t,l,[...ey(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function JQ(t){if(Qe(t))return{path:t};if(Ie(t)){if(!("path"in t))throw Gn(qn.REQUIRED_VALUE,"path");return t}else throw Gn(qn.INVALID_VALUE)}function ey(t){const{path:e,locale:n,args:i,choice:r,plural:s}=t,o={},a=i||{};return Qe(n)&&(o.locale=n),Et(r)&&(o.plural=r),Et(s)&&(o.plural=s),[e,a,o]}function RZ(t,e,...n){const i=Ie(n[0])?n[0]:{};(et(i.globalInstall)?i.globalInstall:!0)&&([HQ.name,"I18nT"].forEach(s=>t.component(s,HQ)),[KQ.name,"I18nN"].forEach(s=>t.component(s,KQ)),[ny.name,"I18nD"].forEach(s=>t.component(s,ny))),t.directive("t",kZ(e))}const CZ=ys("global-vue-i18n");function XZ(t={}){const e=__VUE_I18N_LEGACY_API__&&et(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=et(t.globalInjection)?t.globalInjection:!0,i=new Map,[r,s]=VZ(t,e),o=ys("");function a(O){return i.get(O)||null}function l(O,f){i.set(O,f)}function c(O){i.delete(O)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(O,...f){if(O.__VUE_I18N_SYMBOL__=o,O.provide(O.__VUE_I18N_SYMBOL__,u),Ie(f[0])){const p=f[0];u.__composerExtend=p.__composerExtend,u.__vueI18nExtend=p.__vueI18nExtend}let d=null;!e&&n&&(d=IZ(O,u.global)),__VUE_I18N_FULL_INSTALL__&&RZ(O,u,...f),__VUE_I18N_LEGACY_API__&&e&&O.mixin(SZ(s,s.__composer,u));const h=O.unmount;O.unmount=()=>{d&&d(),u.dispose(),h()}},get global(){return s},dispose(){r.stop()},__instances:i,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function da(t={}){const e=Qt();if(e==null)throw Gn(qn.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Gn(qn.NOT_INSTALLED);const n=EZ(e),i=qZ(n),r=LP(e),s=AZ(t,r);if(s==="global")return WP(i,t,r),i;if(s==="parent"){let l=ZZ(n,e,t.__useComponent);return l==null&&(l=i),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=Nt({},t);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=Jm(l),o.__composerExtend&&(a[Wh]=o.__composerExtend(a)),YZ(o,e,a),o.__setInstance(e,a)}return a}function VZ(t,e){const n=oa(),i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Nh(t)):n.run(()=>Jm(t));if(i==null)throw Gn(qn.UNEXPECTED_ERROR);return[n,i]}function EZ(t){const e=bn(t.isCE?CZ:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Gn(t.isCE?qn.NOT_INSTALLED_WITH_PROVIDE:qn.UNEXPECTED_ERROR);return e}function AZ(t,e){return bf(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function qZ(t){return t.mode==="composition"?t.global:t.global.__composer}function ZZ(t,e,n=!1){let i=null;const r=e.root;let s=zZ(e,n);for(;s!=null;){const o=t;if(t.mode==="composition")i=o.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(s);a!=null&&(i=a.__composer,n&&i&&!i[DP]&&(i=null))}if(i!=null||r===s)break;s=s.parent}return i}function zZ(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function YZ(t,e,n){yt(()=>{},e),Fi(()=>{const i=n;t.__deleteInstance(e);const r=i[Wh];r&&(r(),delete i[Wh])},e)}const MZ=["locale","fallbackLocale","availableLocales"],ty=["t","rt","d","n","tm","te"];function IZ(t,e){const n=Object.create(null);return MZ.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s)throw Gn(qn.UNEXPECTED_ERROR);const o=He(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,r,o)}),t.config.globalProperties.$i18n=n,ty.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s||!s.value)throw Gn(qn.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${r}`,s)}),()=>{delete t.config.globalProperties.$i18n,ty.forEach(r=>{delete t.config.globalProperties[`$${r}`]})}}const UZ=M({name:"i18n-d",props:Nt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},eg),setup(t,e){const n=t.i18n||da({useScope:t.scope,__useComponent:!0});return jP(t,e,zP,(...i)=>n[Dh](...i))}}),ny=UZ;QZ();Hq(Xq);Kq(Bq);Jq(XP);if(__INTLIFY_PROD_DEVTOOLS__){const t=Vs();t.__INTLIFY__=!0,Vq(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const DZ={class:"flex flex-col p-3 gap-3 overflow-y-auto"},LZ={class:"flex flex-row gap-2"},WZ={class:"flex items-center space-x-2"},NZ={class:"flex items-center space-x-2"},jZ={class:"font-bold my-2"},BZ=["onDragstart"],GZ=M({__name:"Library",setup(t){const{locale:e}=da(),n=zt();let i=ne(!1);function r(l,c){l.dataTransfer&&(l.dataTransfer.dropEffect="move",l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("itemId",c)),n.setDragMode("insert")}function s(){n.setShowLoadLayoutDialog(!0)}Re(i,l=>{l===!1?n.setShowPreview(!1):n.setShowPreview(!0)});const o=ne([{category:"cms_elements",elements:[{id:"6",name:"headline",icon:EX},{id:"4",name:"text",icon:qX},{id:"9",name:"media",icon:wX}]},{category:"form_elements",elements:[{id:"5",name:"textarea",icon:AX},{id:"2",name:"input",icon:ZX},{id:"3",name:"select",icon:XX},{id:"1",name:"hidden",icon:VX}]},{category:"structure_elements",elements:[{id:"12",name:"fieldset",icon:RX},{id:"7",name:"row",icon:zX}]}]),a=l=>vn(l,{class:"w-5 h-5"});return(l,c)=>(w(),B("div",DZ,[U("div",LZ,[U("div",WZ,[la(U("select",{"onUpdate:modelValue":c[0]||(c[0]=u=>He(e)?e.value=u:null)},c[4]||(c[4]=[U("option",{value:"de"},"DE",-1),U("option",{value:"en"},"EN",-1)]),512),[[rf,m(e)]])]),U("div",NZ,[R(m(D2),{id:"preview-mode",modelValue:m(i),"onUpdate:modelValue":c[1]||(c[1]=u=>He(i)?i.value=u:i=u)},null,8,["modelValue"]),R(m(Wm),{for:"preview-mode"},{default:V(()=>[_e(H(l.$t("preview_mode")),1)]),_:1})])]),U("div",null,[R(m(qt),{onClick:s,class:"w-full"},{default:V(()=>[_e(H(l.$t("load_layout")),1)]),_:1})]),(w(!0),B(ke,null,xt(o.value,u=>(w(),B("div",{key:u.category},[U("h3",jZ,H(l.$t(u.category)),1),(w(!0),B(ke,null,xt(u.elements,O=>(w(),B("div",{key:O.id,class:"border-1 p-2 w-full flex flex-row gap-2 cursor-grab",draggable:"true",onDragstart:f=>r(f,O.id),onDragenter:c[2]||(c[2]=on(()=>{},["prevent"])),onDragover:c[3]||(c[3]=on(()=>{},["prevent"]))},[(w(),D(JO(a(O.icon)))),U("span",null,H(l.$t(O.name)),1)],40,BZ))),128))]))),128))]))}}),Ne=M({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=z0(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(s,o)=>la((w(),B("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>He(r)?r.value=a:null),"data-slot":"input",class:St(m(Le)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n.class))},null,2)),[[Do,m(r)]])}}),FZ=M({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(g5),pe({"data-slot":"checkbox"},m(s),{class:m(Le)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[R(m(Q5),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:V(()=>[re(o.$slots,"default",{},()=>[R(m(Y0),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),HZ={class:"form-check-label",for:"flexSwitchCheckDefault"},KZ=M({__name:"InputElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("placeholder")),1),R(m(Ne),{modelValue:r.value.placeHolder,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.placeHolder=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.name=a)},null,8,["modelValue"]),R(m(FZ),{modelValue:r.value.required,"onUpdate:modelValue":o[4]||(o[4]=a=>r.value.required=a)},null,8,["modelValue"]),U("label",HZ,H(s.$t("required")),1),U("label",null,H(s.$t("min")),1),R(m(Ne),{modelValue:r.value.minValue,"onUpdate:modelValue":o[5]||(o[5]=a=>r.value.minValue=a)},null,8,["modelValue"]),U("label",null,H(s.$t("max")),1),R(m(Ne),{modelValue:r.value.maxValue,"onUpdate:modelValue":o[6]||(o[6]=a=>r.value.maxValue=a)},null,8,["modelValue"]),U("label",null,H(s.$t("min_calc")),1),R(m(Ne),{modelValue:r.value.minCalc,"onUpdate:modelValue":o[7]||(o[7]=a=>r.value.minCalc=a)},null,8,["modelValue"]),U("label",null,H(s.$t("max_calc")),1),R(m(Ne),{modelValue:r.value.maxCalc,"onUpdate:modelValue":o[8]||(o[8]=a=>r.value.maxCalc=a)},null,8,["modelValue"])],64))}}),tc=M({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(NE),pe({"data-slot":"select"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),nc=M({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(Q8),null,{default:V(()=>[R(m(s8),pe({"data-slot":"select-content"},{...m(s),...o.$attrs},{class:m(Le)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:V(()=>[R(m(tz)),R(m(R8),{class:St(m(Le)("p-1",o.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:V(()=>[re(o.$slots,"default")]),_:3},8,["class"]),R(m(ez))]),_:3},16,["class"])]),_:3}))}}),Pf=M({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(l8),pe({"data-slot":"select-group"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),JZ={class:"absolute right-2 flex size-3.5 items-center justify-center"},ti=M({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(d8),pe({"data-slot":"select-item"},m(i),{class:m(Le)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class)}),{default:V(()=>[U("span",JZ,[R(m(p8),null,{default:V(()=>[R(m(Y0),{class:"size-4"})]),_:1})]),R(m(g8),null,{default:V(()=>[re(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),ez=M({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(v8),pe({"data-slot":"select-scroll-down-button"},m(i),{class:m(Le)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[re(r.$slots,"default",{},()=>[R(m(Pm),{class:"size-4"})])]),_:3},16,["class"]))}}),tz=M({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(P8),pe({"data-slot":"select-scroll-up-button"},m(i),{class:m(Le)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[re(r.$slots,"default",{},()=>[R(m(vX),{class:"size-4"})])]),_:3},16,["class"]))}}),ic=M({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(t){const e=t,n=at(e,"class","size"),i=Oi(n);return(r,s)=>(w(),D(m(x8),pe({"data-slot":"select-trigger","data-size":r.size},m(i),{class:m(Le)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[re(r.$slots,"default"),R(m(u8),{"as-child":""},{default:V(()=>[R(m(Pm),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),rc=M({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(T8),pe({"data-slot":"select-value"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),nz=M({__name:"SelectElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("mode")),1),R(m(tc),{modelValue:r.value.mode,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.mode=a)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>[R(m(ti),{value:"normal"},{default:V(()=>[_e(H(s.$t("normal")),1)]),_:1}),R(m(ti),{value:"paperdb"},{default:V(()=>[_e(H(s.$t("paperdb")),1)]),_:1}),R(m(ti),{value:"colordb"},{default:V(()=>[_e(H(s.$t("colordb")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),U("label",null,H(s.$t("container")),1),R(m(Ne),{modelValue:r.value.container,"onUpdate:modelValue":o[4]||(o[4]=a=>r.value.container=a)},null,8,["modelValue"])],64))}}),sc=M({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(G0),pe({"data-slot":"dialog"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),iz=M({__name:"DialogClose",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(km),pe({"data-slot":"dialog-close"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),rz=M({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(i1),pe({"data-slot":"dialog-overlay"},m(n),{class:m(Le)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),oc=M({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(s1),null,{default:V(()=>[R(rz),R(m(t1),pe({"data-slot":"dialog-content"},m(s),{class:m(Le)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",n.class)}),{default:V(()=>[re(o.$slots,"default"),R(m(km),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:V(()=>[R(m(I0)),a[0]||(a[0]=U("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),_f=M({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(n1),pe({"data-slot":"dialog-description"},m(i),{class:m(Le)("text-muted-foreground text-sm",e.class)}),{default:V(()=>[re(r.$slots,"default")]),_:3},16,["class"]))}}),tg=M({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,i)=>(w(),B("div",{"data-slot":"dialog-footer",class:St(m(Le)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class))},[re(n.$slots,"default")],2))}}),xf=M({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(w(),B("div",{"data-slot":"dialog-header",class:St(m(Le)("flex flex-col gap-2 text-center sm:text-left",e.class))},[re(n.$slots,"default")],2))}}),wf=M({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(o1),pe({"data-slot":"dialog-title"},m(i),{class:m(Le)("text-lg leading-none font-semibold",e.class)}),{default:V(()=>[re(r.$slots,"default")]),_:3},16,["class"]))}}),BP=M({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(KV),pe({"data-slot":"dialog-trigger"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),sz=M({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["update:page"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(TE),pe({"data-slot":"pagination"},m(s),{class:m(Le)("mx-auto flex w-full justify-center",n.class)}),{default:V(l=>[re(o.$slots,"default",Hs(gs(l)))]),_:3},16,["class"]))}}),oz=M({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(XE),pe({"data-slot":"pagination-content"},m(n),{class:m(Le)("flex flex-row items-center gap-1",e.class)}),{default:V(s=>[re(i.$slots,"default",Hs(gs(s)))]),_:3},16,["class"]))}}),az=M({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(_E),pe({"data-slot":"pagination-ellipsis"},m(n),{class:m(Le)("flex size-9 items-center justify-center",e.class)}),{default:V(()=>[re(i.$slots,"default",{},()=>[R(m(PX),{class:"size-4"}),r[0]||(r[0]=U("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),lz=M({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{},isActive:{type:Boolean}},setup(t){const e=t,n=at(e,"class","size","isActive");return(i,r)=>(w(),D(m(EE),pe({"data-slot":"pagination-item"},m(n),{class:m(Le)(m(yf)({variant:i.isActive?"outline":"ghost",size:i.size}),e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),cz=M({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{}},setup(t){const e=t,n=at(e,"class","size"),i=Oi(n);return(r,s)=>(w(),D(m(qE),pe({"data-slot":"pagination-next",class:m(Le)(m(yf)({variant:"ghost",size:r.size}),"gap-1 px-2.5 sm:pr-2.5",e.class)},m(i)),{default:V(()=>[re(r.$slots,"default",{},()=>[s[0]||(s[0]=U("span",{class:"hidden sm:block"},"Next",-1)),R(m(M0))])]),_:3},16,["class"]))}}),uz=M({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{}},setup(t){const e=t,n=at(e,"class","size"),i=Oi(n);return(r,s)=>(w(),D(m(zE),pe({"data-slot":"pagination-previous",class:m(Le)(m(yf)({variant:"ghost",size:r.size}),"gap-1 px-2.5 sm:pr-2.5",e.class)},m(i)),{default:V(()=>[re(r.$slots,"default",{},()=>[R(m(bX)),s[0]||(s[0]=U("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),Oz={class:"w-full"},fz={key:0,class:"ml-4"},dz=M({__name:"FolderTree",props:{folders:{},selectedFolderId:{}},emits:["select-folder"],setup(t,{emit:e}){const n=e,i=r=>{n("select-folder",r)};return(r,s)=>{const o=Om("FolderTree",!0);return w(),B("ul",Oz,[(w(!0),B(ke,null,xt(r.folders,a=>(w(),B("li",{key:a.uuid},[R(m(qt),{variant:a.uuid===r.selectedFolderId?"secondary":"ghost",onClick:l=>i(a.uuid),class:"w-full justify-start"},{default:V(()=>[_e(H(a.title),1)]),_:2},1032,["variant","onClick"]),a.subFolders&&a.subFolders.length>0?(w(),B("div",fz,[R(o,{folders:a.subFolders,"selected-folder-id":r.selectedFolderId,onSelectFolder:i},null,8,["folders","selected-folder-id"])])):ge("",!0)]))),128))])}}}),hz={class:"h-[70vh] flex flex-col"},pz={class:"h-full overflow-y-auto p-6"},mz={class:"flex flex-col h-full p-6"},gz={class:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4 flex-grow"},$z=["onClick"],Qz=["src","alt"],yz={class:"mt-4 flex justify-center"},bz=M({__name:"MediaBrowser",emits:["select-media"],setup(t,{emit:e}){const n=e,i=ne([]),r=d=>{console.log(d),n("select-media",d)},s=ne([]),o=ne(null),a=ne(1),l=ne(0),c=async()=>{try{const d=await hP();i.value=d.data,i.value.length>0&&O(i.value[0].uuid)}catch(d){console.error("Failed to fetch folders",d)}},u=async(d,h=1)=>{try{const p=await A2(d,h);s.value=p.data,a.value=p.currentPage,l.value=p.count}catch(p){console.error(`Failed to fetch media for folder ${d}`,p)}},O=d=>{o.value=d,u(d,1)},f=d=>{o.value&&u(o.value,d)};return yt(()=>{c()}),(d,h)=>(w(),B("div",hz,[h[0]||(h[0]=U("h1",{class:"text-2xl font-bold mb-4"},"Media Browser",-1)),R(m(oP),{direction:"horizontal",class:"flex-grow rounded-lg border"},{default:V(()=>[R(m(rO),{"default-size":25},{default:V(()=>[U("div",pz,[R(dz,{folders:i.value,"selected-folder-id":o.value,onSelectFolder:O},null,8,["folders","selected-folder-id"])])]),_:1}),R(m(sP)),R(m(rO),{"default-size":75},{default:V(()=>[U("div",mz,[U("div",gz,[(w(!0),B(ke,null,xt(s.value,p=>(w(),B("div",{key:p.uuid,class:"aspect-square bg-gray-100 rounded-lg overflow-hidden cursor-pointer",onClick:$=>r(p)},[U("img",{src:p.url,alt:p.name,class:"w-full h-full object-cover"},null,8,Qz)],8,$z))),128))]),U("div",yz,[l.value>12?(w(),D(m(sz),{key:0,"items-per-page":12,total:l.value,"sibling-count":1,"show-edges":"","default-page":a.value,"onUpdate:page":f},{default:V(()=>[R(m(oz),{class:"flex items-center gap-1"},{default:V(({items:p})=>[R(m(uz)),(w(!0),B(ke,null,xt(p,($,g)=>(w(),B(ke,null,[$.type==="page"?(w(),D(m(lz),{key:g,value:$.value,"as-child":""},{default:V(()=>[R(m(qt),{class:"w-10 h-10 p-0",variant:$.value===a.value?"default":"outline"},{default:V(()=>[_e(H($.value),1)]),_:2},1032,["variant"])]),_:2},1032,["value"])):(w(),D(m(az),{key:$.type,index:g},null,8,["index"]))],64))),256)),R(m(cz))]),_:1})]),_:1},8,["total","default-page"])):ge("",!0)])])]),_:1})]),_:1})]))}}),vz={for:"dropzone-file",class:"flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},Sz={class:"flex items-center justify-center w-full"},Pz=["value"],_z={key:0,class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},xz=M({__name:"MediaElement",props:{modelValue:mP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:$=>i("update:modelValue",$)}),s=ne(!1),o=ne(0),a=$=>{r.value.default=$.uuid,r.value.url=$.url,s.value=!1},l=ne(!1),c=ne([]),u=ne(""),O=()=>{l.value=!0},f=()=>{l.value=!1},d=$=>{var b;l.value=!1;const g=(b=$.dataTransfer)==null?void 0:b.files;g&&g.length>0&&p(g[0])},h=$=>{const b=$.target.files;b&&b.length>0&&p(b[0])};yt(async()=>{try{let $=await hP();c.value=$.data,$.data.length>0&&(u.value=c.value[0].uuid)}catch($){console.error("Failed to fetch directories",$)}});const p=async $=>{if(o.value=0,u)try{let g=await E2($,u.value,b=>{o.value=b});r.value.url=g.url,r.value.default=g.uuid}catch(g){console.error("Upload failed",g)}finally{setTimeout(()=>o.value=0,2e3)}};return($,g)=>(w(),B("div",null,[U("label",null,H($.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":g[0]||(g[0]=b=>r.value.id=b)},null,8,["modelValue"]),R(m(sc),{open:s.value,"onUpdate:open":g[1]||(g[1]=b=>s.value=b)},{default:V(()=>[R(m(BP),{"as-child":""},{default:V(()=>[R(m(qt),{class:"my-2 w-full"},{default:V(()=>g[3]||(g[3]=[_e("Mediabrowser")])),_:1,__:[3]})]),_:1}),R(m(oc),{class:"sm:max-w-5xl max-h-[80vh] overflow-y-auto"},{default:V(()=>[R(bz,{onSelectMedia:a})]),_:1})]),_:1},8,["open"]),U("div",{class:St(["flex items-center justify-center w-full",{"border-blue-500":l.value}]),onDragover:on(O,["prevent"]),onDragleave:on(f,["prevent"]),onDrop:on(d,["prevent"])},[U("label",vz,[g[4]||(g[4]=Qm('

Click to upload or drag and drop

SVG, PNG, JPG or GIF (MAX. 800x400px)

',1)),U("input",{id:"dropzone-file",type:"file",class:"hidden",onChange:h},null,32)])],34),U("div",Sz,[la(U("select",{"onUpdate:modelValue":g[2]||(g[2]=b=>u.value=b),class:"w-full p-2 border rounded-md"},[(w(!0),B(ke,null,xt(c.value,b=>(w(),B("option",{key:b.uuid,value:b.uuid},H(b.title),9,Pz))),128))],512),[[rf,u.value]])]),o.value>0?(w(),B("div",_z,[U("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Fn({width:o.value+"%"})},null,4)])):ge("",!0)]))}}),wz=M({__name:"FieldsetElement",props:{modelValue:gP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("label")),1),R(m(Ne),{modelValue:r.value.label,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.label=a)},null,8,["modelValue"])],64))}}),Tz=M({__name:"HiddenElement",props:{modelValue:$P},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"])],64))}}),ng=M({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=z0(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(s,o)=>la((w(),B("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>He(r)?r.value=a:null),"data-slot":"textarea",class:St(m(Le)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[Do,m(r)]])}}),kz=M({__name:"TextElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(ng),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"])],64))}}),Rz=M({__name:"TextareaElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(ng),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"])],64))}}),Cz=M({__name:"HeadlineElement",props:{modelValue:bP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("variant")),1),R(m(tc),{modelValue:r.value.variant,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.variant=a)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>[R(m(ti),{value:"1"},{default:V(()=>[_e(H(s.$t("headline1")),1)]),_:1}),R(m(ti),{value:"2"},{default:V(()=>[_e(H(s.$t("headline2")),1)]),_:1}),R(m(ti),{value:"3"},{default:V(()=>[_e(H(s.$t("headline3")),1)]),_:1}),R(m(ti),{value:"4"},{default:V(()=>[_e(H(s.$t("headline4")),1)]),_:1}),R(m(ti),{value:"5"},{default:V(()=>[_e(H(s.$t("headline5")),1)]),_:1}),R(m(ti),{value:"6"},{default:V(()=>[_e(H(s.$t("headline6")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),Xz=M({__name:"RowElement",props:{modelValue:pP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:o=>i("update:modelValue",o)});function s(o){o!==null&&o.addColumnAtTheEnd(new Ys)}return(o,a)=>(w(),D(m(qt),{onClick:a[0]||(a[0]=l=>s(r.value))},{default:V(()=>[_e(H(o.$t("add_column")),1)]),_:1}))}}),Vz=M({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(G0),pe({"data-slot":"sheet"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),Ez=M({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(i1),pe({"data-slot":"sheet-overlay",class:m(Le)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),Az=M({inheritAttrs:!1,__name:"SheetContent",props:{class:{},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class","side"),s=Zn(r,i);return(o,a)=>(w(),D(m(s1),null,{default:V(()=>[R(Ez),R(m(t1),pe({"data-slot":"sheet-content",class:m(Le)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",o.side==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",o.side==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",o.side==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",o.side==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n.class)},{...m(s),...o.$attrs}),{default:V(()=>[re(o.$slots,"default"),R(m(km),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:V(()=>[R(m(I0),{class:"size-4"}),a[0]||(a[0]=U("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),qz=M({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(n1),pe({"data-slot":"sheet-description",class:m(Le)("text-muted-foreground text-sm",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),Zz=M({__name:"SheetHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(w(),B("div",{"data-slot":"sheet-header",class:St(m(Le)("flex flex-col gap-1.5 p-4",e.class))},[re(n.$slots,"default")],2))}}),zz=M({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(o1),pe({"data-slot":"sheet-title",class:m(Le)("text-foreground font-semibold",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),Yz={class:"flex flex-col w-full p-2"},Mz=M({__name:"ElementProperties",emits:["update:modelValue"],setup(t,{emit:e}){let n=ne(!1);const i=zt();return i.$subscribe((r,s)=>{s.showProperties&&(n.value=!0)}),Re(n,r=>{r===!1&&i.setShowProperties(!1)}),(r,s)=>(w(),D(m(Vz),{open:m(n),"onUpdate:open":s[9]||(s[9]=o=>He(n)?n.value=o:n=o)},{default:V(()=>[R(m(Az),null,{default:V(()=>[R(m(Zz),null,{default:V(()=>[R(m(zz),null,{default:V(()=>s[10]||(s[10]=[_e("Properties")])),_:1,__:[10]}),R(m(qz))]),_:1}),U("div",Yz,[m(i).getActiveItem.type===6?(w(),D(Cz,{key:0,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[0]||(s[0]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===9?(w(),D(xz,{key:1,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[1]||(s[1]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===7?(w(),D(Xz,{key:2,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[2]||(s[2]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===5?(w(),D(Rz,{key:3,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[3]||(s[3]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===4?(w(),D(kz,{key:4,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[4]||(s[4]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===12?(w(),D(wz,{key:5,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[5]||(s[5]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===3?(w(),D(nz,{key:6,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[6]||(s[6]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===2?(w(),D(KZ,{key:7,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[7]||(s[7]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0),m(i).getActiveItem.type===1?(w(),D(Tz,{key:8,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[8]||(s[8]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):ge("",!0)])]),_:1})]),_:1},8,["open"]))}}),Iz={class:"overflow-auto h-full w-full"},Uz=M({__name:"ElementDependency",setup(t){const e=zt();let n=ne(!1);function i(){e.getActiveItem.addDependency(new fa)}return e.$subscribe((r,s)=>{s.showDependency&&(n.value=!0)}),Re(n,r=>{r===!1&&e.setShowDependency(!1)}),(r,s)=>(w(),D(m(sc),{class:"w-full h-full",open:m(n),"onUpdate:open":s[1]||(s[1]=o=>He(n)?n.value=o:n=o)},{default:V(()=>[R(m(oc),{class:"h-full"},{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>s[2]||(s[2]=[_e("Dependencys")])),_:1,__:[2]}),R(m(_f))]),_:1}),U("div",Iz,[R(m(qt),{onClick:s[0]||(s[0]=o=>i())},{default:V(()=>s[3]||(s[3]=[_e("Add Dependency")])),_:1,__:[3]}),R(m(ig),{dependencys:m(e).getActiveItem.dependencys},null,8,["dependencys"])]),R(m(tg))]),_:1})]),_:1},8,["open"]))}}),Dz={class:"w-full"},Lz=M({__name:"ElementBorder",props:{dependency:{}},setup(t){return(e,n)=>(w(),B("div",Dz,[R(m(Nz),{borders:e.dependency.borders},null,8,["borders"])]))}}),Wz={class:"flex flex-row items-center gap-2 border-l-3 border-black pt-1"},Nz=M({__name:"Border",props:{borders:{}},setup(t){function e(n){n.addDependency(new fa)}return(n,i)=>(w(!0),B(ke,null,xt(n.borders,r=>(w(),B("div",{class:"flex flex-col",key:r.uuid},[U("div",Wz,[i[1]||(i[1]=U("span",{class:"w-5 flex-none"},[U("hr",{class:"bg-black h-1 border-0"})],-1)),R(m(Ne),{modelValue:r.formula,"onUpdate:modelValue":s=>r.formula=s,placeholder:"Formula"},null,8,["modelValue","onUpdate:modelValue"]),R(m(Ne),{modelValue:r.calcValue,"onUpdate:modelValue":s=>r.calcValue=s,placeholder:"CalcValue"},null,8,["modelValue","onUpdate:modelValue"]),R(m(Ne),{modelValue:r.value,"onUpdate:modelValue":s=>r.value=s,placeholder:"Value"},null,8,["modelValue","onUpdate:modelValue"]),R(m(qt),{onClick:s=>e(r)},{default:V(()=>i[0]||(i[0]=[_e("Add Dependency")])),_:2,__:[0]},1032,["onClick"])]),R(m(ig),{dependencys:r.dependencys},null,8,["dependencys"])]))),128))}}),jz={class:"flex flex-row gap-2 border-l-3 border-black pt-1"},ig=M({__name:"Dependency",props:{dependencys:{}},setup(t){const e=Vr();function n(i){i.addBorder(new aP)}return(i,r)=>(w(!0),B(ke,null,xt(i.dependencys,s=>(w(),B("div",{class:"d-flex flex-wrap relative ml-5 mr-5",key:s.uuid},[U("div",jz,[r[2]||(r[2]=U("span",{class:"w-2 flex-none"},null,-1)),R(m(tc),{modelValue:s.relation,"onUpdate:modelValue":o=>s.relation=o},{default:V(()=>[R(m(ic),{class:"w-[180px]"},{default:V(()=>[R(m(rc),{placeholder:"Select Relation"})]),_:1}),R(m(nc),null,{default:V(()=>[(w(!0),B(ke,null,xt(m(e).getIdRecursiv,o=>(w(),D(m(ti),{value:o},{default:V(()=>[_e(H(o),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),R(m(Wm),{for:"formula"},{default:V(()=>r[0]||(r[0]=[_e("Formula")])),_:1,__:[0]}),R(m(Ne),{name:"formula",modelValue:s.formula,"onUpdate:modelValue":o=>s.formula=o},null,8,["modelValue","onUpdate:modelValue"]),R(m(qt),{onClick:o=>n(s)},{default:V(()=>r[1]||(r[1]=[_e("Add Border")])),_:2,__:[1]},1032,["onClick"])]),R(m(Lz),{dependency:s},null,8,["dependency"])]))),128))}}),Bz={class:"flex flex-row gap-1"},Gz=M({__name:"OptionElement",props:{option:{}},emits:["update:option"],setup(t,{emit:e}){const n=t;function i(o){o.addDependency(new fa)}let r=e;const s=G({get:()=>n.option,set:o=>r("update:option",o)});return(o,a)=>(w(),B(ke,null,[U("div",Bz,[U("label",null,H(o.$t("id")),1),R(m(Ne),{modelValue:s.value.id,"onUpdate:modelValue":a[0]||(a[0]=l=>s.value.id=l)},null,8,["modelValue"]),U("label",null,H(o.$t("name")),1),R(m(Ne),{modelValue:s.value.name,"onUpdate:modelValue":a[1]||(a[1]=l=>s.value.name=l)},null,8,["modelValue"]),R(m(qt),{onClick:a[2]||(a[2]=l=>i(s.value))},{default:V(()=>[_e(H(o.$t("add_dependency")),1)]),_:1})]),R(m(ig),{dependencys:s.value.dependencys},null,8,["dependencys"])],64))}}),Fz={class:"w-full grid overflow-y-auto px-6"},Hz=M({__name:"SelectSpecial",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e,r=ne(!1);const s=G({get:()=>n.modelValue,set:l=>i("update:modelValue",l)});function o(l){l.addOption(new QP(String(l.options.length+1)))}const a=zt();return a.$subscribe((l,c)=>{c.showOptions&&(r.value=!0)},{detached:!0}),Re(r,l=>{l===!1&&a.setShowOptions(!1)}),(l,c)=>m(a).getActiveItem.type===3?(w(),D(m(sc),{key:0,open:m(r),"onUpdate:open":c[1]||(c[1]=u=>He(r)?r.value=u:r=u)},{default:V(()=>[R(m(BP),null,{default:V(()=>[R(m(qt),{class:"mt-2"},{default:V(()=>[_e(H(l.$t("edit_options")),1)]),_:1})]),_:1}),R(m(oc),{class:"min-w-full grid-rows-[auto_minmax(0,1fr)_auto] p-4 max-h-[90dvh]"},{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>[_e(H(l.$t("edit_options")),1)]),_:1}),R(m(_f),null,{default:V(()=>[R(m(qt),{onClick:c[0]||(c[0]=u=>o(s.value))},{default:V(()=>[_e(H(l.$t("add_option")),1)]),_:1})]),_:1})]),_:1}),U("div",Fz,[(w(!0),B(ke,null,xt(s.value.options,u=>(w(),B("div",{class:"d-flex flex-wrap p-2 relative",key:u.uuid},[R(Gz,{option:u},null,8,["option"])]))),128))]),R(m(tg),null,{default:V(()=>[R(m(iz),{"as-child":""},{default:V(()=>[R(m(qt),{type:"button",variant:"secondary"},{default:V(()=>[_e(H(l.$t("close")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):ge("",!0)}}),Kz={class:""},Jz=M({__name:"SpecialProperties",emits:["update:modelValue"],setup(t,{emit:e}){const n=zt();return(i,r)=>(w(),B("div",Kz,[R(Hz,{modelValue:m(n).getActiveItem,"onUpdate:modelValue":r[0]||(r[0]=s=>m(n).getActiveItem=s)},null,8,["modelValue"])]))}}),eY={class:"flex gap-2 flex-row items-center"},tY={class:"w-60 flex-inital"},nY=M({__name:"InputElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B("div",eY,[U("label",tY,H(r.value.name),1),R(m(Ne),{placeholder:r.value.placeHolder,"onUpdate:placeholder":o[0]||(o[0]=a=>r.value.placeHolder=a),modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a),name:r.value.name,"onUpdate:name":o[2]||(o[2]=a=>r.value.name=a),id:r.value.id,"onUpdate:id":o[3]||(o[3]=a=>r.value.id=a),required:r.value.required,"onUpdate:required":o[4]||(o[4]=a=>r.value.required=a)},null,8,["placeholder","modelValue","name","id","required"])]))}}),iY={class:"flex gap-2 flex-row"},rY={class:"w-60 flex-inital"},sY=M({__name:"HiddenElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B("div",iY,[U("label",rY,H(r.value.id),1)]))}}),oY={class:"flex gap-2 flex-row items-center content-center"},aY={key:0,class:"text-4xl"},lY={key:1,class:"text-base"},cY={key:2,class:"text-lg"},uY={key:3,class:"text-xl"},OY={key:4,class:"text-2xl"},fY={key:5,class:"text-3xl"},dY={key:6,class:"text-4xl"},hY=M({__name:"HeadlineElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a,l,c,u,O,f,d,h,p,$,g,b,Q;return w(),B("div",oY,[((a=r.value)==null?void 0:a.variant)=="1"?(w(),B("h1",aY,H((l=r.value)==null?void 0:l.default),1)):((c=r.value)==null?void 0:c.variant)=="6"?(w(),B("h6",lY,H((u=r.value)==null?void 0:u.default),1)):((O=r.value)==null?void 0:O.variant)=="5"?(w(),B("h5",cY,H((f=r.value)==null?void 0:f.default),1)):((d=r.value)==null?void 0:d.variant)=="4"?(w(),B("h4",uY,H((h=r.value)==null?void 0:h.default),1)):((p=r.value)==null?void 0:p.variant)=="3"?(w(),B("h3",OY,H(($=r.value)==null?void 0:$.default),1)):((g=r.value)==null?void 0:g.variant)=="2"?(w(),B("h2",fY,H((b=r.value)==null?void 0:b.default),1)):(w(),B("h1",dY,H((Q=r.value)==null?void 0:Q.default),1))])}}}),pY={class:"flex gap-2 flex-row"},mY={style:{"white-space":"pre-line"}},gY=M({__name:"TextElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a;return w(),B("div",pY,[U("p",mY,H((a=r.value)==null?void 0:a.default),1)])}}}),$Y={class:"flex gap-2 flex-row"},QY={key:0,class:"w-full rounded bg-gray-300 justify-center content-center flex"},yY=["src"],bY=M({__name:"MediaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),B("div",$Y,[r.value.url==""?(w(),B("div",QY,[R(m(xX),{class:"size-20 m-10 place-self-center"})])):ge("",!0),r.value.url!=""?(w(),B("img",{key:1,class:"",src:r.value.url},null,8,yY)):ge("",!0)]))}}),vY={class:"flex gap-2 flex-row"},SY={class:"w-60 flex-inital"},PY=M({__name:"TextareaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a,l,c,u;return w(),B("div",vY,[U("label",SY,H((a=r.value)==null?void 0:a.name),1),R(m(ng),{value:(l=r.value)==null?void 0:l.default,name:(c=r.value)==null?void 0:c.name,id:(u=r.value)==null?void 0:u.id},null,8,["value","name","id"])])}}}),_Y={class:"flex gap-2 flex-row items-center"},xY={class:"w-60 flex-inital"},wY={class:"w-full"},TY=M({__name:"SelectElementForm",props:{modelValue:yP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a;return w(),B("div",_Y,[U("label",xY,H((a=r.value)==null?void 0:a.name),1),U("div",wY,[R(m(tc),{modelValue:r.value.default,"onUpdate:modelValue":o[0]||(o[0]=l=>r.value.default=l)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>{var l;return[(w(!0),B(ke,null,xt((l=r.value)==null?void 0:l.options,c=>(w(),D(m(ti),{key:c.uuid,value:c.id},{default:V(()=>[_e(H(c.name),1)]),_:2},1032,["value"]))),128))]}),_:1})]),_:1})]),_:1},8,["modelValue"])])])}}}),kY={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},RY=M({__name:"EmptyElementForm",props:{row:{}},setup(t){const e=t;function n(i){i.addColumnAtTheEnd(new Ys)}return(i,r)=>(w(),B("div",{onClick:r[0]||(r[0]=s=>n(e.row)),class:"flex h-full justify-center"},[U("span",kY,[R(m(vh))])]))}}),CY={class:"flex gap-2 flex-col"},XY={key:0,class:"w-full flex flex-row gap-1 h-full"},VY={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},EY={class:"flex w-full h-auto"},AY=["onDrop","onDragleave","onDragenter"],qY={class:"inline-flex items-center justify-center w-full pointer-events-none"},ZY={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},zY=["onClick"],YY={class:"font-medium text-red-500 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},MY=["onClick"],IY={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},UY=M({__name:"RowElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=ne("");let s=ne(!1);const o=Vr(),a=zt(),l=G({get:()=>n.modelValue,set:h=>i("update:modelValue",h)}),c=(h,p,$)=>{var g,b;if(r.value="",((g=h.dataTransfer)==null?void 0:g.getData("mode"))=="sort"){let Q=o.cutItem(a.getSourceDragUuid);Q!==null&&$.items.push(Q),a.setDragMode(""),h.stopImmediatePropagation()}if(a.getDragMode=="insert"){const Q=Number((b=h.dataTransfer)==null?void 0:b.getData("itemId"));$.items.push(io.getModelForType(Q)),a.setDragMode(""),h.stopImmediatePropagation()}},u=(h,p)=>{r.value="",h.stopImmediatePropagation()};a.$subscribe((h,p)=>{p.showPreview?s.value=!0:s.value=!1});const O=(h,p)=>{r.value=p,h.stopImmediatePropagation(),a.getDragMode=="sort"&&p!=a.getSourceDragUuid&&h.stopImmediatePropagation()},f=(h,p,$)=>{h==1&&p.addColumnAtTheBeginning(new Ys),h==2&&p.addColumnAtTheEnd(new Ys),h==3&&p.addColumnAt(new Ys,$)},d=(h,p)=>{h.deleteColumnAt(p)};return(h,p)=>(w(),B("div",CY,[l.value.columns.length>0?(w(),B("div",XY,[m(s)?ge("",!0):(w(),B("div",{key:0,onClick:p[0]||(p[0]=$=>f(1,l.value,"")),class:"flex h-full justify-center place-self-center"},[U("span",VY,[R(m(vh))])])),(w(!0),B(ke,null,xt(l.value.columns,$=>(w(),B("div",EY,[U("div",{class:St([{border:!m(s)},"flex-1 p-1 bg-white"])},[!m(s)&&$.items.length==0?(w(),B("div",{key:0,class:"h-8 group items-center content-justify w-full mb-2",onDrop:g=>c(g,l.value.uuid,$),onDragleave:g=>u(g,$.uuid),onDragenter:g=>O(g,$.uuid)},[U("div",qY,[U("hr",{class:St(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":r.value==$.uuid}])},null,2),U("span",ZY,[R(m(_m),{class:St([{"text-orange-500":r.value==$.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,AY)):ge("",!0),$.items.length>0?(w(),D(m(rg),{key:1,onDrop:g=>c(g,l.value.uuid,$),items:$.items},null,8,["onDrop","items"])):ge("",!0)],2),m(s)?ge("",!0):(w(),B("div",{key:0,onClick:g=>d(l.value,$.uuid),class:"flex h-auto justify-center place-self-center"},[U("span",YY,[R(m(SX))])],8,zY)),m(s)?ge("",!0):(w(),B("div",{key:1,onClick:g=>f(3,l.value,$.uuid),class:"flex h-auto justify-center place-self-center"},[U("span",IY,[R(m(vh))])],8,MY))]))),256))])):ge("",!0),l.value.columns.length==0?(w(),D(RY,{key:1,row:l.value},null,8,["row"])):ge("",!0)]))}}),DY={class:"fieldset bg-base-200 border-base-300 rounded-box w-full border p-4"},LY={key:0,class:"fieldset-legend"},WY={class:"inline-flex items-center justify-center w-full pointer-events-none"},NY={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},jY=M({__name:"FieldsetElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=ne("");let s=ne(!1);const o=zt(),a=G({get:()=>n.modelValue,set:O=>i("update:modelValue",O)}),l=(O,f,d)=>{var h;if(o.getDragMode=="insert"){const p=Number((h=O.dataTransfer)==null?void 0:h.getData("itemId"));d.items.push(io.getModelForType(p)),o.setDragMode(""),O.stopImmediatePropagation()}},c=O=>{r.value="",O.stopImmediatePropagation()};o.$subscribe((O,f)=>{f.showPreview?s.value=!0:s.value=!1});const u=(O,f)=>{r.value=f,O.stopImmediatePropagation(),o.getDragMode=="sort"&&f!=o.getSourceDragUuid&&O.stopImmediatePropagation()};return(O,f)=>(w(),B("fieldset",DY,[a.value.label!=""?(w(),B("legend",LY,H(a.value.label),1)):ge("",!0),a.value.items.length==0?(w(),B("div",{key:1,class:"h-8 group items-center content-justify w-full mb-2",onDrop:f[0]||(f[0]=d=>l(d,a.value.uuid,a.value)),onDragleave:f[1]||(f[1]=d=>c(d)),onDragenter:f[2]||(f[2]=d=>u(d,a.value.uuid))},[U("div",WY,[U("hr",{class:St(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":r.value==a.value.uuid}])},null,2),U("span",NY,[R(m(_m),{class:St([{"text-orange-500":r.value==a.value.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],32)):ge("",!0),a.value.items.length>0?(w(),D(m(rg),{key:2,items:a.value.items},null,8,["items"])):ge("",!0)]))}}),BY={class:"overflow-auto h-full"},GY={class:"flex flex-col gap-2"},FY={key:0,class:"w-full"},HY=["onDragleave","onDragenter","onDrop"],KY={class:"inline-flex items-center justify-center w-full pointer-events-none"},JY={class:"absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-900 pointer-events-none"},eM=["onDragstart"],tM={class:"grow content-center items-center"},nM={class:"buttons absolute rounded-sm invisible right-0 bg-slate-100/70 flex flex-row gap-2"},iM=["onClick","title"],rM=["onClick","title"],sM=["onClick","title"],oM=["onClick"],aM=M({__name:"RenderElements",props:{items:{}},setup(t){const e=Vr(),n=zt(),i=ne(""),r=(f,d)=>{var h;f.dataTransfer.dropEffect="move",f.dataTransfer.effectAllowed="move",(h=f.dataTransfer)==null||h.setData("mode","sort"),n.setDragMode("sort"),n.setSourceDragUuid(d),f.stopImmediatePropagation()},s=(f,d)=>{i.value="",f.stopImmediatePropagation()},o=(f,d)=>{i.value=d,n.getDragMode=="sort"&&d!=n.getSourceDragUuid&&f.stopImmediatePropagation()},a=(f,d)=>{var h,p;if(((h=f.dataTransfer)==null?void 0:h.getData("mode"))=="sort"){if(i.value="",n.getSourceDragUuid==d){n.setDragMode(""),f.stopImmediatePropagation();return}e.moveItemBefore(n.getSourceDragUuid,d),n.setDragMode(""),f.stopImmediatePropagation()}if(n.dragMode=="insert"){const $=Number((p=f.dataTransfer)==null?void 0:p.getData("itemId"));e.addElementAfter(io.getModelForType($),d),f.stopImmediatePropagation()}},l=f=>{e.deleteItem(f)},c=f=>{n.setActiveItem(f),n.setShowProperties(!0)},u=f=>{n.setActiveItem(f),n.setShowOptions(!0)},O=f=>{n.setActiveItem(f),n.setShowDependency(!0)};return(f,d)=>(w(),B("div",BY,[U("div",GY,[f.items.length>0?(w(!0),B(ke,{key:0},xt(f.items,h=>(w(),B("div",{class:"d-flex flex flex-col relative items-center",key:h.uuid},[h.type!==1||h.type===1?(w(),B("div",FY,[U("div",{class:"h-8 group w-full",onDragleave:on(p=>s(p,h.uuid),["self"]),onDragenter:on(p=>o(p,h.uuid),["self"]),onDrop:p=>a(p,h.uuid)},[U("div",KY,[U("hr",{class:St(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":i.value==h.uuid}])},null,2),U("span",JY,[R(m(_m),{class:St([{"text-orange-500":i.value==h.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,HY),U("div",{class:St([{"border-white":!h.hasDependencys(),"border-blue-500":h.hasDependencys()},"element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5",{" bg-slate-50":h.isFocused===!0}]),onDragstart:p=>r(p,h.uuid),draggable:"true"},[U("div",tM,[h.type===2?(w(),D(nY,{key:0,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===1?(w(),D(sY,{key:1,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===3?(w(),D(TY,{key:2,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===4?(w(),D(gY,{key:3,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===5?(w(),D(PY,{key:4,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===6?(w(),D(hY,{key:5,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===12?(w(),D(jY,{key:6,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===7?(w(),D(UY,{key:7,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0),h.type===9?(w(),D(bY,{key:8,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0)]),U("div",nM,[U("div",{onClick:p=>O(h),title:f.$t("dependencies"),class:"m-2 cursor-pointer"},[R(m(kX))],8,iM),h.type===3?(w(),B("div",{key:0,onClick:p=>u(h),title:f.$t("options"),class:"m-2 cursor-pointer"},[R(m(TX))],8,rM)):ge("",!0),U("div",{onClick:p=>c(h),title:f.$t("settings"),class:"m-2 cursor-pointer"},[R(m(CX))],8,sM),U("div",{onClick:p=>l(h),class:"text-red-500 m-2 cursor-pointer"},[R(m(YX))],8,oM)])],42,eM)])):ge("",!0)]))),128)):ge("",!0)])]))}}),lM=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},rg=lM(aM,[["__scopeId","data-v-766fa5f5"]]),cM=M({__name:"Main",setup(t){const e=zt(),n=Vr();function i(r){var s;if(e.dragMode=="insert"){const o=Number((s=r.dataTransfer)==null?void 0:s.getData("itemId"));n.addElement(io.getModelForType(o))}}return(r,s)=>(w(),B("div",{class:"border m-1 p-4 rounded-xl w-full h-full shadow bg-white",onDrop:s[0]||(s[0]=o=>i(o)),onDragover:s[1]||(s[1]=on(()=>{},["prevent"]))},[R(m(rg),{items:m(n).getItems},null,8,["items"])],32))}}),uM={class:"mb-2"},OM={key:0,class:"mr-2"},fM={class:"font-medium"},dM={class:"ml-2 text-xs bg-white px-2 py-1 rounded opacity-75"},hM={key:1,class:"ml-2 text-xs bg-green-200 px-2 py-1 rounded font-mono"},pM={key:0,class:"mt-2 ml-6 space-y-1"},mM={class:"p-2 bg-gray-50 rounded text-sm font-mono"},gM={class:"font-semibold text-gray-700"},$M={key:0,class:"p-2 bg-blue-50 rounded text-sm font-mono"},QM={class:"text-blue-800"},yM={key:0,class:"mt-2"},bM=M({__name:"NodeRenderer",props:{node:{},level:{},parentId:{},index:{}},setup(t){const e=t,n=bn("expandedNodes"),i=bn("toggleNode"),r=bn("getNodeType"),s=bn("getNodeColor"),o=bn("getColoredFormulaParts"),a=G(()=>`${e.parentId}-${e.index}`),l=G(()=>e.node.parts&&e.node.parts.length>0),c=G(()=>n==null?void 0:n.value.has(a.value)),u=G(()=>r?r(e.node.name):""),O=G(()=>s&&u.value?s(u.value):""),f=G(()=>e.node.unParsed),d=()=>{l.value&&i&&i(a.value)};return(h,p)=>{const $=Om("NodeRenderer",!0);return w(),B("div",uM,[U("div",{class:St(["p-3 rounded-lg border-2 transition-all hover:shadow-md",O.value]),style:Fn({marginLeft:h.level*20+"px"})},[U("div",{class:"flex items-center cursor-pointer",onClick:d},[l.value?(w(),B("span",OM,[c.value?(w(),D(m(Pm),{key:0,size:16})):(w(),D(m(M0),{key:1,size:16}))])):ge("",!0),U("span",fM,H(h.node.name),1),U("span",dM,H(u.value),1),h.node.result!==void 0?(w(),B("span",hM," = "+H(h.node.result),1)):ge("",!0)]),f.value?(w(),B("div",pM,[U("div",mM,[U("span",gM,H(h.node.name)+" = ",1),m(o)?(w(!0),B(ke,{key:0},xt(m(o)(f.value),(g,b)=>(w(),B("span",{key:b,class:St(g.colorClass)},H(g.text),3))),128)):ge("",!0)]),h.node.parsed&&h.node.parsed!==h.node.unParsed?(w(),B("div",$M,[p[0]||(p[0]=U("span",{class:"font-semibold text-blue-700"},"Aufgelöst: ",-1)),U("span",QM,H(h.node.parsed),1)])):ge("",!0)])):ge("",!0)],6),l.value&&c.value?(w(),B("div",yM,[(w(!0),B(ke,null,xt(h.node.parts,(g,b)=>(w(),D($,{key:b,node:g,level:h.level+1,"parent-id":a.value,index:b},null,8,["node","level","parent-id","index"]))),128))])):ge("",!0)])}}}),vM={class:"w-full p-6 min-h-screen"},SM={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},PM={key:1,class:"text-center py-10"},_M={key:2,class:"grid grid-cols-1 gap-6"},xM={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white"},wM={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white border-l-4 border-green-500"},TM={class:"flex items-center justify-between bg-green-50 p-4 rounded-lg"},kM={class:"flex items-center space-x-3"},RM={class:"text-lg font-medium text-gray-800"},CM={class:"text-2xl font-bold text-green-600"},XM={class:"text-sm text-gray-500"},VM=M({__name:"FormulaVisualizer",setup(t){const e=ne(new Set),n=zt(),i=G(()=>n.getFormulaData),r=G(()=>n.getFormulaError),s=G(()=>n.isFormulaLoading),o=O=>{const f=new Set(e.value);f.has(O)?f.delete(O):f.add(O),e.value=f},a=O=>O.startsWith("$F")&&O.endsWith("$F")?"formula":O.startsWith("$P")&&O.endsWith("$P")?"parameter":O.startsWith("$V")&&O.endsWith("$V")?"variable":O.startsWith("$CV")&&O.endsWith("$CV")?"calc-variable":/^[0-9.]+$/.test(O)?"value":O.startsWith("calc")?"main":"function",l=O=>{switch(O){case"formula":return"bg-purple-100 border-purple-300 text-purple-800";case"parameter":return"bg-blue-100 border-blue-300 text-blue-800";case"variable":return"bg-orange-100 border-orange-300 text-orange-800";case"calc-variable":return"bg-teal-100 border-teal-300 text-teal-800";case"value":return"bg-lime-100 border-lime-400 text-lime-800";case"main":return"bg-red-100 border-red-300 text-red-800";case"function":return"bg-yellow-100 border-yellow-300 text-yellow-800";default:return"bg-gray-100 border-gray-300 text-gray-800"}},c=O=>{const f=[];let d=0;const h=/(\$F[^$]*\$F|\$P[^$]*\$P|\$CV[^$]*\$CV|\$V[^$]*\$V)/g;let p;for(;(p=h.exec(O))!==null;){p.index>d&&f.push({text:O.substring(d,p.index),colorClass:"text-gray-800"});const $=p[0];let g="";$.startsWith("$F")?g="text-purple-600 font-semibold":$.startsWith("$P")?g="text-blue-600 font-semibold":$.startsWith("$CV")?g="text-teal-600 font-semibold":$.startsWith("$V")&&(g="text-orange-600 font-semibold"),f.push({text:$,colorClass:g}),d=p.index+$.length}return di.value?i.value.reduce((O,f)=>O+(f.result||0),0):0;return fr("expandedNodes",e),fr("toggleNode",o),fr("getNodeType",a),fr("getNodeColor",l),fr("getColoredFormulaParts",c),(O,f)=>(w(),B("div",vM,[r.value?(w(),B("div",SM,[f[0]||(f[0]=U("p",{class:"font-bold"},"Fehler",-1)),U("p",null,H(r.value),1)])):ge("",!0),s.value?(w(),B("div",PM,f[1]||(f[1]=[U("p",null,"Lade Formeldaten...",-1)]))):ge("",!0),!s.value&&i.value?(w(),B("div",_M,[U("div",xM,[f[2]||(f[2]=U("h2",{class:"text-xl font-semibold mb-4 text-gray-700"},"Baum-Struktur",-1)),U("div",null,[(w(!0),B(ke,null,xt(i.value,(d,h)=>(w(),D(bM,{key:h,node:d,level:0,"parent-id":"root",index:h},null,8,["node","index"]))),128))])]),U("div",wM,[f[4]||(f[4]=U("h2",{class:"text-xl font-semibold mb-3 text-gray-700"},"Gesamtsumme",-1)),U("div",TM,[U("div",kM,[U("span",RM,H(i.value.map(d=>d.result||0).join(" + ")),1),f[3]||(f[3]=U("span",{class:"text-gray-500"},"=",-1)),U("span",CM,H(u()),1)]),U("div",XM," ("+H(i.value.length)+" Formel"+H(i.value.length!==1?"n":"")+") ",1)])]),f[5]||(f[5]=Qm('

Legende

Formel ($F...$F)
Parameter ($P...$P)
Variable ($V...$V)
Kalk-Variable ($CV...$CV)
Wert (Zahlen)
Hauptformel
',1))])):ge("",!0)]))}});let jh=[],GP=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=GP[i])e=i+1;else return!0;if(e==n)return!1}}function iy(t){return t>=127462&&t<=127487}const ry=8205;function AM(t,e,n=!0,i=!0){return(n?FP:qM)(t,e,i)}function FP(t,e,n){if(e==t.length)return e;e&&HP(t.charCodeAt(e))&&KP(t.charCodeAt(e-1))&&e--;let i=md(t,e);for(e+=sy(i);e=0&&iy(md(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function qM(t,e,n){for(;e>0;){let i=FP(t,e-2,n);if(i=56320&&t<57344}function KP(t){return t>=55296&&t<56320}function sy(t){return t<65536?1:2}class Fe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Go(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Ai.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Go(this,e,n);let i=[];return this.decompose(e,n,i,0),Ai.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new tl(this),s=new tl(e);for(let o=n,a=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new tl(this,e)}iterRange(e,n=this.length){return new JP(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new e_(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Fe.empty:e.length<=32?new Rt(e):Ai.from(Rt.split(e,[]))}}class Rt extends Fe{constructor(e,n=ZM(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((n?i:a)>=e)return new zM(r,a,i,o);r=a+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new Rt(oy(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),a=bu(s.text,o.text.slice(),0,s.length);if(a.length<=32)i.push(new Rt(a,o.length+s.length));else{let l=a.length>>1;i.push(new Rt(a.slice(0,l)),new Rt(a.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof Rt))return super.replace(e,n,i);[e,n]=Go(this,e,n);let r=bu(this.text,bu(i.text,oy(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new Rt(r,s):Ai.from(Rt.split(r,[]),s)}sliceString(e,n=this.length,i=` + */const QZ="11.1.9";function yZ(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Vs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Vs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vs().__INTLIFY_PROD_DEVTOOLS__=!1)}const qn={UNEXPECTED_RETURN_TYPE:zq,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Fn(t,...e){return vf(t,null,void 0)}const Uh=ys("__translateVNode"),Dh=ys("__datetimeParts"),Lh=ys("__numberParts"),DP=ys("__setPluralRules"),LP=ys("__injectWithOption"),Wh=ys("__dispose");function xl(t){if(!nt(t)||Li(t))return t;for(const e in t)if(pi(t,e))if(!e.includes("."))nt(t[e])&&xl(t[e]);else{const n=e.split("."),i=n.length-1;let r=t,s=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||st(),yu(c,o[l])):yu(c,o)}else Qe(a)&&yu(JSON.parse(a),o)}),r==null&&s)for(const a in o)pi(o,a)&&xl(o[a]);return o}function WP(t){return t.type}function NP(t,e,n){let i=nt(e.messages)?e.messages:st();"__i18nGlobal"in n&&(i=Km(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{t.mergeLocaleMessage(s,i[s])});{if(nt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(nt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function WQ(t){return R($r,null,t,0)}const NQ="__INTLIFY_META__",jQ=()=>[],bZ=()=>!1;let BQ=0;function GQ(t){return(e,n,i,r)=>t(n,i,yt()||void 0,r)}const vZ=()=>{const t=yt();let e=null;return t&&(e=WP(t)[NQ])?{[NQ]:e}:null};function Jm(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,r=t.flatJson,s=oO?ne:gr;let o=et(t.inheritLocale)?t.inheritLocale:!0;const a=s(e&&o?e.locale.value:Qe(t.locale)?t.locale:_l),l=s(e&&o?e.fallbackLocale.value:Qe(t.fallbackLocale)||Tt(t.fallbackLocale)||Ie(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),c=s(Km(a.value,t)),u=s(Ie(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),O=s(Ie(t.numberFormats)?t.numberFormats:{[a.value]:{}});let f=e?e.missingWarn:et(t.missingWarn)||jo(t.missingWarn)?t.missingWarn:!0,d=e?e.fallbackWarn:et(t.fallbackWarn)||jo(t.fallbackWarn)?t.fallbackWarn:!0,h=e?e.fallbackRoot:et(t.fallbackRoot)?t.fallbackRoot:!0,p=!!t.fallbackFormat,$=$t(t.missing)?t.missing:null,g=$t(t.missing)?GQ(t.missing):null,b=$t(t.postTranslation)?t.postTranslation:null,Q=e?e.warnHtmlMessage:et(t.warnHtmlMessage)?t.warnHtmlMessage:!0,y=!!t.escapeParameter;const v=e?e.modifiers:Ie(t.modifiers)?t.modifiers:{};let S=t.pluralRules||e&&e.pluralRules,P;P=(()=>{i&&qQ(null);const A={version:QZ,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:v,pluralRules:S,missing:g===null?void 0:g,missingWarn:f,fallbackWarn:d,fallbackFormat:p,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:Q,escapeParameter:y,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};A.datetimeFormats=u.value,A.numberFormats=O.value,A.__datetimeFormatters=Ie(P)?P.__datetimeFormatters:void 0,A.__numberFormatters=Ie(P)?P.__numberFormatters:void 0;const L=rZ(A);return i&&qQ(L),L})(),Ta(P,a.value,l.value);function C(){return[a.value,l.value,c.value,u.value,O.value]}const Z=G({get:()=>a.value,set:A=>{P.locale=A,a.value=A}}),W=G({get:()=>l.value,set:A=>{P.fallbackLocale=A,l.value=A,Ta(P,a.value,A)}}),E=G(()=>c.value),te=G(()=>u.value),se=G(()=>O.value);function le(){return $t(b)?b:null}function F(A){b=A,P.postTranslation=A}function I(){return $}function z(A){A!==null&&(g=GQ(A)),$=A,P.missing=g}const J=(A,L,he,we,Be,Ge)=>{C();let Xt;try{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=e?iZ():void 0),Xt=A(P)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=void 0)}if(he!=="translate exists"&&Et(Xt)&&Xt===Sf||he==="translate exists"&&!Xt){const[Bt,Kn]=L();return e&&h?we(e):Be(Bt)}else{if(Ge(Xt))return Xt;throw Fn(qn.UNEXPECTED_RETURN_TYPE)}};function ue(...A){return J(L=>Reflect.apply(LQ,null,[L,...A]),()=>Ih(...A),"translate",L=>Reflect.apply(L.t,L,[...A]),L=>L,L=>Qe(L))}function Se(...A){const[L,he,we]=A;if(we&&!nt(we))throw Fn(qn.INVALID_ARGUMENT);return ue(L,he,Nt({resolvedMessage:!0},we||{}))}function fe(...A){return J(L=>Reflect.apply(zQ,null,[L,...A]),()=>Yh(...A),"datetime format",L=>Reflect.apply(L.d,L,[...A]),()=>EQ,L=>Qe(L)||Tt(L))}function Te(...A){return J(L=>Reflect.apply(MQ,null,[L,...A]),()=>Mh(...A),"number format",L=>Reflect.apply(L.n,L,[...A]),()=>EQ,L=>Qe(L)||Tt(L))}function Ee(A){return A.map(L=>Qe(L)||Et(L)||et(L)?WQ(String(L)):L)}const Ze={normalize:Ee,interpolate:A=>A,type:"vnode"};function Xe(...A){return J(L=>{let he;const we=L;try{we.processor=Ze,he=Reflect.apply(LQ,null,[we,...A])}finally{we.processor=null}return he},()=>Ih(...A),"translate",L=>L[Uh](...A),L=>[WQ(L)],L=>Tt(L))}function it(...A){return J(L=>Reflect.apply(MQ,null,[L,...A]),()=>Mh(...A),"number format",L=>L[Lh](...A),jQ,L=>Qe(L)||Tt(L))}function je(...A){return J(L=>Reflect.apply(zQ,null,[L,...A]),()=>Yh(...A),"datetime format",L=>L[Dh](...A),jQ,L=>Qe(L)||Tt(L))}function dt(A){S=A,P.pluralRules=S}function Ht(A,L){return J(()=>{if(!A)return!1;const he=Qe(L)?L:a.value,we=q(he),Be=P.messageResolver(we,A);return Li(Be)||ei(Be)||Qe(Be)},()=>[A],"translate exists",he=>Reflect.apply(he.te,he,[A,L]),bZ,he=>et(he))}function wt(A){let L=null;const he=VP(P,l.value,a.value);for(let we=0;we{o&&(a.value=A,P.locale=A,Ta(P,a.value,l.value))}),Re(e.fallbackLocale,A=>{o&&(l.value=A,P.fallbackLocale=A,Ta(P,a.value,l.value))}));const ae={id:BQ,locale:Z,fallbackLocale:W,get inheritLocale(){return o},set inheritLocale(A){o=A,A&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,Ta(P,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:E,get modifiers(){return v},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(A){f=A,P.missingWarn=f},get fallbackWarn(){return d},set fallbackWarn(A){d=A,P.fallbackWarn=d},get fallbackRoot(){return h},set fallbackRoot(A){h=A},get fallbackFormat(){return p},set fallbackFormat(A){p=A,P.fallbackFormat=p},get warnHtmlMessage(){return Q},set warnHtmlMessage(A){Q=A,P.warnHtmlMessage=A},get escapeParameter(){return y},set escapeParameter(A){y=A,P.escapeParameter=A},t:ue,getLocaleMessage:q,setLocaleMessage:B,mergeLocaleMessage:oe,getPostTranslationHandler:le,setPostTranslationHandler:F,getMissingHandler:I,setMissingHandler:z,[DP]:dt};return ae.datetimeFormats=te,ae.numberFormats=se,ae.rt=Se,ae.te=Ht,ae.tm=X,ae.d=fe,ae.n=Te,ae.getDateTimeFormat=ie,ae.setDateTimeFormat=_,ae.mergeDateTimeFormat=T,ae.getNumberFormat=Y,ae.setNumberFormat=N,ae.mergeNumberFormat=ee,ae[LP]=n,ae[Uh]=Xe,ae[Dh]=je,ae[Lh]=it,ae}function SZ(t){const e=Qe(t.locale)?t.locale:_l,n=Qe(t.fallbackLocale)||Tt(t.fallbackLocale)||Ie(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=$t(t.missing)?t.missing:void 0,r=et(t.silentTranslationWarn)||jo(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=et(t.silentFallbackWarn)||jo(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=et(t.fallbackRoot)?t.fallbackRoot:!0,a=!!t.formatFallbackMessages,l=Ie(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=$t(t.postTranslation)?t.postTranslation:void 0,O=Qe(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,f=!!t.escapeParameterHtml,d=et(t.sync)?t.sync:!0;let h=t.messages;if(Ie(t.sharedMessages)){const v=t.sharedMessages;h=Object.keys(v).reduce((P,x)=>{const C=P[x]||(P[x]={});return Nt(C,v[x]),P},h||{})}const{__i18n:p,__root:$,__injectWithOption:g}=t,b=t.datetimeFormats,Q=t.numberFormats,y=t.flatJson;return{locale:e,fallbackLocale:n,messages:h,flatJson:y,datetimeFormats:b,numberFormats:Q,missing:i,missingWarn:r,fallbackWarn:s,fallbackRoot:o,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:O,escapeParameter:f,messageResolver:t.messageResolver,inheritLocale:d,__i18n:p,__root:$,__injectWithOption:g}}function Nh(t={}){const e=Jm(SZ(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(r){e.locale.value=r},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(r){e.fallbackLocale.value=r},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(r){e.setMissingHandler(r)},get silentTranslationWarn(){return et(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(r){e.missingWarn=et(r)?!r:r},get silentFallbackWarn(){return et(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(r){e.fallbackWarn=et(r)?!r:r},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(r){e.fallbackFormat=r},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(r){e.setPostTranslationHandler(r)},get sync(){return e.inheritLocale},set sync(r){e.inheritLocale=r},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){e.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(r){e.escapeParameter=r},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...r){return Reflect.apply(e.t,e,[...r])},rt(...r){return Reflect.apply(e.rt,e,[...r])},te(r,s){return e.te(r,s)},tm(r){return e.tm(r)},getLocaleMessage(r){return e.getLocaleMessage(r)},setLocaleMessage(r,s){e.setLocaleMessage(r,s)},mergeLocaleMessage(r,s){e.mergeLocaleMessage(r,s)},d(...r){return Reflect.apply(e.d,e,[...r])},getDateTimeFormat(r){return e.getDateTimeFormat(r)},setDateTimeFormat(r,s){e.setDateTimeFormat(r,s)},mergeDateTimeFormat(r,s){e.mergeDateTimeFormat(r,s)},n(...r){return Reflect.apply(e.n,e,[...r])},getNumberFormat(r){return e.getNumberFormat(r)},setNumberFormat(r,s){e.setNumberFormat(r,s)},mergeNumberFormat(r,s){e.mergeNumberFormat(r,s)}};return i.__extender=n,i}function PZ(t,e,n){return{beforeCreate(){const i=yt();if(!i)throw Fn(qn.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const s=r.i18n;if(r.__i18n&&(s.__i18n=r.__i18n),s.__root=e,this===this.$root)this.$i18n=FQ(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Nh(s);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=FQ(t,r);else{this.$i18n=Nh({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;r.__i18nGlobal&&NP(e,r,r),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,o)=>this.$i18n.te(s,o),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=yt();if(!i)throw Fn(qn.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(i),delete this.$i18n}}}function FQ(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[DP](e.pluralizationRules||t.pluralizationRules);const n=Km(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const eg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function _Z({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,r)=>[...i,...r.type===ke?r.children:[r]],[]):e.reduce((n,i)=>{const r=t[i];return r&&(n[i]=r()),n},st())}function jP(){return ke}const xZ=M({name:"i18n-t",props:Nt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Et(t)||!isNaN(t)}},eg),setup(t,e){const{slots:n,attrs:i}=e,r=t.i18n||da({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(O=>O[0]!=="_"),o=st();t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=Qe(t.plural)?+t.plural:t.plural);const a=_Z(e,s),l=r[Uh](t.keypath,a,o),c=Nt(st(),i),u=Qe(t.tag)||nt(t.tag)?t.tag:jP();return vn(u,c,l)}}}),HQ=xZ;function wZ(t){return Tt(t)&&!Qe(t[0])}function BP(t,e,n,i){const{slots:r,attrs:s}=e;return()=>{const o={part:!0};let a=st();t.locale&&(o.locale=t.locale),Qe(t.format)?o.key=t.format:nt(t.format)&&(Qe(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((f,d)=>n.includes(d)?Nt(st(),f,{[d]:t.format[d]}):f,st()));const l=i(t.value,o,a);let c=[o.key];Tt(l)?c=l.map((f,d)=>{const h=r[f.type],p=h?h({[f.type]:f.value,index:d,parts:l}):[f.value];return wZ(p)&&(p[0].key=`${f.type}-${d}`),p}):Qe(l)&&(c=[l]);const u=Nt(st(),s),O=Qe(t.tag)||nt(t.tag)?t.tag:jP();return vn(O,u,c)}}const TZ=M({name:"i18n-n",props:Nt({value:{type:Number,required:!0},format:{type:[String,Object]}},eg),setup(t,e){const n=t.i18n||da({useScope:t.scope,__useComponent:!0});return BP(t,e,MP,(...i)=>n[Lh](...i))}}),KQ=TZ;function kZ(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function RZ(t){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Fn(qn.UNEXPECTED_ERROR);const c=kZ(t,a.$),u=JQ(l);return[Reflect.apply(c.t,c,[...ey(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);oO&&t.global===c&&(o.__i18nWatcher=Re(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{oO&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=JQ(a);o.textContent=Reflect.apply(l.t,l,[...ey(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function JQ(t){if(Qe(t))return{path:t};if(Ie(t)){if(!("path"in t))throw Fn(qn.REQUIRED_VALUE,"path");return t}else throw Fn(qn.INVALID_VALUE)}function ey(t){const{path:e,locale:n,args:i,choice:r,plural:s}=t,o={},a=i||{};return Qe(n)&&(o.locale=n),Et(r)&&(o.plural=r),Et(s)&&(o.plural=s),[e,a,o]}function CZ(t,e,...n){const i=Ie(n[0])?n[0]:{};(et(i.globalInstall)?i.globalInstall:!0)&&([HQ.name,"I18nT"].forEach(s=>t.component(s,HQ)),[KQ.name,"I18nN"].forEach(s=>t.component(s,KQ)),[ny.name,"I18nD"].forEach(s=>t.component(s,ny))),t.directive("t",RZ(e))}const XZ=ys("global-vue-i18n");function VZ(t={}){const e=__VUE_I18N_LEGACY_API__&&et(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=et(t.globalInjection)?t.globalInjection:!0,i=new Map,[r,s]=EZ(t,e),o=ys("");function a(O){return i.get(O)||null}function l(O,f){i.set(O,f)}function c(O){i.delete(O)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(O,...f){if(O.__VUE_I18N_SYMBOL__=o,O.provide(O.__VUE_I18N_SYMBOL__,u),Ie(f[0])){const p=f[0];u.__composerExtend=p.__composerExtend,u.__vueI18nExtend=p.__vueI18nExtend}let d=null;!e&&n&&(d=UZ(O,u.global)),__VUE_I18N_FULL_INSTALL__&&CZ(O,u,...f),__VUE_I18N_LEGACY_API__&&e&&O.mixin(PZ(s,s.__composer,u));const h=O.unmount;O.unmount=()=>{d&&d(),u.dispose(),h()}},get global(){return s},dispose(){r.stop()},__instances:i,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function da(t={}){const e=yt();if(e==null)throw Fn(qn.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Fn(qn.NOT_INSTALLED);const n=AZ(e),i=ZZ(n),r=WP(e),s=qZ(t,r);if(s==="global")return NP(i,t,r),i;if(s==="parent"){let l=zZ(n,e,t.__useComponent);return l==null&&(l=i),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=Nt({},t);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=Jm(l),o.__composerExtend&&(a[Wh]=o.__composerExtend(a)),MZ(o,e,a),o.__setInstance(e,a)}return a}function EZ(t,e){const n=oa(),i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Nh(t)):n.run(()=>Jm(t));if(i==null)throw Fn(qn.UNEXPECTED_ERROR);return[n,i]}function AZ(t){const e=bn(t.isCE?XZ:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Fn(t.isCE?qn.NOT_INSTALLED_WITH_PROVIDE:qn.UNEXPECTED_ERROR);return e}function qZ(t,e){return bf(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function ZZ(t){return t.mode==="composition"?t.global:t.global.__composer}function zZ(t,e,n=!1){let i=null;const r=e.root;let s=YZ(e,n);for(;s!=null;){const o=t;if(t.mode==="composition")i=o.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(s);a!=null&&(i=a.__composer,n&&i&&!i[LP]&&(i=null))}if(i!=null||r===s)break;s=s.parent}return i}function YZ(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function MZ(t,e,n){ft(()=>{},e),Fi(()=>{const i=n;t.__deleteInstance(e);const r=i[Wh];r&&(r(),delete i[Wh])},e)}const IZ=["locale","fallbackLocale","availableLocales"],ty=["t","rt","d","n","tm","te"];function UZ(t,e){const n=Object.create(null);return IZ.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s)throw Fn(qn.UNEXPECTED_ERROR);const o=He(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,r,o)}),t.config.globalProperties.$i18n=n,ty.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s||!s.value)throw Fn(qn.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${r}`,s)}),()=>{delete t.config.globalProperties.$i18n,ty.forEach(r=>{delete t.config.globalProperties[`$${r}`]})}}const DZ=M({name:"i18n-d",props:Nt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},eg),setup(t,e){const n=t.i18n||da({useScope:t.scope,__useComponent:!0});return BP(t,e,YP,(...i)=>n[Dh](...i))}}),ny=DZ;yZ();Kq(Vq);Jq(Gq);eZ(VP);if(__INTLIFY_PROD_DEVTOOLS__){const t=Vs();t.__INTLIFY__=!0,Eq(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const LZ={class:"flex flex-col p-3 gap-3 overflow-y-auto"},WZ={class:"flex flex-row gap-2"},NZ={class:"flex items-center space-x-2"},jZ={class:"flex items-center space-x-2"},BZ={class:"font-bold my-2"},GZ=["onDragstart"],FZ=M({__name:"Library",setup(t){const{locale:e}=da(),n=zt();let i=ne(!1);function r(l,c){l.dataTransfer&&(l.dataTransfer.dropEffect="move",l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("itemId",c)),n.setDragMode("insert")}function s(){n.setShowLoadLayoutDialog(!0)}Re(i,l=>{l===!1?n.setShowPreview(!1):n.setShowPreview(!0)});const o=ne([{category:"cms_elements",elements:[{id:"6",name:"headline",icon:AX},{id:"4",name:"text",icon:ZX},{id:"9",name:"media",icon:TX}]},{category:"form_elements",elements:[{id:"5",name:"textarea",icon:qX},{id:"2",name:"input",icon:zX},{id:"3",name:"select",icon:VX},{id:"1",name:"hidden",icon:EX}]},{category:"structure_elements",elements:[{id:"12",name:"fieldset",icon:CX},{id:"7",name:"row",icon:YX}]}]),a=l=>vn(l,{class:"w-5 h-5"});return(l,c)=>(w(),j("div",LZ,[U("div",WZ,[U("div",NZ,[la(U("select",{"onUpdate:modelValue":c[0]||(c[0]=u=>He(e)?e.value=u:null)},c[4]||(c[4]=[U("option",{value:"de"},"DE",-1),U("option",{value:"en"},"EN",-1)]),512),[[rf,m(e)]])]),U("div",jZ,[R(m(L2),{id:"preview-mode",modelValue:m(i),"onUpdate:modelValue":c[1]||(c[1]=u=>He(i)?i.value=u:i=u)},null,8,["modelValue"]),R(m(Wm),{for:"preview-mode"},{default:V(()=>[_e(H(l.$t("preview_mode")),1)]),_:1})])]),U("div",null,[R(m(qt),{onClick:s,class:"w-full"},{default:V(()=>[_e(H(l.$t("load_layout")),1)]),_:1})]),(w(!0),j(ke,null,xt(o.value,u=>(w(),j("div",{key:u.category},[U("h3",BZ,H(l.$t(u.category)),1),(w(!0),j(ke,null,xt(u.elements,O=>(w(),j("div",{key:O.id,class:"border-1 p-2 w-full flex flex-row gap-2 cursor-grab",draggable:"true",onDragstart:f=>r(f,O.id),onDragenter:c[2]||(c[2]=on(()=>{},["prevent"])),onDragover:c[3]||(c[3]=on(()=>{},["prevent"]))},[(w(),D(JO(a(O.icon)))),U("span",null,H(l.$t(O.name)),1)],40,GZ))),128))]))),128))]))}}),Ne=M({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=z0(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(s,o)=>la((w(),j("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>He(r)?r.value=a:null),"data-slot":"input",class:St(m(Le)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n.class))},null,2)),[[Do,m(r)]])}}),HZ=M({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m($5),me({"data-slot":"checkbox"},m(s),{class:m(Le)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[R(m(y5),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:V(()=>[re(o.$slots,"default",{},()=>[R(m(Y0),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),KZ={class:"form-check-label",for:"flexSwitchCheckDefault"},JZ=M({__name:"InputElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("placeholder")),1),R(m(Ne),{modelValue:r.value.placeHolder,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.placeHolder=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.name=a)},null,8,["modelValue"]),R(m(HZ),{modelValue:r.value.required,"onUpdate:modelValue":o[4]||(o[4]=a=>r.value.required=a)},null,8,["modelValue"]),U("label",KZ,H(s.$t("required")),1),U("label",null,H(s.$t("min")),1),R(m(Ne),{modelValue:r.value.minValue,"onUpdate:modelValue":o[5]||(o[5]=a=>r.value.minValue=a)},null,8,["modelValue"]),U("label",null,H(s.$t("max")),1),R(m(Ne),{modelValue:r.value.maxValue,"onUpdate:modelValue":o[6]||(o[6]=a=>r.value.maxValue=a)},null,8,["modelValue"]),U("label",null,H(s.$t("min_calc")),1),R(m(Ne),{modelValue:r.value.minCalc,"onUpdate:modelValue":o[7]||(o[7]=a=>r.value.minCalc=a)},null,8,["modelValue"]),U("label",null,H(s.$t("max_calc")),1),R(m(Ne),{modelValue:r.value.maxCalc,"onUpdate:modelValue":o[8]||(o[8]=a=>r.value.maxCalc=a)},null,8,["modelValue"])],64))}}),tc=M({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(jE),me({"data-slot":"select"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),nc=M({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(y8),null,{default:V(()=>[R(m(o8),me({"data-slot":"select-content"},{...m(s),...o.$attrs},{class:m(Le)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:V(()=>[R(m(nz)),R(m(C8),{class:St(m(Le)("p-1",o.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:V(()=>[re(o.$slots,"default")]),_:3},8,["class"]),R(m(tz))]),_:3},16,["class"])]),_:3}))}}),Pf=M({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(c8),me({"data-slot":"select-group"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),ez={class:"absolute right-2 flex size-3.5 items-center justify-center"},ti=M({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(h8),me({"data-slot":"select-item"},m(i),{class:m(Le)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class)}),{default:V(()=>[U("span",ez,[R(m(m8),null,{default:V(()=>[R(m(Y0),{class:"size-4"})]),_:1})]),R(m($8),null,{default:V(()=>[re(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),tz=M({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(S8),me({"data-slot":"select-scroll-down-button"},m(i),{class:m(Le)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[re(r.$slots,"default",{},()=>[R(m(Pm),{class:"size-4"})])]),_:3},16,["class"]))}}),nz=M({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(_8),me({"data-slot":"select-scroll-up-button"},m(i),{class:m(Le)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[re(r.$slots,"default",{},()=>[R(m(SX),{class:"size-4"})])]),_:3},16,["class"]))}}),ic=M({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(t){const e=t,n=at(e,"class","size"),i=Oi(n);return(r,s)=>(w(),D(m(w8),me({"data-slot":"select-trigger","data-size":r.size},m(i),{class:m(Le)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[re(r.$slots,"default"),R(m(O8),{"as-child":""},{default:V(()=>[R(m(Pm),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),rc=M({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(k8),me({"data-slot":"select-value"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),iz=M({__name:"SelectElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("mode")),1),R(m(tc),{modelValue:r.value.mode,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.mode=a)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>[R(m(ti),{value:"normal"},{default:V(()=>[_e(H(s.$t("normal")),1)]),_:1}),R(m(ti),{value:"paperdb"},{default:V(()=>[_e(H(s.$t("paperdb")),1)]),_:1}),R(m(ti),{value:"colordb"},{default:V(()=>[_e(H(s.$t("colordb")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),U("label",null,H(s.$t("container")),1),R(m(Ne),{modelValue:r.value.container,"onUpdate:modelValue":o[4]||(o[4]=a=>r.value.container=a)},null,8,["modelValue"])],64))}}),sc=M({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(G0),me({"data-slot":"dialog"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),rz=M({__name:"DialogClose",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(km),me({"data-slot":"dialog-close"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),sz=M({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(i1),me({"data-slot":"dialog-overlay"},m(n),{class:m(Le)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),oc=M({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(s1),null,{default:V(()=>[R(sz),R(m(t1),me({"data-slot":"dialog-content"},m(s),{class:m(Le)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",n.class)}),{default:V(()=>[re(o.$slots,"default"),R(m(km),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:V(()=>[R(m(I0)),a[0]||(a[0]=U("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),_f=M({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(n1),me({"data-slot":"dialog-description"},m(i),{class:m(Le)("text-muted-foreground text-sm",e.class)}),{default:V(()=>[re(r.$slots,"default")]),_:3},16,["class"]))}}),tg=M({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,i)=>(w(),j("div",{"data-slot":"dialog-footer",class:St(m(Le)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class))},[re(n.$slots,"default")],2))}}),xf=M({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(w(),j("div",{"data-slot":"dialog-header",class:St(m(Le)("flex flex-col gap-2 text-center sm:text-left",e.class))},[re(n.$slots,"default")],2))}}),wf=M({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class"),i=Oi(n);return(r,s)=>(w(),D(m(o1),me({"data-slot":"dialog-title"},m(i),{class:m(Le)("text-lg leading-none font-semibold",e.class)}),{default:V(()=>[re(r.$slots,"default")]),_:3},16,["class"]))}}),GP=M({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(w(),D(m(JV),me({"data-slot":"dialog-trigger"},e),{default:V(()=>[re(n.$slots,"default")]),_:3},16))}}),oz=M({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["update:page"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class"),s=Zn(r,i);return(o,a)=>(w(),D(m(kE),me({"data-slot":"pagination"},m(s),{class:m(Le)("mx-auto flex w-full justify-center",n.class)}),{default:V(l=>[re(o.$slots,"default",Hs(gs(l)))]),_:3},16,["class"]))}}),az=M({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(VE),me({"data-slot":"pagination-content"},m(n),{class:m(Le)("flex flex-row items-center gap-1",e.class)}),{default:V(s=>[re(i.$slots,"default",Hs(gs(s)))]),_:3},16,["class"]))}}),lz=M({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(xE),me({"data-slot":"pagination-ellipsis"},m(n),{class:m(Le)("flex size-9 items-center justify-center",e.class)}),{default:V(()=>[re(i.$slots,"default",{},()=>[R(m(_X),{class:"size-4"}),r[0]||(r[0]=U("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),cz=M({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{},isActive:{type:Boolean}},setup(t){const e=t,n=at(e,"class","size","isActive");return(i,r)=>(w(),D(m(AE),me({"data-slot":"pagination-item"},m(n),{class:m(Le)(m(yf)({variant:i.isActive?"outline":"ghost",size:i.size}),e.class)}),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),uz=M({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{}},setup(t){const e=t,n=at(e,"class","size"),i=Oi(n);return(r,s)=>(w(),D(m(ZE),me({"data-slot":"pagination-next",class:m(Le)(m(yf)({variant:"ghost",size:r.size}),"gap-1 px-2.5 sm:pr-2.5",e.class)},m(i)),{default:V(()=>[re(r.$slots,"default",{},()=>[s[0]||(s[0]=U("span",{class:"hidden sm:block"},"Next",-1)),R(m(M0))])]),_:3},16,["class"]))}}),Oz=M({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{}},setup(t){const e=t,n=at(e,"class","size"),i=Oi(n);return(r,s)=>(w(),D(m(YE),me({"data-slot":"pagination-previous",class:m(Le)(m(yf)({variant:"ghost",size:r.size}),"gap-1 px-2.5 sm:pr-2.5",e.class)},m(i)),{default:V(()=>[re(r.$slots,"default",{},()=>[R(m(vX)),s[0]||(s[0]=U("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),fz={class:"w-full"},dz={key:0,class:"ml-4"},hz=M({__name:"FolderTree",props:{folders:{},selectedFolderId:{}},emits:["select-folder"],setup(t,{emit:e}){const n=e,i=r=>{n("select-folder",r)};return(r,s)=>{const o=Om("FolderTree",!0);return w(),j("ul",fz,[(w(!0),j(ke,null,xt(r.folders,a=>(w(),j("li",{key:a.uuid},[R(m(qt),{variant:a.uuid===r.selectedFolderId?"secondary":"ghost",onClick:l=>i(a.uuid),class:"w-full justify-start"},{default:V(()=>[_e(H(a.title),1)]),_:2},1032,["variant","onClick"]),a.subFolders&&a.subFolders.length>0?(w(),j("div",dz,[R(o,{folders:a.subFolders,"selected-folder-id":r.selectedFolderId,onSelectFolder:i},null,8,["folders","selected-folder-id"])])):pe("",!0)]))),128))])}}}),pz={class:"h-[70vh] flex flex-col"},mz={class:"h-full overflow-y-auto p-6"},gz={class:"flex flex-col h-full p-6"},$z={class:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4 flex-grow"},Qz=["onClick"],yz=["src","alt"],bz={class:"mt-4 flex justify-center"},vz=M({__name:"MediaBrowser",emits:["select-media"],setup(t,{emit:e}){const n=e,i=ne([]),r=d=>{console.log(d),n("select-media",d)},s=ne([]),o=ne(null),a=ne(1),l=ne(0),c=async()=>{try{const d=await hP();i.value=d.data,i.value.length>0&&O(i.value[0].uuid)}catch(d){console.error("Failed to fetch folders",d)}},u=async(d,h=1)=>{try{const p=await q2(d,h);s.value=p.data,a.value=p.currentPage,l.value=p.count}catch(p){console.error(`Failed to fetch media for folder ${d}`,p)}},O=d=>{o.value=d,u(d,1)},f=d=>{o.value&&u(o.value,d)};return ft(()=>{c()}),(d,h)=>(w(),j("div",pz,[h[0]||(h[0]=U("h1",{class:"text-2xl font-bold mb-4"},"Media Browser",-1)),R(m(oP),{direction:"horizontal",class:"flex-grow rounded-lg border"},{default:V(()=>[R(m(rO),{"default-size":25},{default:V(()=>[U("div",mz,[R(hz,{folders:i.value,"selected-folder-id":o.value,onSelectFolder:O},null,8,["folders","selected-folder-id"])])]),_:1}),R(m(sP)),R(m(rO),{"default-size":75},{default:V(()=>[U("div",gz,[U("div",$z,[(w(!0),j(ke,null,xt(s.value,p=>(w(),j("div",{key:p.uuid,class:"aspect-square bg-gray-100 rounded-lg overflow-hidden cursor-pointer",onClick:$=>r(p)},[U("img",{src:p.url,alt:p.name,class:"w-full h-full object-cover"},null,8,yz)],8,Qz))),128))]),U("div",bz,[l.value>12?(w(),D(m(oz),{key:0,"items-per-page":12,total:l.value,"sibling-count":1,"show-edges":"","default-page":a.value,"onUpdate:page":f},{default:V(()=>[R(m(az),{class:"flex items-center gap-1"},{default:V(({items:p})=>[R(m(Oz)),(w(!0),j(ke,null,xt(p,($,g)=>(w(),j(ke,null,[$.type==="page"?(w(),D(m(cz),{key:g,value:$.value,"as-child":""},{default:V(()=>[R(m(qt),{class:"w-10 h-10 p-0",variant:$.value===a.value?"default":"outline"},{default:V(()=>[_e(H($.value),1)]),_:2},1032,["variant"])]),_:2},1032,["value"])):(w(),D(m(lz),{key:$.type,index:g},null,8,["index"]))],64))),256)),R(m(uz))]),_:1})]),_:1},8,["total","default-page"])):pe("",!0)])])]),_:1})]),_:1})]))}}),Sz={for:"dropzone-file",class:"flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},Pz={class:"flex items-center justify-center w-full"},_z=["value"],xz={key:0,class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},wz=M({__name:"MediaElement",props:{modelValue:gP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:$=>i("update:modelValue",$)}),s=ne(!1),o=ne(0),a=$=>{r.value.default=$.uuid,r.value.url=$.url,s.value=!1},l=ne(!1),c=ne([]),u=ne(""),O=()=>{l.value=!0},f=()=>{l.value=!1},d=$=>{var b;l.value=!1;const g=(b=$.dataTransfer)==null?void 0:b.files;g&&g.length>0&&p(g[0])},h=$=>{const b=$.target.files;b&&b.length>0&&p(b[0])};ft(async()=>{try{let $=await hP();c.value=$.data,$.data.length>0&&(u.value=c.value[0].uuid)}catch($){console.error("Failed to fetch directories",$)}});const p=async $=>{if(o.value=0,u)try{let g=await A2($,u.value,b=>{o.value=b});r.value.url=g.url,r.value.default=g.uuid}catch(g){console.error("Upload failed",g)}finally{setTimeout(()=>o.value=0,2e3)}};return($,g)=>(w(),j("div",null,[U("label",null,H($.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":g[0]||(g[0]=b=>r.value.id=b)},null,8,["modelValue"]),R(m(sc),{open:s.value,"onUpdate:open":g[1]||(g[1]=b=>s.value=b)},{default:V(()=>[R(m(GP),{"as-child":""},{default:V(()=>[R(m(qt),{class:"my-2 w-full"},{default:V(()=>g[3]||(g[3]=[_e("Mediabrowser")])),_:1,__:[3]})]),_:1}),R(m(oc),{class:"sm:max-w-5xl max-h-[80vh] overflow-y-auto"},{default:V(()=>[R(vz,{onSelectMedia:a})]),_:1})]),_:1},8,["open"]),U("div",{class:St(["flex items-center justify-center w-full",{"border-blue-500":l.value}]),onDragover:on(O,["prevent"]),onDragleave:on(f,["prevent"]),onDrop:on(d,["prevent"])},[U("label",Sz,[g[4]||(g[4]=Qm('

Click to upload or drag and drop

SVG, PNG, JPG or GIF (MAX. 800x400px)

',1)),U("input",{id:"dropzone-file",type:"file",class:"hidden",onChange:h},null,32)])],34),U("div",Pz,[la(U("select",{"onUpdate:modelValue":g[2]||(g[2]=b=>u.value=b),class:"w-full p-2 border rounded-md"},[(w(!0),j(ke,null,xt(c.value,b=>(w(),j("option",{key:b.uuid,value:b.uuid},H(b.title),9,_z))),128))],512),[[rf,u.value]])]),o.value>0?(w(),j("div",xz,[U("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Hn({width:o.value+"%"})},null,4)])):pe("",!0)]))}}),Tz=M({__name:"FieldsetElement",props:{modelValue:$P},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("label")),1),R(m(Ne),{modelValue:r.value.label,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.label=a)},null,8,["modelValue"])],64))}}),kz=M({__name:"HiddenElement",props:{modelValue:QP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"])],64))}}),ng=M({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=z0(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(s,o)=>la((w(),j("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>He(r)?r.value=a:null),"data-slot":"textarea",class:St(m(Le)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[Do,m(r)]])}}),Rz=M({__name:"TextElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(ng),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"])],64))}}),Cz=M({__name:"TextareaElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(ng),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"])],64))}}),Xz=M({__name:"HeadlineElement",props:{modelValue:vP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j(ke,null,[U("label",null,H(s.$t("id")),1),R(m(Ne),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),U("label",null,H(s.$t("default")),1),R(m(Ne),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),U("label",null,H(s.$t("name")),1),R(m(Ne),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"]),U("label",null,H(s.$t("variant")),1),R(m(tc),{modelValue:r.value.variant,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.variant=a)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>[R(m(ti),{value:"1"},{default:V(()=>[_e(H(s.$t("headline1")),1)]),_:1}),R(m(ti),{value:"2"},{default:V(()=>[_e(H(s.$t("headline2")),1)]),_:1}),R(m(ti),{value:"3"},{default:V(()=>[_e(H(s.$t("headline3")),1)]),_:1}),R(m(ti),{value:"4"},{default:V(()=>[_e(H(s.$t("headline4")),1)]),_:1}),R(m(ti),{value:"5"},{default:V(()=>[_e(H(s.$t("headline5")),1)]),_:1}),R(m(ti),{value:"6"},{default:V(()=>[_e(H(s.$t("headline6")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),Vz=M({__name:"RowElement",props:{modelValue:mP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:o=>i("update:modelValue",o)});function s(o){o!==null&&o.addColumnAtTheEnd(new Ys)}return(o,a)=>(w(),D(m(qt),{onClick:a[0]||(a[0]=l=>s(r.value))},{default:V(()=>[_e(H(o.$t("add_column")),1)]),_:1}))}}),Ez=M({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=Zn(t,e);return(s,o)=>(w(),D(m(G0),me({"data-slot":"sheet"},m(r)),{default:V(()=>[re(s.$slots,"default")]),_:3},16))}}),Az=M({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(i1),me({"data-slot":"sheet-overlay",class:m(Le)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),qz=M({inheritAttrs:!1,__name:"SheetContent",props:{class:{},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=at(n,"class","side"),s=Zn(r,i);return(o,a)=>(w(),D(m(s1),null,{default:V(()=>[R(Az),R(m(t1),me({"data-slot":"sheet-content",class:m(Le)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",o.side==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",o.side==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",o.side==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",o.side==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n.class)},{...m(s),...o.$attrs}),{default:V(()=>[re(o.$slots,"default"),R(m(km),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:V(()=>[R(m(I0),{class:"size-4"}),a[0]||(a[0]=U("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),Zz=M({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(n1),me({"data-slot":"sheet-description",class:m(Le)("text-muted-foreground text-sm",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),zz=M({__name:"SheetHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(w(),j("div",{"data-slot":"sheet-header",class:St(m(Le)("flex flex-col gap-1.5 p-4",e.class))},[re(n.$slots,"default")],2))}}),Yz=M({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=at(e,"class");return(i,r)=>(w(),D(m(o1),me({"data-slot":"sheet-title",class:m(Le)("text-foreground font-semibold",e.class)},m(n)),{default:V(()=>[re(i.$slots,"default")]),_:3},16,["class"]))}}),Mz={class:"flex flex-col w-full p-2"},Iz=M({__name:"ElementProperties",emits:["update:modelValue"],setup(t,{emit:e}){let n=ne(!1);const i=zt();return i.$subscribe((r,s)=>{s.showProperties&&(n.value=!0)}),Re(n,r=>{r===!1&&i.setShowProperties(!1)}),(r,s)=>(w(),D(m(Ez),{open:m(n),"onUpdate:open":s[9]||(s[9]=o=>He(n)?n.value=o:n=o)},{default:V(()=>[R(m(qz),null,{default:V(()=>[R(m(zz),null,{default:V(()=>[R(m(Yz),null,{default:V(()=>s[10]||(s[10]=[_e("Properties")])),_:1,__:[10]}),R(m(Zz))]),_:1}),U("div",Mz,[m(i).getActiveItem.type===6?(w(),D(Xz,{key:0,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[0]||(s[0]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===9?(w(),D(wz,{key:1,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[1]||(s[1]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===7?(w(),D(Vz,{key:2,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[2]||(s[2]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===5?(w(),D(Cz,{key:3,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[3]||(s[3]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===4?(w(),D(Rz,{key:4,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[4]||(s[4]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===12?(w(),D(Tz,{key:5,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[5]||(s[5]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===3?(w(),D(iz,{key:6,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[6]||(s[6]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===2?(w(),D(JZ,{key:7,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[7]||(s[7]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0),m(i).getActiveItem.type===1?(w(),D(kz,{key:8,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[8]||(s[8]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):pe("",!0)])]),_:1})]),_:1},8,["open"]))}}),Uz={class:"overflow-auto h-full w-full"},Dz=M({__name:"ElementDependency",setup(t){const e=zt();let n=ne(!1);function i(){e.getActiveItem.addDependency(new fa)}return e.$subscribe((r,s)=>{s.showDependency&&(n.value=!0)}),Re(n,r=>{r===!1&&e.setShowDependency(!1)}),(r,s)=>(w(),D(m(sc),{class:"w-full h-full",open:m(n),"onUpdate:open":s[1]||(s[1]=o=>He(n)?n.value=o:n=o)},{default:V(()=>[R(m(oc),{class:"h-full"},{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>s[2]||(s[2]=[_e("Dependencys")])),_:1,__:[2]}),R(m(_f))]),_:1}),U("div",Uz,[R(m(qt),{onClick:s[0]||(s[0]=o=>i())},{default:V(()=>s[3]||(s[3]=[_e("Add Dependency")])),_:1,__:[3]}),R(m(ig),{dependencys:m(e).getActiveItem.dependencys},null,8,["dependencys"])]),R(m(tg))]),_:1})]),_:1},8,["open"]))}}),Lz={class:"w-full"},Wz=M({__name:"ElementBorder",props:{dependency:{}},setup(t){return(e,n)=>(w(),j("div",Lz,[R(m(jz),{borders:e.dependency.borders},null,8,["borders"])]))}}),Nz={class:"flex flex-row items-center gap-2 border-l-3 border-black pt-1"},jz=M({__name:"Border",props:{borders:{}},setup(t){function e(n){n.addDependency(new fa)}return(n,i)=>(w(!0),j(ke,null,xt(n.borders,r=>(w(),j("div",{class:"flex flex-col",key:r.uuid},[U("div",Nz,[i[1]||(i[1]=U("span",{class:"w-5 flex-none"},[U("hr",{class:"bg-black h-1 border-0"})],-1)),R(m(Ne),{modelValue:r.formula,"onUpdate:modelValue":s=>r.formula=s,placeholder:"Formula"},null,8,["modelValue","onUpdate:modelValue"]),R(m(Ne),{modelValue:r.calcValue,"onUpdate:modelValue":s=>r.calcValue=s,placeholder:"CalcValue"},null,8,["modelValue","onUpdate:modelValue"]),R(m(Ne),{modelValue:r.value,"onUpdate:modelValue":s=>r.value=s,placeholder:"Value"},null,8,["modelValue","onUpdate:modelValue"]),R(m(qt),{onClick:s=>e(r)},{default:V(()=>i[0]||(i[0]=[_e("Add Dependency")])),_:2,__:[0]},1032,["onClick"])]),R(m(ig),{dependencys:r.dependencys},null,8,["dependencys"])]))),128))}}),Bz={class:"flex flex-row gap-2 border-l-3 border-black pt-1"},ig=M({__name:"Dependency",props:{dependencys:{}},setup(t){const e=Vr();function n(i){i.addBorder(new aP)}return(i,r)=>(w(!0),j(ke,null,xt(i.dependencys,s=>(w(),j("div",{class:"d-flex flex-wrap relative ml-5 mr-5",key:s.uuid},[U("div",Bz,[r[2]||(r[2]=U("span",{class:"w-2 flex-none"},null,-1)),R(m(tc),{modelValue:s.relation,"onUpdate:modelValue":o=>s.relation=o},{default:V(()=>[R(m(ic),{class:"w-[180px]"},{default:V(()=>[R(m(rc),{placeholder:"Select Relation"})]),_:1}),R(m(nc),null,{default:V(()=>[(w(!0),j(ke,null,xt(m(e).getIdRecursiv,o=>(w(),D(m(ti),{value:o},{default:V(()=>[_e(H(o),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),R(m(Wm),{for:"formula"},{default:V(()=>r[0]||(r[0]=[_e("Formula")])),_:1,__:[0]}),R(m(Ne),{name:"formula",modelValue:s.formula,"onUpdate:modelValue":o=>s.formula=o},null,8,["modelValue","onUpdate:modelValue"]),R(m(qt),{onClick:o=>n(s)},{default:V(()=>r[1]||(r[1]=[_e("Add Border")])),_:2,__:[1]},1032,["onClick"])]),R(m(Wz),{dependency:s},null,8,["dependency"])]))),128))}}),Gz={class:"flex flex-row gap-1"},Fz=M({__name:"OptionElement",props:{option:{}},emits:["update:option"],setup(t,{emit:e}){const n=t;function i(o){o.addDependency(new fa)}let r=e;const s=G({get:()=>n.option,set:o=>r("update:option",o)});return(o,a)=>(w(),j(ke,null,[U("div",Gz,[U("label",null,H(o.$t("id")),1),R(m(Ne),{modelValue:s.value.id,"onUpdate:modelValue":a[0]||(a[0]=l=>s.value.id=l)},null,8,["modelValue"]),U("label",null,H(o.$t("name")),1),R(m(Ne),{modelValue:s.value.name,"onUpdate:modelValue":a[1]||(a[1]=l=>s.value.name=l)},null,8,["modelValue"]),R(m(qt),{onClick:a[2]||(a[2]=l=>i(s.value))},{default:V(()=>[_e(H(o.$t("add_dependency")),1)]),_:1})]),R(m(ig),{dependencys:s.value.dependencys},null,8,["dependencys"])],64))}}),Hz={class:"w-full grid overflow-y-auto px-6"},Kz=M({__name:"SelectSpecial",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e,r=ne(!1);const s=G({get:()=>n.modelValue,set:l=>i("update:modelValue",l)});function o(l){l.addOption(new yP(String(l.options.length+1)))}const a=zt();return a.$subscribe((l,c)=>{c.showOptions&&(r.value=!0)},{detached:!0}),Re(r,l=>{l===!1&&a.setShowOptions(!1)}),(l,c)=>m(a).getActiveItem.type===3?(w(),D(m(sc),{key:0,open:m(r),"onUpdate:open":c[1]||(c[1]=u=>He(r)?r.value=u:r=u)},{default:V(()=>[R(m(GP),null,{default:V(()=>[R(m(qt),{class:"mt-2"},{default:V(()=>[_e(H(l.$t("edit_options")),1)]),_:1})]),_:1}),R(m(oc),{class:"min-w-full grid-rows-[auto_minmax(0,1fr)_auto] p-4 max-h-[90dvh]"},{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>[_e(H(l.$t("edit_options")),1)]),_:1}),R(m(_f),null,{default:V(()=>[R(m(qt),{onClick:c[0]||(c[0]=u=>o(s.value))},{default:V(()=>[_e(H(l.$t("add_option")),1)]),_:1})]),_:1})]),_:1}),U("div",Hz,[(w(!0),j(ke,null,xt(s.value.options,u=>(w(),j("div",{class:"d-flex flex-wrap p-2 relative",key:u.uuid},[R(Fz,{option:u},null,8,["option"])]))),128))]),R(m(tg),null,{default:V(()=>[R(m(rz),{"as-child":""},{default:V(()=>[R(m(qt),{type:"button",variant:"secondary"},{default:V(()=>[_e(H(l.$t("close")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):pe("",!0)}}),Jz={class:""},eY=M({__name:"SpecialProperties",emits:["update:modelValue"],setup(t,{emit:e}){const n=zt();return(i,r)=>(w(),j("div",Jz,[R(Kz,{modelValue:m(n).getActiveItem,"onUpdate:modelValue":r[0]||(r[0]=s=>m(n).getActiveItem=s)},null,8,["modelValue"])]))}}),tY={class:"flex gap-2 flex-row items-center"},nY={class:"w-60 flex-inital"},iY=M({__name:"InputElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j("div",tY,[U("label",nY,H(r.value.name),1),R(m(Ne),{placeholder:r.value.placeHolder,"onUpdate:placeholder":o[0]||(o[0]=a=>r.value.placeHolder=a),modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a),name:r.value.name,"onUpdate:name":o[2]||(o[2]=a=>r.value.name=a),id:r.value.id,"onUpdate:id":o[3]||(o[3]=a=>r.value.id=a),required:r.value.required,"onUpdate:required":o[4]||(o[4]=a=>r.value.required=a)},null,8,["placeholder","modelValue","name","id","required"])]))}}),rY={class:"flex gap-2 flex-row"},sY={class:"w-60 flex-inital"},oY=M({__name:"HiddenElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(w(),j("div",rY,[U("label",sY,H(r.value.id),1)]))}}),aY={class:"flex gap-2 flex-row items-center content-center"},lY={key:0,class:"text-4xl"},cY={key:1,class:"text-base"},uY={key:2,class:"text-lg"},OY={key:3,class:"text-xl"},fY={key:4,class:"text-2xl"},dY={key:5,class:"text-3xl"},hY={key:6,class:"text-4xl"},pY=M({__name:"HeadlineElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a,l,c,u,O,f,d,h,p,$,g,b,Q;return w(),j("div",aY,[((a=r.value)==null?void 0:a.variant)=="1"?(w(),j("h1",lY,H((l=r.value)==null?void 0:l.default),1)):((c=r.value)==null?void 0:c.variant)=="6"?(w(),j("h6",cY,H((u=r.value)==null?void 0:u.default),1)):((O=r.value)==null?void 0:O.variant)=="5"?(w(),j("h5",uY,H((f=r.value)==null?void 0:f.default),1)):((d=r.value)==null?void 0:d.variant)=="4"?(w(),j("h4",OY,H((h=r.value)==null?void 0:h.default),1)):((p=r.value)==null?void 0:p.variant)=="3"?(w(),j("h3",fY,H(($=r.value)==null?void 0:$.default),1)):((g=r.value)==null?void 0:g.variant)=="2"?(w(),j("h2",dY,H((b=r.value)==null?void 0:b.default),1)):(w(),j("h1",hY,H((Q=r.value)==null?void 0:Q.default),1))])}}}),mY={class:"flex gap-2 flex-row"},gY={style:{"white-space":"pre-line"}},$Y=M({__name:"TextElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a;return w(),j("div",mY,[U("p",gY,H((a=r.value)==null?void 0:a.default),1)])}}}),QY={class:"flex gap-2 flex-row"},yY={key:0,class:"w-full rounded bg-gray-300 justify-center content-center flex"},bY=["src"],vY=M({__name:"MediaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return ft(async()=>{if(r.value.default&&!r.value.url)try{r.value.url=await pP(r.value.default)}catch(s){console.error("Failed to fetch media URL",s)}}),(s,o)=>(w(),j("div",QY,[r.value.url==""?(w(),j("div",yY,[R(m(wX),{class:"size-20 m-10 place-self-center"})])):pe("",!0),r.value.url!=""?(w(),j("img",{key:1,class:"",src:r.value.url},null,8,bY)):pe("",!0)]))}}),SY={class:"flex gap-2 flex-row"},PY={class:"w-60 flex-inital"},_Y=M({__name:"TextareaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a,l,c,u;return w(),j("div",SY,[U("label",PY,H((a=r.value)==null?void 0:a.name),1),R(m(ng),{value:(l=r.value)==null?void 0:l.default,name:(c=r.value)==null?void 0:c.name,id:(u=r.value)==null?void 0:u.id},null,8,["value","name","id"])])}}}),xY={class:"flex gap-2 flex-row items-center"},wY={class:"w-60 flex-inital"},TY={class:"w-full"},kY=M({__name:"SelectElementForm",props:{modelValue:bP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=G({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a;return w(),j("div",xY,[U("label",wY,H((a=r.value)==null?void 0:a.name),1),U("div",TY,[R(m(tc),{modelValue:r.value.default,"onUpdate:modelValue":o[0]||(o[0]=l=>r.value.default=l)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>{var l;return[(w(!0),j(ke,null,xt((l=r.value)==null?void 0:l.options,c=>(w(),D(m(ti),{key:c.uuid,value:c.id},{default:V(()=>[_e(H(c.name),1)]),_:2},1032,["value"]))),128))]}),_:1})]),_:1})]),_:1},8,["modelValue"])])])}}}),RY={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},CY=M({__name:"EmptyElementForm",props:{row:{}},setup(t){const e=t;function n(i){i.addColumnAtTheEnd(new Ys)}return(i,r)=>(w(),j("div",{onClick:r[0]||(r[0]=s=>n(e.row)),class:"flex h-full justify-center"},[U("span",RY,[R(m(vh))])]))}}),XY={class:"flex gap-2 flex-col"},VY={key:0,class:"w-full flex flex-row gap-1 h-full"},EY={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},AY={class:"flex w-full h-auto"},qY=["onDrop","onDragleave","onDragenter"],ZY={class:"inline-flex items-center justify-center w-full pointer-events-none"},zY={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},YY=["onClick"],MY={class:"font-medium text-red-500 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},IY=["onClick"],UY={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},DY=M({__name:"RowElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=ne("");let s=ne(!1);const o=Vr(),a=zt(),l=G({get:()=>n.modelValue,set:h=>i("update:modelValue",h)}),c=(h,p,$)=>{var g,b;if(r.value="",((g=h.dataTransfer)==null?void 0:g.getData("mode"))=="sort"){let Q=o.cutItem(a.getSourceDragUuid);Q!==null&&$.items.push(Q),a.setDragMode(""),h.stopImmediatePropagation()}if(a.getDragMode=="insert"){const Q=Number((b=h.dataTransfer)==null?void 0:b.getData("itemId"));$.items.push(io.getModelForType(Q)),a.setDragMode(""),h.stopImmediatePropagation()}},u=(h,p)=>{r.value="",h.stopImmediatePropagation()};a.$subscribe((h,p)=>{p.showPreview?s.value=!0:s.value=!1});const O=(h,p)=>{r.value=p,h.stopImmediatePropagation(),a.getDragMode=="sort"&&p!=a.getSourceDragUuid&&h.stopImmediatePropagation()},f=(h,p,$)=>{h==1&&p.addColumnAtTheBeginning(new Ys),h==2&&p.addColumnAtTheEnd(new Ys),h==3&&p.addColumnAt(new Ys,$)},d=(h,p)=>{h.deleteColumnAt(p)};return(h,p)=>(w(),j("div",XY,[l.value.columns.length>0?(w(),j("div",VY,[m(s)?pe("",!0):(w(),j("div",{key:0,onClick:p[0]||(p[0]=$=>f(1,l.value,"")),class:"flex h-full justify-center place-self-center"},[U("span",EY,[R(m(vh))])])),(w(!0),j(ke,null,xt(l.value.columns,$=>(w(),j("div",AY,[U("div",{class:St([{border:!m(s)},"flex-1 p-1 bg-white"])},[!m(s)&&$.items.length==0?(w(),j("div",{key:0,class:"h-8 group items-center content-justify w-full mb-2",onDrop:g=>c(g,l.value.uuid,$),onDragleave:g=>u(g,$.uuid),onDragenter:g=>O(g,$.uuid)},[U("div",ZY,[U("hr",{class:St(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":r.value==$.uuid}])},null,2),U("span",zY,[R(m(_m),{class:St([{"text-orange-500":r.value==$.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,qY)):pe("",!0),$.items.length>0?(w(),D(m(rg),{key:1,onDrop:g=>c(g,l.value.uuid,$),items:$.items},null,8,["onDrop","items"])):pe("",!0)],2),m(s)?pe("",!0):(w(),j("div",{key:0,onClick:g=>d(l.value,$.uuid),class:"flex h-auto justify-center place-self-center"},[U("span",MY,[R(m(PX))])],8,YY)),m(s)?pe("",!0):(w(),j("div",{key:1,onClick:g=>f(3,l.value,$.uuid),class:"flex h-auto justify-center place-self-center"},[U("span",UY,[R(m(vh))])],8,IY))]))),256))])):pe("",!0),l.value.columns.length==0?(w(),D(CY,{key:1,row:l.value},null,8,["row"])):pe("",!0)]))}}),LY={class:"fieldset bg-base-200 border-base-300 rounded-box w-full border p-4"},WY={key:0,class:"fieldset-legend"},NY={class:"inline-flex items-center justify-center w-full pointer-events-none"},jY={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},BY=M({__name:"FieldsetElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=ne("");let s=ne(!1);const o=zt(),a=G({get:()=>n.modelValue,set:O=>i("update:modelValue",O)}),l=(O,f,d)=>{var h;if(o.getDragMode=="insert"){const p=Number((h=O.dataTransfer)==null?void 0:h.getData("itemId"));d.items.push(io.getModelForType(p)),o.setDragMode(""),O.stopImmediatePropagation()}},c=O=>{r.value="",O.stopImmediatePropagation()};o.$subscribe((O,f)=>{f.showPreview?s.value=!0:s.value=!1});const u=(O,f)=>{r.value=f,O.stopImmediatePropagation(),o.getDragMode=="sort"&&f!=o.getSourceDragUuid&&O.stopImmediatePropagation()};return(O,f)=>(w(),j("fieldset",LY,[a.value.label!=""?(w(),j("legend",WY,H(a.value.label),1)):pe("",!0),a.value.items.length==0?(w(),j("div",{key:1,class:"h-8 group items-center content-justify w-full mb-2",onDrop:f[0]||(f[0]=d=>l(d,a.value.uuid,a.value)),onDragleave:f[1]||(f[1]=d=>c(d)),onDragenter:f[2]||(f[2]=d=>u(d,a.value.uuid))},[U("div",NY,[U("hr",{class:St(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":r.value==a.value.uuid}])},null,2),U("span",jY,[R(m(_m),{class:St([{"text-orange-500":r.value==a.value.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],32)):pe("",!0),a.value.items.length>0?(w(),D(m(rg),{key:2,items:a.value.items},null,8,["items"])):pe("",!0)]))}}),GY={class:"overflow-auto h-full"},FY={class:"flex flex-col gap-2"},HY={key:0,class:"w-full"},KY=["onDragleave","onDragenter","onDrop"],JY={class:"inline-flex items-center justify-center w-full pointer-events-none"},eM={class:"absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-900 pointer-events-none"},tM=["onDragstart"],nM={class:"grow content-center items-center"},iM={class:"buttons absolute rounded-sm invisible right-0 bg-slate-100/70 flex flex-row gap-2"},rM=["onClick","title"],sM=["onClick","title"],oM=["onClick","title"],aM=["onClick"],lM=M({__name:"RenderElements",props:{items:{}},setup(t){const e=Vr(),n=zt(),i=ne(""),r=(f,d)=>{var h;f.dataTransfer.dropEffect="move",f.dataTransfer.effectAllowed="move",(h=f.dataTransfer)==null||h.setData("mode","sort"),n.setDragMode("sort"),n.setSourceDragUuid(d),f.stopImmediatePropagation()},s=(f,d)=>{i.value="",f.stopImmediatePropagation()},o=(f,d)=>{i.value=d,n.getDragMode=="sort"&&d!=n.getSourceDragUuid&&f.stopImmediatePropagation()},a=(f,d)=>{var h,p;if(((h=f.dataTransfer)==null?void 0:h.getData("mode"))=="sort"){if(i.value="",n.getSourceDragUuid==d){n.setDragMode(""),f.stopImmediatePropagation();return}e.moveItemBefore(n.getSourceDragUuid,d),n.setDragMode(""),f.stopImmediatePropagation()}if(n.dragMode=="insert"){const $=Number((p=f.dataTransfer)==null?void 0:p.getData("itemId"));e.addElementAfter(io.getModelForType($),d),f.stopImmediatePropagation()}},l=f=>{e.deleteItem(f)},c=f=>{n.setActiveItem(f),n.setShowProperties(!0)},u=f=>{n.setActiveItem(f),n.setShowOptions(!0)},O=f=>{n.setActiveItem(f),n.setShowDependency(!0)};return(f,d)=>(w(),j("div",GY,[U("div",FY,[f.items.length>0?(w(!0),j(ke,{key:0},xt(f.items,h=>(w(),j("div",{class:"d-flex flex flex-col relative items-center",key:h.uuid},[h.type!==1||h.type===1?(w(),j("div",HY,[U("div",{class:"h-8 group w-full",onDragleave:on(p=>s(p,h.uuid),["self"]),onDragenter:on(p=>o(p,h.uuid),["self"]),onDrop:p=>a(p,h.uuid)},[U("div",JY,[U("hr",{class:St(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":i.value==h.uuid}])},null,2),U("span",eM,[R(m(_m),{class:St([{"text-orange-500":i.value==h.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,KY),U("div",{class:St([{"border-white":!h.hasDependencys(),"border-blue-500":h.hasDependencys()},"element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5",{" bg-slate-50":h.isFocused===!0}]),onDragstart:p=>r(p,h.uuid),draggable:"true"},[U("div",nM,[h.type===2?(w(),D(iY,{key:0,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===1?(w(),D(oY,{key:1,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===3?(w(),D(kY,{key:2,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===4?(w(),D($Y,{key:3,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===5?(w(),D(_Y,{key:4,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===6?(w(),D(pY,{key:5,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===12?(w(),D(BY,{key:6,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===7?(w(),D(DY,{key:7,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0),h.type===9?(w(),D(vY,{key:8,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):pe("",!0)]),U("div",iM,[U("div",{onClick:p=>O(h),title:f.$t("dependencies"),class:"m-2 cursor-pointer"},[R(m(RX))],8,rM),h.type===3?(w(),j("div",{key:0,onClick:p=>u(h),title:f.$t("options"),class:"m-2 cursor-pointer"},[R(m(kX))],8,sM)):pe("",!0),U("div",{onClick:p=>c(h),title:f.$t("settings"),class:"m-2 cursor-pointer"},[R(m(XX))],8,oM),U("div",{onClick:p=>l(h),class:"text-red-500 m-2 cursor-pointer"},[R(m(MX))],8,aM)])],42,tM)])):pe("",!0)]))),128)):pe("",!0)])]))}}),cM=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},rg=cM(lM,[["__scopeId","data-v-766fa5f5"]]),uM=M({__name:"Main",setup(t){const e=zt(),n=Vr();function i(r){var s;if(e.dragMode=="insert"){const o=Number((s=r.dataTransfer)==null?void 0:s.getData("itemId"));n.addElement(io.getModelForType(o))}}return(r,s)=>(w(),j("div",{class:"border m-1 p-4 rounded-xl w-full h-full shadow bg-white",onDrop:s[0]||(s[0]=o=>i(o)),onDragover:s[1]||(s[1]=on(()=>{},["prevent"]))},[R(m(rg),{items:m(n).getItems},null,8,["items"])],32))}}),OM={class:"mb-2"},fM={key:0,class:"mr-2"},dM={class:"font-medium"},hM={class:"ml-2 text-xs bg-white px-2 py-1 rounded opacity-75"},pM={key:1,class:"ml-2 text-xs bg-green-200 px-2 py-1 rounded font-mono"},mM={key:0,class:"mt-2 ml-6 space-y-1"},gM={class:"p-2 bg-gray-50 rounded text-sm font-mono"},$M={class:"font-semibold text-gray-700"},QM={key:0,class:"p-2 bg-blue-50 rounded text-sm font-mono"},yM={class:"text-blue-800"},bM={key:0,class:"mt-2"},vM=M({__name:"NodeRenderer",props:{node:{},level:{},parentId:{},index:{}},setup(t){const e=t,n=bn("expandedNodes"),i=bn("toggleNode"),r=bn("getNodeType"),s=bn("getNodeColor"),o=bn("getColoredFormulaParts"),a=G(()=>`${e.parentId}-${e.index}`),l=G(()=>e.node.parts&&e.node.parts.length>0),c=G(()=>n==null?void 0:n.value.has(a.value)),u=G(()=>r?r(e.node.name):""),O=G(()=>s&&u.value?s(u.value):""),f=G(()=>e.node.unParsed),d=()=>{l.value&&i&&i(a.value)};return(h,p)=>{const $=Om("NodeRenderer",!0);return w(),j("div",OM,[U("div",{class:St(["p-3 rounded-lg border-2 transition-all hover:shadow-md",O.value]),style:Hn({marginLeft:h.level*20+"px"})},[U("div",{class:"flex items-center cursor-pointer",onClick:d},[l.value?(w(),j("span",fM,[c.value?(w(),D(m(Pm),{key:0,size:16})):(w(),D(m(M0),{key:1,size:16}))])):pe("",!0),U("span",dM,H(h.node.name),1),U("span",hM,H(u.value),1),h.node.result!==void 0?(w(),j("span",pM," = "+H(h.node.result),1)):pe("",!0)]),f.value?(w(),j("div",mM,[U("div",gM,[U("span",$M,H(h.node.name)+" = ",1),m(o)?(w(!0),j(ke,{key:0},xt(m(o)(f.value),(g,b)=>(w(),j("span",{key:b,class:St(g.colorClass)},H(g.text),3))),128)):pe("",!0)]),h.node.parsed&&h.node.parsed!==h.node.unParsed?(w(),j("div",QM,[p[0]||(p[0]=U("span",{class:"font-semibold text-blue-700"},"Aufgelöst: ",-1)),U("span",yM,H(h.node.parsed),1)])):pe("",!0)])):pe("",!0)],6),l.value&&c.value?(w(),j("div",bM,[(w(!0),j(ke,null,xt(h.node.parts,(g,b)=>(w(),D($,{key:b,node:g,level:h.level+1,"parent-id":a.value,index:b},null,8,["node","level","parent-id","index"]))),128))])):pe("",!0)])}}}),SM={class:"w-full p-6 min-h-screen"},PM={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},_M={key:1,class:"text-center py-10"},xM={key:2,class:"grid grid-cols-1 gap-6"},wM={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white"},TM={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white border-l-4 border-green-500"},kM={class:"flex items-center justify-between bg-green-50 p-4 rounded-lg"},RM={class:"flex items-center space-x-3"},CM={class:"text-lg font-medium text-gray-800"},XM={class:"text-2xl font-bold text-green-600"},VM={class:"text-sm text-gray-500"},EM=M({__name:"FormulaVisualizer",setup(t){const e=ne(new Set),n=zt(),i=G(()=>n.getFormulaData),r=G(()=>n.getFormulaError),s=G(()=>n.isFormulaLoading),o=O=>{const f=new Set(e.value);f.has(O)?f.delete(O):f.add(O),e.value=f},a=O=>O.startsWith("$F")&&O.endsWith("$F")?"formula":O.startsWith("$P")&&O.endsWith("$P")?"parameter":O.startsWith("$V")&&O.endsWith("$V")?"variable":O.startsWith("$CV")&&O.endsWith("$CV")?"calc-variable":/^[0-9.]+$/.test(O)?"value":O.startsWith("calc")?"main":"function",l=O=>{switch(O){case"formula":return"bg-purple-100 border-purple-300 text-purple-800";case"parameter":return"bg-blue-100 border-blue-300 text-blue-800";case"variable":return"bg-orange-100 border-orange-300 text-orange-800";case"calc-variable":return"bg-teal-100 border-teal-300 text-teal-800";case"value":return"bg-lime-100 border-lime-400 text-lime-800";case"main":return"bg-red-100 border-red-300 text-red-800";case"function":return"bg-yellow-100 border-yellow-300 text-yellow-800";default:return"bg-gray-100 border-gray-300 text-gray-800"}},c=O=>{const f=[];let d=0;const h=/(\$F[^$]*\$F|\$P[^$]*\$P|\$CV[^$]*\$CV|\$V[^$]*\$V)/g;let p;for(;(p=h.exec(O))!==null;){p.index>d&&f.push({text:O.substring(d,p.index),colorClass:"text-gray-800"});const $=p[0];let g="";$.startsWith("$F")?g="text-purple-600 font-semibold":$.startsWith("$P")?g="text-blue-600 font-semibold":$.startsWith("$CV")?g="text-teal-600 font-semibold":$.startsWith("$V")&&(g="text-orange-600 font-semibold"),f.push({text:$,colorClass:g}),d=p.index+$.length}return di.value?i.value.reduce((O,f)=>O+(f.result||0),0):0;return fr("expandedNodes",e),fr("toggleNode",o),fr("getNodeType",a),fr("getNodeColor",l),fr("getColoredFormulaParts",c),(O,f)=>(w(),j("div",SM,[r.value?(w(),j("div",PM,[f[0]||(f[0]=U("p",{class:"font-bold"},"Fehler",-1)),U("p",null,H(r.value),1)])):pe("",!0),s.value?(w(),j("div",_M,f[1]||(f[1]=[U("p",null,"Lade Formeldaten...",-1)]))):pe("",!0),!s.value&&i.value?(w(),j("div",xM,[U("div",wM,[f[2]||(f[2]=U("h2",{class:"text-xl font-semibold mb-4 text-gray-700"},"Baum-Struktur",-1)),U("div",null,[(w(!0),j(ke,null,xt(i.value,(d,h)=>(w(),D(vM,{key:h,node:d,level:0,"parent-id":"root",index:h},null,8,["node","index"]))),128))])]),U("div",TM,[f[4]||(f[4]=U("h2",{class:"text-xl font-semibold mb-3 text-gray-700"},"Gesamtsumme",-1)),U("div",kM,[U("div",RM,[U("span",CM,H(i.value.map(d=>d.result||0).join(" + ")),1),f[3]||(f[3]=U("span",{class:"text-gray-500"},"=",-1)),U("span",XM,H(u()),1)]),U("div",VM," ("+H(i.value.length)+" Formel"+H(i.value.length!==1?"n":"")+") ",1)])]),f[5]||(f[5]=Qm('

Legende

Formel ($F...$F)
Parameter ($P...$P)
Variable ($V...$V)
Kalk-Variable ($CV...$CV)
Wert (Zahlen)
Hauptformel
',1))])):pe("",!0)]))}});let jh=[],FP=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j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,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=FP[i])e=i+1;else return!0;if(e==n)return!1}}function iy(t){return t>=127462&&t<=127487}const ry=8205;function qM(t,e,n=!0,i=!0){return(n?HP:ZM)(t,e,i)}function HP(t,e,n){if(e==t.length)return e;e&&KP(t.charCodeAt(e))&&JP(t.charCodeAt(e-1))&&e--;let i=md(t,e);for(e+=sy(i);e=0&&iy(md(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function ZM(t,e,n){for(;e>0;){let i=HP(t,e-2,n);if(i=56320&&t<57344}function JP(t){return t>=55296&&t<56320}function sy(t){return t<65536?1:2}class Fe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Go(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Ai.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Go(this,e,n);let i=[];return this.decompose(e,n,i,0),Ai.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new tl(this),s=new tl(e);for(let o=n,a=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new tl(this,e)}iterRange(e,n=this.length){return new e_(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new t_(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Fe.empty:e.length<=32?new Rt(e):Ai.from(Rt.split(e,[]))}}class Rt extends Fe{constructor(e,n=zM(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((n?i:a)>=e)return new YM(r,a,i,o);r=a+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new Rt(oy(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),a=bu(s.text,o.text.slice(),0,s.length);if(a.length<=32)i.push(new Rt(a,o.length+s.length));else{let l=a.length>>1;i.push(new Rt(a.slice(0,l)),new Rt(a.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof Rt))return super.replace(e,n,i);[e,n]=Go(this,e,n);let r=bu(this.text,bu(i.text,oy(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new Rt(r,s):Ai.from(Rt.split(r,[]),s)}sliceString(e,n=this.length,i=` `){[e,n]=Go(this,e,n);let r="";for(let s=0,o=0;s<=n&&oe&&o&&(r+=i),es&&(r+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Rt(i,r)),i=[],r=-1);return r>-1&&n.push(new Rt(i,r)),n}}class Ai extends Fe{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.children[s],a=r+o.length,l=i+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let s=0,o=0;o<=n&&s=o){let c=r&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?i.push(a):a.decompose(e-o,n-o,i,c)}o=l+1}}replace(e,n,i){if([e,n]=Go(this,e,n),i.lines=s&&n<=a){let l=o.replace(e-s,n-s,i),c=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[r]=l,new Ai(u,this.length-(n-e)+i.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){[e,n]=Go(this,e,n);let r="";for(let s=0,o=0;se&&s&&(r+=i),eo&&(r+=a.sliceString(e-o,n-o,i)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ai))return 0;let i=0,[r,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==a)return i;let l=this.children[r],c=e.children[s];if(l!=c)return i+l.scanIdentical(c,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let h of e)h.flatten(d);return new Rt(d,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,a=[],l=0,c=-1,u=[];function O(d){let h;if(d.lines>s&&d instanceof Ai)for(let p of d.children)O(p);else d.lines>o&&(l>o||!l)?(f(),a.push(d)):d instanceof Rt&&l&&(h=u[u.length-1])instanceof Rt&&d.lines+h.lines<=32?(l+=d.lines,c+=d.length+1,u[u.length-1]=new Rt(h.text.concat(d.text),h.length+1+d.length)):(l+d.lines>r&&f(),l+=d.lines,c+=d.length+1,u.push(d))}function f(){l!=0&&(a.push(u.length==1?u[0]:Ai.from(u,c)),c=-1,l=u.length=0)}for(let d of e)O(d);return f(),a.length==1?a[0]:new Ai(a,n)}}Fe.empty=new Rt([""],0);function ZM(t){let e=-1;for(let n of t)e+=n.length+1;return e}function bu(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof Rt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,a=r instanceof Rt?r.text.length:r.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(r instanceof Rt){let l=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Rt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class JP{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new tl(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class e_{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Fe.prototype[Symbol.iterator]=function(){return this.iter()},tl.prototype[Symbol.iterator]=JP.prototype[Symbol.iterator]=e_.prototype[Symbol.iterator]=function(){return this});class zM{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}function Go(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function rn(t,e,n=!0,i=!0){return AM(t,e,n,i)}function YM(t){return t>=56320&&t<57344}function MM(t){return t>=55296&&t<56320}function Rn(t,e){let n=t.charCodeAt(e);if(!MM(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return YM(i)?(n-55296<<10)+(i-56320)+65536:n}function sg(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function qi(t){return t<65536?1:2}const Bh=/\r\n?|\n/;var nn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(nn||(nn={}));class Wi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return s+(e-r);s+=a}else{if(i!=nn.Simple&&c>=e&&(i==nn.TrackDel&&re||i==nn.TrackBefore&&re))return null;if(c>e||c==e&&n<0&&!a)return e==r||n<0?s:s+l;s+=l}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&a>=e)return rn?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Wi(e)}static create(e){return new Wi(e)}}class It extends Wi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Gh(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return Fh(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=a,n[r+1]=o;let l=r>>1;for(;i.length0&&Jr(i,n,s.text),s.forward(u),a+=u}let c=e[o++];for(;a>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!r.length)return;of||O<0||f>n)throw new RangeError(`Invalid change range ${O} to ${f} (in doc of length ${n})`);let h=d?typeof d=="string"?Fe.of(d.split(i||Bh)):d:Fe.empty,p=h.length;if(O==f&&p==0)return;Oo&&cn(r,O-o,-1),cn(r,f-O,p),Jr(s,r,h),o=f}}return c(e),l(!a),a}static empty(e){return new It(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ra&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Jr(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(r,c,s,u,O),r=c,s=u}}}function Fh(t,e,n,i=!1){let r=[],s=i?[]:null,o=new wl(t),a=new wl(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);cn(r,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len=0&&l=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let O=Math.min(u,a.len);c+=O,u-=O,a.forward(O)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||i.length>c),s.forward2(l),o.forward(l)}}}}class wl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Fe.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Fe.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Es{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Es(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return K.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return K.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return K.range(e.anchor,e.head)}static create(e,n,i){return new Es(e,n,i)}}class K{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:K.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new K(e.ranges.map(n=>Es.fromJSON(n)),e.main)}static single(e,n=e){return new K([K.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;rs.head?K.range(l,a):K.range(a,l))}}return new K(e,n)}}function n_(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let og=0;class me{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=og++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new me(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:ag),!!e.static,e.enables)}of(e){return new vu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vu(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function ag(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class vu{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=og++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let O of this.dependencies)O=="doc"?l=!0:O=="selection"?c=!0:(((n=e[O.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[O.id]);return{create(O){return O.values[o]=i(O),1},update(O,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||Hh(O,u)){let d=i(O);if(a?!ay(d,O.values[o],r):!r(d,O.values[o]))return O.values[o]=d,1}return 0},reconfigure:(O,f)=>{let d,h=f.config.address[s];if(h!=null){let p=lO(f,h);if(this.dependencies.every($=>$ instanceof me?f.facet($)===O.facet($):$ instanceof Ft?f.field($,!1)==O.field($,!1):!0)||(a?ay(d=i(O),p,r):r(d=i(O),p)))return O.values[o]=p,0}else d=i(O);return O.values[o]=d,1}}}}function ay(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;ui===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Lc).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[n]=o,1)},reconfigure:(i,r)=>{let s=i.facet(Lc),o=r.facet(Lc),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(i.values[n]=a.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,Lc.of({field:this,create:e})]}get extension(){return this}}const Rs={lowest:4,low:3,default:2,high:1,highest:0};function ka(t){return e=>new i_(e,t)}const Ss={highest:ka(Rs.highest),high:ka(Rs.high),default:ka(Rs.default),low:ka(Rs.low),lowest:ka(Rs.lowest)};class i_{constructor(e,n){this.inner=e,this.prec=n}}class ac{of(e){return new Kh(this,e)}reconfigure(e){return ac.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Kh{constructor(e,n){this.compartment=e,this.inner=n}}class aO{constructor(e,n,i,r,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],s=Object.create(null),o=new Map;for(let f of UM(e,n,o))f instanceof Ft?r.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],c=[];for(let f of r)a[f.id]=c.length<<1,c.push(d=>f.slot(d));let u=i==null?void 0:i.config.facets;for(let f in s){let d=s[f],h=d[0].facet,p=u&&u[f]||[];if(d.every($=>$.type==0))if(a[h.id]=l.length<<1|1,ag(p,d))l.push(i.facet(h));else{let $=h.combine(d.map(g=>g.value));l.push(i&&h.compare($,i.facet(h))?i.facet(h):$)}else{for(let $ of d)$.type==0?(a[$.id]=l.length<<1|1,l.push($.value)):(a[$.id]=c.length<<1,c.push(g=>$.dynamicSlot(g)));a[h.id]=c.length<<1,c.push($=>IM($,h,d))}}let O=c.map(f=>f(a));return new aO(e,o,O,a,l,s)}}function UM(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(o,a){let l=r.get(o);if(l!=null){if(l<=a)return;let c=i[l].indexOf(o);c>-1&&i[l].splice(c,1),o instanceof Kh&&n.delete(o.compartment)}if(r.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Kh){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,a)}else if(o instanceof i_)s(o.inner,o.prec);else if(o instanceof Ft)i[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof vu)i[a].push(o),o.facet.extensions&&s(o.facet.extensions,Rs.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(t,Rs.default),i.reduce((o,a)=>o.concat(a))}function nl(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function lO(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const r_=me.define(),Jh=me.define({combine:t=>t.some(e=>e),static:!0}),s_=me.define({combine:t=>t.length?t[0]:void 0,static:!0}),o_=me.define(),a_=me.define(),l_=me.define(),c_=me.define({combine:t=>t.length?t[0]:!1});class Er{constructor(e,n){this.type=e,this.value=n}static define(){return new DM}}class DM{of(e){return new Er(this,e)}}class LM{constructor(e){this.map=e}of(e){return new Ve(this,e)}}class Ve{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ve(this.type,n)}is(e){return this.type==e}static define(e={}){return new LM(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}Ve.reconfigure=Ve.define();Ve.appendConfig=Ve.define();class At{constructor(e,n,i,r,s,o){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&n_(i,n.newLength),s.some(a=>a.type==At.time)||(this.annotations=s.concat(At.time.of(Date.now())))}static create(e,n,i,r,s,o){return new At(e,n,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(At.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}At.time=Er.define();At.userEvent=Er.define();At.addToHistory=Er.define();At.remote=Er.define();function WM(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i=t[i]))s=t[i++],o=t[i++];else if(r=0;r--){let s=i[r](t);s instanceof At?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof At?t=s[0]:t=O_(e,Eo(s),!1)}return t}function jM(t){let e=t.startState,n=e.facet(l_),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=u_(i,ep(e,s,t.changes.newLength),!0))}return i==t?t:At.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const BM=[];function Eo(t){return t==null?BM:Array.isArray(t)?t:[t]}var vt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(vt||(vt={}));const GM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let tp;try{tp=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function FM(t){if(tp)return tp.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||GM.test(n)))return!0}return!1}function HM(t){return e=>{if(!/\S/.test(e))return vt.Space;if(FM(e))return vt.Word;for(let n=0;n-1)return vt.Word;return vt.Other}}class De{constructor(e,n,i,r,s,o){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;ar.set(c,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(Ve.reconfigure)?(n=null,i=a.value):a.is(Ve.appendConfig)&&(n=null,i=Eo(i).concat(a.value));let s;n?s=e.startState.values.slice():(n=aO.resolve(i,r,this),s=new De(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Jh)?e.newSelection:e.newSelection.asSingle();new De(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:K.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Eo(i.effects);for(let a=1;ao.spec.fromJSON(a,l)))}}return De.create({doc:e.doc,selection:K.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=aO.resolve(e.extensions||[],new Map),i=e.doc instanceof Fe?e.doc:Fe.of((e.doc||"").split(n.staticFacet(De.lineSeparator)||Bh)),r=e.selection?e.selection instanceof K?e.selection:K.single(e.selection.anchor,e.selection.head):K.single(0);return n_(r,i.length),n.staticFacet(Jh)||(r=r.asSingle()),new De(n,i,r,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(De.tabSize)}get lineBreak(){return this.facet(De.lineSeparator)||` -`}get readOnly(){return this.facet(c_)}phrase(e,...n){for(let i of this.facet(De.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(r_))for(let o of s(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return HM(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=rn(n,o,!1);if(s(n.slice(l,o))!=vt.Word)break;o=l}for(;at.length?t[0]:4});De.lineSeparator=s_;De.readOnly=c_;De.phrases=me.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});De.languageData=r_;De.changeFilter=o_;De.transactionFilter=a_;De.transactionExtender=l_;ac.reconfigure=Ve.define();function er(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],a=i[s];if(a===void 0)i[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Ws{eq(e){return this==e}range(e,n=e){return np.create(e,n,this)}}Ws.prototype.startSide=Ws.prototype.endSide=0;Ws.prototype.point=!1;Ws.prototype.mapMode=nn.TrackDel;let np=class f_{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new f_(e,n,i)}};function ip(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class lg{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let o=r,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,s);sd||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(o<0&&(o=f),c.point&&(a=Math.max(a,d-f)),i.push(c),r.push(f-o),s.push(d-o))}return{mapped:i.length?new lg(r,s,i,a):null,pos:o}}}class Je{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new Je(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(ip)),this.isEmpty)return n.length?Je.of(n):this;let a=new d_(this,null,-1).goto(0),l=0,c=[],u=new kr;for(;a.value||l=0){let O=n[l++];u.addInner(O.from,O.to,O.value)||c.push(O)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||sa.to||s=s&&e<=s+o.length&&o.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Tl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Tl.from(e).goto(n)}static compare(e,n,i,r,s=-1){let o=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),a=n.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),l=ly(o,a,i),c=new Ra(o,l,s),u=new Ra(a,l,s);i.iterGaps((O,f,d)=>cy(c,O,u,f,d,r)),i.empty&&i.length==0&&cy(c,0,u,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=ly(s,o),l=new Ra(s,a,0).goto(i),c=new Ra(o,a,0).goto(i);for(;;){if(l.to!=c.to||!rp(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}static spans(e,n,i,r,s=-1){let o=new Ra(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let u=o.activeForPoint(o.to),O=o.pointFroma&&(r.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,n=!1){let i=new kr;for(let r of e instanceof np?[e]:n?KM(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return Je.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=Je.empty;r=r.nextLayer)n=new Je(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}Je.empty=new Je([],[],null,-1);function KM(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(ip);e=i}return t}Je.empty.nextLayer=Je.empty;class kr{finishChunk(e){this.chunks.push(new lg(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new kr)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Je.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Je.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function ly(t,e,n){let i=new Map;for(let s of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new d_(o,n,i,s));return r.length==1?r[0]:new Tl(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)gd(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)gd(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),gd(this.heap,0)}}}function gd(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Ra{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Tl.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Wc(this.active,e),Wc(this.activeTo,e),Wc(this.activeRank,e),this.minActive=uy(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;Nc(this.active,n,i),Nc(this.activeTo,n,r),Nc(this.activeRank,n,s),e&&Nc(e,n,this.cursor.from),this.minActive=uy(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Wc(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function cy(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,a=i,l=i-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,O=u<0?t.to+l:n.to,f=Math.min(O,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&rp(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,f,t.point,n.point):f>a&&!rp(t.active,n.active)&&s.compareRange(a,f,t.active,n.active),O>o)break;(c||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(O),a=O,u<=0&&t.next(),u>=0&&n.next()}}function rp(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function uy(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=rn(t,r)}return i===!0?-1:t.length}const op="ͼ",Oy=typeof Symbol>"u"?"__"+op:Symbol.for(op),ap=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),fy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class us{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],O=/^@(\w+)\b/.exec(o[0]),f=O&&O[1]=="keyframes";if(O&&a==null)return l.push(o[0]+";");for(let d in a){let h=a[d];if(/&/.test(d))s(d.split(/,\s*/).map(p=>o.map($=>p.replace(/&/,$))).reduce((p,$)=>p.concat($)),h,l);else if(h&&typeof h=="object"){if(!O)throw new RangeError("The value of a property ("+d+") should be a primitive value.");s(r(d),h,u,f)}else h!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+h+";")}(u.length||f)&&l.push((i&&!O&&!c?o.map(i):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=fy[Oy]||1;return fy[Oy]=e+1,op+e.toString(36)}static mount(e,n,i){let r=e[ap],s=i&&i.nonce;r?s&&r.setNonce(s):r=new JM(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let dy=new Map;class JM{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=dy.get(i);if(s)return e[ap]=s;this.sheet=new r.CSSStyleSheet,dy.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[ap]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let o=0;o-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),i)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eI=typeof navigator<"u"&&/Mac/.test(navigator.platform),tI=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var tn=0;tn<10;tn++)Os[48+tn]=Os[96+tn]=String(tn);for(var tn=1;tn<=24;tn++)Os[tn+111]="F"+tn;for(var tn=65;tn<=90;tn++)Os[tn]=String.fromCharCode(tn+32),kl[tn]=String.fromCharCode(tn);for(var $d in Os)kl.hasOwnProperty($d)||(kl[$d]=Os[$d]);function nI(t){var e=eI&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||tI&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?kl:Os)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function lt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function rI(t,e,n,i,r,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,O=!1;u&&!O;)if(u.nodeType==1){let f,d=u==l.body,h=1,p=1;if(d)f=iI(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(O=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:h,scaleY:p}=p_(u,b)),f={left:b.left,right:b.left+u.clientWidth*h,top:b.top,bottom:b.top+u.clientHeight*p}}let $=0,g=0;if(r=="nearest")e.top0&&e.bottom>f.bottom+g&&(g=e.bottom-f.bottom+o)):e.bottom>f.bottom&&(g=e.bottom-f.bottom+o,n<0&&e.top-g0&&e.right>f.right+$&&($=e.right-f.right+s)):e.right>f.right&&($=e.right-f.right+s,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function sI(t){let e=t.ownerDocument,n,i;for(let r=t.parentNode;r&&!(r==e.body||n&&i);)if(r.nodeType==1)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:i}}class oI{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Gi(n):0),i,Math.min(e.focusOffset,i?Gi(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Oo=null;function m_(t){if(t.setActive)return t.setActive();if(Oo)return t.focus(Oo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Oo==null?{get preventScroll(){return Oo={preventScroll:!0},!0}}:void 0),!Oo){Oo=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function Q_(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Gi(n)}else if(n.parentNode&&!cO(n))i=Ns(n),n=n.parentNode;else return null}}function y_(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return O.domBoundsAround(e,n,c);if(f>=e&&r==-1&&(r=l,s=c),c>n&&O.dom.parentNode==this.dom){o=l,a=u;break}u=f,c=f+O.breakAfter}return{from:s,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=cg){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function v_(t,e,n,i,r,s,o,a,l){let{children:c}=t,u=c.length?c[e]:null,O=s.length?s[s.length-1]:null,f=O?O.breakAfter:o;if(!(e==i&&u&&!o&&!f&&s.length<2&&u.merge(n,r,s.length?O:null,n==0,a,l))){if(i0&&(!o&&s.length&&u.merge(n,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(n2);var $e={mac:$y||/Mac/.test(Cn.platform),windows:/Win/.test(Cn.platform),linux:/Linux|X11/.test(Cn.platform),ie:Tf,ie_version:P_?cp.documentMode||6:Op?+Op[1]:up?+up[1]:0,gecko:gy,gecko_version:gy?+(/Firefox\/(\d+)/.exec(Cn.userAgent)||[0,0])[1]:0,chrome:!!Qd,chrome_version:Qd?+Qd[1]:0,ios:$y,android:/Android\b/.test(Cn.userAgent),safari:__,webkit_version:cI?+(/\bAppleWebKit\/(\d+)/.exec(Cn.userAgent)||[0,0])[1]:0,tabSize:cp.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const uI=256;class Si extends ut{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof Si)||this.length-(n-e)+i.length>uI||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Si(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new On(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return OI(this.dom,e,n)}}class Rr extends ut{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(g_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,s,o){return i&&(!(i instanceof Rr&&i.mark.eq(this.mark))||e&&s<=0||ne&&n.push(i=e&&(r=s),i=l,s++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Rr(this.mark,n,o)}domAtPos(e){return x_(this,e)}coordsAt(e,n){return T_(this,e,n)}}function OI(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,s=e,o=0;e==0&&n<0||e==i&&n>=0?$e.chrome||$e.gecko||(e?(r--,o=1):s=0)?0:a.length-1];return $e.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?lc(l,o<0):l||null}class es extends ut{static create(e,n,i){return new es(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=es.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,s,o){return i&&(!(i instanceof es)||!this.widget.compare(i.widget)||e>0&&s<=0||n0)?On.before(this.dom):On.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?r.length-1:0;s=r[a],!(e>0?a==0:a==r.length-1||s.top0?On.before(this.dom):On.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Fe.empty}get isHidden(){return!0}}Si.prototype.children=es.prototype.children=Ho.prototype.children=cg;function x_(t,e){let n=t.dom,{children:i}=t,r=0;for(let s=0;rs&&e0;s--){let o=i[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=r;s0&&e instanceof Rr&&r.length&&(i=r[r.length-1])instanceof Rr&&i.mark.eq(e.mark)?w_(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function T_(t,e,n){let i=null,r=-1,s=null,o=-1;function a(c,u){for(let O=0,f=0;O=u&&(d.children.length?a(d,u-f):(!s||s.isHidden&&(n>0||dI(s,d)))&&(h>u||f==h&&d.getSide()>0)?(s=d,o=u-f):(f-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function dp(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function hI(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new fs(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=k_(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new fs(e,i,r,n,e.widget||null,!0)}static line(e){return new uc(e)}static set(e,n=!1){return Je.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Je.empty;class cc extends xe{constructor(e){let{start:n,end:i}=k_(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof cc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&uO(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}cc.prototype.point=!1;class uc extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof uc&&this.spec.class==e.spec.class&&uO(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}uc.prototype.mapMode=nn.TrackBefore;uc.prototype.point=!0;class fs extends xe{constructor(e,n,i,r,s,o){super(n,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?nn.TrackBefore:nn.TrackAfter:nn.TrackDel}get type(){return this.startSide!=this.endSide?Pn.WidgetRange:this.startSide<=0?Pn.WidgetBefore:Pn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof fs&&pI(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}fs.prototype.point=!0;function k_(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function pI(t,e){return t==e||!!(t&&e&&t.compare(e))}function Pu(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class Vt extends ut{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,r,s,o){if(i){if(!(i instanceof Vt))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),S_(this,e,n,i?i.children.slice():[],s,o),!0}split(e){let n=new Vt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:r}=this.childPos(e);r&&(n.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){uO(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){w_(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=fp(n,this.attrs||{})),i&&(this.attrs=fp({class:i},this.attrs||{}))}domAtPos(e){return x_(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(g_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(dp(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&ut.get(r)instanceof Rr;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=ut.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!$e.ios||!this.children.some(s=>s instanceof Si))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Si)||/[^ -~]/.test(i.text))return null;let r=Fo(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=T_(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=n){if(s instanceof Vt)return s;if(o>n)break}r=o+s.breakAfter}return null}}class Qr extends ut{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,s,o){return i&&(!(i instanceof Qr)||!this.widget.compare(i.widget)||e>0&&s<=0||n0}}class hp extends tr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class rl{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Qr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Vt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(jc(new Ho(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Qr)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(jc(new Si(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof fs){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(i instanceof fs)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Qr(i.widget||Ko.block,a,i));else{let l=es.create(i.widget||Ko.inline,a,a?0:i.startSide),c=this.atCursorPos&&!l.isEditable&&s<=r.length&&(e0),u=!l.isEditable&&(er.length||i.startSide<=0),O=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),c&&(O.append(jc(new Ho(1),r),s),s=r.length+Math.max(0,s-r.length)),O.append(jc(l,r),s),this.atCursorPos=u,this.pendingBuffer=u?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,i,r,s){let o=new rl(e,n,i,s);return o.openEnd=Je.spans(r,n,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function jc(t,e){for(let n of e)t=new Rr(n,[t],t.length);return t}class Ko extends tr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ko.inline=new Ko("span");Ko.block=new Ko("div");var $t=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}($t||($t={}));const Bs=$t.LTR,ug=$t.RTL;function R_(t){let e=[];for(let n=0;n=n){if(a.level==i)return o;(s<0||(r!=0?r<0?a.fromn:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function X_(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;p-=3)if(Ti[p+1]==-d){let $=Ti[p+2],g=$&2?r:$&4?$&1?s:r:0;g&&(ct[O]=ct[Ti[p]]=g),a=p;break}}else{if(Ti.length==189)break;Ti[a++]=O,Ti[a++]=f,Ti[a++]=l}else if((h=ct[O])==2||h==1){let p=h==r;l=p?0:1;for(let $=a-3;$>=0;$-=3){let g=Ti[$+2];if(g&2)break;if(p)Ti[$+2]|=2;else{if(g&4)break;Ti[$+2]|=4}}}}}function bI(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let o=r?n[r-1].to:t,a=rl;)h==$&&(h=n[--p].from,$=p?n[p-1].to:t),ct[--h]=d;l=u}else s=c,l++}}}function mp(t,e,n,i,r,s,o){let a=i%2?2:1;if(i%2==r%2)for(let l=e,c=0;ll&&o.push(new ts(l,p.from,d));let $=p.direction==Bs!=!(d%2);gp(t,$?i+1:i,r,p.inner,p.from,p.to,o),l=p.to}h=p.to}else{if(h==n||(u?ct[h]!=a:ct[h]==a))break;h++}f?mp(t,l,h,i+1,r,f,o):le;){let u=!0,O=!1;if(!c||l>s[c-1].to){let p=ct[l-1];p!=a&&(u=!1,O=p==16)}let f=!u&&a==1?[]:null,d=u?i:i+1,h=l;e:for(;;)if(c&&h==s[c-1].to){if(O)break e;let p=s[--c];if(!u)for(let $=p.from,g=c;;){if($==e)break e;if(g&&s[g-1].to==$)$=s[--g].from;else{if(ct[$-1]==a)break e;break}}if(f)f.push(p);else{p.toct.length;)ct[ct.length]=256;let i=[],r=e==Bs?0:1;return gp(t,r,r,n,0,t.length,i),i}function V_(t){return[new ts(0,t,0)]}let E_="";function SI(t,e,n,i,r){var s;let o=i.head-t.from,a=ts.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),l=e[a],c=l.side(r,n);if(o==c){let f=a+=r?1:-1;if(f<0||f>=e.length)return null;l=e[a=f],o=l.side(!r,n),c=l.side(r,n)}let u=rn(t.text,o,l.forward(r,n));(ul.to)&&(u=c),E_=t.text.slice(Math.min(o,u),Math.max(o,u));let O=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return O&&u==c&&O.level+(r?0:1)t.some(e=>e)}),U_=me.define({combine:t=>t.some(e=>e)}),D_=me.define();class qo{constructor(e,n="nearest",i="nearest",r=5,s=5,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new qo(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new qo(K.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Bc=Ve.define({map:(t,e)=>t.map(e)}),L_=Ve.define();function En(t,e,n){let i=t.facet(z_);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const hr=me.define({combine:t=>t.length?t[0]:!0});let _I=0;const vo=me.define({combine(t){return t.filter((e,n)=>{for(let i=0;i{let l=[];return o&&l.push(Cl.of(c=>{let u=c.plugin(a);return u?o(u):xe.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return Ct.define((i,r)=>new e(i,r),n)}}class yd{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(En(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){En(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){En(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const W_=me.define(),dg=me.define(),Cl=me.define(),N_=me.define(),hg=me.define(),j_=me.define();function yy(t,e){let n=t.state.facet(j_);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return Je.spans(i,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,O=r;for(let f=a.length-1;f>=0;f--,l--){let d=a[f].spec.bidiIsolate,h;if(d==null&&(d=PI(e.text,c,u)),l>0&&O.length&&(h=O[O.length-1]).to==c&&h.direction==d)h.to=u,O=h.inner;else{let p={from:c,to:u,direction:d,inner:[]};O.push(p),O=p.inner}}}}),r}const B_=me.define();function pg(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(B_)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Ua=me.define();class li{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new li(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAu)break;s+=2}if(!l)return i;new li(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,a=l.toB}}}class OO{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=It.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,o,a,l)=>r.push(new li(s,o,a,l))),this.changedRanges=r}static create(e,n,i){return new OO(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class by extends ut{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=xe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Vt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new li(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!XI(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?wI(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new li(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,($e.ie||$e.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=RI(o,a,e.changes);return i=li.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=$e.chrome||$e.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||r.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[o]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:O}=a,f,d,h,p;if(i&&i.range.fromBu){let y=rl.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),v=rl.build(this.view.state.doc,i.range.toB,O,this.decorations,this.dynamicDecorationMap);d=y.breakAtStart,h=y.openStart,p=v.openEnd;let S=this.compositionView(i);v.breakAtStart?S.breakAfter=1:v.content.length&&S.merge(S.length,S.length,v.content[0],!1,v.openStart,0)&&(S.breakAfter=v.content[0].breakAfter,v.content.shift()),y.content.length&&S.merge(0,0,y.content[y.content.length-1],!0,0,y.openEnd)&&y.content.pop(),f=y.content.concat(S).concat(v.content)}else({content:f,breakAtStart:d,openStart:h,openEnd:p}=rl.build(this.view.state.doc,u,O,this.decorations,this.dynamicDecorationMap));let{i:$,off:g}=s.findPos(c,1),{i:b,off:Q}=s.findPos(l,-1);v_(this,b,Q,$,g,f,d,h,p)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(L_)&&(this.editContextFormatting=i.value)}compositionView(e){let n=new Si(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Rr(r,[n],n.length);let i=new Vt;return i.append(n,0),i}fixCompositionDOM(e){let n=(s,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=ut.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],n(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&!(this.view.state.facet(hr)||this.dom.tabIndex>-1)&&Su(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if($e.gecko&&a.empty&&!this.hasComposition&&xI(l)){let O=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(O,l.node.childNodes[l.offset]||null)),l=c=new On(O,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!il(l.node,l.offset,u.anchorNode,u.anchorOffset)||!il(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{$e.android&&$e.chrome&&this.dom.contains(u.focusNode)&&CI(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let O=Rl(this.view.root);if(O)if(a.empty){if($e.gecko){let f=TI(l.node,l.offset);if(f&&f!=3){let d=(f==1?Q_:y_)(l.node,l.offset);d&&(l=new On(d.node,d.offset))}}O.collapse(l.node,l.offset),a.bidiLevel!=null&&O.caretBidiLevel!==void 0&&(O.caretBidiLevel=a.bidiLevel)}else if(O.extend){O.collapse(l.node,l.offset);try{O.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),O.removeAllRanges(),O.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new On(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new On(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&il(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Rl(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=Vt.find(this,n.head);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);i.collapse(u.node,u.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=n.from&&i.collapse(r,s)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let s=ut.get(n.childNodes[r]);s instanceof Vt&&(i=s.domAtPos(s.length))}return i?new On(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=ut.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;o--){let a=this.children[o],l=s-a.breakAfter,c=l-a.length;if(le||a.covers(1))&&(!i||a instanceof Vt&&!(i instanceof Vt&&n>=0)))i=a,r=c;else if(i&&c==e&&l==e&&a instanceof Qr&&Math.abs(n)<2){if(a.deco.startSide<0)break;o&&(i=null)}s=c}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Vt))return null;for(;r.children.length;){let{i:a,off:l}=r.childPos(i,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}i=l}if(!(r instanceof Si))return null;let s=rn(r.text,i);if(s==i)return null;let o=js(r.dom,i,s).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==$t.LTR;for(let c=0,u=0;ur)break;if(c>=i){let d=O.dom.getBoundingClientRect();if(n.push(d.height),o){let h=O.dom.lastChild,p=h?Fo(h):[];if(p.length){let $=p[p.length-1],g=l?$.right-d.left:d.right-$.left;g>a&&(a=g,this.minWidth=s,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+O.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?$t.RTL:$t.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Vt){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Fo(e.firstChild)[0];n=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new b_(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],o=s?s.from-1:this.length;if(o>i){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(xe.replace({widget:new hp(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return xe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Cl).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(N_).map((s,o)=>{let a=typeof s=="function";return a&&(i=!0),a?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(Je.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=pg(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;rI(this.view.scrollDOM,o,n.head{ie.from&&(n=!0)}),n}function VI(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return K.cursor(e);s==0?n=1:s==r.length&&(n=-1);let o=s,a=s;n<0?o=rn(r.text,s,!1):a=rn(r.text,s);let l=i(r.text.slice(o,a));for(;o>0;){let c=rn(r.text,o,!1);if(i(r.text.slice(c,o))!=l)break;o=c}for(;at?e.left-t:Math.max(0,t-e.right)}function AI(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function bd(t,e){return t.tope.top+1}function vy(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Qp(t,e,n){let i,r,s,o,a=!1,l,c,u,O;for(let h=t.firstChild;h;h=h.nextSibling){let p=Fo(h);for(let $=0;$Q||o==Q&&s>b)&&(i=h,r=g,s=b,o=Q,a=b?e0:$g.bottom&&(!u||u.bottomg.top)&&(c=h,O=g):u&&bd(u,g)?u=Sy(u,g.bottom):O&&bd(O,g)&&(O=vy(O,g.top))}}if(u&&u.bottom>=n?(i=l,r=u):O&&O.top<=n&&(i=c,r=O),!i)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return Py(i,f,n);if(a&&i.contentEditable!="false")return Qp(i,f,n);let d=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:d}}function Py(t,e,n){let i=t.nodeValue.length,r=-1,s=1e9,o=0;for(let a=0;an?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&O=(u.left+u.right)/2,d=f;if(($e.chrome||$e.gecko)&&js(t,a).getBoundingClientRect().left==u.right&&(d=!f),O<=0)return{node:t,offset:a+(d?1:0)};r=a+(d?1:0),s=O}}}return{node:t,offset:r>-1?r:o>0?t.nodeValue.length:0}}function F_(t,e,n,i=-1){var r,s;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:O}=e,f=O-a;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let y=t.viewState.heightOracle.textHeight/2,v=!1;l=t.elementAtHeight(f),l.type!=Pn.Text;)for(;f=i>0?l.bottom+y:l.top-y,!(f>=0&&f<=c);){if(v)return n?null:0;v=!0,i=-i}O=a+f;let d=l.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:_y(t,o,l,u,O);let h=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:h,$=p.elementFromPoint(u,O);$&&!t.contentDOM.contains($)&&($=null),$||(u=Math.max(o.left+1,Math.min(o.right-1,u)),$=p.elementFromPoint(u,O),$&&!t.contentDOM.contains($)&&($=null));let g,b=-1;if($&&((r=t.docView.nearest($))===null||r===void 0?void 0:r.isEditable)!=!1){if(h.caretPositionFromPoint){let y=h.caretPositionFromPoint(u,O);y&&({offsetNode:g,offset:b}=y)}else if(h.caretRangeFromPoint){let y=h.caretRangeFromPoint(u,O);y&&({startContainer:g,startOffset:b}=y,(!t.contentDOM.contains(g)||$e.safari&&qI(g,b,u)||$e.chrome&&ZI(g,b,u))&&(g=void 0))}g&&(b=Math.min(Gi(g),b))}if(!g||!t.docView.dom.contains(g)){let y=Vt.find(t.docView,d);if(!y)return f>l.top+l.height/2?l.to:l.from;({node:g,offset:b}=Qp(y.dom,u,O))}let Q=t.docView.nearest(g);if(!Q)return null;if(Q.isWidget&&((s=Q.dom)===null||s===void 0?void 0:s.nodeType)==1){let y=Q.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+sp(o,s,t.state.tabSize)}function qI(t,e,n){let i,r=t;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(;;){let s=r.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let o=r.parentNode;if(!o||o.nodeName=="DIV")break;r=o}}return js(t,i-1,i).getBoundingClientRect().right>n}function ZI(t,e,n){if(e!=0)return!1;for(let r=t;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=t.nodeType==1?t.getBoundingClientRect():js(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function yp(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.toe)return s;(!r||s.type==Pn.Text&&(r.type!=s.type||(n<0?s.frome)))&&(r=s)}}return r||i}return i}function zI(t,e,n,i){let r=yp(t,e.head,e.assoc||-1),s=!i||r.type!=Pn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==$t.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return K.cursor(l,n?-1:1)}return K.cursor(n?r.to:r.from,n?-1:1)}function xy(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let a=e,l=null;;){let c=SI(r,s,o,a,n),u=E_;if(!c){if(r.number==(n?t.state.doc.lines:1))return a;u=` -`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),c=t.visualLineSide(r,!n)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function YI(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let o=i(s);return r==vt.Space&&(r=o),r==o}}function MI(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return K.cursor(r,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(r,e.assoc||-1),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let d=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-d.from))),a=(s<0?d.top:d.bottom)+u}let O=l.left+o,f=i??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let h=a+(f+d)*s,p=F_(t,{x:O,y:h},!1,s);if(hl.bottom||(s<0?pr)){let $=t.docView.coordsForChar(p),g=!$||h<$.top?-1:1;return K.cursor(p,g,void 0,o)}}}function _u(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,o,a)=>{if(e>s&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:K.cursor(i,is)&&this.lineBreak(),r=o}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=r.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let n=ut.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(UI(e,i.node,i.offset)?n:0))}}function UI(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let a=s||o?[]:NI(e),l=new II(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=jI(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!lp(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!lp(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if(($e.ios||$e.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=r.from,c=null;(s===8||$e.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:$e.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` - `&&t.lineWrapping&&(i&&(i=K.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Fe.of([" "])}),n)return mg(t,n,i,s);if(i&&!i.main.eq(r)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:o,userEvent:a}),!0}else return!1}function mg(t,e,n,i=-1){if($e.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if($e.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ao(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.lengthr.head)&&Ao(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Ao(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=LI(t,e,n));return t.state.facet(Y_).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function LI(t,e,n){let i,r=t.state,s=r.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=r.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let c=t.state.sliceDoc(e.from,e.to),u,O=n&&G_(t,n.main.head);if(O){let h=e.insert.length-(e.to-e.from);u={from:O.from,to:O.to-h}}else u=t.state.doc.lineAt(s.head);let f=s.to-e.to,d=s.to-s.from;i=r.changeByRange(h=>{if(h.from==s.from&&h.to==s.to)return{changes:a,range:l||h.map(a)};let p=h.to-f,$=p-c.length;if(h.to-h.from!=d||t.state.sliceDoc($,p)!=c||h.to>=u.from&&h.from<=u.to)return{range:h};let g=r.changes({from:$,to:p,insert:e.insert}),b=h.to-s.to;return{changes:g,range:l?K.range(Math.max(0,l.anchor+b),Math.max(0,l.head+b)):h.map(g)}})}else i={changes:a,selection:l&&r.selection.replaceRange(l)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:o,scrollIntoView:!0})}function WI(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function NI(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new wy(n,i)),(r!=n||s!=i)&&e.push(new wy(r,s))),e}function jI(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?K.single(n+e,i+e):null}class BI{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,$e.safari&&e.contentDOM.addEventListener("input",()=>null),$e.gecko&&u6(e.contentDOM.ownerDocument)}handleEvent(e){!n6(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=GI(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=i[s];a&&o!=!a.handlers.length&&(r.removeEventListener(s,this.handleEvent),a=null),a||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&J_.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),$e.android&&$e.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return $e.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=K_.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||FI.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:$e.safari&&!$e.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Ty(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){En(n.state,r)}}}function GI(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,o=r&&r.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(Ty(i.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(Ty(i.value,l))}}for(let i in Pi)n(i).handlers.push(Pi[i]);for(let i in ui)n(i).observers.push(ui[i]);return e}const K_=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],FI="dthko",J_=[16,17,18,20,91,92,224,225],Gc=6;function Fc(t){return Math.max(0,t)*.7+8}function HI(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class KI{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=sI(e.contentDOM),this.atoms=e.state.facet(hg).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(De.allowMultipleSelections)&&JI(e,n),this.dragging=t6(e,n)&&nx(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&HI(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=pg(this.view);e.clientX-l.left<=r+Gc?n=-Fc(r-e.clientX):e.clientX+l.right>=o-Gc&&(n=Fc(e.clientX-o)),e.clientY-l.top<=s+Gc?i=-Fc(s-e.clientY):e.clientY+l.bottom>=a-Gc&&(i=Fc(e.clientY-a)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;in.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function JI(t,e){let n=t.state.facet(A_);return n.length?n[0](e):$e.mac?e.metaKey:e.ctrlKey}function e6(t,e){let n=t.state.facet(q_);return n.length?n[0](e):$e.mac?!e.altKey:!e.ctrlKey}function t6(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Rl(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function n6(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=ut.get(n))&&i.ignoreEvent(e))return!1;return!0}const Pi=Object.create(null),ui=Object.create(null),ex=$e.ie&&$e.ie_version<15||$e.ios&&$e.webkit_version<604;function i6(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),tx(t,n.value)},50)}function kf(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function tx(t,e){e=kf(t.state,Og,e);let{state:n}=t,i,r=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(bp!=null&&n.selection.ranges.every(l=>l.empty)&&bp==s.toString()){let l=-1;i=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let O=n.toText((o?s.line(r++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:O},range:K.cursor(c.from+O.length)}})}else o?i=n.changeByRange(l=>{let c=s.line(r++);return{changes:{from:l.from,to:l.to,insert:c.text},range:K.cursor(l.from+c.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ui.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Pi.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);ui.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};ui.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Pi.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(Z_))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=o6(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new KI(t,e,n,i)),i&&t.observer.ignore(()=>{m_(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function ky(t,e,n,i){if(i==1)return K.cursor(e,n);if(i==2)return VI(t.state,e,n);{let r=Vt.find(t.docView,e),s=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return ae>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function r6(t,e,n,i){let r=Vt.find(t.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let o=r.coordsAt(s,-1);if(o&&Ry(n,i,o))return-1;let a=r.coordsAt(s,1);return a&&Ry(n,i,a)?1:o&&o.bottom>=i?-1:1}function Cy(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:r6(t,n,e.clientX,e.clientY)}}const s6=$e.ie&&$e.ie_version<=11;let Xy=null,Vy=0,Ey=0;function nx(t){if(!s6)return t.detail;let e=Xy,n=Ey;return Xy=t,Ey=Date.now(),Vy=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Vy+1)%3:1}function o6(t,e){let n=Cy(t,e),i=nx(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,o,a){let l=Cy(t,s),c,u=ky(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!o){let O=ky(t,n.pos,n.bias,i),f=Math.min(O.from,u.from),d=Math.max(O.to,u.to);u=f1&&(c=a6(r,l.pos))?c:a?r.addRange(u):K.create([u])}}}function a6(t,e){for(let n=0;n=e)return K.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Pi.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,o=s+r.length;(s>=n.to||o<=n.from)&&(n=K.range(s,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",kf(t.state,fg,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Pi.dragend=t=>(t.inputState.draggedContent=null,!1);function Ay(t,e,n,i){if(n=kf(t.state,Og,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=i&&s&&e6(t,e)?{from:s.from,to:s.to}:null,a={from:r,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Pi.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&Ay(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Ay(t,e,i,!0),!0}return!1};Pi.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=ex?null:e.clipboardData;return n?(tx(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(i6(t),!1)};function l6(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function c6(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:kf(t,fg,e.join(t.lineBreak)),ranges:n,linewise:i}}let bp=null;Pi.copy=Pi.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=c6(t.state);if(!n&&!r)return!1;bp=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=ex?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(l6(t,n),!1)};const ix=Er.define();function rx(t,e){let n=[];for(let i of t.facet(M_)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:ix.of(!0)}):null}function sx(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=rx(t.state,e);n?t.dispatch(n):t.update([])}},10)}ui.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),sx(t)};ui.blur=t=>{t.observer.clearSelectionRange(),sx(t)};ui.compositionstart=ui.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};ui.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,$e.chrome&&$e.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};ui.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Pi.beforeinput=(t,e)=>{var n,i;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return mg(t,{from:l,to:c,insert:t.state.toText(s)},null),!0}}let r;if($e.chrome&&$e.android&&(r=K_.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return $e.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),$e.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>ui.compositionend(t,e),20),!1};const qy=new Set;function u6(t){qy.has(t)||(qy.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Zy=["pre-wrap","normal","pre-line","break-spaces"];let Jo=!1;function zy(){Jo=!1}class O6{constructor(e){this.lineWrapping=e,this.doc=Fe.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Zy.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>xu&&(Jo=!0),this.height=e)}replace(e,n,i){return _n.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,o=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:O}=r[a],f=s.lineAt(l,mt.ByPosNoHeight,i.setDoc(n),0,0),d=f.to>=c?f:s.lineAt(c,mt.ByPosNoHeight,i,0,0);for(O+=d.to-c,c=d.to;a>0&&f.from<=r[a-1].toA;)l=r[a-1].fromA,u=r[a-1].fromB,a--,ls*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(s>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,s-=a.size}else break;else if(r=s&&o(this.blockAt(0,i,r,s))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ln extends ox{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new Zi(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Ln||r instanceof Jt&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Jt?r=new Ln(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):_n.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(r.heights[r.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Jt extends _n{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:r,perLine:o,perChar:a}}blockAt(e,n,i,r){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let c=r+(e0){let s=i[i.length-1];s instanceof Jt?i[i.length-1]=new Jt(s.length+r):i.push(null,new Jt(r-1))}if(e>0){let s=i[0];s instanceof Jt?i[0]=new Jt(e+s.length):i.unshift(new Jt(e-1),null)}return _n.of(i)}decomposeLeft(e,n){n.push(new Jt(e-1),null)}decomposeRight(e,n){n.push(null,new Jt(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&o.push(new Jt(r.from-n-1).updateHeight(e,n));a<=s&&r.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let O=r.heights[r.index++];l==-1?l=O:Math.abs(O-l)>=xu&&(l=-2);let f=new Ln(u,O);f.outdated=!1,o.push(f),a+=u+1}a<=s&&o.push(null,new Jt(s-a).updateHeight(e,a));let c=_n.of(o);return(l<0||Math.abs(c.height-this.height)>=xu||Math.abs(l-this.heightMetrics(e,n).perLine)>=xu)&&(Jo=!0),fO(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class d6 extends _n{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return ea))return c;let u=n==mt.ByPosNoHeight?mt.ByPosNoHeight:mt.ByPos;return l?c.join(this.right.lineAt(a,u,i,o,a)):this.left.lineAt(a,u,i,r,s).join(c)}forEachLine(e,n,i,r,s,o){let a=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,o);else{let c=this.lineAt(l,mt.ByPos,i,r,s);e=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,a,l,o)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of i)s.push(a);if(e>0&&Yy(s,o-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?_n.of(this.break?[e,null,n]:[e,n]):(this.left=fO(this.left,e),this.right=fO(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return r&&r.from<=n+s.length&&r.more?l=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=a+o.length&&r.more?l=o=o.updateHeight(e,a,i,r):o.updateHeight(e,a,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Yy(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Jt&&(i=t[e+1])instanceof Jt&&t.splice(e-1,3,new Jt(n.length+1+i.length))}const h6=5;class gg{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ln?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ln(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=h6)&&this.addLineDeco(r,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ln(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new Jt(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ln)return e;let n=new Ln(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ln)&&!this.isCovered?this.nodes.push(new Ln(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&O.overflow!="visible"){let f=u.getBoundingClientRect();s=Math.max(s,f.left),o=Math.min(o,f.right),a=Math.max(a,f.top),l=Math.min(c==t.parentNode?r.innerHeight:l,f.bottom)}c=O.position=="absolute"||O.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function $6(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function Q6(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Sd{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new O6(n),this.stateDeco=e.facet(Cl).filter(i=>typeof i!="function"),this.heightMap=_n.empty().applyChanges(this.stateDeco,Fe.empty,this.heightOracle.setDoc(e.doc),[new li(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new Hc(s,o))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Iy:new $g(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(La(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Cl).filter(u=>typeof u!="function");let r=e.changedRanges,s=li.extendWithRanges(r,p6(i,this.stateDeco,e?e.changes:It.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);zy(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Jo)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(U_)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?$t.RTL:$t.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:y,scaleY:v}=p_(n,a);(y>.005&&Math.abs(this.scaleX-y)>.005||v>.005&&Math.abs(this.scaleY-v)>.005)&&(this.scaleX=y,this.scaleY=v,c|=16,o=l=!0)}let O=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=f)&&(this.paddingTop=O,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=$_(e.scrollDOM);let h=(this.printing?Q6:g6)(n,this.paddingTop),p=h.top-this.pixelViewport.top,$=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget&&!$6(e.dom))return 0;let b=a.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let y=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:v,charWidth:S,textHeight:P}=e.docView.measureTextSize();o=v>0&&r.refresh(s,v,S,P,b/S,y),o&&(e.docView.minWidth=0,c|=16)}p>0&&$>0?u=Math.max(p,$):p<0&&$<0&&(u=Math.min(p,$)),zy();for(let v of this.viewports){let S=v.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(v);this.heightMap=(o?_n.empty().applyChanges(this.stateDeco,Fe.empty,this.heightOracle,[new li(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new f6(v.from,S))}Jo&&(c|=2)}let Q=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return Q&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||Q)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Hc(r.lineAt(o-i*1e3,mt.ByHeight,s,0,0).from,r.lineAt(a+(1-i)*1e3,mt.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=r.lineAt(c,mt.ByPos,s,0,0),f;n.y=="center"?f=(O.top+O.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=a+Math.max(10,Math.min(i,250)))&&r>o-2*1e3&&s>1,o=r<<1;if(this.defaultTextDirection!=$t.LTR&&!i)return[];let a=[],l=(u,O,f,d)=>{if(O-uu&&gg.from>=f.from&&g.to<=f.to&&Math.abs(g.from-u)g.fromb));if(!$){if(OQ.from<=O&&Q.to>=O)){let Q=n.moveToLineBoundary(K.cursor(O),!1,!0).head;Q>u&&(O=Q)}let g=this.gapSize(f,u,O,d),b=i||g<2e6?g:2e6;$=new Sd(u,O,g,b)}a.push($)},c=u=>{if(u.length2e6)for(let S of e)S.from>=u.from&&S.fromu.from&&l(u.from,d,u,O),hn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Je.spans(n,this.viewport.from,this.viewport.to,{span(s,o){i.push({from:s,to:o})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||La(this.heightMap.lineAt(e,mt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||La(this.heightMap.lineAt(this.scaler.fromDOM(e),mt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return La(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Hc{constructor(e,n){this.from=e,this.to=n}}function b6(t,e,n){let i=[],r=t,s=0;return Je.spans(n,t,e,{span(){},point(o,a){o>r&&(i.push({from:r,to:o}),s+=o-r),r=a}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:o}=e[r],a=o-s;if(i<=a)return s+i;i-=a}}function Jc(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function v6(t,e){for(let n of t)if(e(n))return n}const Iy={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class $g{constructor(e,n,i){let r=0,s=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let c=n.lineAt(a,mt.ByPos,e,0,0).top,u=n.lineAt(l,mt.ByPos,e,0,0).bottom;return r+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=nn.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function La(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Zi(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>La(r,e)):t._content)}const eu=me.define({combine:t=>t.join(" ")}),vp=me.define({combine:t=>t.indexOf(!0)>-1}),Sp=us.newName(),ax=us.newName(),lx=us.newName(),cx={"&light":"."+ax,"&dark":"."+lx};function Pp(t,e,n){return new us(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const S6=Pp("."+Sp,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},cx),P6={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Pd=$e.ie&&$e.ie_version<=11;class _6{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new oI,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);($e.ie&&$e.ie_version<=11||$e.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&$e.android&&e.constructor.EDIT_CONTEXT!==!1&&!($e.chrome&&$e.chrome_version<126)&&(this.editContext=new w6(e),e.state.facet(hr)&&(e.contentDOM.editContext=this.editContext.editContext)),Pd&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(hr)?i.root.activeElement!=this.dom:!Su(this.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}($e.ie&&$e.ie_version<=11||$e.android&&$e.chrome)&&!i.state.selection.main.empty&&r.focusNode&&il(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Rl(e.root);if(!n)return!1;let i=$e.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&x6(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Su(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Ao(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Su(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new DI(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=H_(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=Uy(n,e.previousSibling||e.target.previousSibling,-1),r=Uy(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(hr)!=e.state.facet(hr)&&(e.view.contentDOM.editContext=e.state.facet(hr)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Uy(t,e,n){for(;e;){let i=ut.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function Dy(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return il(o.node,o.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function x6(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return Dy(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?Dy(t,n):null}class w6{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:o}=r,a=this.toEditorPos(i.updateRangeStart),l=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:a,drifted:!1});let c={from:a,to:l,insert:Fe.of(i.text.split(` -`))};if(c.from==this.from&&sthis.to&&(c.to=s),c.from==c.to&&!c.insert.length){let u=K.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));u.main.eq(r)||e.dispatch({selection:u,userEvent:"select"});return}if(($e.mac||$e.android)&&c.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:a,to:l,insert:Fe.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);mg(e,c,K.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let o=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);o{let r=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(o!="None"&&a!="None"){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=Rl(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(i)return;let u=c.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(c)){r=this.pendingContextChange=null,n+=u,this.to+=u;return}else r=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(sthis.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Oe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||aI(e.parent)||document,this.viewState=new My(e.state||De.create(e)),e.scrollTo&&e.scrollTo.is(Bc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(vo).map(r=>new yd(r));for(let r of this.plugins)r.update(this);this.observer=new _6(this),this.inputState=new BI(this),this.inputState.ensureHandlers(this.plugins),this.docView=new by(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof At?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(ix))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=rx(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(De.phrases)!=this.state.facet(De.phrases))return this.setState(s);r=OO.create(this,s,e),r.flags|=a;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(O&&(O=O.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;O=new qo(d.empty?d:K.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(Bc)&&(O=d.value.clip(this.state))}this.viewState.update(r,O),this.bidiCache=dO.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Ua)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(eu)!=r.state.facet(eu)&&(this.viewState.mustMeasureContent=!0),(n||i||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let f of this.state.facet($p))try{f(r)}catch(d){En(this.state,d,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!H_(this,u)&&c.force&&Ao(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new My(e),this.plugins=e.facet(vo).map(i=>new yd(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new by(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(vo),i=e.state.facet(vo);if(n!=i){let r=[];for(let s of i){let o=n.indexOf(s);if(o<0)r.push(new yd(s));else{let a=this.plugins[o];a.mustUpdate=e,r.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if($_(i))s=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(r);s=d.from,o=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(h){return En(this.state,h),Ly}}),O=OO.create(this,this.state,[]),f=!1;O.flags|=l,n?n.flags|=l:n=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),f=this.docView.update(O),f&&this.docViewUpdate());for(let d=0;d1||h<-1){r=r+h,i.scrollTop=r/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet($p))a(n)}get themeClasses(){return Sp+" "+(this.state.facet(vp)?lx:ax)+" "+this.state.facet(eu)}updateAttrs(){let e=Wy(this,W_,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(hr)?"true":"false",class:"cm-content",style:`${$e.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Wy(this,dg,n);let i=this.observer.ignore(()=>{let r=dp(this.contentDOM,this.contentAttrs,n),s=dp(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Oe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Ua);let e=this.state.facet(Oe.cspNonce);us.mount(this.root,this.styleModules.concat(S6).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return vd(this,e,xy(this,e,n,i))}moveByGroup(e,n){return vd(this,e,xy(this,e,n,i=>YI(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return K.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return zI(this,e,n,i)}moveVertically(e,n,i){return vd(this,e,MI(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),F_(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[ts.find(s,e-r.from,-1,n)];return lc(i,o.dir==$t.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(I_)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>T6)return V_(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||X_(s.isolates,i=yy(this,e))))return s.order;i||(i=yy(this,e));let r=vI(e.text,n,i);return this.bidiCache.push(new dO(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||$e.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{m_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Bc.of(new qo(typeof e=="number"?K.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Bc.of(new qo(K.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ct.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ct.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=us.newName(),r=[eu.of(i),Ua.of(Pp(`.${i}`,e))];return n&&n.dark&&r.push(vp.of(!0)),r}static baseTheme(e){return Ss.lowest(Ua.of(Pp("."+Sp,e,cx)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&ut.get(i)||ut.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}Oe.styleModule=Ua;Oe.inputHandler=Y_;Oe.clipboardInputFilter=Og;Oe.clipboardOutputFilter=fg;Oe.scrollHandler=D_;Oe.focusChangeEffect=M_;Oe.perLineTextDirection=I_;Oe.exceptionSink=z_;Oe.updateListener=$p;Oe.editable=hr;Oe.mouseSelectionStyle=Z_;Oe.dragMovesSelection=q_;Oe.clickAddsSelectionRange=A_;Oe.decorations=Cl;Oe.outerDecorations=N_;Oe.atomicRanges=hg;Oe.bidiIsolatedRanges=j_;Oe.scrollMargins=B_;Oe.darkTheme=vp;Oe.cspNonce=me.define({combine:t=>t.length?t[0]:""});Oe.contentAttributes=dg;Oe.editorAttributes=W_;Oe.lineWrapping=Oe.contentAttributes.of({class:"cm-lineWrapping"});Oe.announce=Ve.define();const T6=4096,Ly={};class dO{constructor(e,n,i,r,s,o){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:$t.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],o=typeof s=="function"?s(t):s;o&&fp(o,n)}return n}const k6=$e.mac?"mac":$e.windows?"win":$e.linux?"linux":"key";function R6(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,o,a;for(let l=0;li.concat(r),[]))),n}function X6(t,e,n){return Ox(ux(t.state),e,t,n)}let Kr=null;const V6=4e3;function E6(t,e=k6){let n=Object.create(null),i=Object.create(null),r=(o,a)=>{let l=i[o];if(l==null)i[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var O,f;let d=n[o]||(n[o]=Object.create(null)),h=a.split(/ (?!$)/).map(g=>R6(g,e));for(let g=1;g{let y=Kr={view:Q,prefix:b,scope:o};return setTimeout(()=>{Kr==y&&(Kr=null)},V6),!0}]})}let p=h.join(" ");r(p,!1);let $=d[p]||(d[p]={preventDefault:!1,stopPropagation:!1,run:((f=(O=d._any)===null||O===void 0?void 0:O.run)===null||f===void 0?void 0:f.slice())||[]});l&&$.run.push(l),c&&($.preventDefault=!0),u&&($.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:O}=o;for(let f in u)u[f].run.push(d=>O(d,_p))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let _p=null;function Ox(t,e,n,i){_p=e;let r=nI(e),s=Rn(r,0),o=qi(s)==r.length&&r!=" ",a="",l=!1,c=!1,u=!1;Kr&&Kr.view==n&&Kr.scope==i&&(a=Kr.prefix+" ",J_.indexOf(e.keyCode)<0&&(c=!0,Kr=null));let O=new Set,f=$=>{if($){for(let g of $.run)if(!O.has(g)&&(O.add(g),g(n)))return $.stopPropagation&&(u=!0),!0;$.preventDefault&&($.stopPropagation&&(u=!0),c=!0)}return!1},d=t[i],h,p;return d&&(f(d[a+tu(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!($e.windows&&e.ctrlKey&&e.altKey)&&(h=Os[e.keyCode])&&h!=r?(f(d[a+tu(h,e,!0)])||e.shiftKey&&(p=kl[e.keyCode])!=r&&p!=h&&f(d[a+tu(p,e,!1)]))&&(l=!0):o&&e.shiftKey&&f(d[a+tu(r,e,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),_p=null,l}class fc{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=fx(e);return[new fc(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return A6(e,n,i)}}function fx(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==$t.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function jy(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?i:{from:Math.max(i.from,Math.min(a,l)),to:Math.min(i.to,Math.max(a,l))}}function A6(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==$t.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=fx(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),O=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=a.right-(u?parseInt(u.paddingRight):0),d=yp(t,i,1),h=yp(t,r,-1),p=d.type==Pn.Text?d:null,$=h.type==Pn.Text?h:null;if(p&&(t.lineWrapping||d.widgetLineBreaks)&&(p=jy(t,i,1,p)),$&&(t.lineWrapping||h.widgetLineBreaks)&&($=jy(t,r,-1,$)),p&&$&&p.from==$.from&&p.to==$.to)return b(Q(n.from,n.to,p));{let v=p?Q(n.from,null,p):y(d,!1),S=$?Q(null,n.to,$):y(h,!0),P=[];return(p||d).to<($||h).from-(p&&$?1:0)||d.widgetLineBreaks>1&&v.bottom+t.defaultLineHeight/2E&&se.from=F)break;ue>le&&W(Math.max(J,le),v==null&&J<=E,Math.min(ue,F),S==null&&ue>=te,z.dir)}if(le=I.to+1,le>=F)break}return Z.length==0&&W(E,v==null,te,S==null,t.textDirection),{top:x,bottom:C,horizontal:Z}}function y(v,S){let P=a.top+(S?v.top:v.bottom);return{top:P,bottom:P,horizontal:[]}}}function q6(t,e){return t.constructor==e.constructor&&t.eq(e)}class Z6{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(wu)!=e.state.facet(wu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(wu);for(;n!q6(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const wu=me.define();function dx(t){return[Ct.define(e=>new Z6(e,t)),wu.of(t)]}const Xl=me.define({combine(t){return er(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function z6(t={}){return[Xl.of(t),Y6,M6,I6,U_.of(!0)]}function hx(t){return t.startState.facet(Xl)!=t.state.facet(Xl)}const Y6=dx({above:!0,markers(t){let{state:e}=t,n=e.facet(Xl),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:K.cursor(r.head,r.head>r.anchor?-1:1);for(let l of fc.forRange(t,o,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=hx(t);return n&&By(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){By(e.state,t)},class:"cm-cursorLayer"});function By(t,e){e.style.animationDuration=t.facet(Xl).cursorBlinkRate+"ms"}const M6=dx({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:fc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||hx(t)},class:"cm-selectionLayer"}),I6=Ss.highest(Oe.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),px=Ve.define({map(t,e){return t==null?null:e.mapPos(t)}}),Wa=Ft.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(px)?i.value:n,t)}}),U6=Ct.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Wa);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wa)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wa),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wa)!=t&&this.view.dispatch({effects:px.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function D6(){return[Wa,U6]}function Gy(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)r(o+a.index,a)}function L6(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class W6{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,c,u)=>r(u,c,c+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,c,u)=>{let O=i(a,l,c);O&&u(c,c+a[0].length,O)};else if(i)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new kr,i=n.add.bind(n);for(let{from:r,to:s}of L6(e,this.maxLength))Gy(e.state.doc,this.regexp,r,s,(o,a)=>this.addMatch(a,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(i=Math.min(a,i),r=Math.max(l,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),a=Math.min(s.to,r);if(a>=o){let l=e.state.doc.lineAt(o),c=l.tol.from;o--)if(this.boundary.test(l.text[o-1-l.from])){u=o;break}for(;af.push(g.range(p,$));if(l==c)for(this.regexp.lastIndex=u-l.from;(d=this.regexp.exec(l.text))&&d.indexthis.addMatch($,e,p,h));n=n.update({filterFrom:u,filterTo:O,filter:(p,$)=>pO,add:f})}}return n}}const xp=/x/.unicode!=null?"gu":"g",N6=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,xp),j6={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let _d=null;function B6(){var t;if(_d==null&&typeof document<"u"&&document.body){let e=document.body.style;_d=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return _d||!1}const Tu=me.define({combine(t){let e=er(t,{render:null,specialChars:N6,addSpecialChars:null});return(e.replaceTabs=!B6())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,xp)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,xp)),e}});function G6(t={}){return[Tu.of(t),F6()]}let Fy=null;function F6(){return Fy||(Fy=Ct.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Tu)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new W6({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=Rn(e[0],0);if(s==9){let o=r.lineAt(i),a=n.state.tabSize,l=ha(o.text,a,i-o.from);return xe.replace({widget:new e4((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=xe.replace({widget:new J6(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Tu);t.startState.facet(Tu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const H6="•";function K6(t){return t>=32?H6:t==10?"␤":String.fromCharCode(9216+t)}class J6 extends tr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=K6(this.code),i=e.state.phrase("Control character")+" "+(j6[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class e4 extends tr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function t4(){return i4}const n4=xe.line({class:"cm-activeLine"}),i4=Ct.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(n4.range(r.from)),e=r.from)}return xe.set(n)}},{decorations:t=>t.decorations});class r4 extends tr{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Fo(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=lc(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function s4(t){let e=Ct.fromClass(class{constructor(n){this.view=n,this.placeholder=t?xe.set([xe.widget({widget:new r4(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,Oe.contentAttributes.of({"aria-placeholder":t})]:e}const wp=2e3;function o4(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>wp||n.off>wp||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let c=t.doc.line(l);c.length<=a&&s.push(K.range(c.from+o,c.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let c=t.doc.line(l),u=sp(c.text,o,t.tabSize,!0);if(u<0)s.push(K.cursor(c.to));else{let O=sp(c.text,a,t.tabSize);s.push(K.range(c.from+u,c.from+O))}}}return s}function a4(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Hy(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>wp?-1:r==i.length?a4(t,e.clientX):ha(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function l4(t,e){let n=Hy(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),o=r.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let a=Hy(t,r);if(!a)return i;let l=o4(t.state,n,a);return l.length?o?K.create(l.concat(i.ranges)):K.create(l):i}}:null}function c4(t){let e=n=>n.altKey&&n.button==0;return Oe.mouseSelectionStyle.of((n,i)=>e(i)?l4(n,i):null)}const u4={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},O4={style:"cursor: crosshair"};function f4(t={}){let[e,n]=u4[t.key||"Alt"],i=Ct.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Oe.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?O4:null})]}const Ca="-10000px";class mx{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;ln[c]=l),n.length=a.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}}function d4(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const xd=me.define({combine:t=>{var e,n,i;return{position:$e.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||d4}}}),Ky=new WeakMap,Qg=Ct.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(xd);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new mx(t,yg,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(xd);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Ca,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if($e.gecko)n=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==Ca&&s.style.left=="0px"){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=pg(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(xd).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,o=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||O.rightMath.min(n.right,i.right)+.1)){u.style.top=Ca;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,h=d?7:0,p=f.right-f.left,$=(e=Ky.get(c))!==null&&e!==void 0?e:f.bottom-f.top,g=c.offset||p4,b=this.view.textDirection==$t.LTR,Q=f.width>i.right-i.left?b?i.left:i.right-f.width:b?Math.max(i.left,Math.min(O.left-(d?14:0)+g.x,i.right-p)):Math.min(Math.max(i.left,O.left-p+(d?14:0)-g.x),i.right-p),y=this.above[a];!l.strictSide&&(y?O.top-$-h-g.yi.bottom)&&y==i.bottom-O.bottom>O.top-i.top&&(y=this.above[a]=!y);let v=(y?O.top-i.top:i.bottom-O.bottom)-h;if(v<$&&c.resize!==!1){if(vQ&&x.topS&&(S=y?x.top-$-2-h:x.bottom+h+2);if(this.position=="absolute"?(u.style.top=(S-t.parent.top)/s+"px",Jy(u,(Q-t.parent.left)/r)):(u.style.top=S/s+"px",Jy(u,Q/r)),d){let x=O.left+(b?g.x:-g.x)-(Q+14-7);d.style.left=x/r+"px"}c.overlap!==!0&&o.push({left:Q,top:S,right:P,bottom:S+$}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ca}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Jy(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const h4=Oe.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),p4={x:0,y:0},yg=me.define({enables:[Qg,h4]}),hO=me.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Rf{static create(e){return new Rf(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new mx(e,hO,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const m4=yg.compute([hO],t=>{let e=t.facet(hO);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:Rf.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class g4{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=l&&l.dir==$t.RTL?-1:1;s=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>En(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Qg),n=e?e.manager.tooltips.findIndex(i=>i.create==Rf.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!$4(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!Q4(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const nu=4;function $4(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();r=Math.min(a.top,r),s=Math.max(a.bottom,s)}return e.clientX>=n-nu&&e.clientX<=i+nu&&e.clientY>=r-nu&&e.clientY<=s+nu}function Q4(t,e,n,i,r,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.rightr||Math.min(o.bottom,a)=e&&l<=n}function y4(t,e={}){let n=Ve.define(),i=Ft.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of r){let l=s.changes.mapPos(a.pos,-1,nn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}r=o}for(let o of s.effects)o.is(n)&&(r=o.value),o.is(b4)&&(r=[]);return r},provide:r=>hO.from(r)});return{active:i,extension:[i,Ct.define(r=>new g4(r,t,i,n,e.hoverTime||300)),m4]}}function gx(t,e){let n=t.plugin(Qg);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const b4=Ve.define(),eb=me.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Vl(t,e){let n=t.plugin($x),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const $x=Ct.fromClass(class{constructor(t){this.input=t.state.facet(El),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(eb);this.top=new iu(t,!0,e.topContainer),this.bottom=new iu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(eb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new iu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new iu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(El);if(n!=this.input){let i=n.filter(l=>l),r=[],s=[],o=[],a=[];for(let l of i){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),r.push(u),(u.top?s:o).push(u)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Oe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class iu{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=tb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=tb(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function tb(t){let e=t.nextSibling;return t.remove(),e}const El=me.define({enables:$x});class Cr extends Ws{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Cr.prototype.elementClass="";Cr.prototype.toDOM=void 0;Cr.prototype.mapMode=nn.TrackBefore;Cr.prototype.startSide=Cr.prototype.endSide=-1;Cr.prototype.point=!0;const ku=me.define(),v4=me.define(),S4={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Je.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},sl=me.define();function P4(t){return[Qx(),sl.of({...S4,...t})]}const nb=me.define({combine:t=>t.some(e=>e)});function Qx(t){return[_4]}const _4=Ct.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(sl).map(e=>new rb(t,e)),this.fixed=!t.state.facet(nb);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(nb)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Je.iter(this.view.state.facet(ku),this.view.viewport.from),i=[],r=this.gutters.map(s=>new x4(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Pn.Text&&o){Tp(n,i,a.from);for(let l of r)l.line(this.view,a,i);o=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(s.type==Pn.Text){Tp(n,i,s.from);for(let o of r)o.line(this.view,s,i)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(sl),n=t.state.facet(sl),i=t.docChanged||t.heightChanged||t.viewportChanged||!Je.eq(t.startState.facet(ku),t.state.facet(ku),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let o=e.indexOf(s);o<0?r.push(new rb(this.view,s)):(this.gutters[o].update(t),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Oe.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==$t.LTR?{left:i,right:r}:{right:i,left:r}})});function ib(t){return Array.isArray(t)?t:[t]}function Tp(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class x4{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Je.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==r.elements.length){let a=new yx(e,o,s,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];Tp(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(v4)){let o=s(e,n.widget,n);o&&(r||(r=[])).push(o)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class rb{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=ib(n.markers(e)),n.initialSpacer&&(this.spacer=new yx(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=ib(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!Je.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class yx{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),w4(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=ss(a,l,c)||o(a,l,c):o}return i}})}});class wd extends Cr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Td(t,e){return t.state.facet(So).formatNumber(e,t.state)}const R4=sl.compute([So],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(T4)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new wd(Td(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(k4)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(So)!=e.state.facet(So),initialSpacer(e){return new wd(Td(e,sb(e.state.doc.lines)))},updateSpacer(e,n){let i=Td(n.view,sb(n.view.state.doc.lines));return i==e.number?e:new wd(i)},domEventHandlers:t.facet(So).domEventHandlers,side:"before"}));function C4(t={}){return[So.of(t),Qx(),R4]}function sb(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(X4.range(r)))}return Je.of(e)});function E4(){return V4}const bx=1024;let A4=0;class ii{constructor(e,n){this.from=e,this.to=n}}class qe{constructor(e={}){this.id=A4++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=xn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}qe.closedBy=new qe({deserialize:t=>t.split(" ")});qe.openedBy=new qe({deserialize:t=>t.split(" ")});qe.group=new qe({deserialize:t=>t.split(" ")});qe.isolate=new qe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});qe.contextHash=new qe({perNode:!0});qe.lookAhead=new qe({perNode:!0});qe.mounted=new qe({perNode:!0});class Al{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[qe.mounted.id]}}const q4=Object.create(null);class xn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):q4,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new xn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(qe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(qe.group),s=-1;s<(r?r.length:0);s++){let o=n[s<0?i.name:r[s]];if(o)return o}}}}xn.none=new xn("",Object.create(null),0,8);class bg{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(o|ht.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Pg(xn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new _t(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new _t(xn.none,n,i,r)))}static build(e){return M4(e)}}_t.empty=new _t(xn.none,[],[],0);class vg{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new vg(this.buffer,this.index)}}class ds{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return xn.none}toString(){let e=[];for(let n=0;n0));l=o[l+3]);return a}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function ql(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=c;e+=n){let u=a[e],O=l[e]+o.from;if(vx(r,i,O,O+u.length)){if(u instanceof ds){if(s&ht.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,i-O,r);if(f>-1)return new Yi(new Z4(o,u,e,O),null,f)}else if(s&ht.IncludeAnonymous||!u.type.isAnonymous||Sg(u)){let f;if(!(s&ht.IgnoreMounts)&&(f=Al.get(u))&&!f.overlay)return new dn(f.tree,O,e,o);let d=new dn(u,O,e,o);return s&ht.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?u.children.length-1:0,n,i,r)}}}if(s&ht.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&ht.IgnoreOverlays)&&(r=Al.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:a}of r.overlay)if((n>0?o<=s:o=s:a>s))return new dn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function ab(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function kp(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class Z4{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Yi extends Sx{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Yi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&ht.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Yi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Yi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Yi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),n.push(0)}return new _t(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Px(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;sn.from||o.to=e){let a=new dn(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(ql(a,e,n,!1))}}return r?Px(r):i}class pO{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof dn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof dn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&ht.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ht.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ht.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=n+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let a=i._tree.children[s];if(this.mode&ht.IncludeAnonymous||a instanceof ds||!a.type.isAnonymous||Sg(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return kp(this._tree,e,r);let o=i[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Sg(t){return t.children.some(e=>e instanceof ds||!e.type.isAnonymous||Sg(e))}function M4(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=bx,reused:s=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(n)?new vg(n,n.length):n,l=i.types,c=0,u=0;function O(v,S,P,x,C,Z){let{id:W,start:E,end:te,size:se}=a,le=u,F=c;for(;se<0;)if(a.next(),se==-1){let Se=s[W];P.push(Se),x.push(E-v);return}else if(se==-3){c=W;return}else if(se==-4){u=W;return}else throw new RangeError(`Unrecognized record size: ${se}`);let I=l[W],z,J,ue=E-v;if(te-E<=r&&(J=$(a.pos-S,C))){let Se=new Uint16Array(J.size-J.skip),fe=a.pos-J.size,Te=Se.length;for(;a.pos>fe;)Te=g(J.start,Se,Te);z=new ds(Se,te-J.start,i),ue=J.start-v}else{let Se=a.pos-se;a.next();let fe=[],Te=[],Ee=W>=o?W:-1,Ke=0,Ze=te;for(;a.pos>Se;)Ee>=0&&a.id==Ee&&a.size>=0?(a.end<=Ze-r&&(h(fe,Te,E,Ke,a.end,Ze,Ee,le,F),Ke=fe.length,Ze=a.end),a.next()):Z>2500?f(E,Se,fe,Te):O(E,Se,fe,Te,Ee,Z+1);if(Ee>=0&&Ke>0&&Ke-1&&Ke>0){let Xe=d(I,F);z=Pg(I,fe,Te,0,fe.length,0,te-E,Xe,Xe)}else z=p(I,fe,Te,te-E,le-te,F)}P.push(z),x.push(ue)}function f(v,S,P,x){let C=[],Z=0,W=-1;for(;a.pos>S;){let{id:E,start:te,end:se,size:le}=a;if(le>4)a.next();else{if(W>-1&&te=0;se-=3)E[le++]=C[se],E[le++]=C[se+1]-te,E[le++]=C[se+2]-te,E[le++]=le;P.push(new ds(E,C[2]-te,i)),x.push(te-v)}}function d(v,S){return(P,x,C)=>{let Z=0,W=P.length-1,E,te;if(W>=0&&(E=P[W])instanceof _t){if(!W&&E.type==v&&E.length==C)return E;(te=E.prop(qe.lookAhead))&&(Z=x[W]+E.length+te)}return p(v,P,x,C,Z,S)}}function h(v,S,P,x,C,Z,W,E,te){let se=[],le=[];for(;v.length>x;)se.push(v.pop()),le.push(S.pop()+P-C);v.push(p(i.types[W],se,le,Z-C,E-Z,te)),S.push(C-P)}function p(v,S,P,x,C,Z,W){if(Z){let E=[qe.contextHash,Z];W=W?[E].concat(W):[E]}if(C>25){let E=[qe.lookAhead,C];W=W?[E].concat(W):[E]}return new _t(v,S,P,x,W)}function $(v,S){let P=a.fork(),x=0,C=0,Z=0,W=P.end-r,E={size:0,start:0,skip:0};e:for(let te=P.pos-v;P.pos>te;){let se=P.size;if(P.id==S&&se>=0){E.size=x,E.start=C,E.skip=Z,Z+=4,x+=4,P.next();continue}let le=P.pos-se;if(se<0||le=o?4:0,I=P.start;for(P.next();P.pos>le;){if(P.size<0)if(P.size==-3)F+=4;else break e;else P.id>=o&&(F+=4);P.next()}C=I,x+=se,Z+=F}return(S<0||x==v)&&(E.size=x,E.start=C,E.skip=Z),E.size>4?E:void 0}function g(v,S,P){let{id:x,start:C,end:Z,size:W}=a;if(a.next(),W>=0&&x4){let te=a.pos-(W-4);for(;a.pos>te;)P=g(v,S,P)}S[--P]=E,S[--P]=Z-v,S[--P]=C-v,S[--P]=x}else W==-3?c=x:W==-4&&(u=x);return P}let b=[],Q=[];for(;a.pos>0;)O(t.start||0,t.bufferStart||0,b,Q,-1,0);let y=(e=t.length)!==null&&e!==void 0?e:b.length?Q[0]+b[0].length:0;return new _t(l[t.topID],b.reverse(),Q.reverse(),y)}const lb=new WeakMap;function Ru(t,e){if(!t.isAnonymous||e instanceof ds||e.type!=t)return 1;let n=lb.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof _t)){n=1;break}n+=Ru(t,i)}lb.set(e,n)}return n}function Pg(t,e,n,i,r,s,o,a,l){let c=0;for(let h=i;h=u)break;S+=P}if(Q==y+1){if(S>u){let P=h[y];d(P.children,P.positions,0,P.children.length,p[y]+b);continue}O.push(h[y])}else{let P=p[Q-1]+h[Q-1].length-v;O.push(Pg(t,h,p,y,Q,v,P,null,l))}f.push(v+b-s)}}return d(e,n,i,r,0),(a||l)(O,f,o)}class _x{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Yi?this.setBuffer(e.context.buffer,e.index,n):e instanceof dn&&this.map.set(e.tree,n)}get(e){return e instanceof Yi?this.getBuffer(e.context.buffer,e.index):e instanceof dn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class yr{constructor(e,n,i,r,s=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new yr(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a=i)for(;o&&o.from=f.from||O<=f.to||c){let d=Math.max(f.from,l)-c,h=Math.min(f.to,O)-c;f=d>=h?null:new yr(d,h,f.tree,f.offset+c,a>0,!!u)}if(f&&r.push(f),o.to>O)break;o=snew ii(r.from,r.to)):[new ii(0,0)]:[new ii(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class I4{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function wx(t){return(e,n,i,r)=>new D4(e,t,n,i,r)}class cb{constructor(e,n,i,r,s){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=s}}function ub(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class U4{constructor(e,n,i,r,s,o,a){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const Rp=new qe({perNode:!0});class D4{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new _t(i.type,i.children,i.positions,i.length,i.propValues.concat([[Rp,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[qe.mounted.id]=new Al(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let c=n.mounts.find(u=>u.frag.from<=r.from&&u.frag.to>=r.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let O=u.from+c.pos,f=u.to+c.pos;O>=r.from&&f<=r.to&&!n.ranges.some(d=>d.fromO)&&n.ranges.push({from:O,to:f})}}a=!1}else if(i&&(o=L4(i.ranges,r.from,r.to)))a=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew ii(O.from-r.from,O.to-r.from)):null,r.tree,u.length?u[0].from:r.from)),s.overlay?u.length&&(i={ranges:u,depth:0,prev:i}):a=!1}}else if(n&&(l=n.predicate(r))&&(l===!0&&(l=new ii(r.from,r.to)),l.from=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let c=db(this.ranges,n.ranges);c.length&&(ub(c),this.inner.splice(n.index,0,new cb(n.parser,n.parser.startParse(this.input,hb(n.mounts,c),c),n.ranges.map(u=>new ii(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function L4(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function Ob(t,e,n,i,r,s){if(e=e&&n.enter(i,1,ht.IgnoreOverlays|ht.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof _t)n=n.children[0];else break}return!1}}let N4=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(Rp))!==null&&n!==void 0?n:i.to,this.inner=new fb(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(Rp))!==null&&e!==void 0?e:n.to,this.inner=new fb(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(qe.mounted);if(o&&o.parser==n)for(let a=this.fragI;a=s.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:s.from-l.offset,mount:o})}}}return r}};function db(t,e){let n=null,i=e;for(let r=1,s=0;r=a)break;l.to<=o||(n||(i=n=e.slice()),l.froma&&n.splice(s+1,0,new ii(a,l.to))):l.to>a?n[s--]=new ii(a,l.to):n.splice(s--,1))}}return i}function j4(t,e,n,i){let r=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=r==t.length?1e9:o?t[r].to:t[r].from,O=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let f=Math.max(l,n),d=Math.min(u,O,i);fnew ii(f.from+i,f.to+i)),O=j4(e,u,l,c);for(let f=0,d=l;;f++){let h=f==O.length,p=h?c:O[f].from;if(p>d&&n.push(new yr(d,p,r.tree,-o,s.from>=d||s.openStart,s.to<=p||s.openEnd)),h)break;d=O[f].to}}else n.push(new yr(l,c,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let B4=0;class ni{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=B4++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof ni&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new ni(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new mO(e);return i=>i.modified.indexOf(n)>-1?i:mO.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let G4=0;class mO{constructor(e){this.name=e,this.instances=[],this.id=G4++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&F4(n,a.modified));if(i)return i;let r=[],s=new ni(e.name,r,e,n);for(let a of n)a.instances.push(s);let o=H4(n);for(let a of e.set)if(!a.modified.length)for(let l of o)r.push(mO.get(a,l));return s}}function F4(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function H4(t){let e=[[]];for(let n=0;ni.length-n.length)}function pa(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],o=2,a=r;for(let O=0;;){if(a=="..."&&O>0&&O+3==r.length){o=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+r);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),O+=f[0].length,O==r.length)break;let d=r[O++];if(O==r.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+r);a=r.slice(O)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+r);let u=new gO(i,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return Tx.add(e)}const Tx=new qe;class gO{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=r;for(let a of s)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:i}}function K4(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function J4(t,e,n,i=0,r=t.length){let s=new eU(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class eU{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:o,from:a,to:l}=e;if(a>=i||l<=n)return;o.isTop&&(s=this.highlighters.filter(d=>!d.scope||d.scope(o)));let c=r,u=tU(e)||gO.empty,O=K4(s,u.tags);if(O&&(c&&(c+=" "),c+=O,u.mode==1&&(r+=(r?" ":"")+O)),this.startSpan(Math.max(n,a),c),u.opaque)return;let f=e.tree&&e.tree.prop(qe.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+a,1),h=this.highlighters.filter($=>!$.scope||$.scope(f.tree.type)),p=e.firstChild();for(let $=0,g=a;;$++){let b=$=Q||!e.nextSibling())););if(!b||Q>i)break;g=b.to+a,g>n&&(this.highlightRange(d.cursor(),Math.max(n,b.from+a),Math.min(i,g),"",h),this.startSpan(Math.min(i,g),c))}p&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}}function tU(t){let e=t.type.prop(Tx);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ce=ni.define,su=ce(),Br=ce(),pb=ce(Br),mb=ce(Br),Gr=ce(),ou=ce(Gr),kd=ce(Gr),Xi=ce(),Ts=ce(Xi),ki=ce(),Ri=ce(),Cp=ce(),Xa=ce(Cp),au=ce(),k={comment:su,lineComment:ce(su),blockComment:ce(su),docComment:ce(su),name:Br,variableName:ce(Br),typeName:pb,tagName:ce(pb),propertyName:mb,attributeName:ce(mb),className:ce(Br),labelName:ce(Br),namespace:ce(Br),macroName:ce(Br),literal:Gr,string:ou,docString:ce(ou),character:ce(ou),attributeValue:ce(ou),number:kd,integer:ce(kd),float:ce(kd),bool:ce(Gr),regexp:ce(Gr),escape:ce(Gr),color:ce(Gr),url:ce(Gr),keyword:ki,self:ce(ki),null:ce(ki),atom:ce(ki),unit:ce(ki),modifier:ce(ki),operatorKeyword:ce(ki),controlKeyword:ce(ki),definitionKeyword:ce(ki),moduleKeyword:ce(ki),operator:Ri,derefOperator:ce(Ri),arithmeticOperator:ce(Ri),logicOperator:ce(Ri),bitwiseOperator:ce(Ri),compareOperator:ce(Ri),updateOperator:ce(Ri),definitionOperator:ce(Ri),typeOperator:ce(Ri),controlOperator:ce(Ri),punctuation:Cp,separator:ce(Cp),bracket:Xa,angleBracket:ce(Xa),squareBracket:ce(Xa),paren:ce(Xa),brace:ce(Xa),content:Xi,heading:Ts,heading1:ce(Ts),heading2:ce(Ts),heading3:ce(Ts),heading4:ce(Ts),heading5:ce(Ts),heading6:ce(Ts),contentSeparator:ce(Xi),list:ce(Xi),quote:ce(Xi),emphasis:ce(Xi),strong:ce(Xi),link:ce(Xi),monospace:ce(Xi),strikethrough:ce(Xi),inserted:ce(),deleted:ce(),changed:ce(),invalid:ce(),meta:au,documentMeta:ce(au),annotation:ce(au),processingInstruction:ce(au),definition:ni.defineModifier("definition"),constant:ni.defineModifier("constant"),function:ni.defineModifier("function"),standard:ni.defineModifier("standard"),local:ni.defineModifier("local"),special:ni.defineModifier("special")};for(let t in k){let e=k[t];e instanceof ni&&(e.name=t)}kx([{tag:k.link,class:"tok-link"},{tag:k.heading,class:"tok-heading"},{tag:k.emphasis,class:"tok-emphasis"},{tag:k.strong,class:"tok-strong"},{tag:k.keyword,class:"tok-keyword"},{tag:k.atom,class:"tok-atom"},{tag:k.bool,class:"tok-bool"},{tag:k.url,class:"tok-url"},{tag:k.labelName,class:"tok-labelName"},{tag:k.inserted,class:"tok-inserted"},{tag:k.deleted,class:"tok-deleted"},{tag:k.literal,class:"tok-literal"},{tag:k.string,class:"tok-string"},{tag:k.number,class:"tok-number"},{tag:[k.regexp,k.escape,k.special(k.string)],class:"tok-string2"},{tag:k.variableName,class:"tok-variableName"},{tag:k.local(k.variableName),class:"tok-variableName tok-local"},{tag:k.definition(k.variableName),class:"tok-variableName tok-definition"},{tag:k.special(k.variableName),class:"tok-variableName2"},{tag:k.definition(k.propertyName),class:"tok-propertyName tok-definition"},{tag:k.typeName,class:"tok-typeName"},{tag:k.namespace,class:"tok-namespace"},{tag:k.className,class:"tok-className"},{tag:k.macroName,class:"tok-macroName"},{tag:k.propertyName,class:"tok-propertyName"},{tag:k.operator,class:"tok-operator"},{tag:k.comment,class:"tok-comment"},{tag:k.meta,class:"tok-meta"},{tag:k.invalid,class:"tok-invalid"},{tag:k.punctuation,class:"tok-punctuation"}]);var Rd;const Po=new qe;function Rx(t){return me.define({combine:t?e=>e.concat(t):void 0})}const _g=new qe;class mi{constructor(e,n,i=[],r=""){this.data=e,this.name=r,De.prototype.hasOwnProperty("tree")||Object.defineProperty(De.prototype,"tree",{get(){return Pt(this)}}),this.parser=n,this.extension=[ps.of(this),De.languageData.of((s,o,a)=>{let l=gb(s,o,a),c=l.type.prop(Po);if(!c)return[];let u=s.facet(c),O=l.type.prop(_g);if(O){let f=l.resolve(o-l.from,a);for(let d of O)if(d.test(f,s)){let h=s.facet(d.facet);return d.type=="replace"?h:h.concat(u)}}return u})].concat(i)}isActiveAt(e,n,i=-1){return gb(e,n,i).type.prop(Po)==this.data}findRegions(e){let n=e.facet(ps);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Po)==this.data){i.push({from:o,to:o+s.length});return}let a=s.prop(qe.mounted);if(a){if(a.tree.prop(Po)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+s.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new hs(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Pt(t){let e=t.field(mi.state,!1);return e?e.tree:_t.empty}class nU{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Va=null;class $O{constructor(e,n,i=[],r,s,o,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new $O(e,n,[],_t.empty,0,i,[],null)}startParse(){return this.parser.startParse(new nU(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=_t.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(yr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Va;Va=this;try{return e()}finally{Va=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=$b(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,O,f)=>l.push({fromA:c,toA:u,fromB:O,toB:f})),i=yr.applyChanges(i,l),r=_t.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),O=e.mapPos(c.to,-1);ue.from&&(this.fragments=$b(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends xx{createParse(n,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let l=Va;if(l){for(let c of r)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new _t(xn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Va}}function $b(t,e,n){return yr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class ea{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new ea(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=$O.create(e.facet(ps).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new ea(i)}}mi.state=Ft.define({create:ea.init,update(t,e){for(let n of e.effects)if(n.is(mi.setState))return n.value;return e.startState.facet(ps)!=e.state.facet(ps)?ea.init(e.state):t.apply(e)}});let Cx=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Cx=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Cd=typeof navigator<"u"&&(!((Rd=navigator.scheduling)===null||Rd===void 0)&&Rd.isInputPending)?()=>navigator.scheduling.isInputPending():null,iU=Ct.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(mi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(mi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=Cx(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=s.context.work(()=>Cd&&Cd()||Date.now()>o,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:mi.setState.of(new ea(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>En(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ps=me.define({combine(t){return t.length?t[0]:null},enables:t=>[mi.state,iU,Oe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class dc{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const rU=me.define(),hc=me.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function QO(t){let e=t.facet(hc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Zl(t,e){let n="",i=t.tabSize,r=t.facet(hc)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s=e?sU(t,n,e):null}class Cf{constructor(e,n={}){this.state=e,this.options=n,this.unit=QO(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return ha(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ma=new qe;function sU(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let o=r;o&&!(o.fromi.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)i={node:s[o],next:i}}return Xx(i,t,n)}function Xx(t,e,n){for(let i=t;i;i=i.next){let r=aU(i.node);if(r)return r(wg.create(e,n,i))}return 0}function oU(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function aU(t){let e=t.type.prop(ma);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(qe.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>Ex(o,!0,1,void 0,s&&!oU(o)?r.from:void 0)}return t.parent==null?lU:null}function lU(){return 0}class wg extends Cf{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new wg(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(cU(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return Xx(this.context.next,this.base,this.pos)}}function cU(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function uU(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function Vx({closing:t,align:e=!0,units:n=1}){return i=>Ex(i,e,n,t)}function Ex(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=i&&s.slice(o,o+i.length)==i||r==t.pos+o,l=e?uU(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const OU=t=>t.baseIndent;function Ms({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const fU=200;function dU(){return De.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+fU)return t;let s=n.sliceString(r.from,i);if(!e.some(c=>c.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==a)continue;a=u.from;let O=xg(o,u.from);if(O==null)continue;let f=/^\s*/.exec(u.text)[0],d=Zl(o,O);f!=d&&l.push({from:u.from,to:u.from+f.length,insert:d})}return l.length?[t,{changes:l,sequential:!0}]:t})}const hU=me.define(),ga=new qe;function Tg(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&a.from=e&&c.to>n&&(s=c)}}return s}function mU(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function yO(t,e,n){for(let i of t.facet(hU)){let r=i(t,e,n);if(r)return r}return pU(t,e,n)}function Ax(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Xf=Ve.define({map:Ax}),pc=Ve.define({map:Ax});function qx(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Gs=Ft.define({create(){return xe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=Qb(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Xf)&&!gU(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(Yx),r=i?xe.replace({widget:new PU(i(e.state,n.value))}):yb;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(pc)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=Qb(t,e.selection.main.head)),t},provide:t=>Oe.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{re&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function bO(t,e,n){var i;let r=null;return(i=t.field(Gs,!1))===null||i===void 0||i.between(e,n,(s,o)=>{(!r||r.from>s)&&(r={from:s,to:o})}),r}function gU(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function Zx(t,e){return t.field(Gs,!1)?e:e.concat(Ve.appendConfig.of(Mx()))}const $U=t=>{for(let e of qx(t)){let n=yO(t.state,e.from,e.to);if(n)return t.dispatch({effects:Zx(t.state,[Xf.of(n),zx(t,n)])}),!0}return!1},QU=t=>{if(!t.state.field(Gs,!1))return!1;let e=[];for(let n of qx(t)){let i=bO(t.state,n.from,n.to);i&&e.push(pc.of(i),zx(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function zx(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Oe.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const yU=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Gs,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(pc.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},vU=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:$U},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:QU},{key:"Ctrl-Alt-[",run:yU},{key:"Ctrl-Alt-]",run:bU}],SU={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Yx=me.define({combine(t){return er(t,SU)}});function Mx(t){return[Gs,wU]}function Ix(t,e){let{state:n}=t,i=n.facet(Yx),r=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=bO(t.state,a.from,a.to);l&&t.dispatch({effects:pc.of(l)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const yb=xe.replace({widget:new class extends tr{toDOM(t){return Ix(t,null)}}});class PU extends tr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ix(e,this.value)}}const _U={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Xd extends Cr{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function xU(t={}){let e={..._U,...t},n=new Xd(e,!0),i=new Xd(e,!1),r=Ct.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(ps)!=o.state.facet(ps)||o.startState.field(Gs,!1)!=o.state.field(Gs,!1)||Pt(o.startState)!=Pt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new kr;for(let l of o.viewportLineBlocks){let c=bO(o.state,l.from,l.to)?i:yO(o.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:s}=e;return[r,P4({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(r))===null||a===void 0?void 0:a.markers)||Je.empty},initialSpacer(){return new Xd(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let c=bO(o.state,a.from,a.to);if(c)return o.dispatch({effects:pc.of(c)}),!0;let u=yO(o.state,a.from,a.to);return u?(o.dispatch({effects:Xf.of(u)}),!0):!1}}}),Mx()]}const wU=Oe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Vf{constructor(e,n){this.specs=e;let i;function r(a){let l=us.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof mi?a=>a.prop(Po)==o.data:o?a=>a==o:void 0,this.style=kx(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=i?new us(i):null,this.themeType=n.themeType}static define(e,n){return new Vf(e,n||{})}}const Xp=me.define(),Ux=me.define({combine(t){return t.length?[t[0]]:null}});function Vd(t){let e=t.facet(Xp);return e.length?e:t.facet(Ux)}function TU(t,e){let n=[RU],i;return t instanceof Vf&&(t.module&&n.push(Oe.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(Ux.of(t)):i?n.push(Xp.computeN([Oe.darkTheme],r=>r.facet(Oe.darkTheme)==(i=="dark")?[t]:[])):n.push(Xp.of(t)),n}class kU{constructor(e){this.markCache=Object.create(null),this.tree=Pt(e.state),this.decorations=this.buildDeco(e,Vd(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Pt(e.state),i=Vd(e.state),r=i!=Vd(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return xe.none;let i=new kr;for(let{from:r,to:s}of e.visibleRanges)J4(this.tree,n,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=xe.mark({class:l})))},r,s);return i.finish()}}const RU=Ss.high(Ct.fromClass(kU,{decorations:t=>t.decorations})),CU=Vf.define([{tag:k.meta,color:"#404740"},{tag:k.link,textDecoration:"underline"},{tag:k.heading,textDecoration:"underline",fontWeight:"bold"},{tag:k.emphasis,fontStyle:"italic"},{tag:k.strong,fontWeight:"bold"},{tag:k.strikethrough,textDecoration:"line-through"},{tag:k.keyword,color:"#708"},{tag:[k.atom,k.bool,k.url,k.contentSeparator,k.labelName],color:"#219"},{tag:[k.literal,k.inserted],color:"#164"},{tag:[k.string,k.deleted],color:"#a11"},{tag:[k.regexp,k.escape,k.special(k.string)],color:"#e40"},{tag:k.definition(k.variableName),color:"#00f"},{tag:k.local(k.variableName),color:"#30a"},{tag:[k.typeName,k.namespace],color:"#085"},{tag:k.className,color:"#167"},{tag:[k.special(k.variableName),k.macroName],color:"#256"},{tag:k.definition(k.propertyName),color:"#00c"},{tag:k.comment,color:"#940"},{tag:k.invalid,color:"#f00"}]),XU=Oe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Dx=1e4,Lx="()[]{}",Wx=me.define({combine(t){return er(t,{afterCursor:!0,brackets:Lx,maxScanDistance:Dx,renderMatch:AU})}}),VU=xe.mark({class:"cm-matchingBracket"}),EU=xe.mark({class:"cm-nonmatchingBracket"});function AU(t){let e=[],n=t.matched?VU:EU;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const qU=Ft.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(Wx);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Mi(e.state,r.head,-1,i)||r.head>0&&Mi(e.state,r.head-1,1,i)||i.afterCursor&&(Mi(e.state,r.head,1,i)||r.headOe.decorations.from(t)}),ZU=[qU,XU];function zU(t={}){return[Wx.of(t),ZU]}const kg=new qe;function Vp(t,e,n){let i=t.prop(e<0?qe.openedBy:qe.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function Ep(t){let e=t.type.prop(kg);return e?e(t.node):t}function Mi(t,e,n,i={}){let r=i.maxScanDistance||Dx,s=i.brackets||Lx,o=Pt(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=Vp(l.type,n,s);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return YU(t,e,n,l,u,c,s)}}return MU(t,e,n,o,a.type,r,s)}function YU(t,e,n,i,r,s,o){let a=i.parent,l={from:r.from,to:r.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do if(n<0?u.to<=i.from:u.from>=i.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),O=0;for(let f=0;!u.next().done&&f<=s;){let d=u.value;n<0&&(f+=d.length);let h=e+f*n;for(let p=n>0?0:d.length-1,$=n>0?d.length:-1;p!=$;p+=n){let g=o.indexOf(d[p]);if(!(g<0||i.resolveInner(h+p,1).type!=r))if(g%2==0==n>0)O++;else{if(O==1)return{start:c,end:{from:h+p,to:h+p+1},matched:g>>1==l>>1};O--}}n>0&&(f+=d.length)}return u.done?{start:c,matched:!1}:null}const IU=Object.create(null),bb=[xn.none],vb=[],Sb=Object.create(null),UU=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])UU[t]=DU(IU,e);function Ed(t,e){vb.indexOf(t)>-1||(vb.push(t),console.warn(e))}function DU(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||k[c];u?typeof u=="function"?l.length?l=l.map(u):Ed(c,`Modifier ${c} used at start of tag`):l.length?Ed(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Ed(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),s=Sb[r];if(s)return s.id;let o=Sb[r]=xn.define({id:bb.length,name:i,props:[pa({[i]:n})]});return bb.push(o),o.id}$t.RTL,$t.LTR;const LU=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=Cg(t.state,n.from);return i.line?WU(t):i.block?jU(t):!1};function Rg(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const WU=Rg(FU,0),NU=Rg(Nx,0),jU=Rg((t,e)=>Nx(t,e,GU(e)),0);function Cg(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Ea=50;function BU(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Ea,i),o=t.sliceDoc(r,r+Ea),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let u,O;r-i<=2*Ea?u=O=t.sliceDoc(i,r):(u=t.sliceDoc(i,i+Ea),O=t.sliceDoc(r-Ea,r));let f=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(O)[0].length,h=O.length-d-n.length;return u.slice(f,f+e.length)==e&&O.slice(h,h+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(O.charAt(h-1))?1:0}}:null}function GU(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function Nx(t,e,n=e.selection.ranges){let i=n.map(s=>Cg(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,o)=>BU(e,i[o],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let o=0,a;or&&(s==o||o>O.from)){r=O.from;let f=/^\s*/.exec(O.text)[0].length,d=f==O.length,h=O.text.slice(f,f+c.length)==c?f:-1;fs.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:O}of i)(O||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of i)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const Ap=Er.define(),HU=Er.define(),KU=me.define(),jx=me.define({combine(t){return er(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),Bx=Ft.define({create(){return Ii.empty},update(t,e){let n=e.state.facet(jx),i=e.annotation(Ap);if(i){let l=An.fromTransaction(e,i.selection),c=i.side,u=c==0?t.undone:t.done;return l?u=vO(u,u.length,n.minDepth,l):u=Hx(u,e.startState.selection),new Ii(c==0?i.rest:u,c==0?u:i.rest)}let r=e.annotation(HU);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(At.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=An.fromTransaction(e),o=e.annotation(At.time),a=e.annotation(At.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Ii(t.done.map(An.fromJSON),t.undone.map(An.fromJSON))}});function JU(t={}){return[Bx,jx.of(t),Oe.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?Gx:e.inputType=="historyRedo"?qp:null;return i?(e.preventDefault(),i(n)):!1}})]}function Ef(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(Bx,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const Gx=Ef(0,!1),qp=Ef(1,!1),eD=Ef(0,!0),tD=Ef(1,!0);class An{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new An(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new An(e.changes&&It.fromJSON(e.changes),[],e.mapped&&Wi.fromJSON(e.mapped),e.startSelection&&K.fromJSON(e.startSelection),e.selectionsAfter.map(K.fromJSON))}static fromTransaction(e,n){let i=ri;for(let r of e.startState.facet(KU)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new An(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,ri)}static selection(e){return new An(void 0,ri,void 0,void 0,e)}}function vO(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function nD(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,o,a)=>{for(let l=0;l=c&&o<=u&&(i=!0)}}),i}function iD(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function Fx(t,e){return t.length?e.length?t.concat(e):t:e}const ri=[],rD=200;function Hx(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-rD));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),vO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[An.selection([e])]}function sD(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Ad(t,e){if(!t.length)return t;let n=t.length,i=ri;for(;n;){let r=oD(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[An.selection(i)]:ri}function oD(t,e,n){let i=Fx(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):ri,n);if(!t.changes)return An.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new An(r,Ve.mapEffects(t.effects,e),o,t.startSelection.map(s),i)}const aD=/^(input\.type|delete)($|\.)/;class Ii{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Ii(this.done,this.undone):this}addChanges(e,n,i,r,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||aD.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):Af(n,e))}function pn(t){return t.textDirectionAt(t.state.selection.main.head)==$t.LTR}const Jx=t=>Kx(t,!pn(t)),ew=t=>Kx(t,pn(t));function tw(t,e){return _i(t,n=>n.empty?t.moveByGroup(n,e):Af(n,e))}const cD=t=>tw(t,!pn(t)),uD=t=>tw(t,pn(t));function OD(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function qf(t,e,n){let i=Pt(t).resolveInner(e.head),r=n?qe.closedBy:qe.openedBy;for(let l=e.head;;){let c=n?i.childAfter(l):i.childBefore(l);if(!c)break;OD(t,c,r)?i=c:l=n?c.to:c.from}let s=i.type.prop(r),o,a;return s&&(o=n?Mi(t,i.from,1):Mi(t,i.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?i.to:i.from,K.cursor(a,n?-1:1)}const fD=t=>_i(t,e=>qf(t.state,e,!pn(t))),dD=t=>_i(t,e=>qf(t.state,e,pn(t)));function nw(t,e){return _i(t,n=>{if(!n.empty)return Af(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const iw=t=>nw(t,!1),rw=t=>nw(t,!0);function sw(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):Af(o,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;o&&o.top>l&&o.bottomow(t,!1),Zp=t=>ow(t,!0);function Ps(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=K.cursor(i.from+s))}return r}const hD=t=>_i(t,e=>Ps(t,e,!0)),pD=t=>_i(t,e=>Ps(t,e,!1)),mD=t=>_i(t,e=>Ps(t,e,!pn(t))),gD=t=>_i(t,e=>Ps(t,e,pn(t))),$D=t=>_i(t,e=>K.cursor(t.lineBlockAt(e.head).from,1)),QD=t=>_i(t,e=>K.cursor(t.lineBlockAt(e.head).to,-1));function yD(t,e,n){let i=!1,r=$a(t.selection,s=>{let o=Mi(t,s.head,-1)||Mi(t,s.head,1)||s.head>0&&Mi(t,s.head-1,1)||s.headyD(t,e);function fi(t,e){let n=$a(t.state.selection,i=>{let r=e(i);return K.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(nr(t.state,n)),!0)}function aw(t,e){return fi(t,n=>t.moveByChar(n,e))}const lw=t=>aw(t,!pn(t)),cw=t=>aw(t,pn(t));function uw(t,e){return fi(t,n=>t.moveByGroup(n,e))}const vD=t=>uw(t,!pn(t)),SD=t=>uw(t,pn(t)),PD=t=>fi(t,e=>qf(t.state,e,!pn(t))),_D=t=>fi(t,e=>qf(t.state,e,pn(t)));function Ow(t,e){return fi(t,n=>t.moveVertically(n,e))}const fw=t=>Ow(t,!1),dw=t=>Ow(t,!0);function hw(t,e){return fi(t,n=>t.moveVertically(n,e,sw(t).height))}const _b=t=>hw(t,!1),xb=t=>hw(t,!0),xD=t=>fi(t,e=>Ps(t,e,!0)),wD=t=>fi(t,e=>Ps(t,e,!1)),TD=t=>fi(t,e=>Ps(t,e,!pn(t))),kD=t=>fi(t,e=>Ps(t,e,pn(t))),RD=t=>fi(t,e=>K.cursor(t.lineBlockAt(e.head).from)),CD=t=>fi(t,e=>K.cursor(t.lineBlockAt(e.head).to)),wb=({state:t,dispatch:e})=>(e(nr(t,{anchor:0})),!0),Tb=({state:t,dispatch:e})=>(e(nr(t,{anchor:t.doc.length})),!0),kb=({state:t,dispatch:e})=>(e(nr(t,{anchor:t.selection.main.anchor,head:0})),!0),Rb=({state:t,dispatch:e})=>(e(nr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),XD=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),VD=({state:t,dispatch:e})=>{let n=Zf(t).map(({from:i,to:r})=>K.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:K.create(n),userEvent:"select"})),!0},ED=({state:t,dispatch:e})=>{let n=$a(t.selection,i=>{let r=Pt(t),s=r.resolveStack(i.from,1);if(i.empty){let o=r.resolveStack(i.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&o.next)return K.range(a.to,a.from)}return i});return n.eq(t.selection)?!1:(e(nr(t,n)),!0)},AD=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=K.create([n.main]):n.main.empty||(i=K.create([K.cursor(n.main.head)])),i?(e(nr(t,i)),!0):!1};function mc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);lo&&(n="delete.forward",l=lu(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=lu(t,o,!1),a=lu(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:K.cursor(o,or(t)))i.between(e,e,(r,s)=>{re&&(e=n?s:r)});return e}const pw=(t,e,n)=>mc(t,i=>{let r=i.from,{state:s}=t,o=s.doc.lineAt(r),a,l;if(n&&!e&&r>o.from&&rpw(t,!1,!0),mw=t=>pw(t,!0,!1),gw=(t,e)=>mc(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=rn(s.text,i-s.from,e)+s.from,c=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||i!=n.head)&&(a=u),i=l}return i}),$w=t=>gw(t,!1),qD=t=>gw(t,!0),ZD=t=>mc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headmc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),YD=t=>mc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Fe.of(["",""])},range:K.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},ID=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),o=r==s.from?r-1:rn(s.text,r-s.from,!1)+s.from,a=r==s.to?r+1:rn(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(o,r))},range:K.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Zf(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function Qw(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of Zf(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)r.push(K.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)r.push(K.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:K.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const UD=({state:t,dispatch:e})=>Qw(t,e,!1),DD=({state:t,dispatch:e})=>Qw(t,e,!0);function yw(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of Zf(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const LD=({state:t,dispatch:e})=>yw(t,e,!1),WD=({state:t,dispatch:e})=>yw(t,e,!0),ND=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Zf(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(t.lineWrapping){let o=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function jD(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Pt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(qe.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Cb=bw(!1),BD=bw(!0);function bw(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,a=e.doc.lineAt(s),l=!t&&s==o&&jD(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Cf(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=xg(c,s);for(u==null&&(u=ha(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));oa.from&&s{let r=[];for(let o=i.from;o<=i.to;){let a=t.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),o=a.to+1}let s=t.changes(r);return{changes:r,range:K.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const GD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Cf(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),r=Xg(t,(s,o,a)=>{let l=xg(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=Zl(t,l);(c!=u||a.fromt.readOnly?!1:(e(t.update(Xg(t,(n,i)=>{i.push({from:n.from,insert:t.facet(hc)})}),{userEvent:"input.indent"})),!0),Sw=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Xg(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=ha(r,t.tabSize),o=0,a=Zl(t,Math.max(0,s-QO(t)));for(;o(t.setTabFocusMode(),!0),HD=[{key:"Ctrl-b",run:Jx,shift:lw,preventDefault:!0},{key:"Ctrl-f",run:ew,shift:cw},{key:"Ctrl-p",run:iw,shift:fw},{key:"Ctrl-n",run:rw,shift:dw},{key:"Ctrl-a",run:$D,shift:RD},{key:"Ctrl-e",run:QD,shift:CD},{key:"Ctrl-d",run:mw},{key:"Ctrl-h",run:zp},{key:"Ctrl-k",run:ZD},{key:"Ctrl-Alt-h",run:$w},{key:"Ctrl-o",run:MD},{key:"Ctrl-t",run:ID},{key:"Ctrl-v",run:Zp}],KD=[{key:"ArrowLeft",run:Jx,shift:lw,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:cD,shift:vD,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:mD,shift:TD,preventDefault:!0},{key:"ArrowRight",run:ew,shift:cw,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:uD,shift:SD,preventDefault:!0},{mac:"Cmd-ArrowRight",run:gD,shift:kD,preventDefault:!0},{key:"ArrowUp",run:iw,shift:fw,preventDefault:!0},{mac:"Cmd-ArrowUp",run:wb,shift:kb},{mac:"Ctrl-ArrowUp",run:Pb,shift:_b},{key:"ArrowDown",run:rw,shift:dw,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Tb,shift:Rb},{mac:"Ctrl-ArrowDown",run:Zp,shift:xb},{key:"PageUp",run:Pb,shift:_b},{key:"PageDown",run:Zp,shift:xb},{key:"Home",run:pD,shift:wD,preventDefault:!0},{key:"Mod-Home",run:wb,shift:kb},{key:"End",run:hD,shift:xD,preventDefault:!0},{key:"Mod-End",run:Tb,shift:Rb},{key:"Enter",run:Cb,shift:Cb},{key:"Mod-a",run:XD},{key:"Backspace",run:zp,shift:zp},{key:"Delete",run:mw},{key:"Mod-Backspace",mac:"Alt-Backspace",run:$w},{key:"Mod-Delete",mac:"Alt-Delete",run:qD},{mac:"Mod-Backspace",run:zD},{mac:"Mod-Delete",run:YD}].concat(HD.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),JD=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:fD,shift:PD},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:dD,shift:_D},{key:"Alt-ArrowUp",run:UD},{key:"Shift-Alt-ArrowUp",run:LD},{key:"Alt-ArrowDown",run:DD},{key:"Shift-Alt-ArrowDown",run:WD},{key:"Escape",run:AD},{key:"Mod-Enter",run:BD},{key:"Alt-l",mac:"Ctrl-l",run:VD},{key:"Mod-i",run:ED,preventDefault:!0},{key:"Mod-[",run:Sw},{key:"Mod-]",run:vw},{key:"Mod-Alt-\\",run:GD},{key:"Shift-Mod-k",run:ND},{key:"Shift-Mod-\\",run:bD},{key:"Mod-/",run:LU},{key:"Alt-A",run:NU},{key:"Ctrl-m",mac:"Shift-Alt-m",run:FD}].concat(KD),eL={key:"Tab",run:vw,shift:Sw},Xb=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ta{constructor(e,n,i=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?a=>s(Xb(a)):Xb,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Rn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=sg(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=qi(e);let r=this.normalize(n);if(r.length)for(let s=0,o=i;;s++){let a=r.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==r.length-1){if(l)return this.value=l,this;break}o==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=SO(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let a=new Zo(n,e.sliceString(n,i));return qd.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:s,from:o}=r;return o>n&&(s=e.sliceString(n,o)+s,o=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=SO(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Zo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(_w.prototype[Symbol.iterator]=xw.prototype[Symbol.iterator]=function(){return this});function tL(t){try{return new RegExp(t,Vg),!0}catch{return!1}}function SO(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Yp(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=lt("input",{class:"cm-textfield",name:"line",value:e}),i=lt("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:ol.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},lt("label",t.state.phrase("Go to line"),": ",n)," ",lt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),lt("button",{name:"close",onclick:()=>{t.dispatch({effects:ol.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,a=o.doc.lineAt(o.selection.main.head),[,l,c,u,O]=s,f=u?+u.slice(1):0,d=c?+c:a.number;if(c&&O){let $=d/100;l&&($=$*(l=="-"?-1:1)+a.number/o.doc.lines),d=Math.round(o.doc.lines*$)}else c&&l&&(d=d*(l=="-"?-1:1)+a.number);let h=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),p=K.cursor(h.from+Math.max(0,Math.min(f,h.length)));t.dispatch({effects:[ol.of(!1),Oe.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:i}}const ol=Ve.define(),Vb=Ft.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(ol)&&(t=n.value);return t},provide:t=>El.from(t,e=>e?Yp:null)}),nL=t=>{let e=Vl(t,Yp);if(!e){let n=[ol.of(!0)];t.state.field(Vb,!1)==null&&n.push(Ve.appendConfig.of([Vb,iL])),t.dispatch({effects:n}),e=Vl(t,Yp)}return e&&e.dom.querySelector("input").select(),!0},iL=Oe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),rL={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sL=me.define({combine(t){return er(t,rL,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function oL(t){return[OL,uL]}const aL=xe.mark({class:"cm-selectionMatch"}),lL=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Eb(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=vt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=vt.Word)}function cL(t,e,n,i){return t(e.sliceDoc(n,n+1))==vt.Word&&t(e.sliceDoc(i-1,i))==vt.Word}const uL=Ct.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(sL),{state:n}=t,i=n.selection;if(i.ranges.length>1)return xe.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return xe.none;let l=n.wordAt(r.head);if(!l)return xe.none;o=n.charCategorizer(r.head),s=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return xe.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),o=n.charCategorizer(r.head),!(Eb(o,n,r.from,r.to)&&cL(o,n,r.from,r.to)))return xe.none}else if(s=n.sliceDoc(r.from,r.to),!s)return xe.none}let a=[];for(let l of t.visibleRanges){let c=new ta(n.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:O}=c.value;if((!o||Eb(o,n,u,O))&&(r.empty&&u<=r.from&&O>=r.to?a.push(lL.range(u,O)):(u>=r.to||O<=r.from)&&a.push(aL.range(u,O)),a.length>e.maxMatches))return xe.none}}return xe.set(a)}},{decorations:t=>t.decorations}),OL=Oe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),fL=({state:t,dispatch:e})=>{let{selection:n}=t,i=K.create(n.ranges.map(r=>t.wordAt(r.head)||K.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function dL(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,a=new ta(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new ta(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const hL=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return fL({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=dL(t,i);return r?(e(t.update({selection:t.selection.addRange(K.range(r.from,r.to),!1),effects:Oe.scrollIntoView(r.to)})),!0):!1},Qa=me.define({combine(t){return er(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new xL(e),scrollToMatch:e=>Oe.scrollIntoView(e)})}});class ww{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||tL(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new $L(this):new mL(this)}getCursor(e,n=0,i){let r=e.doc?e:De.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?$o(this,r,n,i):go(this,r,n,i)}}class Tw{constructor(e){this.spec=e}}function go(t,e,n,i){return new ta(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?pL(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function pL(t,e){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=go(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function $o(t,e,n,i){return new _w(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?gL(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function PO(t,e){return t.slice(rn(t,e,!1),e)}function _O(t,e){return t.slice(e,rn(t,e))}function gL(t){return(e,n,i)=>!i[0].length||(t(PO(i.input,i.index))!=vt.Word||t(_O(i.input,i.index))!=vt.Word)&&(t(_O(i.input,i.index+i[0].length))!=vt.Word||t(PO(i.input,i.index+i[0].length))!=vt.Word)}class $L extends Tw{nextMatch(e,n,i){let r=$o(this.spec,e,i,e.doc.length).next();return r.done&&(r=$o(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),o=$o(this.spec,e,s,i),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=$o(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const zl=Ve.define(),Eg=Ve.define(),is=Ft.define({create(t){return new Zd(Mp(t).create(),null)},update(t,e){for(let n of e.effects)n.is(zl)?t=new Zd(n.value.create(),t.panel):n.is(Eg)&&(t=new Zd(t.query,n.value?Ag:null));return t},provide:t=>El.from(t,e=>e.panel)});class Zd{constructor(e,n){this.query=e,this.panel=n}}const QL=xe.mark({class:"cm-searchMatch"}),yL=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),bL=Ct.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(is))}update(t){let e=t.state.field(is);(e!=t.startState.field(is)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,i=new kr;for(let r=0,s=n.visibleRanges,o=s.length;rs[r+1].from-2*250;)l=s[++r].to;t.highlight(n.state,a,l,(c,u)=>{let O=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);i.add(c,u,O?yL:QL)})}return i.finish()}},{decorations:t=>t.decorations});function gc(t){return e=>{let n=e.state.field(is,!1);return n&&n.query.spec.valid?t(e,n):Cw(e)}}const xO=gc((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=K.single(i.from,i.to),s=t.state.facet(Qa);return t.dispatch({selection:r,effects:[qg(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),Rw(t),!0}),wO=gc((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=K.single(r.from,r.to),o=t.state.facet(Qa);return t.dispatch({selection:s,effects:[qg(t,r),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),Rw(t),!0}),vL=gc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:K.create(n.map(i=>K.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),SL=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],o=0;for(let a=new ta(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(o=s.length),s.push(K.range(a.value.from,a.value.to))}return e(t.update({selection:K.create(s,o),userEvent:"select.search.matches"})),!0},Ab=gc((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==i&&o.to==r&&(c=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(Oe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let O=t.state.changes(a);return o&&(l=K.single(o.from,o.to).map(O),u.push(qg(t,o)),u.push(n.facet(Qa).scrollToMatch(l.main,t))),t.dispatch({changes:O,selection:l,effects:u,userEvent:"input.replace"}),!0}),PL=gc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:o}=r;return{from:s,to:o,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Oe.announce.of(i),userEvent:"input.replace.all"}),!0});function Ag(t){return t.state.facet(Qa).createPanel(t)}function Mp(t,e){var n,i,r,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(Qa);return new ww({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:c.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function kw(t){let e=Vl(t,Ag);return e&&e.dom.querySelector("[main-field]")}function Rw(t){let e=kw(t);e&&e==t.root.activeElement&&e.select()}const Cw=t=>{let e=t.state.field(is,!1);if(e&&e.panel){let n=kw(t);if(n&&n!=t.root.activeElement){let i=Mp(t.state,e.query.spec);i.valid&&t.dispatch({effects:zl.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Eg.of(!0),e?zl.of(Mp(t.state,e.query.spec)):Ve.appendConfig.of(TL)]});return!0},Xw=t=>{let e=t.state.field(is,!1);if(!e||!e.panel)return!1;let n=Vl(t,Ag);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Eg.of(!1)}),!0},_L=[{key:"Mod-f",run:Cw,scope:"editor search-panel"},{key:"F3",run:xO,shift:wO,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:xO,shift:wO,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Xw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:SL},{key:"Mod-Alt-g",run:nL},{key:"Mod-d",run:hL,preventDefault:!0}];class xL{constructor(e){this.view=e;let n=this.query=e.state.field(is).query.spec;this.commit=this.commit.bind(this),this.searchField=lt("input",{value:n.search,placeholder:Mn(e,"Find"),"aria-label":Mn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=lt("input",{value:n.replace,placeholder:Mn(e,"Replace"),"aria-label":Mn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=lt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=lt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=lt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,o){return lt("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=lt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>xO(e),[Mn(e,"next")]),i("prev",()=>wO(e),[Mn(e,"previous")]),i("select",()=>vL(e),[Mn(e,"all")]),lt("label",null,[this.caseField,Mn(e,"match case")]),lt("label",null,[this.reField,Mn(e,"regexp")]),lt("label",null,[this.wordField,Mn(e,"by word")]),...e.state.readOnly?[]:[lt("br"),this.replaceField,i("replace",()=>Ab(e),[Mn(e,"replace")]),i("replaceAll",()=>PL(e),[Mn(e,"replace all")])],lt("button",{name:"close",onclick:()=>Xw(e),"aria-label":Mn(e,"close"),type:"button"},["×"])])}commit(){let e=new ww({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:zl.of(e)}))}keydown(e){X6(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?wO:xO)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Ab(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(zl)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Qa).top}}function Mn(t,e){return t.state.phrase(e)}const cu=30,uu=/[\s\.,:;?!]/;function qg(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-cu),o=Math.min(r,n+cu),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let l=0;la.length-cu;l--)if(!uu.test(a[l-1])&&uu.test(a[l])){a=a.slice(0,l);break}}return Oe.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const wL=Oe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),TL=[is,Ss.low(bL),wL];class Vw{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Pt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(Aw(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function qb(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function kL(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:kL(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function RL(t,e){return n=>{for(let i=Pt(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class Zb{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function Is(t){return t.selection.main.from}function Aw(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Zg=Er.define();function CL(t,e,n,i){let{main:r}=t.selection,s=n-r.from,o=i-r.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=r&&n!=i&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,i))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:i==r.from?a.to:a.from+o,insert:l},range:K.cursor(a.from+s+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const zb=new WeakMap;function XL(t){if(!Array.isArray(t))return t;let e=zb.get(t);return e||zb.set(t,e=Ew(t)),e}const TO=Ve.define(),Yl=Ve.define();class VL{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&v<=57||v>=97&&v<=122?2:v>=65&&v<=90?1:0:(S=sg(v))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!b||P==1&&$||y==0&&P!=0)&&(n[O]==v||i[O]==v&&(f=!0)?o[O++]=b:o.length&&(g=!1)),y=P,b+=qi(v)}return O==l&&o[0]==0&&g?this.result(-100+(f?-200:0),o,e):d==l&&h==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==l?this.ret(-900-e.length,[h,p]):O==l?this.result(-100+(f?-200:0)+-700+(g?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let o of n){let a=o+(this.astral?qi(Rn(i,o)):1);s&&r[s-1]==o?r[s-1]=a:(r[s++]=o,r[s++]=a)}return this.ret(e-i.length,r)}}class EL{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:AL,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>Yb(e(i),n(i)),optionClass:(e,n)=>i=>Yb(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function Yb(t,e){return t?e?t+" "+e:t:e}function AL(t,e,n,i,r,s){let o=t.textDirection==$t.RTL,a=o,l=!1,c="top",u,O,f=e.left-r.left,d=r.right-e.right,h=i.right-i.left,p=i.bottom-i.top;if(a&&f=p||b>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let $=(e.bottom-e.top)/s.offsetHeight,g=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/$}px; max-width: ${O/g}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function qL(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;cl&&o.appendChild(document.createTextNode(a.slice(l,u)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(u,O))),f.className="cm-completionMatchedText",l=O}return ln.position-i.position).map(n=>n.render)}function zd(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class ZL{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:o}=r.open,a=e.state.facet(Gt);this.optionContent=qL(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=zd(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,O;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(O=/-(\d+)$/.exec(u.id))&&+O[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Gt).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Yl.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:o,disabled:a}=i.open;(!r.open||r.open.options!=s)&&(this.range=zd(s.length,o,e.state.facet(Gt).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=zd(n.options.length,n.selected,this.view.state.facet(Gt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>En(this.view.state,o,"completion info")):this.addInfoPane(s,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&YL(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom{o.target==r&&o.preventDefault()});let s=null;for(let o=i.from;oi.from||i.from==0))if(s=f,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}const u=r.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let O=this.optionClass(a);O&&(u.className=O);for(let f of this.optionContent){let d=f(a,this.view.state,this.view,l);d&&u.appendChild(d)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew ZL(n,t,e)}function YL(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function Mb(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function ML(t,e){let n=[],i=null,r=c=>{n.push(c);let{section:u}=c.completion;if(u){i||(i=[]);let O=typeof u=="string"?u:u.name;i.some(f=>f.name==O)||i.push(typeof u=="string"?{name:O}:u)}},s=e.facet(Gt);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let O of c.result.options)r(new Zb(O,c.source,u?u(O):[],1e9-n.length));else{let O=e.sliceDoc(c.from,c.to),f,d=s.filterStrict?new EL(O):new VL(O);for(let h of c.result.options)if(f=d.match(h.label)){let p=h.displayLabel?u?u(h,f.matched):[]:f.matched;r(new Zb(h,c.source,p,f.score+(h.boost||0)))}}}if(i){let c=Object.create(null),u=0,O=(f,d)=>{var h,p;return((h=f.rank)!==null&&h!==void 0?h:1e9)-((p=d.rank)!==null&&p!==void 0?p:1e9)||(f.nameO.score-u.score||l(u.completion,O.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(c):Mb(c.completion)>Mb(a)&&(o[o.length-1]=c),a=c.completion}return o}class _o{constructor(e,n,i,r,s,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new _o(this.options,Ib(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,o){if(r&&!o&&e.some(c=>c.isPending))return r.setDisabled();let a=ML(e,n);if(!a.length)return r&&e.some(c=>c.isPending)?r.setDisabled():null;let l=n.facet(Gt).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let c=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:NL,above:s.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new _o(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new _o(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class kO{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new kO(LL,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Gt),s=(i.override||n.languageDataAt("autocomplete",Is(n)).map(XL)).map(l=>(this.active.find(u=>u.source==l)||new si(l,this.active.some(u=>u.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((l,c)=>l==this.active[c])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(zg));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!IL(s,this.active)||a?o=_o.build(s,n,this.id,o,i,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new si(l.source,0):l));for(let l of e.effects)l.is(Zw)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new kO(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?UL:DL}}function IL(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const LL=[];function qw(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(Zg);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class si{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=qw(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new si(r.source,0)),i&4&&r.state==0&&(r=new si(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(TO))r=new si(r.source,1,s.value);else if(s.is(Yl))r=new si(r.source,0);else if(s.is(zg))for(let o of s.value)o.source==r.source&&(r=o);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Is(e.state))}}class zo extends si{constructor(e,n,i,r,s,o){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Is(e.state);if(a>o||!r||n&2&&(Is(e.startState)==this.from||an.map(e))}}),Zw=Ve.define(),Xn=Ft.define({create(){return kO.start()},update(t,e){return t.update(e)},provide:t=>[yg.from(t,e=>e.tooltip),Oe.contentAttributes.from(t,e=>e.attrs)]});function Yg(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Xn).active.find(r=>r.source==e.source);return i instanceof zo?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},CL(t.state,n,i.from,i.to)),{annotations:Zg.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const NL=zL(Xn,Yg);function Ou(t,e="option"){return n=>{let i=n.state.field(Xn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:Zw.of(a)}),!0}}const jL=t=>{let e=t.state.field(Xn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Xn,!1)?(t.dispatch({effects:TO.of(!0)}),!0):!1,BL=t=>{let e=t.state.field(Xn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Yl.of(null)}),!0)};class GL{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const FL=50,HL=1e3,KL=Ct.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Xn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Xn),n=t.state.facet(Gt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Xn)==e)return;let i=t.transactions.some(s=>{let o=qw(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;sFL&&Date.now()-o.time>HL){for(let a of o.context.abortListeners)try{a()}catch(l){En(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(TO)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Xn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Is(e),i=new Vw(e,n,t.explicit,this.view),r=new GL(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Yl.of(null)}),En(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Gt),i=this.view.state.field(Xn);for(let r=0;ra.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new si(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:zg.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Xn,!1);if(e&&e.tooltip&&this.view.state.facet(Gt).closeOnBlur){let n=e.open&&gx(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Yl.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:TO.of(!1)}),20),this.composing=0}}}),JL=typeof navigator=="object"&&/Win/.test(navigator.platform),eW=Ss.highest(Oe.domEventHandlers({keydown(t,e){let n=e.state.field(Xn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(JL&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(o=>o.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&Yg(e,i),!1}})),zw=Oe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class tW{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class Mg{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,nn.TrackDel),i=e.mapPos(this.to,1,nn.TrackDel);return n==null||i==null?null:new Mg(this.field,n,i)}}class Ig{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(i.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let O=0;Onew Mg(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,O=>O[1]);for(let O=0;O=c&&f.field++}r.push(new tW(c,i.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of r)u.line==i.length&&u.from>c&&(u.from--,u.to--);return l}),i.push(o)}return new Ig(i,r)}}let nW=xe.widget({widget:new class extends tr{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),iW=xe.mark({class:"cm-snippetField"});class ya{constructor(e,n){this.ranges=e,this.active=n,this.deco=xe.set(e.map(i=>(i.from==i.to?nW:iW).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new ya(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const $c=Ve.define({map(t,e){return t&&t.map(e)}}),rW=Ve.define(),Ml=Ft.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is($c))return n.value;if(n.is(rW)&&t)return new ya(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Oe.decorations.from(t,e=>e?e.deco:xe.none)});function Ug(t,e){return K.create(t.filter(n=>n.field==e).map(n=>K.range(n.from,n.to)))}function sW(t){let e=Ig.parse(t);return(n,i,r,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,r),{main:l}=n.state.selection,c={changes:{from:r,to:s==l.from?l.to:s,insert:Fe.of(o)},scrollIntoView:!0,annotations:i?[Zg.of(i),At.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=Ug(a,0)),a.some(u=>u.field>0)){let u=new ya(a,0),O=c.effects=[$c.of(u)];n.state.field(Ml,!1)===void 0&&O.push(Ve.appendConfig.of([Ml,uW,OW,zw]))}n.dispatch(n.state.update(c))}}function Yw(t){return({state:e,dispatch:n})=>{let i=e.field(Ml,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(o=>o.field==r+t);return n(e.update({selection:Ug(i.ranges,r),effects:$c.of(s?null:new ya(i.ranges,r)),scrollIntoView:!0})),!0}}const oW=({state:t,dispatch:e})=>t.field(Ml,!1)?(e(t.update({effects:$c.of(null)})),!0):!1,aW=Yw(1),lW=Yw(-1),cW=[{key:"Tab",run:aW,shift:lW},{key:"Escape",run:oW}],Db=me.define({combine(t){return t.length?t[0]:cW}}),uW=Ss.highest(Oc.compute([Db],t=>t.facet(Db)));function wn(t,e){return Object.assign(Object.assign({},e),{apply:sW(t)})}const OW=Oe.domEventHandlers({mousedown(t,e){let n=e.state.field(Ml,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:Ug(n.ranges,r.field),effects:$c.of(n.ranges.some(s=>s.field>r.field)?new ya(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Il={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},As=Ve.define({map(t,e){let n=e.mapPos(t,-1,nn.TrackAfter);return n??void 0}}),Dg=new class extends Ws{};Dg.startSide=1;Dg.endSide=-1;const Mw=Ft.define({create(){return Je.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(As)&&(t=t.update({add:[Dg.range(n.value,n.value+1)]}));return t}});function fW(){return[hW,Mw]}const Yd="()[]{}<>«»»«[]{}";function Iw(t){for(let e=0;e{if((dW?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&qi(Rn(i,0))==1||e!=r.from||n!=r.to)return!1;let s=gW(t.state,i);return s?(t.dispatch(s),!0):!1}),pW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Uw(t,t.selection.main.head).brackets||Il.brackets,r=null,s=t.changeByRange(o=>{if(o.empty){let a=$W(t.doc,o.head);for(let l of i)if(l==a&&zf(t.doc,o.head)==Iw(Rn(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:K.cursor(o.head-l.length)}}return{range:r=o}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},mW=[{key:"Backspace",run:pW}];function gW(t,e){let n=Uw(t,t.selection.main.head),i=n.brackets||Il.brackets;for(let r of i){let s=Iw(Rn(r,0));if(e==r)return s==r?bW(t,r,i.indexOf(r+r+r)>-1,n):QW(t,r,s,n.before||Il.before);if(e==s&&Dw(t,t.selection.main.from))return yW(t,r,s)}return null}function Dw(t,e){let n=!1;return t.field(Mw).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function zf(t,e){let n=t.sliceString(e,e+2);return n.slice(0,qi(Rn(n,0)))}function $W(t,e){let n=t.sliceString(e-2,e);return qi(Rn(n,0))==n.length?n:n.slice(1)}function QW(t,e,n,i){let r=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:As.of(o.to+e.length),range:K.range(o.anchor+e.length,o.head+e.length)};let a=zf(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:As.of(o.head+e.length),range:K.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function yW(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&zf(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:K.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function bW(t,e,n,i){let r=i.stringPrefixes||Il.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:As.of(a.to+e.length),range:K.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=zf(t.doc,l),u;if(c==e){if(Lb(t,l))return{changes:{insert:e+e,from:l},effects:As.of(l+e.length),range:K.cursor(l+e.length)};if(Dw(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:K.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Wb(t,l-2*e.length,r))>-1&&Lb(t,u))return{changes:{insert:e+e+e+e,from:l},effects:As.of(l+e.length),range:K.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=vt.Word&&Wb(t,l,r)>-1&&!vW(t,l,e,r))return{changes:{insert:e+e,from:l},effects:As.of(l+e.length),range:K.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Lb(t,e){let n=Pt(t).resolveInner(e+1);return n.parent&&n.from==e}function vW(t,e,n,i){let r=Pt(t).resolveInner(e,-1),s=i.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let u=r.firstChild;for(;u&&u.from==r.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=r.to==e&&r.parent;if(!c)break;r=c}return!1}function Wb(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=vt.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=vt.Word)return s}return-1}function SW(t={}){return[eW,Xn,Gt.of(t),KL,PW,zw]}const Lw=[{key:"Ctrl-Space",run:Ub},{mac:"Alt-`",run:Ub},{key:"Escape",run:BL},{key:"ArrowDown",run:Ou(!0)},{key:"ArrowUp",run:Ou(!1)},{key:"PageDown",run:Ou(!0,"page")},{key:"PageUp",run:Ou(!1,"page")},{key:"Enter",run:jL}],PW=Ss.highest(Oc.computeN([Gt],t=>t.facet(Gt).defaultKeymap?[Lw]:[]));class Nb{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Cs{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(Ul).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((u,O)=>u.from-O.from||u.to-O.to),o=new kr,a=[],l=0;for(let u=0;;){let O=u==s.length?null:s[u];if(!O&&!a.length)break;let f,d;for(a.length?(f=l,d=a.reduce((p,$)=>Math.min(p,$.to),O&&O.from>f?O.from:1e8)):(f=O.from,d=O.to,a.push(O),u++);up.from||p.to==f))a.push(p),u++,d=Math.min(p.to,d);else{d=Math.min(p.from,d);break}}let h=ZW(a);if(a.some(p=>p.from==p.to||p.from==p.to-1&&i.doc.lineAt(p.from).to==p.from))o.add(f,f,xe.widget({widget:new VW(h),diagnostics:a.slice()}));else{let p=a.reduce(($,g)=>g.markClass?$+" "+g.markClass:$,"");o.add(f,d,xe.mark({class:"cm-lintRange cm-lintRange-"+h+p,diagnostics:a.slice(),inclusiveEnd:a.some($=>$.to>d)}))}l=d;for(let p=0;p{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new Nb(r,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Nb(i.from,s,i.diagnostic)}}),i}function _W(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(Ul).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(Ww))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function xW(t,e){return t.field(Nn,!1)?e:e.concat(Ve.appendConfig.of(zW))}const Ww=Ve.define(),Lg=Ve.define(),Nw=Ve.define(),Nn=Ft.define({create(){return new Cs(xe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=na(n,t.selected.diagnostic,s)||na(n,null,s)}!n.size&&r&&e.state.facet(Ul).autoPanel&&(r=null),t=new Cs(n,r,i)}for(let n of e.effects)if(n.is(Ww)){let i=e.state.facet(Ul).autoPanel?n.value.length?Dl.open:null:t.panel;t=Cs.init(n.value,i,e.state)}else n.is(Lg)?t=new Cs(t.diagnostics,n.value?Dl.open:null,t.selected):n.is(Nw)&&(t=new Cs(t.diagnostics,t.panel,n.value));return t},provide:t=>[El.from(t,e=>e.panel),Oe.decorations.from(t,e=>e.diagnostics)]}),wW=xe.mark({class:"cm-lintRange cm-lintRange-active"});function TW(t,e,n){let{diagnostics:i}=t.state.field(Nn),r,s=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(eBw(t,n,!1)))}const RW=t=>{let e=t.state.field(Nn,!1);(!e||!e.panel)&&t.dispatch({effects:xW(t.state,[Lg.of(!0)])});let n=Vl(t,Dl.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},jb=t=>{let e=t.state.field(Nn,!1);return!e||!e.panel?!1:(t.dispatch({effects:Lg.of(!1)}),!0)},CW=t=>{let e=t.state.field(Nn,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},XW=[{key:"Mod-Shift-m",run:RW,preventDefault:!0},{key:"F8",run:CW}],Ul=me.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},er(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function jw(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function Bw(t,e,n){var i;let r=n?jw(e.actions):[];return lt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},lt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let a=!1,l=f=>{if(f.preventDefault(),a)return;a=!0;let d=na(t.state.field(Nn).diagnostics,e);d&&s.apply(t,d.from,d.to)},{name:c}=s,u=r[o]?c.indexOf(r[o]):-1,O=u<0?c:[c.slice(0,u),lt("u",c.slice(u,u+1)),c.slice(u+1)];return lt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${r[o]})"`}.`},O)}),e.source&<("div",{class:"cm-diagnosticSource"},e.source))}class VW extends tr{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return lt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Bb{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Bw(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Dl{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)jb(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=jw(s.actions);for(let a=0;a{for(let s=0;sjb(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Nn).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let O=-1,f;for(let d=i;di&&(this.items.splice(i,O-i),r=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++}});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let c=l.height/this.list.offsetHeight;a.topl.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Nn),i=na(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Nw.of(i)})}static open(e){return new Dl(e)}}function EW(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function fu(t){return EW(``,'width="6" height="3"')}const AW=Oe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:fu("#d11")},".cm-lintRange-warning":{backgroundImage:fu("orange")},".cm-lintRange-info":{backgroundImage:fu("#999")},".cm-lintRange-hint":{backgroundImage:fu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function qW(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function ZW(t){let e="hint",n=1;for(let i of t){let r=qW(i.severity);r>n&&(n=r,e=i.severity)}return e}const zW=[Nn,Oe.decorations.compute([Nn],t=>{let{selected:e,panel:n}=t.field(Nn);return!e||!n||e.from==e.to?xe.none:xe.set([wW.range(e.from,e.to)])}),y4(TW,{hideOn:_W}),AW],YW=[C4(),E4(),G6(),JU(),xU(),z6(),D6(),De.allowMultipleSelections.of(!0),dU(),TU(CU,{fallback:!0}),zU(),fW(),SW(),c4(),f4(),t4(),oL(),Oc.of([...mW,...JD,..._L,...lD,...vU,...Lw,...XW])];/*! +`){[e,n]=Go(this,e,n);let r="";for(let s=0,o=0;se&&s&&(r+=i),eo&&(r+=a.sliceString(e-o,n-o,i)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ai))return 0;let i=0,[r,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==a)return i;let l=this.children[r],c=e.children[s];if(l!=c)return i+l.scanIdentical(c,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let h of e)h.flatten(d);return new Rt(d,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,a=[],l=0,c=-1,u=[];function O(d){let h;if(d.lines>s&&d instanceof Ai)for(let p of d.children)O(p);else d.lines>o&&(l>o||!l)?(f(),a.push(d)):d instanceof Rt&&l&&(h=u[u.length-1])instanceof Rt&&d.lines+h.lines<=32?(l+=d.lines,c+=d.length+1,u[u.length-1]=new Rt(h.text.concat(d.text),h.length+1+d.length)):(l+d.lines>r&&f(),l+=d.lines,c+=d.length+1,u.push(d))}function f(){l!=0&&(a.push(u.length==1?u[0]:Ai.from(u,c)),c=-1,l=u.length=0)}for(let d of e)O(d);return f(),a.length==1?a[0]:new Ai(a,n)}}Fe.empty=new Rt([""],0);function zM(t){let e=-1;for(let n of t)e+=n.length+1;return e}function bu(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof Rt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,a=r instanceof Rt?r.text.length:r.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof Rt){let l=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Rt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class e_{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new tl(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class t_{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Fe.prototype[Symbol.iterator]=function(){return this.iter()},tl.prototype[Symbol.iterator]=e_.prototype[Symbol.iterator]=t_.prototype[Symbol.iterator]=function(){return this});class YM{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}function Go(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function rn(t,e,n=!0,i=!0){return qM(t,e,n,i)}function MM(t){return t>=56320&&t<57344}function IM(t){return t>=55296&&t<56320}function Rn(t,e){let n=t.charCodeAt(e);if(!IM(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return MM(i)?(n-55296<<10)+(i-56320)+65536:n}function sg(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function qi(t){return t<65536?1:2}const Bh=/\r\n?|\n/;var nn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(nn||(nn={}));class Wi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return s+(e-r);s+=a}else{if(i!=nn.Simple&&c>=e&&(i==nn.TrackDel&&re||i==nn.TrackBefore&&re))return null;if(c>e||c==e&&n<0&&!a)return e==r||n<0?s:s+l;s+=l}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&a>=e)return rn?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Wi(e)}static create(e){return new Wi(e)}}class It extends Wi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Gh(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return Fh(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=a,n[r+1]=o;let l=r>>1;for(;i.length0&&Jr(i,n,s.text),s.forward(u),a+=u}let c=e[o++];for(;a>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!r.length)return;of||O<0||f>n)throw new RangeError(`Invalid change range ${O} to ${f} (in doc of length ${n})`);let h=d?typeof d=="string"?Fe.of(d.split(i||Bh)):d:Fe.empty,p=h.length;if(O==f&&p==0)return;Oo&&cn(r,O-o,-1),cn(r,f-O,p),Jr(s,r,h),o=f}}return c(e),l(!a),a}static empty(e){return new It(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ra&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Jr(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(r,c,s,u,O),r=c,s=u}}}function Fh(t,e,n,i=!1){let r=[],s=i?[]:null,o=new wl(t),a=new wl(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);cn(r,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len=0&&l=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let O=Math.min(u,a.len);c+=O,u-=O,a.forward(O)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||i.length>c),s.forward2(l),o.forward(l)}}}}class wl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Fe.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Fe.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Es{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Es(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return K.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return K.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return K.range(e.anchor,e.head)}static create(e,n,i){return new Es(e,n,i)}}class K{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:K.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new K(e.ranges.map(n=>Es.fromJSON(n)),e.main)}static single(e,n=e){return new K([K.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;rs.head?K.range(l,a):K.range(a,l))}}return new K(e,n)}}function i_(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let og=0;class ge{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=og++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new ge(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:ag),!!e.static,e.enables)}of(e){return new vu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vu(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function ag(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class vu{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=og++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let O of this.dependencies)O=="doc"?l=!0:O=="selection"?c=!0:(((n=e[O.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[O.id]);return{create(O){return O.values[o]=i(O),1},update(O,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||Hh(O,u)){let d=i(O);if(a?!ay(d,O.values[o],r):!r(d,O.values[o]))return O.values[o]=d,1}return 0},reconfigure:(O,f)=>{let d,h=f.config.address[s];if(h!=null){let p=lO(f,h);if(this.dependencies.every($=>$ instanceof ge?f.facet($)===O.facet($):$ instanceof Ft?f.field($,!1)==O.field($,!1):!0)||(a?ay(d=i(O),p,r):r(d=i(O),p)))return O.values[o]=p,0}else d=i(O);return O.values[o]=d,1}}}}function ay(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;ui===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Lc).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[n]=o,1)},reconfigure:(i,r)=>{let s=i.facet(Lc),o=r.facet(Lc),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(i.values[n]=a.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,Lc.of({field:this,create:e})]}get extension(){return this}}const Rs={lowest:4,low:3,default:2,high:1,highest:0};function ka(t){return e=>new r_(e,t)}const Ss={highest:ka(Rs.highest),high:ka(Rs.high),default:ka(Rs.default),low:ka(Rs.low),lowest:ka(Rs.lowest)};class r_{constructor(e,n){this.inner=e,this.prec=n}}class ac{of(e){return new Kh(this,e)}reconfigure(e){return ac.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Kh{constructor(e,n){this.compartment=e,this.inner=n}}class aO{constructor(e,n,i,r,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],s=Object.create(null),o=new Map;for(let f of DM(e,n,o))f instanceof Ft?r.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],c=[];for(let f of r)a[f.id]=c.length<<1,c.push(d=>f.slot(d));let u=i==null?void 0:i.config.facets;for(let f in s){let d=s[f],h=d[0].facet,p=u&&u[f]||[];if(d.every($=>$.type==0))if(a[h.id]=l.length<<1|1,ag(p,d))l.push(i.facet(h));else{let $=h.combine(d.map(g=>g.value));l.push(i&&h.compare($,i.facet(h))?i.facet(h):$)}else{for(let $ of d)$.type==0?(a[$.id]=l.length<<1|1,l.push($.value)):(a[$.id]=c.length<<1,c.push(g=>$.dynamicSlot(g)));a[h.id]=c.length<<1,c.push($=>UM($,h,d))}}let O=c.map(f=>f(a));return new aO(e,o,O,a,l,s)}}function DM(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(o,a){let l=r.get(o);if(l!=null){if(l<=a)return;let c=i[l].indexOf(o);c>-1&&i[l].splice(c,1),o instanceof Kh&&n.delete(o.compartment)}if(r.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Kh){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,a)}else if(o instanceof r_)s(o.inner,o.prec);else if(o instanceof Ft)i[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof vu)i[a].push(o),o.facet.extensions&&s(o.facet.extensions,Rs.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(t,Rs.default),i.reduce((o,a)=>o.concat(a))}function nl(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function lO(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const s_=ge.define(),Jh=ge.define({combine:t=>t.some(e=>e),static:!0}),o_=ge.define({combine:t=>t.length?t[0]:void 0,static:!0}),a_=ge.define(),l_=ge.define(),c_=ge.define(),u_=ge.define({combine:t=>t.length?t[0]:!1});class Er{constructor(e,n){this.type=e,this.value=n}static define(){return new LM}}class LM{of(e){return new Er(this,e)}}class WM{constructor(e){this.map=e}of(e){return new Ve(this,e)}}class Ve{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ve(this.type,n)}is(e){return this.type==e}static define(e={}){return new WM(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}Ve.reconfigure=Ve.define();Ve.appendConfig=Ve.define();class At{constructor(e,n,i,r,s,o){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&i_(i,n.newLength),s.some(a=>a.type==At.time)||(this.annotations=s.concat(At.time.of(Date.now())))}static create(e,n,i,r,s,o){return new At(e,n,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(At.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}At.time=Er.define();At.userEvent=Er.define();At.addToHistory=Er.define();At.remote=Er.define();function NM(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i=t[i]))s=t[i++],o=t[i++];else if(r=0;r--){let s=i[r](t);s instanceof At?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof At?t=s[0]:t=f_(e,Eo(s),!1)}return t}function BM(t){let e=t.startState,n=e.facet(c_),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=O_(i,ep(e,s,t.changes.newLength),!0))}return i==t?t:At.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const GM=[];function Eo(t){return t==null?GM:Array.isArray(t)?t:[t]}var vt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(vt||(vt={}));const FM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let tp;try{tp=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function HM(t){if(tp)return tp.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||FM.test(n)))return!0}return!1}function KM(t){return e=>{if(!/\S/.test(e))return vt.Space;if(HM(e))return vt.Word;for(let n=0;n-1)return vt.Word;return vt.Other}}class De{constructor(e,n,i,r,s,o){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;ar.set(c,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(Ve.reconfigure)?(n=null,i=a.value):a.is(Ve.appendConfig)&&(n=null,i=Eo(i).concat(a.value));let s;n?s=e.startState.values.slice():(n=aO.resolve(i,r,this),s=new De(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Jh)?e.newSelection:e.newSelection.asSingle();new De(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:K.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Eo(i.effects);for(let a=1;ao.spec.fromJSON(a,l)))}}return De.create({doc:e.doc,selection:K.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=aO.resolve(e.extensions||[],new Map),i=e.doc instanceof Fe?e.doc:Fe.of((e.doc||"").split(n.staticFacet(De.lineSeparator)||Bh)),r=e.selection?e.selection instanceof K?e.selection:K.single(e.selection.anchor,e.selection.head):K.single(0);return i_(r,i.length),n.staticFacet(Jh)||(r=r.asSingle()),new De(n,i,r,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(De.tabSize)}get lineBreak(){return this.facet(De.lineSeparator)||` +`}get readOnly(){return this.facet(u_)}phrase(e,...n){for(let i of this.facet(De.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(s_))for(let o of s(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return KM(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=rn(n,o,!1);if(s(n.slice(l,o))!=vt.Word)break;o=l}for(;at.length?t[0]:4});De.lineSeparator=o_;De.readOnly=u_;De.phrases=ge.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});De.languageData=s_;De.changeFilter=a_;De.transactionFilter=l_;De.transactionExtender=c_;ac.reconfigure=Ve.define();function er(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],a=i[s];if(a===void 0)i[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Ws{eq(e){return this==e}range(e,n=e){return np.create(e,n,this)}}Ws.prototype.startSide=Ws.prototype.endSide=0;Ws.prototype.point=!1;Ws.prototype.mapMode=nn.TrackDel;let np=class d_{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new d_(e,n,i)}};function ip(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class lg{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let o=r,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,s);sd||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(o<0&&(o=f),c.point&&(a=Math.max(a,d-f)),i.push(c),r.push(f-o),s.push(d-o))}return{mapped:i.length?new lg(r,s,i,a):null,pos:o}}}class Je{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new Je(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(ip)),this.isEmpty)return n.length?Je.of(n):this;let a=new h_(this,null,-1).goto(0),l=0,c=[],u=new kr;for(;a.value||l=0){let O=n[l++];u.addInner(O.from,O.to,O.value)||c.push(O)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||sa.to||s=s&&e<=s+o.length&&o.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Tl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Tl.from(e).goto(n)}static compare(e,n,i,r,s=-1){let o=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),a=n.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),l=ly(o,a,i),c=new Ra(o,l,s),u=new Ra(a,l,s);i.iterGaps((O,f,d)=>cy(c,O,u,f,d,r)),i.empty&&i.length==0&&cy(c,0,u,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=ly(s,o),l=new Ra(s,a,0).goto(i),c=new Ra(o,a,0).goto(i);for(;;){if(l.to!=c.to||!rp(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}static spans(e,n,i,r,s=-1){let o=new Ra(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let u=o.activeForPoint(o.to),O=o.pointFroma&&(r.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,n=!1){let i=new kr;for(let r of e instanceof np?[e]:n?JM(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return Je.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=Je.empty;r=r.nextLayer)n=new Je(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}Je.empty=new Je([],[],null,-1);function JM(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(ip);e=i}return t}Je.empty.nextLayer=Je.empty;class kr{finishChunk(e){this.chunks.push(new lg(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new kr)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Je.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Je.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function ly(t,e,n){let i=new Map;for(let s of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new h_(o,n,i,s));return r.length==1?r[0]:new Tl(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)gd(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)gd(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),gd(this.heap,0)}}}function gd(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Ra{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Tl.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Wc(this.active,e),Wc(this.activeTo,e),Wc(this.activeRank,e),this.minActive=uy(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;Nc(this.active,n,i),Nc(this.activeTo,n,r),Nc(this.activeRank,n,s),e&&Nc(e,n,this.cursor.from),this.minActive=uy(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Wc(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function cy(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,a=i,l=i-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,O=u<0?t.to+l:n.to,f=Math.min(O,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&rp(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,f,t.point,n.point):f>a&&!rp(t.active,n.active)&&s.compareRange(a,f,t.active,n.active),O>o)break;(c||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(O),a=O,u<=0&&t.next(),u>=0&&n.next()}}function rp(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function uy(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=rn(t,r)}return i===!0?-1:t.length}const op="ͼ",Oy=typeof Symbol>"u"?"__"+op:Symbol.for(op),ap=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),fy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class us{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],O=/^@(\w+)\b/.exec(o[0]),f=O&&O[1]=="keyframes";if(O&&a==null)return l.push(o[0]+";");for(let d in a){let h=a[d];if(/&/.test(d))s(d.split(/,\s*/).map(p=>o.map($=>p.replace(/&/,$))).reduce((p,$)=>p.concat($)),h,l);else if(h&&typeof h=="object"){if(!O)throw new RangeError("The value of a property ("+d+") should be a primitive value.");s(r(d),h,u,f)}else h!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+h+";")}(u.length||f)&&l.push((i&&!O&&!c?o.map(i):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=fy[Oy]||1;return fy[Oy]=e+1,op+e.toString(36)}static mount(e,n,i){let r=e[ap],s=i&&i.nonce;r?s&&r.setNonce(s):r=new eI(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let dy=new Map;class eI{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=dy.get(i);if(s)return e[ap]=s;this.sheet=new r.CSSStyleSheet,dy.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[ap]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let o=0;o-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),i)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tI=typeof navigator<"u"&&/Mac/.test(navigator.platform),nI=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var tn=0;tn<10;tn++)Os[48+tn]=Os[96+tn]=String(tn);for(var tn=1;tn<=24;tn++)Os[tn+111]="F"+tn;for(var tn=65;tn<=90;tn++)Os[tn]=String.fromCharCode(tn+32),kl[tn]=String.fromCharCode(tn);for(var $d in Os)kl.hasOwnProperty($d)||(kl[$d]=Os[$d]);function iI(t){var e=tI&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||nI&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?kl:Os)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function lt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function sI(t,e,n,i,r,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,O=!1;u&&!O;)if(u.nodeType==1){let f,d=u==l.body,h=1,p=1;if(d)f=rI(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(O=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:h,scaleY:p}=m_(u,b)),f={left:b.left,right:b.left+u.clientWidth*h,top:b.top,bottom:b.top+u.clientHeight*p}}let $=0,g=0;if(r=="nearest")e.top0&&e.bottom>f.bottom+g&&(g=e.bottom-f.bottom+o)):e.bottom>f.bottom&&(g=e.bottom-f.bottom+o,n<0&&e.top-g0&&e.right>f.right+$&&($=e.right-f.right+s)):e.right>f.right&&($=e.right-f.right+s,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function oI(t){let e=t.ownerDocument,n,i;for(let r=t.parentNode;r&&!(r==e.body||n&&i);)if(r.nodeType==1)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:i}}class aI{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Gi(n):0),i,Math.min(e.focusOffset,i?Gi(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Oo=null;function g_(t){if(t.setActive)return t.setActive();if(Oo)return t.focus(Oo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Oo==null?{get preventScroll(){return Oo={preventScroll:!0},!0}}:void 0),!Oo){Oo=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function y_(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Gi(n)}else if(n.parentNode&&!cO(n))i=Ns(n),n=n.parentNode;else return null}}function b_(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return O.domBoundsAround(e,n,c);if(f>=e&&r==-1&&(r=l,s=c),c>n&&O.dom.parentNode==this.dom){o=l,a=u;break}u=f,c=f+O.breakAfter}return{from:s,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=cg){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function S_(t,e,n,i,r,s,o,a,l){let{children:c}=t,u=c.length?c[e]:null,O=s.length?s[s.length-1]:null,f=O?O.breakAfter:o;if(!(e==i&&u&&!o&&!f&&s.length<2&&u.merge(n,r,s.length?O:null,n==0,a,l))){if(i0&&(!o&&s.length&&u.merge(n,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(n2);var $e={mac:$y||/Mac/.test(Cn.platform),windows:/Win/.test(Cn.platform),linux:/Linux|X11/.test(Cn.platform),ie:Tf,ie_version:__?cp.documentMode||6:Op?+Op[1]:up?+up[1]:0,gecko:gy,gecko_version:gy?+(/Firefox\/(\d+)/.exec(Cn.userAgent)||[0,0])[1]:0,chrome:!!Qd,chrome_version:Qd?+Qd[1]:0,ios:$y,android:/Android\b/.test(Cn.userAgent),safari:x_,webkit_version:uI?+(/\bAppleWebKit\/(\d+)/.exec(Cn.userAgent)||[0,0])[1]:0,tabSize:cp.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const OI=256;class Si extends ut{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof Si)||this.length-(n-e)+i.length>OI||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Si(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new On(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return fI(this.dom,e,n)}}class Rr extends ut{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if($_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,s,o){return i&&(!(i instanceof Rr&&i.mark.eq(this.mark))||e&&s<=0||ne&&n.push(i=e&&(r=s),i=l,s++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Rr(this.mark,n,o)}domAtPos(e){return w_(this,e)}coordsAt(e,n){return k_(this,e,n)}}function fI(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,s=e,o=0;e==0&&n<0||e==i&&n>=0?$e.chrome||$e.gecko||(e?(r--,o=1):s=0)?0:a.length-1];return $e.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?lc(l,o<0):l||null}class es extends ut{static create(e,n,i){return new es(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=es.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,s,o){return i&&(!(i instanceof es)||!this.widget.compare(i.widget)||e>0&&s<=0||n0)?On.before(this.dom):On.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?r.length-1:0;s=r[a],!(e>0?a==0:a==r.length-1||s.top0?On.before(this.dom):On.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Fe.empty}get isHidden(){return!0}}Si.prototype.children=es.prototype.children=Ho.prototype.children=cg;function w_(t,e){let n=t.dom,{children:i}=t,r=0;for(let s=0;rs&&e0;s--){let o=i[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=r;s0&&e instanceof Rr&&r.length&&(i=r[r.length-1])instanceof Rr&&i.mark.eq(e.mark)?T_(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function k_(t,e,n){let i=null,r=-1,s=null,o=-1;function a(c,u){for(let O=0,f=0;O=u&&(d.children.length?a(d,u-f):(!s||s.isHidden&&(n>0||hI(s,d)))&&(h>u||f==h&&d.getSide()>0)?(s=d,o=u-f):(f-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function dp(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function pI(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new fs(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=R_(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new fs(e,i,r,n,e.widget||null,!0)}static line(e){return new uc(e)}static set(e,n=!1){return Je.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Je.empty;class cc extends xe{constructor(e){let{start:n,end:i}=R_(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof cc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&uO(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}cc.prototype.point=!1;class uc extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof uc&&this.spec.class==e.spec.class&&uO(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}uc.prototype.mapMode=nn.TrackBefore;uc.prototype.point=!0;class fs extends xe{constructor(e,n,i,r,s,o){super(n,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?nn.TrackBefore:nn.TrackAfter:nn.TrackDel}get type(){return this.startSide!=this.endSide?Pn.WidgetRange:this.startSide<=0?Pn.WidgetBefore:Pn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof fs&&mI(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}fs.prototype.point=!0;function R_(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function mI(t,e){return t==e||!!(t&&e&&t.compare(e))}function Pu(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class Vt extends ut{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,r,s,o){if(i){if(!(i instanceof Vt))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),P_(this,e,n,i?i.children.slice():[],s,o),!0}split(e){let n=new Vt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:r}=this.childPos(e);r&&(n.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){uO(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){T_(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=fp(n,this.attrs||{})),i&&(this.attrs=fp({class:i},this.attrs||{}))}domAtPos(e){return w_(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&($_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(dp(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&ut.get(r)instanceof Rr;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=ut.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!$e.ios||!this.children.some(s=>s instanceof Si))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Si)||/[^ -~]/.test(i.text))return null;let r=Fo(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=k_(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=n){if(s instanceof Vt)return s;if(o>n)break}r=o+s.breakAfter}return null}}class Qr extends ut{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,s,o){return i&&(!(i instanceof Qr)||!this.widget.compare(i.widget)||e>0&&s<=0||n0}}class hp extends tr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class rl{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Qr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Vt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(jc(new Ho(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Qr)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(jc(new Si(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof fs){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(i instanceof fs)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Qr(i.widget||Ko.block,a,i));else{let l=es.create(i.widget||Ko.inline,a,a?0:i.startSide),c=this.atCursorPos&&!l.isEditable&&s<=r.length&&(e0),u=!l.isEditable&&(er.length||i.startSide<=0),O=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),c&&(O.append(jc(new Ho(1),r),s),s=r.length+Math.max(0,s-r.length)),O.append(jc(l,r),s),this.atCursorPos=u,this.pendingBuffer=u?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,i,r,s){let o=new rl(e,n,i,s);return o.openEnd=Je.spans(r,n,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function jc(t,e){for(let n of e)t=new Rr(n,[t],t.length);return t}class Ko extends tr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ko.inline=new Ko("span");Ko.block=new Ko("div");var Qt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Qt||(Qt={}));const Bs=Qt.LTR,ug=Qt.RTL;function C_(t){let e=[];for(let n=0;n=n){if(a.level==i)return o;(s<0||(r!=0?r<0?a.fromn:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function V_(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;p-=3)if(Ti[p+1]==-d){let $=Ti[p+2],g=$&2?r:$&4?$&1?s:r:0;g&&(ct[O]=ct[Ti[p]]=g),a=p;break}}else{if(Ti.length==189)break;Ti[a++]=O,Ti[a++]=f,Ti[a++]=l}else if((h=ct[O])==2||h==1){let p=h==r;l=p?0:1;for(let $=a-3;$>=0;$-=3){let g=Ti[$+2];if(g&2)break;if(p)Ti[$+2]|=2;else{if(g&4)break;Ti[$+2]|=4}}}}}function vI(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let o=r?n[r-1].to:t,a=rl;)h==$&&(h=n[--p].from,$=p?n[p-1].to:t),ct[--h]=d;l=u}else s=c,l++}}}function mp(t,e,n,i,r,s,o){let a=i%2?2:1;if(i%2==r%2)for(let l=e,c=0;ll&&o.push(new ts(l,p.from,d));let $=p.direction==Bs!=!(d%2);gp(t,$?i+1:i,r,p.inner,p.from,p.to,o),l=p.to}h=p.to}else{if(h==n||(u?ct[h]!=a:ct[h]==a))break;h++}f?mp(t,l,h,i+1,r,f,o):le;){let u=!0,O=!1;if(!c||l>s[c-1].to){let p=ct[l-1];p!=a&&(u=!1,O=p==16)}let f=!u&&a==1?[]:null,d=u?i:i+1,h=l;e:for(;;)if(c&&h==s[c-1].to){if(O)break e;let p=s[--c];if(!u)for(let $=p.from,g=c;;){if($==e)break e;if(g&&s[g-1].to==$)$=s[--g].from;else{if(ct[$-1]==a)break e;break}}if(f)f.push(p);else{p.toct.length;)ct[ct.length]=256;let i=[],r=e==Bs?0:1;return gp(t,r,r,n,0,t.length,i),i}function E_(t){return[new ts(0,t,0)]}let A_="";function PI(t,e,n,i,r){var s;let o=i.head-t.from,a=ts.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),l=e[a],c=l.side(r,n);if(o==c){let f=a+=r?1:-1;if(f<0||f>=e.length)return null;l=e[a=f],o=l.side(!r,n),c=l.side(r,n)}let u=rn(t.text,o,l.forward(r,n));(ul.to)&&(u=c),A_=t.text.slice(Math.min(o,u),Math.max(o,u));let O=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return O&&u==c&&O.level+(r?0:1)t.some(e=>e)}),D_=ge.define({combine:t=>t.some(e=>e)}),L_=ge.define();class qo{constructor(e,n="nearest",i="nearest",r=5,s=5,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new qo(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new qo(K.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Bc=Ve.define({map:(t,e)=>t.map(e)}),W_=Ve.define();function En(t,e,n){let i=t.facet(Y_);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const hr=ge.define({combine:t=>t.length?t[0]:!0});let xI=0;const vo=ge.define({combine(t){return t.filter((e,n)=>{for(let i=0;i{let l=[];return o&&l.push(Cl.of(c=>{let u=c.plugin(a);return u?o(u):xe.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return Ct.define((i,r)=>new e(i,r),n)}}class yd{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(En(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){En(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){En(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const N_=ge.define(),dg=ge.define(),Cl=ge.define(),j_=ge.define(),hg=ge.define(),B_=ge.define();function yy(t,e){let n=t.state.facet(B_);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return Je.spans(i,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,O=r;for(let f=a.length-1;f>=0;f--,l--){let d=a[f].spec.bidiIsolate,h;if(d==null&&(d=_I(e.text,c,u)),l>0&&O.length&&(h=O[O.length-1]).to==c&&h.direction==d)h.to=u,O=h.inner;else{let p={from:c,to:u,direction:d,inner:[]};O.push(p),O=p.inner}}}}),r}const G_=ge.define();function pg(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(G_)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Ua=ge.define();class li{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new li(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAu)break;s+=2}if(!l)return i;new li(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,a=l.toB}}}class OO{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=It.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,o,a,l)=>r.push(new li(s,o,a,l))),this.changedRanges=r}static create(e,n,i){return new OO(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class by extends ut{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=xe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Vt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new li(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!VI(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?TI(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new li(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,($e.ie||$e.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=CI(o,a,e.changes);return i=li.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=$e.chrome||$e.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||r.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[o]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:O}=a,f,d,h,p;if(i&&i.range.fromBu){let y=rl.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),v=rl.build(this.view.state.doc,i.range.toB,O,this.decorations,this.dynamicDecorationMap);d=y.breakAtStart,h=y.openStart,p=v.openEnd;let S=this.compositionView(i);v.breakAtStart?S.breakAfter=1:v.content.length&&S.merge(S.length,S.length,v.content[0],!1,v.openStart,0)&&(S.breakAfter=v.content[0].breakAfter,v.content.shift()),y.content.length&&S.merge(0,0,y.content[y.content.length-1],!0,0,y.openEnd)&&y.content.pop(),f=y.content.concat(S).concat(v.content)}else({content:f,breakAtStart:d,openStart:h,openEnd:p}=rl.build(this.view.state.doc,u,O,this.decorations,this.dynamicDecorationMap));let{i:$,off:g}=s.findPos(c,1),{i:b,off:Q}=s.findPos(l,-1);S_(this,b,Q,$,g,f,d,h,p)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(W_)&&(this.editContextFormatting=i.value)}compositionView(e){let n=new Si(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Rr(r,[n],n.length);let i=new Vt;return i.append(n,0),i}fixCompositionDOM(e){let n=(s,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=ut.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],n(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&!(this.view.state.facet(hr)||this.dom.tabIndex>-1)&&Su(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if($e.gecko&&a.empty&&!this.hasComposition&&wI(l)){let O=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(O,l.node.childNodes[l.offset]||null)),l=c=new On(O,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!il(l.node,l.offset,u.anchorNode,u.anchorOffset)||!il(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{$e.android&&$e.chrome&&this.dom.contains(u.focusNode)&&XI(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let O=Rl(this.view.root);if(O)if(a.empty){if($e.gecko){let f=kI(l.node,l.offset);if(f&&f!=3){let d=(f==1?y_:b_)(l.node,l.offset);d&&(l=new On(d.node,d.offset))}}O.collapse(l.node,l.offset),a.bidiLevel!=null&&O.caretBidiLevel!==void 0&&(O.caretBidiLevel=a.bidiLevel)}else if(O.extend){O.collapse(l.node,l.offset);try{O.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),O.removeAllRanges(),O.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new On(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new On(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&il(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Rl(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=Vt.find(this,n.head);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);i.collapse(u.node,u.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=n.from&&i.collapse(r,s)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let s=ut.get(n.childNodes[r]);s instanceof Vt&&(i=s.domAtPos(s.length))}return i?new On(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=ut.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;o--){let a=this.children[o],l=s-a.breakAfter,c=l-a.length;if(le||a.covers(1))&&(!i||a instanceof Vt&&!(i instanceof Vt&&n>=0)))i=a,r=c;else if(i&&c==e&&l==e&&a instanceof Qr&&Math.abs(n)<2){if(a.deco.startSide<0)break;o&&(i=null)}s=c}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Vt))return null;for(;r.children.length;){let{i:a,off:l}=r.childPos(i,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}i=l}if(!(r instanceof Si))return null;let s=rn(r.text,i);if(s==i)return null;let o=js(r.dom,i,s).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Qt.LTR;for(let c=0,u=0;ur)break;if(c>=i){let d=O.dom.getBoundingClientRect();if(n.push(d.height),o){let h=O.dom.lastChild,p=h?Fo(h):[];if(p.length){let $=p[p.length-1],g=l?$.right-d.left:d.right-$.left;g>a&&(a=g,this.minWidth=s,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+O.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Qt.RTL:Qt.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Vt){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Fo(e.firstChild)[0];n=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new v_(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],o=s?s.from-1:this.length;if(o>i){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(xe.replace({widget:new hp(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return xe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Cl).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(j_).map((s,o)=>{let a=typeof s=="function";return a&&(i=!0),a?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(Je.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=pg(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;sI(this.view.scrollDOM,o,n.head{ie.from&&(n=!0)}),n}function EI(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return K.cursor(e);s==0?n=1:s==r.length&&(n=-1);let o=s,a=s;n<0?o=rn(r.text,s,!1):a=rn(r.text,s);let l=i(r.text.slice(o,a));for(;o>0;){let c=rn(r.text,o,!1);if(i(r.text.slice(c,o))!=l)break;o=c}for(;at?e.left-t:Math.max(0,t-e.right)}function qI(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function bd(t,e){return t.tope.top+1}function vy(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Qp(t,e,n){let i,r,s,o,a=!1,l,c,u,O;for(let h=t.firstChild;h;h=h.nextSibling){let p=Fo(h);for(let $=0;$Q||o==Q&&s>b)&&(i=h,r=g,s=b,o=Q,a=b?e0:$g.bottom&&(!u||u.bottomg.top)&&(c=h,O=g):u&&bd(u,g)?u=Sy(u,g.bottom):O&&bd(O,g)&&(O=vy(O,g.top))}}if(u&&u.bottom>=n?(i=l,r=u):O&&O.top<=n&&(i=c,r=O),!i)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return Py(i,f,n);if(a&&i.contentEditable!="false")return Qp(i,f,n);let d=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:d}}function Py(t,e,n){let i=t.nodeValue.length,r=-1,s=1e9,o=0;for(let a=0;an?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&O=(u.left+u.right)/2,d=f;if(($e.chrome||$e.gecko)&&js(t,a).getBoundingClientRect().left==u.right&&(d=!f),O<=0)return{node:t,offset:a+(d?1:0)};r=a+(d?1:0),s=O}}}return{node:t,offset:r>-1?r:o>0?t.nodeValue.length:0}}function H_(t,e,n,i=-1){var r,s;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:O}=e,f=O-a;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let y=t.viewState.heightOracle.textHeight/2,v=!1;l=t.elementAtHeight(f),l.type!=Pn.Text;)for(;f=i>0?l.bottom+y:l.top-y,!(f>=0&&f<=c);){if(v)return n?null:0;v=!0,i=-i}O=a+f;let d=l.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:_y(t,o,l,u,O);let h=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:h,$=p.elementFromPoint(u,O);$&&!t.contentDOM.contains($)&&($=null),$||(u=Math.max(o.left+1,Math.min(o.right-1,u)),$=p.elementFromPoint(u,O),$&&!t.contentDOM.contains($)&&($=null));let g,b=-1;if($&&((r=t.docView.nearest($))===null||r===void 0?void 0:r.isEditable)!=!1){if(h.caretPositionFromPoint){let y=h.caretPositionFromPoint(u,O);y&&({offsetNode:g,offset:b}=y)}else if(h.caretRangeFromPoint){let y=h.caretRangeFromPoint(u,O);y&&({startContainer:g,startOffset:b}=y,(!t.contentDOM.contains(g)||$e.safari&&ZI(g,b,u)||$e.chrome&&zI(g,b,u))&&(g=void 0))}g&&(b=Math.min(Gi(g),b))}if(!g||!t.docView.dom.contains(g)){let y=Vt.find(t.docView,d);if(!y)return f>l.top+l.height/2?l.to:l.from;({node:g,offset:b}=Qp(y.dom,u,O))}let Q=t.docView.nearest(g);if(!Q)return null;if(Q.isWidget&&((s=Q.dom)===null||s===void 0?void 0:s.nodeType)==1){let y=Q.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+sp(o,s,t.state.tabSize)}function ZI(t,e,n){let i,r=t;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(;;){let s=r.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let o=r.parentNode;if(!o||o.nodeName=="DIV")break;r=o}}return js(t,i-1,i).getBoundingClientRect().right>n}function zI(t,e,n){if(e!=0)return!1;for(let r=t;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=t.nodeType==1?t.getBoundingClientRect():js(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function yp(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.toe)return s;(!r||s.type==Pn.Text&&(r.type!=s.type||(n<0?s.frome)))&&(r=s)}}return r||i}return i}function YI(t,e,n,i){let r=yp(t,e.head,e.assoc||-1),s=!i||r.type!=Pn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==Qt.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return K.cursor(l,n?-1:1)}return K.cursor(n?r.to:r.from,n?-1:1)}function xy(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let a=e,l=null;;){let c=PI(r,s,o,a,n),u=A_;if(!c){if(r.number==(n?t.state.doc.lines:1))return a;u=` +`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),c=t.visualLineSide(r,!n)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function MI(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let o=i(s);return r==vt.Space&&(r=o),r==o}}function II(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return K.cursor(r,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(r,e.assoc||-1),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let d=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-d.from))),a=(s<0?d.top:d.bottom)+u}let O=l.left+o,f=i??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let h=a+(f+d)*s,p=H_(t,{x:O,y:h},!1,s);if(hl.bottom||(s<0?pr)){let $=t.docView.coordsForChar(p),g=!$||h<$.top?-1:1;return K.cursor(p,g,void 0,o)}}}function _u(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,o,a)=>{if(e>s&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:K.cursor(i,is)&&this.lineBreak(),r=o}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=r.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let n=ut.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(DI(e,i.node,i.offset)?n:0))}}function DI(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let a=s||o?[]:jI(e),l=new UI(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=BI(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!lp(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!lp(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if(($e.ios||$e.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=r.from,c=null;(s===8||$e.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:$e.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=K.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Fe.of([" "])}),n)return mg(t,n,i,s);if(i&&!i.main.eq(r)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:o,userEvent:a}),!0}else return!1}function mg(t,e,n,i=-1){if($e.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if($e.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ao(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.lengthr.head)&&Ao(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Ao(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=WI(t,e,n));return t.state.facet(M_).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function WI(t,e,n){let i,r=t.state,s=r.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=r.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let c=t.state.sliceDoc(e.from,e.to),u,O=n&&F_(t,n.main.head);if(O){let h=e.insert.length-(e.to-e.from);u={from:O.from,to:O.to-h}}else u=t.state.doc.lineAt(s.head);let f=s.to-e.to,d=s.to-s.from;i=r.changeByRange(h=>{if(h.from==s.from&&h.to==s.to)return{changes:a,range:l||h.map(a)};let p=h.to-f,$=p-c.length;if(h.to-h.from!=d||t.state.sliceDoc($,p)!=c||h.to>=u.from&&h.from<=u.to)return{range:h};let g=r.changes({from:$,to:p,insert:e.insert}),b=h.to-s.to;return{changes:g,range:l?K.range(Math.max(0,l.anchor+b),Math.max(0,l.head+b)):h.map(g)}})}else i={changes:a,selection:l&&r.selection.replaceRange(l)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:o,scrollIntoView:!0})}function NI(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function jI(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new wy(n,i)),(r!=n||s!=i)&&e.push(new wy(r,s))),e}function BI(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?K.single(n+e,i+e):null}class GI{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,$e.safari&&e.contentDOM.addEventListener("input",()=>null),$e.gecko&&O6(e.contentDOM.ownerDocument)}handleEvent(e){!i6(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=FI(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=i[s];a&&o!=!a.handlers.length&&(r.removeEventListener(s,this.handleEvent),a=null),a||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&ex.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),$e.android&&$e.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return $e.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=J_.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||HI.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:$e.safari&&!$e.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Ty(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){En(n.state,r)}}}function FI(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,o=r&&r.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(Ty(i.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(Ty(i.value,l))}}for(let i in Pi)n(i).handlers.push(Pi[i]);for(let i in ui)n(i).observers.push(ui[i]);return e}const J_=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],HI="dthko",ex=[16,17,18,20,91,92,224,225],Gc=6;function Fc(t){return Math.max(0,t)*.7+8}function KI(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class JI{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=oI(e.contentDOM),this.atoms=e.state.facet(hg).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(De.allowMultipleSelections)&&e6(e,n),this.dragging=n6(e,n)&&ix(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&KI(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=pg(this.view);e.clientX-l.left<=r+Gc?n=-Fc(r-e.clientX):e.clientX+l.right>=o-Gc&&(n=Fc(e.clientX-o)),e.clientY-l.top<=s+Gc?i=-Fc(s-e.clientY):e.clientY+l.bottom>=a-Gc&&(i=Fc(e.clientY-a)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;in.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function e6(t,e){let n=t.state.facet(q_);return n.length?n[0](e):$e.mac?e.metaKey:e.ctrlKey}function t6(t,e){let n=t.state.facet(Z_);return n.length?n[0](e):$e.mac?!e.altKey:!e.ctrlKey}function n6(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Rl(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function i6(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=ut.get(n))&&i.ignoreEvent(e))return!1;return!0}const Pi=Object.create(null),ui=Object.create(null),tx=$e.ie&&$e.ie_version<15||$e.ios&&$e.webkit_version<604;function r6(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),nx(t,n.value)},50)}function kf(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function nx(t,e){e=kf(t.state,Og,e);let{state:n}=t,i,r=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(bp!=null&&n.selection.ranges.every(l=>l.empty)&&bp==s.toString()){let l=-1;i=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let O=n.toText((o?s.line(r++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:O},range:K.cursor(c.from+O.length)}})}else o?i=n.changeByRange(l=>{let c=s.line(r++);return{changes:{from:l.from,to:l.to,insert:c.text},range:K.cursor(l.from+c.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ui.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Pi.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);ui.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};ui.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Pi.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(z_))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=a6(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new JI(t,e,n,i)),i&&t.observer.ignore(()=>{g_(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function ky(t,e,n,i){if(i==1)return K.cursor(e,n);if(i==2)return EI(t.state,e,n);{let r=Vt.find(t.docView,e),s=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return ae>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function s6(t,e,n,i){let r=Vt.find(t.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let o=r.coordsAt(s,-1);if(o&&Ry(n,i,o))return-1;let a=r.coordsAt(s,1);return a&&Ry(n,i,a)?1:o&&o.bottom>=i?-1:1}function Cy(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:s6(t,n,e.clientX,e.clientY)}}const o6=$e.ie&&$e.ie_version<=11;let Xy=null,Vy=0,Ey=0;function ix(t){if(!o6)return t.detail;let e=Xy,n=Ey;return Xy=t,Ey=Date.now(),Vy=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Vy+1)%3:1}function a6(t,e){let n=Cy(t,e),i=ix(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,o,a){let l=Cy(t,s),c,u=ky(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!o){let O=ky(t,n.pos,n.bias,i),f=Math.min(O.from,u.from),d=Math.max(O.to,u.to);u=f1&&(c=l6(r,l.pos))?c:a?r.addRange(u):K.create([u])}}}function l6(t,e){for(let n=0;n=e)return K.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Pi.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,o=s+r.length;(s>=n.to||o<=n.from)&&(n=K.range(s,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",kf(t.state,fg,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Pi.dragend=t=>(t.inputState.draggedContent=null,!1);function Ay(t,e,n,i){if(n=kf(t.state,Og,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=i&&s&&t6(t,e)?{from:s.from,to:s.to}:null,a={from:r,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Pi.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&Ay(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Ay(t,e,i,!0),!0}return!1};Pi.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=tx?null:e.clipboardData;return n?(nx(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(r6(t),!1)};function c6(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function u6(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:kf(t,fg,e.join(t.lineBreak)),ranges:n,linewise:i}}let bp=null;Pi.copy=Pi.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=u6(t.state);if(!n&&!r)return!1;bp=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=tx?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(c6(t,n),!1)};const rx=Er.define();function sx(t,e){let n=[];for(let i of t.facet(I_)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:rx.of(!0)}):null}function ox(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=sx(t.state,e);n?t.dispatch(n):t.update([])}},10)}ui.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ox(t)};ui.blur=t=>{t.observer.clearSelectionRange(),ox(t)};ui.compositionstart=ui.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};ui.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,$e.chrome&&$e.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};ui.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Pi.beforeinput=(t,e)=>{var n,i;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return mg(t,{from:l,to:c,insert:t.state.toText(s)},null),!0}}let r;if($e.chrome&&$e.android&&(r=J_.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return $e.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),$e.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>ui.compositionend(t,e),20),!1};const qy=new Set;function O6(t){qy.has(t)||(qy.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Zy=["pre-wrap","normal","pre-line","break-spaces"];let Jo=!1;function zy(){Jo=!1}class f6{constructor(e){this.lineWrapping=e,this.doc=Fe.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Zy.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>xu&&(Jo=!0),this.height=e)}replace(e,n,i){return _n.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,o=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:O}=r[a],f=s.lineAt(l,gt.ByPosNoHeight,i.setDoc(n),0,0),d=f.to>=c?f:s.lineAt(c,gt.ByPosNoHeight,i,0,0);for(O+=d.to-c,c=d.to;a>0&&f.from<=r[a-1].toA;)l=r[a-1].fromA,u=r[a-1].fromB,a--,ls*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(s>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,s-=a.size}else break;else if(r=s&&o(this.blockAt(0,i,r,s))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Wn extends ax{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new Zi(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Wn||r instanceof Jt&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Jt?r=new Wn(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):_n.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(r.heights[r.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Jt extends _n{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:r,perLine:o,perChar:a}}blockAt(e,n,i,r){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let c=r+(e0){let s=i[i.length-1];s instanceof Jt?i[i.length-1]=new Jt(s.length+r):i.push(null,new Jt(r-1))}if(e>0){let s=i[0];s instanceof Jt?i[0]=new Jt(e+s.length):i.unshift(new Jt(e-1),null)}return _n.of(i)}decomposeLeft(e,n){n.push(new Jt(e-1),null)}decomposeRight(e,n){n.push(null,new Jt(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&o.push(new Jt(r.from-n-1).updateHeight(e,n));a<=s&&r.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let O=r.heights[r.index++];l==-1?l=O:Math.abs(O-l)>=xu&&(l=-2);let f=new Wn(u,O);f.outdated=!1,o.push(f),a+=u+1}a<=s&&o.push(null,new Jt(s-a).updateHeight(e,a));let c=_n.of(o);return(l<0||Math.abs(c.height-this.height)>=xu||Math.abs(l-this.heightMetrics(e,n).perLine)>=xu)&&(Jo=!0),fO(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class h6 extends _n{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return ea))return c;let u=n==gt.ByPosNoHeight?gt.ByPosNoHeight:gt.ByPos;return l?c.join(this.right.lineAt(a,u,i,o,a)):this.left.lineAt(a,u,i,r,s).join(c)}forEachLine(e,n,i,r,s,o){let a=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,o);else{let c=this.lineAt(l,gt.ByPos,i,r,s);e=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,a,l,o)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of i)s.push(a);if(e>0&&Yy(s,o-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?_n.of(this.break?[e,null,n]:[e,n]):(this.left=fO(this.left,e),this.right=fO(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return r&&r.from<=n+s.length&&r.more?l=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=a+o.length&&r.more?l=o=o.updateHeight(e,a,i,r):o.updateHeight(e,a,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Yy(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Jt&&(i=t[e+1])instanceof Jt&&t.splice(e-1,3,new Jt(n.length+1+i.length))}const p6=5;class gg{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Wn?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Wn(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=p6)&&this.addLineDeco(r,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Wn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new Jt(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Wn)return e;let n=new Wn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Wn)&&!this.isCovered?this.nodes.push(new Wn(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&O.overflow!="visible"){let f=u.getBoundingClientRect();s=Math.max(s,f.left),o=Math.min(o,f.right),a=Math.max(a,f.top),l=Math.min(c==t.parentNode?r.innerHeight:l,f.bottom)}c=O.position=="absolute"||O.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Q6(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function y6(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Sd{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new f6(n),this.stateDeco=e.facet(Cl).filter(i=>typeof i!="function"),this.heightMap=_n.empty().applyChanges(this.stateDeco,Fe.empty,this.heightOracle.setDoc(e.doc),[new li(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new Hc(s,o))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Iy:new $g(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(La(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Cl).filter(u=>typeof u!="function");let r=e.changedRanges,s=li.extendWithRanges(r,m6(i,this.stateDeco,e?e.changes:It.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);zy(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Jo)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(D_)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Qt.RTL:Qt.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:y,scaleY:v}=m_(n,a);(y>.005&&Math.abs(this.scaleX-y)>.005||v>.005&&Math.abs(this.scaleY-v)>.005)&&(this.scaleX=y,this.scaleY=v,c|=16,o=l=!0)}let O=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=f)&&(this.paddingTop=O,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=Q_(e.scrollDOM);let h=(this.printing?y6:$6)(n,this.paddingTop),p=h.top-this.pixelViewport.top,$=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget&&!Q6(e.dom))return 0;let b=a.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let y=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:v,charWidth:S,textHeight:P}=e.docView.measureTextSize();o=v>0&&r.refresh(s,v,S,P,b/S,y),o&&(e.docView.minWidth=0,c|=16)}p>0&&$>0?u=Math.max(p,$):p<0&&$<0&&(u=Math.min(p,$)),zy();for(let v of this.viewports){let S=v.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(v);this.heightMap=(o?_n.empty().applyChanges(this.stateDeco,Fe.empty,this.heightOracle,[new li(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new d6(v.from,S))}Jo&&(c|=2)}let Q=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return Q&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||Q)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Hc(r.lineAt(o-i*1e3,gt.ByHeight,s,0,0).from,r.lineAt(a+(1-i)*1e3,gt.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=r.lineAt(c,gt.ByPos,s,0,0),f;n.y=="center"?f=(O.top+O.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=a+Math.max(10,Math.min(i,250)))&&r>o-2*1e3&&s>1,o=r<<1;if(this.defaultTextDirection!=Qt.LTR&&!i)return[];let a=[],l=(u,O,f,d)=>{if(O-uu&&gg.from>=f.from&&g.to<=f.to&&Math.abs(g.from-u)g.fromb));if(!$){if(OQ.from<=O&&Q.to>=O)){let Q=n.moveToLineBoundary(K.cursor(O),!1,!0).head;Q>u&&(O=Q)}let g=this.gapSize(f,u,O,d),b=i||g<2e6?g:2e6;$=new Sd(u,O,g,b)}a.push($)},c=u=>{if(u.length2e6)for(let S of e)S.from>=u.from&&S.fromu.from&&l(u.from,d,u,O),hn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Je.spans(n,this.viewport.from,this.viewport.to,{span(s,o){i.push({from:s,to:o})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||La(this.heightMap.lineAt(e,gt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||La(this.heightMap.lineAt(this.scaler.fromDOM(e),gt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return La(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Hc{constructor(e,n){this.from=e,this.to=n}}function v6(t,e,n){let i=[],r=t,s=0;return Je.spans(n,t,e,{span(){},point(o,a){o>r&&(i.push({from:r,to:o}),s+=o-r),r=a}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:o}=e[r],a=o-s;if(i<=a)return s+i;i-=a}}function Jc(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function S6(t,e){for(let n of t)if(e(n))return n}const Iy={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class $g{constructor(e,n,i){let r=0,s=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let c=n.lineAt(a,gt.ByPos,e,0,0).top,u=n.lineAt(l,gt.ByPos,e,0,0).bottom;return r+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=nn.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function La(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Zi(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>La(r,e)):t._content)}const eu=ge.define({combine:t=>t.join(" ")}),vp=ge.define({combine:t=>t.indexOf(!0)>-1}),Sp=us.newName(),lx=us.newName(),cx=us.newName(),ux={"&light":"."+lx,"&dark":"."+cx};function Pp(t,e,n){return new us(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const P6=Pp("."+Sp,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ux),_6={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Pd=$e.ie&&$e.ie_version<=11;class x6{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new aI,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);($e.ie&&$e.ie_version<=11||$e.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&$e.android&&e.constructor.EDIT_CONTEXT!==!1&&!($e.chrome&&$e.chrome_version<126)&&(this.editContext=new T6(e),e.state.facet(hr)&&(e.contentDOM.editContext=this.editContext.editContext)),Pd&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(hr)?i.root.activeElement!=this.dom:!Su(this.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}($e.ie&&$e.ie_version<=11||$e.android&&$e.chrome)&&!i.state.selection.main.empty&&r.focusNode&&il(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Rl(e.root);if(!n)return!1;let i=$e.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&w6(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Su(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Ao(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Su(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new LI(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=K_(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=Uy(n,e.previousSibling||e.target.previousSibling,-1),r=Uy(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(hr)!=e.state.facet(hr)&&(e.view.contentDOM.editContext=e.state.facet(hr)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Uy(t,e,n){for(;e;){let i=ut.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function Dy(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return il(o.node,o.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function w6(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return Dy(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?Dy(t,n):null}class T6{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:o}=r,a=this.toEditorPos(i.updateRangeStart),l=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:a,drifted:!1});let c={from:a,to:l,insert:Fe.of(i.text.split(` +`))};if(c.from==this.from&&sthis.to&&(c.to=s),c.from==c.to&&!c.insert.length){let u=K.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));u.main.eq(r)||e.dispatch({selection:u,userEvent:"select"});return}if(($e.mac||$e.android)&&c.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:a,to:l,insert:Fe.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);mg(e,c,K.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let o=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);o{let r=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(o!="None"&&a!="None"){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=Rl(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(i)return;let u=c.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(c)){r=this.pendingContextChange=null,n+=u,this.to+=u;return}else r=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(sthis.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Oe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||lI(e.parent)||document,this.viewState=new My(e.state||De.create(e)),e.scrollTo&&e.scrollTo.is(Bc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(vo).map(r=>new yd(r));for(let r of this.plugins)r.update(this);this.observer=new x6(this),this.inputState=new GI(this),this.inputState.ensureHandlers(this.plugins),this.docView=new by(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof At?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(rx))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=sx(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(De.phrases)!=this.state.facet(De.phrases))return this.setState(s);r=OO.create(this,s,e),r.flags|=a;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(O&&(O=O.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;O=new qo(d.empty?d:K.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(Bc)&&(O=d.value.clip(this.state))}this.viewState.update(r,O),this.bidiCache=dO.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Ua)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(eu)!=r.state.facet(eu)&&(this.viewState.mustMeasureContent=!0),(n||i||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let f of this.state.facet($p))try{f(r)}catch(d){En(this.state,d,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!K_(this,u)&&c.force&&Ao(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new My(e),this.plugins=e.facet(vo).map(i=>new yd(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new by(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(vo),i=e.state.facet(vo);if(n!=i){let r=[];for(let s of i){let o=n.indexOf(s);if(o<0)r.push(new yd(s));else{let a=this.plugins[o];a.mustUpdate=e,r.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(Q_(i))s=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(r);s=d.from,o=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(h){return En(this.state,h),Ly}}),O=OO.create(this,this.state,[]),f=!1;O.flags|=l,n?n.flags|=l:n=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),f=this.docView.update(O),f&&this.docViewUpdate());for(let d=0;d1||h<-1){r=r+h,i.scrollTop=r/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet($p))a(n)}get themeClasses(){return Sp+" "+(this.state.facet(vp)?cx:lx)+" "+this.state.facet(eu)}updateAttrs(){let e=Wy(this,N_,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(hr)?"true":"false",class:"cm-content",style:`${$e.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Wy(this,dg,n);let i=this.observer.ignore(()=>{let r=dp(this.contentDOM,this.contentAttrs,n),s=dp(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Oe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Ua);let e=this.state.facet(Oe.cspNonce);us.mount(this.root,this.styleModules.concat(P6).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return vd(this,e,xy(this,e,n,i))}moveByGroup(e,n){return vd(this,e,xy(this,e,n,i=>MI(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return K.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return YI(this,e,n,i)}moveVertically(e,n,i){return vd(this,e,II(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),H_(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[ts.find(s,e-r.from,-1,n)];return lc(i,o.dir==Qt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(U_)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>k6)return E_(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||V_(s.isolates,i=yy(this,e))))return s.order;i||(i=yy(this,e));let r=SI(e.text,n,i);return this.bidiCache.push(new dO(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||$e.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{g_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Bc.of(new qo(typeof e=="number"?K.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Bc.of(new qo(K.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ct.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ct.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=us.newName(),r=[eu.of(i),Ua.of(Pp(`.${i}`,e))];return n&&n.dark&&r.push(vp.of(!0)),r}static baseTheme(e){return Ss.lowest(Ua.of(Pp("."+Sp,e,ux)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&ut.get(i)||ut.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}Oe.styleModule=Ua;Oe.inputHandler=M_;Oe.clipboardInputFilter=Og;Oe.clipboardOutputFilter=fg;Oe.scrollHandler=L_;Oe.focusChangeEffect=I_;Oe.perLineTextDirection=U_;Oe.exceptionSink=Y_;Oe.updateListener=$p;Oe.editable=hr;Oe.mouseSelectionStyle=z_;Oe.dragMovesSelection=Z_;Oe.clickAddsSelectionRange=q_;Oe.decorations=Cl;Oe.outerDecorations=j_;Oe.atomicRanges=hg;Oe.bidiIsolatedRanges=B_;Oe.scrollMargins=G_;Oe.darkTheme=vp;Oe.cspNonce=ge.define({combine:t=>t.length?t[0]:""});Oe.contentAttributes=dg;Oe.editorAttributes=N_;Oe.lineWrapping=Oe.contentAttributes.of({class:"cm-lineWrapping"});Oe.announce=Ve.define();const k6=4096,Ly={};class dO{constructor(e,n,i,r,s,o){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Qt.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],o=typeof s=="function"?s(t):s;o&&fp(o,n)}return n}const R6=$e.mac?"mac":$e.windows?"win":$e.linux?"linux":"key";function C6(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,o,a;for(let l=0;li.concat(r),[]))),n}function V6(t,e,n){return fx(Ox(t.state),e,t,n)}let Kr=null;const E6=4e3;function A6(t,e=R6){let n=Object.create(null),i=Object.create(null),r=(o,a)=>{let l=i[o];if(l==null)i[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var O,f;let d=n[o]||(n[o]=Object.create(null)),h=a.split(/ (?!$)/).map(g=>C6(g,e));for(let g=1;g{let y=Kr={view:Q,prefix:b,scope:o};return setTimeout(()=>{Kr==y&&(Kr=null)},E6),!0}]})}let p=h.join(" ");r(p,!1);let $=d[p]||(d[p]={preventDefault:!1,stopPropagation:!1,run:((f=(O=d._any)===null||O===void 0?void 0:O.run)===null||f===void 0?void 0:f.slice())||[]});l&&$.run.push(l),c&&($.preventDefault=!0),u&&($.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:O}=o;for(let f in u)u[f].run.push(d=>O(d,_p))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let _p=null;function fx(t,e,n,i){_p=e;let r=iI(e),s=Rn(r,0),o=qi(s)==r.length&&r!=" ",a="",l=!1,c=!1,u=!1;Kr&&Kr.view==n&&Kr.scope==i&&(a=Kr.prefix+" ",ex.indexOf(e.keyCode)<0&&(c=!0,Kr=null));let O=new Set,f=$=>{if($){for(let g of $.run)if(!O.has(g)&&(O.add(g),g(n)))return $.stopPropagation&&(u=!0),!0;$.preventDefault&&($.stopPropagation&&(u=!0),c=!0)}return!1},d=t[i],h,p;return d&&(f(d[a+tu(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!($e.windows&&e.ctrlKey&&e.altKey)&&(h=Os[e.keyCode])&&h!=r?(f(d[a+tu(h,e,!0)])||e.shiftKey&&(p=kl[e.keyCode])!=r&&p!=h&&f(d[a+tu(p,e,!1)]))&&(l=!0):o&&e.shiftKey&&f(d[a+tu(r,e,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),_p=null,l}class fc{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=dx(e);return[new fc(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return q6(e,n,i)}}function dx(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Qt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function jy(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?i:{from:Math.max(i.from,Math.min(a,l)),to:Math.min(i.to,Math.max(a,l))}}function q6(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==Qt.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=dx(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),O=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=a.right-(u?parseInt(u.paddingRight):0),d=yp(t,i,1),h=yp(t,r,-1),p=d.type==Pn.Text?d:null,$=h.type==Pn.Text?h:null;if(p&&(t.lineWrapping||d.widgetLineBreaks)&&(p=jy(t,i,1,p)),$&&(t.lineWrapping||h.widgetLineBreaks)&&($=jy(t,r,-1,$)),p&&$&&p.from==$.from&&p.to==$.to)return b(Q(n.from,n.to,p));{let v=p?Q(n.from,null,p):y(d,!1),S=$?Q(null,n.to,$):y(h,!0),P=[];return(p||d).to<($||h).from-(p&&$?1:0)||d.widgetLineBreaks>1&&v.bottom+t.defaultLineHeight/2E&&se.from=F)break;ue>le&&W(Math.max(J,le),v==null&&J<=E,Math.min(ue,F),S==null&&ue>=te,z.dir)}if(le=I.to+1,le>=F)break}return Z.length==0&&W(E,v==null,te,S==null,t.textDirection),{top:x,bottom:C,horizontal:Z}}function y(v,S){let P=a.top+(S?v.top:v.bottom);return{top:P,bottom:P,horizontal:[]}}}function Z6(t,e){return t.constructor==e.constructor&&t.eq(e)}class z6{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(wu)!=e.state.facet(wu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(wu);for(;n!Z6(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const wu=ge.define();function hx(t){return[Ct.define(e=>new z6(e,t)),wu.of(t)]}const Xl=ge.define({combine(t){return er(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Y6(t={}){return[Xl.of(t),M6,I6,U6,D_.of(!0)]}function px(t){return t.startState.facet(Xl)!=t.state.facet(Xl)}const M6=hx({above:!0,markers(t){let{state:e}=t,n=e.facet(Xl),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:K.cursor(r.head,r.head>r.anchor?-1:1);for(let l of fc.forRange(t,o,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=px(t);return n&&By(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){By(e.state,t)},class:"cm-cursorLayer"});function By(t,e){e.style.animationDuration=t.facet(Xl).cursorBlinkRate+"ms"}const I6=hx({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:fc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||px(t)},class:"cm-selectionLayer"}),U6=Ss.highest(Oe.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),mx=Ve.define({map(t,e){return t==null?null:e.mapPos(t)}}),Wa=Ft.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(mx)?i.value:n,t)}}),D6=Ct.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Wa);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wa)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wa),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wa)!=t&&this.view.dispatch({effects:mx.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function L6(){return[Wa,D6]}function Gy(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)r(o+a.index,a)}function W6(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class N6{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,c,u)=>r(u,c,c+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,c,u)=>{let O=i(a,l,c);O&&u(c,c+a[0].length,O)};else if(i)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new kr,i=n.add.bind(n);for(let{from:r,to:s}of W6(e,this.maxLength))Gy(e.state.doc,this.regexp,r,s,(o,a)=>this.addMatch(a,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(i=Math.min(a,i),r=Math.max(l,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),a=Math.min(s.to,r);if(a>=o){let l=e.state.doc.lineAt(o),c=l.tol.from;o--)if(this.boundary.test(l.text[o-1-l.from])){u=o;break}for(;af.push(g.range(p,$));if(l==c)for(this.regexp.lastIndex=u-l.from;(d=this.regexp.exec(l.text))&&d.indexthis.addMatch($,e,p,h));n=n.update({filterFrom:u,filterTo:O,filter:(p,$)=>pO,add:f})}}return n}}const xp=/x/.unicode!=null?"gu":"g",j6=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,xp),B6={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let _d=null;function G6(){var t;if(_d==null&&typeof document<"u"&&document.body){let e=document.body.style;_d=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return _d||!1}const Tu=ge.define({combine(t){let e=er(t,{render:null,specialChars:j6,addSpecialChars:null});return(e.replaceTabs=!G6())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,xp)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,xp)),e}});function F6(t={}){return[Tu.of(t),H6()]}let Fy=null;function H6(){return Fy||(Fy=Ct.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Tu)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new N6({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=Rn(e[0],0);if(s==9){let o=r.lineAt(i),a=n.state.tabSize,l=ha(o.text,a,i-o.from);return xe.replace({widget:new t4((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=xe.replace({widget:new e4(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Tu);t.startState.facet(Tu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const K6="•";function J6(t){return t>=32?K6:t==10?"␤":String.fromCharCode(9216+t)}class e4 extends tr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=J6(this.code),i=e.state.phrase("Control character")+" "+(B6[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class t4 extends tr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function n4(){return r4}const i4=xe.line({class:"cm-activeLine"}),r4=Ct.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(i4.range(r.from)),e=r.from)}return xe.set(n)}},{decorations:t=>t.decorations});class s4 extends tr{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Fo(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=lc(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function o4(t){let e=Ct.fromClass(class{constructor(n){this.view=n,this.placeholder=t?xe.set([xe.widget({widget:new s4(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,Oe.contentAttributes.of({"aria-placeholder":t})]:e}const wp=2e3;function a4(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>wp||n.off>wp||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let c=t.doc.line(l);c.length<=a&&s.push(K.range(c.from+o,c.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let c=t.doc.line(l),u=sp(c.text,o,t.tabSize,!0);if(u<0)s.push(K.cursor(c.to));else{let O=sp(c.text,a,t.tabSize);s.push(K.range(c.from+u,c.from+O))}}}return s}function l4(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Hy(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>wp?-1:r==i.length?l4(t,e.clientX):ha(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function c4(t,e){let n=Hy(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),o=r.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let a=Hy(t,r);if(!a)return i;let l=a4(t.state,n,a);return l.length?o?K.create(l.concat(i.ranges)):K.create(l):i}}:null}function u4(t){let e=n=>n.altKey&&n.button==0;return Oe.mouseSelectionStyle.of((n,i)=>e(i)?c4(n,i):null)}const O4={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},f4={style:"cursor: crosshair"};function d4(t={}){let[e,n]=O4[t.key||"Alt"],i=Ct.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Oe.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?f4:null})]}const Ca="-10000px";class gx{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;ln[c]=l),n.length=a.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}}function h4(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const xd=ge.define({combine:t=>{var e,n,i;return{position:$e.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||h4}}}),Ky=new WeakMap,Qg=Ct.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(xd);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new gx(t,yg,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(xd);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Ca,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if($e.gecko)n=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==Ca&&s.style.left=="0px"){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=pg(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(xd).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,o=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||O.rightMath.min(n.right,i.right)+.1)){u.style.top=Ca;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,h=d?7:0,p=f.right-f.left,$=(e=Ky.get(c))!==null&&e!==void 0?e:f.bottom-f.top,g=c.offset||m4,b=this.view.textDirection==Qt.LTR,Q=f.width>i.right-i.left?b?i.left:i.right-f.width:b?Math.max(i.left,Math.min(O.left-(d?14:0)+g.x,i.right-p)):Math.min(Math.max(i.left,O.left-p+(d?14:0)-g.x),i.right-p),y=this.above[a];!l.strictSide&&(y?O.top-$-h-g.yi.bottom)&&y==i.bottom-O.bottom>O.top-i.top&&(y=this.above[a]=!y);let v=(y?O.top-i.top:i.bottom-O.bottom)-h;if(v<$&&c.resize!==!1){if(vQ&&x.topS&&(S=y?x.top-$-2-h:x.bottom+h+2);if(this.position=="absolute"?(u.style.top=(S-t.parent.top)/s+"px",Jy(u,(Q-t.parent.left)/r)):(u.style.top=S/s+"px",Jy(u,Q/r)),d){let x=O.left+(b?g.x:-g.x)-(Q+14-7);d.style.left=x/r+"px"}c.overlap!==!0&&o.push({left:Q,top:S,right:P,bottom:S+$}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ca}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Jy(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const p4=Oe.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),m4={x:0,y:0},yg=ge.define({enables:[Qg,p4]}),hO=ge.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Rf{static create(e){return new Rf(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new gx(e,hO,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const g4=yg.compute([hO],t=>{let e=t.facet(hO);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:Rf.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class $4{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=l&&l.dir==Qt.RTL?-1:1;s=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>En(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Qg),n=e?e.manager.tooltips.findIndex(i=>i.create==Rf.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!Q4(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!y4(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const nu=4;function Q4(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();r=Math.min(a.top,r),s=Math.max(a.bottom,s)}return e.clientX>=n-nu&&e.clientX<=i+nu&&e.clientY>=r-nu&&e.clientY<=s+nu}function y4(t,e,n,i,r,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.rightr||Math.min(o.bottom,a)=e&&l<=n}function b4(t,e={}){let n=Ve.define(),i=Ft.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of r){let l=s.changes.mapPos(a.pos,-1,nn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}r=o}for(let o of s.effects)o.is(n)&&(r=o.value),o.is(v4)&&(r=[]);return r},provide:r=>hO.from(r)});return{active:i,extension:[i,Ct.define(r=>new $4(r,t,i,n,e.hoverTime||300)),g4]}}function $x(t,e){let n=t.plugin(Qg);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const v4=Ve.define(),eb=ge.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Vl(t,e){let n=t.plugin(Qx),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const Qx=Ct.fromClass(class{constructor(t){this.input=t.state.facet(El),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(eb);this.top=new iu(t,!0,e.topContainer),this.bottom=new iu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(eb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new iu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new iu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(El);if(n!=this.input){let i=n.filter(l=>l),r=[],s=[],o=[],a=[];for(let l of i){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),r.push(u),(u.top?s:o).push(u)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Oe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class iu{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=tb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=tb(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function tb(t){let e=t.nextSibling;return t.remove(),e}const El=ge.define({enables:Qx});class Cr extends Ws{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Cr.prototype.elementClass="";Cr.prototype.toDOM=void 0;Cr.prototype.mapMode=nn.TrackBefore;Cr.prototype.startSide=Cr.prototype.endSide=-1;Cr.prototype.point=!0;const ku=ge.define(),S4=ge.define(),P4={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Je.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},sl=ge.define();function _4(t){return[yx(),sl.of({...P4,...t})]}const nb=ge.define({combine:t=>t.some(e=>e)});function yx(t){return[x4]}const x4=Ct.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(sl).map(e=>new rb(t,e)),this.fixed=!t.state.facet(nb);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(nb)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Je.iter(this.view.state.facet(ku),this.view.viewport.from),i=[],r=this.gutters.map(s=>new w4(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Pn.Text&&o){Tp(n,i,a.from);for(let l of r)l.line(this.view,a,i);o=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(s.type==Pn.Text){Tp(n,i,s.from);for(let o of r)o.line(this.view,s,i)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(sl),n=t.state.facet(sl),i=t.docChanged||t.heightChanged||t.viewportChanged||!Je.eq(t.startState.facet(ku),t.state.facet(ku),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let o=e.indexOf(s);o<0?r.push(new rb(this.view,s)):(this.gutters[o].update(t),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Oe.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Qt.LTR?{left:i,right:r}:{right:i,left:r}})});function ib(t){return Array.isArray(t)?t:[t]}function Tp(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class w4{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Je.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==r.elements.length){let a=new bx(e,o,s,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];Tp(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(S4)){let o=s(e,n.widget,n);o&&(r||(r=[])).push(o)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class rb{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=ib(n.markers(e)),n.initialSpacer&&(this.spacer=new bx(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=ib(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!Je.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class bx{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),T4(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=ss(a,l,c)||o(a,l,c):o}return i}})}});class wd extends Cr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Td(t,e){return t.state.facet(So).formatNumber(e,t.state)}const C4=sl.compute([So],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(k4)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new wd(Td(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(R4)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(So)!=e.state.facet(So),initialSpacer(e){return new wd(Td(e,sb(e.state.doc.lines)))},updateSpacer(e,n){let i=Td(n.view,sb(n.view.state.doc.lines));return i==e.number?e:new wd(i)},domEventHandlers:t.facet(So).domEventHandlers,side:"before"}));function X4(t={}){return[So.of(t),yx(),C4]}function sb(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(V4.range(r)))}return Je.of(e)});function A4(){return E4}const vx=1024;let q4=0;class ii{constructor(e,n){this.from=e,this.to=n}}class qe{constructor(e={}){this.id=q4++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=xn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}qe.closedBy=new qe({deserialize:t=>t.split(" ")});qe.openedBy=new qe({deserialize:t=>t.split(" ")});qe.group=new qe({deserialize:t=>t.split(" ")});qe.isolate=new qe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});qe.contextHash=new qe({perNode:!0});qe.lookAhead=new qe({perNode:!0});qe.mounted=new qe({perNode:!0});class Al{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[qe.mounted.id]}}const Z4=Object.create(null);class xn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):Z4,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new xn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(qe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(qe.group),s=-1;s<(r?r.length:0);s++){let o=n[s<0?i.name:r[s]];if(o)return o}}}}xn.none=new xn("",Object.create(null),0,8);class bg{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(o|pt.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Pg(xn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new _t(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new _t(xn.none,n,i,r)))}static build(e){return I4(e)}}_t.empty=new _t(xn.none,[],[],0);class vg{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new vg(this.buffer,this.index)}}class ds{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return xn.none}toString(){let e=[];for(let n=0;n0));l=o[l+3]);return a}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function ql(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=c;e+=n){let u=a[e],O=l[e]+o.from;if(Sx(r,i,O,O+u.length)){if(u instanceof ds){if(s&pt.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,i-O,r);if(f>-1)return new Yi(new z4(o,u,e,O),null,f)}else if(s&pt.IncludeAnonymous||!u.type.isAnonymous||Sg(u)){let f;if(!(s&pt.IgnoreMounts)&&(f=Al.get(u))&&!f.overlay)return new dn(f.tree,O,e,o);let d=new dn(u,O,e,o);return s&pt.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?u.children.length-1:0,n,i,r)}}}if(s&pt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&pt.IgnoreOverlays)&&(r=Al.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:a}of r.overlay)if((n>0?o<=s:o=s:a>s))return new dn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function ab(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function kp(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class z4{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Yi extends Px{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Yi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&pt.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Yi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Yi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Yi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),n.push(0)}return new _t(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function _x(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;sn.from||o.to=e){let a=new dn(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(ql(a,e,n,!1))}}return r?_x(r):i}class pO{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof dn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof dn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&pt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&pt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&pt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=n+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let a=i._tree.children[s];if(this.mode&pt.IncludeAnonymous||a instanceof ds||!a.type.isAnonymous||Sg(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return kp(this._tree,e,r);let o=i[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Sg(t){return t.children.some(e=>e instanceof ds||!e.type.isAnonymous||Sg(e))}function I4(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=vx,reused:s=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(n)?new vg(n,n.length):n,l=i.types,c=0,u=0;function O(v,S,P,x,C,Z){let{id:W,start:E,end:te,size:se}=a,le=u,F=c;for(;se<0;)if(a.next(),se==-1){let Se=s[W];P.push(Se),x.push(E-v);return}else if(se==-3){c=W;return}else if(se==-4){u=W;return}else throw new RangeError(`Unrecognized record size: ${se}`);let I=l[W],z,J,ue=E-v;if(te-E<=r&&(J=$(a.pos-S,C))){let Se=new Uint16Array(J.size-J.skip),fe=a.pos-J.size,Te=Se.length;for(;a.pos>fe;)Te=g(J.start,Se,Te);z=new ds(Se,te-J.start,i),ue=J.start-v}else{let Se=a.pos-se;a.next();let fe=[],Te=[],Ee=W>=o?W:-1,Ke=0,Ze=te;for(;a.pos>Se;)Ee>=0&&a.id==Ee&&a.size>=0?(a.end<=Ze-r&&(h(fe,Te,E,Ke,a.end,Ze,Ee,le,F),Ke=fe.length,Ze=a.end),a.next()):Z>2500?f(E,Se,fe,Te):O(E,Se,fe,Te,Ee,Z+1);if(Ee>=0&&Ke>0&&Ke-1&&Ke>0){let Xe=d(I,F);z=Pg(I,fe,Te,0,fe.length,0,te-E,Xe,Xe)}else z=p(I,fe,Te,te-E,le-te,F)}P.push(z),x.push(ue)}function f(v,S,P,x){let C=[],Z=0,W=-1;for(;a.pos>S;){let{id:E,start:te,end:se,size:le}=a;if(le>4)a.next();else{if(W>-1&&te=0;se-=3)E[le++]=C[se],E[le++]=C[se+1]-te,E[le++]=C[se+2]-te,E[le++]=le;P.push(new ds(E,C[2]-te,i)),x.push(te-v)}}function d(v,S){return(P,x,C)=>{let Z=0,W=P.length-1,E,te;if(W>=0&&(E=P[W])instanceof _t){if(!W&&E.type==v&&E.length==C)return E;(te=E.prop(qe.lookAhead))&&(Z=x[W]+E.length+te)}return p(v,P,x,C,Z,S)}}function h(v,S,P,x,C,Z,W,E,te){let se=[],le=[];for(;v.length>x;)se.push(v.pop()),le.push(S.pop()+P-C);v.push(p(i.types[W],se,le,Z-C,E-Z,te)),S.push(C-P)}function p(v,S,P,x,C,Z,W){if(Z){let E=[qe.contextHash,Z];W=W?[E].concat(W):[E]}if(C>25){let E=[qe.lookAhead,C];W=W?[E].concat(W):[E]}return new _t(v,S,P,x,W)}function $(v,S){let P=a.fork(),x=0,C=0,Z=0,W=P.end-r,E={size:0,start:0,skip:0};e:for(let te=P.pos-v;P.pos>te;){let se=P.size;if(P.id==S&&se>=0){E.size=x,E.start=C,E.skip=Z,Z+=4,x+=4,P.next();continue}let le=P.pos-se;if(se<0||le=o?4:0,I=P.start;for(P.next();P.pos>le;){if(P.size<0)if(P.size==-3)F+=4;else break e;else P.id>=o&&(F+=4);P.next()}C=I,x+=se,Z+=F}return(S<0||x==v)&&(E.size=x,E.start=C,E.skip=Z),E.size>4?E:void 0}function g(v,S,P){let{id:x,start:C,end:Z,size:W}=a;if(a.next(),W>=0&&x4){let te=a.pos-(W-4);for(;a.pos>te;)P=g(v,S,P)}S[--P]=E,S[--P]=Z-v,S[--P]=C-v,S[--P]=x}else W==-3?c=x:W==-4&&(u=x);return P}let b=[],Q=[];for(;a.pos>0;)O(t.start||0,t.bufferStart||0,b,Q,-1,0);let y=(e=t.length)!==null&&e!==void 0?e:b.length?Q[0]+b[0].length:0;return new _t(l[t.topID],b.reverse(),Q.reverse(),y)}const lb=new WeakMap;function Ru(t,e){if(!t.isAnonymous||e instanceof ds||e.type!=t)return 1;let n=lb.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof _t)){n=1;break}n+=Ru(t,i)}lb.set(e,n)}return n}function Pg(t,e,n,i,r,s,o,a,l){let c=0;for(let h=i;h=u)break;S+=P}if(Q==y+1){if(S>u){let P=h[y];d(P.children,P.positions,0,P.children.length,p[y]+b);continue}O.push(h[y])}else{let P=p[Q-1]+h[Q-1].length-v;O.push(Pg(t,h,p,y,Q,v,P,null,l))}f.push(v+b-s)}}return d(e,n,i,r,0),(a||l)(O,f,o)}class xx{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Yi?this.setBuffer(e.context.buffer,e.index,n):e instanceof dn&&this.map.set(e.tree,n)}get(e){return e instanceof Yi?this.getBuffer(e.context.buffer,e.index):e instanceof dn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class yr{constructor(e,n,i,r,s=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new yr(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a=i)for(;o&&o.from=f.from||O<=f.to||c){let d=Math.max(f.from,l)-c,h=Math.min(f.to,O)-c;f=d>=h?null:new yr(d,h,f.tree,f.offset+c,a>0,!!u)}if(f&&r.push(f),o.to>O)break;o=snew ii(r.from,r.to)):[new ii(0,0)]:[new ii(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class U4{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function Tx(t){return(e,n,i,r)=>new L4(e,t,n,i,r)}class cb{constructor(e,n,i,r,s){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=s}}function ub(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class D4{constructor(e,n,i,r,s,o,a){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const Rp=new qe({perNode:!0});class L4{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new _t(i.type,i.children,i.positions,i.length,i.propValues.concat([[Rp,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[qe.mounted.id]=new Al(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let c=n.mounts.find(u=>u.frag.from<=r.from&&u.frag.to>=r.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let O=u.from+c.pos,f=u.to+c.pos;O>=r.from&&f<=r.to&&!n.ranges.some(d=>d.fromO)&&n.ranges.push({from:O,to:f})}}a=!1}else if(i&&(o=W4(i.ranges,r.from,r.to)))a=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew ii(O.from-r.from,O.to-r.from)):null,r.tree,u.length?u[0].from:r.from)),s.overlay?u.length&&(i={ranges:u,depth:0,prev:i}):a=!1}}else if(n&&(l=n.predicate(r))&&(l===!0&&(l=new ii(r.from,r.to)),l.from=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let c=db(this.ranges,n.ranges);c.length&&(ub(c),this.inner.splice(n.index,0,new cb(n.parser,n.parser.startParse(this.input,hb(n.mounts,c),c),n.ranges.map(u=>new ii(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function W4(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function Ob(t,e,n,i,r,s){if(e=e&&n.enter(i,1,pt.IgnoreOverlays|pt.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof _t)n=n.children[0];else break}return!1}}let j4=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(Rp))!==null&&n!==void 0?n:i.to,this.inner=new fb(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(Rp))!==null&&e!==void 0?e:n.to,this.inner=new fb(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(qe.mounted);if(o&&o.parser==n)for(let a=this.fragI;a=s.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:s.from-l.offset,mount:o})}}}return r}};function db(t,e){let n=null,i=e;for(let r=1,s=0;r=a)break;l.to<=o||(n||(i=n=e.slice()),l.froma&&n.splice(s+1,0,new ii(a,l.to))):l.to>a?n[s--]=new ii(a,l.to):n.splice(s--,1))}}return i}function B4(t,e,n,i){let r=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=r==t.length?1e9:o?t[r].to:t[r].from,O=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let f=Math.max(l,n),d=Math.min(u,O,i);fnew ii(f.from+i,f.to+i)),O=B4(e,u,l,c);for(let f=0,d=l;;f++){let h=f==O.length,p=h?c:O[f].from;if(p>d&&n.push(new yr(d,p,r.tree,-o,s.from>=d||s.openStart,s.to<=p||s.openEnd)),h)break;d=O[f].to}}else n.push(new yr(l,c,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let G4=0;class ni{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=G4++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof ni&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new ni(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new mO(e);return i=>i.modified.indexOf(n)>-1?i:mO.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let F4=0;class mO{constructor(e){this.name=e,this.instances=[],this.id=F4++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&H4(n,a.modified));if(i)return i;let r=[],s=new ni(e.name,r,e,n);for(let a of n)a.instances.push(s);let o=K4(n);for(let a of e.set)if(!a.modified.length)for(let l of o)r.push(mO.get(a,l));return s}}function H4(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function K4(t){let e=[[]];for(let n=0;ni.length-n.length)}function pa(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],o=2,a=r;for(let O=0;;){if(a=="..."&&O>0&&O+3==r.length){o=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+r);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),O+=f[0].length,O==r.length)break;let d=r[O++];if(O==r.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+r);a=r.slice(O)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+r);let u=new gO(i,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return kx.add(e)}const kx=new qe;class gO{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=r;for(let a of s)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:i}}function J4(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function eU(t,e,n,i=0,r=t.length){let s=new tU(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class tU{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:o,from:a,to:l}=e;if(a>=i||l<=n)return;o.isTop&&(s=this.highlighters.filter(d=>!d.scope||d.scope(o)));let c=r,u=nU(e)||gO.empty,O=J4(s,u.tags);if(O&&(c&&(c+=" "),c+=O,u.mode==1&&(r+=(r?" ":"")+O)),this.startSpan(Math.max(n,a),c),u.opaque)return;let f=e.tree&&e.tree.prop(qe.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+a,1),h=this.highlighters.filter($=>!$.scope||$.scope(f.tree.type)),p=e.firstChild();for(let $=0,g=a;;$++){let b=$=Q||!e.nextSibling())););if(!b||Q>i)break;g=b.to+a,g>n&&(this.highlightRange(d.cursor(),Math.max(n,b.from+a),Math.min(i,g),"",h),this.startSpan(Math.min(i,g),c))}p&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}}function nU(t){let e=t.type.prop(kx);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ce=ni.define,su=ce(),Br=ce(),pb=ce(Br),mb=ce(Br),Gr=ce(),ou=ce(Gr),kd=ce(Gr),Xi=ce(),Ts=ce(Xi),ki=ce(),Ri=ce(),Cp=ce(),Xa=ce(Cp),au=ce(),k={comment:su,lineComment:ce(su),blockComment:ce(su),docComment:ce(su),name:Br,variableName:ce(Br),typeName:pb,tagName:ce(pb),propertyName:mb,attributeName:ce(mb),className:ce(Br),labelName:ce(Br),namespace:ce(Br),macroName:ce(Br),literal:Gr,string:ou,docString:ce(ou),character:ce(ou),attributeValue:ce(ou),number:kd,integer:ce(kd),float:ce(kd),bool:ce(Gr),regexp:ce(Gr),escape:ce(Gr),color:ce(Gr),url:ce(Gr),keyword:ki,self:ce(ki),null:ce(ki),atom:ce(ki),unit:ce(ki),modifier:ce(ki),operatorKeyword:ce(ki),controlKeyword:ce(ki),definitionKeyword:ce(ki),moduleKeyword:ce(ki),operator:Ri,derefOperator:ce(Ri),arithmeticOperator:ce(Ri),logicOperator:ce(Ri),bitwiseOperator:ce(Ri),compareOperator:ce(Ri),updateOperator:ce(Ri),definitionOperator:ce(Ri),typeOperator:ce(Ri),controlOperator:ce(Ri),punctuation:Cp,separator:ce(Cp),bracket:Xa,angleBracket:ce(Xa),squareBracket:ce(Xa),paren:ce(Xa),brace:ce(Xa),content:Xi,heading:Ts,heading1:ce(Ts),heading2:ce(Ts),heading3:ce(Ts),heading4:ce(Ts),heading5:ce(Ts),heading6:ce(Ts),contentSeparator:ce(Xi),list:ce(Xi),quote:ce(Xi),emphasis:ce(Xi),strong:ce(Xi),link:ce(Xi),monospace:ce(Xi),strikethrough:ce(Xi),inserted:ce(),deleted:ce(),changed:ce(),invalid:ce(),meta:au,documentMeta:ce(au),annotation:ce(au),processingInstruction:ce(au),definition:ni.defineModifier("definition"),constant:ni.defineModifier("constant"),function:ni.defineModifier("function"),standard:ni.defineModifier("standard"),local:ni.defineModifier("local"),special:ni.defineModifier("special")};for(let t in k){let e=k[t];e instanceof ni&&(e.name=t)}Rx([{tag:k.link,class:"tok-link"},{tag:k.heading,class:"tok-heading"},{tag:k.emphasis,class:"tok-emphasis"},{tag:k.strong,class:"tok-strong"},{tag:k.keyword,class:"tok-keyword"},{tag:k.atom,class:"tok-atom"},{tag:k.bool,class:"tok-bool"},{tag:k.url,class:"tok-url"},{tag:k.labelName,class:"tok-labelName"},{tag:k.inserted,class:"tok-inserted"},{tag:k.deleted,class:"tok-deleted"},{tag:k.literal,class:"tok-literal"},{tag:k.string,class:"tok-string"},{tag:k.number,class:"tok-number"},{tag:[k.regexp,k.escape,k.special(k.string)],class:"tok-string2"},{tag:k.variableName,class:"tok-variableName"},{tag:k.local(k.variableName),class:"tok-variableName tok-local"},{tag:k.definition(k.variableName),class:"tok-variableName tok-definition"},{tag:k.special(k.variableName),class:"tok-variableName2"},{tag:k.definition(k.propertyName),class:"tok-propertyName tok-definition"},{tag:k.typeName,class:"tok-typeName"},{tag:k.namespace,class:"tok-namespace"},{tag:k.className,class:"tok-className"},{tag:k.macroName,class:"tok-macroName"},{tag:k.propertyName,class:"tok-propertyName"},{tag:k.operator,class:"tok-operator"},{tag:k.comment,class:"tok-comment"},{tag:k.meta,class:"tok-meta"},{tag:k.invalid,class:"tok-invalid"},{tag:k.punctuation,class:"tok-punctuation"}]);var Rd;const Po=new qe;function Cx(t){return ge.define({combine:t?e=>e.concat(t):void 0})}const _g=new qe;class mi{constructor(e,n,i=[],r=""){this.data=e,this.name=r,De.prototype.hasOwnProperty("tree")||Object.defineProperty(De.prototype,"tree",{get(){return Pt(this)}}),this.parser=n,this.extension=[ps.of(this),De.languageData.of((s,o,a)=>{let l=gb(s,o,a),c=l.type.prop(Po);if(!c)return[];let u=s.facet(c),O=l.type.prop(_g);if(O){let f=l.resolve(o-l.from,a);for(let d of O)if(d.test(f,s)){let h=s.facet(d.facet);return d.type=="replace"?h:h.concat(u)}}return u})].concat(i)}isActiveAt(e,n,i=-1){return gb(e,n,i).type.prop(Po)==this.data}findRegions(e){let n=e.facet(ps);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Po)==this.data){i.push({from:o,to:o+s.length});return}let a=s.prop(qe.mounted);if(a){if(a.tree.prop(Po)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+s.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new hs(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Pt(t){let e=t.field(mi.state,!1);return e?e.tree:_t.empty}class iU{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Va=null;class $O{constructor(e,n,i=[],r,s,o,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new $O(e,n,[],_t.empty,0,i,[],null)}startParse(){return this.parser.startParse(new iU(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=_t.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(yr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Va;Va=this;try{return e()}finally{Va=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=$b(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,O,f)=>l.push({fromA:c,toA:u,fromB:O,toB:f})),i=yr.applyChanges(i,l),r=_t.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),O=e.mapPos(c.to,-1);ue.from&&(this.fragments=$b(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends wx{createParse(n,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let l=Va;if(l){for(let c of r)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new _t(xn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Va}}function $b(t,e,n){return yr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class ea{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new ea(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=$O.create(e.facet(ps).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new ea(i)}}mi.state=Ft.define({create:ea.init,update(t,e){for(let n of e.effects)if(n.is(mi.setState))return n.value;return e.startState.facet(ps)!=e.state.facet(ps)?ea.init(e.state):t.apply(e)}});let Xx=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Xx=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Cd=typeof navigator<"u"&&(!((Rd=navigator.scheduling)===null||Rd===void 0)&&Rd.isInputPending)?()=>navigator.scheduling.isInputPending():null,rU=Ct.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(mi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(mi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=Xx(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=s.context.work(()=>Cd&&Cd()||Date.now()>o,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:mi.setState.of(new ea(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>En(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ps=ge.define({combine(t){return t.length?t[0]:null},enables:t=>[mi.state,rU,Oe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class dc{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const sU=ge.define(),hc=ge.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function QO(t){let e=t.facet(hc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Zl(t,e){let n="",i=t.tabSize,r=t.facet(hc)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s=e?oU(t,n,e):null}class Cf{constructor(e,n={}){this.state=e,this.options=n,this.unit=QO(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return ha(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ma=new qe;function oU(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let o=r;o&&!(o.fromi.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)i={node:s[o],next:i}}return Vx(i,t,n)}function Vx(t,e,n){for(let i=t;i;i=i.next){let r=lU(i.node);if(r)return r(wg.create(e,n,i))}return 0}function aU(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function lU(t){let e=t.type.prop(ma);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(qe.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>Ax(o,!0,1,void 0,s&&!aU(o)?r.from:void 0)}return t.parent==null?cU:null}function cU(){return 0}class wg extends Cf{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new wg(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(uU(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return Vx(this.context.next,this.base,this.pos)}}function uU(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function OU(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function Ex({closing:t,align:e=!0,units:n=1}){return i=>Ax(i,e,n,t)}function Ax(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=i&&s.slice(o,o+i.length)==i||r==t.pos+o,l=e?OU(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const fU=t=>t.baseIndent;function Ms({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const dU=200;function hU(){return De.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+dU)return t;let s=n.sliceString(r.from,i);if(!e.some(c=>c.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==a)continue;a=u.from;let O=xg(o,u.from);if(O==null)continue;let f=/^\s*/.exec(u.text)[0],d=Zl(o,O);f!=d&&l.push({from:u.from,to:u.from+f.length,insert:d})}return l.length?[t,{changes:l,sequential:!0}]:t})}const pU=ge.define(),ga=new qe;function Tg(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&a.from=e&&c.to>n&&(s=c)}}return s}function gU(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function yO(t,e,n){for(let i of t.facet(pU)){let r=i(t,e,n);if(r)return r}return mU(t,e,n)}function qx(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Xf=Ve.define({map:qx}),pc=Ve.define({map:qx});function Zx(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Gs=Ft.define({create(){return xe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=Qb(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Xf)&&!$U(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(Mx),r=i?xe.replace({widget:new _U(i(e.state,n.value))}):yb;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(pc)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=Qb(t,e.selection.main.head)),t},provide:t=>Oe.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{re&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function bO(t,e,n){var i;let r=null;return(i=t.field(Gs,!1))===null||i===void 0||i.between(e,n,(s,o)=>{(!r||r.from>s)&&(r={from:s,to:o})}),r}function $U(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function zx(t,e){return t.field(Gs,!1)?e:e.concat(Ve.appendConfig.of(Ix()))}const QU=t=>{for(let e of Zx(t)){let n=yO(t.state,e.from,e.to);if(n)return t.dispatch({effects:zx(t.state,[Xf.of(n),Yx(t,n)])}),!0}return!1},yU=t=>{if(!t.state.field(Gs,!1))return!1;let e=[];for(let n of Zx(t)){let i=bO(t.state,n.from,n.to);i&&e.push(pc.of(i),Yx(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function Yx(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Oe.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const bU=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Gs,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(pc.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},SU=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:QU},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:yU},{key:"Ctrl-Alt-[",run:bU},{key:"Ctrl-Alt-]",run:vU}],PU={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Mx=ge.define({combine(t){return er(t,PU)}});function Ix(t){return[Gs,TU]}function Ux(t,e){let{state:n}=t,i=n.facet(Mx),r=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=bO(t.state,a.from,a.to);l&&t.dispatch({effects:pc.of(l)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const yb=xe.replace({widget:new class extends tr{toDOM(t){return Ux(t,null)}}});class _U extends tr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ux(e,this.value)}}const xU={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Xd extends Cr{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function wU(t={}){let e={...xU,...t},n=new Xd(e,!0),i=new Xd(e,!1),r=Ct.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(ps)!=o.state.facet(ps)||o.startState.field(Gs,!1)!=o.state.field(Gs,!1)||Pt(o.startState)!=Pt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new kr;for(let l of o.viewportLineBlocks){let c=bO(o.state,l.from,l.to)?i:yO(o.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:s}=e;return[r,_4({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(r))===null||a===void 0?void 0:a.markers)||Je.empty},initialSpacer(){return new Xd(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let c=bO(o.state,a.from,a.to);if(c)return o.dispatch({effects:pc.of(c)}),!0;let u=yO(o.state,a.from,a.to);return u?(o.dispatch({effects:Xf.of(u)}),!0):!1}}}),Ix()]}const TU=Oe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Vf{constructor(e,n){this.specs=e;let i;function r(a){let l=us.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof mi?a=>a.prop(Po)==o.data:o?a=>a==o:void 0,this.style=Rx(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=i?new us(i):null,this.themeType=n.themeType}static define(e,n){return new Vf(e,n||{})}}const Xp=ge.define(),Dx=ge.define({combine(t){return t.length?[t[0]]:null}});function Vd(t){let e=t.facet(Xp);return e.length?e:t.facet(Dx)}function kU(t,e){let n=[CU],i;return t instanceof Vf&&(t.module&&n.push(Oe.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(Dx.of(t)):i?n.push(Xp.computeN([Oe.darkTheme],r=>r.facet(Oe.darkTheme)==(i=="dark")?[t]:[])):n.push(Xp.of(t)),n}class RU{constructor(e){this.markCache=Object.create(null),this.tree=Pt(e.state),this.decorations=this.buildDeco(e,Vd(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Pt(e.state),i=Vd(e.state),r=i!=Vd(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return xe.none;let i=new kr;for(let{from:r,to:s}of e.visibleRanges)eU(this.tree,n,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=xe.mark({class:l})))},r,s);return i.finish()}}const CU=Ss.high(Ct.fromClass(RU,{decorations:t=>t.decorations})),XU=Vf.define([{tag:k.meta,color:"#404740"},{tag:k.link,textDecoration:"underline"},{tag:k.heading,textDecoration:"underline",fontWeight:"bold"},{tag:k.emphasis,fontStyle:"italic"},{tag:k.strong,fontWeight:"bold"},{tag:k.strikethrough,textDecoration:"line-through"},{tag:k.keyword,color:"#708"},{tag:[k.atom,k.bool,k.url,k.contentSeparator,k.labelName],color:"#219"},{tag:[k.literal,k.inserted],color:"#164"},{tag:[k.string,k.deleted],color:"#a11"},{tag:[k.regexp,k.escape,k.special(k.string)],color:"#e40"},{tag:k.definition(k.variableName),color:"#00f"},{tag:k.local(k.variableName),color:"#30a"},{tag:[k.typeName,k.namespace],color:"#085"},{tag:k.className,color:"#167"},{tag:[k.special(k.variableName),k.macroName],color:"#256"},{tag:k.definition(k.propertyName),color:"#00c"},{tag:k.comment,color:"#940"},{tag:k.invalid,color:"#f00"}]),VU=Oe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Lx=1e4,Wx="()[]{}",Nx=ge.define({combine(t){return er(t,{afterCursor:!0,brackets:Wx,maxScanDistance:Lx,renderMatch:qU})}}),EU=xe.mark({class:"cm-matchingBracket"}),AU=xe.mark({class:"cm-nonmatchingBracket"});function qU(t){let e=[],n=t.matched?EU:AU;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const ZU=Ft.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(Nx);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Mi(e.state,r.head,-1,i)||r.head>0&&Mi(e.state,r.head-1,1,i)||i.afterCursor&&(Mi(e.state,r.head,1,i)||r.headOe.decorations.from(t)}),zU=[ZU,VU];function YU(t={}){return[Nx.of(t),zU]}const kg=new qe;function Vp(t,e,n){let i=t.prop(e<0?qe.openedBy:qe.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function Ep(t){let e=t.type.prop(kg);return e?e(t.node):t}function Mi(t,e,n,i={}){let r=i.maxScanDistance||Lx,s=i.brackets||Wx,o=Pt(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=Vp(l.type,n,s);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return MU(t,e,n,l,u,c,s)}}return IU(t,e,n,o,a.type,r,s)}function MU(t,e,n,i,r,s,o){let a=i.parent,l={from:r.from,to:r.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do if(n<0?u.to<=i.from:u.from>=i.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),O=0;for(let f=0;!u.next().done&&f<=s;){let d=u.value;n<0&&(f+=d.length);let h=e+f*n;for(let p=n>0?0:d.length-1,$=n>0?d.length:-1;p!=$;p+=n){let g=o.indexOf(d[p]);if(!(g<0||i.resolveInner(h+p,1).type!=r))if(g%2==0==n>0)O++;else{if(O==1)return{start:c,end:{from:h+p,to:h+p+1},matched:g>>1==l>>1};O--}}n>0&&(f+=d.length)}return u.done?{start:c,matched:!1}:null}const UU=Object.create(null),bb=[xn.none],vb=[],Sb=Object.create(null),DU=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])DU[t]=LU(UU,e);function Ed(t,e){vb.indexOf(t)>-1||(vb.push(t),console.warn(e))}function LU(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||k[c];u?typeof u=="function"?l.length?l=l.map(u):Ed(c,`Modifier ${c} used at start of tag`):l.length?Ed(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Ed(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),s=Sb[r];if(s)return s.id;let o=Sb[r]=xn.define({id:bb.length,name:i,props:[pa({[i]:n})]});return bb.push(o),o.id}Qt.RTL,Qt.LTR;const WU=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=Cg(t.state,n.from);return i.line?NU(t):i.block?BU(t):!1};function Rg(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const NU=Rg(HU,0),jU=Rg(jx,0),BU=Rg((t,e)=>jx(t,e,FU(e)),0);function Cg(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Ea=50;function GU(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Ea,i),o=t.sliceDoc(r,r+Ea),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let u,O;r-i<=2*Ea?u=O=t.sliceDoc(i,r):(u=t.sliceDoc(i,i+Ea),O=t.sliceDoc(r-Ea,r));let f=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(O)[0].length,h=O.length-d-n.length;return u.slice(f,f+e.length)==e&&O.slice(h,h+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(O.charAt(h-1))?1:0}}:null}function FU(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function jx(t,e,n=e.selection.ranges){let i=n.map(s=>Cg(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,o)=>GU(e,i[o],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let o=0,a;or&&(s==o||o>O.from)){r=O.from;let f=/^\s*/.exec(O.text)[0].length,d=f==O.length,h=O.text.slice(f,f+c.length)==c?f:-1;fs.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:O}of i)(O||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of i)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const Ap=Er.define(),KU=Er.define(),JU=ge.define(),Bx=ge.define({combine(t){return er(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),Gx=Ft.define({create(){return Ii.empty},update(t,e){let n=e.state.facet(Bx),i=e.annotation(Ap);if(i){let l=An.fromTransaction(e,i.selection),c=i.side,u=c==0?t.undone:t.done;return l?u=vO(u,u.length,n.minDepth,l):u=Kx(u,e.startState.selection),new Ii(c==0?i.rest:u,c==0?u:i.rest)}let r=e.annotation(KU);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(At.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=An.fromTransaction(e),o=e.annotation(At.time),a=e.annotation(At.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Ii(t.done.map(An.fromJSON),t.undone.map(An.fromJSON))}});function eD(t={}){return[Gx,Bx.of(t),Oe.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?Fx:e.inputType=="historyRedo"?qp:null;return i?(e.preventDefault(),i(n)):!1}})]}function Ef(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(Gx,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const Fx=Ef(0,!1),qp=Ef(1,!1),tD=Ef(0,!0),nD=Ef(1,!0);class An{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new An(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new An(e.changes&&It.fromJSON(e.changes),[],e.mapped&&Wi.fromJSON(e.mapped),e.startSelection&&K.fromJSON(e.startSelection),e.selectionsAfter.map(K.fromJSON))}static fromTransaction(e,n){let i=ri;for(let r of e.startState.facet(JU)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new An(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,ri)}static selection(e){return new An(void 0,ri,void 0,void 0,e)}}function vO(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function iD(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,o,a)=>{for(let l=0;l=c&&o<=u&&(i=!0)}}),i}function rD(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function Hx(t,e){return t.length?e.length?t.concat(e):t:e}const ri=[],sD=200;function Kx(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-sD));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),vO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[An.selection([e])]}function oD(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Ad(t,e){if(!t.length)return t;let n=t.length,i=ri;for(;n;){let r=aD(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[An.selection(i)]:ri}function aD(t,e,n){let i=Hx(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):ri,n);if(!t.changes)return An.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new An(r,Ve.mapEffects(t.effects,e),o,t.startSelection.map(s),i)}const lD=/^(input\.type|delete)($|\.)/;class Ii{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Ii(this.done,this.undone):this}addChanges(e,n,i,r,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||lD.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):Af(n,e))}function pn(t){return t.textDirectionAt(t.state.selection.main.head)==Qt.LTR}const ew=t=>Jx(t,!pn(t)),tw=t=>Jx(t,pn(t));function nw(t,e){return _i(t,n=>n.empty?t.moveByGroup(n,e):Af(n,e))}const uD=t=>nw(t,!pn(t)),OD=t=>nw(t,pn(t));function fD(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function qf(t,e,n){let i=Pt(t).resolveInner(e.head),r=n?qe.closedBy:qe.openedBy;for(let l=e.head;;){let c=n?i.childAfter(l):i.childBefore(l);if(!c)break;fD(t,c,r)?i=c:l=n?c.to:c.from}let s=i.type.prop(r),o,a;return s&&(o=n?Mi(t,i.from,1):Mi(t,i.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?i.to:i.from,K.cursor(a,n?-1:1)}const dD=t=>_i(t,e=>qf(t.state,e,!pn(t))),hD=t=>_i(t,e=>qf(t.state,e,pn(t)));function iw(t,e){return _i(t,n=>{if(!n.empty)return Af(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const rw=t=>iw(t,!1),sw=t=>iw(t,!0);function ow(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):Af(o,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;o&&o.top>l&&o.bottomaw(t,!1),Zp=t=>aw(t,!0);function Ps(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=K.cursor(i.from+s))}return r}const pD=t=>_i(t,e=>Ps(t,e,!0)),mD=t=>_i(t,e=>Ps(t,e,!1)),gD=t=>_i(t,e=>Ps(t,e,!pn(t))),$D=t=>_i(t,e=>Ps(t,e,pn(t))),QD=t=>_i(t,e=>K.cursor(t.lineBlockAt(e.head).from,1)),yD=t=>_i(t,e=>K.cursor(t.lineBlockAt(e.head).to,-1));function bD(t,e,n){let i=!1,r=$a(t.selection,s=>{let o=Mi(t,s.head,-1)||Mi(t,s.head,1)||s.head>0&&Mi(t,s.head-1,1)||s.headbD(t,e);function fi(t,e){let n=$a(t.state.selection,i=>{let r=e(i);return K.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(nr(t.state,n)),!0)}function lw(t,e){return fi(t,n=>t.moveByChar(n,e))}const cw=t=>lw(t,!pn(t)),uw=t=>lw(t,pn(t));function Ow(t,e){return fi(t,n=>t.moveByGroup(n,e))}const SD=t=>Ow(t,!pn(t)),PD=t=>Ow(t,pn(t)),_D=t=>fi(t,e=>qf(t.state,e,!pn(t))),xD=t=>fi(t,e=>qf(t.state,e,pn(t)));function fw(t,e){return fi(t,n=>t.moveVertically(n,e))}const dw=t=>fw(t,!1),hw=t=>fw(t,!0);function pw(t,e){return fi(t,n=>t.moveVertically(n,e,ow(t).height))}const _b=t=>pw(t,!1),xb=t=>pw(t,!0),wD=t=>fi(t,e=>Ps(t,e,!0)),TD=t=>fi(t,e=>Ps(t,e,!1)),kD=t=>fi(t,e=>Ps(t,e,!pn(t))),RD=t=>fi(t,e=>Ps(t,e,pn(t))),CD=t=>fi(t,e=>K.cursor(t.lineBlockAt(e.head).from)),XD=t=>fi(t,e=>K.cursor(t.lineBlockAt(e.head).to)),wb=({state:t,dispatch:e})=>(e(nr(t,{anchor:0})),!0),Tb=({state:t,dispatch:e})=>(e(nr(t,{anchor:t.doc.length})),!0),kb=({state:t,dispatch:e})=>(e(nr(t,{anchor:t.selection.main.anchor,head:0})),!0),Rb=({state:t,dispatch:e})=>(e(nr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),VD=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),ED=({state:t,dispatch:e})=>{let n=Zf(t).map(({from:i,to:r})=>K.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:K.create(n),userEvent:"select"})),!0},AD=({state:t,dispatch:e})=>{let n=$a(t.selection,i=>{let r=Pt(t),s=r.resolveStack(i.from,1);if(i.empty){let o=r.resolveStack(i.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&o.next)return K.range(a.to,a.from)}return i});return n.eq(t.selection)?!1:(e(nr(t,n)),!0)},qD=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=K.create([n.main]):n.main.empty||(i=K.create([K.cursor(n.main.head)])),i?(e(nr(t,i)),!0):!1};function mc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);lo&&(n="delete.forward",l=lu(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=lu(t,o,!1),a=lu(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:K.cursor(o,or(t)))i.between(e,e,(r,s)=>{re&&(e=n?s:r)});return e}const mw=(t,e,n)=>mc(t,i=>{let r=i.from,{state:s}=t,o=s.doc.lineAt(r),a,l;if(n&&!e&&r>o.from&&rmw(t,!1,!0),gw=t=>mw(t,!0,!1),$w=(t,e)=>mc(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=rn(s.text,i-s.from,e)+s.from,c=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||i!=n.head)&&(a=u),i=l}return i}),Qw=t=>$w(t,!1),ZD=t=>$w(t,!0),zD=t=>mc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headmc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),MD=t=>mc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Fe.of(["",""])},range:K.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},UD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),o=r==s.from?r-1:rn(s.text,r-s.from,!1)+s.from,a=r==s.to?r+1:rn(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(o,r))},range:K.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Zf(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function yw(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of Zf(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)r.push(K.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)r.push(K.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:K.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const DD=({state:t,dispatch:e})=>yw(t,e,!1),LD=({state:t,dispatch:e})=>yw(t,e,!0);function bw(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of Zf(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const WD=({state:t,dispatch:e})=>bw(t,e,!1),ND=({state:t,dispatch:e})=>bw(t,e,!0),jD=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Zf(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(t.lineWrapping){let o=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function BD(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Pt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(qe.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Cb=vw(!1),GD=vw(!0);function vw(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,a=e.doc.lineAt(s),l=!t&&s==o&&BD(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Cf(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=xg(c,s);for(u==null&&(u=ha(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));oa.from&&s{let r=[];for(let o=i.from;o<=i.to;){let a=t.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),o=a.to+1}let s=t.changes(r);return{changes:r,range:K.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const FD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Cf(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),r=Xg(t,(s,o,a)=>{let l=xg(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=Zl(t,l);(c!=u||a.fromt.readOnly?!1:(e(t.update(Xg(t,(n,i)=>{i.push({from:n.from,insert:t.facet(hc)})}),{userEvent:"input.indent"})),!0),Pw=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Xg(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=ha(r,t.tabSize),o=0,a=Zl(t,Math.max(0,s-QO(t)));for(;o(t.setTabFocusMode(),!0),KD=[{key:"Ctrl-b",run:ew,shift:cw,preventDefault:!0},{key:"Ctrl-f",run:tw,shift:uw},{key:"Ctrl-p",run:rw,shift:dw},{key:"Ctrl-n",run:sw,shift:hw},{key:"Ctrl-a",run:QD,shift:CD},{key:"Ctrl-e",run:yD,shift:XD},{key:"Ctrl-d",run:gw},{key:"Ctrl-h",run:zp},{key:"Ctrl-k",run:zD},{key:"Ctrl-Alt-h",run:Qw},{key:"Ctrl-o",run:ID},{key:"Ctrl-t",run:UD},{key:"Ctrl-v",run:Zp}],JD=[{key:"ArrowLeft",run:ew,shift:cw,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:uD,shift:SD,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:gD,shift:kD,preventDefault:!0},{key:"ArrowRight",run:tw,shift:uw,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:OD,shift:PD,preventDefault:!0},{mac:"Cmd-ArrowRight",run:$D,shift:RD,preventDefault:!0},{key:"ArrowUp",run:rw,shift:dw,preventDefault:!0},{mac:"Cmd-ArrowUp",run:wb,shift:kb},{mac:"Ctrl-ArrowUp",run:Pb,shift:_b},{key:"ArrowDown",run:sw,shift:hw,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Tb,shift:Rb},{mac:"Ctrl-ArrowDown",run:Zp,shift:xb},{key:"PageUp",run:Pb,shift:_b},{key:"PageDown",run:Zp,shift:xb},{key:"Home",run:mD,shift:TD,preventDefault:!0},{key:"Mod-Home",run:wb,shift:kb},{key:"End",run:pD,shift:wD,preventDefault:!0},{key:"Mod-End",run:Tb,shift:Rb},{key:"Enter",run:Cb,shift:Cb},{key:"Mod-a",run:VD},{key:"Backspace",run:zp,shift:zp},{key:"Delete",run:gw},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Qw},{key:"Mod-Delete",mac:"Alt-Delete",run:ZD},{mac:"Mod-Backspace",run:YD},{mac:"Mod-Delete",run:MD}].concat(KD.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),eL=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:dD,shift:_D},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:hD,shift:xD},{key:"Alt-ArrowUp",run:DD},{key:"Shift-Alt-ArrowUp",run:WD},{key:"Alt-ArrowDown",run:LD},{key:"Shift-Alt-ArrowDown",run:ND},{key:"Escape",run:qD},{key:"Mod-Enter",run:GD},{key:"Alt-l",mac:"Ctrl-l",run:ED},{key:"Mod-i",run:AD,preventDefault:!0},{key:"Mod-[",run:Pw},{key:"Mod-]",run:Sw},{key:"Mod-Alt-\\",run:FD},{key:"Shift-Mod-k",run:jD},{key:"Shift-Mod-\\",run:vD},{key:"Mod-/",run:WU},{key:"Alt-A",run:jU},{key:"Ctrl-m",mac:"Shift-Alt-m",run:HD}].concat(JD),tL={key:"Tab",run:Sw,shift:Pw},Xb=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ta{constructor(e,n,i=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?a=>s(Xb(a)):Xb,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Rn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=sg(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=qi(e);let r=this.normalize(n);if(r.length)for(let s=0,o=i;;s++){let a=r.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==r.length-1){if(l)return this.value=l,this;break}o==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=SO(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let a=new Zo(n,e.sliceString(n,i));return qd.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:s,from:o}=r;return o>n&&(s=e.sliceString(n,o)+s,o=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=SO(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Zo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(xw.prototype[Symbol.iterator]=ww.prototype[Symbol.iterator]=function(){return this});function nL(t){try{return new RegExp(t,Vg),!0}catch{return!1}}function SO(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Yp(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=lt("input",{class:"cm-textfield",name:"line",value:e}),i=lt("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:ol.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},lt("label",t.state.phrase("Go to line"),": ",n)," ",lt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),lt("button",{name:"close",onclick:()=>{t.dispatch({effects:ol.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,a=o.doc.lineAt(o.selection.main.head),[,l,c,u,O]=s,f=u?+u.slice(1):0,d=c?+c:a.number;if(c&&O){let $=d/100;l&&($=$*(l=="-"?-1:1)+a.number/o.doc.lines),d=Math.round(o.doc.lines*$)}else c&&l&&(d=d*(l=="-"?-1:1)+a.number);let h=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),p=K.cursor(h.from+Math.max(0,Math.min(f,h.length)));t.dispatch({effects:[ol.of(!1),Oe.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:i}}const ol=Ve.define(),Vb=Ft.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(ol)&&(t=n.value);return t},provide:t=>El.from(t,e=>e?Yp:null)}),iL=t=>{let e=Vl(t,Yp);if(!e){let n=[ol.of(!0)];t.state.field(Vb,!1)==null&&n.push(Ve.appendConfig.of([Vb,rL])),t.dispatch({effects:n}),e=Vl(t,Yp)}return e&&e.dom.querySelector("input").select(),!0},rL=Oe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),sL={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},oL=ge.define({combine(t){return er(t,sL,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function aL(t){return[fL,OL]}const lL=xe.mark({class:"cm-selectionMatch"}),cL=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Eb(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=vt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=vt.Word)}function uL(t,e,n,i){return t(e.sliceDoc(n,n+1))==vt.Word&&t(e.sliceDoc(i-1,i))==vt.Word}const OL=Ct.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(oL),{state:n}=t,i=n.selection;if(i.ranges.length>1)return xe.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return xe.none;let l=n.wordAt(r.head);if(!l)return xe.none;o=n.charCategorizer(r.head),s=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return xe.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),o=n.charCategorizer(r.head),!(Eb(o,n,r.from,r.to)&&uL(o,n,r.from,r.to)))return xe.none}else if(s=n.sliceDoc(r.from,r.to),!s)return xe.none}let a=[];for(let l of t.visibleRanges){let c=new ta(n.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:O}=c.value;if((!o||Eb(o,n,u,O))&&(r.empty&&u<=r.from&&O>=r.to?a.push(cL.range(u,O)):(u>=r.to||O<=r.from)&&a.push(lL.range(u,O)),a.length>e.maxMatches))return xe.none}}return xe.set(a)}},{decorations:t=>t.decorations}),fL=Oe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),dL=({state:t,dispatch:e})=>{let{selection:n}=t,i=K.create(n.ranges.map(r=>t.wordAt(r.head)||K.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function hL(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,a=new ta(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new ta(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const pL=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return dL({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=hL(t,i);return r?(e(t.update({selection:t.selection.addRange(K.range(r.from,r.to),!1),effects:Oe.scrollIntoView(r.to)})),!0):!1},Qa=ge.define({combine(t){return er(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new wL(e),scrollToMatch:e=>Oe.scrollIntoView(e)})}});class Tw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||nL(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new QL(this):new gL(this)}getCursor(e,n=0,i){let r=e.doc?e:De.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?$o(this,r,n,i):go(this,r,n,i)}}class kw{constructor(e){this.spec=e}}function go(t,e,n,i){return new ta(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?mL(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function mL(t,e){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=go(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function $o(t,e,n,i){return new xw(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?$L(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function PO(t,e){return t.slice(rn(t,e,!1),e)}function _O(t,e){return t.slice(e,rn(t,e))}function $L(t){return(e,n,i)=>!i[0].length||(t(PO(i.input,i.index))!=vt.Word||t(_O(i.input,i.index))!=vt.Word)&&(t(_O(i.input,i.index+i[0].length))!=vt.Word||t(PO(i.input,i.index+i[0].length))!=vt.Word)}class QL extends kw{nextMatch(e,n,i){let r=$o(this.spec,e,i,e.doc.length).next();return r.done&&(r=$o(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),o=$o(this.spec,e,s,i),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=$o(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const zl=Ve.define(),Eg=Ve.define(),is=Ft.define({create(t){return new Zd(Mp(t).create(),null)},update(t,e){for(let n of e.effects)n.is(zl)?t=new Zd(n.value.create(),t.panel):n.is(Eg)&&(t=new Zd(t.query,n.value?Ag:null));return t},provide:t=>El.from(t,e=>e.panel)});class Zd{constructor(e,n){this.query=e,this.panel=n}}const yL=xe.mark({class:"cm-searchMatch"}),bL=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),vL=Ct.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(is))}update(t){let e=t.state.field(is);(e!=t.startState.field(is)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,i=new kr;for(let r=0,s=n.visibleRanges,o=s.length;rs[r+1].from-2*250;)l=s[++r].to;t.highlight(n.state,a,l,(c,u)=>{let O=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);i.add(c,u,O?bL:yL)})}return i.finish()}},{decorations:t=>t.decorations});function gc(t){return e=>{let n=e.state.field(is,!1);return n&&n.query.spec.valid?t(e,n):Xw(e)}}const xO=gc((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=K.single(i.from,i.to),s=t.state.facet(Qa);return t.dispatch({selection:r,effects:[qg(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),Cw(t),!0}),wO=gc((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=K.single(r.from,r.to),o=t.state.facet(Qa);return t.dispatch({selection:s,effects:[qg(t,r),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),Cw(t),!0}),SL=gc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:K.create(n.map(i=>K.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),PL=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],o=0;for(let a=new ta(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(o=s.length),s.push(K.range(a.value.from,a.value.to))}return e(t.update({selection:K.create(s,o),userEvent:"select.search.matches"})),!0},Ab=gc((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==i&&o.to==r&&(c=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(Oe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let O=t.state.changes(a);return o&&(l=K.single(o.from,o.to).map(O),u.push(qg(t,o)),u.push(n.facet(Qa).scrollToMatch(l.main,t))),t.dispatch({changes:O,selection:l,effects:u,userEvent:"input.replace"}),!0}),_L=gc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:o}=r;return{from:s,to:o,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Oe.announce.of(i),userEvent:"input.replace.all"}),!0});function Ag(t){return t.state.facet(Qa).createPanel(t)}function Mp(t,e){var n,i,r,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(Qa);return new Tw({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:c.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function Rw(t){let e=Vl(t,Ag);return e&&e.dom.querySelector("[main-field]")}function Cw(t){let e=Rw(t);e&&e==t.root.activeElement&&e.select()}const Xw=t=>{let e=t.state.field(is,!1);if(e&&e.panel){let n=Rw(t);if(n&&n!=t.root.activeElement){let i=Mp(t.state,e.query.spec);i.valid&&t.dispatch({effects:zl.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Eg.of(!0),e?zl.of(Mp(t.state,e.query.spec)):Ve.appendConfig.of(kL)]});return!0},Vw=t=>{let e=t.state.field(is,!1);if(!e||!e.panel)return!1;let n=Vl(t,Ag);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Eg.of(!1)}),!0},xL=[{key:"Mod-f",run:Xw,scope:"editor search-panel"},{key:"F3",run:xO,shift:wO,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:xO,shift:wO,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Vw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:PL},{key:"Mod-Alt-g",run:iL},{key:"Mod-d",run:pL,preventDefault:!0}];class wL{constructor(e){this.view=e;let n=this.query=e.state.field(is).query.spec;this.commit=this.commit.bind(this),this.searchField=lt("input",{value:n.search,placeholder:In(e,"Find"),"aria-label":In(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=lt("input",{value:n.replace,placeholder:In(e,"Replace"),"aria-label":In(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=lt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=lt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=lt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,o){return lt("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=lt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>xO(e),[In(e,"next")]),i("prev",()=>wO(e),[In(e,"previous")]),i("select",()=>SL(e),[In(e,"all")]),lt("label",null,[this.caseField,In(e,"match case")]),lt("label",null,[this.reField,In(e,"regexp")]),lt("label",null,[this.wordField,In(e,"by word")]),...e.state.readOnly?[]:[lt("br"),this.replaceField,i("replace",()=>Ab(e),[In(e,"replace")]),i("replaceAll",()=>_L(e),[In(e,"replace all")])],lt("button",{name:"close",onclick:()=>Vw(e),"aria-label":In(e,"close"),type:"button"},["×"])])}commit(){let e=new Tw({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:zl.of(e)}))}keydown(e){V6(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?wO:xO)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Ab(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(zl)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Qa).top}}function In(t,e){return t.state.phrase(e)}const cu=30,uu=/[\s\.,:;?!]/;function qg(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-cu),o=Math.min(r,n+cu),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let l=0;la.length-cu;l--)if(!uu.test(a[l-1])&&uu.test(a[l])){a=a.slice(0,l);break}}return Oe.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const TL=Oe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),kL=[is,Ss.low(vL),TL];class Ew{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Pt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(qw(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function qb(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function RL(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:RL(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function CL(t,e){return n=>{for(let i=Pt(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class Zb{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function Is(t){return t.selection.main.from}function qw(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Zg=Er.define();function XL(t,e,n,i){let{main:r}=t.selection,s=n-r.from,o=i-r.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=r&&n!=i&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,i))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:i==r.from?a.to:a.from+o,insert:l},range:K.cursor(a.from+s+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const zb=new WeakMap;function VL(t){if(!Array.isArray(t))return t;let e=zb.get(t);return e||zb.set(t,e=Aw(t)),e}const TO=Ve.define(),Yl=Ve.define();class EL{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&v<=57||v>=97&&v<=122?2:v>=65&&v<=90?1:0:(S=sg(v))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!b||P==1&&$||y==0&&P!=0)&&(n[O]==v||i[O]==v&&(f=!0)?o[O++]=b:o.length&&(g=!1)),y=P,b+=qi(v)}return O==l&&o[0]==0&&g?this.result(-100+(f?-200:0),o,e):d==l&&h==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==l?this.ret(-900-e.length,[h,p]):O==l?this.result(-100+(f?-200:0)+-700+(g?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let o of n){let a=o+(this.astral?qi(Rn(i,o)):1);s&&r[s-1]==o?r[s-1]=a:(r[s++]=o,r[s++]=a)}return this.ret(e-i.length,r)}}class AL{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:qL,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>Yb(e(i),n(i)),optionClass:(e,n)=>i=>Yb(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function Yb(t,e){return t?e?t+" "+e:t:e}function qL(t,e,n,i,r,s){let o=t.textDirection==Qt.RTL,a=o,l=!1,c="top",u,O,f=e.left-r.left,d=r.right-e.right,h=i.right-i.left,p=i.bottom-i.top;if(a&&f=p||b>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let $=(e.bottom-e.top)/s.offsetHeight,g=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/$}px; max-width: ${O/g}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function ZL(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;cl&&o.appendChild(document.createTextNode(a.slice(l,u)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(u,O))),f.className="cm-completionMatchedText",l=O}return ln.position-i.position).map(n=>n.render)}function zd(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class zL{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:o}=r.open,a=e.state.facet(Gt);this.optionContent=ZL(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=zd(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,O;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(O=/-(\d+)$/.exec(u.id))&&+O[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Gt).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Yl.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:o,disabled:a}=i.open;(!r.open||r.open.options!=s)&&(this.range=zd(s.length,o,e.state.facet(Gt).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=zd(n.options.length,n.selected,this.view.state.facet(Gt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>En(this.view.state,o,"completion info")):this.addInfoPane(s,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&ML(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom{o.target==r&&o.preventDefault()});let s=null;for(let o=i.from;oi.from||i.from==0))if(s=f,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}const u=r.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let O=this.optionClass(a);O&&(u.className=O);for(let f of this.optionContent){let d=f(a,this.view.state,this.view,l);d&&u.appendChild(d)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew zL(n,t,e)}function ML(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function Mb(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function IL(t,e){let n=[],i=null,r=c=>{n.push(c);let{section:u}=c.completion;if(u){i||(i=[]);let O=typeof u=="string"?u:u.name;i.some(f=>f.name==O)||i.push(typeof u=="string"?{name:O}:u)}},s=e.facet(Gt);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let O of c.result.options)r(new Zb(O,c.source,u?u(O):[],1e9-n.length));else{let O=e.sliceDoc(c.from,c.to),f,d=s.filterStrict?new AL(O):new EL(O);for(let h of c.result.options)if(f=d.match(h.label)){let p=h.displayLabel?u?u(h,f.matched):[]:f.matched;r(new Zb(h,c.source,p,f.score+(h.boost||0)))}}}if(i){let c=Object.create(null),u=0,O=(f,d)=>{var h,p;return((h=f.rank)!==null&&h!==void 0?h:1e9)-((p=d.rank)!==null&&p!==void 0?p:1e9)||(f.nameO.score-u.score||l(u.completion,O.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(c):Mb(c.completion)>Mb(a)&&(o[o.length-1]=c),a=c.completion}return o}class _o{constructor(e,n,i,r,s,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new _o(this.options,Ib(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,o){if(r&&!o&&e.some(c=>c.isPending))return r.setDisabled();let a=IL(e,n);if(!a.length)return r&&e.some(c=>c.isPending)?r.setDisabled():null;let l=n.facet(Gt).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let c=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:jL,above:s.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new _o(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new _o(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class kO{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new kO(WL,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Gt),s=(i.override||n.languageDataAt("autocomplete",Is(n)).map(VL)).map(l=>(this.active.find(u=>u.source==l)||new si(l,this.active.some(u=>u.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((l,c)=>l==this.active[c])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(zg));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!UL(s,this.active)||a?o=_o.build(s,n,this.id,o,i,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new si(l.source,0):l));for(let l of e.effects)l.is(zw)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new kO(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?DL:LL}}function UL(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const WL=[];function Zw(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(Zg);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class si{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=Zw(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new si(r.source,0)),i&4&&r.state==0&&(r=new si(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(TO))r=new si(r.source,1,s.value);else if(s.is(Yl))r=new si(r.source,0);else if(s.is(zg))for(let o of s.value)o.source==r.source&&(r=o);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Is(e.state))}}class zo extends si{constructor(e,n,i,r,s,o){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Is(e.state);if(a>o||!r||n&2&&(Is(e.startState)==this.from||an.map(e))}}),zw=Ve.define(),Xn=Ft.define({create(){return kO.start()},update(t,e){return t.update(e)},provide:t=>[yg.from(t,e=>e.tooltip),Oe.contentAttributes.from(t,e=>e.attrs)]});function Yg(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Xn).active.find(r=>r.source==e.source);return i instanceof zo?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},XL(t.state,n,i.from,i.to)),{annotations:Zg.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const jL=YL(Xn,Yg);function Ou(t,e="option"){return n=>{let i=n.state.field(Xn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:zw.of(a)}),!0}}const BL=t=>{let e=t.state.field(Xn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Xn,!1)?(t.dispatch({effects:TO.of(!0)}),!0):!1,GL=t=>{let e=t.state.field(Xn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Yl.of(null)}),!0)};class FL{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const HL=50,KL=1e3,JL=Ct.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Xn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Xn),n=t.state.facet(Gt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Xn)==e)return;let i=t.transactions.some(s=>{let o=Zw(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;sHL&&Date.now()-o.time>KL){for(let a of o.context.abortListeners)try{a()}catch(l){En(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(TO)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Xn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Is(e),i=new Ew(e,n,t.explicit,this.view),r=new FL(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Yl.of(null)}),En(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Gt),i=this.view.state.field(Xn);for(let r=0;ra.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new si(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:zg.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Xn,!1);if(e&&e.tooltip&&this.view.state.facet(Gt).closeOnBlur){let n=e.open&&$x(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Yl.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:TO.of(!1)}),20),this.composing=0}}}),eW=typeof navigator=="object"&&/Win/.test(navigator.platform),tW=Ss.highest(Oe.domEventHandlers({keydown(t,e){let n=e.state.field(Xn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(eW&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(o=>o.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&Yg(e,i),!1}})),Yw=Oe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class nW{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class Mg{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,nn.TrackDel),i=e.mapPos(this.to,1,nn.TrackDel);return n==null||i==null?null:new Mg(this.field,n,i)}}class Ig{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(i.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let O=0;Onew Mg(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,O=>O[1]);for(let O=0;O=c&&f.field++}r.push(new nW(c,i.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of r)u.line==i.length&&u.from>c&&(u.from--,u.to--);return l}),i.push(o)}return new Ig(i,r)}}let iW=xe.widget({widget:new class extends tr{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),rW=xe.mark({class:"cm-snippetField"});class ya{constructor(e,n){this.ranges=e,this.active=n,this.deco=xe.set(e.map(i=>(i.from==i.to?iW:rW).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new ya(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const $c=Ve.define({map(t,e){return t&&t.map(e)}}),sW=Ve.define(),Ml=Ft.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is($c))return n.value;if(n.is(sW)&&t)return new ya(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Oe.decorations.from(t,e=>e?e.deco:xe.none)});function Ug(t,e){return K.create(t.filter(n=>n.field==e).map(n=>K.range(n.from,n.to)))}function oW(t){let e=Ig.parse(t);return(n,i,r,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,r),{main:l}=n.state.selection,c={changes:{from:r,to:s==l.from?l.to:s,insert:Fe.of(o)},scrollIntoView:!0,annotations:i?[Zg.of(i),At.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=Ug(a,0)),a.some(u=>u.field>0)){let u=new ya(a,0),O=c.effects=[$c.of(u)];n.state.field(Ml,!1)===void 0&&O.push(Ve.appendConfig.of([Ml,OW,fW,Yw]))}n.dispatch(n.state.update(c))}}function Mw(t){return({state:e,dispatch:n})=>{let i=e.field(Ml,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(o=>o.field==r+t);return n(e.update({selection:Ug(i.ranges,r),effects:$c.of(s?null:new ya(i.ranges,r)),scrollIntoView:!0})),!0}}const aW=({state:t,dispatch:e})=>t.field(Ml,!1)?(e(t.update({effects:$c.of(null)})),!0):!1,lW=Mw(1),cW=Mw(-1),uW=[{key:"Tab",run:lW,shift:cW},{key:"Escape",run:aW}],Db=ge.define({combine(t){return t.length?t[0]:uW}}),OW=Ss.highest(Oc.compute([Db],t=>t.facet(Db)));function wn(t,e){return Object.assign(Object.assign({},e),{apply:oW(t)})}const fW=Oe.domEventHandlers({mousedown(t,e){let n=e.state.field(Ml,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:Ug(n.ranges,r.field),effects:$c.of(n.ranges.some(s=>s.field>r.field)?new ya(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Il={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},As=Ve.define({map(t,e){let n=e.mapPos(t,-1,nn.TrackAfter);return n??void 0}}),Dg=new class extends Ws{};Dg.startSide=1;Dg.endSide=-1;const Iw=Ft.define({create(){return Je.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(As)&&(t=t.update({add:[Dg.range(n.value,n.value+1)]}));return t}});function dW(){return[pW,Iw]}const Yd="()[]{}<>«»»«[]{}";function Uw(t){for(let e=0;e{if((hW?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&qi(Rn(i,0))==1||e!=r.from||n!=r.to)return!1;let s=$W(t.state,i);return s?(t.dispatch(s),!0):!1}),mW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Dw(t,t.selection.main.head).brackets||Il.brackets,r=null,s=t.changeByRange(o=>{if(o.empty){let a=QW(t.doc,o.head);for(let l of i)if(l==a&&zf(t.doc,o.head)==Uw(Rn(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:K.cursor(o.head-l.length)}}return{range:r=o}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},gW=[{key:"Backspace",run:mW}];function $W(t,e){let n=Dw(t,t.selection.main.head),i=n.brackets||Il.brackets;for(let r of i){let s=Uw(Rn(r,0));if(e==r)return s==r?vW(t,r,i.indexOf(r+r+r)>-1,n):yW(t,r,s,n.before||Il.before);if(e==s&&Lw(t,t.selection.main.from))return bW(t,r,s)}return null}function Lw(t,e){let n=!1;return t.field(Iw).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function zf(t,e){let n=t.sliceString(e,e+2);return n.slice(0,qi(Rn(n,0)))}function QW(t,e){let n=t.sliceString(e-2,e);return qi(Rn(n,0))==n.length?n:n.slice(1)}function yW(t,e,n,i){let r=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:As.of(o.to+e.length),range:K.range(o.anchor+e.length,o.head+e.length)};let a=zf(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:As.of(o.head+e.length),range:K.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function bW(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&zf(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:K.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function vW(t,e,n,i){let r=i.stringPrefixes||Il.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:As.of(a.to+e.length),range:K.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=zf(t.doc,l),u;if(c==e){if(Lb(t,l))return{changes:{insert:e+e,from:l},effects:As.of(l+e.length),range:K.cursor(l+e.length)};if(Lw(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:K.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Wb(t,l-2*e.length,r))>-1&&Lb(t,u))return{changes:{insert:e+e+e+e,from:l},effects:As.of(l+e.length),range:K.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=vt.Word&&Wb(t,l,r)>-1&&!SW(t,l,e,r))return{changes:{insert:e+e,from:l},effects:As.of(l+e.length),range:K.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Lb(t,e){let n=Pt(t).resolveInner(e+1);return n.parent&&n.from==e}function SW(t,e,n,i){let r=Pt(t).resolveInner(e,-1),s=i.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let u=r.firstChild;for(;u&&u.from==r.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=r.to==e&&r.parent;if(!c)break;r=c}return!1}function Wb(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=vt.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=vt.Word)return s}return-1}function PW(t={}){return[tW,Xn,Gt.of(t),JL,_W,Yw]}const Ww=[{key:"Ctrl-Space",run:Ub},{mac:"Alt-`",run:Ub},{key:"Escape",run:GL},{key:"ArrowDown",run:Ou(!0)},{key:"ArrowUp",run:Ou(!1)},{key:"PageDown",run:Ou(!0,"page")},{key:"PageUp",run:Ou(!1,"page")},{key:"Enter",run:BL}],_W=Ss.highest(Oc.computeN([Gt],t=>t.facet(Gt).defaultKeymap?[Ww]:[]));class Nb{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Cs{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(Ul).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((u,O)=>u.from-O.from||u.to-O.to),o=new kr,a=[],l=0;for(let u=0;;){let O=u==s.length?null:s[u];if(!O&&!a.length)break;let f,d;for(a.length?(f=l,d=a.reduce((p,$)=>Math.min(p,$.to),O&&O.from>f?O.from:1e8)):(f=O.from,d=O.to,a.push(O),u++);up.from||p.to==f))a.push(p),u++,d=Math.min(p.to,d);else{d=Math.min(p.from,d);break}}let h=zW(a);if(a.some(p=>p.from==p.to||p.from==p.to-1&&i.doc.lineAt(p.from).to==p.from))o.add(f,f,xe.widget({widget:new EW(h),diagnostics:a.slice()}));else{let p=a.reduce(($,g)=>g.markClass?$+" "+g.markClass:$,"");o.add(f,d,xe.mark({class:"cm-lintRange cm-lintRange-"+h+p,diagnostics:a.slice(),inclusiveEnd:a.some($=>$.to>d)}))}l=d;for(let p=0;p{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new Nb(r,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Nb(i.from,s,i.diagnostic)}}),i}function xW(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(Ul).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(Nw))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function wW(t,e){return t.field(jn,!1)?e:e.concat(Ve.appendConfig.of(YW))}const Nw=Ve.define(),Lg=Ve.define(),jw=Ve.define(),jn=Ft.define({create(){return new Cs(xe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=na(n,t.selected.diagnostic,s)||na(n,null,s)}!n.size&&r&&e.state.facet(Ul).autoPanel&&(r=null),t=new Cs(n,r,i)}for(let n of e.effects)if(n.is(Nw)){let i=e.state.facet(Ul).autoPanel?n.value.length?Dl.open:null:t.panel;t=Cs.init(n.value,i,e.state)}else n.is(Lg)?t=new Cs(t.diagnostics,n.value?Dl.open:null,t.selected):n.is(jw)&&(t=new Cs(t.diagnostics,t.panel,n.value));return t},provide:t=>[El.from(t,e=>e.panel),Oe.decorations.from(t,e=>e.diagnostics)]}),TW=xe.mark({class:"cm-lintRange cm-lintRange-active"});function kW(t,e,n){let{diagnostics:i}=t.state.field(jn),r,s=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(eGw(t,n,!1)))}const CW=t=>{let e=t.state.field(jn,!1);(!e||!e.panel)&&t.dispatch({effects:wW(t.state,[Lg.of(!0)])});let n=Vl(t,Dl.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},jb=t=>{let e=t.state.field(jn,!1);return!e||!e.panel?!1:(t.dispatch({effects:Lg.of(!1)}),!0)},XW=t=>{let e=t.state.field(jn,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},VW=[{key:"Mod-Shift-m",run:CW,preventDefault:!0},{key:"F8",run:XW}],Ul=ge.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},er(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function Bw(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function Gw(t,e,n){var i;let r=n?Bw(e.actions):[];return lt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},lt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let a=!1,l=f=>{if(f.preventDefault(),a)return;a=!0;let d=na(t.state.field(jn).diagnostics,e);d&&s.apply(t,d.from,d.to)},{name:c}=s,u=r[o]?c.indexOf(r[o]):-1,O=u<0?c:[c.slice(0,u),lt("u",c.slice(u,u+1)),c.slice(u+1)];return lt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${r[o]})"`}.`},O)}),e.source&<("div",{class:"cm-diagnosticSource"},e.source))}class EW extends tr{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return lt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Bb{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Gw(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Dl{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)jb(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=Bw(s.actions);for(let a=0;a{for(let s=0;sjb(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(jn).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let O=-1,f;for(let d=i;di&&(this.items.splice(i,O-i),r=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++}});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let c=l.height/this.list.offsetHeight;a.topl.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(jn),i=na(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:jw.of(i)})}static open(e){return new Dl(e)}}function AW(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function fu(t){return AW(``,'width="6" height="3"')}const qW=Oe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:fu("#d11")},".cm-lintRange-warning":{backgroundImage:fu("orange")},".cm-lintRange-info":{backgroundImage:fu("#999")},".cm-lintRange-hint":{backgroundImage:fu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function ZW(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function zW(t){let e="hint",n=1;for(let i of t){let r=ZW(i.severity);r>n&&(n=r,e=i.severity)}return e}const YW=[jn,Oe.decorations.compute([jn],t=>{let{selected:e,panel:n}=t.field(jn);return!e||!n||e.from==e.to?xe.none:xe.set([TW.range(e.from,e.to)])}),b4(kW,{hideOn:xW}),qW],MW=[X4(),A4(),F6(),eD(),wU(),Y6(),L6(),De.allowMultipleSelections.of(!0),hU(),kU(XU,{fallback:!0}),YU(),dW(),PW(),u4(),d4(),n4(),aL(),Oc.of([...gW,...eL,...xL,...cD,...SU,...Ww,...VW])];/*! * VueCodemirror v6.1.1 * Copyright (c) Surmon. All rights reserved. * Released under the MIT License. * Surmon -*/var MW=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[YW]}),IW=Symbol("vue-codemirror-global-config"),yn,UW=function(t){var e=t.onUpdate,n=t.onChange,i=t.onFocus,r=t.onBlur,s=function(o,a){var l={};for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&a.indexOf(c)<0&&(l[c]=o[c]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(c=Object.getOwnPropertySymbols(o);un%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new RO(e,[],n,i,i,0,[],0,r?new Hb(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(r,c)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==i)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(r>this.pos||n<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new RO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new BW(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,o;sl&1&&a==o)||r.push(n[s],o)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=i(o,s+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Hb{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class BW{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class CO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new CO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new CO(this.stack,this.pos,this.index)}}function Na(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class Cu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Kb=new Cu;class GW{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Kb,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Kb,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class Yo{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;Fw(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Yo.prototype.contextual=Yo.prototype.fallback=Yo.prototype.extend=!1;class XO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Na(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(Fw(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}XO.prototype.contextual=Yo.prototype.fallback=Yo.prototype.extend=!1;class jt{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Fw(t,e,n,i,r,s){let o=0,a=1<0){let h=t[d];if(l.allows(h)&&(e.token.value==-1||e.token.value==h||FW(h,e.token.value,r,s))){e.acceptToken(h);break}}let u=e.next,O=0,f=t[o+2];if(e.next<0&&f>O&&t[c+f*3-3]==65535){o=t[c+f*3-1];continue e}for(;O>1,h=c+d+(d<<1),p=t[h],$=t[h+1]||65536;if(u=$)O=d+1;else{o=t[h+2],e.advance();continue e}}break}}function Jb(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function FW(t,e,n,i){let r=Jb(n,i,e);return r<0||Jb(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class HW{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?ev(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?ev(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(s instanceof _t){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class KW{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Cu)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cO.end+25&&(l=Math.max(O.lookAhead,l)),O.value!=0)){let f=n;if(O.extended>-1&&(n=this.addActions(e,O.extended,O.end,n)),n=this.addActions(e,O.value,O.end,n),!u.extend&&(i=O,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new Cu,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Cu,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;se.bufferLength*4?new HW(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],s=[]),r.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!i.length){let o=r&&t3(r);if(o)return In&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw In&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return In&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((a,l)=>l.score-a.score);i.length>o;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)i.splice(l--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let O=this.fragments.nodeAt(r);O;){let f=this.parser.nodeSet.types[O.type.id]==O.type?s.getGoto(e.state,O.type.id):-1;if(f>-1&&O.length&&(!c||(O.prop(qe.contextHash)||0)==u))return e.useNode(O,f),In&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0;if(!(O instanceof _t)||O.children.length==0||O.positions[0]>0)break;let d=O.children[0];if(d instanceof _t&&O.positions[0]==0)O=d;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),In&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;cr?n.push(h):i.push(h)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return tv(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let o=0;o ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),In&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let O=a.split(),f=u;for(let d=0;O.forceReduce()&&d<10&&(In&&console.log(f+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,i));d++)In&&(f=this.stackID(O)+" -> ");for(let d of a.recoverByInsert(l))In&&console.log(u+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),In&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),tv(a,i)):(!r||r.scoret;class Wg{constructor(e){this.start=e.start,this.shift=e.shift||Id,this.reduce=e.reduce||Id,this.reuse=e.reuse||Id,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ms extends xx{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)s(u,l,a[c++]);else{let O=a[c+-u];for(let f=-u;f>0;f--)s(a[c++],l,O);c++}}}this.nodeSet=new bg(n.map((a,l)=>xn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=bx;let o=Na(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new Yo(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new JW(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let o=r[s++],a=o&1,l=r[s++];if(a&&i)return l;for(let c=s+(o>>1);s0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=cr(this.data,s+2);else break;r=n(cr(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=cr(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,o)=>o&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(ms.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(a=>a.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=nv(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const Ip=1,n3=2,i3=3,r3=4,s3=5,o3=36,a3=37,l3=38,c3=11,u3=13;function O3(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function f3(t){return t==9||t==10||t==13||t==32}let iv=null,rv=null,sv=0;function Up(t,e){let n=t.pos+e;if(rv==t&&sv==n)return iv;for(;f3(t.peek(e));)e++;let i="";for(;;){let r=t.peek(e);if(!O3(r))break;i+=String.fromCharCode(r),e++}return rv=t,sv=n,iv=i||null}function ov(t,e){this.name=t,this.parent=e}const d3=new Wg({start:null,shift(t,e,n,i){return e==Ip?new ov(Up(i,1)||"",t):t},reduce(t,e){return e==c3&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==Ip||r==u3?new ov(Up(i,1)||"",t):t},strict:!1}),h3=new jt((t,e)=>{if(t.next==60){if(t.advance(),t.next==47){t.advance();let n=Up(t,0);if(!n)return t.acceptToken(s3);if(e.context&&n==e.context.name)return t.acceptToken(n3);for(let i=e.context;i;i=i.parent)if(i.name==n)return t.acceptToken(i3,-2);t.acceptToken(r3)}else if(t.next!=33&&t.next!=63)return t.acceptToken(Ip)}},{contextual:!0});function Ng(t,e){return new jt(n=>{let i=0,r=e.charCodeAt(0);e:for(;!(n.next<0);n.advance(),i++)if(n.next==r){for(let s=1;s"),m3=Ng(a3,"?>"),g3=Ng(l3,"]]>"),$3=pa({Text:k.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":k.angleBracket,TagName:k.tagName,"MismatchedCloseTag/TagName":[k.tagName,k.invalid],AttributeName:k.attributeName,AttributeValue:k.attributeValue,Is:k.definitionOperator,"EntityReference CharacterReference":k.character,Comment:k.blockComment,ProcessingInst:k.processingInstruction,DoctypeDecl:k.documentMeta,Cdata:k.special(k.string)}),Q3=ms.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.u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n?t.sliceString(n.from,n.to):""}function Ud(t,e){let n=e&&e.firstChild;return!n||n.name!="OpenTag"?"":Xu(t,n)}function y3(t,e,n){let i=e&&e.getChildren("Attribute").find(s=>s.from<=n&&s.to>=n),r=i&&i.getChild("AttributeName");return r?t.sliceString(r.from,r.to):""}function Dd(t){for(let e=t&&t.parent;e;e=e.parent)if(e.name=="Element")return e;return null}function b3(t,e){var n;let i=Pt(t).resolveInner(e,-1),r=null;for(let s=i;!r&&s.parent;s=s.parent)(s.name=="OpenTag"||s.name=="CloseTag"||s.name=="SelfClosingTag"||s.name=="MismatchedCloseTag")&&(r=s);if(r&&(r.to>e||r.lastChild.type.isError)){let s=r.parent;if(i.name=="TagName")return r.name=="CloseTag"||r.name=="MismatchedCloseTag"?{type:"closeTag",from:i.from,context:s}:{type:"openTag",from:i.from,context:Dd(s)};if(i.name=="AttributeName")return{type:"attrName",from:i.from,context:r};if(i.name=="AttributeValue")return{type:"attrValue",from:i.from,context:r};let o=i==r||i.name=="Attribute"?i.childBefore(e):i;return(o==null?void 0:o.name)=="StartTag"?{type:"openTag",from:e,context:Dd(s)}:(o==null?void 0:o.name)=="StartCloseTag"&&o.to<=e?{type:"closeTag",from:e,context:s}:(o==null?void 0:o.name)=="Is"?{type:"attrValue",from:e,context:r}:o?{type:"attrName",from:e,context:r}:null}else if(i.name=="StartCloseTag")return{type:"closeTag",from:e,context:i.parent};for(;i.parent&&i.to==e&&!(!((n=i.lastChild)===null||n===void 0)&&n.type.isError);)i=i.parent;return i.name=="Element"||i.name=="Text"||i.name=="Document"?{type:"tag",from:e,context:i.name=="Element"?i:Dd(i)}:null}let v3=class{constructor(e,n,i){this.attrs=n,this.attrValues=i,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:"type"},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(r=>({label:r,type:"text"})):[]}};const Ld=/^[:\-\.\w\u00b7-\uffff]*$/;function av(t){return Object.assign(Object.assign({type:"property"},t.completion||{}),{label:t.name})}function lv(t){return typeof t=="string"?{label:`"${t}"`,type:"constant"}:/^"/.test(t.label)?t:Object.assign(Object.assign({},t),{label:`"${t.label}"`})}function S3(t,e){let n=[],i=[],r=Object.create(null);for(let l of e){let c=av(l);n.push(c),l.global&&i.push(c),l.values&&(r[l.name]=l.values.map(lv))}let s=[],o=[],a=Object.create(null);for(let l of t){let c=i,u=r;l.attributes&&(c=c.concat(l.attributes.map(f=>typeof f=="string"?n.find(d=>d.label==f)||{label:f,type:"property"}:(f.values&&(u==r&&(u=Object.create(u)),u[f.name]=f.values.map(lv)),av(f)))));let O=new v3(l,c,u);a[O.name]=O,s.push(O),l.top&&o.push(O)}o.length||(o=s);for(let l=0;l{var c;let{doc:u}=l.state,O=b3(l.state,l.pos);if(!O||O.type=="tag"&&!l.explicit)return null;let{type:f,from:d,context:h}=O;if(f=="openTag"){let p=o,$=Ud(u,h);if($){let g=a[$];p=(g==null?void 0:g.children)||s}return{from:d,options:p.map(g=>g.completion),validFor:Ld}}else if(f=="closeTag"){let p=Ud(u,h);return p?{from:d,to:l.pos+(u.sliceString(l.pos,l.pos+1)==">"?1:0),options:[((c=a[p])===null||c===void 0?void 0:c.closeNameCompletion)||{label:p+">",type:"type"}],validFor:Ld}:null}else if(f=="attrName"){let p=a[Xu(u,h)];return{from:d,options:(p==null?void 0:p.attrs)||i,validFor:Ld}}else if(f=="attrValue"){let p=y3(u,h,d);if(!p)return null;let $=a[Xu(u,h)],g=(($==null?void 0:$.attrValues)||r)[p];return!g||!g.length?null:{from:d,to:l.pos+(u.sliceString(l.pos,l.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(f=="tag"){let p=Ud(u,h),$=a[p],g=[],b=h&&h.lastChild;p&&(!b||b.name!="CloseTag"||Xu(u,b)!=p)&&g.push($?$.closeCompletion:{label:"",type:"type",boost:2});let Q=g.concat((($==null?void 0:$.children)||(h?s:o)).map(y=>y.openCompletion));if(h&&($!=null&&$.text.length)){let y=h.firstChild;y.to>l.pos-20&&!/\S/.test(l.state.sliceDoc(y.to,l.pos))&&(Q=Q.concat($.text))}return{from:d,options:Q,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const Dp=hs.define({name:"xml",parser:Q3.configure({props:[ma.add({Element(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ga.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),kg.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function Hw(t={}){let e=[Dp.data.of({autocomplete:S3(t.elements||[],t.attributes||[])})];return t.autoCloseTags!==!1&&e.push(P3),new dc(Dp,e)}function cv(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}const P3=Oe.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Dp.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var c,u,O;let{head:f}=l,d=o.doc.sliceString(f-1,f)==i,h=Pt(o).resolveInner(f,-1),p;if(d&&i==">"&&h.name=="EndTag"){let $=h.parent;if(((u=(c=$.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=cv(o.doc,$.parent,f))){let g=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=``;return{range:l,changes:{from:f,to:g,insert:b}}}}else if(d&&i=="/"&&h.name=="StartCloseTag"){let $=h.parent;if(h.from==f-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(p=cv(o.doc,$,f))){let g=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=`${p}>`;return{range:K.cursor(f+b.length,-1),changes:{from:f,to:g,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function _3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ja={exports:{}},hu={exports:{}},uv;function x3(){return uv||(uv=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParsingError=void 0;class n extends Error{constructor(y,v){super(y),this.cause=v}}e.ParsingError=n;let i;function r(){return l(!1)||f()||O()||u()||a(!1)}function s(){return p(/\s*/),l(!0)||O()||c()||a(!1)}function o(){const Q=a(!0),y=[];let v,S=s();for(;S;){if(S.node.type==="Element"){if(v)throw new Error("Found multiple root nodes");v=S.node}S.excluded||y.push(S.node),S=s()}if(!v)throw new n("Failed to parse XML","Root Element not found");if(i.xml.length!==0)throw new n("Failed to parse XML","Not Well-Formed XML");return{declaration:Q?Q.node:null,root:v,children:y}}function a(Q){const y=p(Q?/^<\?(xml(-stylesheet)?)\s*/:/^<\?([\w-:.]+)\s*/);if(!y)return;const v={name:y[1],type:"ProcessingInstruction",attributes:{}};for(;!($()||g("?>"));){const S=d();if(S)v.attributes[S.name]=S.value;else return}return p(/\?>/),{excluded:Q?!1:i.options.filter(v)===!1,node:v}}function l(Q){const y=p(/^<([^?!\s]+)\s*/);if(!y)return;const v={type:"Element",name:y[1],attributes:{},children:[]},S=Q?!1:i.options.filter(v)===!1;for(;!($()||g(">")||g("?>")||g("/>"));){const x=d();if(x)v.attributes[x.name]=x.value;else return}if(p(/^\s*\/>/))return v.children=null,{excluded:S,node:v};p(/\??>/);let P=r();for(;P;)P.excluded||v.children.push(P.node),P=r();if(i.options.strictMode){const x=``;if(i.xml.startsWith(x))i.xml=i.xml.slice(x.length);else throw new n("Failed to parse XML",`Closing tag not matching "${x}"`)}else p(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/);return{excluded:S,node:v}}function c(){const Q=p(/^]*>/)||p(/^]*>/)||p(/^/)||p(/^/);if(Q){const y={type:"DocumentType",content:Q[0]};return{excluded:i.options.filter(y)===!1,node:y}}}function u(){if(i.xml.startsWith("");if(Q>-1){const y=Q+3,v={type:"CDATA",content:i.xml.substring(0,y)};return i.xml=i.xml.slice(y),{excluded:i.options.filter(v)===!1,node:v}}}}function O(){const Q=p(/^/);if(Q){const y={type:"Comment",content:Q[0]};return{excluded:i.options.filter(y)===!1,node:y}}}function f(){const Q=p(/^([^<]+)/);if(Q){const y={type:"Text",content:Q[1]};return{excluded:i.options.filter(y)===!1,node:y}}}function d(){const Q=p(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(Q)return{name:Q[1].trim(),value:h(Q[2].trim())}}function h(Q){return Q.replace(/^['"]|['"]$/g,"")}function p(Q){const y=i.xml.match(Q);if(y)return i.xml=i.xml.slice(y[0].length),y}function $(){return i.xml.length===0}function g(Q){return i.xml.indexOf(Q)===0}function b(Q,y={}){Q=Q.trim();const v=y.filter||(()=>!0);return i={xml:Q,options:Object.assign(Object.assign({},y),{filter:v,strictMode:y.strictMode===!0})},o()}t.exports=b,e.default=b}(hu,hu.exports)),hu.exports}var Ov=ja.exports,fv;function w3(){return fv||(fv=1,function(t,e){var n=Ov&&Ov.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(x3());function r(h){if(!h.options.indentation&&!h.options.lineSeparator)return;h.content+=h.options.lineSeparator;let p;for(p=0;p0&&(!$&&p.content.length>0&&r(p),o(p,h))}function c(h,p){const $="/"+h.join("/"),g=h[h.length-1];return p.includes(g)||p.includes($)}function u(h,p,$){if(p.path.push(h.name),!$&&p.content.length>0&&r(p),o(p,"<"+h.name),O(p,h.attributes),h.children===null||p.options.forceSelfClosingEmptyTag&&h.children.length===0){const g=p.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";o(p,g)}else if(h.children.length===0)o(p,">");else{const g=h.children;o(p,">"),p.level++;let b=h.attributes["xml:space"]==="preserve"||$,Q=!1;if(!b&&p.options.ignoredPaths&&(Q=c(p.path,p.options.ignoredPaths),b=Q),!b&&p.options.collapseContent){let y=!1,v=!1,S=!1;g.forEach(function(P,x){P.type==="Text"?(P.content.includes(` +*/var IW=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[MW]}),UW=Symbol("vue-codemirror-global-config"),yn,DW=function(t){var e=t.onUpdate,n=t.onChange,i=t.onFocus,r=t.onBlur,s=function(o,a){var l={};for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&a.indexOf(c)<0&&(l[c]=o[c]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(c=Object.getOwnPropertySymbols(o);un%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new RO(e,[],n,i,i,0,[],0,r?new Hb(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(r,c)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==i)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(r>this.pos||n<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new RO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new GW(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,o;sl&1&&a==o)||r.push(n[s],o)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=i(o,s+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Hb{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class GW{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class CO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new CO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new CO(this.stack,this.pos,this.index)}}function Na(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class Cu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Kb=new Cu;class FW{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Kb,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Kb,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class Yo{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;Hw(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Yo.prototype.contextual=Yo.prototype.fallback=Yo.prototype.extend=!1;class XO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Na(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(Hw(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}XO.prototype.contextual=Yo.prototype.fallback=Yo.prototype.extend=!1;class jt{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Hw(t,e,n,i,r,s){let o=0,a=1<0){let h=t[d];if(l.allows(h)&&(e.token.value==-1||e.token.value==h||HW(h,e.token.value,r,s))){e.acceptToken(h);break}}let u=e.next,O=0,f=t[o+2];if(e.next<0&&f>O&&t[c+f*3-3]==65535){o=t[c+f*3-1];continue e}for(;O>1,h=c+d+(d<<1),p=t[h],$=t[h+1]||65536;if(u=$)O=d+1;else{o=t[h+2],e.advance();continue e}}break}}function Jb(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function HW(t,e,n,i){let r=Jb(n,i,e);return r<0||Jb(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class KW{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?ev(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?ev(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(s instanceof _t){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class JW{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Cu)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cO.end+25&&(l=Math.max(O.lookAhead,l)),O.value!=0)){let f=n;if(O.extended>-1&&(n=this.addActions(e,O.extended,O.end,n)),n=this.addActions(e,O.value,O.end,n),!u.extend&&(i=O,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new Cu,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Cu,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;se.bufferLength*4?new KW(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],s=[]),r.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!i.length){let o=r&&n3(r);if(o)return Un&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Un&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return Un&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((a,l)=>l.score-a.score);i.length>o;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)i.splice(l--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let O=this.fragments.nodeAt(r);O;){let f=this.parser.nodeSet.types[O.type.id]==O.type?s.getGoto(e.state,O.type.id):-1;if(f>-1&&O.length&&(!c||(O.prop(qe.contextHash)||0)==u))return e.useNode(O,f),Un&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0;if(!(O instanceof _t)||O.children.length==0||O.positions[0]>0)break;let d=O.children[0];if(d instanceof _t&&O.positions[0]==0)O=d;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Un&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;cr?n.push(h):i.push(h)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return tv(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let o=0;o ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Un&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let O=a.split(),f=u;for(let d=0;O.forceReduce()&&d<10&&(Un&&console.log(f+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,i));d++)Un&&(f=this.stackID(O)+" -> ");for(let d of a.recoverByInsert(l))Un&&console.log(u+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Un&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),tv(a,i)):(!r||r.scoret;class Wg{constructor(e){this.start=e.start,this.shift=e.shift||Id,this.reduce=e.reduce||Id,this.reuse=e.reuse||Id,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ms extends wx{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)s(u,l,a[c++]);else{let O=a[c+-u];for(let f=-u;f>0;f--)s(a[c++],l,O);c++}}}this.nodeSet=new bg(n.map((a,l)=>xn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=vx;let o=Na(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new Yo(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new e3(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let o=r[s++],a=o&1,l=r[s++];if(a&&i)return l;for(let c=s+(o>>1);s0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=cr(this.data,s+2);else break;r=n(cr(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=cr(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,o)=>o&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(ms.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(a=>a.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=nv(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const Ip=1,i3=2,r3=3,s3=4,o3=5,a3=36,l3=37,c3=38,u3=11,O3=13;function f3(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function d3(t){return t==9||t==10||t==13||t==32}let iv=null,rv=null,sv=0;function Up(t,e){let n=t.pos+e;if(rv==t&&sv==n)return iv;for(;d3(t.peek(e));)e++;let i="";for(;;){let r=t.peek(e);if(!f3(r))break;i+=String.fromCharCode(r),e++}return rv=t,sv=n,iv=i||null}function ov(t,e){this.name=t,this.parent=e}const h3=new Wg({start:null,shift(t,e,n,i){return e==Ip?new ov(Up(i,1)||"",t):t},reduce(t,e){return e==u3&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==Ip||r==O3?new ov(Up(i,1)||"",t):t},strict:!1}),p3=new jt((t,e)=>{if(t.next==60){if(t.advance(),t.next==47){t.advance();let n=Up(t,0);if(!n)return t.acceptToken(o3);if(e.context&&n==e.context.name)return t.acceptToken(i3);for(let i=e.context;i;i=i.parent)if(i.name==n)return t.acceptToken(r3,-2);t.acceptToken(s3)}else if(t.next!=33&&t.next!=63)return t.acceptToken(Ip)}},{contextual:!0});function Ng(t,e){return new jt(n=>{let i=0,r=e.charCodeAt(0);e:for(;!(n.next<0);n.advance(),i++)if(n.next==r){for(let s=1;s"),g3=Ng(l3,"?>"),$3=Ng(c3,"]]>"),Q3=pa({Text:k.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":k.angleBracket,TagName:k.tagName,"MismatchedCloseTag/TagName":[k.tagName,k.invalid],AttributeName:k.attributeName,AttributeValue:k.attributeValue,Is:k.definitionOperator,"EntityReference CharacterReference":k.character,Comment:k.blockComment,ProcessingInst:k.processingInstruction,DoctypeDecl:k.documentMeta,Cdata:k.special(k.string)}),y3=ms.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOO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)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[p3,m3,g3,$3,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function Xu(t,e){let n=e&&e.getChild("TagName");return n?t.sliceString(n.from,n.to):""}function Ud(t,e){let n=e&&e.firstChild;return!n||n.name!="OpenTag"?"":Xu(t,n)}function b3(t,e,n){let i=e&&e.getChildren("Attribute").find(s=>s.from<=n&&s.to>=n),r=i&&i.getChild("AttributeName");return r?t.sliceString(r.from,r.to):""}function Dd(t){for(let e=t&&t.parent;e;e=e.parent)if(e.name=="Element")return e;return null}function v3(t,e){var n;let i=Pt(t).resolveInner(e,-1),r=null;for(let s=i;!r&&s.parent;s=s.parent)(s.name=="OpenTag"||s.name=="CloseTag"||s.name=="SelfClosingTag"||s.name=="MismatchedCloseTag")&&(r=s);if(r&&(r.to>e||r.lastChild.type.isError)){let s=r.parent;if(i.name=="TagName")return r.name=="CloseTag"||r.name=="MismatchedCloseTag"?{type:"closeTag",from:i.from,context:s}:{type:"openTag",from:i.from,context:Dd(s)};if(i.name=="AttributeName")return{type:"attrName",from:i.from,context:r};if(i.name=="AttributeValue")return{type:"attrValue",from:i.from,context:r};let o=i==r||i.name=="Attribute"?i.childBefore(e):i;return(o==null?void 0:o.name)=="StartTag"?{type:"openTag",from:e,context:Dd(s)}:(o==null?void 0:o.name)=="StartCloseTag"&&o.to<=e?{type:"closeTag",from:e,context:s}:(o==null?void 0:o.name)=="Is"?{type:"attrValue",from:e,context:r}:o?{type:"attrName",from:e,context:r}:null}else if(i.name=="StartCloseTag")return{type:"closeTag",from:e,context:i.parent};for(;i.parent&&i.to==e&&!(!((n=i.lastChild)===null||n===void 0)&&n.type.isError);)i=i.parent;return i.name=="Element"||i.name=="Text"||i.name=="Document"?{type:"tag",from:e,context:i.name=="Element"?i:Dd(i)}:null}let S3=class{constructor(e,n,i){this.attrs=n,this.attrValues=i,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:"type"},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(r=>({label:r,type:"text"})):[]}};const Ld=/^[:\-\.\w\u00b7-\uffff]*$/;function av(t){return Object.assign(Object.assign({type:"property"},t.completion||{}),{label:t.name})}function lv(t){return typeof t=="string"?{label:`"${t}"`,type:"constant"}:/^"/.test(t.label)?t:Object.assign(Object.assign({},t),{label:`"${t.label}"`})}function P3(t,e){let n=[],i=[],r=Object.create(null);for(let l of e){let c=av(l);n.push(c),l.global&&i.push(c),l.values&&(r[l.name]=l.values.map(lv))}let s=[],o=[],a=Object.create(null);for(let l of t){let c=i,u=r;l.attributes&&(c=c.concat(l.attributes.map(f=>typeof f=="string"?n.find(d=>d.label==f)||{label:f,type:"property"}:(f.values&&(u==r&&(u=Object.create(u)),u[f.name]=f.values.map(lv)),av(f)))));let O=new S3(l,c,u);a[O.name]=O,s.push(O),l.top&&o.push(O)}o.length||(o=s);for(let l=0;l{var c;let{doc:u}=l.state,O=v3(l.state,l.pos);if(!O||O.type=="tag"&&!l.explicit)return null;let{type:f,from:d,context:h}=O;if(f=="openTag"){let p=o,$=Ud(u,h);if($){let g=a[$];p=(g==null?void 0:g.children)||s}return{from:d,options:p.map(g=>g.completion),validFor:Ld}}else if(f=="closeTag"){let p=Ud(u,h);return p?{from:d,to:l.pos+(u.sliceString(l.pos,l.pos+1)==">"?1:0),options:[((c=a[p])===null||c===void 0?void 0:c.closeNameCompletion)||{label:p+">",type:"type"}],validFor:Ld}:null}else if(f=="attrName"){let p=a[Xu(u,h)];return{from:d,options:(p==null?void 0:p.attrs)||i,validFor:Ld}}else if(f=="attrValue"){let p=b3(u,h,d);if(!p)return null;let $=a[Xu(u,h)],g=(($==null?void 0:$.attrValues)||r)[p];return!g||!g.length?null:{from:d,to:l.pos+(u.sliceString(l.pos,l.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(f=="tag"){let p=Ud(u,h),$=a[p],g=[],b=h&&h.lastChild;p&&(!b||b.name!="CloseTag"||Xu(u,b)!=p)&&g.push($?$.closeCompletion:{label:"",type:"type",boost:2});let Q=g.concat((($==null?void 0:$.children)||(h?s:o)).map(y=>y.openCompletion));if(h&&($!=null&&$.text.length)){let y=h.firstChild;y.to>l.pos-20&&!/\S/.test(l.state.sliceDoc(y.to,l.pos))&&(Q=Q.concat($.text))}return{from:d,options:Q,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const Dp=hs.define({name:"xml",parser:y3.configure({props:[ma.add({Element(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ga.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),kg.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function Kw(t={}){let e=[Dp.data.of({autocomplete:P3(t.elements||[],t.attributes||[])})];return t.autoCloseTags!==!1&&e.push(_3),new dc(Dp,e)}function cv(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}const _3=Oe.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Dp.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var c,u,O;let{head:f}=l,d=o.doc.sliceString(f-1,f)==i,h=Pt(o).resolveInner(f,-1),p;if(d&&i==">"&&h.name=="EndTag"){let $=h.parent;if(((u=(c=$.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=cv(o.doc,$.parent,f))){let g=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=``;return{range:l,changes:{from:f,to:g,insert:b}}}}else if(d&&i=="/"&&h.name=="StartCloseTag"){let $=h.parent;if(h.from==f-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(p=cv(o.doc,$,f))){let g=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=`${p}>`;return{range:K.cursor(f+b.length,-1),changes:{from:f,to:g,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function x3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ja={exports:{}},hu={exports:{}},uv;function w3(){return uv||(uv=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParsingError=void 0;class n extends Error{constructor(y,v){super(y),this.cause=v}}e.ParsingError=n;let i;function r(){return l(!1)||f()||O()||u()||a(!1)}function s(){return p(/\s*/),l(!0)||O()||c()||a(!1)}function o(){const Q=a(!0),y=[];let v,S=s();for(;S;){if(S.node.type==="Element"){if(v)throw new Error("Found multiple root nodes");v=S.node}S.excluded||y.push(S.node),S=s()}if(!v)throw new n("Failed to parse XML","Root Element not found");if(i.xml.length!==0)throw new n("Failed to parse XML","Not Well-Formed XML");return{declaration:Q?Q.node:null,root:v,children:y}}function a(Q){const y=p(Q?/^<\?(xml(-stylesheet)?)\s*/:/^<\?([\w-:.]+)\s*/);if(!y)return;const v={name:y[1],type:"ProcessingInstruction",attributes:{}};for(;!($()||g("?>"));){const S=d();if(S)v.attributes[S.name]=S.value;else return}return p(/\?>/),{excluded:Q?!1:i.options.filter(v)===!1,node:v}}function l(Q){const y=p(/^<([^?!\s]+)\s*/);if(!y)return;const v={type:"Element",name:y[1],attributes:{},children:[]},S=Q?!1:i.options.filter(v)===!1;for(;!($()||g(">")||g("?>")||g("/>"));){const x=d();if(x)v.attributes[x.name]=x.value;else return}if(p(/^\s*\/>/))return v.children=null,{excluded:S,node:v};p(/\??>/);let P=r();for(;P;)P.excluded||v.children.push(P.node),P=r();if(i.options.strictMode){const x=``;if(i.xml.startsWith(x))i.xml=i.xml.slice(x.length);else throw new n("Failed to parse XML",`Closing tag not matching "${x}"`)}else p(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/);return{excluded:S,node:v}}function c(){const Q=p(/^]*>/)||p(/^]*>/)||p(/^/)||p(/^/);if(Q){const y={type:"DocumentType",content:Q[0]};return{excluded:i.options.filter(y)===!1,node:y}}}function u(){if(i.xml.startsWith("");if(Q>-1){const y=Q+3,v={type:"CDATA",content:i.xml.substring(0,y)};return i.xml=i.xml.slice(y),{excluded:i.options.filter(v)===!1,node:v}}}}function O(){const Q=p(/^/);if(Q){const y={type:"Comment",content:Q[0]};return{excluded:i.options.filter(y)===!1,node:y}}}function f(){const Q=p(/^([^<]+)/);if(Q){const y={type:"Text",content:Q[1]};return{excluded:i.options.filter(y)===!1,node:y}}}function d(){const Q=p(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(Q)return{name:Q[1].trim(),value:h(Q[2].trim())}}function h(Q){return Q.replace(/^['"]|['"]$/g,"")}function p(Q){const y=i.xml.match(Q);if(y)return i.xml=i.xml.slice(y[0].length),y}function $(){return i.xml.length===0}function g(Q){return i.xml.indexOf(Q)===0}function b(Q,y={}){Q=Q.trim();const v=y.filter||(()=>!0);return i={xml:Q,options:Object.assign(Object.assign({},y),{filter:v,strictMode:y.strictMode===!0})},o()}t.exports=b,e.default=b}(hu,hu.exports)),hu.exports}var Ov=ja.exports,fv;function T3(){return fv||(fv=1,function(t,e){var n=Ov&&Ov.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(w3());function r(h){if(!h.options.indentation&&!h.options.lineSeparator)return;h.content+=h.options.lineSeparator;let p;for(p=0;p0&&(!$&&p.content.length>0&&r(p),o(p,h))}function c(h,p){const $="/"+h.join("/"),g=h[h.length-1];return p.includes(g)||p.includes($)}function u(h,p,$){if(p.path.push(h.name),!$&&p.content.length>0&&r(p),o(p,"<"+h.name),O(p,h.attributes),h.children===null||p.options.forceSelfClosingEmptyTag&&h.children.length===0){const g=p.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";o(p,g)}else if(h.children.length===0)o(p,">");else{const g=h.children;o(p,">"),p.level++;let b=h.attributes["xml:space"]==="preserve"||$,Q=!1;if(!b&&p.options.ignoredPaths&&(Q=c(p.path,p.options.ignoredPaths),b=Q),!b&&p.options.collapseContent){let y=!1,v=!1,S=!1;g.forEach(function(P,x){P.type==="Text"?(P.content.includes(` `)?(v=!0,P.content=P.content.trim()):(x===0||x===g.length-1)&&!$&&P.content.trim().length===0&&(P.content=""),(P.content.trim().length>0||g.length===1)&&(y=!0)):P.type==="CDATA"?y=!0:S=!0}),y&&(!S||!v)&&(b=!0)}g.forEach(function(y){a(y,p,$||b)}),p.level--,!$&&!b&&r(p),Q&&s(p),o(p,"")}p.path.pop()}function O(h,p){Object.keys(p).forEach(function($){const g=p[$].replace(/"/g,""");o(h," "+$+'="'+g+'"')})}function f(h,p){p.content.length>0&&r(p),o(p,"")}function d(h,p={}){p.indentation="indentation"in p?p.indentation:" ",p.collapseContent=p.collapseContent===!0,p.lineSeparator="lineSeparator"in p?p.lineSeparator:`\r `,p.whiteSpaceAtEndOfSelfclosingTag=p.whiteSpaceAtEndOfSelfclosingTag===!0,p.throwOnFailure=p.throwOnFailure!==!1;try{const $=(0,i.default)(h,{filter:p.filter,strictMode:p.strictMode}),g={content:"",level:0,options:p,path:[]};return $.declaration&&f($.declaration,g),$.children.forEach(function(b){a(b,g,!1)}),p.lineSeparator?g.content.replace(/\r\n/g,` -`).replace(/\n/g,p.lineSeparator):g.content}catch($){if(p.throwOnFailure)throw $;return h}}d.minify=(h,p={})=>d(h,Object.assign(Object.assign({},p),{indentation:"",lineSeparator:""})),t.exports=d,e.default=d}(ja,ja.exports)),ja.exports}var T3=w3();const Kw=_3(T3),k3={class:"p-4"},R3=M({__name:"XmlView",setup(t){const e=zt(),n=ne(Kw(e.xml)),i=[Hw()],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.xml=o});function s(){e.manualSync()}return(o,a)=>(w(),B("div",k3,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),C3=1,X3=2,V3=275,E3=3,A3=276,dv=277,q3=278,Z3=4,z3=5,Y3=6,M3=7,hv=8,I3=9,U3=10,D3=11,L3=12,W3=13,N3=14,j3=15,B3=16,G3=17,F3=18,H3=19,K3=20,J3=21,eN=22,tN=23,nN=24,iN=25,rN=26,sN=27,oN=28,aN=29,lN=30,cN=31,uN=32,ON=33,fN=34,dN=35,hN=36,pN=37,mN=38,gN=39,$N=40,QN=41,yN=42,bN=43,vN=44,SN=45,PN=46,_N=47,xN=48,wN=49,TN=50,kN=51,RN=52,CN=53,XN=54,VN=55,EN=56,AN=57,qN=58,ZN=59,zN=60,YN=61,MN=62,Wd=63,IN=64,UN=65,DN=66,LN={abstract:Z3,and:z3,array:Y3,as:M3,true:hv,false:hv,break:I3,case:U3,catch:D3,clone:L3,const:W3,continue:N3,declare:B3,default:j3,do:G3,echo:F3,else:H3,elseif:K3,enddeclare:J3,endfor:eN,endforeach:tN,endif:nN,endswitch:iN,endwhile:rN,enum:sN,extends:oN,final:aN,finally:lN,fn:cN,for:uN,foreach:ON,from:fN,function:dN,global:hN,goto:pN,if:mN,implements:gN,include:$N,include_once:QN,instanceof:yN,insteadof:bN,interface:vN,list:SN,match:PN,namespace:_N,new:xN,null:wN,or:TN,print:kN,readonly:RN,require:CN,require_once:XN,return:VN,switch:EN,throw:AN,trait:qN,try:ZN,unset:zN,use:YN,var:MN,public:Wd,private:Wd,protected:Wd,while:IN,xor:UN,yield:DN,__proto__:null};function pv(t){let e=LN[t.toLowerCase()];return e??-1}function mv(t){return t==9||t==10||t==13||t==32}function Jw(t){return t>=97&&t<=122||t>=65&&t<=90}function al(t){return t==95||t>=128||Jw(t)}function Nd(t){return t>=48&&t<=55||t>=97&&t<=102||t>=65&&t<=70}const WN={int:!0,integer:!0,bool:!0,boolean:!0,float:!0,double:!0,real:!0,string:!0,array:!0,object:!0,unset:!0,__proto__:null},NN=new jt(t=>{if(t.next==40){t.advance();let e=0;for(;mv(t.peek(e));)e++;let n="",i;for(;Jw(i=t.peek(e));)n+=String.fromCharCode(i),e++;for(;mv(t.peek(e));)e++;t.peek(e)==41&&WN[n.toLowerCase()]&&t.acceptToken(C3)}else if(t.next==60&&t.peek(1)==60&&t.peek(2)==60){for(let i=0;i<3;i++)t.advance();for(;t.next==32||t.next==9;)t.advance();let e=t.next==39;if(e&&t.advance(),!al(t.next))return;let n=String.fromCharCode(t.next);for(;t.advance(),!(!al(t.next)&&!(t.next>=48&&t.next<=55));)n+=String.fromCharCode(t.next);if(e){if(t.next!=39)return;t.advance()}if(t.next!=10&&t.next!=13)return;for(;;){let i=t.next==10||t.next==13;if(t.advance(),t.next<0)return;if(i){for(;t.next==32||t.next==9;)t.advance();let r=!0;for(let s=0;s{t.next<0&&t.acceptToken(q3)}),BN=new jt((t,e)=>{t.next==63&&e.canShift(dv)&&t.peek(1)==62&&t.acceptToken(dv)});function GN(t){let e=t.peek(1);if(e==110||e==114||e==116||e==118||e==101||e==102||e==92||e==36||e==34||e==123)return 2;if(e>=48&&e<=55){let n=2,i;for(;n<5&&(i=t.peek(n))>=48&&i<=55;)n++;return n}if(e==120&&Nd(t.peek(2)))return Nd(t.peek(3))?4:3;if(e==117&&t.peek(2)==123)for(let n=3;;n++){let i=t.peek(n);if(i==125)return n==2?0:n+1;if(!Nd(i))break}return 0}const FN=new jt((t,e)=>{let n=!1;for(;!(t.next==34||t.next<0||t.next==36&&(al(t.peek(1))||t.peek(1)==123)||t.next==123&&t.peek(1)==36);n=!0){if(t.next==92){let i=GN(t);if(i){if(n)break;return t.acceptToken(E3,i)}}else if(!n&&(t.next==91||t.next==45&&t.peek(1)==62&&al(t.peek(2))||t.next==63&&t.peek(1)==45&&t.peek(2)==62&&al(t.peek(3)))&&e.canShift(A3))break;t.advance()}n&&t.acceptToken(V3)}),HN=pa({"Visibility abstract final static":k.modifier,"for foreach while do if else elseif switch try catch finally return throw break continue default case":k.controlKeyword,"endif endfor endforeach endswitch endwhile declare enddeclare goto match":k.controlKeyword,"and or xor yield unset clone instanceof insteadof":k.operatorKeyword,"function fn class trait implements extends const enum global interface use var":k.definitionKeyword,"include include_once require require_once namespace":k.moduleKeyword,"new from echo print array list as":k.keyword,null:k.null,Boolean:k.bool,VariableName:k.variableName,"NamespaceName/...":k.namespace,"NamedType/...":k.typeName,Name:k.name,"CallExpression/Name":k.function(k.variableName),"LabelStatement/Name":k.labelName,"MemberExpression/Name":k.propertyName,"MemberExpression/VariableName":k.special(k.propertyName),"ScopedExpression/ClassMemberName/Name":k.propertyName,"ScopedExpression/ClassMemberName/VariableName":k.special(k.propertyName),"CallExpression/MemberExpression/Name":k.function(k.propertyName),"CallExpression/ScopedExpression/ClassMemberName/Name":k.function(k.propertyName),"MethodDeclaration/Name":k.function(k.definition(k.variableName)),"FunctionDefinition/Name":k.function(k.definition(k.variableName)),"ClassDeclaration/Name":k.definition(k.className),UpdateOp:k.updateOperator,ArithOp:k.arithmeticOperator,"LogicOp IntersectionType/&":k.logicOperator,BitOp:k.bitwiseOperator,CompareOp:k.compareOperator,ControlOp:k.controlOperator,AssignOp:k.definitionOperator,"$ ConcatOp":k.operator,LineComment:k.lineComment,BlockComment:k.blockComment,Integer:k.integer,Float:k.float,String:k.string,ShellExpression:k.special(k.string),"=> ->":k.punctuation,"( )":k.paren,"#[ [ ]":k.squareBracket,"${ { }":k.brace,"-> ?->":k.derefOperator,", ; :: : \\":k.separator,"PhpOpen PhpClose":k.processingInstruction}),KN={__proto__:null,static:325,STATIC:325,class:351,CLASS:351},JN=ms.deserialize({version:14,states:"%#[Q`OWOOQhQaOOP%oO`OOOOO#t'#Hh'#HhO%tO#|O'#DuOOO#u'#Dx'#DxQ&SOWO'#DxO&XO$VOOOOQ#u'#Dy'#DyO&lQaO'#D}O'[QdO'#EQO+QQdO'#IqO+_QdO'#ERO-RQaO'#EXO/bQ`O'#EUO/gQ`O'#E_O2UQaO'#E_O2]Q`O'#EgO2bQ`O'#EqO-RQaO'#EqO2mQpO'#FOO2rQ`O'#FOOOQS'#Iq'#IqO2wQ`O'#ExOOQS'#Ih'#IhO5SQdO'#IeO9UQeO'#F]O-RQaO'#FlO-RQaO'#FmO-RQaO'#FnO-RQaO'#FoO-RQaO'#FoO-RQaO'#FrOOQO'#Ir'#IrO9cQ`O'#FxOOQO'#Ht'#HtO9kQ`O'#HXO:VQ`O'#FsO:bQ`O'#HfO:mQ`O'#GPO:uQaO'#GQO-RQaO'#G`O-RQaO'#GcO;bOrO'#GfOOQS'#JP'#JPOOQS'#JO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8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_R/a,m0}}PVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g,m-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_T$x{$|Q(q%QQ(v%TQ(y%VR2b1WQ%c!]Q(u%SQ,d(tQ/W,cQ/Y,eQ1Q/XR2_1RQ%q!fR)m%rR/p-O",nodeNames:"⚠ ( HeredocString EscapeSequence abstract LogicOp array as Boolean break case catch clone const continue default declare do echo else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final finally fn for foreach from function global goto if implements include include_once LogicOp insteadof interface list match namespace new null LogicOp print readonly require require_once return switch throw trait try unset use var Visibility while LogicOp yield LineComment BlockComment TextInterpolation PhpClose Text PhpOpen Template TextInterpolation EmptyStatement ; } { Block : LabelStatement Name ExpressionStatement ConditionalExpression LogicOp MatchExpression ) ( ParenthesizedExpression MatchBlock MatchArm , => AssignmentExpression ArrayExpression ValueList & VariadicUnpacking ... Pair [ ] ListExpression ValueList Pair Pair SubscriptExpression MemberExpression -> ?-> Name VariableName DynamicVariable $ ${ CallExpression ArgList NamedArgument SpreadArgument CastExpression UnionType LogicOp IntersectionType OptionalType NamedType QualifiedName \\ NamespaceName Name NamespaceName Name ScopedExpression :: ClassMemberName DynamicMemberName AssignOp UpdateExpression UpdateOp YieldExpression BinaryExpression LogicOp LogicOp LogicOp BitOp BitOp BitOp CompareOp CompareOp BitOp ArithOp ConcatOp ArithOp ArithOp IncludeExpression RequireExpression CloneExpression UnaryExpression ControlOp LogicOp PrintIntrinsic FunctionExpression static ParamList Parameter #[ Attributes Attribute VariadicParameter PropertyParameter PropertyHooks PropertyHook UseList ArrowFunction NewExpression class BaseClause ClassInterfaceClause DeclarationList ConstDeclaration VariableDeclarator PropertyDeclaration VariableDeclarator MethodDeclaration UseDeclaration UseList UseInsteadOfClause UseAsClause UpdateExpression ArithOp ShellExpression ThrowExpression Integer Float String MemberExpression SubscriptExpression UnaryExpression ArithOp Interpolation String IfStatement ColonBlock SwitchStatement Block CaseStatement DefaultStatement ColonBlock WhileStatement EmptyStatement DoStatement ForStatement ForSpec SequenceExpression ForeachStatement ForSpec Pair GotoStatement ContinueStatement BreakStatement ReturnStatement TryStatement CatchDeclarator DeclareStatement EchoStatement UnsetStatement ConstDeclaration FunctionDefinition ClassDeclaration InterfaceDeclaration TraitDeclaration EnumDeclaration EnumBody EnumCase NamespaceDefinition NamespaceUseDeclaration UseGroup UseClause UseClause GlobalDeclaration FunctionStaticDeclaration Program",maxTerm:318,nodeProps:[["group",-36,2,8,49,82,84,86,89,94,95,103,107,108,112,113,116,120,126,132,137,139,140,154,155,156,157,160,161,173,174,188,190,191,192,193,194,200,"Expression",-28,75,79,81,83,201,203,208,210,211,214,217,218,219,220,221,223,224,225,226,227,228,229,230,231,234,235,239,240,"Statement",-4,121,123,124,125,"Type"],["isolate",-4,67,68,71,200,""],["openedBy",70,"phpOpen",77,"{",87,"(",102,"#["],["closedBy",72,"phpClose",78,"}",88,")",165,"]"]],propSources:[HN],skippedNodes:[0],repeatNodeCount:32,tokenData:"!GQ_R!]OX$zXY&^YZ'sZ]$z]^&^^p$zpq&^qr)Rrs+Pst+otu2buv5evw6rwx8Vxy>]yz>yz{?g{|@}|}Bb}!OCO!O!PDh!P!QKT!Q!R!!o!R![!$q![!]!,P!]!^!-a!^!_!-}!_!`!1S!`!a!2d!a!b!3t!b!c!7^!c!d!7z!d!e!9Y!e!}!7z!}#O!;b#O#P!V<%lO8VR9WV'TP%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X<%lO9mQ9rV%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X<%lO9mQ:^O%`QQ:aRO;'S9m;'S;=`:j;=`O9mQ:oW%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X;=`<%l9m<%lO9mQ;[P;=`<%l9mR;fV'TP%`QOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zRV<%l~8V~O8V~~%fR=OW'TPOY8VYZ9PZ!^8V!^!_;{!_;'S8V;'S;=`=h;=`<%l9m<%lO8VR=mW%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X;=`<%l8V<%lO9mR>YP;=`<%l8VR>dV!zQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zV?QV!yU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR?nY'TP$^QOY$zYZ%fZz$zz{@^{!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zR@eW$_Q'TPOY$zYZ%fZ!^$z!^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;'S;=`!Cm<%l~!=y~O!=y~~%fR!AzW'TPOY!=yYZ!>qZ!^!=y!^!_!@y!_;'S!=y;'S;=`!Bd;=`<%l!?]<%lO!=yR!BgWO#O!?]#O#P!?u#P#S!?]#S#T!@n#T;'S!?];'S;=`!@s;=`<%l!=y<%lO!?]R!CWV%UQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!CpP;=`<%l!=y_!CzV!p^'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_!DjY$UQ#n['TPOY$zYZ%fZ!^$z!^!_%k!_!`6U!`#p$z#p#q!EY#q;'S$z;'S;=`&W<%lO$zR!EaV$SQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!E}V!oQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!FkV$eQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z",tokenizers:[NN,FN,BN,0,1,2,3,jN],topRules:{Template:[0,73],Program:[1,241]},dynamicPrecedences:{298:1},specialized:[{term:284,get:(t,e)=>pv(t)<<1,external:pv},{term:284,get:t=>KN[t]||-1}],tokenPrec:29883}),e7=54,t7=1,n7=55,i7=2,r7=56,s7=3,gv=4,o7=5,VO=6,eT=7,tT=8,nT=9,iT=10,a7=11,l7=12,c7=13,jd=57,u7=14,$v=58,rT=20,O7=22,sT=23,f7=24,Lp=26,oT=27,d7=28,h7=31,p7=34,m7=36,g7=37,$7=0,Q7=1,y7={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},b7={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Qv={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function v7(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function aT(t){return t==9||t==10||t==13||t==32}let yv=null,bv=null,vv=0;function Wp(t,e){let n=t.pos+e;if(vv==n&&bv==t)return yv;let i=t.peek(e);for(;aT(i);)i=t.peek(++e);let r="";for(;v7(i);)r+=String.fromCharCode(i),i=t.peek(++e);return bv=t,vv=n,yv=r?r.toLowerCase():i==S7||i==P7?void 0:null}const lT=60,EO=62,jg=47,S7=63,P7=33,_7=45;function Sv(t,e){this.name=t,this.parent=e}const x7=[VO,iT,eT,tT,nT],w7=new Wg({start:null,shift(t,e,n,i){return x7.indexOf(e)>-1?new Sv(Wp(i,1)||"",t):t},reduce(t,e){return e==rT&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==VO||r==m7?new Sv(Wp(i,1)||"",t):t},strict:!1}),T7=new jt((t,e)=>{if(t.next!=lT){t.next<0&&e.context&&t.acceptToken(jd);return}t.advance();let n=t.next==jg;n&&t.advance();let i=Wp(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?u7:VO);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(a7);if(r&&b7[r])return t.acceptToken(jd,-2);if(e.dialectEnabled($7))return t.acceptToken(l7);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(c7)}else{if(i=="script")return t.acceptToken(eT);if(i=="style")return t.acceptToken(tT);if(i=="textarea")return t.acceptToken(nT);if(y7.hasOwnProperty(i))return t.acceptToken(iT);r&&Qv[r]&&Qv[r][i]?t.acceptToken(jd,-1):t.acceptToken(VO)}},{contextual:!0}),k7=new jt(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken($v);break}if(t.next==_7)e++;else if(t.next==EO&&e>=2){n>=3&&t.acceptToken($v,-2);break}else e=0;t.advance()}});function R7(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const C7=new jt((t,e)=>{if(t.next==jg&&t.peek(1)==EO){let n=e.dialectEnabled(Q7)||R7(e.context);t.acceptToken(n?o7:gv,2)}else t.next==EO&&t.acceptToken(gv,1)});function Bg(t,e,n){let i=2+t.length;return new jt(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(e);break}if(s==0&&r.next==lT||s==1&&r.next==jg||s>=2&&so?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&a){r.acceptToken(e,1);break}else s=o=0;r.advance()}})}const X7=Bg("script",e7,t7),V7=Bg("style",n7,i7),E7=Bg("textarea",r7,s7),A7=pa({"Text RawText":k.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":k.angleBracket,TagName:k.tagName,"MismatchedCloseTag/TagName":[k.tagName,k.invalid],AttributeName:k.attributeName,"AttributeValue UnquotedAttributeValue":k.attributeValue,Is:k.definitionOperator,"EntityReference CharacterReference":k.character,Comment:k.blockComment,ProcessingInst:k.processingInstruction,DoctypeDecl:k.documentMeta}),q7=ms.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DY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^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:w7,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[A7],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP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lay:[{from:O.to,to:$}]}}}}if(o&&c==sT){let u=a.node,O;if(O=u.firstChild){let f=o[l.read(O.from,O.to)];if(f)for(let d of f){if(d.tagName&&d.tagName!=Pv(u.parent,l))continue;let h=u.lastChild;if(h.type.id==Lp){let p=h.from+1,$=h.lastChild,g=h.to-($&&$.isError?0:1);if(g>p)return{parser:d.parser,overlay:[{from:p,to:g}]}}else if(h.type.id==oT)return{parser:d.parser,overlay:[{from:h.from,to:h.to}]}}}}return null})}const Z7=122,_v=1,z7=123,Y7=124,OT=2,M7=125,I7=3,U7=4,fT=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],D7=58,L7=40,dT=95,W7=91,Vu=45,N7=46,j7=35,B7=37,G7=38,F7=92,H7=10,K7=42;function Ll(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Gg(t){return t>=48&&t<=57}function xv(t){return Gg(t)||t>=97&&t<=102||t>=65&&t<=70}const hT=(t,e,n)=>(i,r)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=i;if(Ll(l)||l==Vu||l==dT||s&&Gg(l))!s&&(l!=Vu||a>0)&&(s=!0),o===a&&l==Vu&&o++,i.advance();else if(l==F7&&i.peek(1)!=H7){if(i.advance(),xv(i.next)){do i.advance();while(xv(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(o==2&&r.canShift(OT)?e:l==L7?n:t);break}}},J7=new jt(hT(z7,OT,Y7)),ej=new jt(hT(M7,I7,U7)),tj=new jt(t=>{if(fT.includes(t.peek(-1))){let{next:e}=t;(Ll(e)||e==dT||e==j7||e==N7||e==K7||e==W7||e==D7&&Ll(t.peek(1))||e==Vu||e==G7)&&t.acceptToken(Z7)}}),nj=new jt(t=>{if(!fT.includes(t.peek(-1))){let{next:e}=t;if(e==B7&&(t.advance(),t.acceptToken(_v)),Ll(e)){do t.advance();while(Ll(t.next)||Gg(t.next));t.acceptToken(_v)}}}),ij=pa({"AtKeyword import charset namespace keyframes media supports":k.definitionKeyword,"from to selector":k.keyword,NamespaceName:k.namespace,KeyframeName:k.labelName,KeyframeRangeName:k.operatorKeyword,TagName:k.tagName,ClassName:k.className,PseudoClassName:k.constant(k.className),IdName:k.labelName,"FeatureName PropertyName":k.propertyName,AttributeName:k.attributeName,NumberLiteral:k.number,KeywordQuery:k.keyword,UnaryQueryOp:k.operatorKeyword,"CallTag ValueName":k.atom,VariableName:k.variableName,Callee:k.operatorKeyword,Unit:k.unit,"UniversalSelector NestingSelector":k.definitionOperator,"MatchOp CompareOp":k.compareOperator,"ChildOp SiblingOp, LogicOp":k.logicOperator,BinOp:k.arithmeticOperator,Important:k.modifier,Comment:k.blockComment,ColorLiteral:k.color,"ParenthesizedContent StringLiteral":k.string,":":k.punctuation,"PseudoOp #":k.derefOperator,"; ,":k.separator,"( )":k.paren,"[ ]":k.squareBracket,"{ }":k.brace}),rj={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},sj={__proto__:null,or:98,and:98,not:106,only:106,layer:170},oj={__proto__:null,selector:112,layer:166},aj={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},lj={__proto__:null,to:207},cj=ms.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#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7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!hO[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!hyS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!hrj[t]||-1},{term:125,get:t=>sj[t]||-1},{term:4,get:t=>oj[t]||-1},{term:25,get:t=>aj[t]||-1},{term:123,get:t=>lj[t]||-1}],tokenPrec:1963});let Gd=null;function Fd(){if(!Gd&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));Gd=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return Gd||[]}const wv=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Tv=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),uj=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Oj=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),ar=/^(\w[\w-]*|-\w[\w-]*|)$/,fj=/^-(-[\w-]*)?$/;function dj(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const kv=new _x,hj=["Declaration"];function pj(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function pT(t,e,n){if(e.to-e.from>4096){let i=kv.get(e);if(i)return i;let r=[],s=new Set,o=e.cursor(ht.IncludeAnonymous);if(o.firstChild())do for(let a of pT(t,o.node,n))s.has(a.label)||(s.add(a.label),r.push(a));while(o.nextSibling());return kv.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(hj)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);r.has(a)||(r.add(a),i.push({label:a,type:"variable"}))}}),i}}const mj=t=>e=>{let{state:n,pos:i}=e,r=Pt(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Fd(),validFor:ar};if(r.name=="ValueName")return{from:r.from,options:Tv,validFor:ar};if(r.name=="PseudoClassName")return{from:r.from,options:wv,validFor:ar};if(t(r)||(e.explicit||s)&&dj(r,n.doc))return{from:t(r)||s?r.from:i,options:pT(n.doc,pj(r),t),validFor:fj};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:Fd(),validFor:ar};return{from:r.from,options:uj,validFor:ar}}if(r.name=="AtKeyword")return{from:r.from,options:Oj,validFor:ar};if(!e.explicit)return null;let o=r.resolve(i),a=o.childBefore(i);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:wv,validFor:ar}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:Tv,validFor:ar}:o.name=="Block"||o.name=="Styles"?{from:i,options:Fd(),validFor:ar}:null},gj=mj(t=>t.name=="VariableName"),AO=hs.define({name:"css",parser:cj.configure({props:[ma.add({Declaration:Ms()}),ga.add({"Block KeyframeList":Tg})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function $j(){return new dc(AO,AO.data.of({autocomplete:gj}))}const Qj=315,yj=316,Rv=1,bj=2,vj=3,Sj=4,Pj=317,_j=319,xj=320,wj=5,Tj=6,kj=0,Np=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],mT=125,Rj=59,jp=47,Cj=42,Xj=43,Vj=45,Ej=60,Aj=44,qj=63,Zj=46,zj=91,Yj=new Wg({start:!1,shift(t,e){return e==wj||e==Tj||e==_j?t:e==xj},strict:!1}),Mj=new jt((t,e)=>{let{next:n}=t;(n==mT||n==-1||e.context)&&t.acceptToken(Pj)},{contextual:!0,fallback:!0}),Ij=new jt((t,e)=>{let{next:n}=t,i;Np.indexOf(n)>-1||n==jp&&((i=t.peek(1))==jp||i==Cj)||n!=mT&&n!=Rj&&n!=-1&&!e.context&&t.acceptToken(Qj)},{contextual:!0}),Uj=new jt((t,e)=>{t.next==zj&&!e.context&&t.acceptToken(yj)},{contextual:!0}),Dj=new jt((t,e)=>{let{next:n}=t;if(n==Xj||n==Vj){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(Rv);t.acceptToken(i?Rv:bj)}}else n==qj&&t.peek(1)==Zj&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(vj))},{contextual:!0});function Hd(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Lj=new jt((t,e)=>{if(t.next!=Ej||!e.dialectEnabled(kj)||(t.advance(),t.next==jp))return;let n=0;for(;Np.indexOf(t.next)>-1;)t.advance(),n++;if(Hd(t.next,!0)){for(t.advance(),n++;Hd(t.next,!1);)t.advance(),n++;for(;Np.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Aj)return;for(let i=0;;i++){if(i==7){if(!Hd(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Sj,-n)}),Wj=pa({"get set async static":k.modifier,"for while do if else switch try catch finally return throw break continue default case":k.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":k.operatorKeyword,"let var const using function class extends":k.definitionKeyword,"import export from":k.moduleKeyword,"with debugger new":k.keyword,TemplateString:k.special(k.string),super:k.atom,BooleanLiteral:k.bool,this:k.self,null:k.null,Star:k.modifier,VariableName:k.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":k.function(k.variableName),VariableDefinition:k.definition(k.variableName),Label:k.labelName,PropertyName:k.propertyName,PrivatePropertyName:k.special(k.propertyName),"CallExpression/MemberExpression/PropertyName":k.function(k.propertyName),"FunctionDeclaration/VariableDefinition":k.function(k.definition(k.variableName)),"ClassDeclaration/VariableDefinition":k.definition(k.className),"NewExpression/VariableName":k.className,PropertyDefinition:k.definition(k.propertyName),PrivatePropertyDefinition:k.definition(k.special(k.propertyName)),UpdateOp:k.updateOperator,"LineComment Hashbang":k.lineComment,BlockComment:k.blockComment,Number:k.number,String:k.string,Escape:k.escape,ArithOp:k.arithmeticOperator,LogicOp:k.logicOperator,BitOp:k.bitwiseOperator,CompareOp:k.compareOperator,RegExp:k.regexp,Equals:k.definitionOperator,Arrow:k.function(k.punctuation),": Spread":k.punctuation,"( )":k.paren,"[ ]":k.squareBracket,"{ }":k.brace,"InterpolationStart InterpolationEnd":k.special(k.brace),".":k.derefOperator,", ;":k.separator,"@":k.meta,TypeName:k.typeName,TypeDefinition:k.definition(k.typeName),"type enum interface implements namespace module declare":k.definitionKeyword,"abstract global Privacy readonly override":k.modifier,"is keyof unique infer asserts":k.operatorKeyword,JSXAttributeValue:k.attributeValue,JSXText:k.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":k.angleBracket,"JSXIdentifier JSXNameSpacedName":k.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":k.attributeName,"JSXBuiltin/JSXIdentifier":k.standard(k.tagName)}),Nj={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,for:474,of:483,while:486,with:490,do:494,if:498,else:500,switch:504,case:510,try:516,catch:520,finally:524,return:528,throw:532,break:536,continue:540,debugger:544},jj={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Bj={__proto__:null,"<":193},Gj=ms.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Ik'#IkO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JqO6[Q!0MxO'#JrO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#F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#Gq#Gw#G}#HX#H_#He#Ho#IR#IXPPPPPPPPPPP#I_PPPPPPP#JS#MZ#Ns#Nz$ SPPP$&nP$&w$)p$0Z$0^$0a$1`$1c$1j$1rP$1x$1{P$2i$2m$3e$4s$4x$5`PP$5e$5k$5o$5r$5v$5z$6v$7_$7v$7z$7}$8Q$8W$8Z$8_$8cR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:379,context:Yj,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,236,242,244,246,248,251,257,263,265,267,269,271,273,274,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Wj],skippedNodes:[0,5,6,277],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!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g;'SEr;'S;=`I|<%lOEr",tokenizers:[Ij,Uj,Dj,Lj,2,3,4,5,6,7,8,9,10,11,12,13,14,Mj,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(b~~",141,339),new XO("j~RQYZXz{^~^O(P~~aP!P!Qd~iO(Q~~",25,322)],topRules:{Script:[0,7],SingleExpression:[1,275],SingleClassItem:[2,276]},dialects:{jsx:0,ts:15098},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:326,get:t=>Nj[t]||-1},{term:342,get:t=>jj[t]||-1},{term:95,get:t=>Bj[t]||-1}],tokenPrec:15124}),gT=[wn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),wn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),wn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),wn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),wn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),wn(`try { +`).replace(/\n/g,p.lineSeparator):g.content}catch($){if(p.throwOnFailure)throw $;return h}}d.minify=(h,p={})=>d(h,Object.assign(Object.assign({},p),{indentation:"",lineSeparator:""})),t.exports=d,e.default=d}(ja,ja.exports)),ja.exports}var k3=T3();const Jw=x3(k3),R3={class:"p-4"},C3=M({__name:"XmlView",setup(t){const e=zt(),n=ne(Jw(e.xml)),i=[Kw()],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.xml=o});function s(){e.manualSync()}return(o,a)=>(w(),j("div",R3,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),X3=1,V3=2,E3=275,A3=3,q3=276,dv=277,Z3=278,z3=4,Y3=5,M3=6,I3=7,hv=8,U3=9,D3=10,L3=11,W3=12,N3=13,j3=14,B3=15,G3=16,F3=17,H3=18,K3=19,J3=20,eN=21,tN=22,nN=23,iN=24,rN=25,sN=26,oN=27,aN=28,lN=29,cN=30,uN=31,ON=32,fN=33,dN=34,hN=35,pN=36,mN=37,gN=38,$N=39,QN=40,yN=41,bN=42,vN=43,SN=44,PN=45,_N=46,xN=47,wN=48,TN=49,kN=50,RN=51,CN=52,XN=53,VN=54,EN=55,AN=56,qN=57,ZN=58,zN=59,YN=60,MN=61,IN=62,Wd=63,UN=64,DN=65,LN=66,WN={abstract:z3,and:Y3,array:M3,as:I3,true:hv,false:hv,break:U3,case:D3,catch:L3,clone:W3,const:N3,continue:j3,declare:G3,default:B3,do:F3,echo:H3,else:K3,elseif:J3,enddeclare:eN,endfor:tN,endforeach:nN,endif:iN,endswitch:rN,endwhile:sN,enum:oN,extends:aN,final:lN,finally:cN,fn:uN,for:ON,foreach:fN,from:dN,function:hN,global:pN,goto:mN,if:gN,implements:$N,include:QN,include_once:yN,instanceof:bN,insteadof:vN,interface:SN,list:PN,match:_N,namespace:xN,new:wN,null:TN,or:kN,print:RN,readonly:CN,require:XN,require_once:VN,return:EN,switch:AN,throw:qN,trait:ZN,try:zN,unset:YN,use:MN,var:IN,public:Wd,private:Wd,protected:Wd,while:UN,xor:DN,yield:LN,__proto__:null};function pv(t){let e=WN[t.toLowerCase()];return e??-1}function mv(t){return t==9||t==10||t==13||t==32}function eT(t){return t>=97&&t<=122||t>=65&&t<=90}function al(t){return t==95||t>=128||eT(t)}function Nd(t){return t>=48&&t<=55||t>=97&&t<=102||t>=65&&t<=70}const NN={int:!0,integer:!0,bool:!0,boolean:!0,float:!0,double:!0,real:!0,string:!0,array:!0,object:!0,unset:!0,__proto__:null},jN=new jt(t=>{if(t.next==40){t.advance();let e=0;for(;mv(t.peek(e));)e++;let n="",i;for(;eT(i=t.peek(e));)n+=String.fromCharCode(i),e++;for(;mv(t.peek(e));)e++;t.peek(e)==41&&NN[n.toLowerCase()]&&t.acceptToken(X3)}else if(t.next==60&&t.peek(1)==60&&t.peek(2)==60){for(let i=0;i<3;i++)t.advance();for(;t.next==32||t.next==9;)t.advance();let e=t.next==39;if(e&&t.advance(),!al(t.next))return;let n=String.fromCharCode(t.next);for(;t.advance(),!(!al(t.next)&&!(t.next>=48&&t.next<=55));)n+=String.fromCharCode(t.next);if(e){if(t.next!=39)return;t.advance()}if(t.next!=10&&t.next!=13)return;for(;;){let i=t.next==10||t.next==13;if(t.advance(),t.next<0)return;if(i){for(;t.next==32||t.next==9;)t.advance();let r=!0;for(let s=0;s{t.next<0&&t.acceptToken(Z3)}),GN=new jt((t,e)=>{t.next==63&&e.canShift(dv)&&t.peek(1)==62&&t.acceptToken(dv)});function FN(t){let e=t.peek(1);if(e==110||e==114||e==116||e==118||e==101||e==102||e==92||e==36||e==34||e==123)return 2;if(e>=48&&e<=55){let n=2,i;for(;n<5&&(i=t.peek(n))>=48&&i<=55;)n++;return n}if(e==120&&Nd(t.peek(2)))return Nd(t.peek(3))?4:3;if(e==117&&t.peek(2)==123)for(let n=3;;n++){let i=t.peek(n);if(i==125)return n==2?0:n+1;if(!Nd(i))break}return 0}const HN=new jt((t,e)=>{let n=!1;for(;!(t.next==34||t.next<0||t.next==36&&(al(t.peek(1))||t.peek(1)==123)||t.next==123&&t.peek(1)==36);n=!0){if(t.next==92){let i=FN(t);if(i){if(n)break;return t.acceptToken(A3,i)}}else if(!n&&(t.next==91||t.next==45&&t.peek(1)==62&&al(t.peek(2))||t.next==63&&t.peek(1)==45&&t.peek(2)==62&&al(t.peek(3)))&&e.canShift(q3))break;t.advance()}n&&t.acceptToken(E3)}),KN=pa({"Visibility abstract final static":k.modifier,"for foreach while do if else elseif switch try catch finally return throw break continue default case":k.controlKeyword,"endif endfor endforeach endswitch endwhile declare enddeclare goto match":k.controlKeyword,"and or xor yield unset clone instanceof insteadof":k.operatorKeyword,"function fn class trait implements extends const enum global interface use var":k.definitionKeyword,"include include_once require require_once namespace":k.moduleKeyword,"new from echo print array list as":k.keyword,null:k.null,Boolean:k.bool,VariableName:k.variableName,"NamespaceName/...":k.namespace,"NamedType/...":k.typeName,Name:k.name,"CallExpression/Name":k.function(k.variableName),"LabelStatement/Name":k.labelName,"MemberExpression/Name":k.propertyName,"MemberExpression/VariableName":k.special(k.propertyName),"ScopedExpression/ClassMemberName/Name":k.propertyName,"ScopedExpression/ClassMemberName/VariableName":k.special(k.propertyName),"CallExpression/MemberExpression/Name":k.function(k.propertyName),"CallExpression/ScopedExpression/ClassMemberName/Name":k.function(k.propertyName),"MethodDeclaration/Name":k.function(k.definition(k.variableName)),"FunctionDefinition/Name":k.function(k.definition(k.variableName)),"ClassDeclaration/Name":k.definition(k.className),UpdateOp:k.updateOperator,ArithOp:k.arithmeticOperator,"LogicOp IntersectionType/&":k.logicOperator,BitOp:k.bitwiseOperator,CompareOp:k.compareOperator,ControlOp:k.controlOperator,AssignOp:k.definitionOperator,"$ ConcatOp":k.operator,LineComment:k.lineComment,BlockComment:k.blockComment,Integer:k.integer,Float:k.float,String:k.string,ShellExpression:k.special(k.string),"=> ->":k.punctuation,"( )":k.paren,"#[ [ ]":k.squareBracket,"${ { }":k.brace,"-> ?->":k.derefOperator,", ; :: : \\":k.separator,"PhpOpen PhpClose":k.processingInstruction}),JN={__proto__:null,static:325,STATIC:325,class:351,CLASS:351},e7=ms.deserialize({version:14,states:"%#[Q`OWOOQhQaOOP%oO`OOOOO#t'#H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7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_T$x{$|Q(q%QQ(v%TQ(y%VR2b1WQ%c!]Q(u%SQ,d(tQ/W,cQ/Y,eQ1Q/XR2_1RQ%q!fR)m%rR/p-O",nodeNames:"⚠ ( HeredocString EscapeSequence abstract LogicOp array as Boolean break case catch clone const continue default declare do echo else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final finally fn for foreach from function global goto if implements include include_once LogicOp insteadof interface list match namespace new null LogicOp print readonly require require_once return switch throw trait try unset use var Visibility while LogicOp yield LineComment BlockComment TextInterpolation PhpClose Text PhpOpen Template TextInterpolation EmptyStatement ; } { Block : LabelStatement Name ExpressionStatement ConditionalExpression LogicOp MatchExpression ) ( ParenthesizedExpression MatchBlock MatchArm , => AssignmentExpression ArrayExpression ValueList & VariadicUnpacking ... Pair [ ] ListExpression ValueList Pair Pair SubscriptExpression MemberExpression -> ?-> Name VariableName DynamicVariable $ ${ CallExpression ArgList NamedArgument SpreadArgument CastExpression UnionType LogicOp IntersectionType OptionalType NamedType QualifiedName \\ NamespaceName Name NamespaceName Name ScopedExpression :: ClassMemberName DynamicMemberName AssignOp UpdateExpression UpdateOp YieldExpression BinaryExpression LogicOp LogicOp LogicOp BitOp BitOp BitOp CompareOp CompareOp BitOp ArithOp ConcatOp ArithOp ArithOp IncludeExpression RequireExpression CloneExpression UnaryExpression ControlOp LogicOp PrintIntrinsic FunctionExpression static ParamList Parameter #[ Attributes Attribute VariadicParameter PropertyParameter PropertyHooks PropertyHook UseList ArrowFunction NewExpression class BaseClause ClassInterfaceClause DeclarationList ConstDeclaration VariableDeclarator PropertyDeclaration VariableDeclarator MethodDeclaration UseDeclaration UseList UseInsteadOfClause UseAsClause UpdateExpression ArithOp ShellExpression ThrowExpression Integer Float String MemberExpression SubscriptExpression UnaryExpression ArithOp Interpolation String IfStatement ColonBlock SwitchStatement Block CaseStatement DefaultStatement ColonBlock WhileStatement EmptyStatement DoStatement ForStatement ForSpec SequenceExpression ForeachStatement ForSpec Pair GotoStatement ContinueStatement BreakStatement ReturnStatement TryStatement CatchDeclarator DeclareStatement EchoStatement UnsetStatement ConstDeclaration FunctionDefinition ClassDeclaration InterfaceDeclaration TraitDeclaration EnumDeclaration EnumBody EnumCase NamespaceDefinition NamespaceUseDeclaration UseGroup UseClause UseClause GlobalDeclaration FunctionStaticDeclaration Program",maxTerm:318,nodeProps:[["group",-36,2,8,49,82,84,86,89,94,95,103,107,108,112,113,116,120,126,132,137,139,140,154,155,156,157,160,161,173,174,188,190,191,192,193,194,200,"Expression",-28,75,79,81,83,201,203,208,210,211,214,217,218,219,220,221,223,224,225,226,227,228,229,230,231,234,235,239,240,"Statement",-4,121,123,124,125,"Type"],["isolate",-4,67,68,71,200,""],["openedBy",70,"phpOpen",77,"{",87,"(",102,"#["],["closedBy",72,"phpClose",78,"}",88,")",165,"]"]],propSources:[KN],skippedNodes:[0],repeatNodeCount:32,tokenData:"!GQ_R!]OX$zXY&^YZ'sZ]$z]^&^^p$zpq&^qr)Rrs+Pst+otu2buv5evw6rwx8Vxy>]yz>yz{?g{|@}|}Bb}!OCO!O!PDh!P!QKT!Q!R!!o!R![!$q![!]!,P!]!^!-a!^!_!-}!_!`!1S!`!a!2d!a!b!3t!b!c!7^!c!d!7z!d!e!9Y!e!}!7z!}#O!;b#O#P!V<%lO8VR9WV'TP%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X<%lO9mQ9rV%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X<%lO9mQ:^O%`QQ:aRO;'S9m;'S;=`:j;=`O9mQ:o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amicPrecedences:{298:1},specialized:[{term:284,get:(t,e)=>pv(t)<<1,external:pv},{term:284,get:t=>JN[t]||-1}],tokenPrec:29883}),t7=54,n7=1,i7=55,r7=2,s7=56,o7=3,gv=4,a7=5,VO=6,tT=7,nT=8,iT=9,rT=10,l7=11,c7=12,u7=13,jd=57,O7=14,$v=58,sT=20,f7=22,oT=23,d7=24,Lp=26,aT=27,h7=28,p7=31,m7=34,g7=36,$7=37,Q7=0,y7=1,b7={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},v7={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Qv={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function S7(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function lT(t){return t==9||t==10||t==13||t==32}let yv=null,bv=null,vv=0;function Wp(t,e){let n=t.pos+e;if(vv==n&&bv==t)return yv;let i=t.peek(e);for(;lT(i);)i=t.peek(++e);let r="";for(;S7(i);)r+=String.fromCharCode(i),i=t.peek(++e);return bv=t,vv=n,yv=r?r.toLowerCase():i==P7||i==_7?void 0:null}const cT=60,EO=62,jg=47,P7=63,_7=33,x7=45;function Sv(t,e){this.name=t,this.parent=e}const w7=[VO,rT,tT,nT,iT],T7=new Wg({start:null,shift(t,e,n,i){return w7.indexOf(e)>-1?new Sv(Wp(i,1)||"",t):t},reduce(t,e){return e==sT&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==VO||r==g7?new Sv(Wp(i,1)||"",t):t},strict:!1}),k7=new jt((t,e)=>{if(t.next!=cT){t.next<0&&e.context&&t.acceptToken(jd);return}t.advance();let n=t.next==jg;n&&t.advance();let i=Wp(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?O7:VO);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(l7);if(r&&v7[r])return t.acceptToken(jd,-2);if(e.dialectEnabled(Q7))return t.acceptToken(c7);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(u7)}else{if(i=="script")return t.acceptToken(tT);if(i=="style")return t.acceptToken(nT);if(i=="textarea")return t.acceptToken(iT);if(b7.hasOwnProperty(i))return t.acceptToken(rT);r&&Qv[r]&&Qv[r][i]?t.acceptToken(jd,-1):t.acceptToken(VO)}},{contextual:!0}),R7=new jt(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken($v);break}if(t.next==x7)e++;else if(t.next==EO&&e>=2){n>=3&&t.acceptToken($v,-2);break}else e=0;t.advance()}});function C7(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const X7=new jt((t,e)=>{if(t.next==jg&&t.peek(1)==EO){let n=e.dialectEnabled(y7)||C7(e.context);t.acceptToken(n?a7:gv,2)}else t.next==EO&&t.acceptToken(gv,1)});function Bg(t,e,n){let i=2+t.length;return new jt(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(e);break}if(s==0&&r.next==cT||s==1&&r.next==jg||s>=2&&so?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&a){r.acceptToken(e,1);break}else s=o=0;r.advance()}})}const V7=Bg("script",t7,n7),E7=Bg("style",i7,r7),A7=Bg("textarea",s7,o7),q7=pa({"Text RawText":k.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":k.angleBracket,TagName:k.tagName,"MismatchedCloseTag/TagName":[k.tagName,k.invalid],AttributeName:k.attributeName,"AttributeValue UnquotedAttributeValue":k.attributeValue,Is:k.definitionOperator,"EntityReference CharacterReference":k.character,Comment:k.blockComment,ProcessingInst:k.processingInstruction,DoctypeDecl:k.documentMeta}),Z7=ms.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/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hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:T7,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[q7],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^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a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let c=a.type.id;if(c==h7)return Bd(a,l,n);if(c==p7)return Bd(a,l,i);if(c==m7)return Bd(a,l,r);if(c==sT&&s.length){let u=a.node,O=u.firstChild,f=O&&Pv(O,l),d;if(f){for(let h of s)if(h.tag==f&&(!h.attrs||h.attrs(d||(d=uT(O,l))))){let p=u.lastChild,$=p.type.id==$7?p.from:u.to;if($>O.to)return{parser:h.parser,overlay:[{from:O.to,to:$}]}}}}if(o&&c==oT){let u=a.node,O;if(O=u.firstChild){let f=o[l.read(O.from,O.to)];if(f)for(let d of f){if(d.tagName&&d.tagName!=Pv(u.parent,l))continue;let h=u.lastChild;if(h.type.id==Lp){let p=h.from+1,$=h.lastChild,g=h.to-($&&$.isError?0:1);if(g>p)return{parser:d.parser,overlay:[{from:p,to:g}]}}else if(h.type.id==aT)return{parser:d.parser,overlay:[{from:h.from,to:h.to}]}}}}return null})}const z7=122,_v=1,Y7=123,M7=124,fT=2,I7=125,U7=3,D7=4,dT=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],L7=58,W7=40,hT=95,N7=91,Vu=45,j7=46,B7=35,G7=37,F7=38,H7=92,K7=10,J7=42;function Ll(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Gg(t){return t>=48&&t<=57}function xv(t){return Gg(t)||t>=97&&t<=102||t>=65&&t<=70}const pT=(t,e,n)=>(i,r)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=i;if(Ll(l)||l==Vu||l==hT||s&&Gg(l))!s&&(l!=Vu||a>0)&&(s=!0),o===a&&l==Vu&&o++,i.advance();else if(l==H7&&i.peek(1)!=K7){if(i.advance(),xv(i.next)){do i.advance();while(xv(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(o==2&&r.canShift(fT)?e:l==W7?n:t);break}}},ej=new jt(pT(Y7,fT,M7)),tj=new jt(pT(I7,U7,D7)),nj=new jt(t=>{if(dT.includes(t.peek(-1))){let{next:e}=t;(Ll(e)||e==hT||e==B7||e==j7||e==J7||e==N7||e==L7&&Ll(t.peek(1))||e==Vu||e==F7)&&t.acceptToken(z7)}}),ij=new jt(t=>{if(!dT.includes(t.peek(-1))){let{next:e}=t;if(e==G7&&(t.advance(),t.acceptToken(_v)),Ll(e)){do t.advance();while(Ll(t.next)||Gg(t.next));t.acceptToken(_v)}}}),rj=pa({"AtKeyword import charset namespace keyframes media supports":k.definitionKeyword,"from to selector":k.keyword,NamespaceName:k.namespace,KeyframeName:k.labelName,KeyframeRangeName:k.operatorKeyword,TagName:k.tagName,ClassName:k.className,PseudoClassName:k.constant(k.className),IdName:k.labelName,"FeatureName PropertyName":k.propertyName,AttributeName:k.attributeName,NumberLiteral:k.number,KeywordQuery:k.keyword,UnaryQueryOp:k.operatorKeyword,"CallTag ValueName":k.atom,VariableName:k.variableName,Callee:k.operatorKeyword,Unit:k.unit,"UniversalSelector NestingSelector":k.definitionOperator,"MatchOp CompareOp":k.compareOperator,"ChildOp SiblingOp, LogicOp":k.logicOperator,BinOp:k.arithmeticOperator,Important:k.modifier,Comment:k.blockComment,ColorLiteral:k.color,"ParenthesizedContent StringLiteral":k.string,":":k.punctuation,"PseudoOp #":k.derefOperator,"; ,":k.separator,"( )":k.paren,"[ ]":k.squareBracket,"{ }":k.brace}),sj={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},oj={__proto__:null,or:98,and:98,not:106,only:106,layer:170},aj={__proto__:null,selector:112,layer:166},lj={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},cj={__proto__:null,to:207},uj=ms.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_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%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!hsj[t]||-1},{term:125,get:t=>oj[t]||-1},{term:4,get:t=>aj[t]||-1},{term:25,get:t=>lj[t]||-1},{term:123,get:t=>cj[t]||-1}],tokenPrec:1963});let Gd=null;function Fd(){if(!Gd&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));Gd=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return Gd||[]}const wv=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Tv=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Oj=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),fj=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),ar=/^(\w[\w-]*|-\w[\w-]*|)$/,dj=/^-(-[\w-]*)?$/;function hj(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const kv=new xx,pj=["Declaration"];function mj(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function mT(t,e,n){if(e.to-e.from>4096){let i=kv.get(e);if(i)return i;let r=[],s=new Set,o=e.cursor(pt.IncludeAnonymous);if(o.firstChild())do for(let a of mT(t,o.node,n))s.has(a.label)||(s.add(a.label),r.push(a));while(o.nextSibling());return kv.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(pj)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);r.has(a)||(r.add(a),i.push({label:a,type:"variable"}))}}),i}}const gj=t=>e=>{let{state:n,pos:i}=e,r=Pt(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Fd(),validFor:ar};if(r.name=="ValueName")return{from:r.from,options:Tv,validFor:ar};if(r.name=="PseudoClassName")return{from:r.from,options:wv,validFor:ar};if(t(r)||(e.explicit||s)&&hj(r,n.doc))return{from:t(r)||s?r.from:i,options:mT(n.doc,mj(r),t),validFor:dj};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:Fd(),validFor:ar};return{from:r.from,options:Oj,validFor:ar}}if(r.name=="AtKeyword")return{from:r.from,options:fj,validFor:ar};if(!e.explicit)return null;let o=r.resolve(i),a=o.childBefore(i);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:wv,validFor:ar}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:Tv,validFor:ar}:o.name=="Block"||o.name=="Styles"?{from:i,options:Fd(),validFor:ar}:null},$j=gj(t=>t.name=="VariableName"),AO=hs.define({name:"css",parser:uj.configure({props:[ma.add({Declaration:Ms()}),ga.add({"Block KeyframeList":Tg})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Qj(){return new dc(AO,AO.data.of({autocomplete:$j}))}const yj=315,bj=316,Rv=1,vj=2,Sj=3,Pj=4,_j=317,xj=319,wj=320,Tj=5,kj=6,Rj=0,Np=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],gT=125,Cj=59,jp=47,Xj=42,Vj=43,Ej=45,Aj=60,qj=44,Zj=63,zj=46,Yj=91,Mj=new Wg({start:!1,shift(t,e){return e==Tj||e==kj||e==xj?t:e==wj},strict:!1}),Ij=new jt((t,e)=>{let{next:n}=t;(n==gT||n==-1||e.context)&&t.acceptToken(_j)},{contextual:!0,fallback:!0}),Uj=new jt((t,e)=>{let{next:n}=t,i;Np.indexOf(n)>-1||n==jp&&((i=t.peek(1))==jp||i==Xj)||n!=gT&&n!=Cj&&n!=-1&&!e.context&&t.acceptToken(yj)},{contextual:!0}),Dj=new jt((t,e)=>{t.next==Yj&&!e.context&&t.acceptToken(bj)},{contextual:!0}),Lj=new jt((t,e)=>{let{next:n}=t;if(n==Vj||n==Ej){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(Rv);t.acceptToken(i?Rv:vj)}}else n==Zj&&t.peek(1)==zj&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Sj))},{contextual:!0});function Hd(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Wj=new jt((t,e)=>{if(t.next!=Aj||!e.dialectEnabled(Rj)||(t.advance(),t.next==jp))return;let n=0;for(;Np.indexOf(t.next)>-1;)t.advance(),n++;if(Hd(t.next,!0)){for(t.advance(),n++;Hd(t.next,!1);)t.advance(),n++;for(;Np.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==qj)return;for(let i=0;;i++){if(i==7){if(!Hd(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Pj,-n)}),Nj=pa({"get set async static":k.modifier,"for while do if else switch try catch finally return throw break continue default case":k.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":k.operatorKeyword,"let var const using function class extends":k.definitionKeyword,"import export from":k.moduleKeyword,"with debugger new":k.keyword,TemplateString:k.special(k.string),super:k.atom,BooleanLiteral:k.bool,this:k.self,null:k.null,Star:k.modifier,VariableName:k.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":k.function(k.variableName),VariableDefinition:k.definition(k.variableName),Label:k.labelName,PropertyName:k.propertyName,PrivatePropertyName:k.special(k.propertyName),"CallExpression/MemberExpression/PropertyName":k.function(k.propertyName),"FunctionDeclaration/VariableDefinition":k.function(k.definition(k.variableName)),"ClassDeclaration/VariableDefinition":k.definition(k.className),"NewExpression/VariableName":k.className,PropertyDefinition:k.definition(k.propertyName),PrivatePropertyDefinition:k.definition(k.special(k.propertyName)),UpdateOp:k.updateOperator,"LineComment Hashbang":k.lineComment,BlockComment:k.blockComment,Number:k.number,String:k.string,Escape:k.escape,ArithOp:k.arithmeticOperator,LogicOp:k.logicOperator,BitOp:k.bitwiseOperator,CompareOp:k.compareOperator,RegExp:k.regexp,Equals:k.definitionOperator,Arrow:k.function(k.punctuation),": Spread":k.punctuation,"( )":k.paren,"[ ]":k.squareBracket,"{ }":k.brace,"InterpolationStart InterpolationEnd":k.special(k.brace),".":k.derefOperator,", ;":k.separator,"@":k.meta,TypeName:k.typeName,TypeDefinition:k.definition(k.typeName),"type enum interface implements namespace module declare":k.definitionKeyword,"abstract global Privacy readonly override":k.modifier,"is keyof unique infer asserts":k.operatorKeyword,JSXAttributeValue:k.attributeValue,JSXText:k.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":k.angleBracket,"JSXIdentifier JSXNameSpacedName":k.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":k.attributeName,"JSXBuiltin/JSXIdentifier":k.standard(k.tagName)}),jj={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,for:474,of:483,while:486,with:490,do:494,if:498,else:500,switch:504,case:510,try:516,catch:520,finally:524,return:528,throw:532,break:536,continue:540,debugger:544},Bj={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Gj={__proto__:null,"<":193},Fj=ms.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Ik'#IkO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JqO6[Q!0MxO'#JrO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO7eQMhO'#F|O9[Q`O'#F{OOQ!0Lf'#Jr'#JrOOQ!0Lb'#Jq'#JqO9aQ`O'#GwOOQ['#K^'#K^O9lQ`O'#IXO9qQ!0LrO'#IYOOQ['#J_'#J_OOQ['#I^'#I^Q`QlOOQ`QlOOO9yQ!L^O'#DvO:QQlO'#EOO:XQlO'#EQO9gQ`O'#GsO:`QMhO'#CoO:nQ`O'#EnO:yQ`O'#EyO;OQMhO'#FeO;mQ`O'#GsOOQO'#K_'#K_O;rQ`O'#K_O`Q`O'#CeO>pQ`O'#HbO>xQ`O'#HhO>xQ`O'#HjO`QlO'#HlO>xQ`O'#HnO>xQ`O'#HqO>}Q`O'#HwO?SQ!0LsO'#H}O%[QlO'#IPO?_Q!0LsO'#IRO?jQ!0LsO'#ITO9qQ!0LrO'#IVO?uQ!0MxO'#CiO@wQpO'#DlQOQ`OOO%[QlO'#EQOA_Q`O'#ETO:`QMhO'#EnOAjQ`O'#EnOAuQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Ju'#JuO%[QlO'#JuOOQ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O,5?`O&CiQ!0MzO,5?bO&EtQ!0MzO7+'|O&HVQ!fO1G4kO&HaQ?MtO7+&aO&JeQ?MvO,5=XO&LlQ?MvO,5=ZO&L|Q?MvO,5=XO&M^Q?MvO,5=ZO&MnQ?MvO,59uO' tQ?MvO,5}Q`O7+)kO'-dQ`O<QPPP!>YHxPPPPPPPPP!AiP!BvPPHx!DXPHxPHxHxHxHxHxPHx!EkP!HuP!K{P!LP!LZ!L_!L_P!HrP!Lc!LcP# iP# mHxPHx# s#$xCW@zP@zP@z@zP#&V@z@z#(i@z#+a@z#-m@z@z#.]#0q#0q#0v#1P#0q#1[PP#0qP@z#1t@z#5s@z@z6bPPP#9xPPP#:c#:cP#:cP#:y#:cPP#;PP#:vP#:v#;d#:v#S#>Y#>d#>j#>t#>z#?[#?b#@S#@f#@l#@r#AQ#Ag#C[#Cj#Cq#E]#Ek#G]#Gk#Gq#Gw#G}#HX#H_#He#Ho#IR#IXPPPPPPPPPPP#I_PPPPPPP#JS#MZ#Ns#Nz$ SPPP$&nP$&w$)p$0Z$0^$0a$1`$1c$1j$1rP$1x$1{P$2i$2m$3e$4s$4x$5`PP$5e$5k$5o$5r$5v$5z$6v$7_$7v$7z$7}$8Q$8W$8Z$8_$8cR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:379,context:Mj,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,236,242,244,246,248,251,257,263,265,267,269,271,273,274,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Nj],skippedNodes:[0,5,6,277],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(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%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Vp(Y!b'|0/l$]#t(S,2j(d$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Uj,Dj,Lj,Wj,2,3,4,5,6,7,8,9,10,11,12,13,14,Ij,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(b~~",141,339),new XO("j~RQYZXz{^~^O(P~~aP!P!Qd~iO(Q~~",25,322)],topRules:{Script:[0,7],SingleExpression:[1,275],SingleClassItem:[2,276]},dialects:{jsx:0,ts:15098},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:326,get:t=>jj[t]||-1},{term:342,get:t=>Bj[t]||-1},{term:95,get:t=>Gj[t]||-1}],tokenPrec:15124}),$T=[wn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),wn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),wn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),wn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),wn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),wn(`try { \${} } catch (\${error}) { \${} @@ -219,4 +219,4 @@ var qT=Object.defineProperty;var e$=t=>{throw TypeError(t)};var ZT=(t,e,n)=>e in constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),wn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),wn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Fj=gT.concat([wn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),wn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),wn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Cv=new _x,$T=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Aa(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const Hj=["FunctionDeclaration"],Kj={FunctionDeclaration:Aa("function"),ClassDeclaration:Aa("class"),ClassExpression:()=>!0,EnumDeclaration:Aa("constant"),TypeAliasDeclaration:Aa("type"),NamespaceDeclaration:Aa("namespace"),VariableDefinition(t,e){t.matchContext(Hj)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function QT(t,e){let n=Cv.get(e);if(n)return n;let i=[],r=!0;function s(o,a){let l=t.sliceString(o.from,o.to);i.push({label:l,type:a})}return e.cursor(ht.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let a=Kj[o.name];if(a&&a(o,s)||$T.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of QT(t,o.node))i.push(a);return!1}}),Cv.set(e,i),i}const Xv=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,yT=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Jj(t){let e=Pt(t.state).resolveInner(t.pos,-1);if(yT.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Xv.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)$T.has(r.name)&&(i=i.concat(QT(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:Xv}}const Ni=hs.define({name:"javascript",parser:Gj.configure({props:[ma.add({IfStatement:Ms({except:/^\s*({|else\b)/}),TryStatement:Ms({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:OU,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Vx({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ms({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ga.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Tg,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),bT={test:t=>/^JSX/.test(t.name),facet:Rx({commentTokens:{block:{open:"{/*",close:"*/}"}}})},vT=Ni.configure({dialect:"ts"},"typescript"),ST=Ni.configure({dialect:"jsx",props:[_g.add(t=>t.isTop?[bT]:void 0)]}),PT=Ni.configure({dialect:"jsx ts",props:[_g.add(t=>t.isTop?[bT]:void 0)]},"typescript");let _T=t=>({label:t,type:"keyword"});const xT="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(_T),eB=xT.concat(["declare","implements","private","protected","public"].map(_T));function tB(t={}){let e=t.jsx?t.typescript?PT:ST:t.typescript?vT:Ni,n=t.typescript?Fj.concat(eB):gT.concat(xT);return new dc(e,[Ni.data.of({autocomplete:RL(yT,Ew(n))}),Ni.data.of({autocomplete:Jj}),t.jsx?rB:[]])}function nB(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Vv(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const iB=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),rB=Oe.inputHandler.of((t,e,n,i,r)=>{if((iB?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Ni.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,O=Pt(o).resolveInner(u-1,-1),f;if(O.name=="JSXStartTag"&&(O=O.parent),!(o.doc.sliceString(u-1,u)!=i||O.name=="JSXAttributeValue"&&O.to>u)){if(i==">"&&O.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(i=="/"&&O.name=="JSXStartCloseTag"){let d=O.parent,h=d.parent;if(h&&d.from==u-2&&((f=Vv(o.doc,h.firstChild,u))||((c=h.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${f}>`;return{range:K.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(i==">"){let d=nB(O);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(f=Vv(o.doc,d,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),qa=["_blank","_self","_top","_parent"],Kd=["ascii","utf-8","utf-16","latin1","latin1"],Jd=["get","post","put","delete"],eh=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Un=["true","false"],Pe={},sB={a:{attrs:{href:null,ping:null,type:null,media:null,target:qa,hreflang:null}},abbr:Pe,address:Pe,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Pe,aside:Pe,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Pe,base:{attrs:{href:null,target:qa}},bdi:Pe,bdo:Pe,blockquote:{attrs:{cite:null}},body:Pe,br:Pe,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:eh,formmethod:Jd,formnovalidate:["novalidate"],formtarget:qa,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Pe,center:Pe,cite:Pe,code:Pe,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Pe,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Pe,div:Pe,dl:Pe,dt:Pe,em:Pe,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Pe,figure:Pe,footer:Pe,form:{attrs:{action:null,name:null,"accept-charset":Kd,autocomplete:["on","off"],enctype:eh,method:Jd,novalidate:["novalidate"],target:qa}},h1:Pe,h2:Pe,h3:Pe,h4:Pe,h5:Pe,h6:Pe,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Pe,hgroup:Pe,hr:Pe,html:{attrs:{manifest:null}},i:Pe,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:eh,formmethod:Jd,formnovalidate:["novalidate"],formtarget:qa,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Pe,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Pe,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Pe,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Kd,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Pe,noscript:Pe,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Pe,param:{attrs:{name:null,value:null}},pre:Pe,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Pe,rt:Pe,ruby:Pe,samp:Pe,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Kd}},section:Pe,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Pe,source:{attrs:{src:null,type:null,media:null}},span:Pe,strong:Pe,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Pe,summary:Pe,sup:Pe,table:Pe,tbody:Pe,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Pe,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Pe,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Pe,time:{attrs:{datetime:null}},title:Pe,tr:Pe,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Pe,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Pe},wT={accesskey:null,class:null,contenteditable:Un,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Un,autocorrect:Un,autocapitalize:Un,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Un,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Un,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Un,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Un,"aria-hidden":Un,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Un,"aria-multiselectable":Un,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Un,"aria-relevant":null,"aria-required":Un,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},TT="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of TT)wT[t]=null;class qO{constructor(e,n){this.tags=Object.assign(Object.assign({},sB),e),this.globalAttrs=Object.assign(Object.assign({},wT),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}qO.default=new qO;function ia(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function ra(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function kT(t,e,n){let i=n.tags[ia(t,ra(e))];return(i==null?void 0:i.children)||n.allTags}function Fg(t,e){let n=[];for(let i=ra(e);i&&!i.type.isTop;i=ra(i.parent)){let r=ia(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const RT=/^[:\-\.\w\u00b7-\uffff]*$/;function Ev(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=ra(n,!0);return{from:i,to:r,options:kT(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(Fg(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Av(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:Fg(t.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:RT}}function oB(t,e,n,i){let r=[],s=0;for(let o of kT(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of Fg(t.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function aB(t,e,n,i,r){let s=ra(n),o=s?e.tags[ia(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(c=>({label:c,type:"property"})),validFor:RT}}function lB(t,e,n,i,r){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let O=ra(n),f=O?e.tags[ia(t.doc,O)]:null;u=(f==null?void 0:f.attrs)&&f.attrs[c]}if(u){let O=t.sliceDoc(i,r).toLowerCase(),f='"',d='"';/^['"]/.test(O)?(l=O[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",d=t.sliceDoc(r,r+1)==O[0]?"":O[0],O=O.slice(1),i++):l=/^[^\s<>='"]*$/;for(let h of u)a.push({label:h,apply:f+h+d,type:"constant"})}}return{from:i,to:r,options:a,validFor:l}}function cB(t,e){let{state:n,pos:i}=e,r=Pt(n).resolveInner(i,-1),s=r.resolve(i);for(let o=i,a;s==r&&(a=r.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.fromcB(i,r)}const OB=Ni.parser.configure({top:"SingleExpression"}),CT=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:vT.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:ST.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:PT.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:OB},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ni.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:AO.parser}],XT=[{name:"style",parser:AO.parser.configure({top:"Styles"})}].concat(TT.map(t=>({name:t,parser:Ni.parser}))),VT=hs.define({name:"html",parser:q7.configure({props:[ma.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Eu=VT.configure({wrap:uT(CT,XT)});function fB(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=uT((t.nestedLanguages||[]).concat(CT),(t.nestedAttributes||[]).concat(XT)));let i=n?VT.configure({wrap:n,dialect:e}):e?Eu.configure({dialect:e}):Eu;return new dc(i,[Eu.data.of({autocomplete:uB(t)}),t.autoCloseTags!==!1?dB:[],tB().support,$j().support])}const qv=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),dB=Oe.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Eu.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var c,u,O;let f=o.doc.sliceString(l.from-1,l.to)==i,{head:d}=l,h=Pt(o).resolveInner(d,-1),p;if(f&&i==">"&&h.name=="EndTag"){let $=h.parent;if(((u=(c=$.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=ia(o.doc,$.parent,d))&&!qv.has(p)){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),b=``;return{range:l,changes:{from:d,to:g,insert:b}}}}else if(f&&i=="/"&&h.name=="IncompleteCloseTag"){let $=h.parent;if(h.from==d-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(p=ia(o.doc,$,d))&&!qv.has(p)){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),b=`${p}>`;return{range:K.cursor(d+b.length,-1),changes:{from:d,to:g,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),hB=hs.define({name:"php",parser:JN.configure({props:[ma.add({IfStatement:Ms({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:Ms({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},ColonBlock:t=>t.baseIndent+t.unit,"Block EnumBody DeclarationList":Vx({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"String BlockComment":()=>null,Statement:Ms({except:/^({|end(for|foreach|switch|while)\b)/})}),ga.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":Tg,ColonBlock(t){return{from:t.from+1,to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function ET(t={}){let e=[],n;if(t.baseLanguage!==null)if(t.baseLanguage)n=t.baseLanguage;else{let i=fB({matchClosingTags:!1});e.push(i.support),n=i.language}return new dc(hB.configure({wrap:n&&wx(i=>i.type.isTop?{parser:n.parser,overlay:r=>r.name=="Text"}:null),top:t.plain?"Program":"Template"}),e)}const pB={class:"p-4"},mB=M({__name:"ParameterView",setup(t){const e=zt(),n=ne(e.parameter),i=[ET({plain:!0})],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.parameter=o});function s(){e.manualSync()}return(o,a)=>(w(),B("div",pB,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),gB={class:"p-4"},$B=M({__name:"PaperDBView",setup(t){const e=zt(),n=ne(Kw(e.paperContainer)),i=[Hw()],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.paperContainer=o});function s(){e.manualSync()}return(o,a)=>(w(),B("div",gB,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),QB={class:"p-4"},yB=M({__name:"FormelView",setup(t){const e=zt(),n=ne(e.formulas),i=[ET({plain:!0})],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.formulas=o});function s(){e.manualSync()}return(o,a)=>(w(),B("div",QB,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),bB={class:"grid gap-4 py-4"},vB={class:"grid grid-cols-4 items-center gap-4"},SB=M({__name:"SaveLayoutDialog",setup(t){const{t:e}=da(),n=zt(),i=Vr(),r=ne(""),s=async()=>{if(!r.value){alert(e("enter_layout_name_alert"));return}try{const a=i.loadJSON();await q2(r.value,n.getShopUuid,a),n.setShowSaveLayoutDialog(!1),r.value=""}catch(a){console.error("Failed to save layout",a),alert(e("save_layout_failed_alert"))}},o=a=>{a||n.setShowSaveLayoutDialog(!1)};return(a,l)=>(w(),D(m(sc),{open:m(n).showSaveLayoutDialog,"onUpdate:open":o},{default:V(()=>[R(m(oc),null,{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>[_e(H(a.$t("save_layout_title")),1)]),_:1}),R(m(_f),null,{default:V(()=>[_e(H(a.$t("save_layout_description")),1)]),_:1})]),_:1}),U("div",bB,[U("div",vB,[R(m(Wm),{for:"name",class:"text-right"},{default:V(()=>[_e(H(a.$t("name")),1)]),_:1}),R(m(Ne),{id:"name",modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),class:"col-span-3"},null,8,["modelValue"])])]),R(m(tg),null,{default:V(()=>[R(m(qt),{onClick:s},{default:V(()=>[_e(H(a.$t("save_layout")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]))}}),PB={class:"grid gap-4 py-4"},_B=M({__name:"LoadLayoutDialog",setup(t){const{t:e}=da(),n=zt(),i=Vr(),r=ne([]),s=async()=>{try{const l=await Z2(n.getShopUuid);r.value=l.data}catch(l){console.error("Failed to fetch layouts",l)}},o=l=>{confirm(e("load_layout_confirm"))&&(i.parseJSON(l),n.setShowLoadLayoutDialog(!1))},a=l=>{l||n.setShowLoadLayoutDialog(!1)};return n.$subscribe((l,c)=>{c.showLoadLayoutDialog&&s()}),(l,c)=>(w(),D(m(sc),{open:m(n).showLoadLayoutDialog,"onUpdate:open":a},{default:V(()=>[R(m(oc),null,{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>[_e(H(l.$t("load_layout_title")),1)]),_:1}),R(m(_f),null,{default:V(()=>[_e(H(l.$t("load_layout_description")),1)]),_:1})]),_:1}),U("div",PB,[(w(!0),B(ke,null,xt(r.value,u=>(w(),B("div",{key:u.uuid,class:"flex items-center justify-between"},[U("span",null,H(u.title),1),R(m(qt),{onClick:O=>o(u.json)},{default:V(()=>[_e(H(l.$t("load")),1)]),_:2},1032,["onClick"])]))),128))])]),_:1})]),_:1},8,["open"]))}}),xB={class:"flex gap-2 flex-row"},wB={style:{"white-space":"pre-line"}},TB=M({__name:"TextElement",props:{item:{}},setup(t){const e=t;return(n,i)=>(w(),B("div",xB,[U("p",wB,H(e.item.defaultValue),1)]))}}),kB={class:"flex gap-2 flex-row items-center"},RB={class:"w-60 flex-inital"},CB=M({__name:"InputElement",props:{item:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=G({get:()=>n.item.rawValue,set:s=>{i("update:value",{elementId:n.item.id,newValue:s})}});return(s,o)=>(w(),B("div",kB,[U("label",RB,H(s.item.name),1),R(m(Ne),{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),placeholder:s.item.placeHolder,name:s.item.name,id:s.item.id,required:s.item.required},null,8,["modelValue","placeholder","name","id","required"])]))}}),XB={class:"flex gap-2 flex-row"},VB=M({__name:"HiddenElement",props:{item:{}},setup(t){const e=t;return(n,i)=>(w(),B("div",XB,[R(m(Ne),{type:"hidden",name:e.item.name,id:e.item.id,value:e.item.value},null,8,["name","id","value"])]))}}),EB={class:"flex gap-2 flex-row"},AB={key:0,class:"text-4xl"},qB={key:1,class:"text-base"},ZB={key:2,class:"text-lg"},zB={key:3,class:"text-xl"},YB={key:4,class:"text-2xl"},MB={key:5,class:"text-3xl"},IB={key:6,class:"text-4xl"},UB=M({__name:"HeadlineElement",props:{item:{}},setup(t){const e=t;return(n,i)=>(w(),B("div",EB,[e.item.variant=="1"?(w(),B("h1",AB,H(e.item.defaultValue),1)):e.item.variant=="6"?(w(),B("h6",qB,H(e.item.defaultValue),1)):e.item.variant=="5"?(w(),B("h5",ZB,H(e.item.defaultValue),1)):e.item.variant=="4"?(w(),B("h4",zB,H(e.item.defaultValue),1)):e.item.variant=="3"?(w(),B("h3",YB,H(e.item.defaultValue),1)):e.item.variant=="2"?(w(),B("h2",MB,H(e.item.defaultValue),1)):(w(),B("h1",IB,H(e.item.defaultValue),1))]))}}),DB={class:"flex gap-2 flex-row items-center"},LB={class:"w-60 flex-inital"},WB={class:"w-full"},NB=M({__name:"SelectElement",props:{item:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=G({get:()=>n.item.rawValue,set:s=>{i("update:value",{elementId:n.item.id,newValue:s})}});return(s,o)=>(w(),B("div",DB,[U("label",LB,H(s.item.name),1),U("div",WB,[R(m(tc),{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>[(w(!0),B(ke,null,xt(s.item.options,a=>la((w(),D(m(ti),{key:a.id,value:a.id},{default:V(()=>[_e(H(a.name),1)]),_:2},1032,["value"])),[[bm,a.valid]])),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])])]))}}),jB={class:"flex gap-2 flex-row"},BB={class:"flex-row w-full h-auto"},GB=M({__name:"RowElement",props:{item:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=s=>{i("update:value",s)};return(s,o)=>(w(),B("div",jB,[(w(!0),B(ke,null,xt(n.item.elements,a=>(w(),B("div",BB,[R(AT,{items:a.elements,"onUpdate:value":r},null,8,["items"])]))),256))]))}}),AT=M({__name:"RenderElements",props:{items:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=s=>{i("update:value",s)};return(s,o)=>(w(!0),B(ke,null,xt(n.items,a=>(w(),B("div",{key:a.id},[a.valid&&a.htmlType==="headline"?(w(),D(UB,{key:0,item:a,"onUpdate:value":r},null,8,["item"])):ge("",!0),a.valid&&a.htmlType==="hidden"?(w(),D(VB,{key:1,item:a,"onUpdate:value":r},null,8,["item"])):ge("",!0),a.valid&&a.htmlType==="text"?(w(),D(TB,{key:2,item:a,"onUpdate:value":r},null,8,["item"])):ge("",!0),a.valid&&a.htmlType==="input"?(w(),D(CB,{key:3,item:a,"onUpdate:value":r},null,8,["item"])):ge("",!0),a.valid&&a.htmlType==="select"?(w(),D(NB,{key:4,item:a,"onUpdate:value":r},null,8,["item"])):ge("",!0),a.valid&&a.htmlType==="row"?(w(),D(GB,{key:5,item:a,"onUpdate:value":r},null,8,["item"])):ge("",!0)]))),128))}}),FB={class:"p-6 bg-gray-50 rounded-lg shadow-md"},HB={class:"space-y-3"},KB={class:"flex justify-between items-center text-gray-600"},JB={class:"font-medium text-gray-900"},eG={class:"flex justify-between items-center text-gray-600"},tG={class:"font-medium text-gray-900"},nG={class:"flex justify-between items-center text-xl font-bold"},iG={class:"text-primary"},rG=M({__name:"PriceDisplay",props:{priceData:{}},setup(t){const e=t,n=o=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(o),i=G(()=>n(e.priceData.netto/100||0)),r=G(()=>n(e.priceData.tax/100||0)),s=G(()=>n(e.priceData.brutto/100||0));return(o,a)=>(w(),B("div",FB,[a[4]||(a[4]=U("h3",{class:"text-lg font-semibold text-gray-800 mb-4"},"Preisübersicht",-1)),U("div",HB,[U("div",KB,[a[0]||(a[0]=U("span",null,"Nettopreis",-1)),U("span",JB,H(i.value),1)]),U("div",eG,[a[1]||(a[1]=U("span",null,"+ MwSt. (19%)",-1)),U("span",tG,H(r.value),1)]),a[3]||(a[3]=U("hr",{class:"my-3 border-t border-gray-200"},null,-1)),U("div",nG,[a[2]||(a[2]=U("span",{class:"text-gray-900"},"Gesamt",-1)),U("span",iG,H(s.value),1)])])]))}});function sG(t,e){let n=null,i=null;const r=(...s)=>{r.clear(),i=()=>{r.clear(),t.call(r,...s)},n=Number(setTimeout(i,e))};return r.clear=()=>{typeof n=="number"&&(clearTimeout(n),n=null,i=null)},r.flush=()=>{i==null||i()},Object.defineProperty(r,"pending",{get:()=>typeof n=="number"}),r}const oG={class:"w-full p-6 min-h-screen"},aG={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},lG={key:1,class:"text-center py-10"},cG={key:2},uG={class:"overflow-auto h-full"},OG={class:"flex flex-row"},fG={class:"w-3/5 flex flex-col gap-2"},dG={class:"w-2/5 pl-6"},hG=M({__name:"Preview",setup(t){const e=zt(),n=Vr(),i=G(()=>e.getPreviewData),r=G(()=>e.previewError),s=G(()=>e.isPreviewLoading),o=G(()=>{var u;return((u=i.value)==null?void 0:u.elements)||[]}),a=G(()=>i.value);let l={};const c=u=>{l[u.elementId]=u.newValue,sG(()=>e.loadPreview(n.loadJSON(),l),500)};return yt(()=>{e.loadPreview(n.loadJSON()).then(()=>{e.previewData.elements.map(u=>{l[u.id]=u.rawValue})})}),(u,O)=>(w(),B("div",oG,[r.value?(w(),B("div",aG,[O[0]||(O[0]=U("p",{class:"font-bold"},"Preview Error",-1)),U("p",null,H(r.value),1)])):ge("",!0),s.value?(w(),B("div",lG,O[1]||(O[1]=[U("p",null,"Loading Preview...",-1)]))):ge("",!0),!s.value&&i.value?(w(),B("div",cG,[U("div",uG,[U("div",OG,[U("div",fG,[R(AT,{items:o.value,"onUpdate:value":c},null,8,["items"])]),U("div",dG,[R(rG,{"price-data":a.value},null,8,["price-data"])])])])])):ge("",!0)]))}}),pG={class:"w-screen h-screen flex flex-col"},mG={class:"flex-grow w-full h-full"},gG={class:"flex flex-col gap-2 h-full"},$G={class:"flex justify-center"},QG={class:"flex h-full p-6"},yG=M({__name:"Gui",setup(t){const e=zt();return(n,i)=>(w(),B("div",pG,[U("div",mG,[R(m(oP),{id:"handle-demo-group-1",direction:"horizontal",class:"h-full w-full"},{default:V(()=>[R(m(rO),{id:"","default-size":15},{default:V(()=>[U("div",gG,[R(U2),R(m(GZ))])]),_:1}),R(m(sP),{id:"","with-handle":""}),R(m(rO),{id:"","default-size":85},{default:V(()=>[R(m(n2),{"default-value":m(e).currentTab,"onUpdate:modelValue":i[0]||(i[0]=r=>m(e).setCurrentTab(r)),class:"w-full h-full"},{default:V(()=>[U("div",$G,[R(m(i2),null,{default:V(()=>[R(m(uo),{value:"designer"},{default:V(()=>[_e(H(n.$t("designer")),1)]),_:1}),R(m(uo),{value:"preview"},{default:V(()=>[_e(H(n.$t("preview")),1)]),_:1}),R(m(uo),{value:"xml"},{default:V(()=>[_e(H(n.$t("xml_view")),1)]),_:1}),R(m(uo),{value:"formel"},{default:V(()=>[_e(H(n.$t("formel_view")),1)]),_:1}),R(m(uo),{value:"parameter"},{default:V(()=>[_e(H(n.$t("parameter_view")),1)]),_:1}),R(m(uo),{value:"paperdb"},{default:V(()=>[_e(H(n.$t("paperdb_view")),1)]),_:1})]),_:1})]),R(m(co),{value:"designer",class:"h-full overflow-y-auto"},{default:V(()=>[U("div",QG,[m(e).showPreview?(w(),D(hG,{key:1})):(w(),D(m(cM),{key:0}))])]),_:1}),R(m(co),{value:"preview",class:"h-full overflow-y-auto"},{default:V(()=>[R(VM)]),_:1}),R(m(co),{value:"xml",class:"h-full overflow-y-auto"},{default:V(()=>[R(R3)]),_:1}),R(m(co),{value:"formel",class:"h-full overflow-y-auto"},{default:V(()=>[R(yB)]),_:1}),R(m(co),{value:"parameter",class:"h-full overflow-y-auto"},{default:V(()=>[R(mB)]),_:1}),R(m(co),{value:"paperdb",class:"h-full overflow-y-auto"},{default:V(()=>[R($B)]),_:1})]),_:1},8,["default-value"])]),_:1})]),_:1}),R(m(Mz)),R(m(Jz)),R(m(Uz)),R(SB),R(_B)])]))}}),bG=M({__name:"App",setup(t){return yt(()=>{const e=Vr(),n=zt(),i=new URLSearchParams(window.location.search),r=i.get("uuid"),s=i.get("shop"),o=i.get("mode");if(n.setShopUuid(s),o){let a=parseInt(o);n.setMode(a)}r&&(n.setProductUuid(r),n.loadConfigFromProductApi(r).then(a=>{e.parseJSON(a)}),n.loadFormulaAnalyserDataFromApi(r)),e.$subscribe((a,l)=>{const c=e.loadJSON();n.saveDesign(c)})}),(e,n)=>(w(),D(yG))}}),vG="Designer",SG="Kalkulations Analyse",PG="XML Ansicht",_G="JSON Ansicht",xG="Vorschau-Modus",wG="Überschrift",TG="Text",kG="Medien",RG="Textbereich",CG="Eingabefeld",XG="Auswahl",VG="Versteckt",EG="Zeile",AG="ID",qG="Name",ZG="Variante",zG="Überschrift 1",YG="Überschrift 2",MG="Überschrift 3",IG="Überschrift 4",UG="Überschrift 5",DG="Überschrift 6",LG="Platzhalter",WG="Erforderlich",NG="Min",jG="Max",BG="Min Calc",GG="Max Calc",FG="Abhängigkeit hinzufügen",HG="Spalte hinzufügen",KG="Modus",JG="Normal",eF="PapierDB",tF="FarbDB",nF="Container",iF="Optionen bearbeiten",rF="Option hinzufügen",sF="Schließen",oF="Abhängigkeiten",aF="Optionen",lF="Einstellungen",cF="Speichern",uF="Speichern...",OF="Formel Ansicht",fF="Parameter Ansicht",dF="PapierDB Ansicht",hF="Synchronisiere...",pF="Synchronisieren",mF="CMS-Elemente",gF="Formular-Elemente",$F="Struktur-Elemente",QF="Layout speichern",yF="Vorlage laden",bF="Layout speichern",vF="Gib einen Namen für deine neue Layout-Vorlage ein.",SF="Vorlage laden",PF="Wähle eine Layout-Vorlage aus, um sie in den Designer zu laden.",_F="Laden",xF="Bitte gib einen Namen für das Layout ein.",wF="Layout konnte nicht gespeichert werden.",TF="Möchtest du dieses Layout wirklich laden? Dein aktuelles Design wird überschrieben.",kF={designer:vG,preview:SG,xml_view:PG,json_view:_G,preview_mode:xG,headline:wG,text:TG,media:kG,textarea:RG,input:CG,select:XG,hidden:VG,row:EG,id:AG,default:"Standard",name:qG,variant:ZG,headline1:zG,headline2:YG,headline3:MG,headline4:IG,headline5:UG,headline6:DG,placeholder:LG,required:WG,min:NG,max:jG,min_calc:BG,max_calc:GG,add_dependency:FG,add_column:HG,mode:KG,normal:JG,paperdb:eF,colordb:tF,container:nF,edit_options:iF,add_option:rF,close:sF,dependencies:oF,options:aF,settings:lF,save:cF,saving:uF,formel_view:OF,parameter_view:fF,paperdb_view:dF,syncing:hF,sync:pF,cms_elements:mF,form_elements:gF,structure_elements:$F,save_layout:QF,load_layout:yF,save_layout_title:bF,save_layout_description:vF,load_layout_title:SF,load_layout_description:PF,load:_F,enter_layout_name_alert:xF,save_layout_failed_alert:wF,load_layout_confirm:TF},RF="Designer",CF="Calculation Analysis",XF="XML View",VF="JSON View",EF="Preview Mode",AF="Headline",qF="Text",ZF="Media",zF="Textarea",YF="Input",MF="Select",IF="Hidden",UF="Row",DF="ID",LF="Name",WF="Variant",NF="Headline 1",jF="Headline 2",BF="Headline 3",GF="Headline 4",FF="Headline 5",HF="Headline 6",KF="Placeholder",JF="Required",e9="Min",t9="Max",n9="Min Calc",i9="Max Calc",r9="Add Dependency",s9="Add Column",o9="Mode",a9="Normal",l9="PaperDB",c9="ColorDB",u9="Container",O9="Edit Options",f9="Add Option",d9="Close",h9="Dependencies",p9="Options",m9="Settings",g9="Save",$9="Saving...",Q9="Formula View",y9="Parameter View",b9="PaperDB View",v9="Syncing...",S9="Sync",P9="CMS Elements",_9="Form Elements",x9="Structure Elements",w9="Save Layout",T9="Load Layout",k9="Save Layout",R9="Enter a name for your new layout template.",C9="Load Layout",X9="Select a layout template to load it into the designer.",V9="Load",E9="Please enter a name for the layout.",A9="Failed to save layout.",q9="Are you sure you want to load this layout? This will overwrite your current design.",Z9={designer:RF,preview:CF,xml_view:XF,json_view:VF,preview_mode:EF,headline:AF,text:qF,media:ZF,textarea:zF,input:YF,select:MF,hidden:IF,row:UF,id:DF,default:"Default",name:LF,variant:WF,headline1:NF,headline2:jF,headline3:BF,headline4:GF,headline5:FF,headline6:HF,placeholder:KF,required:JF,min:e9,max:t9,min_calc:n9,max_calc:i9,add_dependency:r9,add_column:s9,mode:o9,normal:a9,paperdb:l9,colordb:c9,container:u9,edit_options:O9,add_option:f9,close:d9,dependencies:h9,options:p9,settings:m9,save:g9,saving:$9,formel_view:Q9,parameter_view:y9,paperdb_view:b9,syncing:v9,sync:S9,cms_elements:P9,form_elements:_9,structure_elements:x9,save_layout:w9,load_layout:T9,save_layout_title:k9,save_layout_description:R9,load_layout_title:C9,load_layout_description:X9,load:V9,enter_layout_name_alert:E9,save_layout_failed_alert:A9,load_layout_confirm:q9},z9=XZ({legacy:!1,locale:"de",fallbackLocale:"en",messages:{de:kF,en:Z9}}),Hg=Fu(bG);Hg.use(aX());Hg.use(z9);Hg.mount("#app"); +}`,{label:"class",detail:"definition",type:"keyword"}),wn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),wn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Hj=$T.concat([wn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),wn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),wn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Cv=new xx,QT=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Aa(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const Kj=["FunctionDeclaration"],Jj={FunctionDeclaration:Aa("function"),ClassDeclaration:Aa("class"),ClassExpression:()=>!0,EnumDeclaration:Aa("constant"),TypeAliasDeclaration:Aa("type"),NamespaceDeclaration:Aa("namespace"),VariableDefinition(t,e){t.matchContext(Kj)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function yT(t,e){let n=Cv.get(e);if(n)return n;let i=[],r=!0;function s(o,a){let l=t.sliceString(o.from,o.to);i.push({label:l,type:a})}return e.cursor(pt.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let a=Jj[o.name];if(a&&a(o,s)||QT.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of yT(t,o.node))i.push(a);return!1}}),Cv.set(e,i),i}const Xv=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,bT=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function eB(t){let e=Pt(t.state).resolveInner(t.pos,-1);if(bT.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Xv.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)QT.has(r.name)&&(i=i.concat(yT(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:Xv}}const Ni=hs.define({name:"javascript",parser:Fj.configure({props:[ma.add({IfStatement:Ms({except:/^\s*({|else\b)/}),TryStatement:Ms({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:fU,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Ex({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ms({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ga.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Tg,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),vT={test:t=>/^JSX/.test(t.name),facet:Cx({commentTokens:{block:{open:"{/*",close:"*/}"}}})},ST=Ni.configure({dialect:"ts"},"typescript"),PT=Ni.configure({dialect:"jsx",props:[_g.add(t=>t.isTop?[vT]:void 0)]}),_T=Ni.configure({dialect:"jsx ts",props:[_g.add(t=>t.isTop?[vT]:void 0)]},"typescript");let xT=t=>({label:t,type:"keyword"});const wT="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(xT),tB=wT.concat(["declare","implements","private","protected","public"].map(xT));function nB(t={}){let e=t.jsx?t.typescript?_T:PT:t.typescript?ST:Ni,n=t.typescript?Hj.concat(tB):$T.concat(wT);return new dc(e,[Ni.data.of({autocomplete:CL(bT,Aw(n))}),Ni.data.of({autocomplete:eB}),t.jsx?sB:[]])}function iB(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Vv(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const rB=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),sB=Oe.inputHandler.of((t,e,n,i,r)=>{if((rB?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Ni.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,O=Pt(o).resolveInner(u-1,-1),f;if(O.name=="JSXStartTag"&&(O=O.parent),!(o.doc.sliceString(u-1,u)!=i||O.name=="JSXAttributeValue"&&O.to>u)){if(i==">"&&O.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(i=="/"&&O.name=="JSXStartCloseTag"){let d=O.parent,h=d.parent;if(h&&d.from==u-2&&((f=Vv(o.doc,h.firstChild,u))||((c=h.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${f}>`;return{range:K.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(i==">"){let d=iB(O);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(f=Vv(o.doc,d,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),qa=["_blank","_self","_top","_parent"],Kd=["ascii","utf-8","utf-16","latin1","latin1"],Jd=["get","post","put","delete"],eh=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Dn=["true","false"],Pe={},oB={a:{attrs:{href:null,ping:null,type:null,media:null,target:qa,hreflang:null}},abbr:Pe,address:Pe,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Pe,aside:Pe,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Pe,base:{attrs:{href:null,target:qa}},bdi:Pe,bdo:Pe,blockquote:{attrs:{cite:null}},body:Pe,br:Pe,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:eh,formmethod:Jd,formnovalidate:["novalidate"],formtarget:qa,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Pe,center:Pe,cite:Pe,code:Pe,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Pe,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Pe,div:Pe,dl:Pe,dt:Pe,em:Pe,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Pe,figure:Pe,footer:Pe,form:{attrs:{action:null,name:null,"accept-charset":Kd,autocomplete:["on","off"],enctype:eh,method:Jd,novalidate:["novalidate"],target:qa}},h1:Pe,h2:Pe,h3:Pe,h4:Pe,h5:Pe,h6:Pe,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Pe,hgroup:Pe,hr:Pe,html:{attrs:{manifest:null}},i:Pe,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:eh,formmethod:Jd,formnovalidate:["novalidate"],formtarget:qa,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Pe,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Pe,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Pe,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Kd,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Pe,noscript:Pe,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Pe,param:{attrs:{name:null,value:null}},pre:Pe,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Pe,rt:Pe,ruby:Pe,samp:Pe,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Kd}},section:Pe,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Pe,source:{attrs:{src:null,type:null,media:null}},span:Pe,strong:Pe,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Pe,summary:Pe,sup:Pe,table:Pe,tbody:Pe,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Pe,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Pe,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Pe,time:{attrs:{datetime:null}},title:Pe,tr:Pe,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Pe,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Pe},TT={accesskey:null,class:null,contenteditable:Dn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Dn,autocorrect:Dn,autocapitalize:Dn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Dn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Dn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Dn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Dn,"aria-hidden":Dn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Dn,"aria-multiselectable":Dn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Dn,"aria-relevant":null,"aria-required":Dn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},kT="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of kT)TT[t]=null;class qO{constructor(e,n){this.tags=Object.assign(Object.assign({},oB),e),this.globalAttrs=Object.assign(Object.assign({},TT),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}qO.default=new qO;function ia(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function ra(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function RT(t,e,n){let i=n.tags[ia(t,ra(e))];return(i==null?void 0:i.children)||n.allTags}function Fg(t,e){let n=[];for(let i=ra(e);i&&!i.type.isTop;i=ra(i.parent)){let r=ia(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const CT=/^[:\-\.\w\u00b7-\uffff]*$/;function Ev(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=ra(n,!0);return{from:i,to:r,options:RT(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(Fg(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Av(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:Fg(t.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:CT}}function aB(t,e,n,i){let r=[],s=0;for(let o of RT(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of Fg(t.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function lB(t,e,n,i,r){let s=ra(n),o=s?e.tags[ia(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(c=>({label:c,type:"property"})),validFor:CT}}function cB(t,e,n,i,r){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let O=ra(n),f=O?e.tags[ia(t.doc,O)]:null;u=(f==null?void 0:f.attrs)&&f.attrs[c]}if(u){let O=t.sliceDoc(i,r).toLowerCase(),f='"',d='"';/^['"]/.test(O)?(l=O[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",d=t.sliceDoc(r,r+1)==O[0]?"":O[0],O=O.slice(1),i++):l=/^[^\s<>='"]*$/;for(let h of u)a.push({label:h,apply:f+h+d,type:"constant"})}}return{from:i,to:r,options:a,validFor:l}}function uB(t,e){let{state:n,pos:i}=e,r=Pt(n).resolveInner(i,-1),s=r.resolve(i);for(let o=i,a;s==r&&(a=r.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.fromuB(i,r)}const fB=Ni.parser.configure({top:"SingleExpression"}),XT=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:ST.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:PT.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:_T.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:fB},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ni.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:AO.parser}],VT=[{name:"style",parser:AO.parser.configure({top:"Styles"})}].concat(kT.map(t=>({name:t,parser:Ni.parser}))),ET=hs.define({name:"html",parser:Z7.configure({props:[ma.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Eu=ET.configure({wrap:OT(XT,VT)});function dB(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=OT((t.nestedLanguages||[]).concat(XT),(t.nestedAttributes||[]).concat(VT)));let i=n?ET.configure({wrap:n,dialect:e}):e?Eu.configure({dialect:e}):Eu;return new dc(i,[Eu.data.of({autocomplete:OB(t)}),t.autoCloseTags!==!1?hB:[],nB().support,Qj().support])}const qv=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),hB=Oe.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Eu.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var c,u,O;let f=o.doc.sliceString(l.from-1,l.to)==i,{head:d}=l,h=Pt(o).resolveInner(d,-1),p;if(f&&i==">"&&h.name=="EndTag"){let $=h.parent;if(((u=(c=$.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=ia(o.doc,$.parent,d))&&!qv.has(p)){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),b=``;return{range:l,changes:{from:d,to:g,insert:b}}}}else if(f&&i=="/"&&h.name=="IncompleteCloseTag"){let $=h.parent;if(h.from==d-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(p=ia(o.doc,$,d))&&!qv.has(p)){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),b=`${p}>`;return{range:K.cursor(d+b.length,-1),changes:{from:d,to:g,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),pB=hs.define({name:"php",parser:e7.configure({props:[ma.add({IfStatement:Ms({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:Ms({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},ColonBlock:t=>t.baseIndent+t.unit,"Block EnumBody DeclarationList":Ex({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"String BlockComment":()=>null,Statement:Ms({except:/^({|end(for|foreach|switch|while)\b)/})}),ga.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":Tg,ColonBlock(t){return{from:t.from+1,to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function AT(t={}){let e=[],n;if(t.baseLanguage!==null)if(t.baseLanguage)n=t.baseLanguage;else{let i=dB({matchClosingTags:!1});e.push(i.support),n=i.language}return new dc(pB.configure({wrap:n&&Tx(i=>i.type.isTop?{parser:n.parser,overlay:r=>r.name=="Text"}:null),top:t.plain?"Program":"Template"}),e)}const mB={class:"p-4"},gB=M({__name:"ParameterView",setup(t){const e=zt(),n=ne(e.parameter),i=[AT({plain:!0})],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.parameter=o});function s(){e.manualSync()}return(o,a)=>(w(),j("div",mB,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),$B={class:"p-4"},QB=M({__name:"PaperDBView",setup(t){const e=zt(),n=ne(Jw(e.paperContainer)),i=[Kw()],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.paperContainer=o});function s(){e.manualSync()}return(o,a)=>(w(),j("div",$B,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),yB={class:"p-4"},bB=M({__name:"FormelView",setup(t){const e=zt(),n=ne(e.formulas),i=[AT({plain:!0})],r={lineNumbers:!0,mode:"application/xml",theme:"default"};Re(n,o=>{e.formulas=o});function s(){e.manualSync()}return(o,a)=>(w(),j("div",yB,[R(m(qt),{onClick:s,disabled:m(e).syncing},{default:V(()=>[_e(H(m(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),R(m(Yf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:r,extensions:i},null,8,["modelValue"])]))}}),vB={class:"grid gap-4 py-4"},SB={class:"grid grid-cols-4 items-center gap-4"},PB=M({__name:"SaveLayoutDialog",setup(t){const{t:e}=da(),n=zt(),i=Vr(),r=ne(""),s=async()=>{if(!r.value){alert(e("enter_layout_name_alert"));return}try{const a=i.loadJSON();await Z2(r.value,n.getShopUuid,a),n.setShowSaveLayoutDialog(!1),r.value=""}catch(a){console.error("Failed to save layout",a),alert(e("save_layout_failed_alert"))}},o=a=>{a||n.setShowSaveLayoutDialog(!1)};return(a,l)=>(w(),D(m(sc),{open:m(n).showSaveLayoutDialog,"onUpdate:open":o},{default:V(()=>[R(m(oc),null,{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>[_e(H(a.$t("save_layout_title")),1)]),_:1}),R(m(_f),null,{default:V(()=>[_e(H(a.$t("save_layout_description")),1)]),_:1})]),_:1}),U("div",vB,[U("div",SB,[R(m(Wm),{for:"name",class:"text-right"},{default:V(()=>[_e(H(a.$t("name")),1)]),_:1}),R(m(Ne),{id:"name",modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),class:"col-span-3"},null,8,["modelValue"])])]),R(m(tg),null,{default:V(()=>[R(m(qt),{onClick:s},{default:V(()=>[_e(H(a.$t("save_layout")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]))}}),_B={class:"grid gap-4 py-4"},xB=M({__name:"LoadLayoutDialog",setup(t){const{t:e}=da(),n=zt(),i=Vr(),r=ne([]),s=async()=>{try{const l=await z2(n.getShopUuid);r.value=l.data}catch(l){console.error("Failed to fetch layouts",l)}},o=l=>{confirm(e("load_layout_confirm"))&&(i.parseJSON(l),n.setShowLoadLayoutDialog(!1))},a=l=>{l||n.setShowLoadLayoutDialog(!1)};return n.$subscribe((l,c)=>{c.showLoadLayoutDialog&&s()}),(l,c)=>(w(),D(m(sc),{open:m(n).showLoadLayoutDialog,"onUpdate:open":a},{default:V(()=>[R(m(oc),null,{default:V(()=>[R(m(xf),null,{default:V(()=>[R(m(wf),null,{default:V(()=>[_e(H(l.$t("load_layout_title")),1)]),_:1}),R(m(_f),null,{default:V(()=>[_e(H(l.$t("load_layout_description")),1)]),_:1})]),_:1}),U("div",_B,[(w(!0),j(ke,null,xt(r.value,u=>(w(),j("div",{key:u.uuid,class:"flex items-center justify-between"},[U("span",null,H(u.title),1),R(m(qt),{onClick:O=>o(u.json)},{default:V(()=>[_e(H(l.$t("load")),1)]),_:2},1032,["onClick"])]))),128))])]),_:1})]),_:1},8,["open"]))}}),wB={class:"flex gap-2 flex-row"},TB={style:{"white-space":"pre-line"}},kB=M({__name:"TextElement",props:{item:{}},setup(t){const e=t;return(n,i)=>(w(),j("div",wB,[U("p",TB,H(e.item.defaultValue),1)]))}}),RB={class:"flex gap-2 flex-row items-center"},CB={class:"w-60 flex-inital"},XB=M({__name:"InputElement",props:{item:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=G({get:()=>n.item.rawValue,set:s=>{i("update:value",{elementId:n.item.id,newValue:s})}});return(s,o)=>(w(),j("div",RB,[U("label",CB,H(s.item.name),1),R(m(Ne),{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),placeholder:s.item.placeHolder,name:s.item.name,id:s.item.id,required:s.item.required},null,8,["modelValue","placeholder","name","id","required"])]))}}),VB={class:"flex gap-2 flex-row"},EB=M({__name:"HiddenElement",props:{item:{}},setup(t){const e=t;return(n,i)=>(w(),j("div",VB,[R(m(Ne),{type:"hidden",name:e.item.name,id:e.item.id,value:e.item.value},null,8,["name","id","value"])]))}}),AB={class:"flex gap-2 flex-row"},qB={key:0,class:"text-4xl"},ZB={key:1,class:"text-base"},zB={key:2,class:"text-lg"},YB={key:3,class:"text-xl"},MB={key:4,class:"text-2xl"},IB={key:5,class:"text-3xl"},UB={key:6,class:"text-4xl"},DB=M({__name:"HeadlineElement",props:{item:{}},setup(t){const e=t;return(n,i)=>(w(),j("div",AB,[e.item.variant=="1"?(w(),j("h1",qB,H(e.item.defaultValue),1)):e.item.variant=="6"?(w(),j("h6",ZB,H(e.item.defaultValue),1)):e.item.variant=="5"?(w(),j("h5",zB,H(e.item.defaultValue),1)):e.item.variant=="4"?(w(),j("h4",YB,H(e.item.defaultValue),1)):e.item.variant=="3"?(w(),j("h3",MB,H(e.item.defaultValue),1)):e.item.variant=="2"?(w(),j("h2",IB,H(e.item.defaultValue),1)):(w(),j("h1",UB,H(e.item.defaultValue),1))]))}}),LB={class:"flex gap-2 flex-row items-center"},WB={class:"w-60 flex-inital"},NB={class:"w-full"},jB=M({__name:"SelectElement",props:{item:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=G({get:()=>n.item.rawValue,set:s=>{i("update:value",{elementId:n.item.id,newValue:s})}});return(s,o)=>(w(),j("div",LB,[U("label",WB,H(s.item.name),1),U("div",NB,[R(m(tc),{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a)},{default:V(()=>[R(m(ic),null,{default:V(()=>[R(m(rc))]),_:1}),R(m(nc),null,{default:V(()=>[R(m(Pf),null,{default:V(()=>[(w(!0),j(ke,null,xt(s.item.options,a=>la((w(),D(m(ti),{key:a.id,value:a.id},{default:V(()=>[_e(H(a.name),1)]),_:2},1032,["value"])),[[bm,a.valid]])),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])])]))}}),BB={class:"flex gap-2 flex-row"},GB={class:"flex-row w-full h-auto"},FB=M({__name:"RowElement",props:{item:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=s=>{i("update:value",s)};return(s,o)=>(w(),j("div",BB,[(w(!0),j(ke,null,xt(n.item.elements,a=>(w(),j("div",GB,[R(qT,{items:a.elements,"onUpdate:value":r},null,8,["items"])]))),256))]))}}),HB={class:"flex gap-2 flex-row"},KB=["src"],JB=M({__name:"MediaElement",props:{item:{}},setup(t){const e=t;let n=ne("");return ft(async()=>{if(e.item.value)try{n=await pP(e.item.value)}catch(i){console.error("Failed to fetch media URL",i)}}),(i,r)=>(w(),j("div",HB,[m(n)!=""?(w(),j("img",{key:0,class:"",src:m(n)},null,8,KB)):pe("",!0)]))}}),qT=M({__name:"RenderElements",props:{items:{}},emits:["update:value"],setup(t,{emit:e}){const n=t,i=e,r=s=>{i("update:value",s)};return(s,o)=>(w(!0),j(ke,null,xt(n.items,a=>(w(),j("div",{key:a.id},[a.valid&&a.htmlType==="headline"?(w(),D(DB,{key:0,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0),a.valid&&a.htmlType==="media"?(w(),D(JB,{key:1,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0),a.valid&&a.htmlType==="hidden"?(w(),D(EB,{key:2,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0),a.valid&&a.htmlType==="text"?(w(),D(kB,{key:3,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0),a.valid&&a.htmlType==="input"?(w(),D(XB,{key:4,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0),a.valid&&a.htmlType==="select"?(w(),D(jB,{key:5,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0),a.valid&&a.htmlType==="row"?(w(),D(FB,{key:6,item:a,"onUpdate:value":r},null,8,["item"])):pe("",!0)]))),128))}}),eG={class:"p-6 bg-gray-50 rounded-lg shadow-md"},tG={class:"space-y-3"},nG={class:"flex justify-between items-center text-gray-600"},iG={class:"font-medium text-gray-900"},rG={class:"flex justify-between items-center text-gray-600"},sG={class:"font-medium text-gray-900"},oG={class:"flex justify-between items-center text-xl font-bold"},aG={class:"text-primary"},lG=M({__name:"PriceDisplay",props:{priceData:{}},setup(t){const e=t,n=o=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(o),i=G(()=>n(e.priceData.netto/100||0)),r=G(()=>n(e.priceData.tax/100||0)),s=G(()=>n(e.priceData.brutto/100||0));return(o,a)=>(w(),j("div",eG,[a[4]||(a[4]=U("h3",{class:"text-lg font-semibold text-gray-800 mb-4"},"Preisübersicht",-1)),U("div",tG,[U("div",nG,[a[0]||(a[0]=U("span",null,"Nettopreis",-1)),U("span",iG,H(i.value),1)]),U("div",rG,[a[1]||(a[1]=U("span",null,"+ MwSt. (19%)",-1)),U("span",sG,H(r.value),1)]),a[3]||(a[3]=U("hr",{class:"my-3 border-t border-gray-200"},null,-1)),U("div",oG,[a[2]||(a[2]=U("span",{class:"text-gray-900"},"Gesamt",-1)),U("span",aG,H(s.value),1)])])]))}});function cG(t,e){let n=null,i=null;const r=(...s)=>{r.clear(),i=()=>{r.clear(),t.call(r,...s)},n=Number(setTimeout(i,e))};return r.clear=()=>{typeof n=="number"&&(clearTimeout(n),n=null,i=null)},r.flush=()=>{i==null||i()},Object.defineProperty(r,"pending",{get:()=>typeof n=="number"}),r}const uG={class:"w-full p-6 min-h-screen"},OG={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},fG={key:1,class:"text-center py-10"},dG={key:2},hG={class:"overflow-auto h-full"},pG={class:"flex flex-row"},mG={class:"w-3/5 flex flex-col gap-2"},gG={class:"w-2/5 pl-6"},$G=M({__name:"Preview",setup(t){const e=zt(),n=Vr(),i=G(()=>e.getPreviewData),r=G(()=>e.previewError),s=G(()=>e.isPreviewLoading),o=G(()=>{var u;return((u=i.value)==null?void 0:u.elements)||[]}),a=G(()=>i.value);let l={};const c=u=>{l[u.elementId]=u.newValue,cG(()=>e.loadPreview(n.loadJSON(),l),500)};return ft(()=>{e.loadPreview(n.loadJSON()).then(()=>{e.previewData.elements.map(u=>{l[u.id]=u.rawValue})})}),(u,O)=>(w(),j("div",uG,[r.value?(w(),j("div",OG,[O[0]||(O[0]=U("p",{class:"font-bold"},"Preview Error",-1)),U("p",null,H(r.value),1)])):pe("",!0),s.value?(w(),j("div",fG,O[1]||(O[1]=[U("p",null,"Loading Preview...",-1)]))):pe("",!0),!s.value&&i.value?(w(),j("div",dG,[U("div",hG,[U("div",pG,[U("div",mG,[R(qT,{items:o.value,"onUpdate:value":c},null,8,["items"])]),U("div",gG,[R(lG,{"price-data":a.value},null,8,["price-data"])])])])])):pe("",!0)]))}}),QG={class:"w-screen h-screen flex flex-col"},yG={class:"flex-grow w-full h-full"},bG={class:"flex flex-col gap-2 h-full"},vG={class:"flex justify-center"},SG={class:"flex h-full p-6"},PG=M({__name:"Gui",setup(t){const e=zt();return(n,i)=>(w(),j("div",QG,[U("div",yG,[R(m(oP),{id:"handle-demo-group-1",direction:"horizontal",class:"h-full w-full"},{default:V(()=>[R(m(rO),{id:"","default-size":15},{default:V(()=>[U("div",bG,[R(D2),R(m(FZ))])]),_:1}),R(m(sP),{id:"","with-handle":""}),R(m(rO),{id:"","default-size":85},{default:V(()=>[R(m(i2),{"default-value":m(e).currentTab,"onUpdate:modelValue":i[0]||(i[0]=r=>m(e).setCurrentTab(r)),class:"w-full h-full"},{default:V(()=>[U("div",vG,[R(m(r2),null,{default:V(()=>[R(m(uo),{value:"designer"},{default:V(()=>[_e(H(n.$t("designer")),1)]),_:1}),R(m(uo),{value:"preview"},{default:V(()=>[_e(H(n.$t("preview")),1)]),_:1}),R(m(uo),{value:"xml"},{default:V(()=>[_e(H(n.$t("xml_view")),1)]),_:1}),R(m(uo),{value:"formel"},{default:V(()=>[_e(H(n.$t("formel_view")),1)]),_:1}),R(m(uo),{value:"parameter"},{default:V(()=>[_e(H(n.$t("parameter_view")),1)]),_:1}),R(m(uo),{value:"paperdb"},{default:V(()=>[_e(H(n.$t("paperdb_view")),1)]),_:1})]),_:1})]),R(m(co),{value:"designer",class:"h-full overflow-y-auto"},{default:V(()=>[U("div",SG,[m(e).showPreview?(w(),D($G,{key:1})):(w(),D(m(uM),{key:0}))])]),_:1}),R(m(co),{value:"preview",class:"h-full overflow-y-auto"},{default:V(()=>[R(EM)]),_:1}),R(m(co),{value:"xml",class:"h-full overflow-y-auto"},{default:V(()=>[R(C3)]),_:1}),R(m(co),{value:"formel",class:"h-full overflow-y-auto"},{default:V(()=>[R(bB)]),_:1}),R(m(co),{value:"parameter",class:"h-full overflow-y-auto"},{default:V(()=>[R(gB)]),_:1}),R(m(co),{value:"paperdb",class:"h-full overflow-y-auto"},{default:V(()=>[R(QB)]),_:1})]),_:1},8,["default-value"])]),_:1})]),_:1}),R(m(Iz)),R(m(eY)),R(m(Dz)),R(PB),R(xB)])]))}}),_G=M({__name:"App",setup(t){return ft(()=>{const e=Vr(),n=zt(),i=new URLSearchParams(window.location.search),r=i.get("uuid"),s=i.get("shop"),o=i.get("mode");if(n.setShopUuid(s),o){let a=parseInt(o);n.setMode(a)}r&&(n.setProductUuid(r),n.loadConfigFromProductApi(r).then(a=>{e.parseJSON(a)}),n.loadFormulaAnalyserDataFromApi(r)),e.$subscribe((a,l)=>{const c=e.loadJSON();n.saveDesign(c)})}),(e,n)=>(w(),D(PG))}}),xG="Designer",wG="Kalkulations Analyse",TG="XML Ansicht",kG="JSON Ansicht",RG="Vorschau-Modus",CG="Überschrift",XG="Text",VG="Medien",EG="Textbereich",AG="Eingabefeld",qG="Auswahl",ZG="Versteckt",zG="Zeile",YG="ID",MG="Name",IG="Variante",UG="Überschrift 1",DG="Überschrift 2",LG="Überschrift 3",WG="Überschrift 4",NG="Überschrift 5",jG="Überschrift 6",BG="Platzhalter",GG="Erforderlich",FG="Min",HG="Max",KG="Min Calc",JG="Max Calc",eF="Abhängigkeit hinzufügen",tF="Spalte hinzufügen",nF="Modus",iF="Normal",rF="PapierDB",sF="FarbDB",oF="Container",aF="Optionen bearbeiten",lF="Option hinzufügen",cF="Schließen",uF="Abhängigkeiten",OF="Optionen",fF="Einstellungen",dF="Speichern",hF="Speichern...",pF="Formel Ansicht",mF="Parameter Ansicht",gF="PapierDB Ansicht",$F="Synchronisiere...",QF="Synchronisieren",yF="CMS-Elemente",bF="Formular-Elemente",vF="Struktur-Elemente",SF="Layout speichern",PF="Vorlage laden",_F="Layout speichern",xF="Gib einen Namen für deine neue Layout-Vorlage ein.",wF="Vorlage laden",TF="Wähle eine Layout-Vorlage aus, um sie in den Designer zu laden.",kF="Laden",RF="Bitte gib einen Namen für das Layout ein.",CF="Layout konnte nicht gespeichert werden.",XF="Möchtest du dieses Layout wirklich laden? Dein aktuelles Design wird überschrieben.",VF={designer:xG,preview:wG,xml_view:TG,json_view:kG,preview_mode:RG,headline:CG,text:XG,media:VG,textarea:EG,input:AG,select:qG,hidden:ZG,row:zG,id:YG,default:"Standard",name:MG,variant:IG,headline1:UG,headline2:DG,headline3:LG,headline4:WG,headline5:NG,headline6:jG,placeholder:BG,required:GG,min:FG,max:HG,min_calc:KG,max_calc:JG,add_dependency:eF,add_column:tF,mode:nF,normal:iF,paperdb:rF,colordb:sF,container:oF,edit_options:aF,add_option:lF,close:cF,dependencies:uF,options:OF,settings:fF,save:dF,saving:hF,formel_view:pF,parameter_view:mF,paperdb_view:gF,syncing:$F,sync:QF,cms_elements:yF,form_elements:bF,structure_elements:vF,save_layout:SF,load_layout:PF,save_layout_title:_F,save_layout_description:xF,load_layout_title:wF,load_layout_description:TF,load:kF,enter_layout_name_alert:RF,save_layout_failed_alert:CF,load_layout_confirm:XF},EF="Designer",AF="Calculation Analysis",qF="XML View",ZF="JSON View",zF="Preview Mode",YF="Headline",MF="Text",IF="Media",UF="Textarea",DF="Input",LF="Select",WF="Hidden",NF="Row",jF="ID",BF="Name",GF="Variant",FF="Headline 1",HF="Headline 2",KF="Headline 3",JF="Headline 4",e9="Headline 5",t9="Headline 6",n9="Placeholder",i9="Required",r9="Min",s9="Max",o9="Min Calc",a9="Max Calc",l9="Add Dependency",c9="Add Column",u9="Mode",O9="Normal",f9="PaperDB",d9="ColorDB",h9="Container",p9="Edit Options",m9="Add Option",g9="Close",$9="Dependencies",Q9="Options",y9="Settings",b9="Save",v9="Saving...",S9="Formula View",P9="Parameter View",_9="PaperDB View",x9="Syncing...",w9="Sync",T9="CMS Elements",k9="Form Elements",R9="Structure Elements",C9="Save Layout",X9="Load Layout",V9="Save Layout",E9="Enter a name for your new layout template.",A9="Load Layout",q9="Select a layout template to load it into the designer.",Z9="Load",z9="Please enter a name for the layout.",Y9="Failed to save layout.",M9="Are you sure you want to load this layout? This will overwrite your current design.",I9={designer:EF,preview:AF,xml_view:qF,json_view:ZF,preview_mode:zF,headline:YF,text:MF,media:IF,textarea:UF,input:DF,select:LF,hidden:WF,row:NF,id:jF,default:"Default",name:BF,variant:GF,headline1:FF,headline2:HF,headline3:KF,headline4:JF,headline5:e9,headline6:t9,placeholder:n9,required:i9,min:r9,max:s9,min_calc:o9,max_calc:a9,add_dependency:l9,add_column:c9,mode:u9,normal:O9,paperdb:f9,colordb:d9,container:h9,edit_options:p9,add_option:m9,close:g9,dependencies:$9,options:Q9,settings:y9,save:b9,saving:v9,formel_view:S9,parameter_view:P9,paperdb_view:_9,syncing:x9,sync:w9,cms_elements:T9,form_elements:k9,structure_elements:R9,save_layout:C9,load_layout:X9,save_layout_title:V9,save_layout_description:E9,load_layout_title:A9,load_layout_description:q9,load:Z9,enter_layout_name_alert:z9,save_layout_failed_alert:Y9,load_layout_confirm:M9},U9=VZ({legacy:!1,locale:"de",fallbackLocale:"en",messages:{de:VF,en:I9}}),Hg=Fu(_G);Hg.use(lX());Hg.use(U9);Hg.mount("#app"); diff --git a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Resources/views/backend/order/send.html.twig b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Resources/views/backend/order/send.html.twig index fa7f9c797..56e745800 100755 --- a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Resources/views/backend/order/send.html.twig +++ b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Resources/views/backend/order/send.html.twig @@ -38,7 +38,8 @@ {{ parent() }} {% autoescape 'js' %} - {% endautoescape %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php b/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php index beec6a20e..1c003e9ee 100755 --- a/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php +++ b/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php @@ -4,8 +4,11 @@ namespace Plugin\System\PSC\XmlCalc\Api; use Doctrine\ODM\MongoDB\DocumentManager; use Doctrine\ORM\EntityManagerInterface; -use Nelmio\ApiDocBundle\Annotation\Model; -use OpenApi\Annotations as OA; +use Nelmio\ApiDocBundle\Attribute\Model; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\RequestBody; +use OpenApi\Attributes\Response; +use OpenApi\Attributes\Tag; use Plugin\System\PSC\XmlCalc\Dto\Input\PriceInput; use Plugin\System\PSC\XmlCalc\Dto\Output\Display\Group as DisplayGroup; use Plugin\System\PSC\XmlCalc\Dto\Output\PreCalc\Group; @@ -15,6 +18,7 @@ use Plugin\System\PSC\XmlCalc\Dto\Output\Price\Element; use Plugin\System\PSC\XmlCalc\Dto\Output\Price\Option; use Plugin\System\PSC\XmlCalc\Dto\Output\Price\Validation\Input\Max as PluginMax; use Plugin\System\PSC\XmlCalc\Dto\Output\Price\Validation\Input\Min; +use Plugin\System\PSC\XmlCalc\Dto\Output\PriceOutput; use PSC\Library\Calc\Engine; use PSC\Library\Calc\Error\Validation\Input\Max; use PSC\Library\Calc\Error\Validation\Input\Min as PSCMin; @@ -28,15 +32,10 @@ use PSC\Shop\ContactBundle\Transformer\Model\Contact as ContactTransformer; use PSC\Shop\EntityBundle\Entity\Product; use PSC\System\SettingsBundle\Service\Help; use PSC\System\SettingsBundle\Service\PaperDB; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Yaml\Yaml; class GetPrice extends AbstractController { @@ -77,20 +76,13 @@ class GetPrice extends AbstractController $this->helpService = $helpService; } - /** - * get price - * - * @OA\Response( - * response=200, - * description="orders", - * @OA\JsonContent(ref=@Model(type=\Plugin\System\PSC\XmlCalc\Dto\Output\PriceOutput::class)) - * ) - * @OA\RequestBody( - * - * @Model(type=\Plugin\System\PSC\XmlCalc\Dto\Input\PriceInput::class)) - * ) - * @OA\Tag(name="Plugin/System/psc/Xmlcalc/Price") - */ + #[Response( + response: 200, + description: 'get price', + content: new JsonContent(ref: new Model(type: PriceOutput::class)), + )] + #[RequestBody(ref: new Model(type: PriceInput::class))] + #[Tag(name: 'Plugin/System/psc/Xmlcalc/Price')] #[Route(path: '/price', methods: ['POST'])] #[ParamConverter( 'data',