From 1914dca626cb3271e57247b293e72c92ff93236f Mon Sep 17 00:00:00 2001 From: ondrejnyklicek Date: Fri, 24 Jul 2026 19:53:41 +0200 Subject: [PATCH 01/74] =?UTF-8?q?Invert=20the=20wire-core=20=E2=86=92=20wi?= =?UTF-8?q?re-forms=20action/modal=20form=20coupling=20behind=20a=20core?= =?UTF-8?q?=20seam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package graph is wire-sortable → wire-table → wire-forms → wire-core, and InteractsWithActions documents that wire-core must not depend on wire-forms — yet six core sites imported and even constructed wire-forms' concrete Form / FormConfig (HasModal, ActionHalt, the HasForm contract, both FormSaving/ FormSavedPayload plugin hooks), and the core actions.modal-host view called getActionModalFormInstance(), a method only the wire-forms bridge defines. In a split-published standalone nyoncode/wire-core this is not academic: the payloads and contracts reference undefined classes, and opening any action modal on a plain WithActions host fatally calls the missing bridge method. Core now owns the seam. A narrow ModalForm interface (extends Htmlable; statePath/livewire/fill/getInitialState/validate), a ModalFormFactory resolved from the container via ModalForms, and a FormConfigContract for the hook payloads. wire-forms' Form implements ModalForm (no method-body changes), a FormModalFormFactory is bound in WireFormsServiceProvider, and FormConfig implements the contract. When wire-forms is absent the factory is unbound and ModalForms::make() degrades to null (the modal renders form-less) instead of fatally naming a class core does not ship; two null form-instance seams on core InteractsWithActions (overridden by the bridge via insteadof in WithActions / WithTable) keep the core modal-host view honest. The public HasModal::form() / ActionHalt::form() API is unchanged in practice — Form implements ModalForm, so ->form(Form::make()->schema([...])), ->form([...]) and closures all still type-check. Field objects passed to ->form([...]) remain wire-forms types, so this is compile/load-level decoupling (a standalone core boots against only its own dependencies), not a claim that core is value-level form-free. Covered by ModalFormsTest (factory resolution + graceful degradation when unbound), a form-free-host seam test in InteractsWithActionsTest, getModel() coverage in FormConfigTest, and the existing form-behaviour suites, which build through the factory bound in the core TestCase. Full suites green (core/forms/ table/integration); composer analyse clean. --- CHANGELOG.md | 5 ++ packages/core/src/Actions/ActionHalt.php | 15 +++--- .../core/src/Actions/Concerns/HasModal.php | 39 ++++++++------ .../Actions/Concerns/InteractsWithActions.php | 22 ++++++++ .../core/src/Actions/Contracts/HasForm.php | 8 +-- .../core/src/Actions/Contracts/ModalForm.php | 54 +++++++++++++++++++ .../Actions/Contracts/ModalFormFactory.php | 26 +++++++++ .../core/src/Actions/Support/ModalForms.php | 37 +++++++++++++ .../Plugin/Contracts/FormConfigContract.php | 33 ++++++++++++ .../Core/Plugin/Hooks/FormSavedPayload.php | 6 +-- .../Core/Plugin/Hooks/FormSavingPayload.php | 6 +-- .../Actions/InteractsWithActionsTest.php | 19 +++---- packages/core/tests/TestCase.php | 10 ++++ .../tests/Unit/Actions/ModalFormsTest.php | 40 ++++++++++++++ .../src/Concerns/InteractsWithActionForms.php | 17 +++--- packages/forms/src/Concerns/WithActions.php | 2 + .../forms/src/Forms/Config/FormConfig.php | 11 +++- packages/forms/src/Forms/Form.php | 3 +- .../Forms/Support/FormModalFormFactory.php | 25 +++++++++ .../forms/src/WireFormsServiceProvider.php | 5 ++ .../tests/Unit/Config/FormConfigTest.php | 8 +++ packages/table/src/Concerns/WithTable.php | 2 + 22 files changed, 339 insertions(+), 54 deletions(-) create mode 100644 packages/core/src/Actions/Contracts/ModalForm.php create mode 100644 packages/core/src/Actions/Contracts/ModalFormFactory.php create mode 100644 packages/core/src/Actions/Support/ModalForms.php create mode 100644 packages/core/src/Core/Plugin/Contracts/FormConfigContract.php create mode 100644 packages/core/tests/Unit/Actions/ModalFormsTest.php create mode 100644 packages/forms/src/Forms/Support/FormModalFormFactory.php diff --git a/CHANGELOG.md b/CHANGELOG.md index b69a2c09..951f489b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to the Wire ecosystem will be documented in this file. +## [1.13.3] + +### Changed +- **`wire-core` no longer depends on `wire-forms` — the action/modal form coupling is now inverted through a core-owned seam.** The package graph is `wire-sortable → wire-table → wire-forms → wire-core`, and `InteractsWithActions` documents that "wire-core must not depend on wire-forms," yet six sites in core imported and even *constructed* wire-forms' concrete `Form` / `FormConfig` (`HasModal`, `ActionHalt`, the `HasForm` contract, both `FormSaving`/`FormSavedPayload` plugin hooks) and the core `actions.modal-host` view called a bridge method (`getActionModalFormInstance()`) that only wire-forms defines. In a split-published, standalone `nyoncode/wire-core` this is not academic: the payloads and contracts reference undefined classes, and opening any action modal on a plain `WithActions` host **fatally** calls the missing bridge method. Core now owns the seam: a narrow `ModalForm` interface (`extends Htmlable`; `statePath`/`livewire`/`fill`/`getInitialState`/`validate`), a `ModalFormFactory` resolved from the container via `ModalForms`, and a `FormConfigContract` for the hook payloads. wire-forms' `Form` implements `ModalForm` (no method-body changes), a `FormModalFormFactory` is bound in `WireFormsServiceProvider`, and `FormConfig` implements the contract. When wire-forms is absent the factory is unbound and `ModalForms::make()` degrades to `null` (the modal renders form-less) instead of fatally naming a class it does not ship; two new null form-instance seams on core `InteractsWithActions` (overridden by the bridge via `insteadof`) keep the core modal-host view honest. The public `HasModal::form()` / `ActionHalt::form()` API is unchanged in practice — `Form implements ModalForm`, so `->form(Form::make()->schema([...]))`, `->form([...])`, and closures all still type-check; only the internal type surface moved off the concrete `Form`. Field objects passed to `->form([...])` remain wire-forms types, so this is compile/load-level decoupling (a standalone core boots and references only its own dependencies), not a claim that core is value-level form-free. Covered by `ModalFormsTest` (factory resolution + graceful degradation when unbound), a form-free-host seam test in `InteractsWithActionsTest`, and the existing form-behaviour suites, which now build through the factory bound in the core `TestCase`. + ## [1.13.2] ### Fixed diff --git a/packages/core/src/Actions/ActionHalt.php b/packages/core/src/Actions/ActionHalt.php index 4ab3a7f6..0f001f14 100644 --- a/packages/core/src/Actions/ActionHalt.php +++ b/packages/core/src/Actions/ActionHalt.php @@ -5,13 +5,14 @@ namespace NyonCode\WireCore\Actions; use NyonCode\WireCore\Actions\Concerns\HasIcons; +use NyonCode\WireCore\Actions\Contracts\ModalForm; +use NyonCode\WireCore\Actions\Support\ModalForms; use NyonCode\WireCore\Core\Support\Deprecation; use NyonCode\WireCore\Core\Support\Trans; use NyonCode\WireCore\Foundation\Colors\Color; use NyonCode\WireCore\Foundation\Concerns\InteractsWithColor; use NyonCode\WireCore\Foundation\Enums\ModalWidth; use NyonCode\WireCore\Foundation\Icons\Icon; -use NyonCode\WireForms\Forms\Form; /** * ActionHalt – stops execution pipeline and shows a dynamic modal. @@ -77,7 +78,7 @@ final class ActionHalt protected bool $isInformative = false; // Form - protected ?Form $formInstance = null; + protected ?ModalForm $formInstance = null; /** @var array|null */ protected ?array $formValidation = null; @@ -295,14 +296,14 @@ public function noSubmit(bool $noSubmit = true): static } /** - * @param array|Form $fields + * @param array|ModalForm $fields */ - public function form(array|Form $fields): static + public function form(array|ModalForm $fields): static { - if ($fields instanceof Form) { + if ($fields instanceof ModalForm) { $this->formInstance = $fields; } else { - $this->formInstance = Form::make()->schema($fields); + $this->formInstance = ModalForms::make($fields); } return $this; @@ -421,7 +422,7 @@ public function hasForm(): bool return ! $this->isInformative && $this->formInstance !== null; } - public function getFormInstance(): ?Form + public function getFormInstance(): ?ModalForm { return $this->formInstance; } diff --git a/packages/core/src/Actions/Concerns/HasModal.php b/packages/core/src/Actions/Concerns/HasModal.php index 75c75921..c2aa4aa3 100644 --- a/packages/core/src/Actions/Concerns/HasModal.php +++ b/packages/core/src/Actions/Concerns/HasModal.php @@ -6,7 +6,9 @@ use Closure; use Livewire\Component; +use NyonCode\WireCore\Actions\Contracts\ModalForm; use NyonCode\WireCore\Actions\ModalStep; +use NyonCode\WireCore\Actions\Support\ModalForms; use NyonCode\WireCore\Core\State\StateContainer; use NyonCode\WireCore\Core\Support\Trans; use NyonCode\WireCore\Foundation\Colors\Color; @@ -19,7 +21,6 @@ use NyonCode\WireCore\Modals\Modal; use NyonCode\WireCore\Modals\SlideOver; use NyonCode\WireCore\Modals\Wizard; -use NyonCode\WireForms\Forms\Form; /** * Trait HasModal @@ -62,8 +63,8 @@ trait HasModal protected bool $modalCloseOnEscape = true; - /** @var Form|Closure|null Form instance or closure returning Form */ - protected Form|Closure|null $formInstance = null; + /** @var ModalForm|Closure|null Form instance or closure returning a form */ + protected ModalForm|Closure|null $formInstance = null; /** @var Infolist|Closure|null Infolist instance or closure returning Infolist */ protected Infolist|Closure|null $infolistInstance = null; @@ -275,16 +276,16 @@ public function getMobileBreakpoint(): ?string * - Closure returning Form: ->form(fn ($record) => Form::make()->schema([...])) * - Closure returning array of components: ->form(fn ($record) => [TextInput::make('name')]) * - * @param array|Form|Closure $fields + * @param array|ModalForm|Closure $fields */ - public function form(array|Form|Closure $fields): static + public function form(array|ModalForm|Closure $fields): static { - if ($fields instanceof Form) { + if ($fields instanceof ModalForm) { $this->formInstance = $fields; } elseif ($fields instanceof Closure) { $this->formInstance = $fields; } else { - $this->formInstance = Form::make()->schema($fields); + $this->formInstance = ModalForms::make($fields); } $this->hasModal = true; @@ -598,18 +599,18 @@ public function getInfolistInstance(mixed $context = null): ?Infolist * When a closure was passed to form(), it will be resolved here. * The Form is automatically configured with statePath and livewire binding. */ - public function getFormInstance(?Component $livewire = null, mixed $context = null, ?string $statePath = null): ?Form + public function getFormInstance(?Component $livewire = null, mixed $context = null, ?string $statePath = null): ?ModalForm { $form = null; if ($this->formInstance instanceof Closure) { $resolved = ($this->formInstance)($context); - if ($resolved instanceof Form) { + if ($resolved instanceof ModalForm) { $form = $resolved; } elseif (is_array($resolved)) { - $form = Form::make()->schema($resolved); + $form = ModalForms::make($resolved); } - } elseif ($this->formInstance instanceof Form) { + } elseif ($this->formInstance instanceof ModalForm) { $form = $this->formInstance; } @@ -812,19 +813,19 @@ public function getFormDefaults(mixed $context = null): array * component and sets no state path, so calling {@see Form::getInitialState()} * on the result never mutates the instance that later renders. */ - protected function resolveFormForSeeding(mixed $context = null): ?Form + protected function resolveFormForSeeding(mixed $context = null): ?ModalForm { if ($this->formInstance instanceof Closure) { $resolved = ($this->formInstance)($context); - if ($resolved instanceof Form) { + if ($resolved instanceof ModalForm) { return $resolved; } - return is_array($resolved) ? Form::make()->schema($resolved) : null; + return is_array($resolved) ? ModalForms::make($resolved) : null; } - if ($this->formInstance instanceof Form) { + if ($this->formInstance instanceof ModalForm) { return $this->formInstance; } @@ -1041,7 +1042,7 @@ public function getModalStep(int $index): ?ModalStep * `modal.action.formData` bag and data persists as the user moves between * steps. Returns null when this action is not a multi-step wizard. */ - public function getStepFormInstance(?Component $livewire = null, mixed $context = null, int $stepIndex = 0, ?string $statePath = null): ?Form + public function getStepFormInstance(?Component $livewire = null, mixed $context = null, int $stepIndex = 0, ?string $statePath = null): ?ModalForm { $step = $this->getModalStep($stepIndex); @@ -1049,7 +1050,11 @@ public function getStepFormInstance(?Component $livewire = null, mixed $context return null; } - $form = Form::make()->schema($step->getSchema($context)); + $form = ModalForms::make($step->getSchema($context)); + + if ($form === null) { + return null; + } $form->statePath($statePath ?? $this->resolveModalFormStatePath($livewire)); diff --git a/packages/core/src/Actions/Concerns/InteractsWithActions.php b/packages/core/src/Actions/Concerns/InteractsWithActions.php index 91158529..5ce5acd1 100644 --- a/packages/core/src/Actions/Concerns/InteractsWithActions.php +++ b/packages/core/src/Actions/Concerns/InteractsWithActions.php @@ -8,6 +8,7 @@ use NyonCode\WireCore\Actions\ActionHalt; use NyonCode\WireCore\Actions\BaseAction; use NyonCode\WireCore\Actions\BulkAction; +use NyonCode\WireCore\Actions\Contracts\ModalForm; use NyonCode\WireCore\Actions\HeaderAction; use NyonCode\WireCore\Actions\ModalFooterAction; use NyonCode\WireCore\Core\Actions\ActionContext; @@ -967,6 +968,27 @@ public function getActionModalInfolistInstance(): ?Infolist return $this->actionModalInfolistInstance; } + /** + * The resolved form instance for the current action modal, or null. + * + * Form-agnostic default: wire-core hosts have no form runtime, so the modal + * renders without a form body. The wire-forms bridge + * ({@see \NyonCode\WireForms\Concerns\InteractsWithActionForms}) overrides + * this (resolved via `insteadof` in the composing host) to build the real + * {@see ModalForm}. Declared here so the core action modal-host view can call + * it on any host — including a standalone wire-core one — without a fatal. + */ + public function getActionModalFormInstance(): ?ModalForm + { + return null; + } + + /** Form-agnostic default for a stacked modal frame; see {@see getActionModalFormInstance()}. */ + public function getActionModalFormInstanceForDepth(int $depth): ?ModalForm + { + return null; + } + // ========================================== // Infolist actions (entry + section header) // ========================================== diff --git a/packages/core/src/Actions/Contracts/HasForm.php b/packages/core/src/Actions/Contracts/HasForm.php index 70fba79a..18206917 100644 --- a/packages/core/src/Actions/Contracts/HasForm.php +++ b/packages/core/src/Actions/Contracts/HasForm.php @@ -5,14 +5,14 @@ namespace NyonCode\WireCore\Actions\Contracts; use Livewire\Component; -use NyonCode\WireForms\Forms\Form; /** * Contract for actions that support form integration. * * Implementation is provided by HasModal trait on BaseAction, * which offers form(), fillFormUsing(), getFormInstance(), - * and hasFormModal() methods. + * and hasFormModal() methods. Typed against the core {@see ModalForm} seam so + * the contract never names wire-forms' concrete Form. */ interface HasForm { @@ -22,11 +22,11 @@ interface HasForm public function hasFormInstance(): bool; /** - * Resolve the Form instance for this action's modal. + * Resolve the form instance for this action's modal. * * $statePath is the frame's binding base resolved by the host (per modal * stack depth); when null the action falls back to the legacy single-slot * path for host-less callers. */ - public function getFormInstance(?Component $livewire = null, mixed $context = null, ?string $statePath = null): ?Form; + public function getFormInstance(?Component $livewire = null, mixed $context = null, ?string $statePath = null): ?ModalForm; } diff --git a/packages/core/src/Actions/Contracts/ModalForm.php b/packages/core/src/Actions/Contracts/ModalForm.php new file mode 100644 index 00000000..0ab8cb84 --- /dev/null +++ b/packages/core/src/Actions/Contracts/ModalForm.php @@ -0,0 +1,54 @@ + wire-table -> wire-forms -> wire-core`. This contract is the + * canonical seam: core type-hints and calls only these methods, wire-forms' + * `Form` implements them, and the concrete instance is produced by a + * {@see ModalFormFactory} resolved from the container. Core never names `Form`. + * + * Deliberately narrow: exactly what core production code and the generic action + * modal runtime call — not the full wire-forms `Form` API (no `model()`, + * `save()`, wizards, or `getFlatComponents()`). Extends {@see Htmlable} so a + * modal body can render it with `{{ $formInstance }}`. + */ +interface ModalForm extends Htmlable +{ + /** Bind the form's fields to a Livewire state path (per modal-stack depth). */ + public function statePath(string $path): static; + + /** Bind the form to its host Livewire component. */ + public function livewire(Component $component): static; + + /** + * Seed the form's fields with default values. + * + * @param array $data + */ + public function fill(array $data): static; + + /** + * The form's initial (default) state, used to seed modal form data. + * + * @return array + */ + public function getInitialState(): array; + + /** + * Validate the bound state, returning the validated data. + * + * @return array + */ + public function validate(): array; +} diff --git a/packages/core/src/Actions/Contracts/ModalFormFactory.php b/packages/core/src/Actions/Contracts/ModalFormFactory.php new file mode 100644 index 00000000..6f5499c6 --- /dev/null +++ b/packages/core/src/Actions/Contracts/ModalFormFactory.php @@ -0,0 +1,26 @@ + $schema Field components for the form. + */ + public function make(array $schema = []): ModalForm; +} diff --git a/packages/core/src/Actions/Support/ModalForms.php b/packages/core/src/Actions/Support/ModalForms.php new file mode 100644 index 00000000..8d6604ef --- /dev/null +++ b/packages/core/src/Actions/Support/ModalForms.php @@ -0,0 +1,37 @@ +bound(ModalFormFactory::class) + ? app(ModalFormFactory::class) + : null; + } + + /** + * Build a modal form from a field schema, or `null` when no form runtime is + * available. Callers already guard a `null` form (the modal degrades to a + * confirmation/heading dialog). + * + * @param array $schema + */ + public static function make(array $schema = []): ?ModalForm + { + return self::factory()?->make($schema); + } +} diff --git a/packages/core/src/Core/Plugin/Contracts/FormConfigContract.php b/packages/core/src/Core/Plugin/Contracts/FormConfigContract.php new file mode 100644 index 00000000..4a7d8105 --- /dev/null +++ b/packages/core/src/Core/Plugin/Contracts/FormConfigContract.php @@ -0,0 +1,33 @@ + $data The validated form data (modifiable) */ public function __construct( - public readonly FormConfig $config, + public readonly FormConfigContract $config, public array $data, ) {} diff --git a/packages/core/tests/Feature/Actions/InteractsWithActionsTest.php b/packages/core/tests/Feature/Actions/InteractsWithActionsTest.php index bde8f80c..5f768cb6 100644 --- a/packages/core/tests/Feature/Actions/InteractsWithActionsTest.php +++ b/packages/core/tests/Feature/Actions/InteractsWithActionsTest.php @@ -202,15 +202,6 @@ public function openModal(string $name): void $this->actionModalConfigCache = $this->catalog()[$name]->getModalConfig(); } - /** - * The modal-host blade reads the form bridge (a wire-forms concern); this - * form-free host has no form instance, so it renders as a form-less modal. - */ - public function getActionModalFormInstance(): mixed - { - return null; - } - /** Mounts a name that resolves to no action, then reads the modal config. */ public function peekGhostConfig(): void { @@ -340,6 +331,16 @@ public function render(): string ->assertSet('mountedActions.0.name', 'ghost'); }); +it('exposes null form-instance seams on a form-free host (the wire-forms bridge overrides them)', function () { + // A standalone wire-core host has no form runtime; the core seams return null + // so the action modal-host renders form-less instead of calling a bridge that + // does not exist. The wire-forms bridge overrides these via `insteadof`. + $host = new CoreActionsHost; + + expect($host->getActionModalFormInstance())->toBeNull() + ->and($host->getActionModalFormInstanceForDepth(0))->toBeNull(); +}); + it('carries a custom mobileBreakpoint into the core modal-host slide-over (regression: it was dropped)', function () { Livewire::test(CoreActionsHost::class) ->call('openModal', 'slideLeft') diff --git a/packages/core/tests/TestCase.php b/packages/core/tests/TestCase.php index 8cd0540a..14002bcb 100644 --- a/packages/core/tests/TestCase.php +++ b/packages/core/tests/TestCase.php @@ -5,7 +5,9 @@ namespace NyonCode\WireCore\Tests; use Livewire\LivewireServiceProvider; +use NyonCode\WireCore\Actions\Contracts\ModalFormFactory; use NyonCode\WireCore\WireCoreServiceProvider; +use NyonCode\WireForms\Forms\Support\FormModalFormFactory; use Orchestra\Testbench\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase @@ -23,6 +25,14 @@ protected function getEnvironmentSetUp($app): void $app['config']->set('app.key', 'base64:'.base64_encode(random_bytes(32))); $app['config']->set('database.default', 'testing'); $app['config']->set('database.connections.testing', static::testing_database_connection()); + + // Production wire-core does not depend on wire-forms — the action-modal + // form runtime is resolved through the ModalFormFactory seam, bound by + // WireFormsServiceProvider in a real app. The core suite's form-behavior + // tests exercise that integration against the real Form, so bind the + // factory here rather than booting the whole forms provider. + // (Graceful degradation when it is *unbound* is covered by ModalFormsTest.) + $app->singleton(ModalFormFactory::class, FormModalFormFactory::class); } /** diff --git a/packages/core/tests/Unit/Actions/ModalFormsTest.php b/packages/core/tests/Unit/Actions/ModalFormsTest.php new file mode 100644 index 00000000..65e32f06 --- /dev/null +++ b/packages/core/tests/Unit/Actions/ModalFormsTest.php @@ -0,0 +1,40 @@ +toBeInstanceOf(ModalFormFactory::class) + ->and(ModalForms::make([]))->toBeInstanceOf(ModalForm::class); +}); + +it('degrades to null when no form factory is bound (standalone wire-core)', function () { + app()->offsetUnset(ModalFormFactory::class); + + expect(ModalForms::factory())->toBeNull() + ->and(ModalForms::make([]))->toBeNull(); +}); + +it('degrades an action form modal to a form-less modal when the factory is unbound', function () { + app()->offsetUnset(ModalFormFactory::class); + + $action = Action::make('edit')->form([]); + + // The modal still opens (hasModal), it simply carries no form body — a + // standalone wire-core renders it as a confirmation/heading dialog. + expect($action->hasModal())->toBeTrue() + ->and($action->hasFormInstance())->toBeFalse() + ->and($action->getFormInstance())->toBeNull() + ->and($action->getStepFormInstance())->toBeNull(); +}); diff --git a/packages/forms/src/Concerns/InteractsWithActionForms.php b/packages/forms/src/Concerns/InteractsWithActionForms.php index 36962abd..ecbc4c77 100644 --- a/packages/forms/src/Concerns/InteractsWithActionForms.php +++ b/packages/forms/src/Concerns/InteractsWithActionForms.php @@ -106,13 +106,12 @@ protected function buildModalActionFormInstance(Action|BulkAction|HeaderAction $ $statePath = $this->actionFrameStatePath($depth); $context = $this->actionFormContext($depth, $context); - if ($action->hasMultipleSteps()) { - $step = (int) $this->getActionFrameState($depth, 'currentStep', 0); - - return $action->getStepFormInstance($this, $context, $step, $statePath); - } + $form = $action->hasMultipleSteps() + ? $action->getStepFormInstance($this, $context, (int) $this->getActionFrameState($depth, 'currentStep', 0), $statePath) + : $action->getFormInstance($this, $context, $statePath); - return $action->getFormInstance($this, $context, $statePath); + // Core hands back the ModalForm seam; this bridge owns the concrete Form. + return $form instanceof Form ? $form : null; } /** @@ -178,7 +177,8 @@ protected function validateMountedActionForm(): void // bound to the active frame's depth-scoped state path so error keys and // field bindings line up with the top modal. if ($this->actionModalFormInstance === null) { - $this->actionModalFormInstance = $action->getFormInstance($this, $context, $this->actionFrameStatePath($this->topActionFrameIndex())); + $form = $action->getFormInstance($this, $context, $this->actionFrameStatePath($this->topActionFrameIndex())); + $this->actionModalFormInstance = $form instanceof Form ? $form : null; } $this->actionModalFormInstance?->validate(); @@ -295,7 +295,8 @@ protected function resolveHaltModalForm(ActionHalt $halt): void { $formInstance = $halt->getFormInstance(); - if ($formInstance === null) { + // Core hands back the ModalForm seam; this bridge owns the concrete Form. + if (! $formInstance instanceof Form) { return; } diff --git a/packages/forms/src/Concerns/WithActions.php b/packages/forms/src/Concerns/WithActions.php index c3846357..21287480 100644 --- a/packages/forms/src/Concerns/WithActions.php +++ b/packages/forms/src/Concerns/WithActions.php @@ -49,6 +49,8 @@ trait WithActions use InteractsWithActionForms, InteractsWithActions { InteractsWithActionForms::validateMountedActionForm insteadof InteractsWithActions; InteractsWithActionForms::resolveHaltModalForm insteadof InteractsWithActions; + InteractsWithActionForms::getActionModalFormInstance insteadof InteractsWithActions; + InteractsWithActionForms::getActionModalFormInstanceForDepth insteadof InteractsWithActions; } use InteractsWithFieldActions; use InteractsWithFileUploads; diff --git a/packages/forms/src/Forms/Config/FormConfig.php b/packages/forms/src/Forms/Config/FormConfig.php index c38af920..f38a7dca 100644 --- a/packages/forms/src/Forms/Config/FormConfig.php +++ b/packages/forms/src/Forms/Config/FormConfig.php @@ -6,6 +6,7 @@ use Closure; use Illuminate\Database\Eloquent\Model; +use NyonCode\WireCore\Core\Plugin\Contracts\FormConfigContract; /** * Immutable form configuration. @@ -13,9 +14,10 @@ * Holds all configuration set via the fluent Form API. * Once constructed, values cannot be changed. * - * @internal This class is not part of the public API. + * @internal This class is not part of the public API; the form-save plugin + * hooks expose it through the {@see FormConfigContract} seam. */ -final class FormConfig +final class FormConfig implements FormConfigContract { /** * @param array $schema Schema components @@ -50,4 +52,9 @@ public function hasModel(): bool { return $this->model !== null; } + + public function getModel(): string|Model|null + { + return $this->model; + } } diff --git a/packages/forms/src/Forms/Form.php b/packages/forms/src/Forms/Form.php index 57c047e0..a013b36c 100644 --- a/packages/forms/src/Forms/Form.php +++ b/packages/forms/src/Forms/Form.php @@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Gate; use Livewire\Component; +use NyonCode\WireCore\Actions\Contracts\ModalForm; use NyonCode\WireCore\Foundation\Schema\Wizard; use NyonCode\WireForms\Forms\Config\ConfigBuilder; use NyonCode\WireForms\Forms\Config\FormConfig; @@ -25,7 +26,7 @@ * Internally delegates to ConfigBuilder (fluent accumulation), * FormRuntime (validate, save, state), and FormRenderer (Blade output). */ -class Form implements Htmlable +class Form implements Htmlable, ModalForm { private ConfigBuilder $configBuilder; diff --git a/packages/forms/src/Forms/Support/FormModalFormFactory.php b/packages/forms/src/Forms/Support/FormModalFormFactory.php new file mode 100644 index 00000000..336d5704 --- /dev/null +++ b/packages/forms/src/Forms/Support/FormModalFormFactory.php @@ -0,0 +1,25 @@ +schema($schema); + } +} diff --git a/packages/forms/src/WireFormsServiceProvider.php b/packages/forms/src/WireFormsServiceProvider.php index 7ba8b6ff..631a63c7 100644 --- a/packages/forms/src/WireFormsServiceProvider.php +++ b/packages/forms/src/WireFormsServiceProvider.php @@ -9,7 +9,9 @@ use NyonCode\LaravelPackageToolkit\Commands\InstallCommand; use NyonCode\LaravelPackageToolkit\Packager; use NyonCode\LaravelPackageToolkit\PackageServiceProvider; +use NyonCode\WireCore\Actions\Contracts\ModalFormFactory; use NyonCode\WireForms\Forms\Form; +use NyonCode\WireForms\Forms\Support\FormModalFormFactory; use NyonCode\WireForms\Integration\ActionMacros; use Symfony\Component\HttpFoundation\BinaryFileResponse; @@ -28,6 +30,9 @@ public function configure(Packager $packager): void ->hasShortName('wire-forms') ->registeredPackage(function ($packager) { $this->app->bind(Form::class, fn () => new Form); + // wire-core resolves this to build action-modal forms without + // naming Form (keeps the core → forms dependency inverted-free). + $this->app->singleton(ModalFormFactory::class, FormModalFormFactory::class); }) ->bootedPackage(function ($packager) { Blade::componentNamespace('NyonCode\\WireForms\\Components', 'wire-forms'); diff --git a/packages/forms/tests/Unit/Config/FormConfigTest.php b/packages/forms/tests/Unit/Config/FormConfigTest.php index 9feef7e3..1b42c894 100644 --- a/packages/forms/tests/Unit/Config/FormConfigTest.php +++ b/packages/forms/tests/Unit/Config/FormConfigTest.php @@ -43,3 +43,11 @@ expect($config->hasModel())->toBeFalse(); }); + +test('getModel returns the bound model for the FormConfigContract seam', function () { + $model = Mockery::mock(Model::class); + + expect((new FormConfig(model: 'App\\Models\\User'))->getModel())->toBe('App\\Models\\User') + ->and((new FormConfig(model: $model))->getModel())->toBe($model) + ->and((new FormConfig(model: null))->getModel())->toBeNull(); +}); diff --git a/packages/table/src/Concerns/WithTable.php b/packages/table/src/Concerns/WithTable.php index 7719c2a6..7ae11451 100644 --- a/packages/table/src/Concerns/WithTable.php +++ b/packages/table/src/Concerns/WithTable.php @@ -81,6 +81,8 @@ trait WithTable use InteractsWithActionForms, InteractsWithActions, InteractsWithTableActions { InteractsWithActionForms::validateMountedActionForm insteadof InteractsWithActions; InteractsWithActionForms::resolveHaltModalForm insteadof InteractsWithActions; + InteractsWithActionForms::getActionModalFormInstance insteadof InteractsWithActions; + InteractsWithActionForms::getActionModalFormInstanceForDepth insteadof InteractsWithActions; InteractsWithTableActions::haltModalFormStatePath insteadof InteractsWithActionForms; InteractsWithTableActions::afterActionExecuted insteadof InteractsWithActions; InteractsWithTableActions::resolveActionRecordIds insteadof InteractsWithActions; From c289dc8186b61f77b2f9b9827ed413cc222e9316 Mon Sep 17 00:00:00 2001 From: ondrejnyklicek Date: Sat, 25 Jul 2026 08:50:54 +0200 Subject: [PATCH 02/74] Upgrade TipTap to v3 Migrate the wire-forms editor bundle from TipTap v2 to v3: - StarterKit v3 now bundles Link and Underline, so drop the standalone imports and configure Link through StarterKit.configure({ link }) to avoid duplicate-extension registration. - setContent's second argument is now an options object; pass { emitUpdate: false } so a server-driven fill no longer echoes back into Livewire (a bare false would fall through to emitUpdate: true). - @tiptap/extension-table dropped its default export in v3; switch the addon chunk to the named { Table } import. Rebuild the ESM code-split dist and extend the browser driver with v3 regression checks: bold/underline/heading via StarterKit and a duplicate-extension console-warning guard. --- package-lock.json | 8964 ++++++++--------- package.json | 34 +- packages/forms/dist/tiptap/chunk-72BVZGAJ.js | 104 + packages/forms/dist/tiptap/chunk-CFHSZ3VY.js | 89 - .../forms/dist/tiptap/tiptap-editor-addons.js | 16 +- packages/forms/dist/tiptap/tiptap-editor.js | 44 +- .../resources/js/tiptap-editor-addons.js | 4 +- packages/forms/resources/js/tiptap-editor.js | 23 +- workbench/scripts/verify-tiptap-split.mjs | 39 +- 9 files changed, 4628 insertions(+), 4689 deletions(-) create mode 100644 packages/forms/dist/tiptap/chunk-72BVZGAJ.js delete mode 100644 packages/forms/dist/tiptap/chunk-CFHSZ3VY.js diff --git a/package-lock.json b/package-lock.json index adc0010c..3784398f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,4570 +1,4402 @@ { - "name": "wire-preview-workbench", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "wire-preview-workbench", - "dependencies": { - "@floating-ui/dom": "^1.7.6", - "@tiptap/core": "^2.0", - "@tiptap/extension-character-count": "^2.0", - "@tiptap/extension-highlight": "^2.0", - "@tiptap/extension-image": "^2.0", - "@tiptap/extension-link": "^2.0", - "@tiptap/extension-placeholder": "^2.0", - "@tiptap/extension-table": "^2.0", - "@tiptap/extension-table-cell": "^2.0", - "@tiptap/extension-table-header": "^2.0", - "@tiptap/extension-table-row": "^2.0", - "@tiptap/extension-text-align": "^2.0", - "@tiptap/extension-underline": "^2.0", - "@tiptap/starter-kit": "^2.0" - }, - "devDependencies": { - "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/vite": "^4.1.8", - "@torchlight-api/torchlight-cli": "^0.1.7", - "esbuild": "^0.27.0", - "laravel-vite-plugin": "^2.0.1", - "patch-package": "^8.0.1", - "tailwindcss": "^4.1.8", - "vite": "^7.1.3" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", - "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", - "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", - "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", - "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", - "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", - "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", - "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", - "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", - "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", - "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", - "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", - "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", - "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", - "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", - "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", - "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", - "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", - "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", - "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", - "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", - "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", - "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", - "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", - "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", - "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", - "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@floating-ui/core": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz", - "integrity": "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==", - "license": "MIT", - "dependencies": { - "@floating-ui/utils": "^0.2.11" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz", - "integrity": "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==", - "license": "MIT", - "dependencies": { - "@floating-ui/core": "^1.7.5", - "@floating-ui/utils": "^0.2.11" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz", - "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==", - "license": "MIT" - }, - "node_modules/@inquirer/external-editor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", - "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chardet": "^2.1.1", - "iconv-lite": "^0.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } - } - }, - "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@remirror/core-constants": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-3.0.0.tgz", - "integrity": "sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==", - "license": "MIT" - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.4.tgz", - "integrity": "sha512-F5QXMSiFebS9hKZj02XhWLLnRpJ3B3AROP0tWbFBSj+6kCbg5m9j5JoHKd4mmSVy5mS/IMQloYgYxCuJC0fxEQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.4.tgz", - "integrity": "sha512-GxxTKApUpzRhof7poWvCJHRF51C67u1R7D6DiluBE8wKU1u5GWE8t+v81JvJYtbawoBFX1hLv5Ei4eVjkWokaw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz", - "integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.4.tgz", - "integrity": "sha512-CSKq7MsP+5PFIcydhAiR1K0UhEI1A2jWXVKHPCBZ151yOutENwvnPocgVHkivu2kviURtCEB6zUQw0vs8RrhMg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.4.tgz", - "integrity": "sha512-+O8OkVdyvXMtJEciu2wS/pzm1IxntEEQx3z5TAVy4l32G0etZn+RsA48ARRrFm6Ri8fvqPQfgrvNxSjKAbnd3g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.4.tgz", - "integrity": "sha512-Iw3oMskH3AfNuhU0MSN7vNbdi4me/NiYo2azqPz/Le16zHSa+3RRmliCMWWQmh4lcndccU40xcJuTYJZxNo/lw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.4.tgz", - "integrity": "sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.4.tgz", - "integrity": "sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.4.tgz", - "integrity": "sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.4.tgz", - "integrity": "sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.4.tgz", - "integrity": "sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.4.tgz", - "integrity": "sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.4.tgz", - "integrity": "sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.4.tgz", - "integrity": "sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.4.tgz", - "integrity": "sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.4.tgz", - "integrity": "sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.4.tgz", - "integrity": "sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.4.tgz", - "integrity": "sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.4.tgz", - "integrity": "sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.4.tgz", - "integrity": "sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.4.tgz", - "integrity": "sha512-IPOsh5aRYuLv/nkU51X10Bf75Bsf6+gZdx1X+QP5QM6lIJFHHqbHLG0uJn/hWthzo13UAc2umiUorqZy3axoZg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.4.tgz", - "integrity": "sha512-4QzE9E81OohJ/HKzHhsqU+zcYYojVOXlFMs1DdyMT6qXl/niOH7AVElmmEdUNHHS/oRkc++d5k6Vy85zFs0DEw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.4.tgz", - "integrity": "sha512-zTPgT1YuHHcd+Tmx7h8aml0FWFVelV5N54oHow9SLj+GfoDy/huQ+UV396N/C7KpMDMiPspRktzM1/0r1usYEA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.4.tgz", - "integrity": "sha512-DRS4G7mi9lJxqEDezIkKCaUIKCrLUUDCUaCsTPCi/rtqaC6D/jjwslMQyiDU50Ka0JKpeXeRBFBAXwArY52vBw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.4.tgz", - "integrity": "sha512-QVTUovf40zgTqlFVrKA1uXMVvU2QWEFWfAH8Wdc48IxLvrJMQVMBRjuQyUpzZCDkakImib9eVazbWlC6ksWtJw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@tailwindcss/forms": { - "version": "0.5.11", - "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.11.tgz", - "integrity": "sha512-h9wegbZDPurxG22xZSoWtdzc41/OlNEUQERNqI/0fOwa2aVlWGu7C35E/x6LDyD3lgtztFSSjKZyuVM0hxhbgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mini-svg-data-uri": "^1.2.3" - }, - "peerDependencies": { - "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" - } - }, - "node_modules/@tailwindcss/node": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.0.tgz", - "integrity": "sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.5", - "enhanced-resolve": "^5.21.0", - "jiti": "^2.6.1", - "lightningcss": "1.32.0", - "magic-string": "^0.30.21", - "source-map-js": "^1.2.1", - "tailwindcss": "4.3.0" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.0.tgz", - "integrity": "sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.3.0", - "@tailwindcss/oxide-darwin-arm64": "4.3.0", - "@tailwindcss/oxide-darwin-x64": "4.3.0", - "@tailwindcss/oxide-freebsd-x64": "4.3.0", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.0", - "@tailwindcss/oxide-linux-arm64-gnu": "4.3.0", - "@tailwindcss/oxide-linux-arm64-musl": "4.3.0", - "@tailwindcss/oxide-linux-x64-gnu": "4.3.0", - "@tailwindcss/oxide-linux-x64-musl": "4.3.0", - "@tailwindcss/oxide-wasm32-wasi": "4.3.0", - "@tailwindcss/oxide-win32-arm64-msvc": "4.3.0", - "@tailwindcss/oxide-win32-x64-msvc": "4.3.0" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.0.tgz", - "integrity": "sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.0.tgz", - "integrity": "sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.0.tgz", - "integrity": "sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.0.tgz", - "integrity": "sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.0.tgz", - "integrity": "sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.0.tgz", - "integrity": "sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.0.tgz", - "integrity": "sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.0.tgz", - "integrity": "sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.0.tgz", - "integrity": "sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.0.tgz", - "integrity": "sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.10.0", - "@emnapi/runtime": "^1.10.0", - "@emnapi/wasi-threads": "^1.2.1", - "@napi-rs/wasm-runtime": "^1.1.4", - "@tybys/wasm-util": "^0.10.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.0.tgz", - "integrity": "sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.0.tgz", - "integrity": "sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/vite": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.0.tgz", - "integrity": "sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tailwindcss/node": "4.3.0", - "@tailwindcss/oxide": "4.3.0", - "tailwindcss": "4.3.0" - }, - "peerDependencies": { - "vite": "^5.2.0 || ^6 || ^7 || ^8" - } - }, - "node_modules/@tiptap/core": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.27.2.tgz", - "integrity": "sha512-ABL1N6eoxzDzC1bYvkMbvyexHacszsKdVPYqhl5GwHLOvpZcv9VE9QaKwDILTyz5voCA0lGcAAXZp+qnXOk5lQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-blockquote": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.27.2.tgz", - "integrity": "sha512-oIGZgiAeA4tG3YxbTDfrmENL4/CIwGuP3THtHsNhwRqwsl9SfMk58Ucopi2GXTQSdYXpRJ0ahE6nPqB5D6j/Zw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-bold": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.27.2.tgz", - "integrity": "sha512-bR7J5IwjCGQ0s3CIxyMvOCnMFMzIvsc5OVZKscTN5UkXzFsaY6muUAIqtKxayBUucjtUskm5qZowJITCeCb1/A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-bullet-list": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.27.2.tgz", - "integrity": "sha512-gmFuKi97u5f8uFc/GQs+zmezjiulZmFiDYTh3trVoLRoc2SAHOjGEB7qxdx7dsqmMN7gwiAWAEVurLKIi1lnnw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-character-count": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-2.27.2.tgz", - "integrity": "sha512-EcQRIvbLbMDDzo7uFqXYgh1CfgedS9sYX4BllktY2OlXLPdNpwo9t8WMK/a7soESNv0Le3WZ5pNvnNhv7Z2YdA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-code": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.27.2.tgz", - "integrity": "sha512-7X9AgwqiIGXoZX7uvdHQsGsjILnN/JaEVtqfXZnPECzKGaWHeK/Ao4sYvIIIffsyZJA8k5DC7ny2/0sAgr2TuA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-code-block": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.27.2.tgz", - "integrity": "sha512-KgvdQHS4jXr79aU3wZOGBIZYYl9vCB7uDEuRFV4so2rYrfmiYMw3T8bTnlNEEGe4RUeAms1i4fdwwvQp9nR1Dw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-document": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.27.2.tgz", - "integrity": "sha512-CFhAYsPnyYnosDC4639sCJnBUnYH4Cat9qH5NZWHVvdgtDwu8GZgZn2eSzaKSYXWH1vJ9DSlCK+7UyC3SNXIBA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-dropcursor": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.27.2.tgz", - "integrity": "sha512-oEu/OrktNoQXq1x29NnH/GOIzQZm8ieTQl3FK27nxfBPA89cNoH4mFEUmBL5/OFIENIjiYG3qWpg6voIqzswNw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-gapcursor": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.27.2.tgz", - "integrity": "sha512-/c9VF1HBxj+AP54XGVgCmD9bEGYc5w5OofYCFQgM7l7PB1J00A4vOke0oPkHJnqnOOyPlFaxO/7N6l3XwFcnKA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-hard-break": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.27.2.tgz", - "integrity": "sha512-kSRVGKlCYK6AGR0h8xRkk0WOFGXHIIndod3GKgWU49APuIGDiXd8sziXsSlniUsWmqgDmDXcNnSzPcV7AQ8YNg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-heading": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.27.2.tgz", - "integrity": "sha512-iM3yeRWuuQR/IRQ1djwNooJGfn9Jts9zF43qZIUf+U2NY8IlvdNsk2wTOdBgh6E0CamrStPxYGuln3ZS4fuglw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-highlight": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-2.27.2.tgz", - "integrity": "sha512-ZjlktDdMjruMJFAVz0TbQf0v92Jqkc7Ri1iZJqBXuLid+r+GxUzl2CVAV7qq5yagkGQgvAG+WGsMk880HgR3MA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-history": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.27.2.tgz", - "integrity": "sha512-+hSyqERoFNTWPiZx4/FCyZ/0eFqB9fuMdTB4AC/q9iwu3RNWAQtlsJg5230bf/qmyO6bZxRUc0k8p4hrV6ybAw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-horizontal-rule": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.27.2.tgz", - "integrity": "sha512-WGWUSgX+jCsbtf9Y9OCUUgRZYuwjVoieW5n6mAUohJ9/6gc6sGIOrUpBShf+HHo6WD+gtQjRd+PssmX3NPWMpg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-image": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.27.2.tgz", - "integrity": "sha512-5zL/BY41FIt72azVrCrv3n+2YJ/JyO8wxCcA4Dk1eXIobcgVyIdo4rG39gCqIOiqziAsqnqoj12QHTBtHsJ6mQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-italic": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.27.2.tgz", - "integrity": "sha512-1OFsw2SZqfaqx5Fa5v90iNlPRcqyt+lVSjBwTDzuPxTPFY4Q0mL89mKgkq2gVHYNCiaRkXvFLDxaSvBWbmthgg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-link": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-2.27.2.tgz", - "integrity": "sha512-bnP61qkr0Kj9Cgnop1hxn2zbOCBzNtmawxr92bVTOE31fJv6FhtCnQiD6tuPQVGMYhcmAj7eihtvuEMFfqEPcQ==", - "license": "MIT", - "dependencies": { - "linkifyjs": "^4.3.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-list-item": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.27.2.tgz", - "integrity": "sha512-eJNee7IEGXMnmygM5SdMGDC8m/lMWmwNGf9fPCK6xk0NxuQRgmZHL6uApKcdH6gyNcRPHCqvTTkhEP7pbny/fg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-ordered-list": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.27.2.tgz", - "integrity": "sha512-M7A4tLGJcLPYdLC4CI2Gwl8LOrENQW59u3cMVa+KkwG1hzSJyPsbDpa1DI6oXPC2WtYiTf22zrbq3gVvH+KA2w==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-paragraph": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.27.2.tgz", - "integrity": "sha512-elYVn2wHJJ+zB9LESENWOAfI4TNT0jqEN34sMA/hCtA4im1ZG2DdLHwkHIshj/c4H0dzQhmsS/YmNC5Vbqab/A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-placeholder": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.27.2.tgz", - "integrity": "sha512-IjsgSVYJRjpAKmIoapU0E2R4E2FPY3kpvU7/1i7PUYisylqejSJxmtJPGYw0FOMQY9oxnEEvfZHMBA610tqKpg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-strike": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.27.2.tgz", - "integrity": "sha512-HHIjhafLhS2lHgfAsCwC1okqMsQzR4/mkGDm4M583Yftyjri1TNA7lzhzXWRFWiiMfJxKtdjHjUAQaHuteRTZw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.27.2.tgz", - "integrity": "sha512-pDbhOpT5phZkcsyPjGBQlXv0+0hmdrvqHJ+dJjkGcCtlfy2pHiEIhmIItOFagc7wXy8G9iUFZ9Jie4zvDf+brg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table-cell": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.27.2.tgz", - "integrity": "sha512-9Lk46MjZMFzVZfOj9Kd7VgC6Odt6vmEhlCYVumErShUY7EkFqCw3b2IYoUtQkntfOEx/Afnhff/okNQwPsJeUA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table-header": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.27.2.tgz", - "integrity": "sha512-ZEb6lbG0NbbodWLV0b4BS/QrDIPlUbCcuOsUxzqVvlMUY1Vg6Fj6fKwLaBcsIUDHi8sxZDBEgYEDw3BR/zcO6A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table-row": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.27.2.tgz", - "integrity": "sha512-Nw9+tA56Y5HtLVP01NGCZSUuTQhJPtfK9OfmDgGgcxynn2cRVdEtj+9FNZqRhQ1iRVaAI+Rd4xRvX9qYePMOxw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-text": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.27.2.tgz", - "integrity": "sha512-Xk7nYcigljAY0GO9hAQpZ65ZCxqOqaAlTPDFcKerXmlkQZP/8ndx95OgUb1Xf63kmPOh3xypurGS2is3v0MXSA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-text-align": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.27.2.tgz", - "integrity": "sha512-0Pyks6Hu+Q/+9+5/osoSv0SP6jIerdWMYbi13aaZLsJoj3lBj5WNaE11JtAwSFN5sx0IbqhDSlp1zkvRnzgZ8g==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-text-style": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.27.2.tgz", - "integrity": "sha512-Omk+uxjJLyEY69KStpCw5fA9asvV+MGcAX2HOxyISDFoLaL49TMrNjhGAuz09P1L1b0KGXo4ml7Q3v/Lfy4WPA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-underline": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.27.2.tgz", - "integrity": "sha512-gPOsbAcw1S07ezpAISwoO8f0RxpjcSH7VsHEFDVuXm4ODE32nhvSinvHQjv2icRLOXev+bnA7oIBu7Oy859gWQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/pm": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.27.2.tgz", - "integrity": "sha512-kaEg7BfiJPDQMKbjVIzEPO3wlcA+pZb2tlcK9gPrdDnEFaec2QTF1sXz2ak2IIb2curvnIrQ4yrfHgLlVA72wA==", - "license": "MIT", - "dependencies": { - "prosemirror-changeset": "^2.3.0", - "prosemirror-collab": "^1.3.1", - "prosemirror-commands": "^1.6.2", - "prosemirror-dropcursor": "^1.8.1", - "prosemirror-gapcursor": "^1.3.2", - "prosemirror-history": "^1.4.1", - "prosemirror-inputrules": "^1.4.0", - "prosemirror-keymap": "^1.2.2", - "prosemirror-markdown": "^1.13.1", - "prosemirror-menu": "^1.2.4", - "prosemirror-model": "^1.23.0", - "prosemirror-schema-basic": "^1.2.3", - "prosemirror-schema-list": "^1.4.1", - "prosemirror-state": "^1.4.3", - "prosemirror-tables": "^1.6.4", - "prosemirror-trailing-node": "^3.0.0", - "prosemirror-transform": "^1.10.2", - "prosemirror-view": "^1.37.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - } - }, - "node_modules/@tiptap/starter-kit": { - "version": "2.27.2", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.27.2.tgz", - "integrity": "sha512-bb0gJvPoDuyRUQ/iuN52j1//EtWWttw+RXAv1uJxfR0uKf8X7uAqzaOOgwjknoCIDC97+1YHwpGdnRjpDkOBxw==", - "license": "MIT", - "dependencies": { - "@tiptap/core": "^2.27.2", - "@tiptap/extension-blockquote": "^2.27.2", - "@tiptap/extension-bold": "^2.27.2", - "@tiptap/extension-bullet-list": "^2.27.2", - "@tiptap/extension-code": "^2.27.2", - "@tiptap/extension-code-block": "^2.27.2", - "@tiptap/extension-document": "^2.27.2", - "@tiptap/extension-dropcursor": "^2.27.2", - "@tiptap/extension-gapcursor": "^2.27.2", - "@tiptap/extension-hard-break": "^2.27.2", - "@tiptap/extension-heading": "^2.27.2", - "@tiptap/extension-history": "^2.27.2", - "@tiptap/extension-horizontal-rule": "^2.27.2", - "@tiptap/extension-italic": "^2.27.2", - "@tiptap/extension-list-item": "^2.27.2", - "@tiptap/extension-ordered-list": "^2.27.2", - "@tiptap/extension-paragraph": "^2.27.2", - "@tiptap/extension-strike": "^2.27.2", - "@tiptap/extension-text": "^2.27.2", - "@tiptap/extension-text-style": "^2.27.2", - "@tiptap/pm": "^2.27.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - } - }, - "node_modules/@torchlight-api/torchlight-cli": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@torchlight-api/torchlight-cli/-/torchlight-cli-0.1.7.tgz", - "integrity": "sha512-sHph49Nx/VfzwDsb43v6AQIDZQa/YQ1LtGKTmN/rEBJoW0ctMXUQUJ1c75rNQ/1n2rYLbQLf7s008/jgLvkEDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "axios": "^0.21.1", - "chalk": "^4.1.2", - "cheerio": "^1.0.0-rc.10", - "chokidar": "^3.5.2", - "commander": "^8.1.0", - "fs-extra": "^10.0.0", - "inquirer": "^8.1.2", - "lodash.chunk": "^4.2.0", - "lodash.get": "^4.4.2", - "md5": "^2.3.0" - }, - "bin": { - "torchlight": "dist/bin/torchlight.cjs.js" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", - "license": "MIT" - }, - "node_modules/@types/markdown-it": { - "version": "14.1.2", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", - "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", - "license": "MIT", - "dependencies": { - "@types/linkify-it": "^5", - "@types/mdurl": "^2" - } - }, - "node_modules/@types/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", - "license": "MIT" - }, - "node_modules/@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true, - "license": "ISC" - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/call-bind": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", - "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chardet": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", - "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "node_modules/cheerio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", - "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.1", - "htmlparser2": "^10.1.0", - "parse5": "^7.3.0", - "parse5-htmlparser2-tree-adapter": "^7.1.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^7.19.0", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=20.18.1" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 10" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/crelt": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", - "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "node_modules/css-select": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", - "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", - "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/encoding-sniffer": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", - "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" - }, - "funding": { - "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.22.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.22.0.tgz", - "integrity": "sha512-xYcDWrpELkFzz9SpZ3PlI6Eu6eD93Yf0WLDRxikGhWJ3MAir2SNZTIVCVZqZ/NUyx8AdMc2gT9C0gPiw18kG+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.3.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", - "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.7", - "@esbuild/android-arm": "0.27.7", - "@esbuild/android-arm64": "0.27.7", - "@esbuild/android-x64": "0.27.7", - "@esbuild/darwin-arm64": "0.27.7", - "@esbuild/darwin-x64": "0.27.7", - "@esbuild/freebsd-arm64": "0.27.7", - "@esbuild/freebsd-x64": "0.27.7", - "@esbuild/linux-arm": "0.27.7", - "@esbuild/linux-arm64": "0.27.7", - "@esbuild/linux-ia32": "0.27.7", - "@esbuild/linux-loong64": "0.27.7", - "@esbuild/linux-mips64el": "0.27.7", - "@esbuild/linux-ppc64": "0.27.7", - "@esbuild/linux-riscv64": "0.27.7", - "@esbuild/linux-s390x": "0.27.7", - "@esbuild/linux-x64": "0.27.7", - "@esbuild/netbsd-arm64": "0.27.7", - "@esbuild/netbsd-x64": "0.27.7", - "@esbuild/openbsd-arm64": "0.27.7", - "@esbuild/openbsd-x64": "0.27.7", - "@esbuild/openharmony-arm64": "0.27.7", - "@esbuild/sunos-x64": "0.27.7", - "@esbuild/win32-arm64": "0.27.7", - "@esbuild/win32-ia32": "0.27.7", - "@esbuild/win32-x64": "0.27.7" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "micromatch": "^4.0.2" - } - }, - "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/htmlparser2": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", - "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "entities": "^7.0.1" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", - "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/inquirer": { - "version": "8.2.7", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz", - "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@inquirer/external-editor": "^1.0.0", - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^6.0.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/jiti": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", - "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/json-stable-stringify": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.3.0.tgz", - "integrity": "sha512-qtYiSSFlwot9XHtF9bD9c7rwKjr+RecWT//ZnPvSmEjpV5mmPOCN4j8UjY5hbjNkOwZ/jQv3J6R1/pL7RwgMsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "isarray": "^2.0.5", - "jsonify": "^0.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/jsonfile": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", - "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true, - "license": "Public Domain", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.11" - } - }, - "node_modules/laravel-vite-plugin": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-2.1.0.tgz", - "integrity": "sha512-z+ck2BSV6KWtYcoIzk9Y5+p4NEjqM+Y4i8/H+VZRLq0OgNjW2DqyADquwYu5j8qRvaXwzNmfCWl1KrMlV1zpsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "picocolors": "^1.0.0", - "vite-plugin-full-reload": "^1.1.0" - }, - "bin": { - "clean-orphaned-assets": "bin/clean.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "vite": "^7.0.0" - } - }, - "node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/linkify-it": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.1.tgz", - "integrity": "sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/linkifyjs": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.3.3.tgz", - "integrity": "sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg==", - "license": "MIT" - }, - "node_modules/lodash": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", - "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.chunk": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", - "integrity": "sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/markdown-it": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.2.0.tgz", - "integrity": "sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.1", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/md5": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "~1.1.6" - } - }, - "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/mini-svg-data-uri": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", - "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", - "dev": true, - "license": "MIT", - "bin": { - "mini-svg-data-uri": "cli.js" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true, - "license": "ISC" - }, - "node_modules/nanoid": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/orderedmap": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz", - "integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==", - "license": "MIT" - }, - "node_modules/parse5": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", - "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^6.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", - "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.3", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-parser-stream": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", - "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5/node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/patch-package": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.1.tgz", - "integrity": "sha512-VsKRIA8f5uqHQ7NGhwIna6Bx6D9s/1iXlA1hthBVBEbkq+t4kXD0HHt+rJhf/Z+Ci0F/HCB2hvn0qLdLG+Qxlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "ci-info": "^3.7.0", - "cross-spawn": "^7.0.3", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^10.0.0", - "json-stable-stringify": "^1.0.2", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "semver": "^7.5.3", - "slash": "^2.0.0", - "tmp": "^0.2.4", - "yaml": "^2.2.2" - }, - "bin": { - "patch-package": "index.js" - }, - "engines": { - "node": ">=14", - "npm": ">5" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.12", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prosemirror-changeset": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.4.1.tgz", - "integrity": "sha512-96WBLhOaYhJ+kPhLg3uW359Tz6I/MfcrQfL4EGv4SrcqKEMC1gmoGrXHecPE8eOwTVCJ4IwgfzM8fFad25wNfw==", - "license": "MIT", - "dependencies": { - "prosemirror-transform": "^1.0.0" - } - }, - "node_modules/prosemirror-collab": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz", - "integrity": "sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0" - } - }, - "node_modules/prosemirror-commands": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.1.tgz", - "integrity": "sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.10.2" - } - }, - "node_modules/prosemirror-dropcursor": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.2.tgz", - "integrity": "sha512-CCk6Gyx9+Tt2sbYk5NK0nB1ukHi2ryaRgadV/LvyNuO3ena1payM2z6Cg0vO1ebK8cxbzo41ku2DE5Axj1Zuiw==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.1.0", - "prosemirror-view": "^1.1.0" - } - }, - "node_modules/prosemirror-gapcursor": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.4.1.tgz", - "integrity": "sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==", - "license": "MIT", - "dependencies": { - "prosemirror-keymap": "^1.0.0", - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-view": "^1.0.0" - } - }, - "node_modules/prosemirror-history": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.5.0.tgz", - "integrity": "sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.2.2", - "prosemirror-transform": "^1.0.0", - "prosemirror-view": "^1.31.0", - "rope-sequence": "^1.3.0" - } - }, - "node_modules/prosemirror-inputrules": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.1.tgz", - "integrity": "sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" - } - }, - "node_modules/prosemirror-keymap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.3.tgz", - "integrity": "sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "w3c-keyname": "^2.2.0" - } - }, - "node_modules/prosemirror-markdown": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.4.tgz", - "integrity": "sha512-D98dm4cQ3Hs6EmjK500TdAOew4Z03EV71ajEFiWra3Upr7diytJsjF4mPV2dW+eK5uNectiRj0xFxYI9NLXDbw==", - "license": "MIT", - "dependencies": { - "@types/markdown-it": "^14.0.0", - "markdown-it": "^14.0.0", - "prosemirror-model": "^1.25.0" - } - }, - "node_modules/prosemirror-menu": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.3.2.tgz", - "integrity": "sha512-6VgUJTYod0nMBlCaYJGhXGLu7Gt4AvcwcOq0YfJCY/6Uh+3S7UsWhpy6rJFCBFOmonq1hD8KyWOtZhkppd4YPg==", - "license": "MIT", - "dependencies": { - "crelt": "^1.0.0", - "prosemirror-commands": "^1.0.0", - "prosemirror-history": "^1.0.0", - "prosemirror-state": "^1.0.0" - } - }, - "node_modules/prosemirror-model": { - "version": "1.25.7", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.7.tgz", - "integrity": "sha512-A79aN8QEFUwI6cax8Yq4Rpcx1TJZ3Kagn+ii7qLo4/V8H3mMiHrhFyhTyHHvpSnOgMPpWiDGSwM3etwrxE50ug==", - "license": "MIT", - "dependencies": { - "orderedmap": "^2.0.0" - } - }, - "node_modules/prosemirror-schema-basic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.4.tgz", - "integrity": "sha512-ELxP4TlX3yr2v5rM7Sb70SqStq5NvI15c0j9j/gjsrO5vaw+fnnpovCLEGIcpeGfifkuqJwl4fon6b+KdrODYQ==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.25.0" - } - }, - "node_modules/prosemirror-schema-list": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", - "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.7.3" - } - }, - "node_modules/prosemirror-state": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.4.tgz", - "integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-transform": "^1.0.0", - "prosemirror-view": "^1.27.0" - } - }, - "node_modules/prosemirror-tables": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.5.tgz", - "integrity": "sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==", - "license": "MIT", - "dependencies": { - "prosemirror-keymap": "^1.2.3", - "prosemirror-model": "^1.25.4", - "prosemirror-state": "^1.4.4", - "prosemirror-transform": "^1.10.5", - "prosemirror-view": "^1.41.4" - } - }, - "node_modules/prosemirror-trailing-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/prosemirror-trailing-node/-/prosemirror-trailing-node-3.0.0.tgz", - "integrity": "sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==", - "license": "MIT", - "dependencies": { - "@remirror/core-constants": "3.0.0", - "escape-string-regexp": "^4.0.0" - }, - "peerDependencies": { - "prosemirror-model": "^1.22.1", - "prosemirror-state": "^1.4.2", - "prosemirror-view": "^1.33.8" - } - }, - "node_modules/prosemirror-transform": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.12.0.tgz", - "integrity": "sha512-GxboyN4AMIsoHNtz5uf2r2Ru551i5hWeCMD6E2Ib4Eogqoub0NflniaBPVQ4MrGE5yZ8JV9tUHg9qcZTTrcN4w==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.21.0" - } - }, - "node_modules/prosemirror-view": { - "version": "1.41.8", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.41.8.tgz", - "integrity": "sha512-TnKDdohEatgyZNGCDWIdccOHXhYloJwbwU+phw/a23KBvJIR9lWQWW7WHHK3vBdOLDNuF7TaX98GObUZOWkOnA==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.20.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.1.0" - } - }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/readdirp/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/rollup": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.4.tgz", - "integrity": "sha512-WHeFSbZYsPu3+bLoNRUuAO+wavNlocOPf3wSHTP7hcFKVnJeWsYlCDbr3mTS14FCizf9ccIxXA8sGL8zKeQN3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.60.4", - "@rollup/rollup-android-arm64": "4.60.4", - "@rollup/rollup-darwin-arm64": "4.60.4", - "@rollup/rollup-darwin-x64": "4.60.4", - "@rollup/rollup-freebsd-arm64": "4.60.4", - "@rollup/rollup-freebsd-x64": "4.60.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.60.4", - "@rollup/rollup-linux-arm-musleabihf": "4.60.4", - "@rollup/rollup-linux-arm64-gnu": "4.60.4", - "@rollup/rollup-linux-arm64-musl": "4.60.4", - "@rollup/rollup-linux-loong64-gnu": "4.60.4", - "@rollup/rollup-linux-loong64-musl": "4.60.4", - "@rollup/rollup-linux-ppc64-gnu": "4.60.4", - "@rollup/rollup-linux-ppc64-musl": "4.60.4", - "@rollup/rollup-linux-riscv64-gnu": "4.60.4", - "@rollup/rollup-linux-riscv64-musl": "4.60.4", - "@rollup/rollup-linux-s390x-gnu": "4.60.4", - "@rollup/rollup-linux-x64-gnu": "4.60.4", - "@rollup/rollup-linux-x64-musl": "4.60.4", - "@rollup/rollup-openbsd-x64": "4.60.4", - "@rollup/rollup-openharmony-arm64": "4.60.4", - "@rollup/rollup-win32-arm64-msvc": "4.60.4", - "@rollup/rollup-win32-ia32-msvc": "4.60.4", - "@rollup/rollup-win32-x64-gnu": "4.60.4", - "@rollup/rollup-win32-x64-msvc": "4.60.4", - "fsevents": "~2.3.2" - } - }, - "node_modules/rope-sequence": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz", - "integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==", - "license": "MIT" - }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/rxjs": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tailwindcss": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.0.tgz", - "integrity": "sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/tapable": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", - "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", - "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tmp": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz", - "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.14" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "license": "MIT" - }, - "node_modules/undici": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.26.0.tgz", - "integrity": "sha512-3O9Tf67pGhgOv9jM35AbhkXAKi13f3oy3aE4CSgr+TckGeY+/iu97ZXN+J7DpHPzLbVApFd1IFhcnBjREYXYcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/vite": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.3.tgz", - "integrity": "sha512-/4XH147Ui7OGTjg3HbdWe5arnZQSbfuRzdr9Ec7TQi5I7R+ir0Rlc9GIvD4v0XZurELqA035KVXJXpR61xhiTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.27.0", - "fdir": "^6.5.0", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.43.0", - "tinyglobby": "^0.2.15" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "lightningcss": "^1.21.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true + "name": "wire-preview-workbench", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "wire-preview-workbench", + "hasInstallScript": true, + "dependencies": { + "@floating-ui/dom": "^1.8", + "@tiptap/core": "^3.28", + "@tiptap/extension-character-count": "^3.28", + "@tiptap/extension-highlight": "^3.28", + "@tiptap/extension-image": "^3.28", + "@tiptap/extension-link": "^3.28", + "@tiptap/extension-placeholder": "^3.28", + "@tiptap/extension-table": "^3.28", + "@tiptap/extension-table-cell": "^3.28", + "@tiptap/extension-table-header": "^3.28", + "@tiptap/extension-table-row": "^3.28", + "@tiptap/extension-text-align": "^3.28", + "@tiptap/extension-underline": "^3.28", + "@tiptap/starter-kit": "^3.28" + }, + "devDependencies": { + "@tailwindcss/forms": "^0.5.10", + "@tailwindcss/vite": "^4.1.8", + "@torchlight-api/torchlight-cli": "0.1.7", + "esbuild": "^0.28", + "laravel-vite-plugin": "^3.1.3", + "patch-package": "^8.0.1", + "tailwindcss": "^4.1.8", + "vite": "^8.1.5" + } + }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.8.0.tgz", + "integrity": "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.12" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.8.0.tgz", + "integrity": "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.8.0", + "@floating-ui/utils": "^0.2.12" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.12.tgz", + "integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==", + "license": "MIT" + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.139.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", + "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", + "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", + "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", + "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", + "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", + "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", + "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", + "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", + "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", + "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", + "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", + "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", + "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", + "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", + "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", + "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tailwindcss/forms": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.11.tgz", + "integrity": "sha512-h9wegbZDPurxG22xZSoWtdzc41/OlNEUQERNqI/0fOwa2aVlWGu7C35E/x6LDyD3lgtztFSSjKZyuVM0hxhbgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@tiptap/core": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.29.0.tgz", + "integrity": "sha512-A/lrhKpOYtl0V5pmPS00Zps8pgBe1qDOoD9fzsumDSZ3HP8W398C959Jgru75PNFokAya9COPD3iaKP3NWF25g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-blockquote": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-3.29.0.tgz", + "integrity": "sha512-k8NKHLEYOqre7guObZBeFM04CaTwmEceCmdIrIjd7H9KoHSbRODaBNved6j5G33x/FWMwIF/RQbE2BjWaFSgzA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-bold": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.29.0.tgz", + "integrity": "sha512-BPUJvJ9sCsU3fxao5UJfDJrDuHhMn2hczZwZ9Qs4w1vkAeLGyOYbSejUTJdBYHLoexGiEwgnEeVeZN3C8GaI5g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-bullet-list": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.29.0.tgz", + "integrity": "sha512-1045sC5CRn7KD0wluxZeksBwpm2k3LKBUOM3kNwExHAPSV4in4gdarYJ2/WCmIKsmyj2FzUcF4rbpLLSB/dBSg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-list": "3.29.0" + } + }, + "node_modules/@tiptap/extension-character-count": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-3.29.0.tgz", + "integrity": "sha512-mX29NypWoHlfYfVaaFzafaWFPgx3I7BSy3OCgk3VUXOwCmzgGjW5K6pPM4o/bHmonbsxibVALtSUdcRVuaj8QQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extensions": "3.29.0" + } + }, + "node_modules/@tiptap/extension-code": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-3.29.0.tgz", + "integrity": "sha512-Um0BlyunRJ8Fal288Jn7I2n15FRwQcTy3NnKBBrPz3ikwx+yZZ0n9xTozpLMSxXrTq6cRlxLkASp/9FFx9sX9A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-code-block": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-3.29.0.tgz", + "integrity": "sha512-nKm1YSEiPVosjm4qeg6m+6SAKq82rKukAzE/g3M5eVs2OgEb4QIKQvQOmJ+zgGAnpb9Q/JIvcKsGGU1rn9Vnyw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-document": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.29.0.tgz", + "integrity": "sha512-folTlrwmUL+WSnojvfjZ951Gb25Pw8BxjXwhvXFuZXJ92qMfOcezA480kwFuu5nG8pPc/76ezQlz9a86Y5uQJw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-dropcursor": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-3.29.0.tgz", + "integrity": "sha512-IAY21q7KSXyCXN3u13kfpq0E8D2i3r9nSbsNYlLzkEv0Bpn+pWShZi05A0ubuothDNjdaMa96xaRY0f1y9gDZw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extensions": "3.29.0" + } + }, + "node_modules/@tiptap/extension-gapcursor": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-3.29.0.tgz", + "integrity": "sha512-Jz0zwriGxPMuRjKo6x7WhPa/7pZn0dovyJu/GLarN4T+mMseGNXWwEBsLEKkuumsJVPDEPPFjX+rzEeaFKInPQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extensions": "3.29.0" + } + }, + "node_modules/@tiptap/extension-hard-break": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-3.29.0.tgz", + "integrity": "sha512-8qKj0oeuU7IYoG73Lj3W4EC/JS/dFjN5iHmc4yodqppP6qs0o2zsF/2ipceGN/REZq5megPtxRgXu/nxQZ1NYg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-heading": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.29.0.tgz", + "integrity": "sha512-xWb3QEKo7cp9u6Vzi6oYKODra6jPwziHBv3fJAnxWpRldxtJqfyOVMikWJJFuDjmr+K0qyegzf206pMk+y0bDg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-highlight": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-3.29.0.tgz", + "integrity": "sha512-4Gcqn8Sg8kAKe+cEHzdXijalV803WUjvloZvlqrTAJmcORFNOipc+r9ylSEmCLb6j0oLc1O7tJXIEX59khNX/A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-horizontal-rule": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-3.29.0.tgz", + "integrity": "sha512-u1OgncXkokIuUJQIh4jVQfYHL/6I8VnrokUcCud4eErWvgeLnCbNmVdih4kxIdfmvEyAxXjDwcqf4AB79TxuNg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-image": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-3.29.0.tgz", + "integrity": "sha512-A+9Oxsobh4IRWpYj8+y4c0ujhZPY0z9PqvzyuV5GCqiUTRcTRnFI4a4PZDXO/GcCCQXfznfu8gbMtaEyEQW5+w==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-italic": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.29.0.tgz", + "integrity": "sha512-c8gF+zM7yXB9iGxtVCioYecjQ+A2fLlNa1XYBYbTobNhbUo8a11akbTkGNcCIgttwnzwEoI4mB6/PK4yjaQvVg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-link": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-3.29.0.tgz", + "integrity": "sha512-FuLDgE0k1dB4WCBTelw3re9BLmiurgXVSj3d3J4l3sunljyOs941RUU62b7pWP+ePNdGF7RgUMmMAB+58VZCIA==", + "license": "MIT", + "dependencies": { + "linkifyjs": "^4.3.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-list": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.29.0.tgz", + "integrity": "sha512-k0B/+nIkn4VvHSQ0kP+AzzAmgeOVxKMAdqG4a6qwxp/lR12aJGHlOP92KCjXV2RNPtuwDksJ1RIXrgxdf9WmJg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-list-item": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.29.0.tgz", + "integrity": "sha512-JSz27OIDHWDL7uw28E4W3eaN3H1u+NzJQKZkNXo5Qsvvsx8m/YIQWO9XlhiL3V4TZMjfvlc94lUp5tKW5KwETw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-list": "3.29.0" + } + }, + "node_modules/@tiptap/extension-list-keymap": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-keymap/-/extension-list-keymap-3.29.0.tgz", + "integrity": "sha512-g14QLZR9fmfJIL+X2R/cVTvQS0Mp7CoenA9PO+8adTjK7hCeB8hA3UAakMB4ekkElOXNOtb16e0wqulDcoqANg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-list": "3.29.0" + } + }, + "node_modules/@tiptap/extension-ordered-list": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.29.0.tgz", + "integrity": "sha512-9TXUDFagkGeu6Bo8L0b2SAVAYrY2Xzd28MXwiDxYvDKMjEGWkkCUpMiEI5Qav3GnfFWLmS3jI8PgUjxIw9wLLQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-list": "3.29.0" + } + }, + "node_modules/@tiptap/extension-paragraph": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.29.0.tgz", + "integrity": "sha512-OtGrkwzqlW+ehW+d2qrQ7VVcP9PbDeQmuT4Ec4yFjf3vR4QO8OVdVfeOcUq52PtkT3kYRxz9fzEiEvjqRm72yA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-placeholder": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-3.29.0.tgz", + "integrity": "sha512-V2jb0kL/k3rygAtKmSPYxoyBMCQJtJikPYnxiCYuY7FI1ohmCrmhyhkVqJv0b0EPMNW8BMIqf6DgpKJ/ODmXgA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extensions": "3.29.0" + } + }, + "node_modules/@tiptap/extension-strike": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-3.29.0.tgz", + "integrity": "sha512-VzasZkckrEXzmFQT9z3O95rUWy1b0RLFHAC6GUSQHxKk4TpP+Ujfn5+rqmPukMn0eScJyw1Y36jwfJc0VuNR+Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-table": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-3.29.0.tgz", + "integrity": "sha512-EwWZ5XDrAx1Us61eq9Gv5EblLmH14l8Al6X2VpFVI00TTu4qDwlW5wfnTsAkfAU0Ri0LyxLYb3lBfOvC8NV7uw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/extension-table-cell": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-3.29.0.tgz", + "integrity": "sha512-rsp2DlD2LQYFH76h0Asu7ysMhsqaFt7y/kBWqZ1skvBvIzRLOMO0bBH7shQtKT91Mb9y5thiqCj7bmkol28aKw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-table": "3.29.0" + } + }, + "node_modules/@tiptap/extension-table-header": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-3.29.0.tgz", + "integrity": "sha512-6eN+zvuDXhc1OedNvejouLKslZSvteGmAMNyd/sRrJIx16Q2ENOGpI5uAintfSRKnrX88XVKMKRp2AGgYo2OJQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-table": "3.29.0" + } + }, + "node_modules/@tiptap/extension-table-row": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-3.29.0.tgz", + "integrity": "sha512-+pIw0IEwmAeX53UqDFjSLLZBg6X7eKR6+yOKBfJgI7EsclVVjUFXFVrYs1WdqwaIgUgEx/TbgKq7krQc8lVtyw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/extension-table": "3.29.0" + } + }, + "node_modules/@tiptap/extension-text": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.29.0.tgz", + "integrity": "sha512-AMsf2V7IiGvzbl+LqLLfyWzufazZxHuid1gOnEt3KwolQ9AO7p8WJgHld0PZLxNyEh4SaSqK7b3d3SM9sqrlTw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-text-align": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-3.29.0.tgz", + "integrity": "sha512-/1htV3teqRJ7i7trAuORDg62LV0CQ1qskbMcP3SB7grsw6H1G54zwdaJVXeiIXmQKDF7FoZgY7u/v/TJckthEw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extension-underline": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.29.0.tgz", + "integrity": "sha512-DSPTogdvxmoX/L0U5KgBC9jWffRvYkGiyh1tp28gn+QaARh4iJn79pAZpi1m1bEhal/0Mq5m4ukbiO7FWInwaA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0" + } + }, + "node_modules/@tiptap/extensions": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/extensions/-/extensions-3.29.0.tgz", + "integrity": "sha512-ltlrm8dDHIgeNj3cOLEdLFMPPVy3TYvWA8ftrrJ44C/L01MBmgFB1f/vkPFYYnAasb2BYyVG6HxAGcTQHo5jHw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "3.29.0", + "@tiptap/pm": "3.29.0" + } + }, + "node_modules/@tiptap/pm": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.29.0.tgz", + "integrity": "sha512-4rr3HiZ8kbSNINuWXqKQJLv9fFMypCBN5gOwxoU+D4lEYVblkoM60fA1SlrI2BZVlZQmw2U38XKl5XMtUr55XQ==", + "license": "MIT", + "dependencies": { + "prosemirror-changeset": "^2.4.1", + "prosemirror-commands": "^1.7.1", + "prosemirror-dropcursor": "^1.8.2", + "prosemirror-gapcursor": "^1.4.1", + "prosemirror-history": "^1.5.0", + "prosemirror-inputrules": "^1.5.1", + "prosemirror-keymap": "^1.2.3", + "prosemirror-model": "^1.25.11", + "prosemirror-schema-list": "^1.5.1", + "prosemirror-state": "^1.4.4", + "prosemirror-tables": "^1.8.5", + "prosemirror-transform": "^1.12.0", + "prosemirror-view": "^1.41.9" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + } + }, + "node_modules/@tiptap/starter-kit": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-3.29.0.tgz", + "integrity": "sha512-J3jTp3/WXnnL58TCtdMsfeQ2BeycFYrAib6Nbpjd9G0OLUBE7AILiH2HrobRQpvRbAUgD5SW+sBZYOonbWWqNg==", + "license": "MIT", + "dependencies": { + "@tiptap/core": "^3.29.0", + "@tiptap/extension-blockquote": "^3.29.0", + "@tiptap/extension-bold": "^3.29.0", + "@tiptap/extension-bullet-list": "^3.29.0", + "@tiptap/extension-code": "^3.29.0", + "@tiptap/extension-code-block": "^3.29.0", + "@tiptap/extension-document": "^3.29.0", + "@tiptap/extension-dropcursor": "^3.29.0", + "@tiptap/extension-gapcursor": "^3.29.0", + "@tiptap/extension-hard-break": "^3.29.0", + "@tiptap/extension-heading": "^3.29.0", + "@tiptap/extension-horizontal-rule": "^3.29.0", + "@tiptap/extension-italic": "^3.29.0", + "@tiptap/extension-link": "^3.29.0", + "@tiptap/extension-list": "^3.29.0", + "@tiptap/extension-list-item": "^3.29.0", + "@tiptap/extension-list-keymap": "^3.29.0", + "@tiptap/extension-ordered-list": "^3.29.0", + "@tiptap/extension-paragraph": "^3.29.0", + "@tiptap/extension-strike": "^3.29.0", + "@tiptap/extension-text": "^3.29.0", + "@tiptap/extension-underline": "^3.29.0", + "@tiptap/extensions": "^3.29.0", + "@tiptap/pm": "^3.29.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + } + }, + "node_modules/@torchlight-api/torchlight-cli": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@torchlight-api/torchlight-cli/-/torchlight-cli-0.1.7.tgz", + "integrity": "sha512-sHph49Nx/VfzwDsb43v6AQIDZQa/YQ1LtGKTmN/rEBJoW0ctMXUQUJ1c75rNQ/1n2rYLbQLf7s008/jgLvkEDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "axios": "^0.21.1", + "chalk": "^4.1.2", + "cheerio": "^1.0.0-rc.10", + "chokidar": "^3.5.2", + "commander": "^8.1.0", + "fs-extra": "^10.0.0", + "inquirer": "^8.1.2", + "lodash.chunk": "^4.2.0", + "lodash.get": "^4.4.2", + "md5": "^2.3.0" + }, + "bin": { + "torchlight": "dist/bin/torchlight.cjs.js" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true, + "license": "ISC" + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/call-bind": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.2.0.tgz", + "integrity": "sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==", + "dev": true, + "license": "MIT" + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/css-select": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encoding-sniffer": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.24.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.3.tgz", + "integrity": "sha512-PwKooW9JUzh5chmYfHM3IQl5OkK2u2Nm011MgeZrss3JmFraUx/fqrf78kk8GUMYoibx/14MdwTl/1WKkG7TpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "micromatch": "^4.0.2" + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz", + "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/external-editor": "^1.0.0", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/json-stable-stringify": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.3.0.tgz", + "integrity": "sha512-qtYiSSFlwot9XHtF9bD9c7rwKjr+RecWT//ZnPvSmEjpV5mmPOCN4j8UjY5hbjNkOwZ/jQv3J6R1/pL7RwgMsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/jsonfile": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "license": "Public Domain", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-3.1.3.tgz", + "integrity": "sha512-cI5Anw4QHY+UzvZczFaj+j8NhwT2FtyEN8aqS/hOdt6DpEFBsn6x3GENxALem3cc+TsGvd9MacneimEvShvKMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "tinyglobby": "^0.2.12", + "vite-plugin-full-reload": "^1.1.0" + }, + "bin": { + "clean-orphaned-assets": "bin/clean.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "fontaine": "^0.8.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "fontaine": { + "optional": true + } + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/linkifyjs": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.3.3.tgz", + "integrity": "sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg==", + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.chunk": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", + "integrity": "sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "dev": true, + "license": "MIT", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/orderedmap": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz", + "integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==", + "license": "MIT" + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/patch-package": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.1.tgz", + "integrity": "sha512-VsKRIA8f5uqHQ7NGhwIna6Bx6D9s/1iXlA1hthBVBEbkq+t4kXD0HHt+rJhf/Z+Ci0F/HCB2hvn0qLdLG+Qxlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^10.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.2.4", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", + "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.16", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prosemirror-changeset": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.4.1.tgz", + "integrity": "sha512-96WBLhOaYhJ+kPhLg3uW359Tz6I/MfcrQfL4EGv4SrcqKEMC1gmoGrXHecPE8eOwTVCJ4IwgfzM8fFad25wNfw==", + "license": "MIT", + "dependencies": { + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-commands": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.1.tgz", + "integrity": "sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.10.2" + } + }, + "node_modules/prosemirror-dropcursor": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.3.tgz", + "integrity": "sha512-FoYbsJR8gK+DGlqhNoE29Loa38eIZPzQRIb1VMaDNBoo4OLP6vVof/jR8qFY/6XvUd6Dhug8MDCHl2a/h8RTfQ==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0", + "prosemirror-view": "^1.1.0" + } + }, + "node_modules/prosemirror-gapcursor": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.4.1.tgz", + "integrity": "sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==", + "license": "MIT", + "dependencies": { + "prosemirror-keymap": "^1.0.0", + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-view": "^1.0.0" + } + }, + "node_modules/prosemirror-history": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.5.0.tgz", + "integrity": "sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.2.2", + "prosemirror-transform": "^1.0.0", + "prosemirror-view": "^1.31.0", + "rope-sequence": "^1.3.0" + } + }, + "node_modules/prosemirror-inputrules": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.1.tgz", + "integrity": "sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-keymap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.3.tgz", + "integrity": "sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0", + "w3c-keyname": "^2.2.0" + } + }, + "node_modules/prosemirror-model": { + "version": "1.25.11", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.11.tgz", + "integrity": "sha512-QWg9RhnpLlogAmp3p96uEFrE5txQpFynd4vhBAELkwgOCWQs/X0yCzB3/hrHqiPwf91RG5KyWq6553zs9JqIOQ==", + "license": "MIT", + "dependencies": { + "orderedmap": "^2.0.0" + } + }, + "node_modules/prosemirror-schema-list": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", + "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.7.3" + } + }, + "node_modules/prosemirror-state": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.4.tgz", + "integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0", + "prosemirror-view": "^1.27.0" + } + }, + "node_modules/prosemirror-tables": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.5.tgz", + "integrity": "sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==", + "license": "MIT", + "dependencies": { + "prosemirror-keymap": "^1.2.3", + "prosemirror-model": "^1.25.4", + "prosemirror-state": "^1.4.4", + "prosemirror-transform": "^1.10.5", + "prosemirror-view": "^1.41.4" + } + }, + "node_modules/prosemirror-transform": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.12.0.tgz", + "integrity": "sha512-GxboyN4AMIsoHNtz5uf2r2Ru551i5hWeCMD6E2Ib4Eogqoub0NflniaBPVQ4MrGE5yZ8JV9tUHg9qcZTTrcN4w==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.21.0" + } + }, + "node_modules/prosemirror-view": { + "version": "1.42.2", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.42.2.tgz", + "integrity": "sha512-Pdg0l5kXm8aLDquFAnQFTCITg0q44sLqBlHlpsVLD9segdOao8TOfQdAhCrCXyVgPSRr6UDDROOIWA3bIrN9YQ==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.25.8", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rolldown": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", + "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.139.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.5", + "@rolldown/binding-darwin-arm64": "1.1.5", + "@rolldown/binding-darwin-x64": "1.1.5", + "@rolldown/binding-freebsd-x64": "1.1.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", + "@rolldown/binding-linux-arm64-gnu": "1.1.5", + "@rolldown/binding-linux-arm64-musl": "1.1.5", + "@rolldown/binding-linux-ppc64-gnu": "1.1.5", + "@rolldown/binding-linux-s390x-gnu": "1.1.5", + "@rolldown/binding-linux-x64-gnu": "1.1.5", + "@rolldown/binding-linux-x64-musl": "1.1.5", + "@rolldown/binding-openharmony-arm64": "1.1.5", + "@rolldown/binding-wasm32-wasi": "1.1.5", + "@rolldown/binding-win32-arm64-msvc": "1.1.5", + "@rolldown/binding-win32-x64-msvc": "1.1.5" + } + }, + "node_modules/rope-sequence": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz", + "integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==", + "license": "MIT" + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tmp": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz", + "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz", + "integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", + "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.17", + "rolldown": "~1.1.5", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", + "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } } - } - }, - "node_modules/vite-plugin-full-reload": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", - "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picocolors": "^1.0.0", - "picomatch": "^2.3.1" - } - }, - "node_modules/vite-plugin-full-reload/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/w3c-keyname": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", - "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", - "license": "MIT" - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yaml": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", - "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", - "dev": true, - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } } - } } diff --git a/package.json b/package.json index 81a2f9d0..b31df87b 100644 --- a/package.json +++ b/package.json @@ -17,29 +17,29 @@ "docs:api": "php docs-site/scripts/verify-api-docs.php ." }, "dependencies": { - "@floating-ui/dom": "^1.7.6", - "@tiptap/core": "^2.0", - "@tiptap/extension-character-count": "^2.0", - "@tiptap/extension-highlight": "^2.0", - "@tiptap/extension-image": "^2.0", - "@tiptap/extension-link": "^2.0", - "@tiptap/extension-placeholder": "^2.0", - "@tiptap/extension-table": "^2.0", - "@tiptap/extension-table-cell": "^2.0", - "@tiptap/extension-table-header": "^2.0", - "@tiptap/extension-table-row": "^2.0", - "@tiptap/extension-text-align": "^2.0", - "@tiptap/extension-underline": "^2.0", - "@tiptap/starter-kit": "^2.0" + "@floating-ui/dom": "^1.8", + "@tiptap/core": "^3.28", + "@tiptap/extension-character-count": "^3.28", + "@tiptap/extension-highlight": "^3.28", + "@tiptap/extension-image": "^3.28", + "@tiptap/extension-link": "^3.28", + "@tiptap/extension-placeholder": "^3.28", + "@tiptap/extension-table": "^3.28", + "@tiptap/extension-table-cell": "^3.28", + "@tiptap/extension-table-header": "^3.28", + "@tiptap/extension-table-row": "^3.28", + "@tiptap/extension-text-align": "^3.28", + "@tiptap/extension-underline": "^3.28", + "@tiptap/starter-kit": "^3.28" }, "devDependencies": { "@tailwindcss/forms": "^0.5.10", "@tailwindcss/vite": "^4.1.8", "@torchlight-api/torchlight-cli": "0.1.7", - "esbuild": "^0.27.0", - "laravel-vite-plugin": "^2.0.1", + "esbuild": "^0.28", + "laravel-vite-plugin": "^3.1.3", "patch-package": "^8.0.1", "tailwindcss": "^4.1.8", - "vite": "^7.1.3" + "vite": "^8.1.5" } } diff --git a/packages/forms/dist/tiptap/chunk-72BVZGAJ.js b/packages/forms/dist/tiptap/chunk-72BVZGAJ.js new file mode 100644 index 00000000..d1ec8de2 --- /dev/null +++ b/packages/forms/dist/tiptap/chunk-72BVZGAJ.js @@ -0,0 +1,104 @@ +function j(n){this.content=n}j.prototype={constructor:j,find:function(n){for(var e=0;e>1}};j.from=function(n){if(n instanceof j)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new j(e)};var En=j;function hi(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a0&&u>0&&c[d-1]==f[u-1];)d--,u--,t--,r--;return d&&u&&d=56320&&n<57344}function gi(n){return n>=55296&&n<56320}var b=class n{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;re&&r(a,i+l,s||null,o)!==!1&&a.content.size){let f=l+1;a.nodesBetween(Math.max(0,e-f),Math.min(a.content.size,t-f),r,i+f)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new n(r,i)}cutByIndex(e,t){return e==t?n.empty:e==0&&t==this.content.length?this:new n(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new n(i,s)}addToStart(e){return new n([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new n(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Lt(t+1,s):Lt(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return n.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return n.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return n.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};A.none=[];var Ce=class extends Error{},x=class n{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=bi(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new n(r,this.openStart,this.openEnd)}removeBetween(e,t){return new n(yi(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return n.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new n(b.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new n(e,r,i)}};x.empty=new x(b.empty,0,0);function yi(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(yi(s.content,e-i-1,t-i-1)))}function bi(n,e,t,r,i,s){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=bi(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function bl(n,e,t){if(t.openStart>n.depth)throw new Ce("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Ce("Inconsistent open depths");return xi(n,e,t,0)}function xi(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function dt(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(Pe(n.nodeAfter,r),s++));for(let l=s;li&&On(n,e,i+1),o=r.depth>i&&On(t,r,i+1),l=[];return dt(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(Si(s,o),Pe(Ie(s,ki(n,e,t,r,i+1)),l)):(s&&Pe(Ie(s,Ht(n,e,i+1)),l),dt(e,t,i,l),o&&Pe(Ie(o,Ht(t,r,i+1)),l)),dt(r,null,i,l),new b(l)}function Ht(n,e,t){let r=[];if(dt(null,n,t,r),n.depth>t){let i=On(n,e,t+1);Pe(Ie(i,Ht(n,e,t+1)),r)}return dt(e,null,t,r),new b(r)}function xl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(b.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}var Jt=class n{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new ze(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new n(t,r,s)}static resolveCached(e,t){let r=ii.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Mi(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=b.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=b.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Q.prototype.text=void 0;var Dn=class n extends Q{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Mi(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Mi(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}var Be=class n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Rn(e,t);if(r.next==null)return n.empty;let i=wi(r);r.next&&r.err("Unexpected trailing text");let s=vl(El(i));return Ol(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` +`)}};Be.empty=new Be(!0);var Rn=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function wi(n){let e=[];do e.push(Ml(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ml(n){let e=[];do e.push(wl(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function wl(n){let e=Nl(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Cl(n,e);else break;return e}function si(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Cl(n,e){let t=si(n),r=t;return n.eat(",")&&(n.next!="}"?r=si(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Tl(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Nl(n){if(n.eat("(")){let e=wi(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Tl(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function El(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let f=0;f{c||i.push([l,c=[]]),c.indexOf(f)==-1&&c.push(f)})})});let s=e[r.join(",")]=new Be(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ni(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Q(this,this.computeAttrs(e),b.from(t),A.setFrom(r))}createChecked(e=null,t,r){return t=b.from(t),this.checkContent(t),new Q(this,this.computeAttrs(e),t,A.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=b.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(b.empty,!0);return s?new Q(this,e,t.append(s),A.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new n(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Al(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}var Pn=class{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Al(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}},ht=class n{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=vi(e,i.attrs),this.excluded=null;let s=Ti(this.attrs);this.instance=s?new A(this,s):null}create(e=null){return!e&&this.instance?this.instance:new A(this,Ni(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new n(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}},Ge=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=En.from(e.nodes),t.marks=En.from(e.marks||{}),this.nodes=jt.compile(this.spec.nodes,this),this.marks=ht.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Be.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?li(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:li(this,o.split(" "))}this.nodeFromJSON=i=>Q.fromJSON(this,i),this.markFromJSON=i=>A.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof jt){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new Dn(r,r.defaultAttrs,e,A.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function li(n,e){let t=[];for(let r=0;r-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Dl(n){return n.tag!=null}function Rl(n){return n.style!=null}var fe=class n{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Dl(i))this.tags.push(i);else if(Rl(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new _t(this,t,!1);return r.addAll(e,A.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new _t(this,t,!0);return r.addAll(e,A.none,t.from,t.to),x.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=ci(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=ci(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new n(e,n.schemaRules(e)))}},Oi={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Pl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ai={ol:!0,ul:!0},pt=1,In=2,ut=4;function ai(n,e,t){return e!=null?(e?pt:0)|(e==="full"?In:0):n&&n.whitespace=="pre"?pt|In:t&~ut}var Ye=class{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=A.none,this.match=s||(o&ut?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&pt)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Oi.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},_t=class{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=ai(null,t.preserveWhitespace,0)|(r?ut:0);i?s=new Ye(i.type,i.attrs,A.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new Ye(null,null,A.none,!0,null,o):s=new Ye(e.schema.topNodeType,null,A.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&In?"full":this.localPreserveWS||(i.options&pt)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` +`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):fi(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Ye(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=pt)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let f=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!f||f.name!=c&&!f.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}};function Il(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ai.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function zl(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function ci(n){let e={};for(let t in n)e[t]=n[t];return e}function fi(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&$t(Vt(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:$t(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new n(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=di(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return di(e.marks)}};function di(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Vt(n){return n.document||window.document}var ui=new WeakMap;function Bl(n){let e=ui.get(n);return e===void 0&&ui.set(n,e=Fl(n)),e}function Fl(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],f=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){f=2;for(let d in c)if(c[d]!=null){let u=d.indexOf(" ");u>0?a.setAttributeNS(d.slice(0,u),d.slice(u+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=f;df)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof u=="string")a.appendChild(n.createTextNode(u));else{let{dom:h,contentDOM:p}=$t(n,u,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}var Pi=65535,Ii=Math.pow(2,16);function Ll(n,e){return n+e*Ii}function Di(n){return n&Pi}function Vl(n){return(n-(n&Pi))/Ii}var zi=1,Bi=2,Kt=4,Fi=8,yt=class{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Fi)>0}get deletedBefore(){return(this.delInfo&(zi|Kt))>0}get deletedAfter(){return(this.delInfo&(Bi|Kt))>0}get deletedAcross(){return(this.delInfo&Kt)>0}},pe=class n{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&n.empty)return n.empty}recover(e){let t=0,r=Di(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],f=this.ranges[l+o],d=a+c;if(e<=d){let u=c?e==a?-1:e==d?1:t:t,h=a+i+(u<0?0:f);if(r)return h;let p=e==(t<0?a:d)?null:Ll(l/3,e-a),m=e==a?Bi:e==d?zi:Kt;return(t<0?e!=a:e!=d)&&(m|=Fi),new yt(h,m,p)}i+=f-c}return r?e+i:new yt(e+i,0,null)}touches(e,t){let r=0,i=Di(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],f=a+c;if(e<=f&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new n;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,s)}invert(){return new me(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};F.jsonID("addMark",bt);var me=class n extends F{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new x(Wn(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,r)}invert(){return new bt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};F.jsonID("removeMark",me);var xt=class n extends F{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new x(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new n(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,x.fromJSON(e,t.slice),t.insert,!!t.structure)}};F.jsonID("replaceAround",z);function Vn(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function $l(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,f)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&f.type.allowsMarkType(r.type)){let u=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;mn.step(a)),s.forEach(a=>n.step(a))}function Wl(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof ht){let c=o.marks,f;for(;f=r.isInSet(c);)(a||(a=[])).push(f),c=f.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let f=0;fn.step(new me(o.from,o.to,o.style)))}function Hn(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)n.step(o[a])}function Hl(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function ge(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+i,a=n.$to.indexAfter(r)-s;if(rt;p--)m||r.index(p)>0?(m=!0,f=b.from(r.node(p).copy(f)),d++):a--;let u=b.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=b.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new z(i,s,i,s,new x(r,0,0),t.length,!0))}function ql(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&Ul(n.doc,n.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Vi(n,o,l,s),Hn(n,n.mapping.slice(s).map(l,1),r,void 0,c===null);let f=n.mapping.slice(s),d=f.map(l,1),u=f.map(l+o.nodeSize,1);return n.step(new z(d,u,d+1,u-1,new x(b.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Li(n,o,l,s),!1}})}function Li(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Vi(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` +`))}})}function Ul(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Yl(n,e,t,r,i){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(r,null,i||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new z(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new x(b.from(o),0,0),1,!0))}function te(n,e,t=1,r){let i=n.resolve(e),s=i.depth-t,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,f=t-2;c>s;c--,f--){let d=i.node(c),u=i.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(u,d.childCount),p=r&&r[f+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[f]||d;if(!d.canReplace(u+1,d.childCount)||!m.type.validContent(h))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function Gl(n,e,t=1,r){let i=n.doc.resolve(e),s=b.empty,o=b.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){s=b.from(i.node(l).copy(s));let f=r&&r[c];o=b.from(f?f.type.create(f.attrs,o):i.node(l).copy(o))}n.step(new W(e,e,new x(s.append(o),t,t),!0))}function re(n,e){let t=n.resolve(e),r=t.index();return $i(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Xl(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i0?(s=r.node(i+1),l++,o=r.node(i).maybeChild(l)):(s=r.node(i).maybeChild(l-1),o=r.node(i+1)),s&&!s.isTextblock&&$i(s,o)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function Ql(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,s=n.doc.resolve(e-t),o=s.node().type;if(i&&o.inlineContent){let f=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);f&&!d?r=!1:!f&&d&&(r=!0)}let l=n.steps.length;if(r===!1){let f=n.doc.resolve(e+t);Vi(n,f.node(),f.before(),l)}o.inlineContent&&Hn(n,e+t-1,o,s.node().contentMatchAt(s.index()),r==null);let a=n.mapping.slice(l),c=a.map(e-t);if(n.step(new W(c,a.map(e+t,-1),x.empty,!0)),r===!0){let f=n.doc.resolve(c);Li(n,f.node(),f.before(),n.steps.length)}return n}function Zl(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,t))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,t))return r.after(i+1);if(s=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),f=!1;if(s==1)f=c.canReplace(a,a,i);else{let d=c.contentMatchAt(a).findWrapping(i.firstChild.type);f=d&&c.canReplaceWith(a,a,d[0])}if(f)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function St(n,e,t=e,r=x.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),s=n.resolve(t);return Hi(i,s,r)?new W(e,t,r):new $n(i,s,r).fit()}function Hi(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}var $n=class{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=b.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=b.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new x(s,o,l);return e>-1?new z(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new W(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=Bn(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],f,d=null;if(t==1&&(o?c.matchType(o.type)||(d=c.fillBefore(b.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(t==2&&o&&(f=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:f};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Bn(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new x(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Bn(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new x(mt(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new x(mt(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m1||a==0||m.content.size)&&(d=g,f.push(Ji(m.mark(u.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=gt(this.placed,t,b.from(f)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],s=t=0;l--){let{match:a,type:c}=this.frontier[l],f=Fn(e,l,c,a,!0);if(!f||f.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=gt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=gt(this.placed,this.depth,b.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(b.empty,!0);t.childCount&&(this.placed=gt(this.placed,this.frontier.length,t))}};function mt(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(mt(n.firstChild.content,e-1,t)))}function gt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(gt(n.lastChild.content,e-1,t)))}function Bn(n,e){for(let t=0;t1&&(r=r.replaceChild(0,Ji(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty,!0)))),n.copy(r)}function Fn(n,e,t,r,i){let s=n.node(e),o=i?n.indexAfter(e):n.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!ea(t,s.content,o)?l:null}function ea(n,e,t){for(let r=t;r0;u--,h--){let p=i.node(u).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(u)>-1?l=u:i.before(u)==h&&o.splice(1,0,-u)}let a=o.indexOf(l),c=[],f=r.openStart;for(let u=r.content,h=0;;h++){let p=u.firstChild;if(c.push(p),h==r.openStart)break;u=p.content}for(let u=f-1;u>=0;u--){let h=c[u],p=ta(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))f=u;else if(p||!h.type.isTextblock)break}for(let u=r.openStart;u>=0;u--){let h=(u+f+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m=0&&(n.replace(e,t,r),!(n.steps.length>d));u--){let h=o[u];h<0||(e=i.before(h),t=s.after(h))}}function ji(n,e,t,r,i){if(er){let s=i.contentMatchAt(0),o=s.fillBefore(n).append(n);n=o.append(s.matchFragment(o).fillBefore(b.empty,!0))}return n}function ra(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=Zl(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new x(b.from(r),0,0))}function ia(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(t),l=!1;for(let a=r.depth;a>o;a--)r.node(a).type.spec.isolating&&(l=!0);for(let a=i.depth;a>o;a--)i.node(a).type.spec.isolating&&(l=!0);if(!l){for(let a=r.depth;a>0&&e==r.start(a);a--)e=r.before(a);for(let a=i.depth;a>0&&t==i.start(a);a--)t=i.before(a);r=n.doc.resolve(e),i=n.doc.resolve(t)}}let s=_i(r,i);for(let o=0;o0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&i.end(o)-t!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function _i(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let s=n.start(i);if(se.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&t.push(i)}return t}var qt=class n extends F{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return $.fromReplace(e,this.pos,this.pos+1,new x(b.from(i),0,t.isLeaf?0:1))}getMap(){return pe.empty}invert(e){return new n(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new n(t.pos,t.attr,t.value)}};F.jsonID("attr",qt);var Ut=class n extends F{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return $.ok(r)}getMap(){return pe.empty}invert(e){return new n(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new n(t.attr,t.value)}};F.jsonID("docAttr",Ut);var Qe=class extends Error{};Qe=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Qe.prototype=Object.create(Error.prototype);Qe.prototype.constructor=Qe;Qe.prototype.name="TransformError";var Ze=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ln}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Qe(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r{e=Math.min(e,l),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=x.empty){let i=St(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new x(b.from(r),0,0))}delete(e,t){return this.replace(e,t,x.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return na(this,e,t,r),this}replaceRangeWith(e,t,r){return ra(this,e,t,r),this}deleteRange(e,t){return ia(this,e,t),this}lift(e,t){return Jl(this,e,t),this}join(e,t=1){return Ql(this,e,t),this}wrap(e,t){return Kl(this,e,t),this}setBlockType(e,t=e,r,i=null){return ql(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Yl(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new qt(e,t,r)),this}setDocAttribute(e,t){return this.step(new Ut(e,t)),this}addNodeMark(e,t){return this.step(new xt(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof A)t.isInSet(r.marks)&&this.step(new Xe(e,t));else{let i=r.marks,s,o=[];for(;s=t.isInSet(i);)o.push(new Xe(e,s)),i=s.removeFromSet(i);for(let l=o.length-1;l>=0;l--)this.step(o[l])}return this}split(e,t=1,r){return Gl(this,e,t,r),this}addMark(e,t,r){return $l(this,e,t,r),this}removeMark(e,t,r){return Wl(this,e,t,r),this}clearIncompatible(e,t,r){return Hn(this,e,t,r),this}};var Jn=Object.create(null),E=class{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Gt(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;s--){let o=t<0?tt(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):tt(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new U(e.node(0))}static atStart(e){return tt(e,e,0,0,1)||new U(e)}static atEnd(e){return tt(e,e,e.content.size,e.childCount,-1)||new U(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Jn[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Jn)throw new RangeError("Duplicate use of selection JSON ID "+e);return Jn[e]=t,t.prototype.jsonID=e,t}getBookmark(){return T.between(this.$anchor,this.$head).getBookmark()}};E.prototype.visible=!0;var Gt=class{constructor(e,t){this.$from=e,this.$to=t}},Ki=!1;function qi(n){!Ki&&!n.parent.inlineContent&&(Ki=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}var T=class n extends E{constructor(e,t=e){qi(e),qi(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return E.near(r);let i=e.resolve(t.map(this.anchor));return new n(i.parent.inlineContent?i:r,r)}replace(e,t=x.empty){if(super.replace(e,t),t==x.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Xt(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let s=E.findFrom(t,r,!0)||E.findFrom(t,-r,!0);if(s)t=s.$head;else return E.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(E.findFrom(e,-r,!0)||E.findFrom(e,r,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let l=e.child(o);if(l.isAtom){if(!s&&C.isSelectable(l))return C.create(n,t-(i<0?l.nodeSize:0))}else{let a=tt(n,l,t+i,i<0?l.childCount:0,i,s);if(a)return a}t+=l.nodeSize*i}return null}function Ui(n,e,t){let r=n.steps.length-1;if(r{o==null&&(o=f)}),n.setSelection(E.near(n.doc.resolve(o),t))}var Yi=1,Yt=2,Gi=4,Kn=class extends Ze{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Yt,this}ensureMarks(e){return A.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Yt)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Yt,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||A.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(E.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Gi,this}get scrolledIntoView(){return(this.updated&Gi)>0}};function Xi(n,e){return!e||!n?n:n.bind(e)}var Le=class{constructor(e,t,r){this.name=e,this.init=Xi(t.init,r),this.apply=Xi(t.apply,r)}},oa=[new Le("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Le("selection",{init(n,e){return n.selection||E.atStart(e.doc)},apply(n){return n.selection}}),new Le("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Le("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})],kt=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=oa.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Le(r.key,r.spec.state,r))})}},Mt=class n{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new kt(e.schema,e.plugins),s=new n(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Q.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=E.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[o.name]=c.fromJSON.call(a,e,t[l],s);return}}s[o.name]=o.init(e,s)}}),s}};function Qi(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Qi(i,e,{})),t[r]=i}return t}var I=class{constructor(e){this.spec=e,this.props={},e.props&&Qi(e.props,this,this.props),this.key=e.key?e.key.key:Zi("plugin")}getState(e){return e[this.key]}},jn=Object.create(null);function Zi(n){return n in jn?n+"$"+ ++jn[n]:(jn[n]=0,n+"$")}var L=class{constructor(e="key"){this.key=Zi(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var ts=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function ns(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}var Un=(n,e,t)=>{let r=ns(n,t);if(!r)return!1;let i=Gn(r);if(!i){let o=r.blockRange(),l=o&&ge(o);return l==null?!1:(e&&e(n.tr.lift(o,l).scrollIntoView()),!0)}let s=i.nodeBefore;if(us(n,i,e,-1))return!0;if(r.parent.content.size==0&&(nt(s,"end")||C.isSelectable(s)))for(let o=r.depth;;o--){let l=St(n.doc,r.before(o),r.after(o),x.empty);if(l&&l.slice.size1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},rs=(n,e,t)=>{let r=ns(n,t);if(!r)return!1;let i=Gn(r);return i?ss(n,i,e):!1},is=(n,e,t)=>{let r=ls(n,t);if(!r)return!1;let i=Zn(r);return i?ss(n,i,e):!1};function ss(n,e,t){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let f=i.lastChild;if(!f)return!1;i=f}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let f=l.firstChild;if(!f)return!1;l=f}let c=St(n.doc,s,a,x.empty);if(!c||c.from!=s||c instanceof W&&c.slice.size>=a-s)return!1;if(t){let f=n.tr.step(c);f.setSelection(T.create(f.doc,s)),t(f.scrollIntoView())}return!0}function nt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}var Yn=(n,e,t)=>{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=Gn(r)}let o=s&&s.nodeBefore;return!o||!C.isSelectable(o)?!1:(e&&e(n.tr.setSelection(C.create(n.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function Gn(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function ls(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=ls(n,t);if(!r)return!1;let i=Zn(r);if(!i)return!1;let s=i.nodeAfter;if(us(n,i,e,1))return!0;if(r.parent.content.size==0&&(nt(s,"start")||C.isSelectable(s))){let o=St(n.doc,r.before(),r.after(),x.empty);if(o&&o.slice.size{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,r=t instanceof C,i;if(r){if(t.node.isTextblock||!re(n.doc,t.from))return!1;i=t.from}else if(i=Fe(n.doc,t.from,-1),i==null)return!1;if(e){let s=n.tr.join(i);r&&s.setSelection(C.create(s.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},cs=(n,e)=>{let t=n.selection,r;if(t instanceof C){if(t.node.isTextblock||!re(n.doc,t.to))return!1;r=t.to}else if(r=Fe(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},fs=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),s=i&&ge(i);return s==null?!1:(e&&e(n.tr.lift(i,s).scrollIntoView()),!0)},er=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` +`).scrollIntoView()),!0)};function tr(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),s=t.indexAfter(-1),o=tr(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,o.createAndFill());a.setSelection(E.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},rr=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof U||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=tr(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(te(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),i=r&&ge(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function la(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof C&&e.selection.node.isBlock)return!r.parentOffset||!te(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=tr(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=n&&n(i.parent,a,r);s.unshift(m||(a&&l?{type:l}:null)),o=h;break}else{if(h==1)return!1;s.unshift(null)}let f=e.tr;(e.selection instanceof T||e.selection instanceof U)&&f.deleteSelection();let d=f.mapping.map(r.pos),u=te(f.doc,d,s.length,s);if(u||(s[0]=l?{type:l}:null,u=te(f.doc,d,s.length,s)),!u)return!1;if(f.split(d,s.length,s),!a&&c&&r.node(o).type!=l){let h=f.mapping.map(r.before(o)),p=f.doc.resolve(h);l&&r.node(o-1).canReplaceWith(p.index(),p.index()+1,l)&&f.setNodeMarkup(f.mapping.map(r.before(o)),l)}return t&&t(f.scrollIntoView()),!0}}var aa=la();var ds=(n,e)=>{let{$from:t,to:r}=n.selection,i,s=t.sharedDepth(r);return s==0?!1:(i=t.before(s),e&&e(n.tr.setSelection(C.create(n.doc,i))),!0)},ca=(n,e)=>(e&&e(n.tr.setSelection(new U(n.doc))),!0);function fa(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||re(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function us(n,e,t,r){let i=e.nodeBefore,s=e.nodeAfter,o,l,a=i.type.spec.isolating||s.type.spec.isolating;if(!a&&fa(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(l=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&l.matchType(o[0]||s.type).validEnd){if(t){let h=e.pos+s.nodeSize,p=b.empty;for(let y=o.length-1;y>=0;y--)p=b.from(o[y].create(null,p));p=b.from(i.copy(p));let m=n.tr.step(new z(e.pos-1,h,e.pos,h,new x(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&re(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let f=s.type.spec.isolating||r>0&&a?null:E.findFrom(e,1),d=f&&f.$from.blockRange(f.$to),u=d&&ge(d);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(d,u).scrollIntoView()),!0;if(c&&nt(s,"start",!0)&&nt(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=b.empty;for(let k=p.length-1;k>=0;k--)y=b.from(p[k].copy(y));let S=n.tr.step(new z(e.pos-p.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new x(y,p.length,0),0,!0));t(S.scrollIntoView())}return!0}}return!1}function hs(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(t&&t(e.tr.setSelection(T.create(e.doc,n<0?i.start(s):i.end(s)))),!0):!1}}var sr=hs(-1),or=hs(1);function ps(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),l=o&&et(o,n,e);return l?(r&&r(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function lr(n,e=null){return function(t,r){let i=!1;for(let s=0;s{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let f=t.doc.resolve(c),d=f.index();i=f.parent.canReplaceWith(d,d+1,n)}})}if(!i)return!1;if(r){let s=t.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=o.resolve(e.start-2);s=new ze(a,a,e.depth),e.endIndex=0;f--)s=b.from(t[f].type.create(t[f].attrs,s));n.step(new z(e.start-(r?2:0),e.end,e.start,e.end,new x(s,0,0),t.length,!0));let o=0;for(let f=0;fo.childCount>0&&o.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?pa(e,t,n,s):ma(e,t,s):!0:!1}}function pa(n,e,t,r){let i=n.tr,s=r.end,o=r.$to.end(r.depth);sm;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(t.start),o=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=s.node(-1),f=s.index(-1);if(!c.canReplace(f+(l?0:1),f+1,o.content.append(a?b.empty:b.from(i))))return!1;let d=s.pos,u=d+o.nodeSize;return r.step(new z(d-(l?1:0),u+(a?1:0),d+1,u-1,new x((l?b.empty:b.from(i.copy(b.empty))).append(a?b.empty:b.from(i.copy(b.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function ys(n){return function(e,t){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,f=b.from(c?n.create():null),d=new x(b.from(n.create(null,b.from(l.type.create(null,f)))),c?3:1,0),u=s.start,h=s.end;t(e.tr.step(new z(u-(c?3:1),h,u,h,d,1,!0)).scrollIntoView())}return!0}}var H=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},ot=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e},pr=null,be=function(n,e,t){let r=pr||(pr=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},ga=function(){pr=null},Ke=function(n,e,t,r){return t&&(bs(n,e,t,r,-1)||bs(n,e,t,r,1))},ya=/^(img|br|input|textarea|hr)$/i;function bs(n,e,t,r,i){for(var s;;){if(n==t&&e==r)return!0;if(e==(i<0?0:se(n))){let o=n.parentNode;if(!o||o.nodeType!=1||At(n)||ya.test(n.nodeName)||n.contentEditable=="false")return!1;e=H(n)+(i<0?0:1),n=o}else if(n.nodeType==1){let o=n.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else n=o,e=i<0?se(n):0}else return!1}}function se(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function ba(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=se(n)}else if(n.parentNode&&!At(n))e=H(n),n=n.parentNode;else return null}}function xa(n,e){for(;;){if(n.nodeType==3&&e2),ie=lt||(de?/Mac/.test(de.platform):!1),Gs=de?/Win/.test(de.platform):!1,xe=/Android \d/.test(De),Dt=!!xs&&"webkitFontSmoothing"in xs.documentElement.style,wa=Dt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Ca(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function ye(n,e){return typeof n=="number"?n:n[e]}function Ta(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Ss(n,e,t){if(!br(e)&&e.left==0)return;let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let o=t||n.dom;o;){if(o.nodeType!=1){o=ot(o);continue}let l=o,a=l==s.body,c=a?Ca(s):Ta(l),f=0,d=0;if(e.topc.bottom-ye(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+ye(i,"top")-c.top:e.bottom-c.bottom+ye(i,"bottom")),e.leftc.right-ye(r,"right")&&(f=e.right-c.right+ye(i,"right")),f||d)if(a)s.defaultView.scrollBy(f,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),f&&(l.scrollLeft+=f);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let u=a?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u=="absolute"?o.offsetParent:ot(o)}}function Na(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=t+1;o=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Xs(n.dom)}}function Xs(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=ot(r));return e}function Ea({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Qs(t,r==0?0:r-e)}function Qs(n,e){for(let t=0;t=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=f,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?Oa(t,i):!t||r&&t.nodeType==1?{node:n,offset:s}:Zs(t,i)}function Oa(n,e){let t=n.nodeValue.length,r=document.createRange(),i;for(let s=0;s=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:n,offset:0}}function Ir(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Aa(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,i,s)}function Ra(n,e,t,r){let i=-1;for(let s=e,o=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!o&&a.left>r.left||a.top>r.top?i=l.posBefore:(!o&&a.right-1?i:n.docView.posFromDOM(e,t,-1)}function eo(n,e,t){let r=n.childNodes.length;if(r&&t.tope.top&&i++}let c;Dt&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=Ra(n,r,i,e))}l==null&&(l=Da(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function br(n){return n.top=0&&i==r.nodeValue.length?(a--,f=1):t<0?a--:c++,wt(Ne(be(r,a,c),f),f<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(t<0||i==se(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return cr(a.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(t<0||i==se(r))){let a=r.childNodes[i-1],c=a.nodeType==3?be(a,se(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return wt(Ne(c,1),!1)}if(s==null&&i=0)}function wt(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function cr(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function no(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function za(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return no(n,e,()=>{let{node:s}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=to(n,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=be(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;cf.top+1&&(t=="up"?o.top-f.top>(f.bottom-o.top)*2:f.bottom-o.bottom>(o.bottom-f.top)*2))return!1}}return!0})}var Ba=/[\u0590-\u08ac]/;function Fa(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,l=n.domSelection();return l?!Ba.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:o:no(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:f,anchorOffset:d}=n.domSelectionRange(),u=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(f,d),a&&(a!=f||c!=d)&&l.extend&&l.extend(a,c)}catch{}return u!=null&&(l.caretBidiLevel=u),g}):r.pos==r.start()||r.pos==r.end()}var ks=null,Ms=null,ws=!1;function La(n,e,t){return ks==e&&Ms==t?ws:(ks=e,Ms=t,ws=t=="up"||t=="down"?za(n,e,t):Fa(n,e,t))}var le=0,Cs=1,$e=2,ce=3,qe=class{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=le,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tH(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!t||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;te||o instanceof en){i=e-s;break}s=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof Qt&&s.side>=0;r--);if(t<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?H(s.dom)+1:0}}else{let s,o=!0;for(;s=r=f&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,f);e=o;for(let d=l;d>0;d--){let u=this.children[d-1];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(1)){i=H(u.dom)+1;break}e-=u.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let f=l+1;fp&&ot){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i=r:er){let l=r+s.border,a=o-s.border;if(e>=l&&t<=a){this.dirty=e==r||t==o?$e:Cs,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=ce:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?$e:ce}r=o}this.dirty=$e}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?$e:Cs;t.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==le&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},xr=class extends qe{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},He=class n extends qe{constructor(e,t,r,i,s){super(e,[],r,i),this.mark=t,this.spec=s}static create(e,t,r,i){let s=i.nodeViews[t.type.name],o=s&&s(t,i,r);return(!o||!o.dom)&&(o=he.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new n(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ce||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ce&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=le){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(s=wr(s,0,e,r));for(let l=0;l{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,i),f=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!f)f=document.createTextNode(t.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:d}=he.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!d&&!t.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),t.type.spec.draggable&&(f.draggable=!0));let u=f;return f=so(f,r,t),c?a=new Sr(e,t,r,i,f,d||null,u,c):t.isText?new Zt(e,t,r,i,f,u):new n(e,t,r,i,f,d||null,u)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let i=this.children[r];if(this.dom.contains(i.dom.parentNode)){t.contentElement=i.dom.parentNode;break}}if(!t.contentElement){let r=e&&e.find(i=>i.nodeType==1&&e.indexOf(i.parentNode)<0&&this.dom.contains(i));r?t.contentElement=r:t.getContent=()=>b.empty}}return t}matchesNode(e,t,r){return this.dirty==le&&e.eq(this.node)&&tn(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,s=e.composing?this.localCompositionInfo(e,t):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new Mr(this,o&&o.node,e);Ha(this.node,this.innerDeco,(c,f,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e,f):c.type.side>=0&&!d&&a.syncToMarks(f==this.node.childCount?A.none:this.node.child(f).marks,r,e,f),a.placeWidget(c,e,i)},(c,f,d,u)=>{a.syncToMarks(c.marks,r,e,u);let h;a.findNodeMatch(c,f,d,u)||l&&e.state.selection.from>i&&e.state.selection.to-1&&a.updateNodeAt(c,f,d,h,e)||a.updateNextNode(c,f,d,e,u,i)||a.addNode(c,f,d,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==$e)&&(o&&this.protectLocalComposition(e,o),ro(this.contentDOM,this.children,e),lt&&Ja(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof T)||rt+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,l=ja(this.node.content,o,r-t,i-t);return l<0?null:{node:s,pos:l,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new xr(this,s,t,i);e.input.compositionNodes.push(o),this.children=wr(this.children,r,r+i.length,e,o)}update(e,t,r,i){return this.dirty==ce||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=le}updateOuterDeco(e){if(tn(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=io(this.dom,this.nodeDOM,kr(this.outerDeco,this.node,t),kr(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function Ts(n,e,t,r,i){so(r,e,n);let s=new Oe(void 0,n,e,t,r,r,r);return s.contentDOM&&s.updateChildren(i,0),s}var Zt=class n extends Oe{constructor(e,t,r,i,s,o){super(e,t,r,i,s,null,o)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==ce||this.dirty!=le&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=le||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=le,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),s=document.createTextNode(i.text);return new n(this.parent,i,this.outerDeco,this.innerDeco,s,s)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=ce)}get domAtom(){return!1}isText(e){return this.node.text==e}},en=class extends qe{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==le&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},Sr=class extends Oe{constructor(e,t,r,i,s,o,l,a){super(e,t,r,i,s,o,l),this.spec=a}update(e,t,r,i){if(this.dirty==ce)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function ro(n,e,t){let r=n.firstChild,i=!1;for(let s=0;s>1,l=Math.min(o,e.length);for(;s-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let f=He.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,f),this.top=f,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof He)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(i-1))break;--i,s.set(l,i),o.push(l)}}return{index:i,matched:s,matches:o.reverse()}}function Wa(n,e){return n.type.side-e.type.side}function Ha(n,e,t,r){let i=e.locals(n),s=0;if(i.length==0){for(let c=0;cs;)l.push(i[o++]);let p=s+u.nodeSize;if(u.isText){let g=p;o!g.inline):l.slice();r(u,m,e.forChild(s,u),h),s=p}}function Ja(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function ja(n,e,t,r){for(let i=0,s=0;i=t){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function wr(n,e,t,r,i){let s=[];for(let o=0,l=0;o=t||f<=e?s.push(a):(ct&&s.push(a.slice(t-c,a.size,r)))}return s}function zr(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),s=i&&i.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,c;if(fn(t)){for(a=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&C.isSelectable(d)&&i.parent&&!(d.isInline&&Sa(t.focusNode,t.focusOffset,i.dom))){let u=i.posBefore;c=new C(o==u?l:r.resolve(u))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let d=o,u=o;for(let h=0;h{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!oo(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Ka(n){let e=n.domSelection();if(!e)return;let t=n.cursorWrapper.dom,r=t.nodeName=="IMG";r?e.collapse(t.parentNode,H(t)+1):e.collapse(t,0),!r&&!n.state.selection.visible&&Z&&ve<=11&&(t.disabled=!0,t.disabled=!1)}function lo(n,e){if(e instanceof C){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(As(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else As(n)}function As(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Br(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||T.between(e,t,r)}function Ds(n){return n.editable&&!n.hasFocus()?!1:ao(n)}function ao(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function qa(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Ke(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Cr(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),s=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return s&&E.findFrom(s,e)}function Ee(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Rs(n,e,t){let r=n.state.selection;if(r instanceof T)if(t.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=n.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Ee(n,new T(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=Cr(n.state,e);return i&&i instanceof C?Ee(n,i):!1}else if(!(ie&&t.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=n.docView.descAt(l))&&!o.contentDOM?C.isSelectable(s)?Ee(n,new C(e<0?n.state.doc.resolve(i.pos-s.nodeSize):i)):Dt?Ee(n,new T(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof C&&r.node.isInline)return Ee(n,new T(e>0?r.$to:r.$from));{let i=Cr(n.state,e);return i?Ee(n,i):!1}}}function nn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Tt(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function it(n,e){return e<0?Ua(n):Ya(n)}function Ua(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,s,o=!1;for(oe&&t.nodeType==1&&r0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Tt(l,-1))i=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(co(t))break;{let l=t.previousSibling;for(;l&&Tt(l,-1);)i=t.parentNode,s=H(l),l=l.previousSibling;if(l)t=l,r=nn(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?Tr(n,t,r):i&&Tr(n,i,s)}function Ya(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=nn(t),s,o;for(;;)if(r{n.state==i&&ke(n)},50)}function Ps(n,e){let t=n.state.doc.resolve(e);if(!(J||Gs)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Is(n,e,t){let r=n.state.selection;if(r instanceof T&&!r.empty||t.indexOf("s")>-1||ie&&t.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=Cr(n.state,e);if(o&&o instanceof C)return Ee(n,o)}if(!i.parent.inlineContent){let o=e<0?i:s,l=r instanceof U?E.near(o,e):E.findFrom(o,e);return l?Ee(n,l):!1}return!1}function zs(n,e){if(!(n.state.selection instanceof T))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let o=n.state.tr;return e<0?o.delete(t.pos-s.nodeSize,t.pos):o.delete(t.pos,t.pos+s.nodeSize),n.dispatch(o),!0}return!1}function Bs(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function Qa(n){if(!K||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Bs(n,r,"true"),setTimeout(()=>Bs(n,r,"false"),20)}return!1}function Za(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function ec(n,e){let t=e.keyCode,r=Za(e);if(t==8||ie&&t==72&&r=="c")return zs(n,-1)||it(n,-1);if(t==46&&!e.shiftKey||ie&&t==68&&r=="c")return zs(n,1)||it(n,1);if(t==13||t==27)return!0;if(t==37||ie&&t==66&&r=="c"){let i=t==37?Ps(n,n.state.selection.from)=="ltr"?-1:1:-1;return Rs(n,i,r)||it(n,i)}else if(t==39||ie&&t==70&&r=="c"){let i=t==39?Ps(n,n.state.selection.from)=="ltr"?1:-1:1;return Rs(n,i,r)||it(n,i)}else{if(t==38||ie&&t==80&&r=="c")return Is(n,-1,r)||it(n,-1);if(t==40||ie&&t==78&&r=="c")return Qa(n)||Is(n,1,r)||it(n,1);if(r==(ie?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Fr(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=n.someProp("clipboardSerializer")||he.fromSchema(n.state.schema),l=go(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let c=a.firstChild,f,d=0;for(;c&&c.nodeType==1&&(f=mo[c.nodeName.toLowerCase()]);){for(let h=f.length-1;h>=0;h--){let p=l.createElement(f[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(t)}`);let u=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,` + +`);return{dom:a,text:u,slice:e}}function fo(n,e,t,r,i){let s=i.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=!!e&&(r||s||!t);if(a){if(n.someProp("transformPastedText",u=>{e=u(e,s||r,n)}),s)return l=new x(b.from(n.state.schema.text(e.replace(/\r\n?/g,` +`))),0,0),n.someProp("transformPasted",u=>{l=u(l,n,!0)}),l;let d=n.someProp("clipboardTextParser",u=>u(e,i,r,n));if(d)l=d;else{let u=i.marks(),{schema:h}=n.state,p=he.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,u)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),o=ic(t),Dt&&sc(o);let c=o&&o.querySelector("[data-pm-slice]"),f=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let d=+f[3];d>0;d--){let u=o.firstChild;for(;u&&u.nodeType!=1;)u=u.nextSibling;if(!u)break;o=u}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||fe.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||f),context:i,ruleFromNode(u){return u.nodeName=="BR"&&!u.nextSibling&&u.parentNode&&!tc.test(u.parentNode.nodeName)?{ignore:!0}:null}})),f)l=oc(Fs(l,+f[1],+f[2]),f[4]);else if(l=x.maxOpen(nc(l.content,i),!0),l.openStart||l.openEnd){let d=0,u=0;for(let h=l.content.firstChild;d{l=d(l,n,a)}),l}var tc=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function nc(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(n.forEach(l=>{if(!o)return;let a=i.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&s.length&&ho(a,s,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=po(o[o.length-1],s.length));let f=uo(l,a);o.push(f),i=i.matchType(f.type),s=a}}),o)return b.from(o)}return n}function uo(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,b.from(n));return n}function ho(n,e,t,r,i){if(i1&&(s=0),i=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(l))}function Fs(n,e,t){return et})),dr.createHTML(n)):n}function ic(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=go(),r=t.body,i=/<([a-z][^>\s]+)/i.exec(n),s;if((s=i&&mo[i[1].toLowerCase()])&&(n=s.map(o=>"<"+o+">").join("")+n+s.map(o=>"").reverse().join("")),r.innerHTML=rc(n),s)for(let o=0;o=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=b.from(a.create(r[l+1],i)),s++,o++}return new x(i,s,o)}var Y={},G={},lc={touchstart:!0,touchmove:!0},Er=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function ac(n){for(let e in Y){let t=Y[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{fc(n,r)&&!Lr(n,r)&&(n.editable||!(r.type in G))&&t(n,r)},lc[e]?{passive:!0}:void 0)}K&&n.dom.addEventListener("input",()=>null),vr(n)}function Se(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function cc(n){n.input.mouseDown&&n.input.mouseDown.done(),n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function vr(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Lr(n,r))})}function Lr(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function fc(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function dc(n,e){!Lr(n,e)&&Y[e.type]&&(n.editable||!(e.type in G))&&Y[e.type](n,e)}G.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!xo(n)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(xe&&J&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),lt&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,Ve(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||ec(n,t)?t.preventDefault():Se(n,"key")};G.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};G.keypress=(n,e)=>{let t=e;if(xo(n)||!t.charCode||t.ctrlKey&&!t.altKey||ie&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof T)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode),s=()=>n.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i,s))&&n.dispatch(s()),t.preventDefault()}};function Rt(n){return{left:n.clientX,top:n.clientY}}function uc(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Vr(n,e,t,r,i){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(n.someProp(e,l=>o>s.depth?l(n,t,s.nodeAfter,s.before(o),i,!0):l(n,t,s.node(o),s.before(o),i,!1)))return!0;return!1}function Pt(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function hc(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&C.isSelectable(r)?(Pt(n,new C(t),"pointer"),!0):!1}function pc(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof C&&(r=t.node);let s=n.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(C.isSelectable(l)){r&&t.$from.depth>0&&o>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?i=s.before(t.$from.depth):i=s.before(o);break}}return i!=null?(Pt(n,C.create(n.state.doc,i),"pointer"),!0):!1}function mc(n,e,t,r,i){return Vr(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(i?pc(n,t):hc(n,t))}function gc(n,e,t,r){return Vr(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function yc(n,e,t,r){return Vr(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||bc(n,t,r)}function bc(n,e,t){if(t.button!=0)return!1;let r=yo(n,e,!0),i=n.state.doc;return r?(Pt(n,r,"pointer"),r instanceof T&&i.eq(n.state.doc)&&(n.input.mouseDown=new Ar(n,r)),!0):!1}function yo(n,e,t){let r=n.state.doc;if(e==-1)return r.inlineContent?T.create(r,0,r.content.size):null;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(o.inlineContent)return T.create(r,l+1,l+1+o.content.size);if(t&&C.isSelectable(o))return C.create(r,l)}return null}function $r(n){return sn(n)}var bo=ie?"metaKey":"ctrlKey";Y.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=$r(n),i=Date.now(),s="singleClick";i-n.input.lastClick.time<500&&uc(t,n.input.lastClick)&&!t[bo]&&n.input.lastClick.button==t.button&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:s,button:t.button},n.input.mouseDown&&n.input.mouseDown.done();let o=n.posAtCoords(Rt(t));o&&(s=="singleClick"?n.input.mouseDown=new Or(n,o,t,!!r):(s=="doubleClick"?gc:yc)(n,o.pos,o.inside,t)?t.preventDefault():Se(n,"pointer"))};var rn=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},Or=class extends rn{constructor(e,t,r,i){super(e),this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[bo],this.allowDefault=r.shiftKey;let s,o;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),o=t.inside;else{let f=e.state.doc.resolve(t.pos);s=f.parent,o=f.depth?f.before():0}let l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof C&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&oe&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Se(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||ke(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Rt(e))),this.updateAllowDefault(e),this.allowDefault||!t?Se(this.view,"pointer"):mc(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||K&&this.mightDrag&&!this.mightDrag.node.isAtom||J&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Pt(this.view,E.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Se(this.view,"pointer")}move(e){this.updateAllowDefault(e),Se(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},Ar=class extends rn{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Se(this.view,"pointer");let t=this.view.posAtCoords(Rt(e)),r=t&&yo(this.view,t.inside,!1);if(!r)return;let{doc:i}=this.view.state,s=this.startSelection,[o,l]=r.from{n.input.lastTouch=Date.now(),$r(n),Se(n,"pointer")};Y.touchmove=n=>{n.input.lastTouch=Date.now(),Se(n,"pointer")};Y.contextmenu=n=>$r(n);function xo(n,e){return n.composing?!0:K&&Math.abs(Date.now()-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}var xc=xe?5e3:-1;G.compositionstart=G.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof T&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||J&&Gs&&Sc(n)))n.markCursor=n.state.storedMarks||t.marks(),sn(n,!0),n.markCursor=null;else if(sn(n,!e.selection.empty),oe&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let l=n.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}n.input.composing=!0}So(n,xc)};function Sc(n){let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let r=e.childNodes[t];return r.nodeType==1&&r.contentEditable=="false"}G.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=Date.now(),n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.badSafariComposition?n.domObserver.forceFlush():n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,So(n,20))};function So(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>sn(n),e))}function ko(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=Date.now());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function kc(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=ba(e.focusNode,e.focusOffset),r=xa(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,s=n.domObserver.lastChangedTextNode;if(t==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function sn(n,e=!1){if(!(xe&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),ko(n),e||n.docView&&n.docView.dirty){let t=zr(n),r=n.state.selection;return t&&!t.eq(r)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function Mc(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}var Nt=Z&&ve<15||lt&&wa<604;Y.copy=G.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let s=Nt?null:t.clipboardData,o=r.content(),{dom:l,text:a}=Fr(n,o);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):Mc(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function wc(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function Cc(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Et(n,r.value,null,i,e):Et(n,r.textContent,r.innerHTML,i,e)},50)}function Et(n,e,t,r,i){let s=fo(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,s||x.empty)))return!0;if(!s)return!1;let o=wc(s),l=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(s);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Mo(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}G.paste=(n,e)=>{let t=e;if(n.composing&&!xe)return;let r=Nt?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Et(n,Mo(r),r.getData("text/html"),i,t)?t.preventDefault():Cc(n,t)};var on=class{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}},Tc=ie?"altKey":"ctrlKey";function wo(n,e){let t;return n.someProp("dragCopies",r=>{t=t||r(e)}),t!=null?!t:!e[Tc]}Y.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,s=i.empty?null:n.posAtCoords(Rt(t)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof C?i.to-1:i.to))){if(r&&r.mightDrag)o=C.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(o=C.create(n.state.doc,d.posBefore))}}let l=(o||n.state.selection).content(),{dom:a,text:c,slice:f}=Fr(n,l);(!t.dataTransfer.files.length||!J||Ys>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Nt?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Nt||t.dataTransfer.setData("text/plain",c),n.dragging=new on(f,wo(n,t),o)};Y.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};G.dragover=G.dragenter=(n,e)=>e.preventDefault();G.drop=(n,e)=>{try{Nc(n,e,n.dragging)}finally{n.dragging=null}};function Nc(n,e,t){if(!e.dataTransfer)return;let r=n.posAtCoords(Rt(e));if(!r)return;let i=n.state.doc.resolve(r.pos),s=t&&t.slice;s?n.someProp("transformPasted",h=>{s=h(s,n,!1)}):s=fo(n,Mo(e.dataTransfer),Nt?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&wo(n,e));if(n.someProp("handleDrop",h=>h(n,e,s||x.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let l=s?Wi(n.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let a=n.state.tr;if(o){let{node:h}=t;h?h.replace(a):a.deleteSelection()}let c=a.mapping.map(l),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=a.doc;if(f?a.replaceRangeWith(c,c,s.content.firstChild):a.replaceRange(c,c,s),a.doc.eq(d))return;let u=a.doc.resolve(c);if(f&&C.isSelectable(s.content.firstChild)&&u.nodeAfter&&u.nodeAfter.sameMarkup(s.content.firstChild))a.setSelection(new C(u));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((p,m,g,y)=>h=y),a.setSelection(Br(n,u,a.doc.resolve(h)))}n.focus(),n.dispatch(a.setMeta("uiEvent","drop"))}Y.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&ke(n)},20))};Y.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Y.beforeinput=(n,e)=>{if(xe&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,Ve(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in G)Y[n]=G[n];function vt(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}var ln=class n{constructor(e,t){this.toDOM=e,this.spec=t||je,this.side=this.spec.side||0}map(e,t,r,i){let{pos:s,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new Ae(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof n&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&vt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},Je=class n{constructor(e,t){this.attrs=e,this.spec=t||je}map(e,t,r,i){let s=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new Ae(s,o,this)}valid(e,t){return t.from=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let o=0;oe){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,r,i+l,s)}}map(e,t,r){return this==_||e.maps.length==0?this:this.mapInner(e,t,0,0,r||je)}mapInner(e,t,r,i,s){let o;for(let l=0;l{let c=a+r,f;if(f=To(t,l,c)){for(i||(i=this.children.slice());sl&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,o=s+t.content.size;for(let l=0;ls&&a.type instanceof Je){let c=Math.max(s,a.from)-s,f=Math.min(o,a.to)-s;ci.map(e,t,je));return n.from(r)}forChild(e,t){if(t.isLeaf)return ae.empty;let r=[];for(let i=0;it instanceof ae)?e:e.reduce((t,r)=>t.concat(r instanceof ae?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let g=m-p-(h-u);for(let y=0;yS+f-d)continue;let k=l[y]+f-d;h>=k?l[y+1]=u<=k?-2:-1:u>=f&&g&&(l[y]+=g,l[y+1]+=g)}d+=g}),f=t.maps[c].map(f,-1)}let a=!1;for(let c=0;c=r.content.size){a=!0;continue}let u=t.map(n[c+1]+s,-1),h=u-i,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,f+1,n[c]+s+1,o);y!=_?(l[c]=d,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=vc(l,n,e,t,i,s,o),f=cn(c,r,0,o);e=f.local;for(let d=0;dt&&o.to{let c=To(n,l,a+t);if(c){s=!0;let f=cn(c,l,t+a+1,r);f!=_&&i.push(a,a+l.nodeSize,f)}});let o=Co(s?No(n):n,-t).sort(_e);for(let l=0;l0;)e++;n.splice(e,0,t)}function ur(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=_&&e.push(r)}),n.cursorWrapper&&e.push(ae.create(n.state.doc,[n.cursorWrapper.deco])),an.from(e)}var Oc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ac=Z&&ve<=11,Rr=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},Pr=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Rr,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():K&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Ac&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Oc)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Ds(this.view)){if(this.suppressingSelectionUpdates)return ke(this.view);if(Z&&ve<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ke(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let s=e.focusNode;s;s=ot(s))t.add(s);for(let s=e.anchorNode;s;s=ot(s))if(t.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Ds(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,l=!1,a=[];if(e.editable)for(let f=0;ff.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||J&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(f=>f.type=="childList"&&f.removedNodes.length))){for(let f of a)if(f.nodeName=="BR"&&f.parentNode){let d=f.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){f.parentNode.removeChild(f);break}d=d.firstChild}}}else if(oe&&a.length){let f=a.filter(d=>d.nodeName=="BR");if(f.length==2){let[d,u]=f;d.parentNode&&d.parentNode.parentNode==u.parentNode?u.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let u of f){let h=u.parentNode;h&&h.nodeName=="LI"&&(!d||Pc(e,d)!=h)&&u.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),Dc(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Ic(e,a)),this.handleDOMChange(s,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ke(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let f=0;fs;y--){let S=i.childNodes[y-1],k=S.pmViewDesc;if(S.nodeName=="BR"&&!k){o=y;break}if(!k||k.size)break}let u=n.state.doc,h=n.someProp("domParser")||fe.fromSchema(n.state.schema),p=u.resolve(l),m=null,g=h.parse(i,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:s,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:Bc(r),context:p});if(f&&f[0].pos!=null){let y=f[0].pos,S=f[1]&&f[1].pos;S==null&&(S=y),m={anchor:y+l,head:S+l}}return{doc:g,sel:m,from:l,to:a}}var Bc=n=>e=>{let t=e.pmViewDesc;if(t)return t.parseRule(n);if(e.nodeName=="BR"&&e.parentNode){if(K&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||K&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},Fc=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Lc(n,e,t,r,i){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let w=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,O=zr(n,w);if(O&&!n.state.selection.eq(O)){if(J&&xe&&n.input.lastKeyCode===13&&Date.now()-100q(n,Ve(13,"Enter"))))return;let R=n.state.tr.setSelection(O);w=="pointer"?R.setMeta("pointer",!0):w=="key"&&R.scrollIntoView(),s&&R.setMeta("composition",s),n.dispatch(R)}return}let o=n.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=zc(n,e,t,i),f=n.state.doc,d=f.slice(c.from,c.to),u,h;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||xe)&&i.some(w=>w.nodeType==1&&!Fc.test(w.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",w=>w(n,Ve(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof T&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let w=Hs(n,n.state.doc,c.sel);if(w&&!w.eq(n.state.selection)){let O=n.state.tr.setSelection(w);s&&O.setMeta("composition",s),n.dispatch(O)}}return}n.state.selection.fromn.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),Z&&ve<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=f.resolve(p.start),S=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA;if((lt&&n.input.lastIOSEnter>Date.now()-225&&(!S||i.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!S&&m.posw(n,Ve(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&$c(f,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",w=>w(n,Ve(8,"Backspace")))){xe&&J&&n.domObserver.suppressSelectionUpdates();return}J&&p.endB==p.start&&(n.input.lastChromeDelete=Date.now()),xe&&!S&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(w){return w(n,Ve(13,"Enter"))})},20));let k=p.start,v=p.endA,N=w=>{let O=w||n.state.tr.replace(k,v,c.doc.slice(p.start-c.from,p.endB-c.from));if(c.sel){let R=Hs(n,O.doc,c.sel);R&&!(J&&n.composing&&R.empty&&(p.start!=p.endB||n.input.lastChromeDeleteke(n),20));let w=N(n.state.tr.delete(k,v)),O=f.resolve(p.start).marksAcross(f.resolve(p.endA));O&&w.ensureMarks(O),n.dispatch(w)}else if(p.endA==p.endB&&(D=Vc(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start())))){let w=N(n.state.tr);D.type=="add"?w.addMark(k,v,D.mark):w.removeMark(k,v,D.mark),n.dispatch(w)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let w=m.parent.textBetween(m.parentOffset,g.parentOffset),O=()=>N(n.state.tr.insertText(w,k,v));n.someProp("handleTextInput",R=>R(n,k,v,w,O))||n.dispatch(O())}else n.dispatch(N());else n.dispatch(N())}function Hs(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Br(n,e.resolve(t.anchor),e.resolve(t.head))}function Vc(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,s=r,o,l,a;for(let f=0;ff.mark(l.addToSet(f.marks));else if(i.length==0&&s.length==1)l=s[0],o="remove",a=f=>f.mark(l.removeFromSet(f.marks));else return null;let c=[];for(let f=0;ft||hr(o,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function Wc(n,e,t,r,i){let s=n.findDiffStart(e,t),o=t+n.size,l=t+e.size;if(s==null)return null;let{a,b:c}=n.findDiffEnd(e,o,l);if(i=="end"){let f=Math.max(0,s-Math.min(a,c));r-=a+f-s}if(a=a?s-r:0;s-=f,c=s+(c-a),a=s}else if(c=c?s-r:0;s-=f,a=s+(a-c),c=s}return{start:s,endA:a,endB:c}}var Ot=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Er,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(qs),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=_s(this),js(this),this.nodeViews=Ks(this),this.docView=Ts(this.state.doc,Js(this),ur(this),this.dom,this),this.domObserver=new Pr(this,(r,i,s,o)=>Lc(this,r,i,s,o)),this.domObserver.start(),ac(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&vr(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(qs),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(ko(this),o=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=Ks(this);Jc(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&vr(this),this.editable=_s(this),js(this);let a=ur(this),c=Js(this),f=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(i.selection))&&(o=!0);let u=f=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Na(this);if(o){this.domObserver.stop();let h=d&&(Z||J)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Hc(i.selection,e.selection);if(d){let m=J?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=kc(this)),(s||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Ts(e.doc,c,a,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}let p=this.input.mouseDown;h||!(p&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&qa(this)&&p.delaySelUpdate())?ke(this,h):(lo(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),f=="reset"?this.dom.scrollTop=0:f=="to selection"?this.scrollToSelection():u&&Ea(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof C){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Ss(this,t.getBoundingClientRect(),e)}else Ss(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Pa(this,e)}coordsAtPos(e,t=1){return to(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return La(this,t||this.state,e)}pasteHTML(e,t){return Et(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Et(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Fr(this,e)}destroy(){this.docView&&(cc(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ur(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ga())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return dc(this,e)}domSelectionRange(){let e=this.domSelection();return e?K&&this.root.nodeType===11&&ka(this.dom.ownerDocument)==this.dom&&Rc(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};Ot.prototype.dispatch=function(n){let e=this._props.dispatchTransaction;e?e.call(this,n):this.updateState(this.state.apply(n))};function Js(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[Ae.node(0,n.state.doc.content.size,e)]}function js(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:Ae.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function _s(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Hc(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Ks(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Jc(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function qs(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Me={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},un={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},jc=typeof navigator<"u"&&/Mac/.test(navigator.platform),_c=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(B=0;B<10;B++)Me[48+B]=Me[96+B]=String(B);var B;for(B=1;B<=24;B++)Me[B+111]="F"+B;var B;for(B=65;B<=90;B++)Me[B]=String.fromCharCode(B+32),un[B]=String.fromCharCode(B);var B;for(dn in Me)un.hasOwnProperty(dn)||(un[dn]=Me[dn]);var dn;function Eo(n){var e=jc&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||_c&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?un:Me)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var Kc=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),qc=typeof navigator<"u"&&/Win/.test(navigator.platform);function Uc(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,s,o;for(let l=0;l{for(var t in e)Xc(n,t,{get:e[t],enumerable:!0})};function kn(n){let{state:e,transaction:t}=n,{selection:r}=t,{doc:i}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,s=t.storedMarks,t}}}var Mn=class{constructor(n){this.editor=n.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=n.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:n,editor:e,state:t}=this,{view:r}=e,{tr:i}=t,s=this.buildProps(i);return Object.fromEntries(Object.entries(n).map(([o,l])=>[o,(...c)=>{let f=l(...c)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(n,e=!0){let{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o=[],l=!!n,a=n||i.tr,c=()=>(!l&&e&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(a),o.every(d=>d===!0)),f={...Object.fromEntries(Object.entries(t).map(([d,u])=>[d,(...p)=>{let m=this.buildProps(a,e),g=u(...p)(m);return o.push(g),f}])),run:c};return f}createCan(n){let{rawCommands:e,state:t}=this,r=!1,i=n||t.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...c)=>a(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(n,e=!0){let{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o={tr:n,editor:r,view:s,state:kn({state:i,transaction:n}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(n,e),can:()=>this.createCan(n),get commands(){return Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...c)=>a(...c)(o)]))}};return o}},$o={};Yr($o,{blur:()=>Qc,clearContent:()=>Zc,clearNodes:()=>ef,command:()=>tf,createParagraphNear:()=>nf,cut:()=>rf,deleteCurrentNode:()=>sf,deleteNode:()=>of,deleteRange:()=>lf,deleteSelection:()=>ff,enter:()=>df,exitCode:()=>uf,extendMarkRange:()=>hf,first:()=>pf,focus:()=>gf,forEach:()=>yf,insertContent:()=>bf,insertContentAt:()=>Sf,insertDefaultBlock:()=>kf,joinBackward:()=>Cf,joinDown:()=>wf,joinForward:()=>Tf,joinItemBackward:()=>Nf,joinItemForward:()=>Ef,joinTextblockBackward:()=>vf,joinTextblockForward:()=>Of,joinUp:()=>Mf,keyboardShortcut:()=>Df,lift:()=>Rf,liftEmptyBlock:()=>Pf,liftListItem:()=>If,newlineInCode:()=>zf,resetAttributes:()=>Bf,scrollIntoView:()=>Ff,selectAll:()=>Lf,selectNodeBackward:()=>Vf,selectNodeForward:()=>$f,selectParentNode:()=>Wf,selectTextblockEnd:()=>Hf,selectTextblockStart:()=>Jf,setContent:()=>jf,setMark:()=>fd,setMeta:()=>dd,setNode:()=>ud,setNodeSelection:()=>hd,setTextDirection:()=>pd,setTextSelection:()=>md,sinkListItem:()=>gd,splitBlock:()=>yd,splitListItem:()=>bd,toggleList:()=>Sd,toggleMark:()=>kd,toggleNode:()=>Md,toggleWrap:()=>wd,undoInputRule:()=>Cd,unsetAllMarks:()=>Td,unsetMark:()=>Nd,unsetTextDirection:()=>Ed,updateAttributes:()=>vd,wrapIn:()=>Od,wrapInList:()=>Ad});var Qc=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window?.getSelection())==null||t.removeAllRanges())}),!0),Zc=(n=!0)=>({commands:e})=>e.setContent("",{emitUpdate:n}),ef=()=>({state:n,tr:e,dispatch:t})=>{let{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:s,$to:o})=>{n.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;let{doc:c,mapping:f}=e,d=c.resolve(f.map(a)),u=c.resolve(f.map(a+l.nodeSize)),h=d.blockRange(u);if(!h)return;let p=ge(h);if(l.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},tf=n=>e=>n(e),nf=()=>({state:n,dispatch:e})=>rr(n,e),rf=(n,e)=>({editor:t,tr:r})=>{let{state:i}=t,s=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);let o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new T(r.doc.resolve(Math.max(o-1,0)))),!0},sf=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;let i=n.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){let l=i.before(s),a=i.after(s);n.delete(l,a).scrollIntoView()}return!0}return!1};function V(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var of=n=>({tr:e,state:t,dispatch:r})=>{let i=V(n,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){let a=s.before(o),c=s.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},lf=n=>({tr:e,dispatch:t})=>{let{from:r,to:i}=n;return t&&e.delete(r,i),!0},af=n=>n.content?/^text(\*|\+)/.test(n.content):!1,Oo=(n,e,t)=>{if(!n.parent.isInline||t==="left"&&n.pos>n.start()||t==="right"&&n.pos{let r=Oo(n,t,"left"),i=Oo(e,t,"right");return{from:r,to:i}},ff=()=>({state:n,dispatch:e})=>{if(n.selection.empty)return!1;if(e){let t=n.tr,{ranges:r}=n.selection,i=t.steps.length;r.forEach(s=>{let o=t.mapping.slice(i),l=t.doc.resolve(o.map(s.$from.pos)),a=t.doc.resolve(o.map(s.$to.pos)),{from:c,to:f}=cf(l,a,n.schema);t.deleteRange(c,f)}),t.selection.empty||t.setSelection(T.near(t.doc.resolve(t.selection.from))),t.scrollIntoView(),e(t)}return!0},df=()=>({commands:n})=>n.keyboardShortcut("Enter"),uf=()=>({state:n,dispatch:e})=>nr(n,e);function Gr(n){return Object.prototype.toString.call(n)==="[object RegExp]"}function bn(n,e,t={strict:!0}){let r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:Gr(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function Wo(n,e,t={}){return n.find(r=>r.type===e&&bn(Object.fromEntries(Object.keys(t).map(i=>[i,r.attrs[i]])),t))}function Ao(n,e,t={}){return!!Wo(n,e,t)}function Xr(n,e,t){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=n.parent.childBefore(n.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e))return;if(!t){let c=r.node.marks.find(f=>f.type===e);c&&(t=c.attrs)}if(!Wo([...r.node.marks],e,t))return;let s=r.index,o=n.start()+r.offset,l=s+1,a=o+r.node.nodeSize;for(;s>0&&Ao([...n.parent.child(s-1).marks],e,t);)s-=1,o-=n.parent.child(s).nodeSize;for(;l({tr:t,state:r,dispatch:i})=>{let s=we(n,r.schema),{doc:o,selection:l}=t,{$from:a,from:c,to:f}=l;if(i){let d=Xr(a,s,e);if(d&&d.from<=c&&d.to>=f){let u=T.create(o,d.from,d.to);t.setSelection(u)}}return!0},pf=n=>e=>{let t=typeof n=="function"?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};let o=()=>{(xn()||Do())&&r.dom.focus(),mf()&&!xn()&&!Do()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e?.scrollIntoView&&t.commands.scrollIntoView())})};try{if(r.hasFocus()&&n===null||n===!1)return!0}catch{return!1}if(s&&n===null&&!Ho(t.state.selection))return o(),!0;let l=Kr(i.doc,n)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},yf=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),bf=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),Jo=n=>{let e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){let r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&Jo(r)}return n};function hn(n){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return Jo(t)}function at(n,e,t){if(n instanceof Q||n instanceof b)return n;t={slice:!0,parseOptions:{},...t};let r=typeof n=="object"&&n!==null,i=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return b.fromArray(n.map(l=>e.nodeFromJSON(l)));let o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",s),at("",e,t)}if(i){if(t.errorOnInvalidContent){let o=!1,l="",a=new Ge({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?fe.fromSchema(a).parseSlice(hn(n),t.parseOptions):fe.fromSchema(a).parse(hn(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let s=fe.fromSchema(e);return t.slice?s.parseSlice(hn(n),t.parseOptions).content:s.parse(hn(n),t.parseOptions)}return at("",e,t)}function jo(n,e,t){let r=n.steps.length-1;if(r{o===0&&(o=f)}),n.setSelection(E.near(n.doc.resolve(o),t))}var xf=n=>!("type"in n),Sf=(n,e,t)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l,a=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{at(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){a(g)}try{l=at(e,s.schema,{parseOptions:c,errorOnInvalidContent:(o=t.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(g){return a(g),!1}let{from:f,to:d}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},u=!0,h=!0;if((xf(l)?l:[l]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,h=h?g.isBlock:!1}),f===d&&h){let{parent:g}=r.doc.resolve(f);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(f-=1,d+=1)}let m;if(u){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof b){let g="";e.forEach(y=>{y.text&&(g+=y.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,f,d)}else{m=l;let g=r.doc.resolve(f),y=g.node(),S=g.parentOffset===0,k=y.isText||y.isTextblock,v=y.content.size>0;S&&k&&v&&h&&(f=Math.max(0,f-1)),r.replaceWith(f,d,m)}t.updateSelection&&jo(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:f,text:m}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:f,text:m})}return!0};function _o(n){for(let e=0;e({tr:e,dispatch:t,editor:r})=>{let{pos:i,attrs:s,content:o,updateSelection:l=!0}=n,a;typeof i=="number"?a=e.doc.resolve(i):i?a=i:a=e.selection.$from;let c=_o(a.parent.contentMatchAt(a.index()));if(!c)return!1;let f=Object.keys(c.spec.attrs||{}),d=s?Object.fromEntries(Object.entries(s).filter(([h])=>f.includes(h))):{},u;if(o){let h=at(o,r.schema);u=c.createAndFill(d,h)}else u=c.createAndFill(d);return u?(t&&(e.insert(a.pos,u),l&&jo(e,e.steps.length-1,-1)),!0):!1},Mf=()=>({state:n,dispatch:e})=>as(n,e),wf=()=>({state:n,dispatch:e})=>cs(n,e),Cf=()=>({state:n,dispatch:e})=>Un(n,e),Tf=()=>({state:n,dispatch:e})=>Xn(n,e),Nf=()=>({state:n,dispatch:e,tr:t})=>{try{let r=Fe(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},Ef=()=>({state:n,dispatch:e,tr:t})=>{try{let r=Fe(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},vf=()=>({state:n,dispatch:e})=>rs(n,e),Of=()=>({state:n,dispatch:e})=>is(n,e);function Ko(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Af(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t==="Space"&&(t=" ");let r,i,s,o;for(let l=0;l({editor:e,view:t,tr:r,dispatch:i})=>{let s=Af(n).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a?.steps.forEach(c=>{let f=c.map(r.mapping);f&&i&&r.maybeStep(f)}),!0};function Ft(n,e,t={}){let{from:r,to:i,empty:s}=n.selection,o=e?V(e,n.schema):null,l=[];n.doc.nodesBetween(r,i,(d,u)=>{if(d.isText)return;let h=Math.max(r,u),p=Math.min(i,u+d.nodeSize);l.push({node:d,from:h,to:p})});let a=i-r,c=l.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>bn(d.node.attrs,t,{strict:!1}));return s?!!c.length:c.reduce((d,u)=>d+u.to-u.from,0)>=a}var Rf=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return Ft(t,i,e)?fs(t,r):!1},Pf=()=>({state:n,dispatch:e})=>ir(n,e),If=n=>({state:e,dispatch:t})=>{let r=V(n,e.schema);return gs(r)(e,t)},zf=()=>({state:n,dispatch:e})=>er(n,e);function wn(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function Ro(n,e){let t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var Bf=(n,e)=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=wn(typeof n=="string"?n:n.name,r.schema);if(!l)return!1;l==="node"&&(s=V(n,r.schema)),l==="mark"&&(o=we(n,r.schema));let a=!1;return t.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(f,d)=>{s&&s===f.type&&(a=!0,i&&t.setNodeMarkup(d,void 0,Ro(f.attrs,e))),o&&f.marks.length&&f.marks.forEach(u=>{o===u.type&&(a=!0,i&&t.addMark(d,d+f.nodeSize,o.create(Ro(u.attrs,e))))})})}),a},Ff=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),Lf=()=>({tr:n,dispatch:e})=>{if(e){let t=new U(n.doc);n.setSelection(t)}return!0},Vf=()=>({state:n,dispatch:e})=>Yn(n,e),$f=()=>({state:n,dispatch:e})=>Qn(n,e),Wf=()=>({state:n,dispatch:e})=>ds(n,e),Hf=()=>({state:n,dispatch:e})=>or(n,e),Jf=()=>({state:n,dispatch:e})=>sr(n,e);function qr(n,e,t={},r={}){return at(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}var jf=(n,{errorOnInvalidContent:e,emitUpdate:t=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:l})=>{let{doc:a}=s;if(r.preserveWhitespace!=="full"){let c=qr(n,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return o&&s.replaceWith(0,a.content.size,c).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),l.insertContentAt({from:0,to:a.content.size},n,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function qo(n,e){let t=we(e,n.schema),{from:r,to:i,empty:s}=n.selection,o=[];s?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,a=>{o.push(...a.marks)});let l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function _f(n,e){let t=new Ze(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function mh(n,e,t){let r=[];return n.nodesBetween(e.from,e.to,(i,s)=>{t(i)&&r.push({node:i,pos:s})}),r}function Kf(n,e){for(let t=n.depth;t>0;t-=1){let r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Cn(n){return e=>Kf(e.$from,n)}function M(n,e,t){return n.config[e]===void 0&&n.parent?M(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?M(n.parent,e,t):null}):n.config[e]}function Qr(n){return n.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},r=M(e,"addExtensions",t);return r?[e,...Qr(r())]:e}).flat(10)}function Zr(n,e){let t=he.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}function Uo(n){return typeof n=="function"}function P(n,e=void 0,...t){return Uo(n)?e?n.bind(e)(...t):n(...t):n}function qf(n={}){return Object.keys(n).length===0&&n.constructor===Object}function ct(n){let e=n.filter(i=>i.type==="extension"),t=n.filter(i=>i.type==="node"),r=n.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Yo(n){let e=[],{nodeExtensions:t,markExtensions:r}=ct(n),i=[...t,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=t.filter(c=>c.name!=="text").map(c=>c.name),l=r.map(c=>c.name),a=[...o,...l];return n.forEach(c=>{let f={name:c.name,options:c.options,storage:c.storage,extensions:i},d=M(c,"addGlobalAttributes",f);if(!d)return;d().forEach(h=>{let p;Array.isArray(h.types)?p=h.types:h.types==="*"?p=a:h.types==="nodes"?p=o:h.types==="marks"?p=l:p=[],p.forEach(m=>{Object.entries(h.attributes).forEach(([g,y])=>{e.push({type:m,name:g,attribute:{...s,...y}})})})})}),i.forEach(c=>{let f={name:c.name,options:c.options,storage:c.storage},d=M(c,"addAttributes",f);if(!d)return;let u=d();Object.entries(u).forEach(([h,p])=>{let m={...s,...p};typeof m?.default=="function"&&(m.default=m.default()),m?.isRequired&&m?.default===void 0&&delete m.default,e.push({type:c.name,name:h,attribute:m})})}),e}function Uf(n){let e=[],t="",r=!1,i=!1,s=0,o=n.length;for(let l=0;l0){s-=1,t+=a;continue}if(a===";"&&s===0){e.push(t),t="";continue}}t+=a}return t&&e.push(t),e}function Po(n){let e=[],t=Uf(n||""),r=t.length;for(let i=0;i!!e).reduce((e,t)=>{let r={...e};return Object.entries(t).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){let l=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],c=l.filter(f=>!a.includes(f));r[i]=[...a,...c].join(" ")}else if(i==="style"){let l=new Map([...Po(r[i]),...Po(s)]);r[i]=Array.from(l.entries()).map(([a,c])=>`${a}: ${c}`).join("; ")}else r[i]=s}),r},{})}function Sn(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>Yf(t,r),{})}function Gf(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function Io(n,e){return"style"in n?n:{...n,getAttrs:t=>{let r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;let i=e.reduce((s,o)=>{let l=o.attribute.parseHTML?o.attribute.parseHTML(t):Gf(t.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...r,...i}}}}function zo(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&qf(t)?!1:t!=null))}function Bo(n){var e,t;let r={};return!((e=n?.attribute)!=null&&e.isRequired)&&"default"in(n?.attribute||{})&&(r.default=n.attribute.default),((t=n?.attribute)==null?void 0:t.validate)!==void 0&&(r.validate=n.attribute.validate),[n.name,r]}function Xf(n,e){var t;let r=Yo(n),{nodeExtensions:i,markExtensions:s}=ct(n),o=(t=i.find(c=>M(c,"topNode")))==null?void 0:t.name,l=Object.fromEntries(i.map(c=>{let f=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},u=n.reduce((y,S)=>{let k=M(S,"extendNodeSchema",d);return{...y,...k?k(c):{}}},{}),h=zo({...u,content:P(M(c,"content",d)),marks:P(M(c,"marks",d)),group:P(M(c,"group",d)),inline:P(M(c,"inline",d)),atom:P(M(c,"atom",d)),selectable:P(M(c,"selectable",d)),draggable:P(M(c,"draggable",d)),code:P(M(c,"code",d)),whitespace:P(M(c,"whitespace",d)),linebreakReplacement:P(M(c,"linebreakReplacement",d)),defining:P(M(c,"defining",d)),isolating:P(M(c,"isolating",d)),attrs:Object.fromEntries(f.map(Bo))}),p=P(M(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>Io(y,f)));let m=M(c,"renderHTML",d);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Sn(y,f)}));let g=M(c,"renderText",d);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(s.map(c=>{let f=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},u=n.reduce((g,y)=>{let S=M(y,"extendMarkSchema",d);return{...g,...S?S(c):{}}},{}),h=zo({...u,inclusive:P(M(c,"inclusive",d)),excludes:P(M(c,"excludes",d)),group:P(M(c,"group",d)),spanning:P(M(c,"spanning",d)),code:P(M(c,"code",d)),attrs:Object.fromEntries(f.map(Bo))}),p=P(M(c,"parseHTML",d));p&&(h.parseDOM=p.map(g=>Io(g,f)));let m=M(c,"renderHTML",d);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Sn(g,f)})),[c.name,h]}));return new Ge({topNode:o,nodes:l,marks:a})}function Qf(n){let e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}function Bt(n){return n.sort((t,r)=>{let i=M(t,"priority")||100,s=M(r,"priority")||100;return i>s?-1:ir.name));return t.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${t.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function Xo(n,e,t){let{from:r,to:i}=e,{blockSeparator:s=` + +`,textSerializers:o={}}=t||{},l="";return n.nodesBetween(r,i,(a,c,f,d)=>{var u;a.isBlock&&c>r&&(l+=s);let h=o?.[a.type.name];if(h)return f&&(l+=h({node:a,pos:c,parent:f,index:d,range:e})),!1;a.isText&&(l+=(u=a?.text)==null?void 0:u.slice(Math.max(r,c)-c,i-c))}),l}function Zf(n,e){let t={from:0,to:n.content.size};return Xo(n,t,e)}function Qo(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function ed(n,e){let t=V(e,n.schema),{from:r,to:i}=n.selection,s=[];n.doc.nodesBetween(r,i,l=>{s.push(l)});let o=s.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function td(n,e){let t=wn(typeof e=="string"?e:e.name,n.schema);return t==="node"?ed(n,e):t==="mark"?qo(n,e):{}}function nd(n,e=JSON.stringify){let t={};return n.filter(r=>{let i=e(r);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function rd(n){let e=nd(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,o)=>o!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function id(n){let{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,s)=>{let o=[];if(i.ranges.length)i.forEach((l,a)=>{o.push({from:l,to:a})});else{let{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{let c=e.slice(s).map(l,-1),f=e.slice(s).map(a),d=e.invert().map(c,-1),u=e.invert().map(f);r.push({oldRange:{from:d,to:u},newRange:{from:c,to:f}})})}),rd(r)}function Zo(n,e,t){let r=[];return n===e?t.resolve(n).marks().forEach(i=>{let s=t.resolve(n),o=Xr(s,i.type);o&&r.push({mark:i,...o})}):t.nodesBetween(n,e,(i,s)=>{!i||i?.nodeSize===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var kh=(n,e,t,r=20)=>{let i=n.doc.resolve(t),s=r,o=null;for(;s>0&&o===null;){let l=i.node(s);l?.type.name===e?o=l:s-=1}return[o,s]};function It(n,e){return e.nodes[n]||e.marks[n]||null}function yn(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{let i=n.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var sd=(n,e=500)=>{let t="",r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,l)=>{var a,c;let f=((c=(a=i.type.spec).toText)==null?void 0:c.call(a,{node:i,pos:s,parent:o,index:l}))||i.textContent||"%leaf%";t+=i.isAtom&&!i.isText?f:f.slice(0,Math.max(0,r-s))}),t};function Ur(n,e,t={}){let{empty:r,ranges:i}=n.selection,s=e?we(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>bn(d.attrs,t,{strict:!1}));let o=0,l=[];if(i.forEach(({$from:d,$to:u})=>{let h=d.pos,p=u.pos;n.doc.nodesBetween(h,p,(m,g)=>{if(s&&m.inlineContent&&!m.type.allowsMarkType(s))return!1;if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),S=Math.min(p,g+m.nodeSize),k=S-y;o+=k,l.push(...m.marks.map(v=>({mark:v,from:y,to:S})))})}),o===0)return!1;let a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>bn(d.mark.attrs,t,{strict:!1})).reduce((d,u)=>d+u.to-u.from,0),c=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,u)=>d+u.to-u.from,0);return(a>0?a+c:a)>=o}function od(n,e,t={}){if(!e)return Ft(n,null,t)||Ur(n,null,t);let r=wn(e,n.schema);return r==="node"?Ft(n,e,t):r==="mark"?Ur(n,e,t):!1}var Mh=(n,e)=>{let{$from:t,$to:r,$anchor:i}=n.selection;if(e){let s=Cn(l=>l.type.name===e)(n.selection);if(!s)return!1;let o=n.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset{let{$from:e,$to:t}=n.selection;return!(e.parentOffset>0||e.pos!==t.pos)};function Fo(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function Jr(n,e){let{nodeExtensions:t}=ct(e),r=t.find(o=>o.name===n);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},s=P(M(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function ei(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return!/\S/.test((r=n.text)!=null?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let i=!0;return n.content.forEach(s=>{i!==!1&&(ei(s,{ignoreWhitespace:t,checkChildren:e})||(i=!1))}),i}return!1}function Th(n){return n instanceof C}var el=class tl{constructor(e){this.position=e}static fromJSON(e){return new tl(e.position)}toJSON(){return{position:this.position}}};function ld(n,e){let t=e.mapping.mapResult(n.position);return{position:new el(t.pos),mapResult:t}}function ad(n){return new el(n)}function cd(n,e,t){var r;let{selection:i}=e,s=null;if(Ho(i)&&(s=i.$cursor),s){let l=(r=n.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(t)&&(!!t.isInSet(l)||!l.some(c=>c.type.excludes(t)))}let{ranges:o}=i;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(f,d,u)=>{if(c)return!1;if(f.isInline){let h=!u||u.type.allowsMarkType(t),p=!!t.isInSet(f.marks)||!f.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}var fd=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=t,{empty:o,ranges:l}=s,a=we(n,r.schema);if(i)if(o){let c=qo(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{let f=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(f,d,(u,h)=>{let p=Math.max(h,f),m=Math.min(h+u.nodeSize,d);u.marks.find(y=>y.type===a)?u.marks.forEach(y=>{a===y.type&&t.addMark(p,m,a.create({...y.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return cd(r,t,a)},dd=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),ud=(n,e={})=>({state:t,dispatch:r,chain:i})=>{let s=V(n,t.schema),o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:l})=>lr(s,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>lr(s,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},hd=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,i=Ue(n,0,r.content.size),s=C.create(r,i);e.setSelection(s)}return!0},pd=(n,e)=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=r,o,l;return typeof e=="number"?(o=e,l=e):e&&"from"in e&&"to"in e?(o=e.from,l=e.to):(o=s.from,l=s.to),i&&t.doc.nodesBetween(o,l,(a,c)=>{a.isText||t.setNodeMarkup(c,void 0,{...a.attrs,dir:n})}),!0},md=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,{from:i,to:s}=typeof n=="number"?{from:n,to:n}:n,o=T.atStart(r).from,l=T.atEnd(r).to,a=Ue(i,o,l),c=Ue(s,o,l),f=T.create(r,a,c);e.setSelection(f)}return!0},gd=n=>({state:e,dispatch:t})=>{let r=V(n,e.schema);return ys(r)(e,t)};function Lo(n,e){let t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){let r=t.filter(i=>e?.includes(i.type.name));n.tr.ensureMarks(r)}}var yd=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{let{selection:s,doc:o}=e,{$from:l,$to:a}=s,c=i.extensionManager.attributes,f=yn(c,l.node().type.name,l.node().attrs);if(s instanceof C&&s.node.isBlock)return!l.parentOffset||!te(o,l.pos)?!1:(r&&(n&&Lo(t,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,u=l.depth===0?void 0:_o(l.node(-1).contentMatchAt(l.indexAfter(-1))),h=d&&u?[{type:u,attrs:f}]:void 0,p=te(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&te(e.doc,e.mapping.map(l.pos),1,u?[{type:u}]:void 0)&&(p=!0,h=u?[{type:u,attrs:f}]:void 0),r){if(p&&(s instanceof T&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),u&&!d&&!l.parentOffset&&l.parent.type!==u)){let m=e.mapping.map(l.before()),g=e.doc.resolve(m);l.node(-1).canReplaceWith(g.index(),g.index()+1,u)&&e.setNodeMarkup(e.mapping.map(l.before()),u)}n&&Lo(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},bd=(n,e={})=>({tr:t,state:r,dispatch:i,editor:s})=>{var o;let l=V(n,r.schema),{$from:a,$to:c}=r.selection,f=r.selection.node;if(f&&f.isBlock||a.depth<2||!a.sameParent(c))return!1;let d=a.node(-1);if(d.type!==l)return!1;let u=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let y=b.empty,S=a.index(-1)?1:a.index(-2)?2:3;for(let O=a.depth-S;O>=a.depth-3;O-=1)y=b.from(a.node(O).copy(y));let k=a.indexAfter(-1){if(w>-1)return!1;O.isTextblock&&O.content.size===0&&(w=R+1)}),w>-1&&t.setSelection(T.near(t.doc.resolve(w))),t.scrollIntoView()}return!0}let h=c.pos===a.end()?d.contentMatchAt(0).defaultType:null,p={...yn(u,d.type.name,d.attrs),...e},m={...yn(u,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,c.pos);let g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!te(t.doc,a.pos,2))return!1;if(i){let{selection:y,storedMarks:S}=r,{splittableMarks:k}=s.extensionManager,v=S||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!v||!i)return!0;let N=v.filter(D=>k.includes(D.type.name));t.ensureMarks(N)}return!0};function Vo(n){return!n||n==="1"?null:n}function nl(n,e){return Vo(n)===Vo(e)}var jr=(n,e)=>{let t=Cn(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return!(t.node.type===i?.type&&re(n.doc,t.pos))||!nl(t.node.attrs.type,i?.attrs.type)||n.join(t.pos),!0},_r=(n,e)=>{let t=Cn(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return!(t.node.type===i?.type&&re(n.doc,r))||!nl(t.node.attrs.type,i?.attrs.type)||n.join(r),!0};function xd(n){let e=n.doc,t=e.firstChild;if(!t)return null;let r=e.resolve(1),i=e.resolve(t.nodeSize-1);return T.between(r,i)}var Sd=(n,e,t,r={})=>({editor:i,tr:s,state:o,dispatch:l,chain:a,commands:c,can:f})=>{let{extensions:d,splittableMarks:u}=i.extensionManager,h=V(n,o.schema),p=V(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:S}=m,k=y.blockRange(S),v=g||m.$to.parentOffset&&m.$from.marks();if(!k)return!1;let N=Cn(ne=>Jr(ne.type.name,d))(m),D=m.from===0&&m.to===o.doc.content.size,w=o.doc.content.content,O=w.length===1?w[0]:null,R=D&&O&&Jr(O.type.name,d)?{node:O,pos:0,depth:0}:null,q=N??R,ft=!!N&&k.depth>=1&&k.depth-N.depth<=1,Re=!!R;if((ft||Re)&&q){if(q.node.type===h)return D&&Re?a().command(({tr:ne,dispatch:ee})=>{let X=xd(ne);return X?(ne.setSelection(X),ee&&ee(ne),!0):!1}).liftListItem(p).run():c.liftListItem(p);if(Jr(q.node.type.name,d)&&h.validContent(q.node.content))return a().command(()=>(s.setNodeMarkup(q.pos,h),!0)).command(()=>jr(s,h)).command(()=>_r(s,h)).run()}return!t||!v||!l?a().command(()=>f().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>jr(s,h)).command(()=>_r(s,h)).run():a().command(()=>{let ne=f().wrapInList(h,r),ee=v.filter(X=>u.includes(X.type.name));return s.ensureMarks(ee),ne?!0:c.clearNodes()}).wrapInList(h,r).command(()=>jr(s,h)).command(()=>_r(s,h)).run()},kd=(n,e={},t={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:s=!1}=t,o=we(n,r.schema);return Ur(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},Md=(n,e,t={})=>({state:r,commands:i})=>{let s=V(n,r.schema),o=V(e,r.schema),l=Ft(r,s,t),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?i.setNode(o,a):i.setNode(s,{...a,...t})},wd=(n,e={})=>({state:t,commands:r})=>{let i=V(n,t.schema);return Ft(t,i,e)?r.lift(i):r.wrapIn(i,e)},Cd=()=>({state:n,dispatch:e})=>{let t=n.plugins;for(let r=0;r=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){let a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,n.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},Td=(n={})=>({tr:e,dispatch:t,editor:r})=>{let{ignoreClearable:i=!1}=n,{selection:s}=e,{empty:o,ranges:l}=s;if(o)return!0;let{nonClearableMarks:a}=r.extensionManager;if(t){let c=Object.values(r.schema.marks).filter(f=>i||!a.includes(f.name));l.forEach(f=>{for(let d of c)e.removeMark(f.$from.pos,f.$to.pos,d)})}return!0},Nd=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var s;let{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=we(n,r.schema),{$from:c,empty:f,ranges:d}=l;if(!i)return!0;if(f&&o){let{from:u,to:h}=l,p=(s=c.marks().find(g=>g.type===a))==null?void 0:s.attrs,m=Xr(c,a,p);m&&(u=m.from,h=m.to),t.removeMark(u,h,a)}else d.forEach(u=>{t.removeMark(u.$from.pos,u.$to.pos,a)});return t.removeStoredMark(a),!0},Ed=n=>({tr:e,state:t,dispatch:r})=>{let{selection:i}=t,s,o;return typeof n=="number"?(s=n,o=n):n&&"from"in n&&"to"in n?(s=n.from,o=n.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(l,a)=>{if(l.isText)return;let c={...l.attrs};delete c.dir,e.setNodeMarkup(a,void 0,c)}),!0},vd=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=wn(typeof n=="string"?n:n.name,r.schema);if(!l)return!1;l==="node"&&(s=V(n,r.schema)),l==="mark"&&(o=we(n,r.schema));let a=!1;return t.selection.ranges.forEach(c=>{let f=c.$from.pos,d=c.$to.pos,u,h,p,m;t.selection.empty?r.doc.nodesBetween(f,d,(g,y)=>{s&&s===g.type&&(a=!0,p=Math.max(y,f),m=Math.min(y+g.nodeSize,d),u=y,h=g)}):r.doc.nodesBetween(f,d,(g,y)=>{y=f&&y<=d&&(s&&s===g.type&&(a=!0,i&&t.setNodeMarkup(y,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(S=>{if(o===S.type&&(a=!0,i)){let k=Math.max(y,f),v=Math.min(y+g.nodeSize,d);t.addMark(k,v,o.create({...S.attrs,...e}))}}))}),h&&(u!==void 0&&i&&t.setNodeMarkup(u,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(g=>{o===g.type&&i&&t.addMark(p,m,o.create({...g.attrs,...e}))}))}),a},Od=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return ps(i,e)(t,r)},Ad=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return ms(i,e)(t,r)},Dd=class{constructor(){this.callbacks={}}on(n,e){return this.callbacks[n]||(this.callbacks[n]=[]),this.callbacks[n].push(e),this}emit(n,...e){let t=this.callbacks[n];return t&&t.forEach(r=>r.apply(this,e)),this}off(n,e){let t=this.callbacks[n];return t&&(e?this.callbacks[n]=t.filter(r=>r!==e):delete this.callbacks[n]),this}once(n,e){let t=(...r)=>{this.off(n,t),e.apply(this,r)};return this.on(n,t)}removeAllListeners(){this.callbacks={}}};function Jh(n,e){let{selection:t}=n,{$from:r}=t;if(t instanceof C){let s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){let s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}function Rd(n,e,t){let r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;let i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}function jh(n,e){let t=n.getAttribute("style");if(!t)return null;let r=t.split(";").map(s=>s.trim()).filter(Boolean),i=e.toLowerCase();for(let s=r.length-1;s>=0;s-=1){let o=r[s],l=o.indexOf(":");if(l===-1)continue;if(o.slice(0,l).trim().toLowerCase()===i)return o.slice(l+1).trim()}return null}function Pd(n){return typeof n=="number"}function Id(n){return Object.prototype.toString.call(n).slice(8,-1)}function pn(n){return Id(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}var zd={};Yr(zd,{createAtomBlockMarkdownSpec:()=>Bd,createBlockMarkdownSpec:()=>Fd,createInlineMarkdownSpec:()=>$d,parseAttributes:()=>ti,parseIndentedBlocks:()=>Wd,renderNestedMarkdownContent:()=>Hd,serializeAttributes:()=>ni});function ti(n){if(!n?.trim())return{};let e={},t=[],r=n.replace(/["']([^"']*)["']/g,c=>(t.push(c),`__QUOTED_${t.length-1}__`)),i=r.match(/(?:^|\s)\.([\w-]+)/g);if(i){let c=i.map(f=>f.trim().slice(1));e.class=c.join(" ")}let s=r.match(/(?:^|\s)#([\w-]+)/);s&&(e.id=s[1]);let o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,f])=>{var d;let u=parseInt(((d=f.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=t[u];h&&(e[c]=h.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(f=>{f.match(/^[a-zA-Z][\w-]*$/)&&(e[f]=!0)}),e}function ni(n){if(!n||Object.keys(n).length===0)return"";let e=[];return n.class&&String(n.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),n.id&&e.push(`#${n.id}`),Object.entries(n).forEach(([t,r])=>{t==="class"||t==="id"||(r===!0?e.push(t):r!==!1&&r!=null&&e.push(`${t}="${String(r)}"`))}),e.join(" ")}function Bd(n){let{nodeName:e,name:t,parseAttributes:r=ti,serializeAttributes:i=ni,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:l}=n,a=t||e,c=f=>{if(!l)return f;let d={};return l.forEach(u=>{u in f&&(d[u]=f[u])}),d};return{parseMarkdown:(f,d)=>{let u={...s,...f.attributes};return d.createNode(e,u,[])},markdownTokenizer:{name:e,level:"block",start(f){var d;let u=new RegExp(`^:::${a}(?:\\s|$)`,"m"),h=(d=f.match(u))==null?void 0:d.index;return h!==void 0?h:-1},tokenize(f,d,u){let h=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),p=f.match(h);if(!p)return;let m=p[1]||"",g=r(m);if(!o.find(S=>!(S in g)))return{type:e,raw:p[0],attributes:g}}},renderMarkdown:f=>{let d=c(f.attrs||{}),u=i(d),h=u?` {${u}}`:"";return`:::${a}${h} :::`}}}function Fd(n){let{nodeName:e,name:t,getContent:r,parseAttributes:i=ti,serializeAttributes:s=ni,defaultAttributes:o={},content:l="block",allowedAttributes:a}=n,c=t||e,f=d=>{if(!a)return d;let u={};return a.forEach(h=>{h in d&&(u[h]=d[h])}),u};return{parseMarkdown:(d,u)=>{let h;if(r){let m=r(d);h=typeof m=="string"?[{type:"text",text:m}]:m}else l==="block"?h=u.parseChildren(d.tokens||[]):h=u.parseInline(d.tokens||[]);let p={...o,...d.attributes};return u.createNode(e,p,h)},markdownTokenizer:{name:e,level:"block",start(d){var u;let h=new RegExp(`^:::${c}`,"m"),p=(u=d.match(h))==null?void 0:u.index;return p!==void 0?p:-1},tokenize(d,u,h){var p;let m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=d.match(m);if(!g)return;let[y,S=""]=g,k=i(S),v=1,N=y.length,D="",w=/^:::([\w-]*)(\s.*)?/gm,O=d.slice(N);for(w.lastIndex=0;;){let R=w.exec(O);if(R===null)break;let q=R.index,ft=R[1];if(!((p=R[2])!=null&&p.endsWith(":::"))){if(ft)v+=1;else if(v-=1,v===0){let Re=O.slice(0,q);D=Re.trim();let ne=d.slice(0,N+q+R[0].length),ee=[];if(D)if(l==="block")for(ee=h.blockTokens(Re),ee.forEach(X=>{X.text&&(!X.tokens||X.tokens.length===0)&&(X.tokens=h.inlineTokens(X.text))});ee.length>0;){let X=ee[ee.length-1];if(X.type==="paragraph"&&(!X.text||X.text.trim()===""))ee.pop();else break}else ee=h.inlineTokens(D);return{type:e,raw:ne,attributes:k,content:D,tokens:ee}}}}}},renderMarkdown:(d,u)=>{let h=f(d.attrs||{}),p=s(h),m=p?` {${p}}`:"",g=u.renderChildren(d.content||[],` + +`);return`:::${c}${m} + +${g} + +:::`}}}function Ld(n){if(!n.trim())return{};let e={},t=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=t.exec(n);for(;r!==null;){let[,i,s,o]=r;e[i]=s||o,r=t.exec(n)}return e}function Vd(n){return Object.entries(n).filter(([,e])=>e!=null).map(([e,t])=>`${e}="${t}"`).join(" ")}function $d(n){let{nodeName:e,name:t,getContent:r,parseAttributes:i=Ld,serializeAttributes:s=Vd,defaultAttributes:o={},selfClosing:l=!1,allowedAttributes:a}=n,c=t||e,f=u=>{if(!a)return u;let h={};return a.forEach(p=>{let m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in u){let y=u[m];if(g!==void 0&&y===g)return;h[m]=y}}),h},d=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(u,h)=>{let p={...o,...u.attributes};if(l)return h.createNode(e,p);let m=r?r(u):u.content||"";return m?h.createNode(e,p,[h.createTextNode(m)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(u){let h=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),p=u.match(h),m=p?.index;return m!==void 0?m:-1},tokenize(u,h,p){let m=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),g=u.match(m);if(!g)return;let y="",S="";if(l){let[,v]=g;S=v}else{let[,v,N]=g;S=v,y=N||""}let k=i(S.trim());return{type:e,raw:g[0],content:y.trim(),attributes:k}}},renderMarkdown:u=>{let h="";r?h=r(u):u.content&&u.content.length>0&&(h=u.content.filter(y=>y.type==="text").map(y=>y.text).join(""));let p=f(u.attrs||{}),m=s(p),g=m?` ${m}`:"";return l?`[${c}${g}]`:`[${c}${g}]${h}[/${c}]`}}}function Wd(n,e,t){var r,i,s,o;let l=n.split(` +`),a=[],c="",f=0,d=e.baseIndentSize||2;for(;f0)break;if(u.trim()===""){f+=1,c=`${c}${u} +`;continue}else return}let p=e.extractItemData(h),{indentLevel:m,mainContent:g}=p;c=`${c}${u} +`;let y=[g];for(f+=1;fq.trim()!=="");if(w===-1)break;if((((i=(r=l[f+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){y.push(N),c=`${c}${N} +`,f+=1;continue}else break}if((((o=(s=N.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:o.length)||0)>m)y.push(N),c=`${c}${N} +`,f+=1;else break}let S,k=y.slice(1);if(k.length>0){let N=k.map(D=>D.slice(m+d)).join(` +`);N.trim()&&(e.customNestedParser?S=e.customNestedParser(N):S=t.blockTokens(N))}let v=e.createToken(p,S);a.push(v)}if(a.length!==0)return{items:a,raw:c}}function Hd(n,e,t,r){if(!n||!Array.isArray(n.content))return"";let i=typeof t=="function"?t(r):t,[s,...o]=n.content,l=e.renderChildren([s]),a=`${i}${l}`;return o&&o.length>0&&o.forEach((c,f)=>{var d,u;let h=(u=(d=e.renderChild)==null?void 0:d.call(e,c,f+1))!=null?u:e.renderChildren([c]);if(h!=null){let p=h.split(` +`).map(m=>m?e.indent(m):e.indent("")).join(` +`);a+=c.type==="paragraph"?` + +${p}`:` +${p}`}}),a}function rl(n,e){let t={...n};return pn(n)&&pn(e)&&Object.keys(e).forEach(r=>{pn(e[r])&&pn(n[r])?t[r]=rl(n[r],e[r]):t[r]=e[r]}),t}function Jd(n,e,t={}){let{state:r}=e,{doc:i,tr:s}=r,o=n;i.descendants((l,a)=>{let c=s.mapping.map(a),f=s.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(h=>{if(h!==o)return!1;d=h}),!d)return;let u=!1;if(Object.keys(t).forEach(h=>{t[h]!==d.attrs[h]&&(u=!0)}),u){let h=n.type.create({...n.attrs,...t});s.removeMark(c,f,n.type),s.addMark(c,f,h)}}),s.docChanged&&e.view.dispatch(s)}var Tn=class{constructor(n){var e;this.find=n.find,this.handler=n.handler,this.undoable=(e=n.undoable)!=null?e:!0}},jd=(n,e)=>{if(Gr(e))return e.exec(n);let t=e(n);if(!t)return null;let r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function mn(n){var e;let{editor:t,from:r,to:i,text:s,rules:o,plugin:l}=n,{view:a}=t;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(u=>u.type.spec.code))return!1;let f=!1,d=sd(c)+s;return o.forEach(u=>{if(f)return;let h=jd(d,u.find);if(!h)return;let p=h[0].length-s.length;if(p>0){let D=c.parentOffset-p;if(D<0||c.parent.textBetween(D,c.parentOffset)!==h[0].slice(0,p))return}let m=a.state.tr,g=kn({state:a.state,transaction:m}),y={from:r-(h[0].length-s.length),to:i},{commands:S,chain:k,can:v}=new Mn({editor:t,state:g});u.handler({state:g,range:y,match:h,commands:S,chain:k,can:v})===null||!m.steps.length||(u.undoable&&m.setMeta(l,{transform:m,from:r,to:i,text:s}),a.dispatch(m),f=!0)}),f}function _d(n){let{editor:e,rules:t}=n,r=new I({state:{init(){return null},apply(i,s,o){let l=i.getMeta(r);if(l)return l;let a=i.getMeta("applyInputRules");return a&&setTimeout(()=>{let{text:f}=a;typeof f=="string"?f=f:f=Zr(b.from(f),o.schema);let{from:d}=a,u=d+f.length;mn({editor:e,from:d,to:u,text:f,rules:t,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,l){return mn({editor:e,from:s,to:o,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{let{$cursor:s}=i.state.selection;s&&mn({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;let{$cursor:o}=i.state.selection;return o?mn({editor:e,from:o.pos,to:o.pos,text:` +`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}var ri=class{constructor(n={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...n},this.name=this.config.name}get options(){return{...P(M(this,"addOptions",{name:this.name}))}}get storage(){return{...P(M(this,"addStorage",{name:this.name,options:this.options}))}}configure(n={}){let e=this.extend({...this.config,addOptions:()=>rl(this.options,n)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(n={}){let e=new this.constructor({...this.config,...n});return e.parent=this,this.child=e,e.name="name"in n?n.name:e.parent.name,e}},Kd=class il extends ri{constructor(){super(...arguments),this.type="mark"}static create(e={}){let t=typeof e=="function"?e():e;return new il(t)}static handleExit({editor:e,mark:t}){let{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){let o=i.marks();if(!!!o.find(c=>c?.type.name===t.name))return!1;let a=o.find(c=>c?.type.name===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}},qd=class{constructor(n){this.find=n.find,this.handler=n.handler}},Ud=(n,e,t)=>{if(Gr(e))return[...n.matchAll(e)];let r=e(n,t);return r?r.map(i=>{let s=[i.text];return s.index=i.index,s.input=n,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function Yd(n){let{editor:e,state:t,from:r,to:i,rule:s,pasteEvent:o,dropEvent:l}=n,{commands:a,chain:c,can:f}=new Mn({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,i,(h,p)=>{var m,g,y,S,k;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let v=(k=(S=(y=h.content)==null?void 0:y.size)!=null?S:h.nodeSize)!=null?k:0,N=Math.max(r,p),D=Math.min(i,p+v);if(N>=D)return;let w=h.isText?h.text||"":h.textBetween(N-p,D-p,void 0,"\uFFFC");Ud(w,s.find,o).forEach(R=>{if(R.index===void 0)return;let q=N+R.index+1,ft=q+R[0].length,Re={from:t.tr.mapping.map(q),to:t.tr.mapping.map(ft)},ne=s.handler({state:t,range:Re,match:R,commands:a,chain:c,can:f,pasteEvent:o,dropEvent:l});d.push(ne)})}),d.every(h=>h!==null)}var gn=null,Gd=n=>{var e;let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)==null||e.setData("text/html",n),t};function Xd(n){let{editor:e,rules:t}=n,r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:f,from:d,to:u,rule:h,pasteEvt:p})=>{let m=f.tr,g=kn({state:f,transaction:m});if(!(!Yd({editor:e,state:g,from:Math.max(d-1,0),to:u.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return t.map(f=>new I({view(d){let u=p=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(p.target)?d.dom.parentElement:null,r&&(gn=e)},h=()=>{gn&&(gn=null)};return window.addEventListener("dragstart",u),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",u),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,u)=>{if(s=r===d.dom.parentElement,l=u,!s){let h=gn;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,u)=>{var h;let p=(h=u.clipboardData)==null?void 0:h.getData("text/html");return o=u,i=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(d,u,h)=>{let p=d[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,y=p.getMeta("applyPasteRules"),S=!!y;if(!m&&!g&&!S)return;if(S){let{text:N}=y;typeof N=="string"?N=N:N=Zr(b.from(N),h.schema);let{from:D}=y,w=D+N.length,O=Gd(N);return a({rule:f,state:h,from:D,to:{b:w},pasteEvt:O})}let k=u.doc.content.findDiffStart(h.doc.content),v=u.doc.content.findDiffEnd(h.doc.content);if(!(!Pd(k)||!v||k===v.b))return a({rule:f,state:h,from:k,to:v,pasteEvt:o})}}))}var Nn=class{constructor(n,e){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=e,this.baseExtensions=n,this.extensions=Go(n),this.schema=Xf(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((n,e)=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:It(e.name,this.schema)},r=M(e,"addCommands",t);return r?{...n,...r()}:n},{})}get plugins(){let{editor:n}=this;return Bt([...this.extensions].reverse()).flatMap(r=>{let i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:n,type:It(r.name,this.schema)},s=[],o=M(r,"addKeyboardShortcuts",i),l={};if(r.type==="mark"&&M(r,"exitable",i)&&(l.ArrowRight=()=>Kd.handleExit({editor:n,mark:r})),o){let u=Object.fromEntries(Object.entries(o()).map(([h,p])=>[h,()=>p({editor:n})]));l={...l,...u}}let a=vo(l);s.push(a);let c=M(r,"addInputRules",i);if(Fo(r,n.options.enableInputRules)&&c){let u=c();if(u&&u.length){let h=_d({editor:n,rules:u}),p=Array.isArray(h)?h:[h];s.push(...p)}}let f=M(r,"addPasteRules",i);if(Fo(r,n.options.enablePasteRules)&&f){let u=f();if(u&&u.length){let h=Xd({editor:n,rules:u});s.push(...h)}}let d=M(r,"addProseMirrorPlugins",i);if(d){let u=d();s.push(...u)}return s})}get attributes(){return Yo(this.extensions)}get nodeViews(){let{editor:n}=this,{nodeExtensions:e}=ct(this.extensions);return Object.fromEntries(e.filter(t=>!!M(t,"addNodeView")).map(t=>{let r=this.attributes.filter(a=>a.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:V(t.name,this.schema)},s=M(t,"addNodeView",i);if(!s)return[];let o=s();if(!o)return[];let l=(a,c,f,d,u)=>{let h=Sn(a,r);return o({node:a,view:c,getPos:f,decorations:d,innerDecorations:u,editor:n,extension:t,HTMLAttributes:h})};return[t.name,l]}))}dispatchTransaction(n){let{editor:e}=this;return Bt([...this.extensions].reverse()).reduceRight((r,i)=>{let s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:It(i.name,this.schema)},o=M(i,"dispatchTransaction",s);return o?l=>{o.call(s,{transaction:l,next:r})}:r},n)}transformPastedHTML(n){let{editor:e}=this;return Bt([...this.extensions]).reduce((r,i)=>{let s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:It(i.name,this.schema)},o=M(i,"transformPastedHTML",s);return o?(l,a)=>{let c=r(l,a);return o.call(s,c)}:r},n||(r=>r))}get markViews(){let{editor:n}=this,{markExtensions:e}=ct(this.extensions);return Object.fromEntries(e.filter(t=>!!M(t,"addMarkView")).map(t=>{let r=this.attributes.filter(l=>l.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:we(t.name,this.schema)},s=M(t,"addMarkView",i);if(!s)return[];let o=(l,a,c)=>{let f=Sn(l,r);return s()({mark:l,view:a,inline:c,editor:n,extension:t,HTMLAttributes:f,updateAttributes:d=>{Jd(l,n,d)}})};return[t.name,o]}))}destroy(){this.extensions.forEach(n=>{let e=n;for(;e.parent;){let t=e.parent;t.child===e&&(t.child=null),e=t}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let n=this.extensions;this.editor.extensionStorage=Object.fromEntries(n.map(e=>[e.name,e.storage])),n.forEach(e=>{var t,r;let i={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:It(e.name,this.schema)};e.type==="mark"&&(((t=P(M(e,"keepOnSplit",i)))==null||t)&&this.splittableMarks.push(e.name),(r=P(M(e,"clearable",i)))==null||r||this.nonClearableMarks.push(e.name));let s=M(e,"onBeforeCreate",i),o=M(e,"onCreate",i),l=M(e,"onUpdate",i),a=M(e,"onSelectionUpdate",i),c=M(e,"onTransaction",i),f=M(e,"onFocus",i),d=M(e,"onBlur",i),u=M(e,"onDestroy",i);s&&this.editor.on("beforeCreate",s),o&&this.editor.on("create",o),l&&this.editor.on("update",l),a&&this.editor.on("selectionUpdate",a),c&&this.editor.on("transaction",c),f&&this.editor.on("focus",f),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}};Nn.resolve=Go;Nn.sort=Bt;Nn.flatten=Qr;var Qd={};Yr(Qd,{ClipboardTextSerializer:()=>ol,Commands:()=>ll,Delete:()=>al,Drop:()=>cl,Editable:()=>fl,FocusEvents:()=>ul,Keymap:()=>hl,Paste:()=>pl,Tabindex:()=>ml,TextDirection:()=>gl,focusEventsPluginKey:()=>dl});var ue=class sl extends ri{constructor(){super(...arguments),this.type="extension"}static create(e={}){let t=typeof e=="function"?e():e;return new sl(t)}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}},ol=ue.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new I({key:new L("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,s=Qo(t),{blockSeparator:o}=this.options,l={...o!==void 0?{blockSeparator:o}:{},textSerializers:s};return[...i.ranges].sort((c,f)=>c.$from.pos-f.$from.pos).map(({$from:c,$to:f})=>Xo(r,{from:c.pos,to:f.pos},l)).join(o??` + +`)}}})]}}),ll=ue.create({name:"commands",addCommands(){return{...$o}}}),al=ue.create({name:"delete",onUpdate({transaction:n,appendedTransactions:e}){var t,r,i;let s=()=>{var o,l,a,c;if((c=(a=(l=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,n))!=null?c:n.getMeta("y-sync$"))return;let f=_f(n.before,[n,...e]);id(f).forEach(h=>{f.mapping.mapResult(h.oldRange.from).deletedAfter&&f.mapping.mapResult(h.oldRange.to).deletedBefore&&f.before.nodesBetween(h.oldRange.from,h.oldRange.to,(p,m)=>{let g=m+p.nodeSize-2,y=h.oldRange.from<=m&&g<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:m,to:g,newFrom:f.mapping.map(m),newTo:f.mapping.map(g),deletedRange:h.oldRange,newRange:h.newRange,partial:!y,editor:this.editor,transaction:n,combinedTransform:f})})});let u=f.mapping;f.steps.forEach((h,p)=>{var m,g;if(h instanceof me){let y=u.slice(p).map(h.from,-1),S=u.slice(p).map(h.to),k=u.invert().map(y,-1),v=u.invert().map(S),N=y>0?(m=f.doc.nodeAt(y-1))==null?void 0:m.marks.some(w=>w.eq(h.mark)):!1,D=(g=f.doc.nodeAt(S))==null?void 0:g.marks.some(w=>w.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:k,to:v},newRange:{from:y,to:S},partial:!!(D||N),editor:this.editor,transaction:n,combinedTransform:f})}})};(i=(r=(t=this.editor.options.coreExtensionOptions)==null?void 0:t.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),cl=ue.create({name:"drop",addProseMirrorPlugins(){return[new I({key:new L("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),fl=ue.create({name:"editable",addProseMirrorPlugins(){return[new I({key:new L("editable"),props:{editable:()=>this.editor.options.editable}})]}}),dl=new L("focusEvents"),ul=ue.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:n}=this;return[new I({key:dl,props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;let r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;let r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),hl=ue.create({name:"keymap",addKeyboardShortcuts(){let n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{let{selection:a,doc:c}=l,{empty:f,$anchor:d}=a,{pos:u,parent:h}=d,p=d.parent.isTextblock&&u>0?l.doc.resolve(u-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=m&&p.parent.childCount===1?g===d.pos:E.atStart(c).from===u;return!f||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return xn()||Ko()?s:i},addProseMirrorPlugins(){return[new I({key:new L("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(m=>m.getMeta("composition")))return;let r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),i=n.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;let{empty:s,from:o,to:l}=e.selection,a=E.atStart(e.doc).from,c=E.atEnd(e.doc).to;if(s||!(o===a&&l===c)||!ei(t.doc))return;let u=t.tr,h=kn({state:t,transaction:u}),{commands:p}=new Mn({editor:this.editor,state:h});if(p.clearNodes(),!!u.steps.length)return u}})]}}),pl=ue.create({name:"paste",addProseMirrorPlugins(){return[new I({key:new L("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),ml=ue.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new I({key:new L("tabindex"),props:{attributes:()=>{var n;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(n=this.options.value)!=null?n:"0"}}}})]}}),gl=ue.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:n}=ct(this.extensions);return[{types:n.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute("dir");return t&&(t==="ltr"||t==="rtl"||t==="auto")?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new I({key:new L("textDirection"),props:{attributes:()=>{let n=this.options.direction;return n?{dir:n}:{}}}})]}}),Zd=class zt{constructor(e,t,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new zt(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new zt(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new zt(e,this.editor)}get children(){let e=[];return this.node.content.forEach((t,r)=>{let i=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,o=t.isInline,l=this.pos+r+(s?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;let a=this.resolvedPos.doc.resolve(l);if(!i&&!o&&a.depth<=this.depth)return;let c=new zt(a,this.editor,i,i||o?t:null);i&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(t).length>0){let s=i.node.attrs,o=Object.keys(t);for(let l=0;l{r&&i.length>0||(o.node.type.name===e&&s.every(a=>t[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,t,r))))}),i}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},eu=`.ProseMirror { + position: relative; +} + +.ProseMirror { + word-wrap: break-word; + white-space: pre-wrap; + white-space: break-spaces; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ +} + +.ProseMirror [contenteditable="false"] { + white-space: normal; +} + +.ProseMirror [contenteditable="false"] [contenteditable="true"] { + white-space: pre-wrap; +} + +.ProseMirror pre { + white-space: pre-wrap; +} + +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 0 !important; + height: 0 !important; +} + +.ProseMirror-gapcursor { + display: none; + pointer-events: none; + position: absolute; + margin: 0; +} + +.ProseMirror-gapcursor:after { + content: ""; + display: block; + position: absolute; + top: -2px; + width: 20px; + border-top: 1px solid black; + animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; +} + +@keyframes ProseMirror-cursor-blink { + to { + visibility: hidden; + } +} + +.ProseMirror-hideselection *::selection { + background: transparent; +} + +.ProseMirror-hideselection *::-moz-selection { + background: transparent; +} + +.ProseMirror-hideselection * { + caret-color: transparent; +} + +.ProseMirror-focused .ProseMirror-gapcursor { + display: block; +}`,ip=class extends Dd{constructor(n={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:ld,createMappablePosition:ad},this.setOptions(n),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:r,moved:i})=>this.options.onDrop(t,r,i)),this.on("paste",({event:t,slice:r})=>this.options.onPaste(t,r)),this.on("delete",this.options.onDelete);let e=this.createDoc();if(!this.editorState){let t=Kr(e,this.options.autofocus);this.editorState=Mt.create({doc:e,schema:this.schema,selection:t||void 0})}this.options.element&&this.mount(this.options.element)}mount(n){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(n),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let n=this.editorView.dom;n?.editor&&delete n.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(n){console.warn("Failed to remove CSS element:",n)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Rd(eu,this.options.injectNonce))}setOptions(n={}){this.options={...this.options,...n},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(n,e=!0){this.setOptions({editable:n}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:n=>{this.editorState=n},dispatch:n=>{this.dispatchTransaction(n)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(n,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in n)return Reflect.get(n,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(n,e){let t=Uo(e)?e(n,[...this.state.plugins]):[...this.state.plugins,n],r=this.state.reconfigure({plugins:t});return this.view.updateState(r),r}unregisterPlugin(n){if(this.isDestroyed)return;let e=this.state.plugins,t=e;if([].concat(n).forEach(i=>{let s=typeof i=="string"?`${i}$`:i.key;t=t.filter(o=>!o.key.startsWith(s))}),e.length===t.length)return;let r=this.state.reconfigure({plugins:t});return this.view.updateState(r),r}createExtensionManager(){var n,e,t,r;let s=[...this.options.enableCoreExtensions?[fl,ol.configure({blockSeparator:(e=(n=this.options.coreExtensionOptions)==null?void 0:n.clipboardTextSerializer)==null?void 0:e.blockSeparator}),ll,ul,hl,ml.configure({value:(r=(t=this.options.coreExtensionOptions)==null?void 0:t.tabindex)==null?void 0:r.value}),cl,pl,al,gl.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new Nn(s,this)}createCommandManager(){this.commandManager=new Mn({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let n;try{n=qr(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;let t=qr(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Mt.create({doc:t,schema:this.schema,selection:Kr(t,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return n}createView(n){let{editorProps:e,enableExtensionDispatchTransaction:t}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=t?this.extensionManager.dispatchTransaction(r):r,s=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(s);this.editorView=new Ot(n,{...e,attributes:{role:"textbox",...e?.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();let a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(n){this.isCapturingTransaction=!0,n(),this.isCapturingTransaction=!1;let e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(n){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=n;return}n.steps.forEach(c=>{var f;return(f=this.capturedTransaction)==null?void 0:f.step(c)});return}let{state:e,transactions:t}=this.state.applyTransaction(n),r=!this.state.selection.eq(e.selection),i=t.includes(n),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:n,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:n,appendedTransactions:t.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:n});let o=t.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),l=o?.getMeta("focus"),a=o?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:o}),a&&this.emit("blur",{editor:this,event:a.event,transaction:o}),!(n.getMeta("preventUpdate")||!t.some(c=>c.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:n,appendedTransactions:t.slice(1)})}getAttributes(n){return td(this.state,n)}isActive(n,e){let t=typeof n=="string"?n:null,r=typeof n=="string"?e:n;return od(this.state,t,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Zr(this.state.doc.content,this.schema)}getText(n){let{blockSeparator:e=` + +`,textSerializers:t={}}=n||{};return Zf(this.state.doc,{blockSeparator:e,textSerializers:{...Qo(this.schema),...t}})}get isEmpty(){return ei(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var n,e;return(e=(n=this.editorView)==null?void 0:n.isDestroyed)!=null?e:!0}$node(n,e){var t;return((t=this.$doc)==null?void 0:t.querySelector(n,e))||null}$nodes(n,e){var t;return((t=this.$doc)==null?void 0:t.querySelectorAll(n,e))||null}$pos(n){let e=this.state.doc.resolve(n),t=n>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new Zd(e,this,!1,t)}get $doc(){return this.$pos(0)}};function sp(n){return new Tn({find:n.find,handler:({state:e,range:t,match:r})=>{let i=P(n.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:s}=e,o=r[r.length-1],l=r[0];if(o){let a=l.search(/\S/),c=t.from+l.indexOf(o),f=c+o.length;if(Zo(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;ft.from&&s.delete(t.from+a,c);let u=t.from+a+o.length;s.addMark(t.from+a,u,n.type.create(i||{})),s.removeStoredMark(n.type)}},undoable:n.undoable})}function op(n){return new Tn({find:n.find,handler:({state:e,range:t,match:r})=>{let i=P(n.getAttributes,void 0,r)||{},{tr:s}=e,o=t.from,l=t.to,a=n.type.create(i);if(r[1]){let c=r[0].lastIndexOf(r[1]),f=o+c;f>l?f=l:l=f+r[1].length;let d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(f,l,a)}else if(r[0]){let c=n.type.isInline?o:o-1;s.insert(c,n.type.create(i)).delete(s.mapping.map(o),s.mapping.map(l))}s.scrollIntoView()},undoable:n.undoable})}function lp(n){return new Tn({find:n.find,handler:({state:e,range:t,match:r})=>{let i=e.doc.resolve(t.from),s=P(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)},undoable:n.undoable})}function cp(n){return new Tn({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{let s=P(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),c=a&&et(a,n.type,s);if(!c)return null;if(o.wrap(a,c),n.keepMarks&&n.editor){let{selection:d,storedMarks:u}=e,{splittableMarks:h}=n.editor.extensionManager,p=u||d.$to.parentOffset&&d.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){let d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}let f=o.doc.resolve(t.from-1).nodeBefore;f&&f.type===n.type&&re(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,f))&&o.join(t.from-1)},undoable:n.undoable})}var tu=n=>"touches"in n,fp=class{constructor(n){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(a,c)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.touches[0];if(!a)return;let c=a.clientX-this.startX,f=a.clientY-this.startY;this.handleResize(c,f)},this.handleMouseUp=()=>{if(!this.isResizing)return;let l=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(l,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,t,r,i,s,o;this.node=n.node,this.editor=n.editor,this.element=n.element,this.element.draggable=!1,this.contentElement=n.contentElement,this.getPos=n.getPos,this.onResize=n.onResize,this.onCommit=n.onCommit,this.onUpdate=n.onUpdate,(e=n.options)!=null&&e.min&&(this.minSize={...this.minSize,...n.options.min}),(t=n.options)!=null&&t.max&&(this.maxSize=n.options.max),(r=n?.options)!=null&&r.directions&&(this.directions=n.options.directions),(i=n.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=n.options.preserveAspectRatio),(s=n.options)!=null&&s.className&&(this.classNames={container:n.options.className.container||"",wrapper:n.options.className.wrapper||"",handle:n.options.className.handle||"",resizing:n.options.className.resizing||""}),(o=n.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=n.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var n;return(n=this.contentElement)!=null?n:null}handleEditorUpdate(){let n=this.editor.isEditable;n!==this.lastEditableState&&(this.lastEditableState=n,n?n&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(n,e,t){return n.type!==this.node.type?!1:(this.node=n,this.onUpdate?this.onUpdate(n,e,t):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let n=document.createElement("div");return n.dataset.resizeContainer="",n.dataset.node=this.node.type.name,n.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(n.className=this.classNames.container),n.appendChild(this.wrapper),n}createWrapper(){let n=document.createElement("div");return n.style.position="relative",n.style.display="block",n.dataset.resizeWrapper="",this.classNames.wrapper&&(n.className=this.classNames.wrapper),n.appendChild(this.element),n}createHandle(n){let e=document.createElement("div");return e.dataset.resizeHandle=n,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(n,e){let t=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),s=e.includes("right");t&&(n.style.top="0"),r&&(n.style.bottom="0"),i&&(n.style.left="0"),s&&(n.style.right="0"),(e==="top"||e==="bottom")&&(n.style.left="0",n.style.right="0"),(e==="left"||e==="right")&&(n.style.top="0",n.style.bottom="0")}attachHandles(){this.directions.forEach(n=>{let e;this.createCustomHandle?e=this.createCustomHandle(n):e=this.createHandle(n),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${n}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(n)),this.createCustomHandle||this.positionHandle(e,n),e.addEventListener("mousedown",t=>this.handleResizeStart(t,n)),e.addEventListener("touchstart",t=>this.handleResizeStart(t,n)),this.handleMap.set(n,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(n=>n.remove()),this.handleMap.clear()}applyInitialSize(){let n=this.node.attrs.width,e=this.node.attrs.height;n?(this.element.style.width=`${n}px`,this.initialWidth=n):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(n,e){n.preventDefault(),n.stopPropagation(),this.isResizing=!0,this.activeHandle=e,tu(n)?(this.startX=n.touches[0].clientX,this.startY=n.touches[0].clientY):(this.startX=n.clientX,this.startY=n.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight);let t=this.getPos();this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(n,e){if(!this.activeHandle)return;let t=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,n,e),s=this.applyConstraints(r,i,t);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(n,e,t){let r=this.startWidth,i=this.startHeight,s=n.includes("right"),o=n.includes("left"),l=n.includes("bottom"),a=n.includes("top");return s?r=this.startWidth+e:o&&(r=this.startWidth-e),l?i=this.startHeight+t:a&&(i=this.startHeight-t),(n==="right"||n==="left")&&(r=this.startWidth+(s?e:-e)),(n==="top"||n==="bottom")&&(i=this.startHeight+(l?t:-t)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,n):{width:r,height:i}}applyConstraints(n,e,t){var r,i,s,o;if(!t){let c=Math.max(this.minSize.width,n),f=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(i=this.maxSize)!=null&&i.height&&(f=Math.min(this.maxSize.height,f)),{width:c,height:f}}let l=n,a=e;return lthis.maxSize.width&&(l=this.maxSize.width,a=l/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&a>this.maxSize.height&&(a=this.maxSize.height,l=a*this.aspectRatio),{width:l,height:a}}applyAspectRatio(n,e,t){let r=t==="left"||t==="right",i=t==="top"||t==="bottom";return r?{width:n,height:n/this.aspectRatio}:i?{width:e*this.aspectRatio,height:e}:{width:n,height:n/this.aspectRatio}}};var dp=class yl extends ri{constructor(){super(...arguments),this.type="node"}static create(e={}){let t=typeof e=="function"?e():e;return new yl(t)}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}};function hp(n){return new qd({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{let s=P(n.getAttributes,void 0,r,i);if(s===!1||s===null)return null;let{tr:o}=e,l=r[r.length-1],a=r[0],c=t.to;if(l){let f=a.search(/\S/),d=t.from+a.indexOf(l),u=d+l.length;if(Zo(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===n.type&&y!==m.mark.type)).filter(m=>m.to>d).length)return null;ut.from&&o.delete(t.from+f,d),c=t.from+f+l.length,o.addMark(t.from+f,c,n.type.create(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(n.type)}}})}export{b as a,x as b,Ln as c,Wi as d,Ze as e,E as f,Gt as g,T as h,C as i,I as j,L as k,Ae as l,ae as m,Gc as n,V as o,Ft as p,_f as q,mh as r,Kf as s,M as t,P as u,Yf as v,Sn as w,td as x,id as y,Zo as z,kh as A,Mh as B,wh as C,ei as D,Th as E,Jh as F,jh as G,Wd as H,Hd as I,Tn as J,Kd as K,qd as L,ue as M,ip as N,sp as O,op as P,lp as Q,cp as R,fp as S,dp as T,hp as U}; diff --git a/packages/forms/dist/tiptap/chunk-CFHSZ3VY.js b/packages/forms/dist/tiptap/chunk-CFHSZ3VY.js deleted file mode 100644 index 7e06d0ed..00000000 --- a/packages/forms/dist/tiptap/chunk-CFHSZ3VY.js +++ /dev/null @@ -1,89 +0,0 @@ -function J(n){this.content=n}J.prototype={constructor:J,find:function(n){for(var e=0;e>1}};J.from=function(n){if(n instanceof J)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new J(e)};var gn=J;function ti(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=ti(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function ni(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,f=Math.min(o.text.length,l.text.length);for(;ce&&r(a,i+l,s||null,o)!==!1&&a.content.size){let f=l+1;a.nodesBetween(Math.max(0,e-f),Math.min(a.content.size,t-f),r,i+f)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new n(r,i)}cutByIndex(e,t){return e==t?n.empty:e==0&&t==this.content.length?this:new n(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new n(i,s)}addToStart(e){return new n([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new n(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Et(t+1,s):Et(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return n.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return n.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return n.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};E.none=[];var Ee=class extends Error{},k=class n{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ii(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new n(r,this.openStart,this.openEnd)}removeBetween(e,t){return new n(ri(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return n.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new n(b.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new n(e,r,i)}};k.empty=new k(b.empty,0,0);function ri(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(ri(s.content,e-i-1,t-i-1)))}function ii(n,e,t,r,i,s){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=ii(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function $o(n,e,t){if(t.openStart>n.depth)throw new Ee("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Ee("Inconsistent open depths");return si(n,e,t,0)}function si(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function st(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(Ne(n.nodeAfter,r),s++));for(let l=s;li&&bn(n,e,i+1),o=r.depth>i&&bn(t,r,i+1),l=[];return st(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(oi(s,o),Ne(Te(s,li(n,e,t,r,i+1)),l)):(s&&Ne(Te(s,Rt(n,e,i+1)),l),st(e,t,i,l),o&&Ne(Te(o,Rt(t,r,i+1)),l)),st(r,null,i,l),new b(l)}function Rt(n,e,t){let r=[];if(st(null,n,t,r),n.depth>t){let i=bn(n,e,t+1);Ne(Te(i,Rt(n,e,t+1)),r)}return st(e,null,t,r),new b(r)}function Lo(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(b.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}var vt=class n{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new De(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new n(t,r,s)}static resolveCached(e,t){let r=Hr.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ai(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=b.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=b.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Y.prototype.text=void 0;var Sn=class n extends Y{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ai(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function ai(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}var Ae=class n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new xn(e,t);if(r.next==null)return n.empty;let i=ci(r);r.next&&r.err("Unexpected trailing text");let s=_o(Uo(i));return Go(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` -`)}};Ae.empty=new Ae(!0);var xn=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function ci(n){let e=[];do e.push(Jo(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Jo(n){let e=[];do e.push(jo(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function jo(n){let e=Ho(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=qo(n,e);else break;return e}function Ur(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function qo(n,e){let t=Ur(n),r=t;return n.eat(",")&&(n.next!="}"?r=Ur(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Ko(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Ho(n){if(n.eat("(")){let e=ci(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Ko(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Uo(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let f=0;f{c||i.push([l,c=[]]),c.indexOf(f)==-1&&c.push(f)})})});let s=e[r.join(",")]=new Ae(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ui(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Y(this,this.computeAttrs(e),b.from(t),E.setFrom(r))}createChecked(e=null,t,r){return t=b.from(t),this.checkContent(t),new Y(this,this.computeAttrs(e),t,E.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=b.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(b.empty,!0);return s?new Y(this,e,t.append(s),E.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new n(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Yo(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}var Mn=class{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Yo(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}},lt=class n{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=pi(e,i.attrs),this.excluded=null;let s=di(this.attrs);this.instance=s?new E(this,s):null}create(e=null){return!e&&this.instance?this.instance:new E(this,ui(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new n(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}},at=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=gn.from(e.nodes),t.marks=gn.from(e.marks||{}),this.nodes=Pt.compile(this.spec.nodes,this),this.marks=lt.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Ae.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Gr(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Gr(this,o.split(" "))}this.nodeFromJSON=i=>Y.fromJSON(this,i),this.markFromJSON=i=>E.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Pt){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new Sn(r,r.defaultAttrs,e,E.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function Gr(n,e){let t=[];for(let r=0;r-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Xo(n){return n.tag!=null}function Zo(n){return n.style!=null}var ae=class n{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Xo(i))this.tags.push(i);else if(Zo(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new Bt(this,t,!1);return r.addAll(e,E.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Bt(this,t,!0);return r.addAll(e,E.none,t.from,t.to),k.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=Xr(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Xr(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new n(e,n.schemaRules(e)))}},mi={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Qo={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},gi={ol:!0,ul:!0},ct=1,Cn=2,ot=4;function Yr(n,e,t){return e!=null?(e?ct:0)|(e==="full"?Cn:0):n&&n.whitespace=="pre"?ct|Cn:t&~ot}var Je=class{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=E.none,this.match=s||(o&ot?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ct)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!mi.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Bt=class{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=Yr(null,t.preserveWhitespace,0)|(r?ot:0);i?s=new Je(i.type,i.attrs,E.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new Je(null,null,E.none,!0,null,o):s=new Je(e.schema.topNodeType,null,E.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Cn?"full":this.localPreserveWS||(i.options&ct)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` -`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):Zr(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Je(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=ct)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let f=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!f||f.name!=c&&!f.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}};function el(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&gi.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function tl(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Xr(n){let e={};for(let t in n)e[t]=n[t];return e}function Zr(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&At(Dt(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:At(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new n(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Qr(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Qr(e.marks)}};function Qr(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Dt(n){return n.document||window.document}var ei=new WeakMap;function nl(n){let e=ei.get(n);return e===void 0&&ei.set(n,e=rl(n)),e}function rl(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],f=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){f=2;for(let d in c)if(c[d]!=null){let u=d.indexOf(" ");u>0?a.setAttributeNS(d.slice(0,u),d.slice(u+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=f;df)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof u=="string")a.appendChild(n.createTextNode(u));else{let{dom:h,contentDOM:p}=At(n,u,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}var ki=65535,Si=Math.pow(2,16);function il(n,e){return n+e*Si}function yi(n){return n&ki}function sl(n){return(n-(n&ki))/Si}var xi=1,Mi=2,zt=4,Ci=8,ut=class{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ci)>0}get deletedBefore(){return(this.delInfo&(xi|zt))>0}get deletedAfter(){return(this.delInfo&(Mi|zt))>0}get deletedAcross(){return(this.delInfo&zt)>0}},fe=class n{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&n.empty)return n.empty}recover(e){let t=0,r=yi(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],f=this.ranges[l+o],d=a+c;if(e<=d){let u=c?e==a?-1:e==d?1:t:t,h=a+i+(u<0?0:f);if(r)return h;let p=e==(t<0?a:d)?null:il(l/3,e-a),m=e==a?Mi:e==d?xi:zt;return(t<0?e!=a:e!=d)&&(m|=Ci),new ut(h,m,p)}i+=f-c}return r?e+i:new ut(e+i,0,null)}touches(e,t){let r=0,i=yi(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],f=a+c;if(e<=f&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new n;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return F.fromReplace(e,this.from,this.to,s)}invert(){return new Ie(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};B.jsonID("addMark",ht);var Ie=class n extends B{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new k(An(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return F.fromReplace(e,this.from,this.to,r)}invert(){return new ht(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};B.jsonID("removeMark",Ie);var pt=class n extends B{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return F.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return F.fromReplace(e,this.pos,this.pos+1,new k(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new n(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,k.fromJSON(e,t.slice),t.insert,!!t.structure)}};B.jsonID("replaceAround",R);function En(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function ol(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,f)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&f.type.allowsMarkType(r.type)){let u=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;mn.step(a)),s.forEach(a=>n.step(a))}function ll(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof lt){let c=o.marks,f;for(;f=r.isInSet(c);)(a||(a=[])).push(f),c=f.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let f=0;fn.step(new Ie(o.from,o.to,o.style)))}function In(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)n.step(o[a])}function al(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function de(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+i,a=n.$to.indexAfter(r)-s;if(rt;p--)m||r.index(p)>0?(m=!0,f=b.from(r.node(p).copy(f)),d++):a--;let u=b.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=b.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new R(i,s,i,s,new k(r,0,0),t.length,!0))}function hl(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&pl(n.doc,n.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Oi(n,o,l,s),In(n,n.mapping.slice(s).map(l,1),r,void 0,c===null);let f=n.mapping.slice(s),d=f.map(l,1),u=f.map(l+o.nodeSize,1);return n.step(new R(d,u,d+1,u-1,new k(b.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&wi(n,o,l,s),!1}})}function wi(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Oi(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` -`))}})}function pl(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function ml(n,e,t,r,i){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(r,null,i||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new R(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new k(b.from(o),0,0),1,!0))}function X(n,e,t=1,r){let i=n.resolve(e),s=i.depth-t,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,f=t-2;c>s;c--,f--){let d=i.node(c),u=i.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(u,d.childCount),p=r&&r[f+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[f]||d;if(!d.canReplace(u+1,d.childCount)||!m.type.validContent(h))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function gl(n,e,t=1,r){let i=n.doc.resolve(e),s=b.empty,o=b.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){s=b.from(i.node(l).copy(s));let f=r&&r[c];o=b.from(f?f.type.create(f.attrs,o):i.node(l).copy(o))}n.step(new $(e,e,new k(s.append(o),t,t),!0))}function re(n,e){let t=n.resolve(e),r=t.index();return Ni(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function yl(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i0?(s=r.node(i+1),l++,o=r.node(i).maybeChild(l)):(s=r.node(i).maybeChild(l-1),o=r.node(i+1)),s&&!s.isTextblock&&Ni(s,o)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function bl(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,s=n.doc.resolve(e-t),o=s.node().type;if(i&&o.inlineContent){let f=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);f&&!d?r=!1:!f&&d&&(r=!0)}let l=n.steps.length;if(r===!1){let f=n.doc.resolve(e+t);Oi(n,f.node(),f.before(),l)}o.inlineContent&&In(n,e+t-1,o,s.node().contentMatchAt(s.index()),r==null);let a=n.mapping.slice(l),c=a.map(e-t);if(n.step(new $(c,a.map(e+t,-1),k.empty,!0)),r===!0){let f=n.doc.resolve(c);wi(n,f.node(),f.before(),n.steps.length)}return n}function kl(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,t))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,t))return r.after(i+1);if(s=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),f=!1;if(s==1)f=c.canReplace(a,a,i);else{let d=c.contentMatchAt(a).findWrapping(i.firstChild.type);f=d&&c.canReplaceWith(a,a,d[0])}if(f)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function mt(n,e,t=e,r=k.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),s=n.resolve(t);return Ei(i,s,r)?new $(e,t,r):new Dn(i,s,r).fit()}function Ei(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}var Dn=class{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=b.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=b.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new k(s,o,l);return e>-1?new R(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new $(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=On(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],f,d=null;if(t==1&&(o?c.matchType(o.type)||(d=c.fillBefore(b.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(t==2&&o&&(f=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:f};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=On(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new k(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=On(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new k(ft(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new k(ft(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m1||a==0||m.content.size)&&(d=g,f.push(Di(m.mark(u.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=dt(this.placed,t,b.from(f)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],s=t=0;l--){let{match:a,type:c}=this.frontier[l],f=Nn(e,l,c,a,!0);if(!f||f.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=dt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=dt(this.placed,this.depth,b.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(b.empty,!0);t.childCount&&(this.placed=dt(this.placed,this.frontier.length,t))}};function ft(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(ft(n.firstChild.content,e-1,t)))}function dt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(dt(n.lastChild.content,e-1,t)))}function On(n,e){for(let t=0;t1&&(r=r.replaceChild(0,Di(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty,!0)))),n.copy(r)}function Nn(n,e,t,r,i){let s=n.node(e),o=i?n.indexAfter(e):n.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!Sl(t,s.content,o)?l:null}function Sl(n,e,t){for(let r=t;r0;u--,h--){let p=i.node(u).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(u)>-1?l=u:i.before(u)==h&&o.splice(1,0,-u)}let a=o.indexOf(l),c=[],f=r.openStart;for(let u=r.content,h=0;;h++){let p=u.firstChild;if(c.push(p),h==r.openStart)break;u=p.content}for(let u=f-1;u>=0;u--){let h=c[u],p=xl(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))f=u;else if(p||!h.type.isTextblock)break}for(let u=r.openStart;u>=0;u--){let h=(u+f+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m=0&&(n.replace(e,t,r),!(n.steps.length>d));u--){let h=o[u];h<0||(e=i.before(h),t=s.after(h))}}function Ai(n,e,t,r,i){if(er){let s=i.contentMatchAt(0),o=s.fillBefore(n).append(n);n=o.append(s.matchFragment(o).fillBefore(b.empty,!0))}return n}function Cl(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=kl(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new k(b.from(r),0,0))}function wl(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(t),l=!1;for(let a=r.depth;a>o;a--)r.node(a).type.spec.isolating&&(l=!0);for(let a=i.depth;a>o;a--)i.node(a).type.spec.isolating&&(l=!0);if(!l){for(let a=r.depth;a>0&&e==r.start(a);a--)e=r.before(a);for(let a=i.depth;a>0&&t==i.start(a);a--)t=i.before(a);r=n.doc.resolve(e),i=n.doc.resolve(t)}}let s=Ii(r,i);for(let o=0;o0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&i.end(o)-t!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function Ii(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let s=n.start(i);if(se.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&t.push(i)}return t}var Ft=class n extends B{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return F.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return F.fromReplace(e,this.pos,this.pos+1,new k(b.from(i),0,t.isLeaf?0:1))}getMap(){return fe.empty}invert(e){return new n(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new n(t.pos,t.attr,t.value)}};B.jsonID("attr",Ft);var $t=class n extends B{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return F.ok(r)}getMap(){return fe.empty}invert(e){return new n(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new n(t.attr,t.value)}};B.jsonID("docAttr",$t);var qe=class extends Error{};qe=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};qe.prototype=Object.create(Error.prototype);qe.prototype.constructor=qe;qe.prototype.name="TransformError";var Ke=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Tn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new qe(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r{e=Math.min(e,l),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=k.empty){let i=mt(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new k(b.from(r),0,0))}delete(e,t){return this.replace(e,t,k.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Ml(this,e,t,r),this}replaceRangeWith(e,t,r){return Cl(this,e,t,r),this}deleteRange(e,t){return wl(this,e,t),this}lift(e,t){return cl(this,e,t),this}join(e,t=1){return bl(this,e,t),this}wrap(e,t){return ul(this,e,t),this}setBlockType(e,t=e,r,i=null){return hl(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return ml(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Ft(e,t,r)),this}setDocAttribute(e,t){return this.step(new $t(e,t)),this}addNodeMark(e,t){return this.step(new pt(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof E)t.isInSet(r.marks)&&this.step(new je(e,t));else{let i=r.marks,s,o=[];for(;s=t.isInSet(i);)o.push(new je(e,s)),i=s.removeFromSet(i);for(let l=o.length-1;l>=0;l--)this.step(o[l])}return this}split(e,t=1,r){return gl(this,e,t,r),this}addMark(e,t,r){return ol(this,e,t,r),this}removeMark(e,t,r){return ll(this,e,t,r),this}clearIncompatible(e,t,r){return In(this,e,t,r),this}};var Rn=Object.create(null),O=class{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Vt(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;s--){let o=t<0?_e(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):_e(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new K(e.node(0))}static atStart(e){return _e(e,e,0,0,1)||new K(e)}static atEnd(e){return _e(e,e,e.content.size,e.childCount,-1)||new K(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Rn[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Rn)throw new RangeError("Duplicate use of selection JSON ID "+e);return Rn[e]=t,t.prototype.jsonID=e,t}getBookmark(){return N.between(this.$anchor,this.$head).getBookmark()}};O.prototype.visible=!0;var Vt=class{constructor(e,t){this.$from=e,this.$to=t}},Ri=!1;function vi(n){!Ri&&!n.parent.inlineContent&&(Ri=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}var N=class n extends O{constructor(e,t=e){vi(e),vi(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return O.near(r);let i=e.resolve(t.map(this.anchor));return new n(i.parent.inlineContent?i:r,r)}replace(e,t=k.empty){if(super.replace(e,t),t==k.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Wt(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let s=O.findFrom(t,r,!0)||O.findFrom(t,-r,!0);if(s)t=s.$head;else return O.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(O.findFrom(e,-r,!0)||O.findFrom(e,r,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let l=e.child(o);if(l.isAtom){if(!s&&x.isSelectable(l))return x.create(n,t-(i<0?l.nodeSize:0))}else{let a=_e(n,l,t+i,i<0?l.childCount:0,i,s);if(a)return a}t+=l.nodeSize*i}return null}function Pi(n,e,t){let r=n.steps.length-1;if(r{o==null&&(o=f)}),n.setSelection(O.near(n.doc.resolve(o),t))}var Bi=1,Lt=2,zi=4,Bn=class extends Ke{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Lt,this}ensureMarks(e){return E.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Lt)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Lt,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||E.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(O.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=zi,this}get scrolledIntoView(){return(this.updated&zi)>0}};function Fi(n,e){return!e||!n?n:n.bind(e)}var Re=class{constructor(e,t,r){this.name=e,this.init=Fi(t.init,r),this.apply=Fi(t.apply,r)}},Nl=[new Re("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Re("selection",{init(n,e){return n.selection||O.atStart(e.doc)},apply(n){return n.selection}}),new Re("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Re("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})],gt=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Nl.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Re(r.key,r.spec.state,r))})}},Jt=class n{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new gt(e.schema,e.plugins),s=new n(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Y.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=O.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[o.name]=c.fromJSON.call(a,e,t[l],s);return}}s[o.name]=o.init(e,s)}}),s}};function $i(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=$i(i,e,{})),t[r]=i}return t}var _=class{constructor(e){this.spec=e,this.props={},e.props&&$i(e.props,this,this.props),this.key=e.key?e.key.key:Li("plugin")}getState(e){return e[this.key]}},vn=Object.create(null);function Li(n){return n in vn?n+"$"+ ++vn[n]:(vn[n]=0,n+"$")}var ie=class{constructor(e="key"){this.key=Li(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var L=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Qe=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e},Wn=null,he=function(n,e,t){let r=Wn||(Wn=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Tl=function(){Wn=null},Le=function(n,e,t,r){return t&&(Vi(n,e,t,r,-1)||Vi(n,e,t,r,1))},El=/^(img|br|input|textarea|hr)$/i;function Vi(n,e,t,r,i){for(var s;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Q(n))){let o=n.parentNode;if(!o||o.nodeType!=1||wt(n)||El.test(n.nodeName)||n.contentEditable=="false")return!1;e=L(n)+(i<0?0:1),n=o}else if(n.nodeType==1){let o=n.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else n=o,e=i<0?Q(n):0}else return!1}}function Q(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Dl(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=Q(n)}else if(n.parentNode&&!wt(n))e=L(n),n=n.parentNode;else return null}}function Al(n,e){for(;;){if(n.nodeType==3&&e2),Z=et||(se?/Mac/.test(se.platform):!1),Ms=se?/Win/.test(se.platform):!1,pe=/Android \d/.test(Ce),Ot=!!Wi&&"webkitFontSmoothing"in Wi.documentElement.style,Pl=Ot?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Bl(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function ue(n,e){return typeof n=="number"?n:n[e]}function zl(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Ji(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let o=t||n.dom;o;){if(o.nodeType!=1){o=Qe(o);continue}let l=o,a=l==s.body,c=a?Bl(s):zl(l),f=0,d=0;if(e.topc.bottom-ue(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+ue(i,"top")-c.top:e.bottom-c.bottom+ue(i,"bottom")),e.leftc.right-ue(r,"right")&&(f=e.right-c.right+ue(i,"right")),f||d)if(a)s.defaultView.scrollBy(f,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),f&&(l.scrollLeft+=f);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let u=a?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u=="absolute"?o.offsetParent:Qe(o)}}function Fl(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=t+1;o=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Cs(n.dom)}}function Cs(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Qe(r));return e}function $l({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;ws(t,r==0?0:r-e)}function ws(n,e){for(let t=0;t=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=f,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?Vl(t,i):!t||r&&t.nodeType==1?{node:n,offset:s}:Os(t,i)}function Vl(n,e){let t=n.nodeValue.length,r=document.createRange(),i;for(let s=0;s=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:n,offset:0}}function sr(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Wl(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,i,s)}function jl(n,e,t,r){let i=-1;for(let s=e,o=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!o&&a.left>r.left||a.top>r.top?i=l.posBefore:(!o&&a.right-1?i:n.docView.posFromDOM(e,t,-1)}function Ns(n,e,t){let r=n.childNodes.length;if(r&&t.tope.top&&i++}let c;Ot&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=jl(n,r,i,e))}l==null&&(l=Jl(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function ji(n){return n.top=0&&i==r.nodeValue.length?(a--,f=1):t<0?a--:c++,yt(ye(he(r,a,c),f),f<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(t<0||i==Q(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return zn(a.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(t<0||i==Q(r))){let a=r.childNodes[i-1],c=a.nodeType==3?he(a,Q(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return yt(ye(c,1),!1)}if(s==null&&i=0)}function yt(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function zn(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Es(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function Hl(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return Es(n,e,()=>{let{node:s}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=Ts(n,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=he(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;cf.top+1&&(t=="up"?o.top-f.top>(f.bottom-o.top)*2:f.bottom-o.bottom>(o.bottom-f.top)*2))return!1}}return!0})}var Ul=/[\u0590-\u08ac]/;function _l(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,l=n.domSelection();return l?!Ul.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:o:Es(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:f,anchorOffset:d}=n.domSelectionRange(),u=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(f,d),a&&(a!=f||c!=d)&&l.extend&&l.extend(a,c)}catch{}return u!=null&&(l.caretBidiLevel=u),g}):r.pos==r.start()||r.pos==r.end()}var qi=null,Ki=null,Hi=!1;function Gl(n,e,t){return qi==e&&Ki==t?Hi:(qi=e,Ki=t,Hi=t=="up"||t=="down"?Hl(n,e,t):_l(n,e,t))}var te=0,Ui=1,Pe=2,oe=3,Ve=class{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=te,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tL(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!t||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;te||o instanceof Kt){i=e-s;break}s=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof jt&&s.side>=0;r--);if(t<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?L(s.dom)+1:0}}else{let s,o=!0;for(;s=r=f&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,f);e=o;for(let d=l;d>0;d--){let u=this.children[d-1];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(1)){i=L(u.dom)+1;break}e-=u.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let f=l+1;fp&&ot){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i=r:er){let l=r+s.border,a=o-s.border;if(e>=l&&t<=a){this.dirty=e==r||t==o?Pe:Ui,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=oe:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Pe:oe}r=o}this.dirty=Pe}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Pe:Ui;t.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==te&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Kn=class extends Ve{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},tt=class n extends Ve{constructor(e,t,r,i,s){super(e,[],r,i),this.mark=t,this.spec=s}static create(e,t,r,i){let s=i.nodeViews[t.type.name],o=s&&s(t,i,r);return(!o||!o.dom)&&(o=ce.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new n(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&oe||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=oe&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=te){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(s=Gn(s,0,e,r));for(let l=0;l{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,i),f=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!f)f=document.createTextNode(t.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:d}=ce.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!d&&!t.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),t.type.spec.draggable&&(f.draggable=!0));let u=f;return f=Is(f,r,t),c?a=new Hn(e,t,r,i,f,d||null,u,c,s,o+1):t.isText?new qt(e,t,r,i,f,u,s):new n(e,t,r,i,f,d||null,u,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>b.empty)}return e}matchesNode(e,t,r){return this.dirty==te&&e.eq(this.node)&&Ht(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,s=e.composing?this.localCompositionInfo(e,t):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new _n(this,o&&o.node,e);Ql(this.node,this.innerDeco,(c,f,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e,f):c.type.side>=0&&!d&&a.syncToMarks(f==this.node.childCount?E.none:this.node.child(f).marks,r,e,f),a.placeWidget(c,e,i)},(c,f,d,u)=>{a.syncToMarks(c.marks,r,e,u);let h;a.findNodeMatch(c,f,d,u)||l&&e.state.selection.from>i&&e.state.selection.to-1&&a.updateNodeAt(c,f,d,h,e)||a.updateNextNode(c,f,d,e,u,i)||a.addNode(c,f,d,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Pe)&&(o&&this.protectLocalComposition(e,o),Ds(this.contentDOM,this.children,e),et&&ea(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof N)||rt+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,l=ta(this.node.content,o,r-t,i-t);return l<0?null:{node:s,pos:l,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new Kn(this,s,t,i);e.input.compositionNodes.push(o),this.children=Gn(this.children,r,r+i.length,e,o)}update(e,t,r,i){return this.dirty==oe||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=te}updateOuterDeco(e){if(Ht(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=As(this.dom,this.nodeDOM,Un(this.outerDeco,this.node,t),Un(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function _i(n,e,t,r,i){Is(r,e,n);let s=new xe(void 0,n,e,t,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}var qt=class n extends xe{constructor(e,t,r,i,s,o,l){super(e,t,r,i,s,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==oe||this.dirty!=te&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=te||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=te,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),s=document.createTextNode(i.text);return new n(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=oe)}get domAtom(){return!1}isText(e){return this.node.text==e}},Kt=class extends Ve{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==te&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},Hn=class extends xe{constructor(e,t,r,i,s,o,l,a,c,f){super(e,t,r,i,s,o,l,c,f),this.spec=a}update(e,t,r,i){if(this.dirty==oe)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Ds(n,e,t){let r=n.firstChild,i=!1;for(let s=0;s>1,l=Math.min(o,e.length);for(;s-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let f=tt.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,f),this.top=f,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof tt)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(i-1))break;--i,s.set(l,i),o.push(l)}}return{index:i,matched:s,matches:o.reverse()}}function Zl(n,e){return n.type.side-e.type.side}function Ql(n,e,t,r){let i=e.locals(n),s=0;if(i.length==0){for(let c=0;cs;)l.push(i[o++]);let p=s+u.nodeSize;if(u.isText){let g=p;o!g.inline):l.slice();r(u,m,e.forChild(s,u),h),s=p}}function ea(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function ta(n,e,t,r){for(let i=0,s=0;i=t){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function Gn(n,e,t,r,i){let s=[];for(let o=0,l=0;o=t||f<=e?s.push(a):(ct&&s.push(a.slice(t-c,a.size,r)))}return s}function or(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),s=i&&i.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,c;if(Qt(t)){for(a=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&x.isSelectable(d)&&i.parent&&!(d.isInline&&Il(t.focusNode,t.focusOffset,i.dom))){let u=i.posBefore;c=new x(o==u?l:r.resolve(u))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let d=o,u=o;for(let h=0;h{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Rs(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function ra(n){let e=n.domSelection();if(!e)return;let t=n.cursorWrapper.dom,r=t.nodeName=="IMG";r?e.collapse(t.parentNode,L(t)+1):e.collapse(t,0),!r&&!n.state.selection.visible&&G&&Se<=11&&(t.disabled=!0,t.disabled=!1)}function vs(n,e){if(e instanceof x){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Qi(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Qi(n)}function Qi(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function lr(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||N.between(e,t,r)}function es(n){return n.editable&&!n.hasFocus()?!1:Ps(n)}function Ps(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function ia(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Le(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Yn(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),s=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return s&&O.findFrom(s,e)}function be(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function ts(n,e,t){let r=n.state.selection;if(r instanceof N)if(t.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=n.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return be(n,new N(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=Yn(n.state,e);return i&&i instanceof x?be(n,i):!1}else if(!(Z&&t.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=n.docView.descAt(l))&&!o.contentDOM?x.isSelectable(s)?be(n,new x(e<0?n.state.doc.resolve(i.pos-s.nodeSize):i)):Ot?be(n,new N(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof x&&r.node.isInline)return be(n,new N(e>0?r.$to:r.$from));{let i=Yn(n.state,e);return i?be(n,i):!1}}}function Ut(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function kt(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Ye(n,e){return e<0?sa(n):oa(n)}function sa(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,s,o=!1;for(ee&&t.nodeType==1&&r0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(kt(l,-1))i=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Bs(t))break;{let l=t.previousSibling;for(;l&&kt(l,-1);)i=t.parentNode,s=L(l),l=l.previousSibling;if(l)t=l,r=Ut(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?Xn(n,t,r):i&&Xn(n,i,s)}function oa(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=Ut(t),s,o;for(;;)if(r{n.state==i&&me(n)},50)}function ns(n,e){let t=n.state.doc.resolve(e);if(!(V||Ms)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function rs(n,e,t){let r=n.state.selection;if(r instanceof N&&!r.empty||t.indexOf("s")>-1||Z&&t.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=Yn(n.state,e);if(o&&o instanceof x)return be(n,o)}if(!i.parent.inlineContent){let o=e<0?i:s,l=r instanceof K?O.near(o,e):O.findFrom(o,e);return l?be(n,l):!1}return!1}function is(n,e){if(!(n.state.selection instanceof N))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let o=n.state.tr;return e<0?o.delete(t.pos-s.nodeSize,t.pos):o.delete(t.pos,t.pos+s.nodeSize),n.dispatch(o),!0}return!1}function ss(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function ca(n){if(!q||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;ss(n,r,"true"),setTimeout(()=>ss(n,r,"false"),20)}return!1}function fa(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function da(n,e){let t=e.keyCode,r=fa(e);if(t==8||Z&&t==72&&r=="c")return is(n,-1)||Ye(n,-1);if(t==46&&!e.shiftKey||Z&&t==68&&r=="c")return is(n,1)||Ye(n,1);if(t==13||t==27)return!0;if(t==37||Z&&t==66&&r=="c"){let i=t==37?ns(n,n.state.selection.from)=="ltr"?-1:1:-1;return ts(n,i,r)||Ye(n,i)}else if(t==39||Z&&t==70&&r=="c"){let i=t==39?ns(n,n.state.selection.from)=="ltr"?1:-1:1;return ts(n,i,r)||Ye(n,i)}else{if(t==38||Z&&t==80&&r=="c")return rs(n,-1,r)||Ye(n,-1);if(t==40||Z&&t==78&&r=="c")return ca(n)||rs(n,1,r)||Ye(n,1);if(r==(Z?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function ar(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=n.someProp("clipboardSerializer")||ce.fromSchema(n.state.schema),l=Ws(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let c=a.firstChild,f,d=0;for(;c&&c.nodeType==1&&(f=Vs[c.nodeName.toLowerCase()]);){for(let h=f.length-1;h>=0;h--){let p=l.createElement(f[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(t)}`);let u=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,` - -`);return{dom:a,text:u,slice:e}}function zs(n,e,t,r,i){let s=i.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=!!e&&(r||s||!t);if(a){if(n.someProp("transformPastedText",u=>{e=u(e,s||r,n)}),s)return l=new k(b.from(n.state.schema.text(e.replace(/\r\n?/g,` -`))),0,0),n.someProp("transformPasted",u=>{l=u(l,n,!0)}),l;let d=n.someProp("clipboardTextParser",u=>u(e,i,r,n));if(d)l=d;else{let u=i.marks(),{schema:h}=n.state,p=ce.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,u)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),o=ma(t),Ot&&ga(o);let c=o&&o.querySelector("[data-pm-slice]"),f=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let d=+f[3];d>0;d--){let u=o.firstChild;for(;u&&u.nodeType!=1;)u=u.nextSibling;if(!u)break;o=u}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||ae.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||f),context:i,ruleFromNode(u){return u.nodeName=="BR"&&!u.nextSibling&&u.parentNode&&!ua.test(u.parentNode.nodeName)?{ignore:!0}:null}})),f)l=ya(ls(l,+f[1],+f[2]),f[4]);else if(l=k.maxOpen(ha(l.content,i),!0),l.openStart||l.openEnd){let d=0,u=0;for(let h=l.content.firstChild;d{l=d(l,n,a)}),l}var ua=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function ha(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(n.forEach(l=>{if(!o)return;let a=i.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&s.length&&$s(a,s,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=Ls(o[o.length-1],s.length));let f=Fs(l,a);o.push(f),i=i.matchType(f.type),s=a}}),o)return b.from(o)}return n}function Fs(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,b.from(n));return n}function $s(n,e,t,r,i){if(i1&&(s=0),i=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(l))}function ls(n,e,t){return et})),$n.createHTML(n)):n}function ma(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Ws().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&Vs[r[1].toLowerCase()])&&(n=i.map(s=>"<"+s+">").join("")+n+i.map(s=>"").reverse().join("")),t.innerHTML=pa(n),i)for(let s=0;s=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=b.from(a.create(r[l+1],i)),s++,o++}return new k(i,s,o)}var H={},U={},ba={touchstart:!0,touchmove:!0},Qn=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function ka(n){for(let e in H){let t=H[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{xa(n,r)&&!cr(n,r)&&(n.editable||!(r.type in U))&&t(n,r)},ba[e]?{passive:!0}:void 0)}q&&n.dom.addEventListener("input",()=>null),er(n)}function ke(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Sa(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function er(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>cr(n,r))})}function cr(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function xa(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Ma(n,e){!cr(n,e)&&H[e.type]&&(n.editable||!(e.type in U))&&H[e.type](n,e)}U.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!js(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(pe&&V&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),et&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,ve(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||da(n,t)?t.preventDefault():ke(n,"key")};U.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};U.keypress=(n,e)=>{let t=e;if(js(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Z&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof N)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode),s=()=>n.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i,s))&&n.dispatch(s()),t.preventDefault()}};function en(n){return{left:n.clientX,top:n.clientY}}function Ca(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function fr(n,e,t,r,i){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(n.someProp(e,l=>o>s.depth?l(n,t,s.nodeAfter,s.before(o),i,!0):l(n,t,s.node(o),s.before(o),i,!1)))return!0;return!1}function Ze(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function wa(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&x.isSelectable(r)?(Ze(n,new x(t),"pointer"),!0):!1}function Oa(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof x&&(r=t.node);let s=n.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(x.isSelectable(l)){r&&t.$from.depth>0&&o>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?i=s.before(t.$from.depth):i=s.before(o);break}}return i!=null?(Ze(n,x.create(n.state.doc,i),"pointer"),!0):!1}function Na(n,e,t,r,i){return fr(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(i?Oa(n,t):wa(n,t))}function Ta(n,e,t,r){return fr(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function Ea(n,e,t,r){return fr(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||Da(n,t,r)}function Da(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Ze(n,N.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(o.inlineContent)Ze(n,N.create(r,l+1,l+1+o.content.size),"pointer");else if(x.isSelectable(o))Ze(n,x.create(r,l),"pointer");else continue;return!0}}function dr(n){return _t(n)}var Js=Z?"metaKey":"ctrlKey";H.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=dr(n),i=Date.now(),s="singleClick";i-n.input.lastClick.time<500&&Ca(t,n.input.lastClick)&&!t[Js]&&n.input.lastClick.button==t.button&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:s,button:t.button};let o=n.posAtCoords(en(t));o&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new tr(n,o,t,!!r)):(s=="doubleClick"?Ta:Ea)(n,o.pos,o.inside,t)?t.preventDefault():ke(n,"pointer"))};var tr=class{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Js],this.allowDefault=r.shiftKey;let s,o;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),o=t.inside;else{let f=e.state.doc.resolve(t.pos);s=f.parent,o=f.depth?f.before():0}let l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof x&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ee&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ke(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>me(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(en(e))),this.updateAllowDefault(e),this.allowDefault||!t?ke(this.view,"pointer"):Na(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||q&&this.mightDrag&&!this.mightDrag.node.isAtom||V&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Ze(this.view,O.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ke(this.view,"pointer")}move(e){this.updateAllowDefault(e),ke(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};H.touchstart=n=>{n.input.lastTouch=Date.now(),dr(n),ke(n,"pointer")};H.touchmove=n=>{n.input.lastTouch=Date.now(),ke(n,"pointer")};H.contextmenu=n=>dr(n);function js(n,e){return n.composing?!0:q&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}var Aa=pe?5e3:-1;U.compositionstart=U.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof N&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||V&&Ms&&Ia(n)))n.markCursor=n.state.storedMarks||t.marks(),_t(n,!0),n.markCursor=null;else if(_t(n,!e.selection.empty),ee&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let l=n.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}n.input.composing=!0}qs(n,Aa)};function Ia(n){let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let r=e.childNodes[t];return r.nodeType==1&&r.contentEditable=="false"}U.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.badSafariComposition?n.domObserver.forceFlush():n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,qs(n,20))};function qs(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>_t(n),e))}function Ks(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=va());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Ra(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=Dl(e.focusNode,e.focusOffset),r=Al(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,s=n.domObserver.lastChangedTextNode;if(t==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function va(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function _t(n,e=!1){if(!(pe&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Ks(n),e||n.docView&&n.docView.dirty){let t=or(n),r=n.state.selection;return t&&!t.eq(r)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function Pa(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}var St=G&&Se<15||et&&Pl<604;H.copy=U.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let s=St?null:t.clipboardData,o=r.content(),{dom:l,text:a}=ar(n,o);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):Pa(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Ba(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function za(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?xt(n,r.value,null,i,e):xt(n,r.textContent,r.innerHTML,i,e)},50)}function xt(n,e,t,r,i){let s=zs(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,s||k.empty)))return!0;if(!s)return!1;let o=Ba(s),l=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(s);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Hs(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}U.paste=(n,e)=>{let t=e;if(n.composing&&!pe)return;let r=St?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&xt(n,Hs(r),r.getData("text/html"),i,t)?t.preventDefault():za(n,t)};var Gt=class{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}},Fa=Z?"altKey":"ctrlKey";function Us(n,e){let t;return n.someProp("dragCopies",r=>{t=t||r(e)}),t!=null?!t:!e[Fa]}H.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,s=i.empty?null:n.posAtCoords(en(t)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof x?i.to-1:i.to))){if(r&&r.mightDrag)o=x.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(o=x.create(n.state.doc,d.posBefore))}}let l=(o||n.state.selection).content(),{dom:a,text:c,slice:f}=ar(n,l);(!t.dataTransfer.files.length||!V||xs>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(St?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",St||t.dataTransfer.setData("text/plain",c),n.dragging=new Gt(f,Us(n,t),o)};H.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};U.dragover=U.dragenter=(n,e)=>e.preventDefault();U.drop=(n,e)=>{try{$a(n,e,n.dragging)}finally{n.dragging=null}};function $a(n,e,t){if(!e.dataTransfer)return;let r=n.posAtCoords(en(e));if(!r)return;let i=n.state.doc.resolve(r.pos),s=t&&t.slice;s?n.someProp("transformPasted",h=>{s=h(s,n,!1)}):s=zs(n,Hs(e.dataTransfer),St?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&Us(n,e));if(n.someProp("handleDrop",h=>h(n,e,s||k.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let l=s?Ti(n.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let a=n.state.tr;if(o){let{node:h}=t;h?h.replace(a):a.deleteSelection()}let c=a.mapping.map(l),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=a.doc;if(f?a.replaceRangeWith(c,c,s.content.firstChild):a.replaceRange(c,c,s),a.doc.eq(d))return;let u=a.doc.resolve(c);if(f&&x.isSelectable(s.content.firstChild)&&u.nodeAfter&&u.nodeAfter.sameMarkup(s.content.firstChild))a.setSelection(new x(u));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((p,m,g,y)=>h=y),a.setSelection(lr(n,u,a.doc.resolve(h)))}n.focus(),n.dispatch(a.setMeta("uiEvent","drop"))}H.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&me(n)},20))};H.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};H.beforeinput=(n,e)=>{if(V&&pe&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,ve(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in U)H[n]=U[n];function Mt(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}var Yt=class n{constructor(e,t){this.toDOM=e,this.spec=t||Fe,this.side=this.spec.side||0}map(e,t,r,i){let{pos:s,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new Me(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof n&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Mt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},ze=class n{constructor(e,t){this.attrs=e,this.spec=t||Fe}map(e,t,r,i){let s=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new Me(s,o,this)}valid(e,t){return t.from=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let o=0;oe){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,r,i+l,s)}}map(e,t,r){return this==j||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Fe)}mapInner(e,t,r,i,s){let o;for(let l=0;l{let c=a+r,f;if(f=Gs(t,l,c)){for(i||(i=this.children.slice());sl&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,o=s+t.content.size;for(let l=0;ls&&a.type instanceof ze){let c=Math.max(s,a.from)-s,f=Math.min(o,a.to)-s;ci.map(e,t,Fe));return n.from(r)}forChild(e,t){if(t.isLeaf)return ne.empty;let r=[];for(let i=0;it instanceof ne)?e:e.reduce((t,r)=>t.concat(r instanceof ne?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let g=m-p-(h-u);for(let y=0;yw+f-d)continue;let M=l[y]+f-d;h>=M?l[y+1]=u<=M?-2:-1:u>=f&&g&&(l[y]+=g,l[y+1]+=g)}d+=g}),f=t.maps[c].map(f,-1)}let a=!1;for(let c=0;c=r.content.size){a=!0;continue}let u=t.map(n[c+1]+s,-1),h=u-i,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,f+1,n[c]+s+1,o);y!=j?(l[c]=d,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=Va(l,n,e,t,i,s,o),f=Zt(c,r,0,o);e=f.local;for(let d=0;dt&&o.to{let c=Gs(n,l,a+t);if(c){s=!0;let f=Zt(c,l,t+a+1,r);f!=j&&i.push(a,a+l.nodeSize,f)}});let o=_s(s?Ys(n):n,-t).sort($e);for(let l=0;l0;)e++;n.splice(e,0,t)}function Ln(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=j&&e.push(r)}),n.cursorWrapper&&e.push(ne.create(n.state.doc,[n.cursorWrapper.deco])),Xt.from(e)}var Wa={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ja=G&&Se<=11,rr=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},ir=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rr,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():q&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Ja&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Wa)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(es(this.view)){if(this.suppressingSelectionUpdates)return me(this.view);if(G&&Se<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Le(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let s=e.focusNode;s;s=Qe(s))t.add(s);for(let s=e.anchorNode;s;s=Qe(s))if(t.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&es(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,l=!1,a=[];if(e.editable)for(let f=0;ff.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let f of a)if(f.nodeName=="BR"&&f.parentNode){let d=f.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){f.parentNode.removeChild(f);break}d=d.firstChild}}}else if(ee&&a.length){let f=a.filter(d=>d.nodeName=="BR");if(f.length==2){let[d,u]=f;d.parentNode&&d.parentNode.parentNode==u.parentNode?u.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let u of f){let h=u.parentNode;h&&h.nodeName=="LI"&&(!d||Ka(e,d)!=h)&&u.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),ja(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Ha(e,a)),this.handleDOMChange(s,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||me(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let f=0;fi;g--){let y=r.childNodes[g-1],w=y.pmViewDesc;if(y.nodeName=="BR"&&!w){s=g;break}if(!w||w.size)break}let d=n.state.doc,u=n.someProp("domParser")||ae.fromSchema(n.state.schema),h=d.resolve(o),p=null,m=u.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:_a,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),p={anchor:g+o,head:y+o}}return{doc:m,sel:p,from:o,to:l}}function _a(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(q&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||q&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Ga=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Ya(n,e,t,r,i){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let C=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,D=or(n,C);if(D&&!n.state.selection.eq(D)){if(V&&pe&&n.input.lastKeyCode===13&&Date.now()-100Fo(n,ve(13,"Enter"))))return;let W=n.state.tr.setSelection(D);C=="pointer"?W.setMeta("pointer",!0):C=="key"&&W.scrollIntoView(),s&&W.setMeta("composition",s),n.dispatch(W)}return}let o=n.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=Ua(n,e,t),f=n.state.doc,d=f.slice(c.from,c.to),u,h;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||pe)&&i.some(C=>C.nodeType==1&&!Ga.test(C.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",C=>C(n,ve(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof N&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let C=hs(n,n.state.doc,c.sel);if(C&&!C.eq(n.state.selection)){let D=n.state.tr.setSelection(C);s&&D.setMeta("composition",s),n.dispatch(D)}}return}n.state.selection.fromn.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),G&&Se<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=f.resolve(p.start),w=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA;if((et&&n.input.lastIOSEnter>Date.now()-225&&(!w||i.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!w&&m.posC(n,ve(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&Za(f,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",C=>C(n,ve(8,"Backspace")))){pe&&V&&n.domObserver.suppressSelectionUpdates();return}V&&p.endB==p.start&&(n.input.lastChromeDelete=Date.now()),pe&&!w&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(C){return C(n,ve(13,"Enter"))})},20));let M=p.start,I=p.endA,A=C=>{let D=C||n.state.tr.replace(M,I,c.doc.slice(p.start-c.from,p.endB-c.from));if(c.sel){let W=hs(n,D.doc,c.sel);W&&!(V&&n.composing&&W.empty&&(p.start!=p.endB||n.input.lastChromeDeleteme(n),20));let C=A(n.state.tr.delete(M,I)),D=f.resolve(p.start).marksAcross(f.resolve(p.endA));D&&C.ensureMarks(D),n.dispatch(C)}else if(p.endA==p.endB&&(P=Xa(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start())))){let C=A(n.state.tr);P.type=="add"?C.addMark(M,I,P.mark):C.removeMark(M,I,P.mark),n.dispatch(C)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,g.parentOffset),D=()=>A(n.state.tr.insertText(C,M,I));n.someProp("handleTextInput",W=>W(n,M,I,C,D))||n.dispatch(D())}else n.dispatch(A());else n.dispatch(A())}function hs(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:lr(n,e.resolve(t.anchor),e.resolve(t.head))}function Xa(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,s=r,o,l,a;for(let f=0;ff.mark(l.addToSet(f.marks));else if(i.length==0&&s.length==1)l=s[0],o="remove",a=f=>f.mark(l.removeFromSet(f.marks));else return null;let c=[];for(let f=0;ft||Vn(o,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function Qa(n,e,t,r,i){let s=n.findDiffStart(e,t);if(s==null)return null;let{a:o,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let a=Math.max(0,s-Math.min(o,l));r-=o+a-s}if(o=o?s-r:0;s-=a,s&&s=l?s-r:0;s-=a,s&&s=56320&&e<=57343&&t>=55296&&t<=56319}var Ct=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Qn,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ks),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=ys(this),gs(this),this.nodeViews=bs(this),this.docView=_i(this.state.doc,ms(this),Ln(this),this.dom,this),this.domObserver=new ir(this,(r,i,s,o)=>Ya(this,r,i,s,o)),this.domObserver.start(),ka(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&er(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ks),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(Ks(this),o=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=bs(this);tc(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&er(this),this.editable=ys(this),gs(this);let a=Ln(this),c=ms(this),f=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(i.selection))&&(o=!0);let u=f=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Fl(this);if(o){this.domObserver.stop();let h=d&&(G||V)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&ec(i.selection,e.selection);if(d){let p=V?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Ra(this)),(s||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=_i(e.doc,c,a,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ia(this))?me(this,h):(vs(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),f=="reset"?this.dom.scrollTop=0:f=="to selection"?this.scrollToSelection():u&&$l(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof x){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Ji(this,t.getBoundingClientRect(),e)}else Ji(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return ql(this,e)}coordsAtPos(e,t=1){return Ts(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return Gl(this,t||this.state,e)}pasteHTML(e,t){return xt(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return xt(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return ar(this,e)}destroy(){this.docView&&(Sa(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ln(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Tl())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Ma(this,e)}domSelectionRange(){let e=this.domSelection();return e?q&&this.root.nodeType===11&&Rl(this.dom.ownerDocument)==this.dom&&qa(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};Ct.prototype.dispatch=function(n){let e=this._props.dispatchTransaction;e?e.call(this,n):this.updateState(this.state.apply(n))};function ms(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[Me.node(0,n.state.doc.content.size,e)]}function gs(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:Me.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function ys(n){return!n.someProp("editable",e=>e(n.state)===!1)}function ec(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function bs(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function tc(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function ks(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ge={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},nn={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},nc=typeof navigator<"u"&&/Mac/.test(navigator.platform),rc=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(v=0;v<10;v++)ge[48+v]=ge[96+v]=String(v);var v;for(v=1;v<=24;v++)ge[v+111]="F"+v;var v;for(v=65;v<=90;v++)ge[v]=String.fromCharCode(v+32),nn[v]=String.fromCharCode(v);var v;for(tn in ge)nn.hasOwnProperty(tn)||(nn[tn]=ge[tn]);var tn;function Xs(n){var e=nc&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||rc&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?nn:ge)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var ic=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),sc=typeof navigator<"u"&&/Win/.test(navigator.platform);function oc(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,s,o;for(let l=0;ln.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function eo(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}var mr=(n,e,t)=>{let r=eo(n,t);if(!r)return!1;let i=yr(r);if(!i){let o=r.blockRange(),l=o&&de(o);return l==null?!1:(e&&e(n.tr.lift(o,l).scrollIntoView()),!0)}let s=i.nodeBefore;if(co(n,i,e,-1))return!0;if(r.parent.content.size==0&&(nt(s,"end")||x.isSelectable(s)))for(let o=r.depth;;o--){let l=mt(n.doc,r.before(o),r.after(o),k.empty);if(l&&l.slice.size1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},to=(n,e,t)=>{let r=eo(n,t);if(!r)return!1;let i=yr(r);return i?ro(n,i,e):!1},no=(n,e,t)=>{let r=io(n,t);if(!r)return!1;let i=Sr(r);return i?ro(n,i,e):!1};function ro(n,e,t){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let f=i.lastChild;if(!f)return!1;i=f}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let f=l.firstChild;if(!f)return!1;l=f}let c=mt(n.doc,s,a,k.empty);if(!c||c.from!=s||c instanceof $&&c.slice.size>=a-s)return!1;if(t){let f=n.tr.step(c);f.setSelection(N.create(f.doc,s)),t(f.scrollIntoView())}return!0}function nt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}var gr=(n,e,t)=>{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=yr(r)}let o=s&&s.nodeBefore;return!o||!x.isSelectable(o)?!1:(e&&e(n.tr.setSelection(x.create(n.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function yr(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function io(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=io(n,t);if(!r)return!1;let i=Sr(r);if(!i)return!1;let s=i.nodeAfter;if(co(n,i,e,1))return!0;if(r.parent.content.size==0&&(nt(s,"start")||x.isSelectable(s))){let o=mt(n.doc,r.before(),r.after(),k.empty);if(o&&o.slice.size{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,r=t instanceof x,i;if(r){if(t.node.isTextblock||!re(n.doc,t.from))return!1;i=t.from}else if(i=Ue(n.doc,t.from,-1),i==null)return!1;if(e){let s=n.tr.join(i);r&&s.setSelection(x.create(s.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},oo=(n,e)=>{let t=n.selection,r;if(t instanceof x){if(t.node.isTextblock||!re(n.doc,t.to))return!1;r=t.to}else if(r=Ue(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},lo=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),s=i&&de(i);return s==null?!1:(e&&e(n.tr.lift(i,s).scrollIntoView()),!0)},xr=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` -`).scrollIntoView()),!0)};function Mr(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),s=t.indexAfter(-1),o=Mr(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,o.createAndFill());a.setSelection(O.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},wr=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof K||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=Mr(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(X(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),i=r&&de(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function cc(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof x&&e.selection.node.isBlock)return!r.parentOffset||!X(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=Mr(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=n&&n(i.parent,a,r);s.unshift(m||(a&&l?{type:l}:null)),o=h;break}else{if(h==1)return!1;s.unshift(null)}let f=e.tr;(e.selection instanceof N||e.selection instanceof K)&&f.deleteSelection();let d=f.mapping.map(r.pos),u=X(f.doc,d,s.length,s);if(u||(s[0]=l?{type:l}:null,u=X(f.doc,d,s.length,s)),!u)return!1;if(f.split(d,s.length,s),!a&&c&&r.node(o).type!=l){let h=f.mapping.map(r.before(o)),p=f.doc.resolve(h);l&&r.node(o-1).canReplaceWith(p.index(),p.index()+1,l)&&f.setNodeMarkup(f.mapping.map(r.before(o)),l)}return t&&t(f.scrollIntoView()),!0}}var fc=cc();var ao=(n,e)=>{let{$from:t,to:r}=n.selection,i,s=t.sharedDepth(r);return s==0?!1:(i=t.before(s),e&&e(n.tr.setSelection(x.create(n.doc,i))),!0)},dc=(n,e)=>(e&&e(n.tr.setSelection(new K(n.doc))),!0);function uc(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||re(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function co(n,e,t,r){let i=e.nodeBefore,s=e.nodeAfter,o,l,a=i.type.spec.isolating||s.type.spec.isolating;if(!a&&uc(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(l=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&l.matchType(o[0]||s.type).validEnd){if(t){let h=e.pos+s.nodeSize,p=b.empty;for(let y=o.length-1;y>=0;y--)p=b.from(o[y].create(null,p));p=b.from(i.copy(p));let m=n.tr.step(new R(e.pos-1,h,e.pos,h,new k(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&re(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let f=s.type.spec.isolating||r>0&&a?null:O.findFrom(e,1),d=f&&f.$from.blockRange(f.$to),u=d&&de(d);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(d,u).scrollIntoView()),!0;if(c&&nt(s,"start",!0)&&nt(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=b.empty;for(let M=p.length-1;M>=0;M--)y=b.from(p[M].copy(y));let w=n.tr.step(new R(e.pos-p.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new k(y,p.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function fo(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(t&&t(e.tr.setSelection(N.create(e.doc,n<0?i.start(s):i.end(s)))),!0):!1}}var Nr=fo(-1),Tr=fo(1);function uo(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),l=o&&He(o,n,e);return l?(r&&r(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function Er(n,e=null){return function(t,r){let i=!1;for(let s=0;s{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let f=t.doc.resolve(c),d=f.index();i=f.parent.canReplaceWith(d,d+1,n)}})}if(!i)return!1;if(r){let s=t.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=o.resolve(e.start-2);s=new De(a,a,e.depth),e.endIndex=0;f--)s=b.from(t[f].type.create(t[f].attrs,s));n.step(new R(e.start-(r?2:0),e.end,e.start,e.end,new k(s,0,0),t.length,!0));let o=0;for(let f=0;fo.childCount>0&&o.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?gc(e,t,n,s):yc(e,t,s):!0:!1}}function gc(n,e,t,r){let i=n.tr,s=r.end,o=r.$to.end(r.depth);sm;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(t.start),o=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=s.node(-1),f=s.index(-1);if(!c.canReplace(f+(l?0:1),f+1,o.content.append(a?b.empty:b.from(i))))return!1;let d=s.pos,u=d+o.nodeSize;return r.step(new R(d-(l?1:0),u+(a?1:0),d+1,u-1,new k((l?b.empty:b.from(i.copy(b.empty))).append(a?b.empty:b.from(i.copy(b.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function mo(n){return function(e,t){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,f=b.from(c?n.create():null),d=new k(b.from(n.create(null,b.from(l.type.create(null,f)))),c?3:1,0),u=s.start,h=s.end;t(e.tr.step(new R(u-(c?3:1),h,u,h,d,1,!0)).scrollIntoView())}return!0}}function un(n){let{state:e,transaction:t}=n,{selection:r}=t,{doc:i}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,s=t.storedMarks,t}}}var rt=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:r}=this,{view:i}=t,{tr:s}=r,o=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...f)=>{let d=a(...f)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:r,editor:i,state:s}=this,{view:o}=i,l=[],a=!!e,c=e||s.tr,f=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),l.every(u=>u===!0)),d={...Object.fromEntries(Object.entries(r).map(([u,h])=>[u,(...m)=>{let g=this.buildProps(c,t),y=h(...m)(g);return l.push(y),d}])),run:f};return d}createCan(e){let{rawCommands:t,state:r}=this,i=!1,s=e||r.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...f)=>c(...f)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(e,t=!0){let{rawCommands:r,editor:i,state:s}=this,{view:o}=i,l={tr:e,editor:i,view:o,state:un({state:s,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...f)=>c(...f)(l)]))}};return l}},vr=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,t)),this}off(e,t){let r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(i=>i!==t):delete this.callbacks[e]),this}once(e,t){let r=(...i)=>{this.off(e,r),t.apply(this,i)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}};function S(n,e,t){return n.config[e]===void 0&&n.parent?S(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?S(n.parent,e,t):null}):n.config[e]}function hn(n){let e=n.filter(i=>i.type==="extension"),t=n.filter(i=>i.type==="node"),r=n.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function No(n){let e=[],{nodeExtensions:t,markExtensions:r}=hn(n),i=[...t,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(o=>{let l={name:o.name,options:o.options,storage:o.storage,extensions:i},a=S(o,"addGlobalAttributes",l);if(!a)return;a().forEach(f=>{f.types.forEach(d=>{Object.entries(f.attributes).forEach(([u,h])=>{e.push({type:d,name:u,attribute:{...s,...h}})})})})}),i.forEach(o=>{let l={name:o.name,options:o.options,storage:o.storage},a=S(o,"addAttributes",l);if(!a)return;let c=a();Object.entries(c).forEach(([f,d])=>{let u={...s,...d};typeof u?.default=="function"&&(u.default=u.default()),u?.isRequired&&u?.default===void 0&&delete u.default,e.push({type:o.name,name:f,attribute:u})})}),e}function z(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function bc(...n){return n.filter(e=>!!e).reduce((e,t)=>{let r={...e};return Object.entries(t).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){let l=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],c=l.filter(f=>!a.includes(f));r[i]=[...a,...c].join(" ")}else if(i==="style"){let l=s?s.split(";").map(f=>f.trim()).filter(Boolean):[],a=r[i]?r[i].split(";").map(f=>f.trim()).filter(Boolean):[],c=new Map;a.forEach(f=>{let[d,u]=f.split(":").map(h=>h.trim());c.set(d,u)}),l.forEach(f=>{let[d,u]=f.split(":").map(h=>h.trim());c.set(d,u)}),r[i]=Array.from(c.entries()).map(([f,d])=>`${f}: ${d}`).join("; ")}else r[i]=s}),r},{})}function Pr(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>bc(t,r),{})}function To(n){return typeof n=="function"}function T(n,e=void 0,...t){return To(n)?e?n.bind(e)(...t):n(...t):n}function kc(n={}){return Object.keys(n).length===0&&n.constructor===Object}function Sc(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function go(n,e){return"style"in n?n:{...n,getAttrs:t=>{let r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;let i=e.reduce((s,o)=>{let l=o.attribute.parseHTML?o.attribute.parseHTML(t):Sc(t.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...r,...i}}}}function yo(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&kc(t)?!1:t!=null))}function xc(n,e){var t;let r=No(n),{nodeExtensions:i,markExtensions:s}=hn(n),o=(t=i.find(c=>S(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(i.map(c=>{let f=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},u=n.reduce((y,w)=>{let M=S(w,"extendNodeSchema",d);return{...y,...M?M(c):{}}},{}),h=yo({...u,content:T(S(c,"content",d)),marks:T(S(c,"marks",d)),group:T(S(c,"group",d)),inline:T(S(c,"inline",d)),atom:T(S(c,"atom",d)),selectable:T(S(c,"selectable",d)),draggable:T(S(c,"draggable",d)),code:T(S(c,"code",d)),whitespace:T(S(c,"whitespace",d)),linebreakReplacement:T(S(c,"linebreakReplacement",d)),defining:T(S(c,"defining",d)),isolating:T(S(c,"isolating",d)),attrs:Object.fromEntries(f.map(y=>{var w;return[y.name,{default:(w=y?.attribute)===null||w===void 0?void 0:w.default}]}))}),p=T(S(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>go(y,f)));let m=S(c,"renderHTML",d);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Pr(y,f)}));let g=S(c,"renderText",d);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(s.map(c=>{let f=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},u=n.reduce((g,y)=>{let w=S(y,"extendMarkSchema",d);return{...g,...w?w(c):{}}},{}),h=yo({...u,inclusive:T(S(c,"inclusive",d)),excludes:T(S(c,"excludes",d)),group:T(S(c,"group",d)),spanning:T(S(c,"spanning",d)),code:T(S(c,"code",d)),attrs:Object.fromEntries(f.map(g=>{var y;return[g.name,{default:(y=g?.attribute)===null||y===void 0?void 0:y.default}]}))}),p=T(S(c,"parseHTML",d));p&&(h.parseDOM=p.map(g=>go(g,f)));let m=S(c,"renderHTML",d);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Pr(g,f)})),[c.name,h]}));return new at({topNode:o,nodes:l,marks:a})}function Ar(n,e){return e.nodes[n]||e.marks[n]||null}function bo(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function Wr(n,e){let t=ce.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}var Mc=(n,e=500)=>{let t="",r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,l)=>{var a,c;let f=((c=(a=i.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:i,pos:s,parent:o,index:l}))||i.textContent||"%leaf%";t+=i.isAtom&&!i.isText?f:f.slice(0,Math.max(0,r-s))}),t};function Jr(n){return Object.prototype.toString.call(n)==="[object RegExp]"}var it=class{constructor(e){this.find=e.find,this.handler=e.handler}},Cc=(n,e)=>{if(Jr(e))return e.exec(n);let t=e(n);if(!t)return null;let r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function sn(n){var e;let{editor:t,from:r,to:i,text:s,rules:o,plugin:l}=n,{view:a}=t;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(u=>u.type.spec.code))return!1;let f=!1,d=Mc(c)+s;return o.forEach(u=>{if(f)return;let h=Cc(d,u.find);if(!h)return;let p=a.state.tr,m=un({state:a.state,transaction:p}),g={from:r-(h[0].length-s.length),to:i},{commands:y,chain:w,can:M}=new rt({editor:t,state:m});u.handler({state:m,range:g,match:h,commands:y,chain:w,can:M})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:i,text:s}),a.dispatch(p),f=!0)}),f}function wc(n){let{editor:e,rules:t}=n,r=new _({state:{init(){return null},apply(i,s,o){let l=i.getMeta(r);if(l)return l;let a=i.getMeta("applyInputRules");return a&&setTimeout(()=>{let{text:f}=a;typeof f=="string"?f=f:f=Wr(b.from(f),o.schema);let{from:d}=a,u=d+f.length;sn({editor:e,from:d,to:u,text:f,rules:t,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,l){return sn({editor:e,from:s,to:o,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{let{$cursor:s}=i.state.selection;s&&sn({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;let{$cursor:o}=i.state.selection;return o?sn({editor:e,from:o.pos,to:o.pos,text:` -`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function Oc(n){return Object.prototype.toString.call(n).slice(8,-1)}function on(n){return Oc(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function pn(n,e){let t={...n};return on(n)&&on(e)&&Object.keys(e).forEach(r=>{on(e[r])&&on(n[r])?t[r]=pn(n[r],e[r]):t[r]=e[r]}),t}var Br=class n{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=T(S(this,"addOptions",{name:this.name}))),this.storage=T(S(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>pn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=T(S(t,"addOptions",{name:t.name})),t.storage=T(S(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){let{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){let o=i.marks();if(!!!o.find(c=>c?.type.name===t.name))return!1;let a=o.find(c=>c?.type.name===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}};function Nc(n){return typeof n=="number"}var zr=class{constructor(e){this.find=e.find,this.handler=e.handler}},Tc=(n,e,t)=>{if(Jr(e))return[...n.matchAll(e)];let r=e(n,t);return r?r.map(i=>{let s=[i.text];return s.index=i.index,s.input=n,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function Ec(n){let{editor:e,state:t,from:r,to:i,rule:s,pasteEvent:o,dropEvent:l}=n,{commands:a,chain:c,can:f}=new rt({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,i,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;let m=Math.max(r,p),g=Math.min(i,p+h.content.size),y=h.textBetween(m-p,g-p,void 0,"\uFFFC");Tc(y,s.find,o).forEach(M=>{if(M.index===void 0)return;let I=m+M.index+1,A=I+M[0].length,P={from:t.tr.mapping.map(I),to:t.tr.mapping.map(A)},C=s.handler({state:t,range:P,match:M,commands:a,chain:c,can:f,pasteEvent:o,dropEvent:l});d.push(C)})}),d.every(h=>h!==null)}var ln=null,Dc=n=>{var e;let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function Ac(n){let{editor:e,rules:t}=n,r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:f,from:d,to:u,rule:h,pasteEvt:p})=>{let m=f.tr,g=un({state:f,transaction:m});if(!(!Ec({editor:e,state:g,from:Math.max(d-1,0),to:u.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return t.map(f=>new _({view(d){let u=p=>{var m;r=!((m=d.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?d.dom.parentElement:null,r&&(ln=e)},h=()=>{ln&&(ln=null)};return window.addEventListener("dragstart",u),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",u),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,u)=>{if(s=r===d.dom.parentElement,l=u,!s){let h=ln;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,u)=>{var h;let p=(h=u.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return o=u,i=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(d,u,h)=>{let p=d[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,y=p.getMeta("applyPasteRules"),w=!!y;if(!m&&!g&&!w)return;if(w){let{text:A}=y;typeof A=="string"?A=A:A=Wr(b.from(A),h.schema);let{from:P}=y,C=P+A.length,D=Dc(A);return a({rule:f,state:h,from:P,to:{b:C},pasteEvt:D})}let M=u.doc.content.findDiffStart(h.doc.content),I=u.doc.content.findDiffEnd(h.doc.content);if(!(!Nc(M)||!I||M===I.b))return a({rule:f,state:h,from:M,to:I,pasteEvt:o})}}))}function Ic(n){let e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}var Fr=class n{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=n.resolve(e),this.schema=xc(this.extensions,t),this.setupExtensions()}static resolve(e){let t=n.sort(n.flatten(e)),r=Ic(t.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{let r={name:t.name,options:t.options,storage:t.storage},i=S(t,"addExtensions",r);return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{let s=S(r,"priority")||100,o=S(i,"priority")||100;return s>o?-1:s{let r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Ar(t.name,this.schema)},i=S(t,"addCommands",r);return i?{...e,...i()}:e},{})}get plugins(){let{editor:e}=this,t=n.sort([...this.extensions].reverse()),r=[],i=[],s=t.map(o=>{let l={name:o.name,options:o.options,storage:o.storage,editor:e,type:Ar(o.name,this.schema)},a=[],c=S(o,"addKeyboardShortcuts",l),f={};if(o.type==="mark"&&S(o,"exitable",l)&&(f.ArrowRight=()=>Br.handleExit({editor:e,mark:o})),c){let m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));f={...f,...m}}let d=Zs(f);a.push(d);let u=S(o,"addInputRules",l);bo(o,e.options.enableInputRules)&&u&&r.push(...u());let h=S(o,"addPasteRules",l);bo(o,e.options.enablePasteRules)&&h&&i.push(...h());let p=S(o,"addProseMirrorPlugins",l);if(p){let m=p();a.push(...m)}return a}).flat();return[wc({editor:e,rules:r}),...Ac({editor:e,rules:i}),...s]}get attributes(){return No(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=hn(this.extensions);return Object.fromEntries(t.filter(r=>!!S(r,"addNodeView")).map(r=>{let i=this.attributes.filter(a=>a.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:e,type:z(r.name,this.schema)},o=S(r,"addNodeView",s);if(!o)return[];let l=(a,c,f,d,u)=>{let h=Pr(a,i);return o()({node:a,view:c,getPos:f,decorations:d,innerDecorations:u,editor:e,extension:r,HTMLAttributes:h})};return[r.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Ar(e.name,this.schema)};e.type==="mark"&&(!((t=T(S(e,"keepOnSplit",r)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);let i=S(e,"onBeforeCreate",r),s=S(e,"onCreate",r),o=S(e,"onUpdate",r),l=S(e,"onSelectionUpdate",r),a=S(e,"onTransaction",r),c=S(e,"onFocus",r),f=S(e,"onBlur",r),d=S(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),f&&this.editor.on("blur",f),d&&this.editor.on("destroy",d)})}},le=class n{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=T(S(this,"addOptions",{name:this.name}))),this.storage=T(S(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>pn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=T(S(t,"addOptions",{name:t.name})),t.storage=T(S(t,"addStorage",{name:t.name,options:t.options})),t}};function Eo(n,e,t){let{from:r,to:i}=e,{blockSeparator:s=` - -`,textSerializers:o={}}=t||{},l="";return n.nodesBetween(r,i,(a,c,f,d)=>{var u;a.isBlock&&c>r&&(l+=s);let h=o?.[a.type.name];if(h)return f&&(l+=h({node:a,pos:c,parent:f,index:d,range:e})),!1;a.isText&&(l+=(u=a?.text)===null||u===void 0?void 0:u.slice(Math.max(r,c)-c,i-c))}),l}function Do(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}var Rc=le.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new _({key:new ie("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(f=>f.$from.pos)),l=Math.max(...s.map(f=>f.$to.pos)),a=Do(t);return Eo(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),vc=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window?.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),Pc=(n=!1)=>({commands:e})=>e.setContent("",n),Bc=()=>({state:n,tr:e,dispatch:t})=>{let{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:s,$to:o})=>{n.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;let{doc:c,mapping:f}=e,d=c.resolve(f.map(a)),u=c.resolve(f.map(a+l.nodeSize)),h=d.blockRange(u);if(!h)return;let p=de(h);if(l.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},zc=n=>e=>n(e),Fc=()=>({state:n,dispatch:e})=>wr(n,e),$c=(n,e)=>({editor:t,tr:r})=>{let{state:i}=t,s=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);let o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new N(r.doc.resolve(Math.max(o-1,0)))),!0},Lc=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;let i=n.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){let l=i.before(s),a=i.after(s);n.delete(l,a).scrollIntoView()}return!0}return!1},Vc=n=>({tr:e,state:t,dispatch:r})=>{let i=z(n,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){let a=s.before(o),c=s.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},Wc=n=>({tr:e,dispatch:t})=>{let{from:r,to:i}=n;return t&&e.delete(r,i),!0},Jc=()=>({state:n,dispatch:e})=>rn(n,e),jc=()=>({commands:n})=>n.keyboardShortcut("Enter"),qc=()=>({state:n,dispatch:e})=>Cr(n,e);function fn(n,e,t={strict:!0}){let r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:Jr(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function Ao(n,e,t={}){return n.find(r=>r.type===e&&fn(Object.fromEntries(Object.keys(t).map(i=>[i,r.attrs[i]])),t))}function ko(n,e,t={}){return!!Ao(n,e,t)}function jr(n,e,t){var r;if(!n||!e)return;let i=n.parent.childAfter(n.parentOffset);if((!i.node||!i.node.marks.some(f=>f.type===e))&&(i=n.parent.childBefore(n.parentOffset)),!i.node||!i.node.marks.some(f=>f.type===e)||(t=t||((r=i.node.marks[0])===null||r===void 0?void 0:r.attrs),!Ao([...i.node.marks],e,t)))return;let o=i.index,l=n.start()+i.offset,a=o+1,c=l+i.node.nodeSize;for(;o>0&&ko([...n.parent.child(o-1).marks],e,t);)o-=1,l-=n.parent.child(o).nodeSize;for(;a({tr:t,state:r,dispatch:i})=>{let s=Oe(n,r.schema),{doc:o,selection:l}=t,{$from:a,from:c,to:f}=l;if(i){let d=jr(a,s,e);if(d&&d.from<=c&&d.to>=f){let u=N.create(o,d.from,d.to);t.setSelection(u)}}return!0},Hc=n=>e=>{let t=typeof n=="function"?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};let o=()=>{(dn()||So())&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),Uc()&&!dn()&&!So()&&r.dom.focus({preventScroll:!0}))})};if(r.hasFocus()&&n===null||n===!1)return!0;if(s&&n===null&&!Io(t.state.selection))return o(),!0;let l=Ro(i.doc,n)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},Gc=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),Yc=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),vo=n=>{let e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){let r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&vo(r)}return n};function an(n){let e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return vo(t)}function Nt(n,e,t){if(n instanceof Y||n instanceof b)return n;t={slice:!0,parseOptions:{},...t};let r=typeof n=="object"&&n!==null,i=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return b.fromArray(n.map(l=>e.nodeFromJSON(l)));let o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",s),Nt("",e,t)}if(i){if(t.errorOnInvalidContent){let o=!1,l="",a=new at({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?ae.fromSchema(a).parseSlice(an(n),t.parseOptions):ae.fromSchema(a).parse(an(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let s=ae.fromSchema(e);return t.slice?s.parseSlice(an(n),t.parseOptions).content:s.parse(an(n),t.parseOptions)}return Nt("",e,t)}function Xc(n,e,t){let r=n.steps.length-1;if(r{o===0&&(o=f)}),n.setSelection(O.near(n.doc.resolve(o),t))}var Zc=n=>!("type"in n),Qc=(n,e,t)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l,a=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Nt(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){a(g)}try{l=Nt(e,s.schema,{parseOptions:c,errorOnInvalidContent:(o=t.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(g){return a(g),!1}let{from:f,to:d}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},u=!0,h=!0;if((Zc(l)?l:[l]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,h=h?g.isBlock:!1}),f===d&&h){let{parent:g}=r.doc.resolve(f);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(f-=1,d+=1)}let m;if(u){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof b){let g="";e.forEach(y=>{y.text&&(g+=y.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,f,d)}else m=l,r.replaceWith(f,d,m);t.updateSelection&&Xc(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:f,text:m}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:f,text:m})}return!0},ef=()=>({state:n,dispatch:e})=>so(n,e),tf=()=>({state:n,dispatch:e})=>oo(n,e),nf=()=>({state:n,dispatch:e})=>mr(n,e),rf=()=>({state:n,dispatch:e})=>br(n,e),sf=()=>({state:n,dispatch:e,tr:t})=>{try{let r=Ue(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},of=()=>({state:n,dispatch:e,tr:t})=>{try{let r=Ue(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},lf=()=>({state:n,dispatch:e})=>to(n,e),af=()=>({state:n,dispatch:e})=>no(n,e);function Po(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function cf(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t==="Space"&&(t=" ");let r,i,s,o;for(let l=0;l({editor:e,view:t,tr:r,dispatch:i})=>{let s=cf(n).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a?.steps.forEach(c=>{let f=c.map(r.mapping);f&&i&&r.maybeStep(f)}),!0};function Tt(n,e,t={}){let{from:r,to:i,empty:s}=n.selection,o=e?z(e,n.schema):null,l=[];n.doc.nodesBetween(r,i,(d,u)=>{if(d.isText)return;let h=Math.max(r,u),p=Math.min(i,u+d.nodeSize);l.push({node:d,from:h,to:p})});let a=i-r,c=l.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>fn(d.node.attrs,t,{strict:!1}));return s?!!c.length:c.reduce((d,u)=>d+u.to-u.from,0)>=a}var df=(n,e={})=>({state:t,dispatch:r})=>{let i=z(n,t.schema);return Tt(t,i,e)?lo(t,r):!1},uf=()=>({state:n,dispatch:e})=>Or(n,e),hf=n=>({state:e,dispatch:t})=>{let r=z(n,e.schema);return po(r)(e,t)},pf=()=>({state:n,dispatch:e})=>xr(n,e);function mn(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function xo(n,e){let t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var mf=(n,e)=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=mn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(s=z(n,r.schema)),l==="mark"&&(o=Oe(n,r.schema)),i&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,f)=>{s&&s===c.type&&t.setNodeMarkup(f,void 0,xo(c.attrs,e)),o&&c.marks.length&&c.marks.forEach(d=>{o===d.type&&t.addMark(f,f+c.nodeSize,o.create(xo(d.attrs,e)))})})}),!0):!1},gf=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),yf=()=>({tr:n,dispatch:e})=>{if(e){let t=new K(n.doc);n.setSelection(t)}return!0},bf=()=>({state:n,dispatch:e})=>gr(n,e),kf=()=>({state:n,dispatch:e})=>kr(n,e),Sf=()=>({state:n,dispatch:e})=>ao(n,e),xf=()=>({state:n,dispatch:e})=>Tr(n,e),Mf=()=>({state:n,dispatch:e})=>Nr(n,e);function $r(n,e,t={},r={}){return Nt(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}var Cf=(n,e=!1,t={},r={})=>({editor:i,tr:s,dispatch:o,commands:l})=>{var a,c;let{doc:f}=s;if(t.preserveWhitespace!=="full"){let d=$r(n,i.schema,t,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:i.options.enableContentCheck});return o&&s.replaceWith(0,f.content.size,d).setMeta("preventUpdate",!e),!0}return o&&s.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:f.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:i.options.enableContentCheck})};function Bo(n,e){let t=Oe(e,n.schema),{from:r,to:i,empty:s}=n.selection,o=[];s?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,a=>{o.push(...a.marks)});let l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function eu(n,e){let t=new Ke(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function wf(n){for(let e=0;e{t(i)&&r.push({node:i,pos:s})}),r}function Of(n,e){for(let t=n.depth;t>0;t-=1){let r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function qr(n){return e=>Of(e.$from,n)}function Nf(n,e){let t={from:0,to:n.content.size};return Eo(n,t,e)}function Tf(n,e){let t=z(e,n.schema),{from:r,to:i}=n.selection,s=[];n.doc.nodesBetween(r,i,l=>{s.push(l)});let o=s.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function Ef(n,e){let t=mn(typeof e=="string"?e:e.name,n.schema);return t==="node"?Tf(n,e):t==="mark"?Bo(n,e):{}}function Df(n,e=JSON.stringify){let t={};return n.filter(r=>{let i=e(r);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function Af(n){let e=Df(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,o)=>o!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function nu(n){let{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,s)=>{let o=[];if(i.ranges.length)i.forEach((l,a)=>{o.push({from:l,to:a})});else{let{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{let c=e.slice(s).map(l,-1),f=e.slice(s).map(a),d=e.invert().map(c,-1),u=e.invert().map(f);r.push({oldRange:{from:d,to:u},newRange:{from:c,to:f}})})}),Af(r)}function zo(n,e,t){let r=[];return n===e?t.resolve(n).marks().forEach(i=>{let s=t.resolve(n),o=jr(s,i.type);o&&r.push({mark:i,...o})}):t.nodesBetween(n,e,(i,s)=>{!i||i?.nodeSize===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}function cn(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{let i=n.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}function Lr(n,e,t={}){let{empty:r,ranges:i}=n.selection,s=e?Oe(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>fn(d.attrs,t,{strict:!1}));let o=0,l=[];if(i.forEach(({$from:d,$to:u})=>{let h=d.pos,p=u.pos;n.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),w=Math.min(p,g+m.nodeSize),M=w-y;o+=M,l.push(...m.marks.map(I=>({mark:I,from:y,to:w})))})}),o===0)return!1;let a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>fn(d.mark.attrs,t,{strict:!1})).reduce((d,u)=>d+u.to-u.from,0),c=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,u)=>d+u.to-u.from,0);return(a>0?a+c:a)>=o}function If(n,e,t={}){if(!e)return Tt(n,null,t)||Lr(n,null,t);let r=mn(e,n.schema);return r==="node"?Tt(n,e,t):r==="mark"?Lr(n,e,t):!1}function Mo(n,e){let{nodeExtensions:t}=hn(e),r=t.find(o=>o.name===n);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},s=T(S(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function Kr(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return/^\s*$/m.test((r=n.text)!==null&&r!==void 0?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let i=!0;return n.content.forEach(s=>{i!==!1&&(Kr(s,{ignoreWhitespace:t,checkChildren:e})||(i=!1))}),i}return!1}function ru(n){return n instanceof x}function Rf(n,e,t){var r;let{selection:i}=e,s=null;if(Io(i)&&(s=i.$cursor),s){let l=(r=n.storedMarks)!==null&&r!==void 0?r:s.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}let{ranges:o}=i;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(f,d,u)=>{if(c)return!1;if(f.isInline){let h=!u||u.type.allowsMarkType(t),p=!!t.isInSet(f.marks)||!f.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}var vf=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=t,{empty:o,ranges:l}=s,a=Oe(n,r.schema);if(i)if(o){let c=Bo(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{let f=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(f,d,(u,h)=>{let p=Math.max(h,f),m=Math.min(h+u.nodeSize,d);u.marks.find(y=>y.type===a)?u.marks.forEach(y=>{a===y.type&&t.addMark(p,m,a.create({...y.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return Rf(r,t,a)},Pf=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Bf=(n,e={})=>({state:t,dispatch:r,chain:i})=>{let s=z(n,t.schema),o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:l})=>Er(s,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>Er(s,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},zf=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,i=We(n,0,r.content.size),s=x.create(r,i);e.setSelection(s)}return!0},Ff=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,{from:i,to:s}=typeof n=="number"?{from:n,to:n}:n,o=N.atStart(r).from,l=N.atEnd(r).to,a=We(i,o,l),c=We(s,o,l),f=N.create(r,a,c);e.setSelection(f)}return!0},$f=n=>({state:e,dispatch:t})=>{let r=z(n,e.schema);return mo(r)(e,t)};function Co(n,e){let t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){let r=t.filter(i=>e?.includes(i.type.name));n.tr.ensureMarks(r)}}var Lf=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{let{selection:s,doc:o}=e,{$from:l,$to:a}=s,c=i.extensionManager.attributes,f=cn(c,l.node().type.name,l.node().attrs);if(s instanceof x&&s.node.isBlock)return!l.parentOffset||!X(o,l.pos)?!1:(r&&(n&&Co(t,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,u=l.depth===0?void 0:wf(l.node(-1).contentMatchAt(l.indexAfter(-1))),h=d&&u?[{type:u,attrs:f}]:void 0,p=X(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&X(e.doc,e.mapping.map(l.pos),1,u?[{type:u}]:void 0)&&(p=!0,h=u?[{type:u,attrs:f}]:void 0),r){if(p&&(s instanceof N&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),u&&!d&&!l.parentOffset&&l.parent.type!==u)){let m=e.mapping.map(l.before()),g=e.doc.resolve(m);l.node(-1).canReplaceWith(g.index(),g.index()+1,u)&&e.setNodeMarkup(e.mapping.map(l.before()),u)}n&&Co(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},Vf=(n,e={})=>({tr:t,state:r,dispatch:i,editor:s})=>{var o;let l=z(n,r.schema),{$from:a,$to:c}=r.selection,f=r.selection.node;if(f&&f.isBlock||a.depth<2||!a.sameParent(c))return!1;let d=a.node(-1);if(d.type!==l)return!1;let u=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let y=b.empty,w=a.index(-1)?1:a.index(-2)?2:3;for(let D=a.depth-w;D>=a.depth-3;D-=1)y=b.from(a.node(D).copy(y));let M=a.indexAfter(-1){if(C>-1)return!1;D.isTextblock&&D.content.size===0&&(C=W+1)}),C>-1&&t.setSelection(N.near(t.doc.resolve(C))),t.scrollIntoView()}return!0}let h=c.pos===a.end()?d.contentMatchAt(0).defaultType:null,p={...cn(u,d.type.name,d.attrs),...e},m={...cn(u,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,c.pos);let g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!X(t.doc,a.pos,2))return!1;if(i){let{selection:y,storedMarks:w}=r,{splittableMarks:M}=s.extensionManager,I=w||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!I||!i)return!0;let A=I.filter(P=>M.includes(P.type.name));t.ensureMarks(A)}return!0},Ir=(n,e)=>{let t=qr(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return t.node.type===i?.type&&re(n.doc,t.pos)&&n.join(t.pos),!0},Rr=(n,e)=>{let t=qr(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return t.node.type===i?.type&&re(n.doc,r)&&n.join(r),!0},Wf=(n,e,t,r={})=>({editor:i,tr:s,state:o,dispatch:l,chain:a,commands:c,can:f})=>{let{extensions:d,splittableMarks:u}=i.extensionManager,h=z(n,o.schema),p=z(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:w}=m,M=y.blockRange(w),I=g||m.$to.parentOffset&&m.$from.marks();if(!M)return!1;let A=qr(P=>Mo(P.type.name,d))(m);if(M.depth>=1&&A&&M.depth-A.depth<=1){if(A.node.type===h)return c.liftListItem(p);if(Mo(A.node.type.name,d)&&h.validContent(A.node.content)&&l)return a().command(()=>(s.setNodeMarkup(A.pos,h),!0)).command(()=>Ir(s,h)).command(()=>Rr(s,h)).run()}return!t||!I||!l?a().command(()=>f().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Ir(s,h)).command(()=>Rr(s,h)).run():a().command(()=>{let P=f().wrapInList(h,r),C=I.filter(D=>u.includes(D.type.name));return s.ensureMarks(C),P?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Ir(s,h)).command(()=>Rr(s,h)).run()},Jf=(n,e={},t={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:s=!1}=t,o=Oe(n,r.schema);return Lr(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},jf=(n,e,t={})=>({state:r,commands:i})=>{let s=z(n,r.schema),o=z(e,r.schema),l=Tt(r,s,t),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?i.setNode(o,a):i.setNode(s,{...a,...t})},qf=(n,e={})=>({state:t,commands:r})=>{let i=z(n,t.schema);return Tt(t,i,e)?r.lift(i):r.wrapIn(i,e)},Kf=()=>({state:n,dispatch:e})=>{let t=n.plugins;for(let r=0;r=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){let a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,n.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},Hf=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},Uf=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var s;let{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=Oe(n,r.schema),{$from:c,empty:f,ranges:d}=l;if(!i)return!0;if(f&&o){let{from:u,to:h}=l,p=(s=c.marks().find(g=>g.type===a))===null||s===void 0?void 0:s.attrs,m=jr(c,a,p);m&&(u=m.from,h=m.to),t.removeMark(u,h,a)}else d.forEach(u=>{t.removeMark(u.$from.pos,u.$to.pos,a)});return t.removeStoredMark(a),!0},_f=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=mn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(s=z(n,r.schema)),l==="mark"&&(o=Oe(n,r.schema)),i&&t.selection.ranges.forEach(a=>{let c=a.$from.pos,f=a.$to.pos,d,u,h,p;t.selection.empty?r.doc.nodesBetween(c,f,(m,g)=>{s&&s===m.type&&(h=Math.max(g,c),p=Math.min(g+m.nodeSize,f),d=g,u=m)}):r.doc.nodesBetween(c,f,(m,g)=>{g=c&&g<=f&&(s&&s===m.type&&t.setNodeMarkup(g,void 0,{...m.attrs,...e}),o&&m.marks.length&&m.marks.forEach(y=>{if(o===y.type){let w=Math.max(g,c),M=Math.min(g+m.nodeSize,f);t.addMark(w,M,o.create({...y.attrs,...e}))}}))}),u&&(d!==void 0&&t.setNodeMarkup(d,void 0,{...u.attrs,...e}),o&&u.marks.length&&u.marks.forEach(m=>{o===m.type&&t.addMark(h,p,o.create({...m.attrs,...e}))}))}),!0):!1},Gf=(n,e={})=>({state:t,dispatch:r})=>{let i=z(n,t.schema);return uo(i,e)(t,r)},Yf=(n,e={})=>({state:t,dispatch:r})=>{let i=z(n,t.schema);return ho(i,e)(t,r)},Xf=Object.freeze({__proto__:null,blur:vc,clearContent:Pc,clearNodes:Bc,command:zc,createParagraphNear:Fc,cut:$c,deleteCurrentNode:Lc,deleteNode:Vc,deleteRange:Wc,deleteSelection:Jc,enter:jc,exitCode:qc,extendMarkRange:Kc,first:Hc,focus:_c,forEach:Gc,insertContent:Yc,insertContentAt:Qc,joinBackward:nf,joinDown:tf,joinForward:rf,joinItemBackward:sf,joinItemForward:of,joinTextblockBackward:lf,joinTextblockForward:af,joinUp:ef,keyboardShortcut:ff,lift:df,liftEmptyBlock:uf,liftListItem:hf,newlineInCode:pf,resetAttributes:mf,scrollIntoView:gf,selectAll:yf,selectNodeBackward:bf,selectNodeForward:kf,selectParentNode:Sf,selectTextblockEnd:xf,selectTextblockStart:Mf,setContent:Cf,setMark:vf,setMeta:Pf,setNode:Bf,setNodeSelection:zf,setTextSelection:Ff,sinkListItem:$f,splitBlock:Lf,splitListItem:Vf,toggleList:Wf,toggleMark:Jf,toggleNode:jf,toggleWrap:qf,undoInputRule:Kf,unsetAllMarks:Hf,unsetMark:Uf,updateAttributes:_f,wrapIn:Gf,wrapInList:Yf}),Zf=le.create({name:"commands",addCommands(){return{...Xf}}}),Qf=le.create({name:"drop",addProseMirrorPlugins(){return[new _({key:new ie("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),ed=le.create({name:"editable",addProseMirrorPlugins(){return[new _({key:new ie("editable"),props:{editable:()=>this.editor.options.editable}})]}}),td=new ie("focusEvents"),nd=le.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:n}=this;return[new _({key:td,props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;let r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;let r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),rd=le.create({name:"keymap",addKeyboardShortcuts(){let n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{let{selection:a,doc:c}=l,{empty:f,$anchor:d}=a,{pos:u,parent:h}=d,p=d.parent.isTextblock&&u>0?l.doc.resolve(u-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=m&&p.parent.childCount===1?g===d.pos:O.atStart(c).from===u;return!f||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return dn()||Po()?s:i},addProseMirrorPlugins(){return[new _({key:new ie("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(m=>m.getMeta("composition")))return;let r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),i=n.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;let{empty:s,from:o,to:l}=e.selection,a=O.atStart(e.doc).from,c=O.atEnd(e.doc).to;if(s||!(o===a&&l===c)||!Kr(t.doc))return;let u=t.tr,h=un({state:t,transaction:u}),{commands:p}=new rt({editor:this.editor,state:h});if(p.clearNodes(),!!u.steps.length)return u}})]}}),id=le.create({name:"paste",addProseMirrorPlugins(){return[new _({key:new ie("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),sd=le.create({name:"tabindex",addProseMirrorPlugins(){return[new _({key:new ie("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Vr=class n{get name(){return this.node.type.name}constructor(e,t,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new n(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new n(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new n(e,this.editor)}get children(){let e=[];return this.node.content.forEach((t,r)=>{let i=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,o=this.pos+r+(s?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(o);if(!i&&l.depth<=this.depth)return;let a=new n(l,this.editor,i,i?t:null);i&&(a.actualDepth=this.depth+1),e.push(new n(l,this.editor,i,i?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(t).length>0){let s=i.node.attrs,o=Object.keys(t);for(let l=0;l{r&&i.length>0||(o.node.type.name===e&&s.every(a=>t[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,t,r))))}),i}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},od=`.ProseMirror { - position: relative; -} - -.ProseMirror { - word-wrap: break-word; - white-space: pre-wrap; - white-space: break-spaces; - -webkit-font-variant-ligatures: none; - font-variant-ligatures: none; - font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ -} - -.ProseMirror [contenteditable="false"] { - white-space: normal; -} - -.ProseMirror [contenteditable="false"] [contenteditable="true"] { - white-space: pre-wrap; -} - -.ProseMirror pre { - white-space: pre-wrap; -} - -img.ProseMirror-separator { - display: inline !important; - border: none !important; - margin: 0 !important; - width: 0 !important; - height: 0 !important; -} - -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - margin: 0; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-hideselection *::selection { - background: transparent; -} - -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - -.ProseMirror-hideselection * { - caret-color: transparent; -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -} - -.tippy-box[data-animation=fade][data-state=hidden] { - opacity: 0 -}`;function ld(n,e,t){let r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;let i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}var wo=class extends vr{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:r,moved:i})=>this.options.onDrop(t,r,i)),this.on("paste",({event:t,slice:r})=>this.options.onPaste(t,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=ld(od,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){let r=To(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,r=t;if([].concat(e).forEach(s=>{let o=typeof s=="string"?`${s}$`:s.key;r=r.filter(l=>!l.key.startsWith(o))}),t.length===r.length)return;let i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}createExtensionManager(){var e,t;let i=[...this.options.enableCoreExtensions?[ed,Rc.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),Zf,nd,rd,sd,Qf,id].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s?.type));this.extensionManager=new Fr(i,this)}createCommandManager(){this.commandManager=new rt({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=$r(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),t=$r(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}let r=Ro(t,this.options.autofocus);this.view=new Ct(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Jt.create({doc:t,selection:r||void 0})});let i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();let s=this.view.dom;s.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(o)});return}let t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let i=e.getMeta("focus"),s=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Ef(this.state,e)}isActive(e,t){let r=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return If(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Wr(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` - -`,textSerializers:r={}}=e||{};return Nf(this.state.doc,{blockSeparator:t,textSerializers:{...Do(this.schema),...r}})}get isEmpty(){return Kr(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){let e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new Vr(t,this)}get $doc(){return this.$pos(0)}};function iu(n){return new it({find:n.find,handler:({state:e,range:t,match:r})=>{let i=T(n.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:s}=e,o=r[r.length-1],l=r[0];if(o){let a=l.search(/\S/),c=t.from+l.indexOf(o),f=c+o.length;if(zo(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;ft.from&&s.delete(t.from+a,c);let u=t.from+a+o.length;s.addMark(t.from+a,u,n.type.create(i||{})),s.removeStoredMark(n.type)}}})}function su(n){return new it({find:n.find,handler:({state:e,range:t,match:r})=>{let i=T(n.getAttributes,void 0,r)||{},{tr:s}=e,o=t.from,l=t.to,a=n.type.create(i);if(r[1]){let c=r[0].lastIndexOf(r[1]),f=o+c;f>l?f=l:l=f+r[1].length;let d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(f,l,a)}else if(r[0]){let c=n.type.isInline?o:o-1;s.insert(c,n.type.create(i)).delete(s.mapping.map(o),s.mapping.map(l))}s.scrollIntoView()}})}function ou(n){return new it({find:n.find,handler:({state:e,range:t,match:r})=>{let i=e.doc.resolve(t.from),s=T(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)}})}function lu(n){return new it({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{let s=T(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),c=a&&He(a,n.type,s);if(!c)return null;if(o.wrap(a,c),n.keepMarks&&n.editor){let{selection:d,storedMarks:u}=e,{splittableMarks:h}=n.editor.extensionManager,p=u||d.$to.parentOffset&&d.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){let d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}let f=o.doc.resolve(t.from-1).nodeBefore;f&&f.type===n.type&&re(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,f))&&o.join(t.from-1)}})}var Oo=class n{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=T(S(this,"addOptions",{name:this.name}))),this.storage=T(S(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend({...this.config,addOptions:()=>pn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=T(S(t,"addOptions",{name:t.name})),t.storage=T(S(t,"addStorage",{name:t.name,options:t.options})),t}};function au(n){return new zr({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{let s=T(n.getAttributes,void 0,r,i);if(s===!1||s===null)return null;let{tr:o}=e,l=r[r.length-1],a=r[0],c=t.to;if(l){let f=a.search(/\S/),d=t.from+a.indexOf(l),u=d+l.length;if(zo(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===n.type&&g!==p.mark.type)).filter(p=>p.to>d).length)return null;ut.from&&o.delete(t.from+f,d),c=t.from+f+l.length,o.addMark(t.from+f,c,n.type.create(s||{})),o.removeStoredMark(n.type)}}})}function cu(n,e){let{selection:t}=n,{$from:r}=t;if(t instanceof x){let s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){let s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}export{b as a,k as b,Tn as c,Ti as d,Ke as e,O as f,Vt as g,N as h,x as i,_ as j,ie as k,Me as l,ne as m,ac as n,S as o,bc as p,T as q,Br as r,le as s,eu as t,tu as u,Of as v,Ef as w,nu as x,zo as y,Kr as z,ru as A,wo as B,iu as C,su as D,ou as E,lu as F,Oo as G,au as H,cu as I}; diff --git a/packages/forms/dist/tiptap/tiptap-editor-addons.js b/packages/forms/dist/tiptap/tiptap-editor-addons.js index f0f53d72..4b10893d 100644 --- a/packages/forms/dist/tiptap/tiptap-editor-addons.js +++ b/packages/forms/dist/tiptap/tiptap-editor-addons.js @@ -1 +1,15 @@ -import{C as Ae,D as Se,G as N,H as Re,a as x,b as H,e as fe,f as v,g as pe,h as T,i as he,j as Q,k as P,l as F,m as j,n as me,o as ge,p as R,q as we,r as be,s as Ce,v as ye}from"./chunk-CFHSZ3VY.js";var xe=Ce.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{let e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var it=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,ct=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Me=be.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",R(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ae({find:it,type:this.type})]},addPasteRules(){return[Re({find:ct,type:this.type})]}});var at=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,ve=N.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",R(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Se({find:at,type:this.type,getAttributes:t=>{let[,,e,n,o]=t;return{src:n,alt:e,title:o}}})]}});var ee,te;if(typeof WeakMap<"u"){let t=new WeakMap;ee=e=>t.get(e),te=(e,n)=>(t.set(e,n),n)}else{let t=[],n=0;ee=o=>{for(let l=0;l(n==10&&(n=0),t[n++]=o,t[n++]=l)}var C=class{constructor(t,e,n,o){this.width=t,this.height=e,this.map=n,this.problems=o}findCell(t){for(let e=0;e=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:b-z});break}let B=l+z*e;for(let $=0;$o&&(r+=a.attrs.colspan)}}for(let s=0;s1&&(n=!0)}e==-1?e=r:e!=r&&(e=Math.max(e,r))}return e}function ft(t,e,n){t.problems||(t.problems=[]);let o={};for(let l=0;l0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function ht(t){for(let e=t.depth;e>0;e--){let n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function M(t){let e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function G(t){let e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;let n=I(e.$head)||mt(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function mt(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){let o=e.type.spec.tableRole;if(o=="cell"||o=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){let o=e.type.spec.tableRole;if(o=="cell"||o=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function ne(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function gt(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function re(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function De(t,e,n){let o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.nextCell(t.pos-r,e,n);return s==null?null:t.node(0).resolve(r+s)}function D(t,e,n=1){let o={...t,colspan:t.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(e,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function We(t,e,n=1){let o={...t,colspan:t.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;ld!=n.pos-r);i.unshift(n.pos-r);let a=i.map(d=>{let u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);let f=r+d+1;return new pe(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=e,this.$headCell=n}map(e,n){let o=e.resolve(n.map(this.$anchorCell.pos)),l=e.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&re(o,l)){let r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?E.rowSelection(o,l):r&&this.isColSelection()?E.colSelection(o,l):new E(o,l)}return T.between(o,l)}content(){let e=this.$anchorCell.node(-1),n=C.get(e),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i0||m>0){let b=h.attrs;if(g>0&&(b=D(b,0,g)),m>0&&(b=D(b,b.colspan-m,m)),p.leftl.bottom){let b={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top0)return!1;let o=e+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){let o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.findCell(e.pos-r),c=l.findCell(n.pos-r),i=e.node(0);return s.top<=c.top?(s.top>0&&(e=i.resolve(r+l.map[s.left])),c.bottom0&&(n=i.resolve(r+l.map[c.left])),s.bottom0)return!1;let s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(e){return e instanceof E&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){let o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.findCell(e.pos-r),c=l.findCell(n.pos-r),i=e.node(0);return s.left<=c.left?(s.left>0&&(e=i.resolve(r+l.map[s.top*l.width])),c.right0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right{e.push(F.node(o,o+n.nodeSize,{class:"selectedCell"}))}),j.create(t.doc,e)}function yt({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0&&!(t.after(l+1)=0&&!(e.before(r+1)>e.start(r));r--,o--);return n==o&&/row|table/.test(t.node(l).type.spec.tableRole)}function At({$from:t,$to:e}){let n,o;for(let l=t.depth;l>0;l--){let r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=e.depth;l>0;l--){let r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&e.parentOffset===0}function St(t,e,n){let o=(e||t).selection,l=(e||t).doc,r,s;if(o instanceof he&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=w.create(l,o.from);else if(s=="row"){let c=l.resolve(o.from+1);r=w.rowSelection(c,c)}else if(!n){let c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=w.create(l,i+1,a)}}else o instanceof T&&yt(o)?r=T.create(l,o.from):o instanceof T&&At(o)&&(r=T.create(l,o.$from.start(),o.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e}var Rt=new P("fix-tables");function Oe(t,e,n,o){let l=t.childCount,r=e.childCount;e:for(let s=0,c=0;s{l.type.spec.tableRole=="table"&&(n=xt(t,l,r,n))};return e?e.doc!=t.doc&&Oe(e.doc,t.doc,0,o):t.doc.descendants(o),n}function xt(t,e,n,o){let l=C.get(e);if(!l.problems)return o;o||(o=t.tr);let r=[];for(let i=0;i0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);let h=[];for(let m=0;m0?-1:0;wt(e,o,l+r)&&(r=l==0||l==e.width?null:0);for(let s=0;s0&&l0&&e.map[c-1]==i||l0?-1:0;vt(e,o,l+c)&&(c=l==0||l==e.height?null:0);for(let a=0,d=e.width*l;a0&&l0&&u==e.map[d-e.width]){let f=n.nodeAt(u).attrs;t.setNodeMarkup(t.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l0&&n[r]==n[r-1]||o.right0&&n[l]==n[l-t]||o.bottom0){let d=i+1+a.content.size,u=Te(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new w(r.doc.resolve(i+o.tableStart))),e(r)}return!0}function ce(t,e){let n=y(t.schema);return kt(({node:o})=>n[o.type.spec.tableRole])(t,e)}function kt(t){return(e,n)=>{let o=e.selection,l,r;if(o instanceof w){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=ht(o.$from),!l)return!1;r=(s=I(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs,i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});let d=k(e),u=e.tr;for(let p=0;p{s.attrs[t]!==e&&r.setNodeMarkup(c,null,{...s.attrs,[t]:e})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[t]:e}),o(r)}return!0}}function zt(t){return function(e,n){if(!M(e))return!1;if(n){let o=y(e.schema),l=k(e),r=e.tr,s=l.map.cellsInRect(t=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:t=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i{let p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}var fn=W("row",{useDeprecatedLogic:!0}),pn=W("column",{useDeprecatedLogic:!0}),Ge=W("cell",{useDeprecatedLogic:!0});function Ht(t,e){if(e<0){let n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let o=t.index(-1)-1,l=t.before();o>=0;o--){let r=t.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(t.index()0;o--)if(n.node(o).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function K(t,e){let n=t.selection;if(!(n instanceof w))return!1;if(e){let o=t.tr,l=y(t.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new H(l,0,0))}),o.docChanged&&e(o)}return!0}function Et(t){if(t.size===0)return null;let{content:e,openStart:n,openEnd:o}=t;for(;e.childCount==1&&(n>0&&o>0||e.child(0).type.spec.tableRole=="table");)n--,o--,e=e.child(0).content;let l=e.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i=0;s--){let{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a=e.length&&e.push(x.empty),n[l]o&&(f=f.type.createChecked(D(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;pl&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(x.from(i))}n=r,e=l}return{width:t,height:e,rows:n}}function It(t,e,n,o,l,r,s){let c=t.doc.type.schema,i=y(c),a,d;if(l>e.width)for(let u=0,f=0;ue.height){let u=[];for(let h=0,g=(e.height-1)*e.width;h=e.width?!1:n.nodeAt(e.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}let f=i.row.create(null,x.from(u)),p=[];for(let h=e.height;h{if(!l)return!1;let r=n.selection;if(r instanceof w)return q(n,o,v.near(r.$headCell,e));if(t!="horiz"&&!r.empty)return!1;let s=Ye(l,t,e);if(s==null)return!1;if(t=="horiz")return q(n,o,v.near(n.doc.resolve(r.head+e),e));{let c=n.doc.resolve(s),i=De(c,t,e),a;return i?a=v.near(i,1):e<0?a=v.near(n.doc.resolve(c.before(-1)),-1):a=v.near(n.doc.resolve(c.after(-1)),1),q(n,o,a)}}}function X(t,e){return(n,o,l)=>{if(!l)return!1;let r=n.selection,s;if(r instanceof w)s=r;else{let i=Ye(l,t,e);if(i==null)return!1;s=new w(n.doc.resolve(i))}let c=De(s.$headCell,t,e);return c?q(n,o,new w(s.$anchorCell,c)):!1}}function Wt(t,e){let n=t.state.doc,o=I(n.resolve(e));return o?(t.dispatch(t.state.tr.setSelection(new w(o))),!0):!1}function Bt(t,e,n){if(!M(t.state))return!1;let o=Et(n),l=t.state.selection;if(l instanceof w){o||(o={width:1,height:1,rows:[x.from(oe(y(t.state.schema).cell,n))]});let r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=$t(o,c.right-c.left,c.bottom-c.top),He(t.state,t.dispatch,s,c,o),!0}else if(o){let r=G(t.state),s=r.start(-1);return He(t.state,t.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Ot(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;let o=Ee(t,e.target),l;if(e.shiftKey&&t.state.selection instanceof w)r(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&o&&(l=I(t.state.selection.$anchor))!=null&&((n=Z(t,e))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,e),e.preventDefault();else if(!o)return;function r(i,a){let d=Z(t,a),u=L.getState(t.state)==null;if(!d||!re(i,d))if(u)d=i;else return;let f=new w(i,d);if(u||!t.state.selection.eq(f)){let p=t.state.tr.setSelection(f);u&&p.setMeta(L,i.pos),t.dispatch(p)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",c),L.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(L,-1))}function c(i){let a=i,d=L.getState(t.state),u;if(d!=null)u=t.state.doc.resolve(d);else if(Ee(t,a.target)!=o&&(u=Z(t,e),!u))return s();u&&r(u,a)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",c)}function Ye(t,e,n){if(!(t.state.selection instanceof T))return null;let{$head:o}=t.state.selection;for(let l=o.depth-1;l>=0;l--){let r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){let s=o.before(l),c=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(c)?s:null}}return null}function Ee(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Z(t,e){let n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&I(t.state.doc.resolve(o))||I(t.state.doc.resolve(l))}var _t=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(t,e,n,o,l,r){let s=0,c=!0,i=e.firstChild,a=t.firstChild;if(a){for(let u=0,f=0;unew o(u,n,f)),new Pt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{let c=A.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Ft(s,c,t,l)},mouseleave:s=>{jt(s)},mousedown:(s,c)=>{Kt(s,c,e,n)}},decorations:s=>{let c=A.getState(s);if(c&&c.activeHandle>-1)return Gt(s,c.activeHandle)},nodeViews:{}}});return r}var Pt=class U{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){let n=this,o=e.getMeta(A);if(o&&o.setHandle!=null)return new U(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new U(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&e.docChanged){let l=e.mapping.map(n.activeHandle,-1);return ne(e.doc.resolve(l))||(l=-1),new U(l,n.dragging)}return n}};function Ft(t,e,n,o){if(!t.editable)return;let l=A.getState(t.state);if(l&&!l.dragging){let r=Xt(e.target),s=-1;if(r){let{left:c,right:i}=r.getBoundingClientRect();e.clientX-c<=n?s=Le(t,e,"left",n):i-e.clientX<=n&&(s=Le(t,e,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){let c=t.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}Ze(t,s)}}}function jt(t){if(!t.editable)return;let e=A.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Ze(t,-1)}function Kt(t,e,n,o){var l;if(!t.editable)return!1;let r=(l=t.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=A.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let c=t.state.doc.nodeAt(s.activeHandle),i=Vt(t,s.activeHandle,c.attrs);t.dispatch(t.state.tr.setMeta(A,{setDragging:{startX:e.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);let f=A.getState(t.state);f?.dragging&&(qt(t,f.activeHandle,$e(f.dragging,u,n)),t.dispatch(t.state.tr.setMeta(A,{setDragging:null})))}function d(u){if(!u.which)return a(u);let f=A.getState(t.state);if(f&&f.dragging){let p=$e(f.dragging,u,n);Ie(t,f.activeHandle,p,o)}}return Ie(t,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),e.preventDefault(),!0}function Vt(t,e,{colspan:n,colwidth:o}){let l=o&&o[o.length-1];if(l)return l;let r=t.domAtPos(e),s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i{let o=t.nodes[n];o.spec.tableRole&&(e[o.spec.tableRole]=o)}),t.cached.tableNodeTypes=e,e}function Qt(t,e,n,o,l){let r=Yt(t),s=[],c=[];for(let a=0;a{let{selection:e}=t.state;if(!Zt(e))return!1;let n=0,o=ye(e.ranges[0].$from,r=>r.type.name==="table");return o?.node.descendants(r=>{if(r.type.name==="table")return!1;["tableCell","tableHeader"].includes(r.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},ot=N.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:ue,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){let{colgroup:n,tableWidth:o,tableMinWidth:l}=Jt(t,this.options.cellMinWidth),r=["table",R(this.options.HTMLAttributes,e,{style:o?`width: ${o}`:`min-width: ${l}`}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},r]:r},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:o,dispatch:l,editor:r})=>{let s=Qt(r.schema,t,e,n);if(l){let c=o.selection.from+1;o.replaceSelectionWith(s).scrollIntoView().setSelection(T.near(o.doc.resolve(c)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Pe(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Fe(t,e),deleteColumn:()=>({state:t,dispatch:e})=>je(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Ve(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Xe(t,e),deleteRow:()=>({state:t,dispatch:e})=>qe(t,e),deleteTable:()=>({state:t,dispatch:e})=>Je(t,e),mergeCells:()=>({state:t,dispatch:e})=>ie(t,e),splitCell:()=>({state:t,dispatch:e})=>ce(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>W("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>W("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ge(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>ie(t,e)?!0:ce(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:o})=>Ue(t,e)(n,o),goToNextCell:()=>({state:t,dispatch:e})=>ae(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ae(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&se(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){let o=w.create(e.doc,t.anchorCell,t.headCell);e.setSelection(o)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:J,"Mod-Backspace":J,Delete:J,"Mod-Delete":J}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Qe({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],et({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){let e={name:t.name,options:t.options,storage:t.storage};return{tableRole:we(ge(t,"tableRole",e))}}});var lt=N.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",R(this.options.HTMLAttributes,t),0]}});var rt=N.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{let e=t.getAttribute("colwidth");return e?e.split(",").map(o=>parseInt(o,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",R(this.options.HTMLAttributes,t),0]}});var st=N.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{let e=t.getAttribute("colwidth");return e?e.split(",").map(o=>parseInt(o,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",R(this.options.HTMLAttributes,t),0]}});window.WireTiptapAddons={TextAlign:xe,Highlight:Me,Image:ve,Table:ot,TableRow:lt,TableHeader:rt,TableCell:st}; +import{G as Re,K as Te,M as V,O as Me,P as ke,S as Ee,T as H,U as ze,a as M,b as L,e as we,f as E,g as be,h as z,i as Ce,j as oe,k as P,l as j,m as F,n as ye,s as Ae,t as Se,u as xe,v as x,w as ve}from"./chunk-72BVZGAJ.js";var wt=V.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{let t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).some(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).some(t=>t),toggleTextAlign:e=>({editor:t,commands:n})=>this.options.alignments.includes(e)?t.isActive({textAlign:e})?n.unsetTextAlign():n.setTextAlign(e):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),He=wt;var bt=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Ct=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,yt=Te.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||Re(e,"background-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",x(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:e=>e.indexOf("=="),tokenize(e,t,n){let l=/^(==)([^=]+)(==)/.exec(e);if(l){let r=l[2].trim(),s=n.inlineTokens(r);return{type:"highlight",raw:l[0],text:r,tokens:s}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Me({find:bt,type:this.type})]},addPasteRules(){return[ze({find:Ct,type:this.type})]}}),Ne=yt;var At=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,St=H.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",x(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;let i=(n=(t=e.attrs)==null?void 0:t.src)!=null?n:"",c=(l=(o=e.attrs)==null?void 0:o.alt)!=null?l:"",a=(s=(r=e.attrs)==null?void 0:r.title)!=null?s:"";return a?`![${c}](${i} "${a}")`:`![${c}](${i})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:i,editor:c})=>{let a=document.createElement("img");a.draggable=!1;let d=x(this.options.HTMLAttributes,i);Object.entries(d).forEach(([m,h])=>{if(h!=null)switch(m){case"src":case"width":case"height":break;default:a.setAttribute(m,h);break}}),d.src!==null&&(a.src=d.src);let u={...i},f=m=>{if(typeof m=="string"&&m!==""){a.getAttribute("src")!==m&&(a.src=m);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(i.src);let p=m=>{if(m.type!==r.type)return!1;let h=c.extensionManager.attributes.filter(y=>y.type===m.type.name),C=ve(m,h);return Object.keys(u).forEach(y=>{!l.has(y)&&!(y in C)&&a.removeAttribute(y)}),Object.entries(C).forEach(([y,R])=>{l.has(y)||(R!=null?a.setAttribute(y,R):a.removeAttribute(y))}),f(C.src),u=C,!0},g=new Ee({element:a,editor:c,node:r,getPos:s,onResize:(m,h)=>{a.style.width=`${m}px`,a.style.height=`${h}px`},onCommit:(m,h)=>{let C=s();C!==void 0&&this.editor.chain().setNodeSelection(C).updateAttributes(this.name,{width:m,height:h}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),w=g.dom;return w.style.visibility="hidden",w.style.pointerEvents="none",a.onload=()=>{w.style.visibility="",w.style.pointerEvents=""},g}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[ke({find:At,type:this.type,getAttributes:e=>{let[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}}),Le=St;var re,se;if(typeof WeakMap<"u"){let e=new WeakMap;re=t=>e.get(t),se=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;re=o=>{for(let l=0;l(n==10&&(n=0),e[n++]=o,e[n++]=l)}var A=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:h-y});break}let R=l+y*t;for(let T=0;To&&(r+=a.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Rt(e,t,n){e.problems||(e.problems=[]);let o={};for(let l=0;l0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Mt(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function k(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=W(t.$head)||kt(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function kt(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ie(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function Et(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function de(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Fe(e,t,n){let o=e.node(-1),l=A.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function D(e,t,n=1){let o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function Ve(e,t,n=1){let o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;ld!=n.pos-r);c.unshift(n.pos-r);let a=c.map(d=>{let u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);let f=r+d+1;return new be(i.resolve(f),i.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){let o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ie(o)&&ie(l)&&de(o,l)){let r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?$.rowSelection(o,l):r&&this.isColSelection()?$.colSelection(o,l):new $(o,l)}return z.between(o,l)}content(){let t=this.$anchorCell.node(-1),n=A.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let c=l.top;c0||m>0){let h=g.attrs;if(w>0&&(h=D(h,0,w)),m>0&&(h=D(h,h.colspan-m,m)),p.leftl.bottom){let h={...g.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top0)return!1;let o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let o=t.node(-1),l=A.get(o),r=t.start(-1),s=l.findCell(t.pos-r),i=l.findCell(n.pos-r),c=t.node(0);return s.top<=i.top?(s.top>0&&(t=c.resolve(r+l.map[s.left])),i.bottom0&&(n=c.resolve(r+l.map[i.left])),s.bottom0)return!1;let s=l+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,i)==n.width}eq(t){return t instanceof $&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let o=t.node(-1),l=A.get(o),r=t.start(-1),s=l.findCell(t.pos-r),i=l.findCell(n.pos-r),c=t.node(0);return s.left<=i.left?(s.left>0&&(t=c.resolve(r+l.map[s.top*l.width])),i.right0&&(n=c.resolve(r+l.map[i.top*l.width])),s.right{t.push(j.node(o,o+n.nodeSize,{class:"selectedCell"}))}),F.create(e.doc,t)}function Lt({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(l+1)=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function $t({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){let r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){let r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function _t(e,t,n){let o=(t||e).selection,l=(t||e).doc,r,s;if(o instanceof Ce&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){let i=l.resolve(o.from+1);r=b.rowSelection(i,i)}else if(!n){let i=A.get(o.node),c=o.from+1,a=c+i.map[i.width*i.height-1];r=b.create(l,c+1,a)}}else o instanceof z&&Lt(o)?r=z.create(l,o.from):o instanceof z&&$t(o)&&(r=z.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}var It=new P("fix-tables");function Xe(e,t,n,o){let l=e.childCount,r=t.childCount;e:for(let s=0,i=0;s{l.type.spec.tableRole=="table"&&(n=Wt(e,l,r,n))};return t?t.doc!=e.doc&&Xe(t.doc,e.doc,0,o):e.doc.descendants(o),n}function Wt(e,t,n,o){let l=A.get(t);if(!l.problems)return o;o||(o=e.tr);let r=[];for(let c=0;c0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);let g=[];for(let m=0;m0?-1:0;zt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s0&&l0&&t.map[i-1]==c||l0?-1:0;Ot(t,o,l+i)&&(i=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a0&&l0&&u==t.map[d-t.width]){let f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(i).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l0&&n[r]==n[r-1]||o.right0&&n[l]==n[l-e]||o.bottom0){let d=c+1+a.content.size,u=$e(a)?c+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,i)}r.setSelection(new b(r.doc.resolve(c+o.tableStart))),t(r)}return!0}function pe(e,t){let n=S(e.schema);return jt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function jt(e){return(t,n)=>{let o=t.selection,l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Mt(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let i=l.attrs,c=[],a=i.colwidth;i.rowspan>1&&(i={...i,rowspan:1}),i.colspan>1&&(i={...i,colspan:1});let d=N(t),u=t.tr;for(let p=0;p{s.attrs[e]!==t&&r.setNodeMarkup(i,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function Ft(e){return function(t,n){if(!k(t))return!1;if(n){let o=S(t.schema),l=N(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),i=s.map(c=>l.table.nodeAt(c));for(let c=0;c{let p=f+r.tableStart,g=s.doc.nodeAt(p);g&&s.setNodeMarkup(p,u,g.attrs)}),o(s)}return!0}}var In=O("row",{useDeprecatedLogic:!0}),Wn=O("column",{useDeprecatedLogic:!0}),nt=O("cell",{useDeprecatedLogic:!0});function Vt(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){let r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function K(e,t){let n=e.selection;if(!(n instanceof b))return!1;if(t){let o=e.tr,l=S(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Kt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;let l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,i=[];if(r=="row")for(let c=0;c=0;s--){let{rowspan:i,colspan:c}=r.child(s).attrs;for(let a=l;a=t.length&&t.push(M.empty),n[l]o&&(f=f.type.createChecked(D(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;pl&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),c.push(u)}r.push(M.from(c))}n=r,t=l}return{width:e,height:t,rows:n}}function qt(e,t,n,o,l,r,s){let i=e.doc.type.schema,c=S(i),a,d;if(l>t.width)for(let u=0,f=0;ut.height){let u=[];for(let g=0,w=(t.height-1)*t.width;g=t.width?!1:n.nodeAt(t.map[w+g]).type==c.header_cell;u.push(m?d||(d=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}let f=c.row.create(null,M.from(u)),p=[];for(let g=t.height;g{if(!l)return!1;let r=n.selection;if(r instanceof b)return q(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;let s=lt(l,e,t);if(s==null)return!1;if(e=="horiz")return q(n,o,E.near(n.doc.resolve(r.head+t),t));{let i=n.doc.resolve(s),c=Fe(i,e,t),a;return c?a=E.near(c,1):t<0?a=E.near(n.doc.resolve(i.before(-1)),-1):a=E.near(n.doc.resolve(i.after(-1)),1),q(n,o,a)}}}function U(e,t){return(n,o,l)=>{if(!l)return!1;let r=n.selection,s;if(r instanceof b)s=r;else{let c=lt(l,e,t);if(c==null)return!1;s=new b(n.doc.resolve(c))}let i=Fe(s.$headCell,e,t);return i?q(n,o,new b(s.$anchorCell,i)):!1}}function Jt(e,t){let n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function Yt(e,t,n){if(!k(e.state))return!1;let o=Kt(n),l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(ce(S(e.state.schema).cell,n))]});let r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),i=A.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=Ut(o,i.right-i.left,i.bottom-i.top),De(e.state,e.dispatch,s,i,o),!0}else if(o){let r=J(e.state),s=r.start(-1);return De(e.state,e.dispatch,s,A.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Qt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;let o=Oe(e,t.target),l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=le(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(c,a){let d=le(e,a),u=_.getState(e.state)==null;if(!d||!de(c,d))if(u)d=c;else return;let f=new b(c,d);if(u||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);u&&p.setMeta(_,c.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",i),_.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(_,-1))}function i(c){let a=c,d=_.getState(e.state),u;if(d!=null)u=e.state.doc.resolve(d);else if(Oe(e,a.target)!=o&&(u=le(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",i)}function lt(e,t,n){if(!(e.state.selection instanceof z))return null;let{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){let r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){let s=o.before(l),i=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(i)?s:null}}return null}function Oe(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function le(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var Zt=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ae(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,ae(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function ae(e,t,n,o,l,r){let s=0,i=!0,c=t.firstChild,a=e.firstChild;if(a){for(let u=0,f=0;unew o(u,n,f)),new en(-1,!1)},apply(s,i){return i.apply(s)}},props:{attributes:s=>{let i=v.getState(s);return i&&i.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,i)=>{tn(s,i,e,l)},mouseleave:s=>{nn(s)},mousedown:(s,i)=>{on(s,i,t,n)}},decorations:s=>{let i=v.getState(s);if(i&&i.activeHandle>-1)return an(s,i.activeHandle)},nodeViews:{}}});return r}var en=class G{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,o=t.getMeta(v);if(o&&o.setHandle!=null)return new G(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new G(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ie(t.doc.resolve(l))||(l=-1),new G(l,n.dragging)}return n}};function tn(e,t,n,o){if(!e.editable)return;let l=v.getState(e.state);if(l&&!l.dragging){let r=rn(t.target),s=-1;if(r){let{left:i,right:c}=r.getBoundingClientRect();t.clientX-i<=n?s=Be(e,t,"left",n):c-t.clientX<=n&&(s=Be(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){let i=e.state.doc.resolve(s),c=i.node(-1),a=A.get(c),d=i.start(-1);if(a.colCount(i.pos-d)+i.nodeAfter.attrs.colspan-1==a.width-1)return}st(e,s)}}}function nn(e){if(!e.editable)return;let t=v.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&st(e,-1)}function on(e,t,n,o){var l;if(!e.editable)return!1;let r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=v.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let i=e.state.doc.nodeAt(s.activeHandle),c=ln(e,s.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(v,{setDragging:{startX:t.clientX,startWidth:c}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);let f=v.getState(e.state);f?.dragging&&(sn(e,f.activeHandle,Pe(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(v,{setDragging:null})))}function d(u){if(!u.which)return a(u);let f=v.getState(e.state);if(f&&f.dragging){let p=Pe(f.dragging,u,n);je(e,f.activeHandle,p,o)}}return je(e,s.activeHandle,c,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function ln(e,t,{colspan:n,colwidth:o}){let l=o&&o[o.length-1];if(l)return l;let r=e.domAtPos(t),s=r.node.childNodes[r.offset].offsetWidth,i=n;if(o)for(let c=0;cdn(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function fn(e){var t;let n=e.parentElement,o=e.closest("table");if(!n||!o)return null;let l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])==null?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ut(e){let t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):fn(e)}var pn=/[ \t\r\n\f]+/g;function ft(e){var t;return e.children.length>0?!1:((t=e.textContent)!=null?t:"").replace(pn,"")===""}function pt(e){let t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}var Z=H.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ut},align:dt()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>ft(e)?{}:!1,getContent:(e,t)=>pt(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",x(this.options.HTMLAttributes,e),0]}}),ee=H.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ut},align:dt()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>ft(e)?{}:!1,getContent:(e,t)=>pt(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",x(this.options.HTMLAttributes,e),0]}}),te=H.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",x(this.options.HTMLAttributes,e),0]}});function me(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ct(e,t,n,o,l,r){var s;let i=0,c=!0,a=t.firstChild,d=e.firstChild;if(d!==null)for(let f=0,p=0;f{let o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function wn(e,t,n,o,l){let r=gn(e),s=[],i=[];for(let a=0;a{let{selection:t}=e.state;if(!bn(t))return!1;let n=0,o=Ae(t.ranges[0].$from,r=>r.type.name==="table");return o?.node.descendants(r=>{if(r.type.name==="table")return!1;["tableCell","tableHeader"].includes(r.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},Cn="";function yn(e){let t="",n=0;for(;n!t.includes("|")||!t.includes("`")?t:yn(t)).join(` +`)}function Sn(e){return(e||"").replace(/\s+/g," ").trim()}function xn(e,t,n={}){var o;let l=(o=n.cellLineSeparator)!=null?o:Cn;if(!e||!e.content||e.content.length===0)return"";let r=[];e.content.forEach(w=>{let m=[];w.content&&w.content.forEach(h=>{let C="";h.content&&Array.isArray(h.content)&&h.content.length>1?C=h.content.map(I=>t.renderChildren(I)).join(l):C=h.content?t.renderChildren(h.content):"";let y=Sn(C.split(l).join(` +`).replace(/[ \t]*\r?\n[ \t]*/g,"
")),R=h.type==="tableHeader",T=un(h.attrs);m.push({text:y,isHeader:R,align:T})}),r.push(m)});let s=r.reduce((w,m)=>Math.max(w,m.length),0);if(s===0)return"";let i=Array.from({length:s}).fill(0);r.forEach(w=>{var m;for(let h=0;hi[h]&&(i[h]=y),i[h]<3&&(i[h]=3)}});let c=(w,m)=>w+" ".repeat(Math.max(0,m-w.length)),a=r[0],d=a.some(w=>w.isHeader),u=Array.from({length:s}).fill(null);r.forEach(w=>{var m;for(let h=0;hd&&a[m]&&a[m].text||"");return f+=`| ${p.map((w,m)=>c(w,i[m])).join(" | ")} | +`,f+=`| ${i.map((w,m)=>{let h=Math.max(3,w),C=u[m];return C==="left"?`:${"-".repeat(h)}`:C==="right"?`${"-".repeat(h)}:`:C==="center"?`:${"-".repeat(h)}:`:"-".repeat(h)}).join(" | ")} | +`,(d?r.slice(1):r).forEach(w=>{f+=`| ${Array.from({length:s}).fill(0).map((m,h)=>c(w[h]&&w[h].text||"",i[h])).join(" | ")} | +`}),f}var vn=xn,ge=H.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:hn,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:o,tableMinWidth:l}=mn(e,this.options.cellMinWidth),r=t.style;function s(){return r||(o?`width: ${o}`:`min-width: ${l}`)}let i=["table",x(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},i]:i},parseMarkdown:(e,t)=>{let n=[],o=Array.isArray(e.align)?e.align:[];if(e.header){let l=[];e.header.forEach((r,s)=>{var i;let c=Q((i=o[s])!=null?i:r.align),a=c?{align:c}:{};l.push(t.createNode("tableHeader",a,[{type:"paragraph",content:t.parseInline(r.tokens)}]))}),n.push(t.createNode("tableRow",{},l))}return e.rows&&e.rows.forEach(l=>{let r=[];l.forEach((s,i)=>{var c;let a=Q((c=o[i])!=null?c:s.align),d=a?{align:a}:{};r.push(t.createNode("tableCell",d,[{type:"paragraph",content:t.parseInline(s.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>vn(e,t),markdownTokenizer:{name:"table",level:"block",start:e=>{let t=e.split(` +`);if(t.length<2)return-1;let n=t[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(n)||!n.includes("|")?-1:t[0].includes("|")?0:-1},tokenize(e,t,n){let o=e.indexOf(` + +`),l=o>=0?e.slice(0,o):e,r=l.split(` +`);if(r.length<2)return;let s=r[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|"))return;let i=An(l);if(i===l)return;let a=n.blockTokens(i)[0];if(a?.type!=="table"||!a.raw)return;let d=a.raw.split(` +`).length,u=e.split(` +`).slice(0,d).join(` +`);return{...a,raw:u}}},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:o,dispatch:l,editor:r})=>{let s=wn(r.schema,e,t,n);if(l){let i=o.selection.from+1;o.replaceSelectionWith(s).scrollIntoView().setSelection(z.near(o.doc.resolve(i)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>qe(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>Ge(e,t),deleteColumn:()=>({state:e,dispatch:t})=>Je(e,t),addRowBefore:()=>({state:e,dispatch:t})=>Qe(e,t),addRowAfter:()=>({state:e,dispatch:t})=>Ze(e,t),deleteRow:()=>({state:e,dispatch:t})=>et(e,t),deleteTable:()=>({state:e,dispatch:t})=>ot(e,t),mergeCells:()=>({state:e,dispatch:t})=>fe(e,t),splitCell:()=>({state:e,dispatch:t})=>pe(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>O("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>O("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>nt(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>fe(e,t)?!0:pe(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:o})=>tt(e,t)(n,o),goToNextCell:()=>({state:e,dispatch:t})=>he(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>he(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&ue(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let o=b.create(t.doc,e.anchorCell,e.headCell);t.setSelection(o)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Y,"Mod-Backspace":Y,Delete:Y,"Mod-Delete":Y}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[rt({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],it({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){let e=this.options.resizable&&this.editor.isEditable,t=this.options.View;return e||!t?null:({node:n,view:o,HTMLAttributes:l})=>{let r=x(this.options.HTMLAttributes,l);return new t(n,this.options.cellMinWidth,o,r)}},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:xe(Se(e,"tableRole",t))}}}),Qn=V.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(ge.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Z.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(ee.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(te.configure(this.options.tableRow)),e}});var ht=te;var mt=ee;var gt=Z;window.WireTiptapAddons={TextAlign:He,Highlight:Ne,Image:Le,Table:ge,TableRow:ht,TableHeader:mt,TableCell:gt}; diff --git a/packages/forms/dist/tiptap/tiptap-editor.js b/packages/forms/dist/tiptap/tiptap-editor.js index 235a337a..f700945b 100644 --- a/packages/forms/dist/tiptap/tiptap-editor.js +++ b/packages/forms/dist/tiptap/tiptap-editor.js @@ -1,9 +1,41 @@ -import{A as Ze,B as tn,C as N,D as en,E as ot,F as $,G as T,H as O,I as nn,a as ie,b as ae,c as Ke,d as We,f as Q,h as _,i as st,j as v,k as R,l as yt,m as kt,n as Fe,o as $e,p as y,q as Ge,r as I,s as S,t as Ve,u as Qe,w as qe,x as Je,y as Ye,z as Xe}from"./chunk-CFHSZ3VY.js";var rr=/^\s*>\s$/,rn=T.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$({find:rr,type:this.type})]}});var sr=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,or=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,ir=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,ar=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,sn=I.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[N({find:sr,type:this.type}),N({find:ir,type:this.type})]},addPasteRules(){return[O({find:or,type:this.type}),O({find:ar,type:this.type})]}});var lr="listItem",on="textStyle",an=/^\s*([-+*])\s$/,ln=T.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",y(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(lr,this.editor.getAttributes(on)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=$({find:an,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=$({find:an,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(on),editor:this.editor})),[t]}});var ur=/(^|[^`])`([^`]+)`(?!`)/,cr=/(^|[^`])`([^`]+)`(?!`)/g,un=I.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[N({find:ur,type:this.type})]},addPasteRules(){return[O({find:cr,type:this.type})]}});var dr=/^```([a-z]+)?[\s\n]$/,pr=/^~~~([a-z]+)?[\s\n]$/,cn=T.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options,o=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",y(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(` +import{A as Sn,B as Pn,C as Nn,D as Ct,E as Ie,F as On,H as xt,I as Re,J as Hn,K as _,L as _n,M as C,N as Dn,O as D,P as Bn,Q as pe,R as z,T as L,U as P,a as ue,b as Et,c as An,d as Ln,f as ee,h as H,i as ce,j as A,k as M,l as J,m as S,n as Tn,o as we,p as de,q as En,r as Cn,t as xn,u as wn,v as b,w as Mn,x as In,y as Me,z as Rn}from"./chunk-72BVZGAJ.js";var ae=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var ns=(e,t)=>{var n;let{state:r,view:s}=e,{selection:o}=r;if(!o.empty)return!1;let{$from:i}=o;if(i.parentOffset!==0)return!1;let a=i.depth-1;if(a<0)return!1;let l=i.node(a),c=i.index(a);if(c===0)return!1;if(l.type===t)return e.commands.lift(t.name);let d=l.child(c-1);if(d.type!==t||!((n=d.lastChild)!=null&&n.isTextblock))return!1;let u=i.before(),f=u-1-1,{tr:g}=r;return g.delete(u,i.after()).insert(f,i.parent.content),g.setSelection(H.create(g.doc,f)),s.dispatch(g.scrollIntoView()),!0},rs=/^\s*>\s$/,$n=L.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return ae("blockquote",{...b(this.options.HTMLAttributes,e),children:ae("slot",{})})},parseMarkdown:(e,t)=>{var n;let r=(n=t.parseBlockChildren)!=null?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach((s,o)=>{var i,a;let d=((a=(i=t.renderChild)==null?void 0:i.call(t,s,o))!=null?a:t.renderChildren([s])).split(` +`).map(u=>u.trim()===""?n:`${n} ${u}`);r.push(d.join(` +`))}),r.join(` +${n} +`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>ns(this.editor,this.type)}},addInputRules(){return[z({find:rs,type:this.type})]}});var ss=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,os=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,is=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,as=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,zn=_.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return ae("strong",{...b(this.options.HTMLAttributes,e),children:ae("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[D({find:ss,type:this.type}),D({find:is,type:this.type})]},addPasteRules(){return[P({find:os,type:this.type}),P({find:as,type:this.type})]}});var ls=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},us=e=>{let t=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=t.exec(e))!==null;)r.index>0&&e[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},jn=_.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",b(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[D({find:ls,type:this.type})]},addPasteRules(){return[P({find:us,type:this.type})]}});var wt=4,cs=/^```([a-z]+)?[\s\n]$/,ds=/^~~~([a-z]+)?[\s\n]$/,Un=L.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:wt,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let o=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",b(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&((r=e.raw)==null?void 0:r.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",s=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${s}`,t.renderChildren(e.content),"```"].join(` +`):r=`\`\`\`${s} -`);return!o||!i?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:o}=n;if(!o||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;let a=s.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(Q.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[ot({find:dr,type:this.type,getAttributes:t=>({language:t[1]})}),ot({find:pr,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new v({key:new R("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,o=s?.mode;if(!n||!o)return!1;let{tr:i,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,` -`));return i.replaceSelectionWith(this.type.create({language:o},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(_.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),t.dispatch(i),!0}}})]}});var dn=T.create({name:"doc",topNode:!0,content:"block+"});function pn(t={}){return new v({view(e){return new le(e,t)}})}var le=class{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let o=i=>{this[s](i)};return e.dom.addEventListener(s,o),{name:s,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,o=s.getBoundingClientRect(),i=o.width/s.offsetWidth,a=o.height/s.offsetHeight;if(n){let d=e.nodeBefore,h=e.nodeAfter;if(d||h){let f=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(f){let A=f.getBoundingClientRect(),k=d?A.bottom:A.top;d&&h&&(k=(k+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*a;r={left:A.left,right:A.right,top:k-b,bottom:k+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*i;r={left:d.left-h,right:d.left+h,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,p;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,p=-pageYOffset;else{let d=l.getBoundingClientRect(),h=d.width/l.offsetWidth,f=d.height/l.offsetHeight;c=d.left-l.scrollLeft*h,p=d.top-l.scrollTop*f}this.element.style.left=(r.left-c)/i+"px",this.element.style.top=(r.top-p)/a+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,o=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!o){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=We(this.editorView.state.doc,i,this.editorView.dragging.slice);a!=null&&(i=a)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}};var hn=S.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[pn(this.options)]}});var M=class t extends Q{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return t.valid(r)?new t(r):Q.near(r)}content(){return ae.empty}eq(e){return e instanceof t&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))}getBookmark(){return new ue(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!hr(e)||!fr(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){t:for(;;){if(!r&&t.valid(e))return e;let s=e.pos,o=null;for(let i=e.depth;;i--){let a=e.node(i);if(n>0?e.indexAfter(i)0){o=a.child(n>0?e.indexAfter(i):e.index(i)-1);break}else if(i==0)return null;s+=n;let l=e.doc.resolve(s);if(t.valid(l))return l}for(;;){let i=n>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!st.isSelectable(o)){e=e.doc.resolve(s+o.nodeSize*n),r=!1;continue t}break}o=i,s+=n;let a=e.doc.resolve(s);if(t.valid(a))return a}return null}}};M.prototype.visible=!1;M.findFrom=M.findGapCursorFrom;Q.jsonID("gapcursor",M);var ue=class t{constructor(e){this.pos=e}map(e){return new t(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return M.valid(n)?new M(n):Q.near(n)}};function fn(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function hr(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||fn(s.type))return!0;if(s.inlineContent)return!1}}return!0}function fr(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||fn(s.type))return!0;if(s.inlineContent)return!1}}return!0}function mn(){return new v({props:{decorations:kr,createSelectionBetween(t,e,n){return e.pos==n.pos&&M.valid(n)?new M(n):null},handleClick:gr,handleKeyDown:mr,handleDOMEvents:{beforeinput:yr}}})}var mr=Fe({ArrowLeft:At("horiz",-1),ArrowRight:At("horiz",1),ArrowUp:At("vert",-1),ArrowDown:At("vert",1)});function At(t,e){let n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,o){let i=r.selection,a=e>0?i.$to:i.$from,l=i.empty;if(i instanceof _){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=M.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new M(c))),!0):!1}}function gr(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!M.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&st.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new M(r))),!0)}function yr(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof M))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=ie.empty;for(let i=r.length-1;i>=0;i--)s=ie.from(r[i].createAndFill(null,s));let o=t.state.tr.replace(n.pos,n.pos,new ae(s,0,0));return o.setSelection(_.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function kr(t){if(!(t.selection instanceof M))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",kt.create(t.doc,[yt.widget(t.selection.head,e,{key:"gapcursor"})])}var gn=S.create({name:"gapCursor",addProseMirrorPlugins(){return[mn()]},extendNodeSchema(t){var e;let n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ge($e(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}});var yn=T.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",y(this.options.HTMLAttributes,t)]},renderText(){return` -`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:s,storedMarks:o}=n;if(s.$from.parent.type.spec.isolating)return!1;let{keepMarks:i}=this.options,{splittableMarks:a}=r.extensionManager,l=o||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:p})=>{if(p&&l&&i){let d=l.filter(h=>a.includes(h.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var kn=T.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,y(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>ot({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var Et=200,L=function(){};L.prototype.append=function(e){return e.length?(e=L.from(e),!this.length&&e||e.length=n?L.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};L.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};L.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};L.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(o,i){return s.push(e(o,i))},n,r),s};L.from=function(e){return e instanceof L?e:e&&e.length?new An(e):L.empty};var An=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,o){return s==0&&o==this.length?this:new e(this.values.slice(s,o))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,o,i,a){for(var l=o;l=i;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Et)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Et)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(L);L.empty=new An([]);var Ar=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,o)-a,i+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,o,i){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(o,a)-a,i+a)===!1||o=o?this.right.slice(r-o,s-o):this.left.slice(r,o).append(this.right.slice(0,s-o))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(L),ce=L;var Er=500,J=class t{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,o;n&&(s=this.remapping(r,this.items.length),o=s.maps.length);let i=e.tr,a,l,c=[],p=[];return this.items.forEach((d,h)=>{if(!d.step){s||(s=this.remapping(r,h+1),o=s.maps.length),o--,p.push(d);return}if(s){p.push(new D(d.map));let f=d.step.map(s.slice(o)),A;f&&i.maybeStep(f).doc&&(A=i.mapping.maps[i.mapping.maps.length-1],c.push(new D(A,void 0,void 0,c.length+p.length))),o--,A&&s.appendMap(A,o)}else i.maybeStep(d.step);if(d.selection)return a=s?d.selection.map(s.slice(o)):d.selection,l=new t(this.items.slice(0,r).append(p.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:a}}addTransform(e,n,r,s){let o=[],i=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let p=0;pTr&&(a=br(a,c),i-=c),new t(a.append(o),i)}remapping(e,n){let r=new Ke;return this.items.forEach((s,o)=>{let i=s.mirrorOffset!=null&&o-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,i)},e,n),r}addMaps(e){return this.eventCount==0?this:new t(this.items.append(e.map(n=>new D(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},s);let l=n;this.items.forEach(h=>{let f=o.getMirror(--l);if(f==null)return;i=Math.min(i,f);let A=o.maps[f];if(h.step){let k=e.steps[f].invert(e.docs[f]),b=h.selection&&h.selection.map(o.slice(l+1,f));b&&a++,r.push(new D(A,k,b))}else r.push(new D(A))},s);let c=[];for(let h=n;hEr&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],o=0;return this.items.forEach((i,a)=>{if(a>=e)s.push(i),i.selection&&o++;else if(i.step){let l=i.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let p=i.selection&&i.selection.map(n.slice(r));p&&o++;let d=new D(c.invert(),l,p),h,f=s.length-1;(h=s.length&&s[f].merge(d))?s[f]=h:s.push(d)}}else i.map&&r--},this.items.length,0),new t(ce.from(s.reverse()),o)}};J.empty=new J(ce.empty,0);function br(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}var D=class t{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new t(n.getMap().invert(),n,this.selection)}}},B=class{constructor(e,n,r,s,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=o}},Tr=20;function Cr(t,e,n,r){let s=n.getMeta(q),o;if(s)return s.historyState;n.getMeta(vr)&&(t=new B(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(i&&i.getMeta(q))return i.getMeta(q).redo?new B(t.done.addTransform(n,void 0,r,bt(e)),t.undone,En(n.mapping.maps),t.prevTime,t.prevComposition):new B(t.done,t.undone.addTransform(n,void 0,r,bt(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!i&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Lr(n,t.prevRanges)),c=i?de(t.prevRanges,n.mapping):En(n.mapping.maps);return new B(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,bt(e)),J.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new B(t.done.rebased(n,o),t.undone.rebased(n,o),de(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new B(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),de(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Lr(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let o=0;o=e[o]&&(n=!0)}),n}function En(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,o,i)=>e.push(o,i));return e}function de(t,e){if(!t)return null;let n=[];for(let r=0;r{let s=q.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let o=wr(s,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}var he=Tt(!1,!0),fe=Tt(!0,!0),$s=Tt(!1,!1),Gs=Tt(!0,!1);var Cn=S.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>he(t,e),redo:()=>({state:t,dispatch:e})=>fe(t,e)}},addProseMirrorPlugins(){return[Tn(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var Ln=T.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",y(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!nn(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$from:r,$to:s}=n,o=t();return r.parentOffset===0?o.insertContentAt({from:Math.max(r.pos-1,0),to:s.pos},{type:this.name}):Ze(n)?o.insertContentAt(s.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:i,dispatch:a})=>{var l;if(a){let{$to:c}=i.selection,p=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?i.setSelection(_.create(i.doc,c.pos+1)):c.nodeAfter.isBlock?i.setSelection(st.create(i.doc,c.pos)):i.setSelection(_.create(i.doc,c.pos));else{let d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(i.insert(p,d),i.setSelection(_.create(i.doc,p+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[en({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var Mr=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,xr=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Rr=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Ir=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,wn=I.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[N({find:Mr,type:this.type}),N({find:Rr,type:this.type})]},addPasteRules(){return[O({find:xr,type:this.type}),O({find:Ir,type:this.type})]}});var vn=T.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",y(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});var Sr="listItem",Mn="textStyle",xn=/^(\d+)\.\s$/,Rn=T.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return e===1?["ol",y(this.options.HTMLAttributes,n),0]:["ol",y(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Sr,this.editor.getAttributes(Mn)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=$({find:xn,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=$({find:xn,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Mn)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}});var In=T.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Or=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Hr=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Sn=I.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[N({find:Or,type:this.type})]},addPasteRules(){return[O({find:Hr,type:this.type})]}});var On=T.create({name:"text",group:"inline"});var Hn=S.create({name:"starterKit",addExtensions(){let t=[];return this.options.bold!==!1&&t.push(sn.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(rn.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(ln.configure(this.options.bulletList)),this.options.code!==!1&&t.push(un.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(cn.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(dn.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(hn.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(gn.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(yn.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(kn.configure(this.options.heading)),this.options.history!==!1&&t.push(Cn.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(Ln.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(wn.configure(this.options.italic)),this.options.listItem!==!1&&t.push(vn.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(Rn.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(In.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(Sn.configure(this.options.strike)),this.options.text!==!1&&t.push(On.configure(this.options.text)),t}});var Pr="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Nr="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",be="numeric",Te="ascii",Ce="alpha",lt="asciinumeric",at="alphanumeric",Le="domain",Un="emoji",Dr="scheme",Br="slashscheme",me="whitespace";function jr(t,e){return t in e||(e[t]=[]),e[t]}function Y(t,e,n){e[be]&&(e[lt]=!0,e[at]=!0),e[Te]&&(e[lt]=!0,e[Ce]=!0),e[lt]&&(e[at]=!0),e[Ce]&&(e[at]=!0),e[at]&&(e[Le]=!0),e[Un]&&(e[Le]=!0);for(let r in e){let s=jr(r,n);s.indexOf(t)<0&&s.push(t)}}function Ur(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function x(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}x.groups={};x.prototype={accepts(){return!!this.t},go(t){let e=this,n=e.j[t];if(n)return n;for(let r=0;rt.ta(e,n,r,s),C=(t,e,n,r,s)=>t.tr(e,n,r,s),Pn=(t,e,n,r,s)=>t.ts(e,n,r,s),u=(t,e,n,r,s)=>t.tt(e,n,r,s),F="WORD",we="UWORD",zn="ASCIINUMERICAL",_n="ALPHANUMERICAL",ft="LOCALHOST",ve="TLD",Me="UTLD",vt="SCHEME",nt="SLASH_SCHEME",Re="NUM",xe="WS",Ie="NL",ut="OPENBRACE",ct="CLOSEBRACE",Mt="OPENBRACKET",xt="CLOSEBRACKET",Rt="OPENPAREN",It="CLOSEPAREN",St="OPENANGLEBRACKET",Ot="CLOSEANGLEBRACKET",Ht="FULLWIDTHLEFTPAREN",Pt="FULLWIDTHRIGHTPAREN",Nt="LEFTCORNERBRACKET",Dt="RIGHTCORNERBRACKET",Bt="LEFTWHITECORNERBRACKET",jt="RIGHTWHITECORNERBRACKET",Ut="FULLWIDTHLESSTHAN",zt="FULLWIDTHGREATERTHAN",_t="AMPERSAND",Kt="APOSTROPHE",Wt="ASTERISK",V="AT",Ft="BACKSLASH",$t="BACKTICK",Gt="CARET",X="COLON",Se="COMMA",Vt="DOLLAR",j="DOT",Qt="EQUALS",Oe="EXCLAMATION",P="HYPHEN",dt="PERCENT",qt="PIPE",Jt="PLUS",Yt="POUND",pt="QUERY",He="QUOTE",Kn="FULLWIDTHMIDDLEDOT",Pe="SEMI",U="SLASH",ht="TILDE",Xt="UNDERSCORE",Wn="EMOJI",Zt="SYM",Fn=Object.freeze({__proto__:null,ALPHANUMERICAL:_n,AMPERSAND:_t,APOSTROPHE:Kt,ASCIINUMERICAL:zn,ASTERISK:Wt,AT:V,BACKSLASH:Ft,BACKTICK:$t,CARET:Gt,CLOSEANGLEBRACKET:Ot,CLOSEBRACE:ct,CLOSEBRACKET:xt,CLOSEPAREN:It,COLON:X,COMMA:Se,DOLLAR:Vt,DOT:j,EMOJI:Wn,EQUALS:Qt,EXCLAMATION:Oe,FULLWIDTHGREATERTHAN:zt,FULLWIDTHLEFTPAREN:Ht,FULLWIDTHLESSTHAN:Ut,FULLWIDTHMIDDLEDOT:Kn,FULLWIDTHRIGHTPAREN:Pt,HYPHEN:P,LEFTCORNERBRACKET:Nt,LEFTWHITECORNERBRACKET:Bt,LOCALHOST:ft,NL:Ie,NUM:Re,OPENANGLEBRACKET:St,OPENBRACE:ut,OPENBRACKET:Mt,OPENPAREN:Rt,PERCENT:dt,PIPE:qt,PLUS:Jt,POUND:Yt,QUERY:pt,QUOTE:He,RIGHTCORNERBRACKET:Dt,RIGHTWHITECORNERBRACKET:jt,SCHEME:vt,SEMI:Pe,SLASH:U,SLASH_SCHEME:nt,SYM:Zt,TILDE:ht,TLD:ve,UNDERSCORE:Xt,UTLD:Me,UWORD:we,WORD:F,WS:xe}),K=/[a-z]/,it=/\p{L}/u,ge=/\p{Emoji}/u;var W=/\d/,ye=/\s/;var Nn="\r",ke=` -`,zr="\uFE0F",_r="\u200D",Ae="\uFFFC",Ct=null,Lt=null;function Kr(t=[]){let e={};x.groups=e;let n=new x;Ct==null&&(Ct=Dn(Pr)),Lt==null&&(Lt=Dn(Nr)),u(n,"'",Kt),u(n,"{",ut),u(n,"}",ct),u(n,"[",Mt),u(n,"]",xt),u(n,"(",Rt),u(n,")",It),u(n,"<",St),u(n,">",Ot),u(n,"\uFF08",Ht),u(n,"\uFF09",Pt),u(n,"\u300C",Nt),u(n,"\u300D",Dt),u(n,"\u300E",Bt),u(n,"\u300F",jt),u(n,"\uFF1C",Ut),u(n,"\uFF1E",zt),u(n,"&",_t),u(n,"*",Wt),u(n,"@",V),u(n,"`",$t),u(n,"^",Gt),u(n,":",X),u(n,",",Se),u(n,"$",Vt),u(n,".",j),u(n,"=",Qt),u(n,"!",Oe),u(n,"-",P),u(n,"%",dt),u(n,"|",qt),u(n,"+",Jt),u(n,"#",Yt),u(n,"?",pt),u(n,'"',He),u(n,"/",U),u(n,";",Pe),u(n,"~",ht),u(n,"_",Xt),u(n,"\\",Ft),u(n,"\u30FB",Kn);let r=C(n,W,Re,{[be]:!0});C(r,W,r);let s=C(r,K,zn,{[lt]:!0}),o=C(r,it,_n,{[at]:!0}),i=C(n,K,F,{[Te]:!0});C(i,W,s),C(i,K,i),C(s,W,s),C(s,K,s);let a=C(n,it,we,{[Ce]:!0});C(a,K),C(a,W,o),C(a,it,a),C(o,W,o),C(o,K),C(o,it,o);let l=u(n,ke,Ie,{[me]:!0}),c=u(n,Nn,xe,{[me]:!0}),p=C(n,ye,xe,{[me]:!0});u(n,Ae,p),u(c,ke,l),u(c,Ae,p),C(c,ye,p),u(p,Nn),u(p,ke),C(p,ye,p),u(p,Ae,p);let d=C(n,ge,Wn,{[Un]:!0});u(d,"#"),C(d,ge,d),u(d,zr,d);let h=u(d,_r);u(h,"#"),C(h,ge,d);let f=[[K,i],[W,s]],A=[[K,null],[it,a],[W,o]];for(let k=0;kk[0]>b[0]?1:-1);for(let k=0;k=0?z[Le]=!0:K.test(b)?W.test(b)?z[lt]=!0:z[Te]=!0:z[be]=!0,Pn(n,b,b,z)}return Pn(n,"localhost",ft,{ascii:!0}),n.jd=new x(Zt),{start:n,tokens:Object.assign({groups:e},Fn)}}function $n(t,e){let n=Wr(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[],o=0,i=0;for(;i=0&&(d+=n[i].length,h++),c+=n[i].length,o+=n[i].length,i++;o-=d,i-=h,c-=d,s.push({t:p.t,v:e.slice(o-c,o),s:o-c,e:o})}return s}function Wr(t){let e=[],n=t.length,r=0;for(;r56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(i),r+=i.length}return e}function G(t,e,n,r,s){let o,i=e.length;for(let a=0;a=0;)o++;if(o>0){e.push(n.join(""));for(let i=parseInt(t.substring(r,r+o),10);i>0;i--)n.pop();r+=o}else n.push(t[r]),r++}return e}var mt={defaultProtocol:"http",events:null,format:Bn,formatHref:Bn,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ne(t,e=null){let n=Object.assign({},mt);t&&(n=Object.assign(n,t instanceof Ne?t.o:t));let r=n.ignoreTags,s=[];for(let o=0;on?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=mt.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),o=this.toFormattedString(t),i={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),p=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return i.href=r,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),p&&Object.assign(i,p),{tagName:s,attributes:i,content:o,eventListeners:d}}};function te(t,e){class n extends Gn{constructor(s,o){super(s,o),this.t=t}}for(let r in e)n.prototype[r]=e[r];return n.t=t,n}var Fr=te("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),jn=te("text"),$r=te("nl"),wt=te("url",{isLink:!0,toHref(t=mt.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==ft&&t[1].t===X}});var H=t=>new x(t);function Gr({groups:t}){let e=t.domain.concat([_t,Wt,V,Ft,$t,Gt,Vt,Qt,P,Re,dt,qt,Jt,Yt,U,Zt,ht,Xt]),n=[Kt,X,Se,j,Oe,dt,pt,He,Pe,St,Ot,ut,ct,xt,Mt,Rt,It,Ht,Pt,Nt,Dt,Bt,jt,Ut,zt],r=[_t,Kt,Wt,Ft,$t,Gt,Vt,Qt,P,ut,ct,dt,qt,Jt,Yt,pt,U,Zt,ht,Xt],s=H(),o=u(s,ht);m(o,r,o),m(o,t.domain,o);let i=H(),a=H(),l=H();m(s,t.domain,i),m(s,t.scheme,a),m(s,t.slashscheme,l),m(i,r,o),m(i,t.domain,i);let c=u(i,V);u(o,V,c),u(a,V,c),u(l,V,c);let p=u(o,j);m(p,r,o),m(p,t.domain,o);let d=H();m(c,t.domain,d),m(d,t.domain,d);let h=u(d,j);m(h,t.domain,d);let f=H(Fr);m(h,t.tld,f),m(h,t.utld,f),u(c,ft,f);let A=u(d,P);u(A,P,A),m(A,t.domain,d),m(f,t.domain,d),u(f,j,h),u(f,P,A);let k=u(i,P),b=u(i,j);u(k,P,k),m(k,t.domain,i),m(b,r,o),m(b,t.domain,i);let g=H(wt);m(b,t.tld,g),m(b,t.utld,g),m(g,t.domain,i),m(g,r,o),u(g,j,b),u(g,P,k),u(g,V,c);let z=u(g,X),Ue=H(wt);m(z,t.numeric,Ue);let w=H(wt),rt=H();m(w,e,w),m(w,n,rt),m(rt,e,w),m(rt,n,rt),u(g,U,w),u(Ue,U,w);let ne=u(a,X),er=u(l,X),nr=u(er,U),re=u(nr,U);m(a,t.domain,i),u(a,j,b),u(a,P,k),m(l,t.domain,i),u(l,j,b),u(l,P,k),m(ne,t.domain,w),u(ne,U,w),u(ne,pt,w),m(re,t.domain,w),m(re,e,w),u(re,U,w);let ze=[[ut,ct],[Mt,xt],[Rt,It],[St,Ot],[Ht,Pt],[Nt,Dt],[Bt,jt],[Ut,zt]];for(let se=0;se=0&&h++,s++,p++;if(h<0)s-=p,s0&&(o.push(Ee(jn,e,i)),i=[]),s-=h,p-=h;let f=d.t,A=n.slice(s-p,s);o.push(Ee(f,e,A))}}return i.length>0&&o.push(Ee(jn,e,i)),o}function Ee(t,e,n){let r=n[0].s,s=n[n.length-1].e,o=e.slice(r,s);return new t(o,n)}var Qr=typeof console<"u"&&console&&console.warn||(()=>{}),qr="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",E={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Vn(){return x.groups={},E.scanner=null,E.parser=null,E.tokenQueue=[],E.pluginQueue=[],E.customSchemes=[],E.initialized=!1,E}function De(t,e=!1){if(E.initialized&&Qr(`linkifyjs: already initialized - will not register custom scheme "${t}" ${qr}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. +\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:wt,{state:r}=e,{selection:s}=r,{$from:o,empty:i}=s;if(o.parent.type!==this.type)return!1;let a=" ".repeat(n);return i?e.commands.insertContent(a):e.commands.command(({tr:l})=>{let{from:c,to:d}=s,f=r.doc.textBetween(c,d,` +`,` +`).split(` +`).map(g=>a+g).join(` +`);return l.replaceWith(c,d,r.schema.text(f)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:wt,{state:r}=e,{selection:s}=r,{$from:o,empty:i}=s;return o.parent.type!==this.type?!1:i?e.commands.command(({tr:a})=>{var l;let{pos:c}=o,d=o.start(),u=o.end(),f=r.doc.textBetween(d,u,` +`,` +`).split(` +`),g=0,m=0,k=c-d;for(let O=0;O=k){g=O;break}m+=f[O].length+1}let x=((l=f[g].match(/^ */))==null?void 0:l[0])||"",Z=Math.min(x.length,n);if(Z===0)return!0;let E=d;for(let O=0;O{let{from:l,to:c}=s,p=r.doc.textBetween(l,c,` +`,` +`).split(` +`).map(f=>{var g;let m=((g=f.match(/^ */))==null?void 0:g[0])||"",k=Math.min(m.length,n);return f.slice(k)}).join(` +`);return a.replaceWith(l,c,r.schema.text(p)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(` + +`);return!o||!i?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type||r.parentOffset!==0)return!1;let o=r.before();return o>0?!1:e.commands.insertDefaultBlock({pos:o})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:s,empty:o}=n;if(!o||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;let a=s.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:c})=>(c.setSelection(ee.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[pe({find:cs,type:this.type,getAttributes:e=>({language:e[1]})}),pe({find:ds,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new A({key:new M("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,o=s?.mode;if(!n||!o)return!1;let{tr:i,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,` +`));return i.replaceSelectionWith(this.type.create({language:o},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(H.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}});var Kn=L.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` + +`):""});var Fn=L.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",b(this.options.HTMLAttributes,e)]},renderText(){return` +`},renderMarkdown:()=>` +`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:s,storedMarks:o}=n;if(s.$from.parent.type.spec.isolating)return!1;let{keepMarks:i}=this.options,{splittableMarks:a}=r.extensionManager,l=o||s.$to.parentOffset&&s.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&i){let u=l.filter(p=>a.includes(p.type.name));c.ensureMarks(u)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var Wn=L.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,b(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,s="#".repeat(r);return e.content?`${s} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>pe({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var Gn=L.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",b(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!On(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,s=e();return Ie(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:o,tr:i,dispatch:a})=>{if(a){let{$to:l}=i.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection(H.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection(ce.create(i.doc,l.pos)):i.setSelection(H.create(i.doc,l.pos));else{let d=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,u=d?.create();u&&(i.insert(c,u),i.setSelection(H.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Bn({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var ps=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,fs=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,hs=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,ms=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Vn=_.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",b(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[D({find:ps,type:this.type}),D({find:hs,type:this.type})]},addPasteRules(){return[P({find:fs,type:this.type}),P({find:ms,type:this.type})]}});var gs="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",ks="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Ot="numeric",Ht="ascii",_t="alpha",me="asciinumeric",he="alphanumeric",Dt="domain",Zn="emoji",ys="scheme",vs="slashscheme",Mt="whitespace";function bs(e,t){return e in t||(t[e]=[]),t[e]}function te(e,t,n){t[Ot]&&(t[me]=!0,t[he]=!0),t[Ht]&&(t[me]=!0,t[_t]=!0),t[me]&&(t[he]=!0),t[_t]&&(t[he]=!0),t[he]&&(t[Dt]=!0),t[Zn]&&(t[Dt]=!0);for(let r in t){let s=bs(r,n);s.indexOf(e)<0&&s.push(e)}}function As(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function N(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}N.groups={};N.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,s),w=(e,t,n,r,s)=>e.tr(t,n,r,s),qn=(e,t,n,r,s)=>e.ts(t,n,r,s),h=(e,t,n,r,s)=>e.tt(t,n,r,s),V="WORD",Bt="UWORD",er="ASCIINUMERICAL",tr="ALPHANUMERICAL",Ae="LOCALHOST",$t="TLD",zt="UTLD",Oe="SCHEME",le="SLASH_SCHEME",Ut="NUM",jt="WS",Kt="NL",ge="OPENBRACE",ke="CLOSEBRACE",He="OPENBRACKET",_e="CLOSEBRACKET",De="OPENPAREN",Be="CLOSEPAREN",$e="OPENANGLEBRACKET",ze="CLOSEANGLEBRACKET",je="FULLWIDTHLEFTPAREN",Ue="FULLWIDTHRIGHTPAREN",Ke="LEFTCORNERBRACKET",Fe="RIGHTCORNERBRACKET",We="LEFTWHITECORNERBRACKET",Ge="RIGHTWHITECORNERBRACKET",Ve="FULLWIDTHLESSTHAN",qe="FULLWIDTHGREATERTHAN",Qe="AMPERSAND",Je="APOSTROPHE",Xe="ASTERISK",Y="AT",Ye="BACKSLASH",Ze="BACKTICK",et="CARET",ne="COLON",Ft="COMMA",tt="DOLLAR",j="DOT",nt="EQUALS",Wt="EXCLAMATION",$="HYPHEN",ye="PERCENT",rt="PIPE",st="PLUS",ot="POUND",ve="QUERY",Gt="QUOTE",nr="FULLWIDTHMIDDLEDOT",Vt="SEMI",U="SLASH",be="TILDE",it="UNDERSCORE",rr="EMOJI",at="SYM",sr=Object.freeze({__proto__:null,ALPHANUMERICAL:tr,AMPERSAND:Qe,APOSTROPHE:Je,ASCIINUMERICAL:er,ASTERISK:Xe,AT:Y,BACKSLASH:Ye,BACKTICK:Ze,CARET:et,CLOSEANGLEBRACKET:ze,CLOSEBRACE:ke,CLOSEBRACKET:_e,CLOSEPAREN:Be,COLON:ne,COMMA:Ft,DOLLAR:tt,DOT:j,EMOJI:rr,EQUALS:nt,EXCLAMATION:Wt,FULLWIDTHGREATERTHAN:qe,FULLWIDTHLEFTPAREN:je,FULLWIDTHLESSTHAN:Ve,FULLWIDTHMIDDLEDOT:nr,FULLWIDTHRIGHTPAREN:Ue,HYPHEN:$,LEFTCORNERBRACKET:Ke,LEFTWHITECORNERBRACKET:We,LOCALHOST:Ae,NL:Kt,NUM:Ut,OPENANGLEBRACKET:$e,OPENBRACE:ge,OPENBRACKET:He,OPENPAREN:De,PERCENT:ye,PIPE:rt,PLUS:st,POUND:ot,QUERY:ve,QUOTE:Gt,RIGHTCORNERBRACKET:Fe,RIGHTWHITECORNERBRACKET:Ge,SCHEME:Oe,SEMI:Vt,SLASH:U,SLASH_SCHEME:le,SYM:at,TILDE:be,TLD:$t,UNDERSCORE:it,UTLD:zt,UWORD:Bt,WORD:V,WS:jt}),W=/[a-z]/,fe=/\p{L}/u,It=/\p{Emoji}/u;var G=/\d/,Rt=/\s/;var Qn="\r",St=` +`,Ls="\uFE0F",Ts="\u200D",Pt="\uFFFC",Se=null,Pe=null;function Es(e=[]){let t={};N.groups=t;let n=new N;Se==null&&(Se=Jn(gs)),Pe==null&&(Pe=Jn(ks)),h(n,"'",Je),h(n,"{",ge),h(n,"}",ke),h(n,"[",He),h(n,"]",_e),h(n,"(",De),h(n,")",Be),h(n,"<",$e),h(n,">",ze),h(n,"\uFF08",je),h(n,"\uFF09",Ue),h(n,"\u300C",Ke),h(n,"\u300D",Fe),h(n,"\u300E",We),h(n,"\u300F",Ge),h(n,"\uFF1C",Ve),h(n,"\uFF1E",qe),h(n,"&",Qe),h(n,"*",Xe),h(n,"@",Y),h(n,"`",Ze),h(n,"^",et),h(n,":",ne),h(n,",",Ft),h(n,"$",tt),h(n,".",j),h(n,"=",nt),h(n,"!",Wt),h(n,"-",$),h(n,"%",ye),h(n,"|",rt),h(n,"+",st),h(n,"#",ot),h(n,"?",ve),h(n,'"',Gt),h(n,"/",U),h(n,";",Vt),h(n,"~",be),h(n,"_",it),h(n,"\\",Ye),h(n,"\u30FB",nr);let r=w(n,G,Ut,{[Ot]:!0});w(r,G,r);let s=w(r,W,er,{[me]:!0}),o=w(r,fe,tr,{[he]:!0}),i=w(n,W,V,{[Ht]:!0});w(i,G,s),w(i,W,i),w(s,G,s),w(s,W,s);let a=w(n,fe,Bt,{[_t]:!0});w(a,W),w(a,G,o),w(a,fe,a),w(o,G,o),w(o,W),w(o,fe,o);let l=h(n,St,Kt,{[Mt]:!0}),c=h(n,Qn,jt,{[Mt]:!0}),d=w(n,Rt,jt,{[Mt]:!0});h(n,Pt,d),h(c,St,l),h(c,Pt,d),w(c,Rt,d),h(d,Qn),h(d,St),w(d,Rt,d),h(d,Pt,d);let u=w(n,It,rr,{[Zn]:!0});h(u,"#"),w(u,It,u),h(u,Ls,u);let p=h(u,Ts);h(p,"#"),w(p,It,u);let f=[[W,i],[G,s]],g=[[W,null],[fe,a],[G,o]];for(let m=0;mm[0]>k[0]?1:-1);for(let m=0;m=0?x[Dt]=!0:W.test(k)?G.test(k)?x[me]=!0:x[Ht]=!0:x[Ot]=!0,qn(n,k,k,x)}return qn(n,"localhost",Ae,{ascii:!0}),n.jd=new N(at),{start:n,tokens:Object.assign({groups:t},sr)}}function or(e,t){let n=Cs(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[],o=0,i=0;for(;i=0&&(u+=n[i].length,p++),c+=n[i].length,o+=n[i].length,i++;o-=u,i-=p,c-=u,s.push({t:d.t,v:t.slice(o-c,o),s:o-c,e:o})}return s}function Cs(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}function X(e,t,n,r,s){let o,i=t.length;for(let a=0;a=0;)o++;if(o>0){t.push(n.join(""));for(let i=parseInt(e.substring(r,r+o),10);i>0;i--)n.pop();r+=o}else n.push(e[r]),r++}return t}var Le={defaultProtocol:"http",events:null,format:Xn,formatHref:Xn,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function qt(e,t=null){let n=Object.assign({},Le);e&&(n=Object.assign(n,e instanceof qt?e.o:e));let r=n.ignoreTags,s=[];for(let o=0;on?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Le.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),s=e.get("tagName",n,t),o=this.toFormattedString(e),i={},a=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),d=e.getObj("attributes",n,t),u=e.getObj("events",n,t);return i.href=r,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),d&&Object.assign(i,d),{tagName:s,attributes:i,content:o,eventListeners:u}}};function lt(e,t){class n extends ir{constructor(s,o){super(s,o),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var xs=lt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Yn=lt("text"),ws=lt("nl"),Ne=lt("url",{isLink:!0,toHref(e=Le.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ae&&e[1].t===ne}});var B=e=>new N(e);function Ms({groups:e}){let t=e.domain.concat([Qe,Xe,Y,Ye,Ze,et,tt,nt,$,Ut,ye,rt,st,ot,U,at,be,it]),n=[Je,ne,Ft,j,Wt,ye,ve,Gt,Vt,$e,ze,ge,ke,_e,He,De,Be,je,Ue,Ke,Fe,We,Ge,Ve,qe],r=[Qe,Je,Xe,Ye,Ze,et,tt,nt,$,ge,ke,ye,rt,st,ot,ve,U,at,be,it],s=B(),o=h(s,be);v(o,r,o),v(o,e.domain,o);let i=B(),a=B(),l=B();v(s,e.domain,i),v(s,e.scheme,a),v(s,e.slashscheme,l),v(i,r,o),v(i,e.domain,i);let c=h(i,Y);h(o,Y,c),h(a,Y,c),h(l,Y,c);let d=h(o,j);v(d,r,o),v(d,e.domain,o);let u=B();v(c,e.domain,u),v(u,e.domain,u);let p=h(u,j);v(p,e.domain,u);let f=B(xs);v(p,e.tld,f),v(p,e.utld,f),h(c,Ae,f);let g=h(u,$);h(g,$,g),v(g,e.domain,u),v(f,e.domain,u),h(f,j,p),h(f,$,g);let m=h(i,$),k=h(i,j);h(m,$,m),v(m,e.domain,i),v(k,r,o),v(k,e.domain,i);let y=B(Ne);v(k,e.tld,y),v(k,e.utld,y),v(y,e.domain,i),v(y,r,o),h(y,j,k),h(y,$,m),h(y,Y,c);let x=h(y,ne),Z=B(Ne);v(x,e.numeric,Z);let E=B(Ne),Q=B();v(E,t,E),v(E,n,Q),v(Q,t,E),v(Q,n,Q),h(y,U,E),h(Z,U,E);let O=h(a,ne),es=h(l,ne),ts=h(es,U),At=h(ts,U);v(a,e.domain,i),h(a,j,k),h(a,$,m),v(l,e.domain,i),h(l,j,k),h(l,$,m),v(O,e.domain,E),h(O,U,E),h(O,ve,E),v(At,e.domain,E),v(At,t,E),h(At,U,E);let vn=[[ge,ke],[He,_e],[De,Be],[$e,ze],[je,Ue],[Ke,Fe],[We,Ge],[Ve,qe]];for(let Lt=0;Lt=0&&p++,s++,d++;if(p<0)s-=d,s0&&(o.push(Nt(Yn,t,i)),i=[]),s-=p,d-=p;let f=u.t,g=n.slice(s-d,s);o.push(Nt(f,t,g))}}return i.length>0&&o.push(Nt(Yn,t,i)),o}function Nt(e,t,n){let r=n[0].s,s=n[n.length-1].e,o=t.slice(r,s);return new e(o,n)}var Rs=typeof console<"u"&&console&&console.warn||(()=>{}),Ss="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",T={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ar(){return N.groups={},T.scanner=null,T.parser=null,T.tokenQueue=[],T.pluginQueue=[],T.customSchemes=[],T.initialized=!1,T}function Qt(e,t=!1){if(T.initialized&&Rs(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Ss}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);E.customSchemes.push([t,e])}function Jr(){E.scanner=Kr(E.customSchemes);for(let t=0;t{let s=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!s||o)return;let{tr:i}=r,a=Ve(n.doc,[...e]);if(Je(a).forEach(({newRange:c})=>{let p=Qe(r.doc,c,f=>f.isTextblock),d,h;if(p.length>1)d=p[0],h=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(p.length){let f=r.doc.textBetween(c.from,c.to," "," ");if(!Xr.test(f))return;d=p[0],h=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&h){let f=h.split(Yr).filter(Boolean);if(f.length<=0)return!1;let A=f[f.length-1],k=d.pos+h.lastIndexOf(A);if(!A)return!1;let b=ee(A).map(g=>g.toObject(t.defaultProtocol));if(!ts(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:k+g.start+1,to:k+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>t.validate(g.value)).filter(g=>t.shouldAutoLink(g.value)).forEach(g=>{Ye(g.from,g.to,r.doc).some(z=>z.mark.type===t.type)||i.addMark(g.from,g.to,t.type.create({href:g.href}))})}}),!!i.steps.length)return i}})}function ns(t){return new v({key:new R("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,o;if(r.button!==0||!e.editable)return!1;let i=r.target,a=[];for(;i.nodeName!=="DIV";)a.push(i),i=i.parentNode;if(!a.find(h=>h.nodeName==="A"))return!1;let l=qe(e.state,t.type.name),c=r.target,p=(s=c?.href)!==null&&s!==void 0?s:l.href,d=(o=c?.target)!==null&&o!==void 0?o:l.target;return c&&p?(window.open(p,d),!0):!1}}})}function rs(t){return new v({key:new R("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{state:s}=e,{selection:o}=s,{empty:i}=o;if(i)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});let l=Be(a,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!l?!1:t.editor.commands.setMark(t.type,{href:l.href})}}})}function Z(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(Zr,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Qn=I.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){De(t);return}De(t.scheme,t.optionalSlashes)})},onDestroy(){Vn()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Z(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Z(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Z(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",y(this.options.HTMLAttributes,t),0]:["a",y(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Z(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{let{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Z(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[O({find:t=>{let e=[];if(t){let{protocols:n,defaultProtocol:r}=this.options,s=Be(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:i=>!!Z(i,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(o=>e.push({text:o.value,data:{href:o.href},index:o.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){let t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(es({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!Z(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(ns({type:this.type})),this.options.linkOnPaste&&t.push(rs({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}});var qn=I.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",y(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});var Jn=S.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new v({key:new R("placeholder"),props:{decorations:({doc:t,selection:e})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,s=[];if(!n)return null;let o=this.editor.isEmpty;return t.descendants((i,a)=>{let l=r>=a&&r<=a+i.nodeSize,c=!i.isLeaf&&Xe(i);if((l||!this.options.showOnlyCurrent)&&c){let p=[this.options.emptyNodeClass];o&&p.push(this.options.emptyEditorClass);let d=yt.node(a,a+i.nodeSize,{class:p.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:i,pos:a,hasAnchor:l}):this.options.placeholder});s.push(d)}return this.options.includeChildren}),kt.create(t,s)}}})]}});var Yn=S.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{let e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){let r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{let e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new v({key:new R("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;let s=this.options.limit;if(s==null||s===0){t=!0;return}let o=this.storage.characters({node:r.doc});if(o>s){let i=o-s,a=0,l=i;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);let c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{let r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;let s=this.storage.characters({node:n.doc}),o=this.storage.characters({node:e.doc});if(o<=r||s>r&&o>r&&o<=s)return!0;if(s>r&&o>r&&o>s||!e.getMeta("paste"))return!1;let a=e.selection.$head.pos,l=o-r,c=a-l,p=a;return e.deleteRange(c,p),!(this.storage.characters({node:e.doc})>r)}})]}});var ss=(t={})=>{let e=null,n=null,r=()=>t.outputFormat==="json"?JSON.stringify(e.getJSON()):e.getHTML();return{updatedAt:Date.now(),characterCount:0,init(){let s=this.$refs.editorContent;s.querySelector(".ProseMirror")?.remove();let o=this.$wire.get(t.wireAttribute)??"",i=t.outputFormat==="json"?Xn(o):o||"";e=new tn({element:s,extensions:os(t),content:i,editable:!t.disabled&&!t.readOnly,onCreate:({editor:a})=>{t.maxLength&&(this.characterCount=a.storage.characterCount?.characters()??0)},onUpdate:({editor:a})=>{this.updatedAt=Date.now();let l=t.outputFormat==="json"?JSON.stringify(a.getJSON()):a.getHTML();n=l,this.$refs.hiddenInput.value=l,this.$refs.hiddenInput.dispatchEvent(new Event("input",{bubbles:!0})),t.maxLength&&(this.characterCount=a.storage.characterCount?.characters()??0)},onSelectionUpdate:()=>{this.updatedAt=Date.now()},onFocus:()=>{this.updatedAt=Date.now()},onBlur:()=>{this.updatedAt=Date.now()}}),this.$wire.$watch(t.wireAttribute,a=>{!e||e.isFocused||a!==n&&a!==r()&&e.commands.setContent(t.outputFormat==="json"?Xn(a):a||"",!1)})},destroy(){e?.destroy(),e=null},isActive(s,o={}){return this.updatedAt,e?e.isActive(s,o):!1},toggleBold(){e?.chain().focus().toggleBold().run()},toggleItalic(){e?.chain().focus().toggleItalic().run()},toggleUnderline(){e?.chain().focus().toggleUnderline().run()},toggleStrike(){e?.chain().focus().toggleStrike().run()},toggleCode(){e?.chain().focus().toggleCode().run()},toggleHighlight(){e?.chain().focus().toggleHighlight().run()},toggleBulletList(){e?.chain().focus().toggleBulletList().run()},toggleOrderedList(){e?.chain().focus().toggleOrderedList().run()},toggleBlockquote(){e?.chain().focus().toggleBlockquote().run()},toggleCodeBlock(){e?.chain().focus().toggleCodeBlock().run()},setHeading(s){e?.chain().focus().toggleHeading({level:s}).run()},setAlign(s){e?.chain().focus().setTextAlign(s).run()},undo(){e?.chain().focus().undo().run()},redo(){e?.chain().focus().redo().run()},insertLink(){let s=e?.getAttributes("link").href??"",o=prompt("URL",s||"https://");o!==null&&(o===""?e?.chain().focus().unsetLink().run():e?.chain().focus().extendMarkRange("link").setLink({href:o,target:"_blank"}).run())},insertImage(){let s=prompt("Image URL");s&&e?.chain().focus().setImage({src:s}).run()},insertTable(){e?.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},addColumnBefore(){e?.chain().focus().addColumnBefore().run()},addColumnAfter(){e?.chain().focus().addColumnAfter().run()},deleteColumn(){e?.chain().focus().deleteColumn().run()},addRowBefore(){e?.chain().focus().addRowBefore().run()},addRowAfter(){e?.chain().focus().addRowAfter().run()},deleteRow(){e?.chain().focus().deleteRow().run()},deleteTable(){e?.chain().focus().deleteTable().run()}}};function os(t){let e=[Hn.configure({heading:{levels:[1,2,3]}}),Qn.configure({openOnClick:!1,HTMLAttributes:{class:"text-primary-600 underline cursor-pointer"}}),qn,Jn.configure({placeholder:t.placeholder??""})],n=window.WireTiptapAddons??{};return t.withTextAlign&&n.TextAlign&&e.push(n.TextAlign.configure({types:["heading","paragraph"]})),t.withHighlight&&n.Highlight&&e.push(n.Highlight),t.withImages&&n.Image&&e.push(n.Image.configure({inline:!1})),t.withTables&&n.Table&&e.push(n.Table.configure({resizable:!0}),n.TableRow,n.TableHeader,n.TableCell),t.maxLength&&e.push(Yn.configure({limit:t.maxLength})),e}function Xn(t){if(!t)return{};try{return JSON.parse(t)}catch{return{}}}var Zn=!1;function tr(){Zn||!window.Alpine||(Zn=!0,window.Alpine.data("tiptapEditor",ss))}window.Alpine?tr():document.addEventListener("alpine:init",tr); +3. "-" cannot repeat`);T.customSchemes.push([e,t])}function Ps(){T.scanner=Es(T.customSchemes);for(let e=0;e{let s=t.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=t.some(c=>c.getMeta("preventAutolink"));if(!s||o)return;let{tr:i}=r,a=En(n.doc,[...t]);if(Me(a).forEach(({newRange:c})=>{let d=Cn(r.doc,c,f=>f.isTextblock),u,p;if(d.length>1)u=d[0],p=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){let f=r.doc.textBetween(c.from,c.to," "," ");if(!Os.test(f))return;u=d[0],p=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&p){let f=p.split(Ns).filter(Boolean);if(f.length<=0)return!1;let g=f[f.length-1],m=u.pos+p.lastIndexOf(g);if(!g)return!1;let k=ut(g).map(y=>y.toObject(e.defaultProtocol));if(!_s(k))return!1;k.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{Rn(y.from,y.to,r.doc).some(x=>x.mark.type===e.type)||i.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!i.steps.length)return i}})}function Bs(e){return new A({key:new M("handleClickLink"),props:{handleClick:(t,n,r)=>{var s,o;if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let l=r.target;if(!l)return!1;let c=e.editor.view.dom;i=l.closest("a"),i&&!c.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let l=In(t.state,e.type.name),c=(s=i.href)!=null?s:l.href,d=(o=i.target)!=null?o:l.target;c&&(window.open(c,d),a=!0)}return a}}})}var $s=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,zs=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function lr(e,t){let n=0;for(let r=t-1;r>=0&&e[r]==="\\";r-=1)n+=1;return n%2===1}function js(e,t){let n=0,r=0;for(;r0}function ur(e,t,n){var r,s;let[,o,i]=t;return(t.index?e[t.index-1]:void 0)==="!"||lr(e,(r=t.index)!=null?r:0)||js(e,(s=t.index)!=null?s:0)?!1:!!o.trim()&&n(i)}function cr(e){var t,n;let[r,s,o,,i,a,l]=e,c=(t=i??a)!=null?t:l;return{index:(n=e.index)!=null?n:0,text:r,replaceWith:s,data:{href:o,title:c||null,markdown:!0}}}function Us(e,t){return e.index{let r=$s.exec(n);return!r||!ur(n,r,e.isAllowedHref)?null:cr(r)},type:e.type,getAttributes:dr});return new Hn({find:t.find,handler:n=>{let r=t.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function Fs(e){let t=P({find:n=>{var r,s;let o=[];for(let a of n.matchAll(zs))ur(n,a,e.isAllowedHref)&&o.push(cr(a));let i=((s=(r=e.findPlainUrls)==null?void 0:r.call(e,n))!=null?s:[]).filter(a=>!o.some(l=>Us(l,a)));return[...o,...i]},type:e.type,getAttributes:dr});return new _n({find:t.find,handler:n=>{var r;let s=t.handler(n);return s!==null&&n.state.tr.steps.length&&((r=n.match.data)!=null&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),s}})}function Ws(e){return new A({key:new M("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:s}=e,{state:o}=t,{selection:i}=o,{empty:a}=i;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});let c=ct(l,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function q(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!e||e.replace(Hs,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var pr=_.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){Qt(e);return}Qt(e.scheme,e.optionalSlashes)})},onDestroy(){ar()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!q(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let s=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!=null?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!=null?t:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!q(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!q(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",b(this.options.HTMLAttributes,e),0]:["a",b(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,s,o;let i=(r=(n=e.attrs)==null?void 0:n.href)!=null?r:"",a=(o=(s=e.attrs)==null?void 0:s.title)!=null?o:"",l=t.renderChildren(e);return a?`[${l}](${i} "${a}")`:`[${l}](${i})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!q(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!q(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[Ks({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:t=>!!q(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=t=>{let n=[];if(t){let{protocols:r,defaultProtocol:s}=this.options;ct(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!q(a,r),protocols:r,defaultProtocol:s})).forEach(i=>{this.options.shouldAutoLink(i.value)&&n.push({text:i.value,data:{href:i.href},index:i.start})})}return n};return this.options.markdownLinks?[Fs({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:n=>!!q(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[P({find:e,type:this.type,getAttributes:t=>{var n;return{href:(n=t.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(Ds({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!q(s,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(Bs({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Ws({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}});var Gs=Object.defineProperty,Vs=(e,t)=>{for(var n in t)Gs(e,n,{get:t[n],enumerable:!0})},qs="listItem",fr="textStyle",hr=/^\s*([-+*])\s$/,en=L.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",b(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(qs,this.editor.getAttributes(fr)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=z({find:hr,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=z({find:hr,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(fr),editor:this.editor})),[e]}}),Qs=(e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:s}=r;if(!s.parent.isTextblock||s.parentOffset!==s.parent.content.size)return null;let o=-1;for(let f=s.depth;f>0;f-=1)if(s.node(f).type.name===t){o=f;break}if(o<0)return null;let i=s.node(o),a=s.index(o);if(a+1>=i.childCount)return null;let l=i.child(a+1);if(!n.includes(l.type.name))return null;let c=e.schema.nodes[t],d=!1;if(l.forEach(f=>{f.type===c&&f.childCount>1&&(d=!0)}),!d)return null;let u=e.doc.resolve(s.after()).nodeAfter;if(!u||!n.includes(u.type.name))return null;let p=[];return u.forEach(f=>{p.push(f)}),p.length===0?null:{listItemDepth:o,nestedList:u,nestedListPos:s.after(),insertPos:s.after(o),items:p}},Js=(e,t,n,r)=>{let s=Qs(e,n,r);if(!s)return!1;let{selection:o}=e,{nestedList:i,nestedListPos:a,insertPos:l,items:c}=s,d=e.tr;d.delete(a,a+i.nodeSize);let u=d.mapping.map(l);return d.insert(u,ue.from(c)),d.setSelection(o.map(d.doc,d.mapping)),t&&t(d),!0},Xs=(e,t,n)=>Js(e.state,e.view.dispatch,t,n),yr=(e,t)=>C.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>Xs(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),vr=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],dt="abcdefghijklmnopqrstuvwxyz",Ys="[a-zA-Z]{1,2}",br=String.raw`\d+|[ivxlcdmIVXLCDM]+|${Ys}`;function ft(e){let t=e,n="";for(let[r,s]of vr)for(;t>=r;)n+=s,t-=r;return n}function tn(e){return ft(e).toUpperCase()}function Ar(e){let t=e.toLowerCase(),n=0,r=0;for(;n0?r:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function to(e,t){if(e==="numeric")return String(t);switch(e){case"a":return pt(t);case"A":return pt(t).toUpperCase();case"i":return ft(t);case"I":return tn(t);default:return String(t)}}function no(e){var t;if(e.length===0)return!1;let n=(t=ht(e[0]))!=null?t:"numeric",r=nn(e[0]);if(r<1)return!1;for(let s=0;s{var n;if(e.type!=="list_item")return[];let r=(n=t.parseBlockChildren)!=null?n:t.parseChildren,s=[];if(e.tokens&&e.tokens.length>0){if(io(e))return{type:"listItem",content:[{type:"paragraph",content:ao(e.text||"",t)}]};if(e.tokens.some(i=>i.type==="paragraph"))s=r(e.tokens);else{let i=e.tokens[0];if(i&&i.type==="text"&&i.tokens&&i.tokens.length>0){if(s=[{type:"paragraph",content:t.parseInline(i.tokens)}],e.tokens.length>1){let l=e.tokens.slice(1),c=r(l);s.push(...c)}}else s=r(e.tokens)}}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(e,t,n)=>Re(e,t,r=>{var s,o,i,a;if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){let l=((o=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:o.start)||1,c=(a=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:a.type,d=l-1+(r.index||0);return oo(c,d,". ")}return"- "},n),addExtensions(){return[yr(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),lo={};Vs(lo,{findListItemPos:()=>mt,getNextListDepth:()=>sn,handleBackspace:()=>Xt,handleDelete:()=>Yt,hasListBefore:()=>Lr,hasListItemAfter:()=>uo,hasListItemBefore:()=>co,listItemHasSubList:()=>po,nextListIsDeeper:()=>Tr,nextListIsHigher:()=>Er});var mt=(e,t)=>{let{$from:n}=t.selection,r=we(e,t.schema),s=null,o=n.depth,i=n.pos,a=null;for(;o>0&&a===null;)s=n.node(o),s.type===r?a=o:(o-=1,i-=1);return a===null?null:{$pos:t.doc.resolve(i),depth:a}},sn=(e,t)=>{let n=mt(e,t);if(!n)return!1;let[,r]=Sn(t,e,n.$pos.pos+4);return r},Lr=(e,t,n)=>{let{$anchor:r}=e.selection,s=Math.max(0,r.pos-2),o=e.doc.resolve(s).node();return!(!o||!n.includes(o.type.name))},Xt=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!de(e.state,t)&&Lr(e.state,t,n)){let{$anchor:r}=e.state.selection,s=e.state.doc.resolve(r.before()-1),o=[];s.node().descendants((l,c)=>{l.type.name===t&&o.push({node:l,pos:c})});let i=o.at(-1);if(!i)return!1;let a=e.state.doc.resolve(s.start()+i.pos+1);return e.chain().cut({from:r.start()-1,to:r.end()+1},a.end()).joinForward().run()}return!de(e.state,t)||!Nn(e.state)?!1:e.chain().liftListItem(t).run()},Tr=(e,t)=>{let n=sn(e,t),r=mt(e,t);return!r||!n?!1:n>r.depth},Er=(e,t)=>{let n=sn(e,t),r=mt(e,t);return!r||!n?!1:n{if(!de(e.state,t)||!Pn(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:Tr(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():Er(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},uo=(e,t)=>{var n;let{$anchor:r}=t.selection,s=t.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==e)},co=(e,t)=>{var n;let{$anchor:r}=t.selection,s=t.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==e)},po=(e,t,n)=>{if(!n)return!1;let r=we(e,t.schema),s=!1;return n.descendants(o=>{o.type===r&&(s=!0)}),s},on=C.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&Yt(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&Yt(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&Xt(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&Xt(e,n,r)&&(t=!0)}),t}}}}),Zt=new RegExp(`^(\\s*)(${br})([.)])\\s+(.*)$`),fo=/^\s/,Te={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function ho(e){return Zt.test(e.trimStart())}function mo(e){let t=e.trimStart();return Te.bulletItem.test(t)||ho(t)||Te.heading.test(t)||Te.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||Te.codeFence.test(t)}function go(e){return Object.values(Te).some(t=>t.test(e))}function ko(e){let t=[],n=[],r=!1;return e.forEach(s=>{if(r){n.push(s);return}if(s.trim()===""){r=!0,n.push(s);return}if(t.length>0&&mo(s)){r=!0,n.push(s);return}t.push(s)}),{paragraphLines:t,blockLines:n}}function yo(e){let t=[],n=0,r=0;for(;no.trim().length>0);if(t.length===0)return null;let n=[];for(let o of t){let i=o.trim().match(vo);if(!i)return null;n.push({marker:i[1],content:i[3]})}let r=n.map(o=>o.marker);return no(r)?{type:"orderedList",attrs:so(n[0].marker),content:n.map(o=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:o.content}]}]}))}:null}function Cr(e,t,n){let r=[],s=0;for(;st;)p.push(e[u]),u+=1;if(p.length>0){let f=Math.min(...p.map(m=>m.indent)),g=Cr(p,f,n);c.push({type:"list",ordered:!0,start:p[0].number,typeMarker:p[0].type,items:g,raw:p.map(m=>m.raw).join(` +`)})}r.push({type:"list_item",raw:o.raw,tokens:c}),s=u}else s+=1}return r}function Ao(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...t.parseChildren([s]));else if(s.type==="text"&&s.tokens){let o=t.parseChildren([s]);r.push({type:"paragraph",content:o})}else{let o=t.parseChildren([s]);o.length>0&&r.push(...o)}}),{type:"listItem",content:r}})}var Lo="listItem",mr="textStyle",gr=/^(\d+)\.\s$/;function kr(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var an=L.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let s=kr(n);if(s)return s}let r=e.querySelector("li");if(r){let s=r.getAttribute("style");if(s){let o=kr(s);if(o)return o}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...r}=e,s=b(this.options.HTMLAttributes,r);return t!==1&&(s.start=t),n&&n!=="1"&&(s.type=n),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.typeMarker,s=e.items?Ao(e.items,t):[],o={};return n!==1&&(o.start=n),r&&(o.type=r),Object.keys(o).length>0?{type:"orderedList",attrs:o,content:s}:{type:"orderedList",content:s}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var r,s;let o=e.split(` +`),[i,a]=yo(o);if(i.length===0)return;let l=Cr(i,i[0].indent,n);if(l.length===0)return;let c=((r=i[0])==null?void 0:r.number)||1,d=(s=i[0])==null?void 0:s.type;return{type:"list",ordered:!0,start:c,typeMarker:d,items:l,raw:o.slice(0,a).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Lo,this.editor.getAttributes(mr)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new A({props:{handlePaste:(e,t)=>{var n,r;let s=(n=t.clipboardData)==null?void 0:n.getData("text/html");if(s?.trim())return!1;let o=(r=t.clipboardData)==null?void 0:r.getData("text/plain");if(!o)return!1;let i=bo(o);if(!i)return!1;try{let a=e.state.schema.nodeFromJSON(i),l=e.state.tr.replaceSelectionWith(a);return e.dispatch(l),!0}catch{return!1}}}})]},addInputRules(){let e=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1],t=z({find:gr,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=z({find:gr,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(mr)}),joinPredicate:e,editor:this.editor})),[t]}}),To=/^\s*(\[([( |x])?\])\s$/,Eo=L.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",b(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let s=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return Re(e,t,s)},addExtensions(){return this.options.nested?[yr(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let s=document.createElement("li"),o=document.createElement("label"),i=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=u=>{var p,f;a.ariaLabel=((f=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:f.call(p,u,a.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};c(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:p}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let g=n();if(typeof g!="number")return!1;let m=f.doc.nodeAt(g);return f.setNodeMarkup(g,void 0,{...m?.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,p])=>{s.setAttribute(u,p)}),s.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,i),s.append(o,l),Object.entries(t).forEach(([u,p])=>{s.setAttribute(u,p)});let d=new Set(Object.keys(t));return{dom:s,contentDOM:l,update:u=>{if(u.type!==this.type)return!1;s.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,c(u);let p=r.extensionManager.attributes,f=Mn(u,p),g=new Set(Object.keys(f)),m=this.options.HTMLAttributes;return d.forEach(k=>{g.has(k)||(k in m?s.setAttribute(k,m[k]):s.removeAttribute(k))}),Object.entries(f).forEach(([k,y])=>{y==null?k in m?s.setAttribute(k,m[k]):s.removeAttribute(k):s.setAttribute(k,y)}),d=g,!0}}}},addInputRules(){return[z({find:To,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Co=L.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",b(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=o=>{let i=xt(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);if(i){let a={type:"taskList",raw:i.raw,items:i.items},l=o.slice(i.raw.length);return l.trim()?[a,...n.blockTokens(l)]:[a]}return n.blockTokens(o)},s=xt(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,i)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:i}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),ta=C.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(en.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(rn.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(on.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(an.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Eo.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Co.configure(this.options.taskList)),e}});var gt=" ",ln="\xA0",xr=L.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",b(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===gt||n[0].text===gt||n[0].raw===ln||n[0].text===ln)&&r.length===1&&r[0].type==="text"&&(r[0].text===gt||r[0].text===ln)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,s;if(!e)return"";let o=Array.isArray(e.content)?e.content:[];if(o.length===0){let i=Array.isArray((r=n?.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((s=n?.previousNode)==null?void 0:s.type)==="paragraph"&&i.length===0?gt:""}return t.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var xo=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,wo=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,wr=_.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",b(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[D({find:xo,type:this.type})]},addPasteRules(){return[P({find:wo,type:this.type})]}});var Mr=L.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var Ir=_.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",b(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!s)return;let o=s[2].trim();return{type:"underline",raw:s[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Rr(e={}){return new A({view(t){return new un(t,e)}})}var un=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let o=i=>{this[s](i)};return t.dom.addEventListener(s,o),{name:s,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){if(this.cursorPos!=null&&n.doc!=t.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,s=this.editorView.dom,o=s.getBoundingClientRect(),i=o.width/s.offsetWidth,a=o.height/s.offsetHeight;if(n){let u=t.nodeBefore,p=t.nodeAfter;if(u||p){let f=this.editorView.nodeDOM(this.cursorPos-(u?u.nodeSize:0));if(f){let g=f.getBoundingClientRect(),m=u?g.bottom:g.top;u&&p&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*a;r={left:g.left,right:g.right,top:m-k,bottom:m+k}}}}if(!r){let u=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*i;r={left:u.left-p,right:u.left+p,top:u.top,bottom:u.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,d=-pageYOffset;else{let u=l.getBoundingClientRect(),p=u.width/l.offsetWidth,f=u.height/l.offsetHeight;c=u.left-l.scrollLeft*p,d=u.top-l.scrollTop*f}this.element.style.left=(r.left-c)/i+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}computeTarget(t){let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,o=typeof s=="function"?s(this.editorView,n,t):s;if(!n||o)return null;let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Ln(this.editorView.state.doc,i,this.editorView.dragging.slice);a!=null&&(i=a)}return i}dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;let n=this.computeTarget(t);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var R=class e extends ee{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):ee.near(r)}content(){return Et.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new cn(this.anchor)}static valid(t){let n=t.parent;if(n.inlineContent||!Mo(t)||!Io(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(t.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let s=t.pos,o=null;for(let i=t.depth;;i--){let a=t.node(i);if(n>0?t.indexAfter(i)0){o=a.child(n>0?t.indexAfter(i):t.index(i)-1);break}else if(i==0)return null;s+=n;let l=t.doc.resolve(s);if(e.valid(l))return l}for(;;){let i=n>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!ce.isSelectable(o)){t=t.doc.resolve(s+o.nodeSize*n),r=!1;continue e}break}o=i,s+=n;let a=t.doc.resolve(s);if(e.valid(a))return a}return null}}};R.prototype.visible=!1;R.findFrom=R.findGapCursorFrom;ee.jsonID("gapcursor",R);var cn=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return R.valid(n)?new R(n):ee.near(n)}};function Sr(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Mo(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||Sr(s.type))return!0;if(s.inlineContent)return!1}}return!0}function Io(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||Sr(s.type))return!0;if(s.inlineContent)return!1}}return!0}function Pr(){return new A({props:{decorations:No,createSelectionBetween(e,t,n){return t.pos==n.pos&&R.valid(n)?new R(n):null},handleClick:So,handleKeyDown:Ro,handleDOMEvents:{beforeinput:Po}}})}var Ro=Tn({ArrowLeft:kt("horiz",-1),ArrowRight:kt("horiz",1),ArrowUp:kt("vert",-1),ArrowDown:kt("vert",1)});function kt(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,s,o){let i=r.selection,a=t>0?i.$to:i.$from,l=i.empty;if(i instanceof H){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let c=R.findGapCursorFrom(a,t,l);return c?(s&&s(r.tr.setSelection(new R(c))),!0):!1}}function So(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!R.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&ce.isSelectable(e.state.doc.nodeAt(s.inside))?!1:(e.dispatch(e.state.tr.setSelection(new R(r))),!0)}function Po(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof R))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=ue.empty;for(let i=r.length-1;i>=0;i--)s=ue.from(r[i].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new Et(s,0,0));return o.setSelection(H.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function No(e){if(!(e.selection instanceof R))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",S.create(e.doc,[J.widget(e.selection.head,t,{key:"gapcursor"})])}var yt=200,I=function(){};I.prototype.append=function(t){return t.length?(t=I.from(t),!this.length&&t||t.length=n?I.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};I.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};I.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};I.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(o,i){return s.push(t(o,i))},n,r),s};I.from=function(t){return t instanceof I?t:t&&t.length?new Nr(t):I.empty};var Nr=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(s,o){return s==0&&o==this.length?this:new t(this.values.slice(s,o))},t.prototype.getInner=function(s){return this.values[s]},t.prototype.forEachInner=function(s,o,i,a){for(var l=o;l=i;l--)if(s(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(s){if(this.length+s.length<=yt)return new t(this.values.concat(s.flatten()))},t.prototype.leafPrepend=function(s){if(this.length+s.length<=yt)return new t(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(I);I.empty=new Nr([]);var Oo=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,o)-a,i+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,s,o,i){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(o,a)-a,i+a)===!1||o=o?this.right.slice(r-o,s-o):this.left.slice(r,o).append(this.right.slice(0,s-o))},t.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new t(this.left,s)},t.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new t(s,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(I),dn=I;var Ho=500,se=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,o;n&&(s=this.remapping(r,this.items.length),o=s.maps.length);let i=t.tr,a,l,c=[],d=[];return this.items.forEach((u,p)=>{if(!u.step){s||(s=this.remapping(r,p+1),o=s.maps.length),o--,d.push(u);return}if(s){d.push(new K(u.map));let f=u.step.map(s.slice(o)),g;f&&i.maybeStep(f).doc&&(g=i.mapping.maps[i.mapping.maps.length-1],c.push(new K(g,void 0,void 0,c.length+d.length))),o--,g&&s.appendMap(g,o)}else i.maybeStep(u.step);if(u.selection)return a=s?u.selection.map(s.slice(o)):u.selection,l=new e(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:a}}addTransform(t,n,r,s){let o=[],i=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let d=0;dDo&&(a=_o(a,c),i-=c),new e(a.append(o),i)}remapping(t,n){let r=new An;return this.items.forEach((s,o)=>{let i=s.mirrorOffset!=null&&o-s.mirrorOffset>=t?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,i)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new K(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),o=t.mapping,i=t.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},s);let l=n;this.items.forEach(p=>{let f=o.getMirror(--l);if(f==null)return;i=Math.min(i,f);let g=o.maps[f];if(p.step){let m=t.steps[f].invert(t.docs[f]),k=p.selection&&p.selection.map(o.slice(l+1,f));k&&a++,r.push(new K(g,m,k))}else r.push(new K(g))},s);let c=[];for(let p=n;pHo&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,s=[],o=0;return this.items.forEach((i,a)=>{if(a>=t)s.push(i),i.selection&&o++;else if(i.step){let l=i.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let d=i.selection&&i.selection.map(n.slice(r));d&&o++;let u=new K(c.invert(),l,d),p,f=s.length-1;(p=s.length&&s[f].merge(u))?s[f]=p:s.push(u)}}else i.map&&r--},this.items.length,0),new e(dn.from(s.reverse()),o)}};se.empty=new se(dn.empty,0);function _o(e,t){let n;return e.forEach((r,s)=>{if(r.selection&&t--==0)return n=s,!1}),e.slice(n)}var K=class e{constructor(t,n,r,s){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=s}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},F=class{constructor(t,n,r,s,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=o}},Do=20;function Bo(e,t,n,r){let s=n.getMeta(re),o;if(s)return s.historyState;n.getMeta(jo)&&(e=new F(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(re))return i.getMeta(re).redo?new F(e.done.addTransform(n,void 0,r,vt(t)),e.undone,Or(n.mapping.maps),e.prevTime,e.prevComposition):new F(e.done,e.undone.addTransform(n,void 0,r,vt(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!i&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!$o(n,e.prevRanges)),c=i?pn(e.prevRanges,n.mapping):Or(n.mapping.maps);return new F(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,vt(t)),se.empty,c,n.time,a??e.prevComposition)}else return(o=n.getMeta("rebased"))?new F(e.done.rebased(n,o),e.undone.rebased(n,o),pn(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new F(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),pn(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function $o(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,s)=>{for(let o=0;o=t[o]&&(n=!0)}),n}function Or(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,s,o,i)=>t.push(o,i));return t}function pn(e,t){if(!e)return null;let n=[];for(let r=0;r{let s=re.getState(n);if(!s||(e?s.undone:s.done).eventCount==0)return!1;if(r){let o=zo(s,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}var hn=bt(!1,!0),mn=bt(!0,!0),wa=bt(!1,!1),Ma=bt(!0,!1);var kn=C.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new A({key:new M("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let s=this.options.limit,o=this.options.autoTrim;if(s==null||s===0||o===!1){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>s){let a=i-s,l=0,c=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);let d=r.tr.deleteRange(l,c);return e=!0,d}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let s=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=r||s>r&&o>r&&o<=s)return!0;if(s>r&&o>r&&o>s||!t.getMeta("paste"))return!1;let a=t.selection.$head.pos,l=o-r,c=a-l,d=a;return t.deleteRange(c,d),!(this.storage.characters({node:t.doc})>r)}})]}}),$r=C.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Rr(this.options)]}}),$a=C.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new A({key:new M("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:s}=t,o=[];if(!n||!r)return S.create(e,[]);let i=0;this.options.mode==="deepest"&&e.descendants((l,c)=>{if(l.isText)return;if(!(s>=c&&s<=c+l.nodeSize-1))return!1;i+=1});let a=0;return e.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&i-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(J.node(c,c+l.nodeSize,{class:this.options.className}))}),S.create(e,o)}}})]}}),zr=C.create({name:"gapCursor",addProseMirrorPlugins(){return[Pr()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=wn(xn(e,"allowGapCursor",n)))!=null?t:null}}}),jr="placeholder",Dr=new M("tiptap__placeholder");function Ur(e){let{editor:t,placeholder:n,dataAttribute:r,pos:s,node:o,isEmptyDoc:i,hasAnchor:a,classes:{emptyNode:l,emptyEditor:c}}=e,d=[l];return i&&d.push(c),J.node(s,s+o.nodeSize,{class:d.join(" "),[r]:typeof n=="function"?n({editor:t,node:o,pos:s,hasAnchor:a}):n})}function Kr(e,t){return typeof e=="function"?e(t):e}function Fr({editor:e,options:t,dataAttribute:n,doc:r,selection:s,from:o,to:i}){let{anchor:a}=s,l=[],c=e.isEmpty;return r.nodesBetween(o,i,(d,u)=>{let p=a>=u&&a<=u+d.nodeSize,f=!d.isLeaf&&Ct(d);return d.type.isTextblock&&(p||!t.showOnlyCurrent)&&f&&l.push(Ur({editor:e,isEmptyDoc:c,dataAttribute:n,hasAnchor:p,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:Kr(t.emptyNodeClass,{editor:e,node:d,pos:u,hasAnchor:p})},node:d,pos:u})),t.includeChildren}),l}function Wr({editor:e,options:t,dataAttribute:n,doc:r,selection:s}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:i}=s,a=[],l=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let d=r.resolve(i),u=d.depth>0?d.node(1):d.nodeAfter,p=d.depth>0?d.before(1):i;if(u&&u.type.isTextblock&&Ct(u)){let f=i>=p&&i<=p+u.nodeSize;a.push(Ur({editor:e,isEmptyDoc:l,dataAttribute:n,hasAnchor:f,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:Kr(t.emptyNodeClass,{editor:e,node:u,pos:p,hasAnchor:f})},node:u,pos:p}))}}else a.push(...Fr({editor:e,options:t,dataAttribute:n,doc:r,selection:s,from:0,to:r.content.size}));return S.create(r,a)}function Ee(e,t){var n;let r=e.resolve(t);if(r.depth===0){let i=(n=r.nodeAfter)!=null?n:r.nodeBefore;if(!i)return{from:t,to:t};let a=r.nodeAfter?t:t-i.nodeSize;return{from:a,to:a+i.nodeSize}}let s=r.before(1),o=r.node(1);return{from:s,to:s+o.nodeSize}}function Ce(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function Uo(e,t,n){let r=[];return e.forEach((s,o)=>{let i=o,a=i+s.nodeSize,l=i+1,c=a+1;lt&&r.push({from:i,to:a})}),r}function Ko(e){if(e.length===0)return[];let t=[...e].sort((r,s)=>r.from-s.from),n=[{...t[0]}];for(let r=1;rt.from?n.push(Ce(e,Ee(e,Math.min(t.to,e.content.size+1)-1))):t.fromf.from>=c&&f.to<=d);u.length&&(a=a.remove(u));let p=Fr({editor:n,options:r,dataAttribute:s,doc:o,selection:i,from:c,to:d});p.length&&(a=a.add(o,p))}return a}function qo({editor:e,options:t,dataAttribute:n}){return{init(r,s){let o=Wr({editor:e,options:t,dataAttribute:n,doc:s.doc,selection:s.selection});return o??S.empty},apply(r,s,o,i){if(!r.docChanged&&!r.selectionSet)return s;let a=s.map(r.mapping,r.doc),l=Wo(r,o,i);return Vo({decorations:a,ranges:l,editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection})}}}function Qo(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function Jo({editor:e,options:t}){let n=t.dataAttribute?`data-${Qo(t.dataAttribute)}`:`data-${jr}`,r=t.showOnlyCurrent&&!t.includeChildren;return new A({key:Dr,...r?{}:{state:qo({editor:e,options:t,dataAttribute:n})},props:{decorations:r?({doc:s,selection:o})=>Wr({editor:e,options:t,dataAttribute:n,doc:s,selection:o}):s=>{var o;return t.showOnlyWhenEditable&&!e.isEditable?S.empty:(o=Dr.getState(s))!=null?o:S.empty}}})}var yn=C.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:jr,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[Jo({editor:this.editor,options:this.options})]}});function gn(e,t){return!e.selection.empty&&!Ie(e.selection)&&t.isEditable}function Xo(e,t){return gn(e,t)&&!t.isFocused&&!t.view.dragging}function Yo(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function Zo(e){e.focus()}var el=C.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new A({key:new M("selection"),props:{decorations(n){return Xo(n,e)?S.create(n.doc,[J.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(n){return gn(n.state,e)&&Yo(),!1},focus(n){return gn(n.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&n.hasFocus()&&Zo(n)}),!1}}}})]}}),ei="skipTrailingNode";function Br({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Gr=C.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new M(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new A({key:t,appendTransaction:(s,o,i)=>{let{doc:a,tr:l,schema:c}=i,d=t.getState(i),u=a.content.size,p=c.nodes[n];if(!s.some(f=>f.getMeta(ei))&&d)return l.insert(u,p.create())},state:{init:(s,o)=>{let i=o.tr.doc.lastChild;return!Br({node:i,types:r})},apply:(s,o)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return o;let i=s.doc.lastChild;return!Br({node:i,types:r})}}})]}}),Vr=C.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>hn(e,t),redo:()=>({state:e,dispatch:t})=>mn(e,t)}},addProseMirrorPlugins(){return[_r(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var ti=C.create({name:"starterKit",addExtensions(){var e,t,n,r;let s=[];return this.options.bold!==!1&&s.push(zn.configure(this.options.bold)),this.options.blockquote!==!1&&s.push($n.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(en.configure(this.options.bulletList)),this.options.code!==!1&&s.push(jn.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(Un.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(Kn.configure(this.options.document)),this.options.dropcursor!==!1&&s.push($r.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(zr.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(Fn.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(Wn.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(Vr.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(Gn.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Vn.configure(this.options.italic)),this.options.listItem!==!1&&s.push(rn.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(on.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&s.push(pr.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&s.push(an.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(xr.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(wr.configure(this.options.strike)),this.options.text!==!1&&s.push(Mr.configure(this.options.text)),this.options.underline!==!1&&s.push(Ir.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(Gr.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),qr=ti;var Qr=yn;var Jr=kn;var ni=(e={})=>{let t=null,n=null,r=()=>e.outputFormat==="json"?JSON.stringify(t.getJSON()):t.getHTML();return{updatedAt:Date.now(),characterCount:0,init(){let s=this.$refs.editorContent;s.querySelector(".ProseMirror")?.remove();let o=this.$wire.get(e.wireAttribute)??"",i=e.outputFormat==="json"?Xr(o):o||"";t=new Dn({element:s,extensions:ri(e),content:i,editable:!e.disabled&&!e.readOnly,onCreate:({editor:a})=>{e.maxLength&&(this.characterCount=a.storage.characterCount?.characters()??0)},onUpdate:({editor:a})=>{this.updatedAt=Date.now();let l=e.outputFormat==="json"?JSON.stringify(a.getJSON()):a.getHTML();n=l,this.$refs.hiddenInput.value=l,this.$refs.hiddenInput.dispatchEvent(new Event("input",{bubbles:!0})),e.maxLength&&(this.characterCount=a.storage.characterCount?.characters()??0)},onSelectionUpdate:()=>{this.updatedAt=Date.now()},onFocus:()=>{this.updatedAt=Date.now()},onBlur:()=>{this.updatedAt=Date.now()}}),this.$wire.$watch(e.wireAttribute,a=>{!t||t.isFocused||a!==n&&a!==r()&&t.commands.setContent(e.outputFormat==="json"?Xr(a):a||"",{emitUpdate:!1})})},destroy(){t?.destroy(),t=null},isActive(s,o={}){return this.updatedAt,t?t.isActive(s,o):!1},toggleBold(){t?.chain().focus().toggleBold().run()},toggleItalic(){t?.chain().focus().toggleItalic().run()},toggleUnderline(){t?.chain().focus().toggleUnderline().run()},toggleStrike(){t?.chain().focus().toggleStrike().run()},toggleCode(){t?.chain().focus().toggleCode().run()},toggleHighlight(){t?.chain().focus().toggleHighlight().run()},toggleBulletList(){t?.chain().focus().toggleBulletList().run()},toggleOrderedList(){t?.chain().focus().toggleOrderedList().run()},toggleBlockquote(){t?.chain().focus().toggleBlockquote().run()},toggleCodeBlock(){t?.chain().focus().toggleCodeBlock().run()},setHeading(s){t?.chain().focus().toggleHeading({level:s}).run()},setAlign(s){t?.chain().focus().setTextAlign(s).run()},undo(){t?.chain().focus().undo().run()},redo(){t?.chain().focus().redo().run()},insertLink(){let s=t?.getAttributes("link").href??"",o=prompt("URL",s||"https://");o!==null&&(o===""?t?.chain().focus().unsetLink().run():t?.chain().focus().extendMarkRange("link").setLink({href:o,target:"_blank"}).run())},insertImage(){let s=prompt("Image URL");s&&t?.chain().focus().setImage({src:s}).run()},insertTable(){t?.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},addColumnBefore(){t?.chain().focus().addColumnBefore().run()},addColumnAfter(){t?.chain().focus().addColumnAfter().run()},deleteColumn(){t?.chain().focus().deleteColumn().run()},addRowBefore(){t?.chain().focus().addRowBefore().run()},addRowAfter(){t?.chain().focus().addRowAfter().run()},deleteRow(){t?.chain().focus().deleteRow().run()},deleteTable(){t?.chain().focus().deleteTable().run()}}};function ri(e){let t=[qr.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,HTMLAttributes:{class:"text-primary-600 underline cursor-pointer"}}}),Qr.configure({placeholder:e.placeholder??""})],n=window.WireTiptapAddons??{};return e.withTextAlign&&n.TextAlign&&t.push(n.TextAlign.configure({types:["heading","paragraph"]})),e.withHighlight&&n.Highlight&&t.push(n.Highlight),e.withImages&&n.Image&&t.push(n.Image.configure({inline:!1})),e.withTables&&n.Table&&t.push(n.Table.configure({resizable:!0}),n.TableRow,n.TableHeader,n.TableCell),e.maxLength&&t.push(Jr.configure({limit:e.maxLength})),t}function Xr(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}var Yr=!1;function Zr(){Yr||!window.Alpine||(Yr=!0,window.Alpine.data("tiptapEditor",ni))}window.Alpine?Zr():document.addEventListener("alpine:init",Zr); diff --git a/packages/forms/resources/js/tiptap-editor-addons.js b/packages/forms/resources/js/tiptap-editor-addons.js index 117af9ca..a9103324 100644 --- a/packages/forms/resources/js/tiptap-editor-addons.js +++ b/packages/forms/resources/js/tiptap-editor-addons.js @@ -5,7 +5,9 @@ import TextAlign from '@tiptap/extension-text-align' import Highlight from '@tiptap/extension-highlight' import Image from '@tiptap/extension-image' -import Table from '@tiptap/extension-table' +// v3 dropped the default export from @tiptap/extension-table (Table is now a +// named export alongside TableKit); the row/header/cell packages keep theirs. +import { Table } from '@tiptap/extension-table' import TableRow from '@tiptap/extension-table-row' import TableHeader from '@tiptap/extension-table-header' import TableCell from '@tiptap/extension-table-cell' diff --git a/packages/forms/resources/js/tiptap-editor.js b/packages/forms/resources/js/tiptap-editor.js index cb98ea41..937bff01 100644 --- a/packages/forms/resources/js/tiptap-editor.js +++ b/packages/forms/resources/js/tiptap-editor.js @@ -1,10 +1,12 @@ import { Editor } from '@tiptap/core' import StarterKit from '@tiptap/starter-kit' -import Link from '@tiptap/extension-link' -import Underline from '@tiptap/extension-underline' import Placeholder from '@tiptap/extension-placeholder' import CharacterCount from '@tiptap/extension-character-count' +// TipTap v3 folded Link and Underline into StarterKit, so they are configured +// through StarterKit.configure() below rather than registered as standalone +// extensions — adding them again would trip the duplicate-extension guard. + // The opt-in extensions (tables/images/highlight/text-align) default OFF yet were // bundled into every editor page. They now ship in a separate ESM chunk // (tiptap-editor-addons.js) that publishes window.WireTiptapAddons and is injected @@ -83,9 +85,13 @@ const tiptapEditor = (config = {}) => { if (val === lastEmitted) return if (val === read()) return + // emitUpdate:false — never re-fire onUpdate for a server-driven + // fill, or we'd echo the value straight back into Livewire. In + // TipTap v3 the second arg is an options object (a bare `false` + // would be ignored and emitUpdate would default back to true). editor.commands.setContent( config.outputFormat === 'json' ? safeParse(val) : (val || ''), - false, + { emitUpdate: false }, ) }) }, @@ -156,12 +162,13 @@ const tiptapEditor = (config = {}) => { function buildTiptapExtensions(config) { const extensions = [ - StarterKit.configure({ heading: { levels: [1, 2, 3] } }), - Link.configure({ - openOnClick: false, - HTMLAttributes: { class: 'text-primary-600 underline cursor-pointer' }, + StarterKit.configure({ + heading: { levels: [1, 2, 3] }, + link: { + openOnClick: false, + HTMLAttributes: { class: 'text-primary-600 underline cursor-pointer' }, + }, }), - Underline, Placeholder.configure({ placeholder: config.placeholder ?? '' }), ] diff --git a/workbench/scripts/verify-tiptap-split.mjs b/workbench/scripts/verify-tiptap-split.mjs index 76e362a3..9d7d4978 100644 --- a/workbench/scripts/verify-tiptap-split.mjs +++ b/workbench/scripts/verify-tiptap-split.mjs @@ -59,12 +59,15 @@ try { await writeFile(join(shotDir, `${name}.png`), Buffer.from(data, 'base64')); }; + const consoleWarnings = []; await page('Page.enable'); await page('Runtime.enable'); await page('Console.enable'); cdp.on('Console.messageAdded', (p) => { const m = p.params?.message; - if (m && m.level === 'error') consoleErrors.push(m.text); + if (!m) return; + if (m.level === 'error') consoleErrors.push(m.text); + if (m.level === 'warning') consoleWarnings.push(m.text); }); await page('Emulation.setDeviceMetricsOverride', { width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false }); @@ -75,6 +78,34 @@ try { check('core editor boots (.ProseMirror contenteditable) via ESM module script', coreBooted); const noAddonOnCore = await eval_(`typeof window.WireTiptapAddons === 'undefined'`); check('addon chunk NOT loaded on the core editor', noAddonOnCore); + + // TipTap v3 folded Link + Underline into StarterKit. Drive the fluent command + // surface to prove both still register (no standalone import needed) — this is + // the regression the v2→v3 migration turns on. + // Seed text, then let ProseMirror ingest the input event before selecting — + // marks are only reported active over a real selection in its own state. + await eval_(`(() => { + const pm = document.querySelector('.ProseMirror'); + pm.focus(); + document.execCommand('insertText', false, 'sample text'); + return true; + })()`); + await sleep(500); + // Read isActive immediately after each toggle — a later command (setHeading + // re-focuses and moves the selection) would clear the earlier stored marks. + const v3Marks = await eval_(`(() => { + const root = document.querySelector('[x-data^="tiptapEditor"]'); + const d = window.Alpine.$data(root); + const pm = document.querySelector('.ProseMirror'); + const selectAll = () => { pm.focus(); document.execCommand('selectAll'); }; + selectAll(); d.toggleBold(); const bold = d.isActive('bold'); + selectAll(); d.toggleUnderline(); const underline = d.isActive('underline'); + selectAll(); d.setHeading(2); const heading = d.isActive('heading', { level: 2 }); + return { bold, underline, heading }; + })()`); + check('StarterKit v3: toggleBold marks bold active', v3Marks.bold); + check('StarterKit v3 folds Underline in (toggleUnderline active)', v3Marks.underline); + check('StarterKit v3: setHeading(2) active', v3Marks.heading); await shot('01-core-editor'); // ─────────────── editor WITH tables (addon) ─────────────── @@ -102,6 +133,12 @@ try { check('no console errors during the run', consoleErrors.length === 0, consoleErrors.slice(0, 3).join(' | ')); + // v3 emits a console warning if the same extension is registered twice. Guards + // against re-adding standalone Link/Underline now that StarterKit owns them. + const dupWarnings = consoleWarnings.filter((t) => /duplicate extension/i.test(t)); + check('no duplicate-extension warning (Link/Underline not double-registered)', + dupWarnings.length === 0, dupWarnings[0] ?? ''); + console.log(`\nScreenshots: ${shotDir}`); const failed = results.filter((r) => !r.ok); chrome.kill(); From 74da9c8d0efdf4f57b10af66957e23c0a42d36e3 Mon Sep 17 00:00:00 2001 From: ondrejnyklicek Date: Sat, 25 Jul 2026 08:56:44 +0200 Subject: [PATCH 03/74] Document the TipTap v3 upgrade in the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 951f489b..4ac0c124 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to the Wire ecosystem will be documented in this file. ## [1.13.3] ### Changed +- **TipTap upgraded from v2 to v3 across the wire-forms rich editor.** Three v3 breaking changes reached the pre-bundled editor. First, **StarterKit v3 now bundles Link and Underline**, so registering them again from their standalone packages tripped v3's duplicate-extension warning; the standalone `Link`/`Underline` imports are gone and Link is configured through `StarterKit.configure({ link: { openOnClick, HTMLAttributes } })` (Underline is on by default). Second, **`setContent`'s second argument is now an options object, not a boolean** — the old `setContent(content, false)` no longer means "don't emit an update": a bare `false` is not an object, so it falls through to the v3 default `emitUpdate: true` and a server-driven fill echoes straight back into Livewire, re-entering ProseMirror mid-transaction — exactly the feedback loop the `$wire.$watch` guard exists to prevent. It is now `setContent(content, { emitUpdate: false })`. Third, **`@tiptap/extension-table` dropped its default export** (Table is a named export in v3 alongside `TableKit`), so the addon chunk's `import Table from …` resolved to `undefined` and the tables editor booted without ever registering the extension; switched to the named `import { Table }`. The ESM code-split dist is rebuilt (core entry + opt-in addon entry sharing one ProseMirror core chunk, unchanged in shape). Covered server-side by `TiptapAssetTest` (bundle delivery + shared-chunk reference, version-agnostic) and end-to-end in a real browser by `workbench/scripts/verify-tiptap-split.mjs` (11/11): the core editor boots via its module script with the addon chunk absent, `toggleBold`/`toggleUnderline`/`setHeading` prove StarterKit v3 registered the marks, the tables page loads the addon chunk and `insertTable()` renders a ``, and a console-warning guard asserts no duplicate-extension registration. - **`wire-core` no longer depends on `wire-forms` — the action/modal form coupling is now inverted through a core-owned seam.** The package graph is `wire-sortable → wire-table → wire-forms → wire-core`, and `InteractsWithActions` documents that "wire-core must not depend on wire-forms," yet six sites in core imported and even *constructed* wire-forms' concrete `Form` / `FormConfig` (`HasModal`, `ActionHalt`, the `HasForm` contract, both `FormSaving`/`FormSavedPayload` plugin hooks) and the core `actions.modal-host` view called a bridge method (`getActionModalFormInstance()`) that only wire-forms defines. In a split-published, standalone `nyoncode/wire-core` this is not academic: the payloads and contracts reference undefined classes, and opening any action modal on a plain `WithActions` host **fatally** calls the missing bridge method. Core now owns the seam: a narrow `ModalForm` interface (`extends Htmlable`; `statePath`/`livewire`/`fill`/`getInitialState`/`validate`), a `ModalFormFactory` resolved from the container via `ModalForms`, and a `FormConfigContract` for the hook payloads. wire-forms' `Form` implements `ModalForm` (no method-body changes), a `FormModalFormFactory` is bound in `WireFormsServiceProvider`, and `FormConfig` implements the contract. When wire-forms is absent the factory is unbound and `ModalForms::make()` degrades to `null` (the modal renders form-less) instead of fatally naming a class it does not ship; two new null form-instance seams on core `InteractsWithActions` (overridden by the bridge via `insteadof`) keep the core modal-host view honest. The public `HasModal::form()` / `ActionHalt::form()` API is unchanged in practice — `Form implements ModalForm`, so `->form(Form::make()->schema([...]))`, `->form([...])`, and closures all still type-check; only the internal type surface moved off the concrete `Form`. Field objects passed to `->form([...])` remain wire-forms types, so this is compile/load-level decoupling (a standalone core boots and references only its own dependencies), not a claim that core is value-level form-free. Covered by `ModalFormsTest` (factory resolution + graceful degradation when unbound), a form-free-host seam test in `InteractsWithActionsTest`, and the existing form-behaviour suites, which now build through the factory bound in the core `TestCase`. ## [1.13.2] From f66181ad087a8ab600ea7529a7a172032681214c Mon Sep 17 00:00:00 2001 From: ondrejnyklicek Date: Sun, 26 Jul 2026 16:12:27 +0200 Subject: [PATCH 04/74] Unify the active row between pointer and keyboard in record actions Clicking a row (or opening its context menu) now marks it as the active row, so the arrow keys always continue from the row the user last touched. The marker and the roving tabindex become Alpine bindings (rowClass / rowTabindex) so they survive the Livewire morph every update triggers; the active row drops its hover tint so hover:bg-* cannot paint over the marker. The grid only answers keys when a row itself has the focus and stays inert while a dialog is visible; closing a modal hands the focus back to the active row. A Shift+range with no keyboard anchor (mod+A, a checkbox, the select-all strip) now anchors at the far edge of the contiguous selected block instead of collapsing the selection to two rows, and a checkbox click sets the anchor. Table::getActiveRowConfig() becomes the shared owner of the marker and the row hover vocabulary (activeClass leaves the keyboard config). Ships a new record-actions-keyboard workbench preview with a shortcut legend, a CDP driver characterizing the behaviour, updated EN/CZ/boost docs, and the selection-gestures plan documents. Also covers the wizard-step form degradation when the form factory is unbound (core seam follow-up). --- ...table-selection-gestures-implementation.md | 638 ++++++++++++++++ .../plans/table-selection-gestures-rollout.md | 702 ++++++++++++++++++ .../plans/table-selection-gestures.md | 224 ++++++ docs/cs/table/record-actions.md | 32 +- docs/table/record-actions.md | 34 +- .../boost/docs/table/record-actions.md | 34 +- .../boost/guidelines/wire-table.blade.php | 2 +- .../tests/Unit/Actions/ModalFormsTest.php | 14 + packages/table/dist/wire-table-records.js | 2 +- packages/table/resources/js/record-actions.js | 168 ++++- .../resources/views/tables/index.blade.php | 37 +- .../src/Actions/RecordActionResolver.php | 3 +- packages/table/src/Table.php | 58 +- .../tests/Unit/RecordActionRenderTest.php | 40 + .../table/tests/Unit/RecordActionTest.php | 32 +- .../app/Livewire/Previews/TablePreview.php | 42 +- .../livewire/previews/table-preview.blade.php | 34 + workbench/routes/web.php | 9 + .../scripts/verify-record-active-row.mjs | 320 ++++++++ 19 files changed, 2367 insertions(+), 58 deletions(-) create mode 100644 architecture/plans/table-selection-gestures-implementation.md create mode 100644 architecture/plans/table-selection-gestures-rollout.md create mode 100644 architecture/plans/table-selection-gestures.md create mode 100644 workbench/scripts/verify-record-active-row.mjs diff --git a/architecture/plans/table-selection-gestures-implementation.md b/architecture/plans/table-selection-gestures-implementation.md new file mode 100644 index 00000000..4d7ced57 --- /dev/null +++ b/architecture/plans/table-selection-gestures-implementation.md @@ -0,0 +1,638 @@ +--- +title: Implementační analýza — kontrakt výběru a klávesových zkratek tabulky +date: 2026-07-26 +scope: packages/table, packages/core (dva seamy), workbench (preview + CDP driver) +status: analýza — podklad k implementaci, ne kontrakt +parent: architecture/plans/table-selection-gestures.md +--- + +# Implementační analýza + +Doprovodný dokument k `table-selection-gestures.md`. Ten drží **co** se má stát +(rozhodnutí), tenhle **jak** to udělat, aby to nerozbilo, co už funguje. + +Vše níže je ověřené čtením kódu. Kde je něco neověřené, je to označené. + +--- + +## 1. Co analýza změnila na plánu + +Tři věci, které plán nepředpokládal, a každá mění pořadí práce. + +### 1.1 Klávesová sada dnes nefunguje na tabulce, která je jen `selectable()` + +`role="grid"`, `role="row"`, roving tabindex i `@keydown` visí na +`Table::keyboardNavEnabled()` (`Table.php:1686`), což je +`recordActionKeyboard ?? hasRecordActions()`. Bez record actions nejsou řádky +fokusovatelné, a guard `event.target !== this.row(event)` +(`record-actions.js:141`) navíc vyžaduje fokus přímo na `` — což bez +tabindexu nikdy nenastane. + +Důsledky: + +- `Space`, šipky, `mod`+`A` ani žádná nová klávesa nemají na čem viset. +- Všechny čtyři ARIA doplňky z §4 plánu by byly **neplatné ARIA**, protože + tabulka nemá grid semantiku. +- §5b plánu řeší jen `?`. Tatáž věta ale platí na všechny ostatní klávesy, které + plán nechává v `record-actions.js`. Přesunout jen `?` problém nevyřeší, jen + zúží: nápověda by vypsala zkratky, které tam nefungují. + +**Oprava je jedna a je výš** — viz etapa 0. + +### 1.2 `base ∪ rozsah` si odporuje s dokumentovaným chováním + +Plán §2 říká `base ∪ rozsah`, kde base = výběr před gestem. Jenže dnes platí, že +první `Shift`+šipka po `mod`+`A` blok **zmenší** (5 řádků → 4). Je to záměr: + +- komentář v `anchorFor()` (`record-actions.js:227-233`), +- dokumentace `docs/table/record-actions.md:112-118`, +- CDP check `workbench/scripts/verify-record-active-row.mjs:231-233`. + +Sjednocení je monotónní. Když base = celý předchozí výběr, rozsah už nikdy nic +neubere → CDP test spadne a dokumentované chování přestane platit. + +**Řešení: base = snapshot mínus souvislý blok, který gesto přebírá.** + +``` +base = selected \ blockAround(anchorRow) +``` + +Ověřeno na obou scénářích: + +| Scénář | `blockAround(kotva)` | base | Výsledek | +|---|---|---|---| +| `mod`+`A` na 5 řádcích, aktivní r0 | r0..r4 (celý výběr) | ∅ | `Shift`+`↓` → 4 řádky, **zmenšení funguje** | +| výběr 2–6, `Space` na 8, `Shift`+`↓`×4 | `{8}` | `{2..6}` | `{2..6} ∪ {8..12}`, **nesouvislý výběr funguje** | + +Splňuje to obojí — „nezahodit výběr, který jsem neudělal" i „blok jde zmenšit". +Je to rozhodnutí do ADR, ne implementační detail. + +### 1.3 `?` modal je blokovaný na změně v core + +Všechny tři modal shelly mají natvrdo Livewire entangle: +`modals/modal.blade.php:13`, `modals/confirmation.blade.php:15`, +`modals/slide-over.blade.php:13` — `x-data="{ show: @entangle($modelBinding) }"`. +Bez Livewire property neexistuje cesta, jak modal otevřít z JS. + +Etapa 5 tedy není table-only, je to cross-package změna → podle +`CLAUDE.md` Cross-Package Change Checklist se **mění seam před downstream +callery**. + +--- + +## 2. Etapa 0 — předpoklady (nová) + +Nic z toho nemění chování z pohledu uživatele, ale všechno ostatní na tom stojí. + +| # | Změna | Soubor | Proč | +|---|---|---|---| +| 0.1 | `usesGridSemantics(): bool` jako jediný vlastník rozhodnutí „tahle tabulka je grid" | `packages/table/src/Table.php:1696` | dnes to rozhoduje `$keyboardNav`, které míchá JS chování a ARIA semantiku | +| 0.2 | `keyboardNavEnabled()` → `recordActionKeyboard ?? (hasRecordActions() \|\| isSelectable())` | `Table.php:1688` | bez toho je §1.1 | +| 0.3 | `matching` z `x-data` do `data-matching` + getter | `index.blade.php:267` | zapečené číslo pod `wire:key="table-wrapper"` se po morphu nikdy nepřepočítá | +| 0.4 | `'[data-select-cell]'` do `INTERACTIVE` | `record-actions.js:25-38` | musí jít **současně** se zvětšením klikatelné plochy (etapa 6), jinak klik do paddingu buňky spustí record action | +| 0.5 | rozšířit `$reserved` o navigační klávesy | `RecordActionResolver.php:144` | dnes rezervuje jen `enter`/`return`/`space`, takže `->onKey('Home')` projde a nový `case` ji tiše zastíní | + +K 0.2 — BC je ověřená: `NoRecordActionComponent` +(`RecordActionRenderTest.php:58-61`) dědí `$selectable = false`, takže test +„leaves a plain table ungridded" (`:110-114`) zůstane zelený. Explicitní +`recordActionKeyboard(false)` musí dál vyhrát (`RecordActionTest.php:430-435`). +Přibude test pro `Table::make()->selectable()` → `'grid'`. + +K 0.3 — projev dnešního bugu: vyfiltruj na 7 řádků, klikni „Vybrat všech 7", +bulk bar ukáže **původní** počet. Server počítá správně +(`CanSelectRecords::getSelectedRecordsCount()`), rozchází se jen klient. +Vzor pro opravu už v souboru je — `pageKeys` (`:257` + getter `:269`). + +--- + +## 3. Etapa 1 — extrakce `wireRecordSelection` + +### 3.1 Past s `entangle` (nejdůležitější věc celé etapy) + +Alpine rozbaluje `entangle` přes interceptor, který běží **jednou**, hned po +vytvoření datového objektu (`livewire.esm.js:3642-3662`, `initInterceptors` na +`:3655`). Z toho plynou tři závazná pravidla: + +1. **Factory musí být `function`, ne arrow.** V jejím těle je `this` = magic + kontext s `$wire`. Dnešní `wireRecordActions` je arrow + (`record-actions.js:50`) a nevadí mu to jen proto, že `$wire` používá až + v metodách. +2. **`selected` a `mode` musí vzniknout v návratovém literálu, ne v `init()`.** + Přiřazení v `init()` uloží syrový interceptor objekt a výběr tiše přestane + fungovat. Tohle je nejtišší možný způsob, jak si rozbít celou funkci. +3. **Config přichází argumentem.** Na jiné properties vytvářeného objektu se + v těle factory sáhnout nedá. + +Gettery jsou v pořádku — `initInterceptors` čte deskriptory a accessor deskriptor +přeskočí, takže se getter při initu nezavolá. + +**V repu zatím žádný JS modul neentangluje** (ověřeno grepem přes +`packages/*/resources/js/`). `wireRecordSelection` bude první, takže tohle nemá +kdo odchytit — a Pest to nechytí vůbec. + +### 3.2 API kontrakt, který musí zůstat 1:1 + +Konzumenti jsou **čtyři**, ne tři jak píše plán — plán zapomíná na +`record-actions.js`. + +| Konzument | Kde | Co používá | +|---|---|---| +| desktop řádky | `index.blade.php:918` (`:class` skládaný v PHP na `:95-104`), `:952-960` | `isSelected`, `toggle` | +| header checkbox | `:721-732` | `toggleAll`, `allSelected`, `someSelected` | +| bulk bar | `:616-686` | `selectedCount`, `selectsAll`, `deselectAll`, `selectAllMatching`, `selectOnlyPage` | +| mobilní karty | `:1139-1159`, `:1192-1202` | `toggleAll`, `allSelected`, `someSelected`, `selectedCount`, `isSelected`, `toggle` | +| `record-actions.js` | `:216-273` přes `[data-selection-root]` + `Alpine.$data()` | čte `isSelected`, `pageKeys`; **zapisuje** `mode`, `selected`; volá `toggle`, `queueCommit?.()` | + +Pozor na `$rowClassBinding` (`index.blade.php:95-104`): PHP skládá `:class` +objekt jako **string**, protože dva `:class` atributy by se tiše přebily. +Extrakce nesmí tuhle kompozici rozbít; `isSelected()` se resolvuje po Alpine +scope chainu do selection rootu, takže funguje i po přesunu. + +Falešné shody, které nezaměnit: `@click="toggle()"` na `:347` a `:483` patří +`wireDropdown`, `wire:click="toggleAllRowExpansion"` na `:575` jsou sub-rows. + +### 3.3 Doručení modulu + +Pipeline je zavedená, stačí ji zrcadlit: + +1. `packages/table/resources/js/selection.js` + registrace na `alpine:init`. +2. `package.json` → `build:table-assets` rozšířit o druhý esbuild příkaz + s vlastním `--outfile`. **Ne `--outdir` s víc entry pointy** — přejmenovalo by + to existující výstup. +3. Route měnit netřeba — `{asset}` v `WireTableServiceProvider.php:88-102` je + volný parametr, `wire-table-selection.js` se namapuje sám. +4. Nový partial `views/tables/partials/selection-assets.blade.php` jako kopie + `record-actions-assets` (mtime cache-bust). +5. Include **uvnitř `@if($isSelectable)`, ne uvnitř ``** — dnešní + record-actions include je v tbody, které se nerendruje bez viditelných + sloupců, ale výběr je aktivní i v kartách. +6. **`dist/wire-table-selection.js` commitnout.** Dist je v repu verzovaný, CI ho + negeneruje. Bez něj vrátí route 404 a Alpine spadne na celé komponentě — na + rozdíl od record actions, kde chybějící skript zabije jen gesta, tady zmizí + výběr úplně. +7. Drift test proti dist (vzor `packages/core/tests/Feature/DropdownAssetTest.php:100-130`). + Pro `wire-table-records.js` dnes žádný není, takže je to i díra k zaplácnutí. + +--- + +## 4. Etapa 2 — kotva a rozsahy + +### 4.1 `baseSelection` snapshot + +`anchorKey = null` nestačí (viz §1.2). Přibude druhý stav a smyčka z `anchorFor` +se faktorizuje, ať ji sdílí kotva i base: + +```js +// Souvislý (indexově, ne vizuálně) blok vybraných řádků kolem idx. +blockAround(rows, idx) { … } // vytaženo z anchorFor:241-245 + +// Snímek pro base ∪ rozsah: všechno kromě bloku, který gesto přebírá. +snapshotBase(rows) { + // POZOR: [...sel.selected], ne reference — je to entangle proxy + // a uložená reference by se pod rukama změnila při prvním zápisu. +} +``` + +**Kde `baseSelection` zahodit** (všude, kde se dnes nuluje `anchorKey`, plus dvě +navíc): + +| Místo | Dnes | Doplnit | +|---|---|---| +| `moveActive` else větev `:207` | `anchorKey = null` | `baseSelection = null` | +| `Space` toggle `:179-181` | `anchorKey = activeKey` | `baseSelection = null` | +| klik na checkbox `:402-404` | `anchorKey = row.key` | `baseSelection = null` | +| `selectPage()` (`mod`+`A`) | netknuto | `baseSelection = null` | +| `MutationObserver` `:65-71` | netknuto | **oboje, ale jen když kotevní řádek zmizel** | + +Ten poslední řádek je důležitý: base s klíči z předchozí stránky nebo filtru by +se při dalším `Shift`+šipce sjednotil zpátky a **vzkřísil neviditelné řádky**. + +**Živá mina: `onRowFocus` do toho seznamu NESMÍ.** `activate()` (`:329-336`) volá +`rows[i].focus()`, což vystřelí `focusin` → `onRowFocus` (`:277-281`). Kdyby ten +čistil kotvu nebo base, smazal by je hned po tom, co je `moveActive` nastavil. +Dnes to nevadí (nastavuje jen `activeKey`), po přidání base je to past. + +### 4.2 Oprava `mode` + +`selectRange()` (`:261`) i `selectPage()` (`:270`) dnes natvrdo dělají +`sel.mode = 'keys'`. V `all` módu tím shodí výběr celé filtrované sady na +stránku. Obojí je nasazená chyba, ne nová práce. + +- `selectRange` — **žádný zápis `mode`**, jen + `sel.selected = [...new Set([...base, ...keys])]`. +- `selectPage` — `mod`+`A` **není** rozsahové gesto, takže tady jeden `if` na mód + patří: v `all` módu je vybráno všechno a sjednocení `pageKeys` do `selected` + (= výjimek) by stránku naopak odznačilo. Tedy `if (sel.selectsAll) return`. + +Serverové protějšky, které definují správnou sémantiku, jsou v +`CanSelectRecordsTest.php` — `:108` union místo replace, `:197` zúžení z `all` na +stránku, `:263`, `:275`. JS je musí kopírovat. + +### 4.3 Nedodefinovaný `all` mód + +Z rozhodnutí „sjednotit do `selected`" plyne, že **`Shift`+šipka v `all` módu +odznačuje**. Je to konzistentní, ale z tabulky §2 („blok od kotvy") to nikdo +nevyčte. Navíc `blockAround` používá `isSelected()`, které je v `all` módu +invertované — „souvislý blok" tedy znamená blok *nevyloučených* řádků. + +Do ADR 0024 explicitně, jinak to bude překvapení. + +--- + +## 5. Etapa 3 — klávesnice + +### 5.1 Kam co patří v `onKeydown` + +Pořadí guardů (`:135` → `:141` → `:148` → `:150`) je závazné: + +| Chyba | Následek | +|---|---| +| nová klávesa před `:141` | `Backspace` v editované buňce spustí mazací akci místo smazání znaku | +| nová klávesa před `:148` | `PageDown` posune marker pod otevřeným modalem; `Backspace` spustí druhou destruktivní akci proti **jinému** záznamu, než na který se modal ptá | +| nová klávesa před `:150` | `rows[0]` na prázdné stránce → `undefined.dataset` v `activate()` | + +Umístění: + +- `mod`+`Shift`+`↑`/`↓` → dovnitř existujících `case 'ArrowDown'`/`'ArrowUp'`, + cíl `rows.length - 1` / `0`. +- `Home`/`End`, `PageUp`/`PageDown` → nové `case`y, všechny přes tentýž + `moveActive(rows, idx, target, event.shiftKey)`. `Shift`+`Home`/`End` vychází + na **identické cílové indexy** jako `mod`+`Shift`+šipka → jedna implementace. +- `PageUp`/`PageDown` vyžadují `preventDefault()` (nativně scrollují stránku). +- `mod`+`PageUp`/`PageDown` **nikdy nevázat** — v Chrome je to přepínání panelů, + které `preventDefault` nezachytí. + +Drobnost k opravě po cestě: `mod`+`A` větev (`:155`) nekontroluje `shiftKey`, +takže `mod`+`Shift`+`A` dnes taky vybere stránku. + +### 5.2 `Backspace` — alias v JS, ne v PHP + +Ekvivalenční třída `['delete', 'backspace']` ve dvou průchodech `matchShortcut` +(přesná shoda vyhrává, ať výsledek nezávisí na pořadí `Object.keys()`). +`eventMatchesShortcut` se mění jen na posledním řádku, modifikátorová logika +zůstává. + +Proč ne v PHP: zdvojení mapy rozbije `RecordActionTest.php:406` a `:417` +(`->toBe(['Delete' => 'remove'])`), prosákne do veřejného kontraktu +`getRecordActionKeyboardConfig()`, a v legendě by se `Backspace` vypsal jako +samostatný řádek místo „`Delete` / `⌫`". Alias je platformní prezentace, patří +do JS. + +### 5.3 `Shift`+`F10` — vlastní `case`, ne matcher + +Matcherem mechanicky projde, ale jít tudy nemůže: `kb.shortcuts` je mapa +`klávesa → jméno akce` a volající dělá `run(name)` → `openActionModal`. Otevření +kontextového menu není akce a nemá jméno. Menu je řízené flagem `this.contextMenu`. + +Tedy `case 'F10'` s `if (! event.shiftKey) return` a fallthrough do +`case 'ContextMenu'`. Pořadí `case`ů je závazné. + +**Neověřené riziko:** prohlížeče na `Shift`+`F10` generují i nativní `contextmenu` +DOM event, který je na `` navázaný (`:440-457`) a pro klávesnicově +vyvolané menu má `clientX/Y` = `0,0` — přepozicoval by panel hned po +`openMenuForRow`. `preventDefault()` na `keydown` by to potlačit měl, ale napříč +prohlížeči to není jisté. Ověřit CDP; defenziva je flag `_menuFromKey` zahozený +v `setTimeout(…, 0)`. + +**Díra, kterou `Shift`+`F10` zviditelní:** `openMenuForRow` (`:342-347`) +nepřesouvá fokus do panelu. Fokus zůstává na ``, takže s otevřeným menu +šipky pořád posouvají marker za menu, a `dialogOpen()` panel nezachytí (je to +`role="menu"`, ne `role="dialog"`). U myši to nevadí, u klávesnice je to porušení +APG. Patří do etapy 6. + +### 5.4 `PageUp`/`PageDown` — odkud měřit + +Ověřený layout: jediný obal je `
` +(`index.blade.php:700`), **žádné `max-height`, žádné `overflow-y-auto`, žádný +sticky header** v celém `packages/table/resources/views/`. Reálně tedy scrolluje +stránka → `window.innerHeight`. Implementovat ale přes hledání nejbližšího +vertikálně scrollujícího předka s fallbackem na okno, ať to přežije budoucí +`stickyHeader()`. + +**Měřit rozteč, ne výšku řádku.** Mezi navigovatelnými řádky můžou sedět +skupinové hlavičky, mezisoučty a rozbalené sub-rows — ty zabírají obraz, ale +v `navRows()` nejsou. Průměrná rozteč `(last.bottom - first.top) / rows.length` +je započítá, `rows[0].height` ne. + +Povinný guard: `if (! pitch || ! viewport) return 1`. Není to teoretické — +`$tableHiddenClass` (`:184`) skrývá desktopovou tabulku na mobilu přes +`display:none`, kde `getBoundingClientRect()` vrací nuly, a `Math.floor(x/0)` = +`Infinity` → `rows[Infinity]` → throw v `activate()`. + +### 5.5 `navRows()` beze změny + +Ověřeno, co z něj vypadává a proč je to správně: skupinová hlavička +(`group-header.blade.php:3`), mezisoučet (`group-subtotal.blade.php:12`), wrapper +sub-rows (`sub-rows.blade.php:9`), samotné sub-rows (zanořená `
`, navíc +bez `data-row-key`), empty-state řádek (`index.blade.php:1058`). + +Nové klávesy musí operovat nad **tímtéž** polem `rows`, které `onKeydown` už +spočítal na `:150` — předat ho, nikdy neznovudotazovat. + +--- + +## 6. Etapa 4 — sweep + +Precedens je `wireFillHandle` — plnohodnotný Excel fill handle v core, s vlastním +ADR 0023: `packages/core/resources/js/fill/{controller,grid,autoscroll,range}.js`. +Sweep z něj vychází, ale ve třech bodech se odchyluje. + +### 6.1 Co znovupoužít + +| Kus | Sweep? | +|---|---| +| `createAutoScroller` (`fill/autoscroll.js`) | **ano, 1:1** — je plně generický; promovat do `core/resources/js/support/autoscroll.js` | +| `bodyRows()` + `rowAtY()` (`fill/grid.js:17-23, :100-115`) | **ano** — vytáhnout do `support/table-rows.js`; dnes jsou uvězněné v `createGrid`, které si navíc parsuje `data-fill-columns` | +| tvar `startDrag/onMove/stopDrag` + window listenery + Escape → cancel | ano jako vzor | +| morph guard (`controller.js:38-50`) | **ano, nutně** — bez něj polling uprostřed tažení přemorfuje řádky pod kurzorem | +| `createGrid`, `range.js`, `paint()`, `write()` | ne — fill je 2D s optimistic lockem, sweep je 1D sjednocení klíčů | + +Fill během tažení **nepoužívá `elementFromPoint` ani `event.target`** — mapuje +`clientY` na index řádku přes `rowAtY()`. Po `setPointerCapture` se totiž pointer +eventy retargetují a `target` je bezcenný. To převzít. + +⚠️ Import z core do table bude **první cross-package JS import v repu** +(`record-actions.js` dnes nemá jediný `import`). Esbuild to vyřeší, ale znamená +to zkopírovaný autoscroller v obou distech a rebuild obou bundlů při změně core. +Do ADR 0024. + +### 6.2 Tři odchylky od fillu + +**Žádný `preventDefault()` na `pointerdown`.** Fill si to dovolí (táhne +z dekorativního tlačítka mimo tabulku), sweep ne — zabilo by to fokus na +`
` +(`index.blade.php:1101-1106`), takže click po tažení přistane mimo ``. +Sweep tuhle únikovou cestu nemá a dostane dvě rány: `x-on:click="toggle(key)"` na +tlačítku (`:952`) a `@click="onPointer('click', $event)"` na tbody +(`record-actions.js:396`). + +```js +// jednou v init(), na selection rootu — capture fáze běží před target fází, +// takže stopPropagation zabije i listener navěšený přímo na tlačítku +this.$el.addEventListener('click', (e) => { + if (! this.suppressClick) return + this.suppressClick = false + e.stopPropagation() + e.preventDefault() +}, true) +``` + +Pointer capture tohle neřeší — pokrývá pointer stream, ne kompatibilní `click`. +Použít ho jde (v `try/catch`, jako `controller.js:224-228`), ale jako enhancement. +Pojistka pro `pointerup` mimo dokument: `setTimeout(() => suppressClick = false, 0)` +ve `stopSweep()`; `click` se dispatchuje synchronně, takže se stihne dřív. + +**Dotyk mimo.** Tři guardy na `pointerdown`: `pointerType !== 'mouse'`, +`button !== 0`, `! isPrimary`. A hlavně **`touch-action` neměnit** — fillí +`touch-action: none` by na mobilu zablokovalo vertikální scroll v celém +checkboxovém sloupci. Protože sweep dotyk vůbec nezpracuje, není co nastavovat. + +### 6.3 Sortable nekoliduje, ale nechává past + +Ověřeno ze zdroje (`packages/sortable/resources/views/partials/scripts.blade.php`): +řádkový Sortable má `handle: '.wire-sortable-handle'` (`:88`), **`filter` ani +`draggable` nastavené nejsou**, takže gating dělá výhradně handle — pointerdown +v checkboxové buňce instanci nespustí. Dvojitá pojistka: instancuje se jen +v reorder módu (`:70-71`, entanglované `isReordering`). + +**Past:** `addRowDragHandles()` (`:206-215`) **prependuje** `
` do každého +řádku z JS po renderu → checkboxový sloupec se posune z indexu 0 na 1. Sweep +proto nikdy nesmí hledat buňku podle pozice (`cells[0]`, `:first-child`, +`nth-child`), výhradně přes `[data-select-cell]`. + +### 6.4 Mobilní karty + +Nic navíc. Karty nemají checkboxový sloupec (je to `