diff --git a/app/Http/Controllers/JournalEntryController.php b/app/Http/Controllers/JournalEntryController.php index baf4613..6d7f932 100644 --- a/app/Http/Controllers/JournalEntryController.php +++ b/app/Http/Controllers/JournalEntryController.php @@ -122,7 +122,6 @@ class JournalEntryController extends Controller return view('journal-entries.create') ->with('ingredients', $ingredients) - ->with('meals', JournalEntry::meals()->toArray()) ->with('units', Nutrients::units()->toArray()) ->with('default_date', Carbon::createFromFormat('Y-m-d', $date)); } @@ -134,7 +133,6 @@ class JournalEntryController extends Controller { $date = $request->date ?? Carbon::now()->toDateString(); return view('journal-entries.create-from-nutrients') - ->with('meals', JournalEntry::meals()->toArray()) ->with('units', Nutrients::units()->toArray()) ->with('default_date', Carbon::createFromFormat('Y-m-d', $date)); } @@ -279,8 +277,9 @@ class JournalEntryController extends Controller */ public function storeFromNutrients(StoreFromNutrientsJournalEntryRequest $request): RedirectResponse { $attributes = $request->validated(); - $entry = JournalEntry::make(array_filter($attributes)) - ->user()->associate(Auth::user()); + $entry = JournalEntry::make(array_filter($attributes, function ($value) { + return !is_null($value); + }))->user()->associate(Auth::user()); $entry->save(); session()->flash('message', "Journal entry added!"); return redirect()->route( diff --git a/app/Http/Controllers/MealsController.php b/app/Http/Controllers/MealsController.php new file mode 100644 index 0000000..3af8ff8 --- /dev/null +++ b/app/Http/Controllers/MealsController.php @@ -0,0 +1,43 @@ +with('meals', Auth::user()->meals); + } + + /** + * Update the user profile data. + */ + public function update(Request $request): RedirectResponse + { + $attributes = $request->validate([ + 'meal' => ['required', new ArrayNotEmpty], + 'meal.value.*' => ['required', 'numeric'], + 'meal.weight.*' => ['required', 'numeric'], + 'meal.label.*' => ['nullable', 'string'], + 'meal.enabled.*' => ['required', 'boolean'], + ]); + + $user = Auth::user(); + $user->meals = ArrayFormat::flipTwoDimensionalKeys($attributes['meal']); + $user->save(); + session()->flash('message', "Meals customizations updated!"); + return redirect()->route('meals.edit'); + } + +} diff --git a/app/Http/Requests/StoreFromNutrientsJournalEntryRequest.php b/app/Http/Requests/StoreFromNutrientsJournalEntryRequest.php index 8fe450a..c48d752 100644 --- a/app/Http/Requests/StoreFromNutrientsJournalEntryRequest.php +++ b/app/Http/Requests/StoreFromNutrientsJournalEntryRequest.php @@ -2,12 +2,9 @@ namespace App\Http\Requests; -use App\Models\JournalEntry; -use App\Rules\ArrayNotEmpty; use App\Rules\InArray; -use App\Rules\StringIsPositiveDecimalOrFraction; -use App\Rules\UsesIngredientTrait; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Support\Facades\Auth; class StoreFromNutrientsJournalEntryRequest extends FormRequest { @@ -21,8 +18,7 @@ class StoreFromNutrientsJournalEntryRequest extends FormRequest 'date' => ['required', 'date'], 'meal' => [ 'required', - 'string', - new InArray(JournalEntry::meals()->pluck('value')->toArray()) + new InArray(Auth::user()->meals_enabled->pluck('value')->toArray()) ], 'summary' => ['required', 'string'], 'calories' => ['nullable', 'numeric', 'min:0', 'required_without_all:fat,cholesterol,sodium,carbohydrates,protein'], diff --git a/app/Http/Requests/StoreJournalEntryRequest.php b/app/Http/Requests/StoreJournalEntryRequest.php index 3d55538..1d9873c 100644 --- a/app/Http/Requests/StoreJournalEntryRequest.php +++ b/app/Http/Requests/StoreJournalEntryRequest.php @@ -8,6 +8,7 @@ use App\Rules\InArray; use App\Rules\StringIsPositiveDecimalOrFraction; use App\Rules\UsesIngredientTrait; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Support\Facades\Auth; class StoreJournalEntryRequest extends FormRequest { @@ -22,10 +23,9 @@ class StoreJournalEntryRequest extends FormRequest 'ingredients.date.*' => ['nullable', 'date', 'required_with:ingredients.id.*'], 'ingredients.meal' => ['required', 'array', new ArrayNotEmpty], 'ingredients.meal.*' => [ - 'nullable', - 'string', + 'required', 'required_with:ingredients.id.*', - new InArray(JournalEntry::meals()->pluck('value')->toArray()) + new InArray(Auth::user()->meals_enabled->pluck('value')->toArray()) ], 'ingredients.amount' => ['required', 'array', new ArrayNotEmpty], 'ingredients.amount.*' => ['required_with:ingredients.id.*', 'nullable', new StringIsPositiveDecimalOrFraction], diff --git a/app/JsonApi/Schemas/UserSchema.php b/app/JsonApi/Schemas/UserSchema.php index 71b528e..43f4f2d 100644 --- a/app/JsonApi/Schemas/UserSchema.php +++ b/app/JsonApi/Schemas/UserSchema.php @@ -29,6 +29,7 @@ class UserSchema extends SchemaProvider return [ 'username' => $resource->username, 'name' => $resource->name, + 'meals' => $resource->meals, 'createdAt' => $resource->created_at, 'updatedAt' => $resource->updated_at, ]; diff --git a/app/Models/User.php b/app/Models/User.php index 5c04062..f7a6f1e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -3,11 +3,13 @@ namespace App\Models; use App\Models\Traits\Sluggable; +use Illuminate\Database\Eloquent\Casts\AsCollection; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Support\Carbon; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Auth; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; @@ -51,6 +53,9 @@ use Spatie\MediaLibrary\MediaCollections\Models\Media; * @mixin \Eloquent * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\JournalDate[] $journalDates * @property-read int|null $journal_dates_count + * @property \Illuminate\Support\Collection|null $meals + * @method static \Illuminate\Database\Eloquent\Builder|User whereMeals($value) + * @property-read Collection $meals_enabled */ final class User extends Authenticatable implements HasMedia { @@ -59,6 +64,16 @@ final class User extends Authenticatable implements HasMedia use Notifiable; use Sluggable; + /** + * @inheritdoc + */ + protected static function booted(): void { + static::creating(function (User $user) { + // Set default meals configuration. + $user->meals = User::getDefaultMeals(); + }); + } + /** * @inheritdoc */ @@ -66,6 +81,7 @@ final class User extends Authenticatable implements HasMedia 'username', 'password', 'name', + 'meals', 'admin', ]; @@ -82,8 +98,25 @@ final class User extends Authenticatable implements HasMedia */ protected $casts = [ 'admin' => 'bool', + 'meals' => AsCollection::class, ]; + /** + * Get the default meals structure. + */ + public static function getDefaultMeals(): Collection { + $meals = new Collection(); + for ($i = 0; $i <= 7; $i++) { + $meals->add([ + 'value' => $i, + 'label' => 'Meal ' . ($i + 1), + 'weight' => $i, + 'enabled' => $i < 3, + ]); + } + return $meals; + } + /** * @inheritdoc */ @@ -113,6 +146,13 @@ final class User extends Authenticatable implements HasMedia return $this->hasMany(JournalEntry::class); } + /** + * Get the User's enabled meals, sorted by weight. + */ + public function getMealsEnabledAttribute(): Collection { + return $this->meals->where('enabled', true)->sortBy('weight'); + } + /** * Get user's goal (if one exists) for a specific date. * diff --git a/app/Rules/ArrayNotEmpty.php b/app/Rules/ArrayNotEmpty.php index f584c16..a682e90 100644 --- a/app/Rules/ArrayNotEmpty.php +++ b/app/Rules/ArrayNotEmpty.php @@ -11,7 +11,10 @@ class ArrayNotEmpty implements Rule */ public function passes($attribute, $value): bool { - return !empty(array_filter($value)); + return !empty(array_filter($value, function ($value) { + // Allow other "empty-y" values like false and 0. + return $value !== null; + })); } /** diff --git a/database/Factories/JournalEntryFactory.php b/database/Factories/JournalEntryFactory.php index 0c6bad2..f2a34b9 100644 --- a/database/Factories/JournalEntryFactory.php +++ b/database/Factories/JournalEntryFactory.php @@ -29,7 +29,7 @@ class JournalEntryFactory extends Factory 'sodium' => $this->faker->randomFloat(1, 0, 500), 'carbohydrates' => $this->faker->randomFloat(1, 0, 40), 'protein' => $this->faker->randomFloat(1, 0, 20), - 'meal' => $this->faker->randomElement(['breakfast', 'lunch', 'dinner', 'snacks']), + 'meal' => User::getDefaultMeals()->where('enabled', true)->pluck('value')->random(), ]; } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 3c86ef4..4747a07 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -19,6 +19,7 @@ class CreateUsersTable extends Migration $table->string('username')->unique(); $table->string('password'); $table->string('name'); + $table->json('meals')->nullable(); $table->boolean('admin')->default(false); $table->rememberToken(); $table->timestamps(); diff --git a/database/migrations/2020_12_31_180016_create_journal_entries_table.php b/database/migrations/2020_12_31_180016_create_journal_entries_table.php index 064e7b8..bcac922 100644 --- a/database/migrations/2020_12_31_180016_create_journal_entries_table.php +++ b/database/migrations/2020_12_31_180016_create_journal_entries_table.php @@ -26,7 +26,7 @@ class CreateJournalEntriesTable extends Migration $table->unsignedFloat('sodium')->default(0); $table->unsignedFloat('carbohydrates')->default(0); $table->unsignedFloat('protein')->default(0); - $table->enum('meal', JournalEntry::meals()->pluck('value')->toArray()); + $table->unsignedInteger('meal'); $table->timestamps(); }); } diff --git a/public/css/app.css b/public/css/app.css index d4bd899..fc349ca 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1 +1 @@ -/*! tailwindcss v2.1.2 | MIT License | https://tailwindcss.com*//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder, textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*{--tw-shadow:0 0 transparent;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);border-color:#2563eb}input::-moz-placeholder, textarea::-moz-placeholder{color:#6b7280;opacity:1}input:-ms-input-placeholder, textarea:-ms-input-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}.prose{color:#374151;max-width:65ch}.prose [class~=lead]{color:#4b5563;font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose a{color:#111827;text-decoration:underline;font-weight:500}.prose strong{color:#111827;font-weight:600}.prose ol[type=A]{--list-counter-style:upper-alpha}.prose ol[type=a]{--list-counter-style:lower-alpha}.prose ol[type="A s"]{--list-counter-style:upper-alpha}.prose ol[type="a s"]{--list-counter-style:lower-alpha}.prose ol[type=I]{--list-counter-style:upper-roman}.prose ol[type=i]{--list-counter-style:lower-roman}.prose ol[type="I s"]{--list-counter-style:upper-roman}.prose ol[type="i s"]{--list-counter-style:lower-roman}.prose ol[type="1"]{--list-counter-style:decimal}.prose ol>li{position:relative;padding-left:1.75em}.prose ol>li:before{content:counter(list-item,var(--list-counter-style,decimal)) ".";position:absolute;font-weight:400;color:#6b7280;left:0}.prose ul>li{position:relative;padding-left:1.75em}.prose ul>li:before{content:"";position:absolute;background-color:#d1d5db;border-radius:50%;width:.375em;height:.375em;top:.6875em;left:.25em}.prose hr{border-color:#e5e7eb;border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose blockquote{font-weight:500;font-style:italic;color:#111827;border-left-width:.25rem;border-left-color:#e5e7eb;quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose blockquote p:first-of-type:before{content:open-quote}.prose blockquote p:last-of-type:after{content:close-quote}.prose h1{color:#111827;font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose h2{color:#111827;font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose h3{color:#111827;font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose h4{color:#111827;font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose figure figcaption{color:#6b7280;font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose code{color:#111827;font-weight:600;font-size:.875em}.prose code:after,.prose code:before{content:"`"}.prose a code{color:#111827}.prose pre{color:#e5e7eb;background-color:#1f2937;overflow-x:auto;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose pre code{background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:400;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose pre code:after,.prose pre code:before{content:none}.prose table{width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose thead{color:#111827;font-weight:600;border-bottom-width:1px;border-bottom-color:#d1d5db}.prose thead th{vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose tbody tr{border-bottom-width:1px;border-bottom-color:#e5e7eb}.prose tbody tr:last-child{border-bottom-width:0}.prose tbody td{vertical-align:top;padding:.5714286em}.prose{font-size:1rem;line-height:1.75}.prose p{margin-top:1.25em;margin-bottom:1.25em}.prose figure,.prose img,.prose video{margin-top:2em;margin-bottom:2em}.prose figure>*{margin-top:0;margin-bottom:0}.prose h2 code{font-size:.875em}.prose h3 code{font-size:.9em}.prose ol,.prose ul{margin-top:1.25em;margin-bottom:1.25em}.prose li{margin-top:.5em;margin-bottom:.5em}.prose>ul>li p{margin-top:.75em;margin-bottom:.75em}.prose>ul>li>:first-child{margin-top:1.25em}.prose>ul>li>:last-child{margin-bottom:1.25em}.prose>ol>li>:first-child{margin-top:1.25em}.prose>ol>li>:last-child{margin-bottom:1.25em}.prose ol ol,.prose ol ul,.prose ul ol,.prose ul ul{margin-top:.75em;margin-bottom:.75em}.prose h2+*,.prose h3+*,.prose h4+*,.prose hr+*{margin-top:0}.prose thead th:first-child{padding-left:0}.prose thead th:last-child{padding-right:0}.prose tbody td:first-child{padding-left:0}.prose tbody td:last-child{padding-right:0}.prose>:first-child{margin-top:0}.prose>:last-child{margin-bottom:0}.prose-lg{font-size:1.125rem;line-height:1.7777778}.prose-lg p{margin-top:1.3333333em;margin-bottom:1.3333333em}.prose-lg [class~=lead]{font-size:1.2222222em;line-height:1.4545455;margin-top:1.0909091em;margin-bottom:1.0909091em}.prose-lg blockquote{margin-top:1.6666667em;margin-bottom:1.6666667em;padding-left:1em}.prose-lg h1{font-size:2.6666667em;margin-top:0;margin-bottom:.8333333em;line-height:1}.prose-lg h2{font-size:1.6666667em;margin-top:1.8666667em;margin-bottom:1.0666667em;line-height:1.3333333}.prose-lg h3{font-size:1.3333333em;margin-top:1.6666667em;margin-bottom:.6666667em;line-height:1.5}.prose-lg h4{margin-top:1.7777778em;margin-bottom:.4444444em;line-height:1.5555556}.prose-lg figure,.prose-lg img,.prose-lg video{margin-top:1.7777778em;margin-bottom:1.7777778em}.prose-lg figure>*{margin-top:0;margin-bottom:0}.prose-lg figure figcaption{font-size:.8888889em;line-height:1.5;margin-top:1em}.prose-lg code{font-size:.8888889em}.prose-lg h2 code{font-size:.8666667em}.prose-lg h3 code{font-size:.875em}.prose-lg pre{font-size:.8888889em;line-height:1.75;margin-top:2em;margin-bottom:2em;border-radius:.375rem;padding:1em 1.5em}.prose-lg ol,.prose-lg ul{margin-top:1.3333333em;margin-bottom:1.3333333em}.prose-lg li{margin-top:.6666667em;margin-bottom:.6666667em}.prose-lg ol>li{padding-left:1.6666667em}.prose-lg ol>li:before{left:0}.prose-lg ul>li{padding-left:1.6666667em}.prose-lg ul>li:before{width:.3333333em;height:.3333333em;top:.72222em;left:.2222222em}.prose-lg>ul>li p{margin-top:.8888889em;margin-bottom:.8888889em}.prose-lg>ul>li>:first-child{margin-top:1.3333333em}.prose-lg>ul>li>:last-child{margin-bottom:1.3333333em}.prose-lg>ol>li>:first-child{margin-top:1.3333333em}.prose-lg>ol>li>:last-child{margin-bottom:1.3333333em}.prose-lg ol ol,.prose-lg ol ul,.prose-lg ul ol,.prose-lg ul ul{margin-top:.8888889em;margin-bottom:.8888889em}.prose-lg hr{margin-top:3.1111111em;margin-bottom:3.1111111em}.prose-lg h2+*,.prose-lg h3+*,.prose-lg h4+*,.prose-lg hr+*{margin-top:0}.prose-lg table{font-size:.8888889em;line-height:1.5}.prose-lg thead th{padding-right:.75em;padding-bottom:.75em;padding-left:.75em}.prose-lg thead th:first-child{padding-left:0}.prose-lg thead th:last-child{padding-right:0}.prose-lg tbody td{padding:.75em}.prose-lg tbody td:first-child{padding-left:0}.prose-lg tbody td:last-child{padding-right:0}.prose-lg>:first-child{margin-top:0}.prose-lg>:last-child{margin-bottom:0}.pointer-events-none{pointer-events:none}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-50{z-index:50}.z-40{z-index:40}.float-right{float:right}.m-1{margin:.25rem}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.ml-3{margin-left:.75rem}.mt-2{margin-top:.5rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.mr-1{margin-right:.25rem}.mt-6{margin-top:1.5rem}.mt-3{margin-top:.75rem}.mt-8{margin-top:2rem}.ml-4{margin-left:1rem}.mb-1{margin-bottom:.25rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.-mt-px{margin-top:-1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-8{height:2rem}.h-16{height:4rem}.h-20{height:5rem}.h-6{height:1.5rem}.h-32{height:8rem}.h-24{height:6rem}.h-full{height:100%}.h-10{height:2.5rem}.h-5{height:1.25rem}.min-h-screen{min-height:100vh}.w-48{width:12rem}.w-full{width:100%}.w-8{width:2rem}.w-20{width:5rem}.w-6{width:1.5rem}.w-24{width:6rem}.w-10{width:2.5rem}.w-5{width:1.25rem}.w-auto{width:auto}.min-w-max{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.max-w-7xl{max-width:80rem}.max-w-xs{max-width:20rem}.max-w-3xl{max-width:48rem}.max-w-xl{max-width:36rem}.max-w-6xl{max-width:72rem}.flex-auto{flex:1 1 auto}.flex-1{flex:1 1 0%}.flex-none{flex:none}.table-fixed{table-layout:fixed}.table-auto{table-layout:auto}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.origin-top-left{transform-origin:top left}.origin-top{transform-origin:top}.origin-top-right{transform-origin:top right}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-100{--tw-scale-x:1;--tw-scale-y:1}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.cursor-move{cursor:move}.cursor-default{cursor:default}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.justify-start{justify-content:flex-start}.justify-around{justify-content:space-around}.justify-center{justify-content:center}.gap-4{gap:1rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem*var(--tw-space-y-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem*var(--tw-space-x-reverse));margin-left:calc(0.5rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.25rem*var(--tw-space-y-reverse))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))}.self-center{align-self:center}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border-2{border-width:2px}.border{border-width:1px}.border-0{border-width:0}.border-b-8{border-bottom-width:8px}.border-t-4{border-top-width:4px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-t-8{border-top-width:8px}.border-b-4{border-bottom-width:4px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgba(107,114,128,var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgba(243,244,246,var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.border-red-600{--tw-border-opacity:1;border-color:rgba(220,38,38,var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.border-blue-200{--tw-border-opacity:1;border-color:rgba(191,219,254,var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-indigo-400{--tw-border-opacity:1;border-color:rgba(129,140,248,var(--tw-border-opacity))}.border-blue-100{--tw-border-opacity:1;border-color:rgba(219,234,254,var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgba(156,163,175,var(--tw-border-opacity))}.bg-red-800{--tw-bg-opacity:1;background-color:rgba(153,27,27,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity:1;background-color:rgba(6,95,70,var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgba(30,64,175,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgba(167,243,208,var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgba(75,85,99,var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(90deg,var(--tw-gradient-stops))}.from-red-400{--tw-gradient-from:#f87171;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(248,113,113,0))}.to-blue-500{--tw-gradient-to:#3b82f6}.bg-cover{background-size:cover}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-clip-border{background-clip:border-box}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.fill-current{fill:currentColor}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-6{padding:1.5rem}.p-0{padding:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pb-3{padding-bottom:.75rem}.pt-6{padding-top:1.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pt-2{padding-top:.5rem}.pt-1{padding-top:.25rem}.pt-8{padding-top:2rem}.pt-12{padding-top:3rem}.text-right{text-align:right}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-5xl{font-size:3rem;line-height:1}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-6xl{font-size:3.75rem;line-height:1}.text-xs{font-size:.75rem;line-height:1rem}.text-base{font-size:1rem;line-height:1.5rem}.font-semibold{font-weight:600}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-bold{font-weight:700}.font-black{font-weight:900}.font-normal{font-weight:400}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-tight{line-height:1.25}.leading-none{line-height:1}.leading-loose{line-height:2}.leading-relaxed{line-height:1.625}.leading-normal{line-height:1.5}.leading-5{line-height:1.25rem}.leading-snug{line-height:1.375}.leading-7{line-height:1.75rem}.tracking-widest{letter-spacing:.1em}.tracking-wider{letter-spacing:.05em}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgba(245,158,11,var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.text-red-100{--tw-text-opacity:1;color:rgba(254,226,226,var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgba(153,27,27,var(--tw-text-opacity))}.underline{text-decoration:underline}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-5{opacity:.05}.opacity-25{opacity:.25}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)}.shadow-none{--tw-shadow:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgba(0,0,0,var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgba(209,213,219,var(--tw-ring-opacity))}.ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgba(110,231,183,var(--tw-ring-opacity))}.ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgba(147,197,253,var(--tw-ring-opacity))}.ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgba(252,165,165,var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-75{transition-duration:75ms}.duration-150{transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[x-cloak]{display:none!important}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.hover\:border-red-300:hover{--tw-border-opacity:1;border-color:rgba(252,165,165,var(--tw-border-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgba(185,28,28,var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgba(55,65,81,var(--tw-bg-opacity))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgba(79,70,229,var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgba(4,120,87,var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgba(29,78,216,var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity:1;background-color:rgba(252,211,77,var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.focus\:border-indigo-300:focus{--tw-border-opacity:1;border-color:rgba(165,180,252,var(--tw-border-opacity))}.focus\:border-gray-900:focus{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.focus\:border-gray-300:focus{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.focus\:border-green-900:focus{--tw-border-opacity:1;border-color:rgba(6,78,59,var(--tw-border-opacity))}.focus\:border-blue-900:focus{--tw-border-opacity:1;border-color:rgba(30,58,138,var(--tw-border-opacity))}.focus\:border-red-900:focus{--tw-border-opacity:1;border-color:rgba(127,29,29,var(--tw-border-opacity))}.focus\:border-indigo-700:focus{--tw-border-opacity:1;border-color:rgba(67,56,202,var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.focus\:text-gray-700:focus{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus\:ring-indigo-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(199,210,254,var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.active\:bg-gray-900:active{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.active\:bg-green-900:active{--tw-bg-opacity:1;background-color:rgba(6,78,59,var(--tw-bg-opacity))}.active\:bg-blue-900:active{--tw-bg-opacity:1;background-color:rgba(30,58,138,var(--tw-bg-opacity))}.active\:bg-red-900:active{--tw-bg-opacity:1;background-color:rgba(127,29,29,var(--tw-bg-opacity))}.active\:text-green-900:active{--tw-text-opacity:1;color:rgba(6,78,59,var(--tw-text-opacity))}.active\:text-red-900:active{--tw-text-opacity:1;color:rgba(127,29,29,var(--tw-text-opacity))}.disabled\:opacity-25:disabled{opacity:.25}@media (min-width:640px){.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:table-cell{display:table-cell}.sm\:h-48{height:12rem}.sm\:w-auto{width:auto}.sm\:w-5\/12{width:41.666667%}.sm\:w-3\/5{width:60%}.sm\:max-w-md{max-width:28rem}.sm\:max-w-xs{max-width:20rem}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-start{justify-content:flex-start}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem*var(--tw-space-x-reverse));margin-left:calc(0.5rem*(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-0{padding-top:0}}@media (min-width:768px){.md\:mt-0{margin-top:0}.md\:hidden{display:none}.md\:h-64{height:16rem}.md\:w-5\/6{width:83.333333%}.md\:w-72{width:18rem}.md\:w-1\/4{width:25%}.md\:w-3\/4{width:75%}.md\:w-auto{width:auto}.md\:w-2\/3{width:66.666667%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.md\:space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem*var(--tw-space-y-reverse))}.md\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px*var(--tw-space-x-reverse));margin-left:calc(0px*(1 - var(--tw-space-x-reverse)))}.md\:text-9xl{font-size:8rem;line-height:1}}@media (min-width:1024px){.lg\:table-cell{display:table-cell}.lg\:h-96{height:24rem}.lg\:w-4\/12{width:33.333333%}.lg\:w-3\/4{width:75%}.lg\:w-1\/2{width:50%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} +/*! tailwindcss v2.1.2 | MIT License | https://tailwindcss.com*//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder, textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*{--tw-shadow:0 0 transparent;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);border-color:#2563eb}input::-moz-placeholder, textarea::-moz-placeholder{color:#6b7280;opacity:1}input:-ms-input-placeholder, textarea:-ms-input-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}.prose{color:#374151;max-width:65ch}.prose [class~=lead]{color:#4b5563;font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose a{color:#111827;text-decoration:underline;font-weight:500}.prose strong{color:#111827;font-weight:600}.prose ol[type=A]{--list-counter-style:upper-alpha}.prose ol[type=a]{--list-counter-style:lower-alpha}.prose ol[type="A s"]{--list-counter-style:upper-alpha}.prose ol[type="a s"]{--list-counter-style:lower-alpha}.prose ol[type=I]{--list-counter-style:upper-roman}.prose ol[type=i]{--list-counter-style:lower-roman}.prose ol[type="I s"]{--list-counter-style:upper-roman}.prose ol[type="i s"]{--list-counter-style:lower-roman}.prose ol[type="1"]{--list-counter-style:decimal}.prose ol>li{position:relative;padding-left:1.75em}.prose ol>li:before{content:counter(list-item,var(--list-counter-style,decimal)) ".";position:absolute;font-weight:400;color:#6b7280;left:0}.prose ul>li{position:relative;padding-left:1.75em}.prose ul>li:before{content:"";position:absolute;background-color:#d1d5db;border-radius:50%;width:.375em;height:.375em;top:.6875em;left:.25em}.prose hr{border-color:#e5e7eb;border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose blockquote{font-weight:500;font-style:italic;color:#111827;border-left-width:.25rem;border-left-color:#e5e7eb;quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose blockquote p:first-of-type:before{content:open-quote}.prose blockquote p:last-of-type:after{content:close-quote}.prose h1{color:#111827;font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose h2{color:#111827;font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose h3{color:#111827;font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose h4{color:#111827;font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose figure figcaption{color:#6b7280;font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose code{color:#111827;font-weight:600;font-size:.875em}.prose code:after,.prose code:before{content:"`"}.prose a code{color:#111827}.prose pre{color:#e5e7eb;background-color:#1f2937;overflow-x:auto;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose pre code{background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:400;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose pre code:after,.prose pre code:before{content:none}.prose table{width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose thead{color:#111827;font-weight:600;border-bottom-width:1px;border-bottom-color:#d1d5db}.prose thead th{vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose tbody tr{border-bottom-width:1px;border-bottom-color:#e5e7eb}.prose tbody tr:last-child{border-bottom-width:0}.prose tbody td{vertical-align:top;padding:.5714286em}.prose{font-size:1rem;line-height:1.75}.prose p{margin-top:1.25em;margin-bottom:1.25em}.prose figure,.prose img,.prose video{margin-top:2em;margin-bottom:2em}.prose figure>*{margin-top:0;margin-bottom:0}.prose h2 code{font-size:.875em}.prose h3 code{font-size:.9em}.prose ol,.prose ul{margin-top:1.25em;margin-bottom:1.25em}.prose li{margin-top:.5em;margin-bottom:.5em}.prose>ul>li p{margin-top:.75em;margin-bottom:.75em}.prose>ul>li>:first-child{margin-top:1.25em}.prose>ul>li>:last-child{margin-bottom:1.25em}.prose>ol>li>:first-child{margin-top:1.25em}.prose>ol>li>:last-child{margin-bottom:1.25em}.prose ol ol,.prose ol ul,.prose ul ol,.prose ul ul{margin-top:.75em;margin-bottom:.75em}.prose h2+*,.prose h3+*,.prose h4+*,.prose hr+*{margin-top:0}.prose thead th:first-child{padding-left:0}.prose thead th:last-child{padding-right:0}.prose tbody td:first-child{padding-left:0}.prose tbody td:last-child{padding-right:0}.prose>:first-child{margin-top:0}.prose>:last-child{margin-bottom:0}.prose-lg{font-size:1.125rem;line-height:1.7777778}.prose-lg p{margin-top:1.3333333em;margin-bottom:1.3333333em}.prose-lg [class~=lead]{font-size:1.2222222em;line-height:1.4545455;margin-top:1.0909091em;margin-bottom:1.0909091em}.prose-lg blockquote{margin-top:1.6666667em;margin-bottom:1.6666667em;padding-left:1em}.prose-lg h1{font-size:2.6666667em;margin-top:0;margin-bottom:.8333333em;line-height:1}.prose-lg h2{font-size:1.6666667em;margin-top:1.8666667em;margin-bottom:1.0666667em;line-height:1.3333333}.prose-lg h3{font-size:1.3333333em;margin-top:1.6666667em;margin-bottom:.6666667em;line-height:1.5}.prose-lg h4{margin-top:1.7777778em;margin-bottom:.4444444em;line-height:1.5555556}.prose-lg figure,.prose-lg img,.prose-lg video{margin-top:1.7777778em;margin-bottom:1.7777778em}.prose-lg figure>*{margin-top:0;margin-bottom:0}.prose-lg figure figcaption{font-size:.8888889em;line-height:1.5;margin-top:1em}.prose-lg code{font-size:.8888889em}.prose-lg h2 code{font-size:.8666667em}.prose-lg h3 code{font-size:.875em}.prose-lg pre{font-size:.8888889em;line-height:1.75;margin-top:2em;margin-bottom:2em;border-radius:.375rem;padding:1em 1.5em}.prose-lg ol,.prose-lg ul{margin-top:1.3333333em;margin-bottom:1.3333333em}.prose-lg li{margin-top:.6666667em;margin-bottom:.6666667em}.prose-lg ol>li{padding-left:1.6666667em}.prose-lg ol>li:before{left:0}.prose-lg ul>li{padding-left:1.6666667em}.prose-lg ul>li:before{width:.3333333em;height:.3333333em;top:.72222em;left:.2222222em}.prose-lg>ul>li p{margin-top:.8888889em;margin-bottom:.8888889em}.prose-lg>ul>li>:first-child{margin-top:1.3333333em}.prose-lg>ul>li>:last-child{margin-bottom:1.3333333em}.prose-lg>ol>li>:first-child{margin-top:1.3333333em}.prose-lg>ol>li>:last-child{margin-bottom:1.3333333em}.prose-lg ol ol,.prose-lg ol ul,.prose-lg ul ol,.prose-lg ul ul{margin-top:.8888889em;margin-bottom:.8888889em}.prose-lg hr{margin-top:3.1111111em;margin-bottom:3.1111111em}.prose-lg h2+*,.prose-lg h3+*,.prose-lg h4+*,.prose-lg hr+*{margin-top:0}.prose-lg table{font-size:.8888889em;line-height:1.5}.prose-lg thead th{padding-right:.75em;padding-bottom:.75em;padding-left:.75em}.prose-lg thead th:first-child{padding-left:0}.prose-lg thead th:last-child{padding-right:0}.prose-lg tbody td{padding:.75em}.prose-lg tbody td:first-child{padding-left:0}.prose-lg tbody td:last-child{padding-right:0}.prose-lg>:first-child{margin-top:0}.prose-lg>:last-child{margin-bottom:0}.pointer-events-none{pointer-events:none}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-50{z-index:50}.z-40{z-index:40}.float-right{float:right}.m-1{margin:.25rem}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.ml-3{margin-left:.75rem}.mt-2{margin-top:.5rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.mr-1{margin-right:.25rem}.mt-6{margin-top:1.5rem}.mt-3{margin-top:.75rem}.mt-8{margin-top:2rem}.ml-4{margin-left:1rem}.mb-1{margin-bottom:.25rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.-mt-px{margin-top:-1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-8{height:2rem}.h-16{height:4rem}.h-6{height:1.5rem}.h-20{height:5rem}.h-32{height:8rem}.h-24{height:6rem}.h-full{height:100%}.h-10{height:2.5rem}.h-5{height:1.25rem}.min-h-screen{min-height:100vh}.w-48{width:12rem}.w-full{width:100%}.w-8{width:2rem}.w-1\/6{width:16.666667%}.w-4\/6{width:66.666667%}.w-6{width:1.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-10{width:2.5rem}.w-5{width:1.25rem}.w-auto{width:auto}.min-w-max{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.max-w-7xl{max-width:80rem}.max-w-xs{max-width:20rem}.max-w-3xl{max-width:48rem}.max-w-xl{max-width:36rem}.max-w-6xl{max-width:72rem}.flex-auto{flex:1 1 auto}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-grow{flex-grow:1}.table-fixed{table-layout:fixed}.table-auto{table-layout:auto}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.origin-top-left{transform-origin:top left}.origin-top{transform-origin:top}.origin-top-right{transform-origin:top right}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-100{--tw-scale-x:1;--tw-scale-y:1}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.justify-start{justify-content:flex-start}.justify-around{justify-content:space-around}.justify-center{justify-content:center}.gap-4{gap:1rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem*var(--tw-space-y-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem*var(--tw-space-x-reverse));margin-left:calc(0.5rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.25rem*var(--tw-space-y-reverse))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))}.self-center{align-self:center}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border-2{border-width:2px}.border{border-width:1px}.border-0{border-width:0}.border-b-8{border-bottom-width:8px}.border-t-4{border-top-width:4px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-t-8{border-top-width:8px}.border-b-4{border-bottom-width:4px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgba(107,114,128,var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgba(243,244,246,var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.border-red-600{--tw-border-opacity:1;border-color:rgba(220,38,38,var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.border-blue-200{--tw-border-opacity:1;border-color:rgba(191,219,254,var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-indigo-400{--tw-border-opacity:1;border-color:rgba(129,140,248,var(--tw-border-opacity))}.border-blue-100{--tw-border-opacity:1;border-color:rgba(219,234,254,var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgba(156,163,175,var(--tw-border-opacity))}.bg-red-800{--tw-bg-opacity:1;background-color:rgba(153,27,27,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity:1;background-color:rgba(6,95,70,var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgba(30,64,175,var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgba(167,243,208,var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgba(75,85,99,var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(90deg,var(--tw-gradient-stops))}.from-red-400{--tw-gradient-from:#f87171;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(248,113,113,0))}.to-blue-500{--tw-gradient-to:#3b82f6}.bg-cover{background-size:cover}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-clip-border{background-clip:border-box}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.fill-current{fill:currentColor}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-6{padding:1.5rem}.p-0{padding:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pb-3{padding-bottom:.75rem}.pt-6{padding-top:1.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pt-2{padding-top:.5rem}.pt-1{padding-top:.25rem}.pt-8{padding-top:2rem}.pt-12{padding-top:3rem}.text-right{text-align:right}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-5xl{font-size:3rem;line-height:1}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-6xl{font-size:3.75rem;line-height:1}.text-xs{font-size:.75rem;line-height:1rem}.text-base{font-size:1rem;line-height:1.5rem}.font-semibold{font-weight:600}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-bold{font-weight:700}.font-black{font-weight:900}.font-normal{font-weight:400}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-tight{line-height:1.25}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-loose{line-height:2}.leading-relaxed{line-height:1.625}.leading-5{line-height:1.25rem}.leading-snug{line-height:1.375}.leading-7{line-height:1.75rem}.tracking-widest{letter-spacing:.1em}.tracking-wider{letter-spacing:.05em}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgba(245,158,11,var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.text-red-100{--tw-text-opacity:1;color:rgba(254,226,226,var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgba(153,27,27,var(--tw-text-opacity))}.underline{text-decoration:underline}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-5{opacity:.05}.opacity-25{opacity:.25}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)}.shadow-none{--tw-shadow:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgba(0,0,0,var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgba(209,213,219,var(--tw-ring-opacity))}.ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgba(110,231,183,var(--tw-ring-opacity))}.ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgba(147,197,253,var(--tw-ring-opacity))}.ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgba(252,165,165,var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-75{transition-duration:75ms}.duration-150{transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[x-cloak]{display:none!important}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.hover\:border-red-300:hover{--tw-border-opacity:1;border-color:rgba(252,165,165,var(--tw-border-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgba(185,28,28,var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgba(55,65,81,var(--tw-bg-opacity))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgba(79,70,229,var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgba(4,120,87,var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgba(29,78,216,var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity:1;background-color:rgba(252,211,77,var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.focus\:border-indigo-300:focus{--tw-border-opacity:1;border-color:rgba(165,180,252,var(--tw-border-opacity))}.focus\:border-gray-900:focus{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.focus\:border-gray-300:focus{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.focus\:border-green-900:focus{--tw-border-opacity:1;border-color:rgba(6,78,59,var(--tw-border-opacity))}.focus\:border-blue-900:focus{--tw-border-opacity:1;border-color:rgba(30,58,138,var(--tw-border-opacity))}.focus\:border-red-900:focus{--tw-border-opacity:1;border-color:rgba(127,29,29,var(--tw-border-opacity))}.focus\:border-indigo-700:focus{--tw-border-opacity:1;border-color:rgba(67,56,202,var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.focus\:text-gray-700:focus{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus\:ring-indigo-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(199,210,254,var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.active\:bg-gray-900:active{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.active\:bg-green-900:active{--tw-bg-opacity:1;background-color:rgba(6,78,59,var(--tw-bg-opacity))}.active\:bg-blue-900:active{--tw-bg-opacity:1;background-color:rgba(30,58,138,var(--tw-bg-opacity))}.active\:bg-red-900:active{--tw-bg-opacity:1;background-color:rgba(127,29,29,var(--tw-bg-opacity))}.active\:text-green-900:active{--tw-text-opacity:1;color:rgba(6,78,59,var(--tw-text-opacity))}.active\:text-red-900:active{--tw-text-opacity:1;color:rgba(127,29,29,var(--tw-text-opacity))}.disabled\:opacity-25:disabled{opacity:.25}@media (min-width:640px){.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:table-cell{display:table-cell}.sm\:h-48{height:12rem}.sm\:w-auto{width:auto}.sm\:w-1\/12{width:8.333333%}.sm\:w-5\/6{width:83.333333%}.sm\:w-5\/12{width:41.666667%}.sm\:w-3\/5{width:60%}.sm\:max-w-md{max-width:28rem}.sm\:max-w-xs{max-width:20rem}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-start{justify-content:flex-start}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem*var(--tw-space-x-reverse));margin-left:calc(0.5rem*(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-0{padding-top:0}}@media (min-width:768px){.md\:mt-0{margin-top:0}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-64{height:16rem}.md\:w-5\/6{width:83.333333%}.md\:w-72{width:18rem}.md\:w-1\/4{width:25%}.md\:w-3\/4{width:75%}.md\:w-auto{width:auto}.md\:w-2\/3{width:66.666667%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.md\:space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem*var(--tw-space-y-reverse))}.md\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px*var(--tw-space-x-reverse));margin-left:calc(0px*(1 - var(--tw-space-x-reverse)))}.md\:text-9xl{font-size:8rem;line-height:1}}@media (min-width:1024px){.lg\:table-cell{display:table-cell}.lg\:h-96{height:24rem}.lg\:w-4\/12{width:33.333333%}.lg\:w-3\/4{width:75%}.lg\:w-1\/2{width:50%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/public/js/draggable.js b/public/js/draggable.js new file mode 100644 index 0000000..99e89d3 --- /dev/null +++ b/public/js/draggable.js @@ -0,0 +1 @@ +(()=>{var e={4320:e=>{var t;window,t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=72)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(66),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(70),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57);Object.defineProperty(t,"closest",{enumerable:!0,get:function(){return a(n).default}});var o=r(55);Object.defineProperty(t,"requestNextAnimationFrame",{enumerable:!0,get:function(){return a(o).default}});var s=r(53);Object.defineProperty(t,"distance",{enumerable:!0,get:function(){return a(s).default}});var i=r(51);function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"touchCoords",{enumerable:!0,get:function(){return a(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(49),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(13);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var s=r(12);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var i=r(6);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var a,l=r(39),u=(a=l)&&a.__esModule?a:{default:a};t.default=u.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4);Object.defineProperty(t,"Sensor",{enumerable:!0,get:function(){return u(n).default}});var o=r(48);Object.defineProperty(t,"MouseSensor",{enumerable:!0,get:function(){return u(o).default}});var s=r(45);Object.defineProperty(t,"TouchSensor",{enumerable:!0,get:function(){return u(s).default}});var i=r(43);Object.defineProperty(t,"DragSensor",{enumerable:!0,get:function(){return u(i).default}});var a=r(41);Object.defineProperty(t,"ForceTouchSensor",{enumerable:!0,get:function(){return u(a).default}});var l=r(3);function u(e){return e&&e.__esModule?e:{default:e}}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(29);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(35);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(68);Object.defineProperty(t,"Announcement",{enumerable:!0,get:function(){return a(n).default}}),Object.defineProperty(t,"defaultAnnouncementOptions",{enumerable:!0,get:function(){return n.defaultOptions}});var o=r(65);Object.defineProperty(t,"Focusable",{enumerable:!0,get:function(){return a(o).default}});var s=r(63);Object.defineProperty(t,"Mirror",{enumerable:!0,get:function(){return a(s).default}}),Object.defineProperty(t,"defaultMirrorOptions",{enumerable:!0,get:function(){return s.defaultOptions}});var i=r(59);function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Scrollable",{enumerable:!0,get:function(){return a(i).default}}),Object.defineProperty(t,"defaultScrollableOptions",{enumerable:!0,get:function(){return i.defaultOptions}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(69);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t({domEl:e,offsetTop:e.offsetTop,offsetLeft:e.offsetLeft})))}[a]({oldIndex:e,newIndex:t}){if(e===t)return;const r=[];let n,o,s;e>t?(n=t,o=e-1,s=1):(n=e+1,o=t,s=-1);for(let e=n;e<=o;e++){const t=this.lastElements[e],n=this.lastElements[e+s];r.push({from:t,to:n})}cancelAnimationFrame(this.lastAnimationFrame),this.lastAnimationFrame=requestAnimationFrame((()=>{r.forEach((e=>function({from:e,to:t},{duration:r,easingFunction:n}){const o=e.domEl,s=e.offsetLeft-t.offsetLeft,i=e.offsetTop-t.offsetTop;o.style.pointerEvents="none",o.style.transform=`translate3d(${s}px, ${i}px, 0)`,requestAnimationFrame((()=>{o.addEventListener("transitionend",d),o.style.transition=`transform ${r}ms ${n}`,o.style.transform=""}))}(e,this.options)))}))}}function d(e){e.target.style.transition="",e.target.style.pointerEvents="",e.target.removeEventListener("transitionend",d)}t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(15),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t{e>=t?c(n,o,this.options):c(o,n,this.options)}))}}function c(e,t,{duration:r,easingFunction:n,horizontal:o}){for(const r of[e,t])r.style.pointerEvents="none";if(o){const r=e.offsetWidth;e.style.transform=`translate3d(${r}px, 0, 0)`,t.style.transform=`translate3d(-${r}px, 0, 0)`}else{const r=e.offsetHeight;e.style.transform=`translate3d(0, ${r}px, 0)`,t.style.transform=`translate3d(0, -${r}px, 0)`}requestAnimationFrame((()=>{for(const o of[e,t])o.addEventListener("transitionend",d),o.style.transition=`transform ${r}ms ${n}`,o.style.transform=""}))}function d(e){e.target.style.transition="",e.target.style.pointerEvents="",e.target.removeEventListener("transitionend",d)}t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(17),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),s=(n=o)&&n.__esModule?n:{default:n},i=r(7);const a=Symbol("onDragStart"),l=Symbol("onDragStop"),u=Symbol("onDragOver"),c=Symbol("onDragOut"),d=Symbol("onMirrorCreated"),h=Symbol("onMirrorDestroy");class g extends s.default{constructor(e){super(e),this.firstSource=null,this.mirror=null,this[a]=this[a].bind(this),this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this)}attach(){this.draggable.on("drag:start",this[a]).on("drag:stop",this[l]).on("drag:over",this[u]).on("drag:out",this[c]).on("droppable:over",this[u]).on("droppable:out",this[c]).on("mirror:created",this[d]).on("mirror:destroy",this[h])}detach(){this.draggable.off("drag:start",this[a]).off("drag:stop",this[l]).off("drag:over",this[u]).off("drag:out",this[c]).off("droppable:over",this[u]).off("droppable:out",this[c]).off("mirror:created",this[d]).off("mirror:destroy",this[h])}[a](e){e.canceled()||(this.firstSource=e.source)}[l](){this.firstSource=null}[u](e){if(e.canceled())return;const t=e.source||e.dragEvent.source;if(t===this.firstSource)return void(this.firstSource=null);const r=new i.SnapInEvent({dragEvent:e,snappable:e.over||e.droppable});this.draggable.trigger(r),r.canceled()||(this.mirror&&(this.mirror.style.display="none"),t.classList.remove(...this.draggable.getClassNamesFor("source:dragging")),t.classList.add(...this.draggable.getClassNamesFor("source:placed")),setTimeout((()=>{t.classList.remove(...this.draggable.getClassNamesFor("source:placed"))}),this.draggable.options.placedTimeout))}[c](e){if(e.canceled())return;const t=e.source||e.dragEvent.source,r=new i.SnapOutEvent({dragEvent:e,snappable:e.over||e.droppable});this.draggable.trigger(r),r.canceled()||(this.mirror&&(this.mirror.style.display=""),t.classList.add(...this.draggable.getClassNamesFor("source:dragging")))}[d]({mirror:e}){this.mirror=e}[h](){this.mirror=null}}t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnapOutEvent=t.SnapInEvent=t.SnapEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}get snappable(){return this.data.snappable}}t.SnapEvent=i,i.type="snap";class a extends i{}t.SnapInEvent=a,a.type="snap:in",a.cancelable=!0;class l extends i{}t.SnapOutEvent=l,l.type="snap:out",l.cancelable=!0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(19),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t{if(!this.mirror.parentNode)return;this.mirror.parentNode!==e&&e.appendChild(this.mirror);const r=t||this.draggable.getDraggableElementsForContainer(e)[0];r&&(0,a.requestNextAnimationFrame)((()=>{const e=r.getBoundingClientRect();this.lastHeight===e.height&&this.lastWidth===e.width||(this.mirror.style.width=`${e.width}px`,this.mirror.style.height=`${e.height}px`,this.lastWidth=e.width,this.lastHeight=e.height)}))}))}}t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(22),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),s=(n=o)&&n.__esModule?n:{default:n},i=r(2),a=r(8);const l=Symbol("onDragMove"),u=Symbol("onDragStop"),c=Symbol("onRequestAnimationFrame");class d extends s.default{constructor(e){super(e),this.currentlyCollidingElement=null,this.lastCollidingElement=null,this.currentAnimationFrame=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this)}attach(){this.draggable.on("drag:move",this[l]).on("drag:stop",this[u])}detach(){this.draggable.off("drag:move",this[l]).off("drag:stop",this[u])}getCollidables(){const e=this.draggable.options.collidables;return"string"==typeof e?Array.prototype.slice.call(document.querySelectorAll(e)):e instanceof NodeList||e instanceof Array?Array.prototype.slice.call(e):e instanceof HTMLElement?[e]:"function"==typeof e?e():[]}[l](e){const t=e.sensorEvent.target;this.currentAnimationFrame=requestAnimationFrame(this[c](t)),this.currentlyCollidingElement&&e.cancel();const r=new a.CollidableInEvent({dragEvent:e,collidingElement:this.currentlyCollidingElement}),n=new a.CollidableOutEvent({dragEvent:e,collidingElement:this.lastCollidingElement}),o=Boolean(this.currentlyCollidingElement&&this.lastCollidingElement!==this.currentlyCollidingElement),s=Boolean(!this.currentlyCollidingElement&&this.lastCollidingElement);o?(this.lastCollidingElement&&this.draggable.trigger(n),this.draggable.trigger(r)):s&&this.draggable.trigger(n),this.lastCollidingElement=this.currentlyCollidingElement}[u](e){const t=this.currentlyCollidingElement||this.lastCollidingElement,r=new a.CollidableOutEvent({dragEvent:e,collidingElement:t});t&&this.draggable.trigger(r),this.lastCollidingElement=null,this.currentlyCollidingElement=null}[c](e){return()=>{const t=this.getCollidables();this.currentlyCollidingElement=(0,i.closest)(e,(e=>t.includes(e)))}}}t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollidableOutEvent=t.CollidableInEvent=t.CollidableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}}t.CollidableEvent=i,i.type="collidable";class a extends i{get collidingElement(){return this.data.collidingElement}}t.CollidableInEvent=a,a.type="collidable:in";class l extends i{get collidingElement(){return this.data.collidingElement}}t.CollidableOutEvent=l,l.type="collidable:out"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(24),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(26);Object.defineProperty(t,"Collidable",{enumerable:!0,get:function(){return l(n).default}});var o=r(23);Object.defineProperty(t,"ResizeMirror",{enumerable:!0,get:function(){return l(o).default}}),Object.defineProperty(t,"defaultResizeMirrorOptions",{enumerable:!0,get:function(){return o.defaultOptions}});var s=r(21);Object.defineProperty(t,"Snappable",{enumerable:!0,get:function(){return l(s).default}});var i=r(18);Object.defineProperty(t,"SwapAnimation",{enumerable:!0,get:function(){return l(i).default}}),Object.defineProperty(t,"defaultSwapAnimationOptions",{enumerable:!0,get:function(){return i.defaultOptions}});var a=r(16);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"SortAnimation",{enumerable:!0,get:function(){return l(a).default}}),Object.defineProperty(t,"defaultSortAnimationOptions",{enumerable:!0,get:function(){return a.defaultOptions}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;tt!==this.originalSource&&t!==this.mirror&&t.parentNode===e))}[l](e){this.startContainer=e.source.parentNode,this.startIndex=this.index(e.source);const t=new a.SortableStartEvent({dragEvent:e,startIndex:this.startIndex,startContainer:this.startContainer});this.trigger(t),t.canceled()&&e.cancel()}[u](e){if(e.canceled())return;const{source:t,over:r,overContainer:n}=e,o=this.index(t),s=new a.SortableSortEvent({dragEvent:e,currentIndex:o,source:t,over:r});if(this.trigger(s),s.canceled())return;const i=p({source:t,over:r,overContainer:n,children:this.getSortableElementsForContainer(n)});if(!i)return;const{oldContainer:l,newContainer:u}=i,c=this.index(e.source),d=new a.SortableSortedEvent({dragEvent:e,oldIndex:o,newIndex:c,oldContainer:l,newContainer:u});this.trigger(d)}[c](e){if(e.over===e.originalSource||e.over===e.source)return;const{source:t,over:r,overContainer:n}=e,o=this.index(t),s=new a.SortableSortEvent({dragEvent:e,currentIndex:o,source:t,over:r});if(this.trigger(s),s.canceled())return;const i=p({source:t,over:r,overContainer:n,children:this.getDraggableElementsForContainer(n)});if(!i)return;const{oldContainer:l,newContainer:u}=i,c=this.index(t),d=new a.SortableSortedEvent({dragEvent:e,oldIndex:o,newIndex:c,oldContainer:l,newContainer:u});this.trigger(d)}[d](e){const t=new a.SortableStopEvent({dragEvent:e,oldIndex:this.startIndex,newIndex:this.index(e.source),oldContainer:this.startContainer,newContainer:e.source.parentNode});this.trigger(t),this.startIndex=null,this.startContainer=null}}function f(e){return Array.prototype.indexOf.call(e.parentNode.children,e)}function p({source:e,over:t,overContainer:r,children:n}){const o=!n.length,s=e.parentNode!==r,i=t&&e.parentNode===t.parentNode;return o?function(e,t){const r=e.parentNode;return t.appendChild(e),{oldContainer:r,newContainer:t}}(e,r):i?function(e,t){const r=f(e),n=f(t);return r{n.insertBefore(o,e),r.insertBefore(e,t),n.insertBefore(t,o)}))}t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwappableStopEvent=t.SwappableSwappedEvent=t.SwappableSwapEvent=t.SwappableStartEvent=t.SwappableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}}t.SwappableEvent=i,i.type="swappable";class a extends i{}t.SwappableStartEvent=a,a.type="swappable:start",a.cancelable=!0;class l extends i{get over(){return this.data.over}get overContainer(){return this.data.overContainer}}t.SwappableSwapEvent=l,l.type="swappable:swap",l.cancelable=!0;class u extends i{get swappedElement(){return this.data.swappedElement}}t.SwappableSwappedEvent=u,u.type="swappable:swapped";class c extends i{}t.SwappableStopEvent=c,c.type="swappable:stop"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(31),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t=0;n--){const o=t[n];try{o(e)}catch(e){r.push(e)}}return r.length&&console.error(`Draggable caught errors while triggering '${e.type}'`,r),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(37),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t`Picked up ${e.source.textContent.trim()||e.source.id||"draggable element"}`,"drag:stop":e=>`Released ${e.source.textContent.trim()||e.source.id||"draggable element"}`},m={"container:dragging":"draggable-container--is-dragging","source:dragging":"draggable-source--is-dragging","source:placed":"draggable-source--placed","container:placed":"draggable-container--placed","body:dragging":"draggable--is-dragging","draggable:over":"draggable--over","container:over":"draggable-container--over","source:original":"draggable--original",mirror:"draggable-mirror"},b=t.defaultOptions={draggable:".draggable-source",handle:null,delay:{},distance:0,placedTimeout:800,plugins:[],sensors:[],exclude:{plugins:[],sensors:[]}};class y{constructor(e=[document.body],t={}){if(e instanceof NodeList||e instanceof Array)this.containers=[...e];else{if(!(e instanceof HTMLElement))throw new Error("Draggable containers are expected to be of type `NodeList`, `HTMLElement[]` or `HTMLElement`");this.containers=[e]}this.options=o({},b,t,{classes:o({},m,t.classes||{}),announcements:o({},v,t.announcements||{}),exclude:{plugins:t.exclude&&t.exclude.plugins||[],sensors:t.exclude&&t.exclude.sensors||[]}}),this.emitter=new l.default,this.dragging=!1,this.plugins=[],this.sensors=[],this[h]=this[h].bind(this),this[g]=this[g].bind(this),this[f]=this[f].bind(this),this[p]=this[p].bind(this),document.addEventListener("drag:start",this[h],!0),document.addEventListener("drag:move",this[g],!0),document.addEventListener("drag:stop",this[f],!0),document.addEventListener("drag:pressure",this[p],!0);const r=Object.values(y.Plugins).filter((e=>!this.options.exclude.plugins.includes(e))),n=Object.values(y.Sensors).filter((e=>!this.options.exclude.sensors.includes(e)));this.addPlugin(...r,...this.options.plugins),this.addSensor(...n,...this.options.sensors);const s=new c.DraggableInitializedEvent({draggable:this});this.on("mirror:created",(({mirror:e})=>this.mirror=e)),this.on("mirror:destroy",(()=>this.mirror=null)),this.trigger(s)}destroy(){document.removeEventListener("drag:start",this[h],!0),document.removeEventListener("drag:move",this[g],!0),document.removeEventListener("drag:stop",this[f],!0),document.removeEventListener("drag:pressure",this[p],!0);const e=new c.DraggableDestroyEvent({draggable:this});this.trigger(e),this.removePlugin(...this.plugins.map((e=>e.constructor))),this.removeSensor(...this.sensors.map((e=>e.constructor)))}addPlugin(...e){const t=e.map((e=>new e(this)));return t.forEach((e=>e.attach())),this.plugins=[...this.plugins,...t],this}removePlugin(...e){return this.plugins.filter((t=>e.includes(t.constructor))).forEach((e=>e.detach())),this.plugins=this.plugins.filter((t=>!e.includes(t.constructor))),this}addSensor(...e){const t=e.map((e=>new e(this.containers,this.options)));return t.forEach((e=>e.attach())),this.sensors=[...this.sensors,...t],this}removeSensor(...e){return this.sensors.filter((t=>e.includes(t.constructor))).forEach((e=>e.detach())),this.sensors=this.sensors.filter((t=>!e.includes(t.constructor))),this}addContainer(...e){return this.containers=[...this.containers,...e],this.sensors.forEach((t=>t.addContainer(...e))),this}removeContainer(...e){return this.containers=this.containers.filter((t=>!e.includes(t))),this.sensors.forEach((t=>t.removeContainer(...e))),this}on(e,...t){return this.emitter.on(e,...t),this}off(e,t){return this.emitter.off(e,t),this}trigger(e){return this.emitter.trigger(e),this}getClassNameFor(e){return this.getClassNamesFor(e)[0]}getClassNamesFor(e){const t=this.options.classes[e];return t instanceof Array?t:"string"==typeof t||t instanceof String?[t]:[]}isDragging(){return Boolean(this.dragging)}getDraggableElements(){return this.containers.reduce(((e,t)=>[...e,...this.getDraggableElementsForContainer(t)]),[])}getDraggableElementsForContainer(e){return[...e.querySelectorAll(this.options.draggable)].filter((e=>e!==this.originalSource&&e!==this.mirror))}[h](e){const t=E(e),{target:r,container:n}=t;if(!this.containers.includes(n))return;if(this.options.handle&&r&&!(0,s.closest)(r,this.options.handle))return void t.cancel();if(this.originalSource=(0,s.closest)(r,this.options.draggable),this.sourceContainer=n,!this.originalSource)return void t.cancel();this.lastPlacedSource&&this.lastPlacedContainer&&(clearTimeout(this.placedTimeoutID),this.lastPlacedSource.classList.remove(...this.getClassNamesFor("source:placed")),this.lastPlacedContainer.classList.remove(...this.getClassNamesFor("container:placed"))),this.source=this.originalSource.cloneNode(!0),this.originalSource.parentNode.insertBefore(this.source,this.originalSource),this.originalSource.style.display="none";const i=new d.DragStartEvent({source:this.source,originalSource:this.originalSource,sourceContainer:n,sensorEvent:t});if(this.trigger(i),this.dragging=!i.canceled(),i.canceled())return this.source.parentNode.removeChild(this.source),void(this.originalSource.style.display=null);this.originalSource.classList.add(...this.getClassNamesFor("source:original")),this.source.classList.add(...this.getClassNamesFor("source:dragging")),this.sourceContainer.classList.add(...this.getClassNamesFor("container:dragging")),document.body.classList.add(...this.getClassNamesFor("body:dragging")),S(document.body,"none"),requestAnimationFrame((()=>{const t=E(e).clone({target:this.source});this[g](o({},e,{detail:t}))}))}[g](e){if(!this.dragging)return;const t=E(e),{container:r}=t;let n=t.target;const o=new d.DragMoveEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t});this.trigger(o),o.canceled()&&t.cancel(),n=(0,s.closest)(n,this.options.draggable);const i=(0,s.closest)(t.target,this.containers),a=t.overContainer||i,l=this.currentOverContainer&&a!==this.currentOverContainer,u=this.currentOver&&n!==this.currentOver,c=a&&this.currentOverContainer!==a,h=i&&n&&this.currentOver!==n;if(u){const e=new d.DragOutEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,over:this.currentOver,overContainer:this.currentOverContainer});this.currentOver.classList.remove(...this.getClassNamesFor("draggable:over")),this.currentOver=null,this.trigger(e)}if(l){const e=new d.DragOutContainerEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,overContainer:this.currentOverContainer});this.currentOverContainer.classList.remove(...this.getClassNamesFor("container:over")),this.currentOverContainer=null,this.trigger(e)}if(c){a.classList.add(...this.getClassNamesFor("container:over"));const e=new d.DragOverContainerEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,overContainer:a});this.currentOverContainer=a,this.trigger(e)}if(h){n.classList.add(...this.getClassNamesFor("draggable:over"));const e=new d.DragOverEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,overContainer:a,over:n});this.currentOver=n,this.trigger(e)}}[f](e){if(!this.dragging)return;this.dragging=!1;const t=new d.DragStopEvent({source:this.source,originalSource:this.originalSource,sensorEvent:e.sensorEvent,sourceContainer:this.sourceContainer});this.trigger(t),this.source.parentNode.insertBefore(this.originalSource,this.source),this.source.parentNode.removeChild(this.source),this.originalSource.style.display="",this.source.classList.remove(...this.getClassNamesFor("source:dragging")),this.originalSource.classList.remove(...this.getClassNamesFor("source:original")),this.originalSource.classList.add(...this.getClassNamesFor("source:placed")),this.sourceContainer.classList.add(...this.getClassNamesFor("container:placed")),this.sourceContainer.classList.remove(...this.getClassNamesFor("container:dragging")),document.body.classList.remove(...this.getClassNamesFor("body:dragging")),S(document.body,""),this.currentOver&&this.currentOver.classList.remove(...this.getClassNamesFor("draggable:over")),this.currentOverContainer&&this.currentOverContainer.classList.remove(...this.getClassNamesFor("container:over")),this.lastPlacedSource=this.originalSource,this.lastPlacedContainer=this.sourceContainer,this.placedTimeoutID=setTimeout((()=>{this.lastPlacedSource&&this.lastPlacedSource.classList.remove(...this.getClassNamesFor("source:placed")),this.lastPlacedContainer&&this.lastPlacedContainer.classList.remove(...this.getClassNamesFor("container:placed")),this.lastPlacedSource=null,this.lastPlacedContainer=null}),this.options.placedTimeout);const r=new d.DragStoppedEvent({source:this.source,originalSource:this.originalSource,sensorEvent:e.sensorEvent,sourceContainer:this.sourceContainer});this.trigger(r),this.source=null,this.originalSource=null,this.currentOverContainer=null,this.currentOver=null,this.sourceContainer=null}[p](e){if(!this.dragging)return;const t=E(e),r=this.source||(0,s.closest)(t.originalEvent.target,this.options.draggable),n=new d.DragPressureEvent({sensorEvent:t,source:r,pressure:t.pressure});this.trigger(n)}}function E(e){return e.detail}function S(e,t){e.style.webkitUserSelect=t,e.style.mozUserSelect=t,e.style.msUserSelect=t,e.style.oUserSelect=t,e.style.userSelect=t}t.default=y,y.Plugins={Announcement:i.Announcement,Focusable:i.Focusable,Mirror:i.Mirror,Scrollable:i.Scrollable},y.Sensors={MouseSensor:u.MouseSensor,TouchSensor:u.TouchSensor}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(4),s=(n=o)&&n.__esModule?n:{default:n},i=r(3);const a=Symbol("onMouseForceWillBegin"),l=Symbol("onMouseForceDown"),u=Symbol("onMouseDown"),c=Symbol("onMouseForceChange"),d=Symbol("onMouseMove"),h=Symbol("onMouseUp"),g=Symbol("onMouseForceGlobalChange");class f extends s.default{constructor(e=[],t={}){super(e,t),this.mightDrag=!1,this[a]=this[a].bind(this),this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this)}attach(){for(const e of this.containers)e.addEventListener("webkitmouseforcewillbegin",this[a],!1),e.addEventListener("webkitmouseforcedown",this[l],!1),e.addEventListener("mousedown",this[u],!0),e.addEventListener("webkitmouseforcechanged",this[c],!1);document.addEventListener("mousemove",this[d]),document.addEventListener("mouseup",this[h])}detach(){for(const e of this.containers)e.removeEventListener("webkitmouseforcewillbegin",this[a],!1),e.removeEventListener("webkitmouseforcedown",this[l],!1),e.removeEventListener("mousedown",this[u],!0),e.removeEventListener("webkitmouseforcechanged",this[c],!1);document.removeEventListener("mousemove",this[d]),document.removeEventListener("mouseup",this[h])}[a](e){e.preventDefault(),this.mightDrag=!0}[l](e){if(this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=e.currentTarget,n=new i.DragStartSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n),this.currentContainer=r,this.dragging=!n.canceled(),this.mightDrag=!1}[h](e){if(!this.dragging)return;const t=new i.DragStopSensorEvent({clientX:e.clientX,clientY:e.clientY,target:null,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,t),this.currentContainer=null,this.dragging=!1,this.mightDrag=!1}[u](e){this.mightDrag&&(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault())}[d](e){if(!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=new i.DragMoveSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r)}[c](e){if(this.dragging)return;const t=e.target,r=e.currentTarget,n=new i.DragPressureSensorEvent({pressure:e.webkitForce,clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n)}[g](e){if(!this.dragging)return;const t=e.target,r=new i.DragPressureSensorEvent({pressure:e.webkitForce,clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r)}}t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(40),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),s=r(4),i=(n=s)&&n.__esModule?n:{default:n},a=r(3);const l=Symbol("onMouseDown"),u=Symbol("onMouseUp"),c=Symbol("onDragStart"),d=Symbol("onDragOver"),h=Symbol("onDragEnd"),g=Symbol("onDrop"),f=Symbol("reset");class p extends i.default{constructor(e=[],t={}){super(e,t),this.mouseDownTimeout=null,this.draggableElement=null,this.nativeDraggableElement=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this),this[g]=this[g].bind(this)}attach(){document.addEventListener("mousedown",this[l],!0)}detach(){document.removeEventListener("mousedown",this[l],!0)}[c](e){e.dataTransfer.setData("text",""),e.dataTransfer.effectAllowed=this.options.type;const t=document.elementFromPoint(e.clientX,e.clientY);if(this.currentContainer=(0,o.closest)(e.target,this.containers),!this.currentContainer)return;const r=new a.DragStartSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});setTimeout((()=>{this.trigger(this.currentContainer,r),r.canceled()?this.dragging=!1:this.dragging=!0}),0)}[d](e){if(!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=this.currentContainer,n=new a.DragMoveSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n),n.canceled()||(e.preventDefault(),e.dataTransfer.dropEffect=this.options.type)}[h](e){if(!this.dragging)return;document.removeEventListener("mouseup",this[u],!0);const t=document.elementFromPoint(e.clientX,e.clientY),r=this.currentContainer,n=new a.DragStopSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n),this.dragging=!1,this.startEvent=null,this[f]()}[g](e){e.preventDefault()}[l](e){if(e.target&&(e.target.form||e.target.contenteditable))return;const t=(0,o.closest)(e.target,(e=>e.draggable));t&&(t.draggable=!1,this.nativeDraggableElement=t),document.addEventListener("mouseup",this[u],!0),document.addEventListener("dragstart",this[c],!1),document.addEventListener("dragover",this[d],!1),document.addEventListener("dragend",this[h],!1),document.addEventListener("drop",this[g],!1);const r=(0,o.closest)(e.target,this.options.draggable);r&&(this.startEvent=e,this.mouseDownTimeout=setTimeout((()=>{r.draggable=!0,this.draggableElement=r}),this.delay.drag))}[u](){this[f]()}[f](){clearTimeout(this.mouseDownTimeout),document.removeEventListener("mouseup",this[u],!0),document.removeEventListener("dragstart",this[c],!1),document.removeEventListener("dragover",this[d],!1),document.removeEventListener("dragend",this[h],!1),document.removeEventListener("drop",this[g],!1),this.nativeDraggableElement&&(this.nativeDraggableElement.draggable=!0,this.nativeDraggableElement=null),this.draggableElement&&(this.draggableElement.draggable=!1,this.draggableElement=null)}}t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(42),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),s=r(4),i=(n=s)&&n.__esModule?n:{default:n},a=r(3);const l=Symbol("onTouchStart"),u=Symbol("onTouchEnd"),c=Symbol("onTouchMove"),d=Symbol("startDrag"),h=Symbol("onDistanceChange");let g=!1;window.addEventListener("touchmove",(e=>{g&&e.preventDefault()}),{passive:!1});class f extends i.default{constructor(e=[],t={}){super(e,t),this.currentScrollableParent=null,this.tapTimeout=null,this.touchMoved=!1,this.pageX=null,this.pageY=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this)}attach(){document.addEventListener("touchstart",this[l])}detach(){document.removeEventListener("touchstart",this[l])}[l](e){const t=(0,o.closest)(e.target,this.containers);if(!t)return;const{distance:r=0}=this.options,{delay:n}=this,{pageX:s,pageY:i}=(0,o.touchCoords)(e);Object.assign(this,{pageX:s,pageY:i}),this.onTouchStartAt=Date.now(),this.startEvent=e,this.currentContainer=t,document.addEventListener("touchend",this[u]),document.addEventListener("touchcancel",this[u]),document.addEventListener("touchmove",this[h]),t.addEventListener("contextmenu",p),r&&(g=!0),this.tapTimeout=window.setTimeout((()=>{this[h]({touches:[{pageX:this.pageX,pageY:this.pageY}]})}),n.touch)}[d](){const e=this.startEvent,t=this.currentContainer,r=(0,o.touchCoords)(e),n=new a.DragStartSensorEvent({clientX:r.pageX,clientY:r.pageY,target:e.target,container:t,originalEvent:e});this.trigger(this.currentContainer,n),this.dragging=!n.canceled(),this.dragging&&document.addEventListener("touchmove",this[c]),g=this.dragging}[h](e){const{distance:t}=this.options,{startEvent:r,delay:n}=this,s=(0,o.touchCoords)(r),i=(0,o.touchCoords)(e),a=Date.now()-this.onTouchStartAt,l=(0,o.distance)(s.pageX,s.pageY,i.pageX,i.pageY);Object.assign(this,i),clearTimeout(this.tapTimeout),a=t&&(document.removeEventListener("touchmove",this[h]),this[d]())}[c](e){if(!this.dragging)return;const{pageX:t,pageY:r}=(0,o.touchCoords)(e),n=document.elementFromPoint(t-window.scrollX,r-window.scrollY),s=new a.DragMoveSensorEvent({clientX:t,clientY:r,target:n,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,s)}[u](e){if(clearTimeout(this.tapTimeout),g=!1,document.removeEventListener("touchend",this[u]),document.removeEventListener("touchcancel",this[u]),document.removeEventListener("touchmove",this[h]),this.currentContainer&&this.currentContainer.removeEventListener("contextmenu",p),!this.dragging)return;document.removeEventListener("touchmove",this[c]);const{pageX:t,pageY:r}=(0,o.touchCoords)(e),n=document.elementFromPoint(t-window.scrollX,r-window.scrollY);e.preventDefault();const s=new a.DragStopSensorEvent({clientX:t,clientY:r,target:n,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,s),this.currentContainer=null,this.dragging=!1,this.startEvent=null}}function p(e){e.preventDefault(),e.stopPropagation()}t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(44),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DragPressureSensorEvent=t.DragStopSensorEvent=t.DragMoveSensorEvent=t.DragStartSensorEvent=t.SensorEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get originalEvent(){return this.data.originalEvent}get clientX(){return this.data.clientX}get clientY(){return this.data.clientY}get target(){return this.data.target}get container(){return this.data.container}get pressure(){return this.data.pressure}}t.SensorEvent=i;class a extends i{}t.DragStartSensorEvent=a,a.type="drag:start";class l extends i{}t.DragMoveSensorEvent=l,l.type="drag:move";class u extends i{}t.DragStopSensorEvent=u,u.type="drag:stop";class c extends i{}t.DragPressureSensorEvent=c,c.type="drag:pressure"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),s=r(4),i=(n=s)&&n.__esModule?n:{default:n},a=r(3);const l=Symbol("onContextMenuWhileDragging"),u=Symbol("onMouseDown"),c=Symbol("onMouseMove"),d=Symbol("onMouseUp"),h=Symbol("startDrag"),g=Symbol("onDistanceChange");class f extends i.default{constructor(e=[],t={}){super(e,t),this.mouseDownTimeout=null,this.pageX=null,this.pageY=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this),this[g]=this[g].bind(this)}attach(){document.addEventListener("mousedown",this[u],!0)}detach(){document.removeEventListener("mousedown",this[u],!0)}[u](e){if(0!==e.button||e.ctrlKey||e.metaKey)return;const t=(0,o.closest)(e.target,this.containers);if(!t)return;const{delay:r}=this,{pageX:n,pageY:s}=e;Object.assign(this,{pageX:n,pageY:s}),this.onMouseDownAt=Date.now(),this.startEvent=e,this.currentContainer=t,document.addEventListener("mouseup",this[d]),document.addEventListener("dragstart",p),document.addEventListener("mousemove",this[g]),this.mouseDownTimeout=window.setTimeout((()=>{this[g]({pageX:this.pageX,pageY:this.pageY})}),r.mouse)}[h](){const e=this.startEvent,t=this.currentContainer,r=new a.DragStartSensorEvent({clientX:e.clientX,clientY:e.clientY,target:e.target,container:t,originalEvent:e});this.trigger(this.currentContainer,r),this.dragging=!r.canceled(),this.dragging&&(document.addEventListener("contextmenu",this[l],!0),document.addEventListener("mousemove",this[c]))}[g](e){const{pageX:t,pageY:r}=e,{distance:n}=this.options,{startEvent:s,delay:i}=this;if(Object.assign(this,{pageX:t,pageY:r}),!this.currentContainer)return;const a=Date.now()-this.onMouseDownAt,l=(0,o.distance)(s.pageX,s.pageY,t,r)||0;clearTimeout(this.mouseDownTimeout),a=n&&(document.removeEventListener("mousemove",this[g]),this[h]())}[c](e){if(!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=new a.DragMoveSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r)}[d](e){if(clearTimeout(this.mouseDownTimeout),0!==e.button)return;if(document.removeEventListener("mouseup",this[d]),document.removeEventListener("dragstart",p),document.removeEventListener("mousemove",this[g]),!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=new a.DragStopSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r),document.removeEventListener("contextmenu",this[l],!0),document.removeEventListener("mousemove",this[c]),this.currentContainer=null,this.dragging=!1,this.startEvent=null}[l](e){e.preventDefault()}}function p(e){e.preventDefault()}t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(47),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t!e.includes(t)))}trigger(e,t){const r=document.createEvent("Event");return r.detail=t,r.initEvent(t.type,!0,!0),e.dispatchEvent(r),this.lastEvent=t,t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={}){const{touches:t,changedTouches:r}=e;return t&&t[0]||r&&r[0]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(50),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){return Math.sqrt((r-e)**2+(n-t)**2)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(52),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return requestAnimationFrame((()=>{requestAnimationFrame(e)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(54),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)return null;const r=t,o=t,s=t,i=t,a=Boolean("string"==typeof t),l=Boolean("function"==typeof t),u=Boolean(t instanceof NodeList||t instanceof Array),c=Boolean(t instanceof HTMLElement);let d=e;do{if(d=d.correspondingUseElement||d.correspondingElement||d,(h=d)?a?n.call(h,r):u?[...s].includes(h):c?i===h:l&&o(h):h)return d;d=d.parentNode}while(d&&d!==document.body&&d!==document);var h;return null};const n=Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(56),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.scroll=t.onDragStop=t.onDragMove=t.onDragStart=void 0;var n,o=Object.assign||function(e){for(var t=1;t(!r||!function(e){return"static"===getComputedStyle(e).getPropertyValue("position")}(e))&&function(e){const t=/(auto|scroll)/,r=getComputedStyle(e,null),n=r.getPropertyValue("overflow")+r.getPropertyValue("overflow-y")+r.getPropertyValue("overflow-x");return t.test(n)}(e)));return"fixed"!==t&&n?n:f()}(e)}hasDefinedScrollableElements(){return Boolean(0!==this.options.scrollableElements.length)}[l](e){this.findScrollableElementFrame=requestAnimationFrame((()=>{this.scrollableElement=this.getScrollableElement(e.source)}))}[u](e){if(this.findScrollableElementFrame=requestAnimationFrame((()=>{this.scrollableElement=this.getScrollableElement(e.sensorEvent.target)})),!this.scrollableElement)return;const t=e.sensorEvent,r={x:0,y:0};"ontouchstart"in window&&(r.y=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,r.x=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),this.currentMousePosition={clientX:t.clientX-r.x,clientY:t.clientY-r.y},this.scrollAnimationFrame=requestAnimationFrame(this[d])}[c](){cancelAnimationFrame(this.scrollAnimationFrame),cancelAnimationFrame(this.findScrollableElementFrame),this.scrollableElement=null,this.scrollAnimationFrame=null,this.findScrollableElementFrame=null,this.currentMousePosition=null}[d](){if(!this.scrollableElement||!this.currentMousePosition)return;cancelAnimationFrame(this.scrollAnimationFrame);const{speed:e,sensitivity:t}=this.options,r=this.scrollableElement.getBoundingClientRect(),n=r.bottom>window.innerHeight,o=r.top<0||n,s=f(),i=this.scrollableElement,a=this.currentMousePosition.clientX,l=this.currentMousePosition.clientY;if(i===document.body||i===document.documentElement||o){const{innerHeight:r,innerWidth:n}=window;l=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}const u=t.onDragStart=Symbol("onDragStart"),c=t.onDragMove=Symbol("onDragMove"),d=t.onDragStop=Symbol("onDragStop"),h=t.onMirrorCreated=Symbol("onMirrorCreated"),g=t.onMirrorMove=Symbol("onMirrorMove"),f=t.onScroll=Symbol("onScroll"),p=t.getAppendableContainer=Symbol("getAppendableContainer"),v=t.defaultOptions={constrainDimensions:!1,xAxis:!0,yAxis:!0,cursorOffsetX:null,cursorOffsetY:null,thresholdX:null,thresholdY:null};class m extends i.default{constructor(e){super(e),this.options=o({},v,this.getOptions()),this.scrollOffset={x:0,y:0},this.initialScrollOffset={x:window.scrollX,y:window.scrollY},this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this),this[g]=this[g].bind(this),this[f]=this[f].bind(this)}attach(){this.draggable.on("drag:start",this[u]).on("drag:move",this[c]).on("drag:stop",this[d]).on("mirror:created",this[h]).on("mirror:move",this[g])}detach(){this.draggable.off("drag:start",this[u]).off("drag:move",this[c]).off("drag:stop",this[d]).off("mirror:created",this[h]).off("mirror:move",this[g])}getOptions(){return this.draggable.options.mirror||{}}[u](e){if(e.canceled())return;"ontouchstart"in window&&document.addEventListener("scroll",this[f],!0),this.initialScrollOffset={x:window.scrollX,y:window.scrollY};const{source:t,originalSource:r,sourceContainer:n,sensorEvent:o}=e;this.lastMirrorMovedClient={x:o.clientX,y:o.clientY};const s=new a.MirrorCreateEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e});if(this.draggable.trigger(s),function(e){return/^drag/.test(e.originalEvent.type)}(o)||s.canceled())return;const i=this[p](t)||n;this.mirror=t.cloneNode(!0);const l=new a.MirrorCreatedEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e,mirror:this.mirror}),u=new a.MirrorAttachedEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e,mirror:this.mirror});this.draggable.trigger(l),i.appendChild(this.mirror),this.draggable.trigger(u)}[c](e){if(!this.mirror||e.canceled())return;const{source:t,originalSource:r,sourceContainer:n,sensorEvent:o}=e;let s=!0,i=!0;if(this.options.thresholdX||this.options.thresholdY){const{x:e,y:t}=this.lastMirrorMovedClient;if(Math.abs(e-o.clientX){let{mirrorOffset:t,initialX:r,initialY:n}=e,s=l(e,["mirrorOffset","initialX","initialY"]);return this.mirrorOffset=t,this.initialX=r,this.initialY=n,this.lastMovedX=r,this.lastMovedY=n,o({mirrorOffset:t,initialX:r,initialY:n},s)}))}[g](e){if(e.canceled())return null;const t={mirror:e.mirror,sensorEvent:e.sensorEvent,mirrorOffset:this.mirrorOffset,options:this.options,initialX:this.initialX,initialY:this.initialY,scrollOffset:this.scrollOffset,passedThreshX:e.passedThreshX,passedThreshY:e.passedThreshY,lastMovedX:this.lastMovedX,lastMovedY:this.lastMovedY};return Promise.resolve(t).then(_({raf:!0})).then((e=>{let{lastMovedX:t,lastMovedY:r}=e,n=l(e,["lastMovedX","lastMovedY"]);return this.lastMovedX=t,this.lastMovedY=r,o({lastMovedX:t,lastMovedY:r},n)}))}[p](e){const t=this.options.appendTo;return"string"==typeof t?document.querySelector(t):t instanceof HTMLElement?t:"function"==typeof t?t(e):e.parentNode}}function b(e){let{source:t}=e,r=l(e,["source"]);return C((e=>{const n=t.getBoundingClientRect();e(o({source:t,sourceRect:n},r))}))}function y(e){let{sensorEvent:t,sourceRect:r,options:n}=e,s=l(e,["sensorEvent","sourceRect","options"]);return C((e=>{const i=null===n.cursorOffsetY?t.clientY-r.top:n.cursorOffsetY,a=null===n.cursorOffsetX?t.clientX-r.left:n.cursorOffsetX;e(o({sensorEvent:t,sourceRect:r,mirrorOffset:{top:i,left:a},options:n},s))}))}function E(e){let{mirror:t,source:r,options:n}=e,s=l(e,["mirror","source","options"]);return C((e=>{let i,a;if(n.constrainDimensions){const e=getComputedStyle(r);i=e.getPropertyValue("height"),a=e.getPropertyValue("width")}t.style.display=null,t.style.position="fixed",t.style.pointerEvents="none",t.style.top=0,t.style.left=0,t.style.margin=0,n.constrainDimensions&&(t.style.height=i,t.style.width=a),e(o({mirror:t,source:r,options:n},s))}))}function S(e){let{mirror:t,mirrorClasses:r}=e,n=l(e,["mirror","mirrorClasses"]);return C((e=>{t.classList.add(...r),e(o({mirror:t,mirrorClasses:r},n))}))}function O(e){let{mirror:t}=e,r=l(e,["mirror"]);return C((e=>{t.removeAttribute("id"),delete t.id,e(o({mirror:t},r))}))}function _({withFrame:e=!1,initial:t=!1}={}){return r=>{let{mirror:n,sensorEvent:s,mirrorOffset:i,initialY:a,initialX:u,scrollOffset:c,options:d,passedThreshX:h,passedThreshY:g,lastMovedX:f,lastMovedY:p}=r,v=l(r,["mirror","sensorEvent","mirrorOffset","initialY","initialX","scrollOffset","options","passedThreshX","passedThreshY","lastMovedX","lastMovedY"]);return C((e=>{const r=o({mirror:n,sensorEvent:s,mirrorOffset:i,options:d},v);if(i){const e=h?Math.round((s.clientX-i.left-c.x)/(d.thresholdX||1))*(d.thresholdX||1):Math.round(f),o=g?Math.round((s.clientY-i.top-c.y)/(d.thresholdY||1))*(d.thresholdY||1):Math.round(p);d.xAxis&&d.yAxis||t?n.style.transform=`translate3d(${e}px, ${o}px, 0)`:d.xAxis&&!d.yAxis?n.style.transform=`translate3d(${e}px, ${a}px, 0)`:d.yAxis&&!d.xAxis&&(n.style.transform=`translate3d(${u}px, ${o}px, 0)`),t&&(r.initialX=e,r.initialY=o),r.lastMovedX=e,r.lastMovedY=o}e(r)}),{frame:e})}}function C(e,{raf:t=!1}={}){return new Promise(((r,n)=>{t?requestAnimationFrame((()=>{e(r,n)})):e(r,n)}))}t.default=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(62),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t{this.getElements().forEach((e=>function(e){Boolean(!e.getAttribute("tabindex")&&-1===e.tabIndex)&&(d.push(e),e.tabIndex=0)}(e)))}))}[l](){requestAnimationFrame((()=>{this.getElements().forEach((e=>function(e){const t=d.indexOf(e);-1!==t&&(e.tabIndex=-1,d.splice(t,1))}(e)))}))}}t.default=c;const d=[]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(64),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.draggable=e}attach(){throw new Error("Not Implemented")}detach(){throw new Error("Not Implemented")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t{g.removeChild(r)}),t)}(e,{expire:this.options.expire})}[a](){this.draggable.trigger=e=>{try{this[u](e)}finally{this.originalTriggerMethod.call(this.draggable,e)}}}[l](){this.draggable.trigger=this.originalTriggerMethod}}t.default=h;const g=function(){const e=document.createElement("div");return e.setAttribute("id","draggable-live-region"),e.setAttribute("aria-relevant","additions"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","assertive"),e.setAttribute("role","log"),e.style.position="fixed",e.style.width="1px",e.style.height="1px",e.style.top="-1px",e.style.overflow="hidden",e}();document.addEventListener("DOMContentLoaded",(()=>{document.body.appendChild(g)}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(67),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraggableDestroyEvent=t.DraggableInitializedEvent=t.DraggableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get draggable(){return this.data.draggable}}t.DraggableEvent=i,i.type="draggable";class a extends i{}t.DraggableInitializedEvent=a,a.type="draggable:initialize";class l extends i{}t.DraggableDestroyEvent=l,l.type="draggable:destroy"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t{var t={9166:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>be});var r=n(347),o=n.n(r),i=(n(8299),n(4175)),s=n.n(i),l=n(6910),a=n.n(l),u=n(4470),c=n.n(u);class f extends o().Embed{static value(){}insertInto(t,e){0===t.children.length?super.insertInto(t,e):this.remove()}length(){return 0}value(){return""}}f.blotName="break",f.tagName="BR";const h=f;class p extends o().Text{}const d=p;class y extends o().Inline{static compare(t,e){let n=y.order.indexOf(t),r=y.order.indexOf(e);return n>=0||r>=0?n-r:t===e?0:t0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}y.allowedChildren=[y,o().Embed,d],y.order=["cursor","inline","underline","strike","italic","bold","script","link","code"];const g=y;class v extends o().Embed{attach(){super.attach(),this.attributes=new(o().Attributor.Store)(this.domNode)}delta(){return(new(s())).insert(this.value(),c()(this.formats(),this.attributes.values()))}format(t,e){let n=o().query(t,o().Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,r){this.format(n,r)}insertAt(t,e,n){if("string"==typeof e&&e.endsWith("\n")){let n=o().create(b.blotName);this.parent.insertBefore(n,0===t?this:this.next),n.insertAt(0,e.slice(0,-1))}else super.insertAt(t,e,n)}}v.scope=o().Scope.BLOCK_BLOT;class b extends o().Block{constructor(t){super(t),this.cache={}}delta(){return null==this.cache.delta&&(this.cache.delta=this.descendants(o().Leaf).reduce(((t,e)=>0===e.length()?t:t.insert(e.value(),m(e))),new(s())).insert("\n",m(this))),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,r){e<=0||(o().query(n,o().Scope.BLOCK)?t+e===this.length()&&this.format(n,r):super.formatAt(t,Math.min(e,this.length()-t-1),n,r),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n);if(0===e.length)return;let r=e.split("\n"),o=r.shift();o.length>0&&(t=this.length()-1)){let e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}{let n=super.split(t,e);return this.cache={},n}}}function m(t,e={}){return null==t?e:("function"==typeof t.formats&&(e=c()(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:m(t.parent,e))}b.blotName="block",b.tagName="P",b.defaultChild="break",b.allowedChildren=[g,o().Embed,d];class _ extends g{}_.blotName="code",_.tagName="CODE";class E extends b{static create(t){let e=super.create(t);return e.setAttribute("spellcheck",!1),e}static formats(){return!0}delta(){let t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(((t,e)=>t.insert(e).insert("\n",this.formats())),new(s()))}format(t,e){if(t===this.statics.blotName&&e)return;let[n]=this.descendant(d,this.length()-1);null!=n&&n.deleteAt(n.length()-1,1),super.format(t,e)}formatAt(t,e,n,r){if(0===e)return;if(null==o().query(n,o().Scope.BLOCK)||n===this.statics.blotName&&r===this.statics.formats(this.domNode))return;let i=this.newlineIndex(t);if(i<0||i>=t+e)return;let s=this.newlineIndex(t,!0)+1,l=i-s+1,a=this.isolate(s,l),u=a.next;a.format(n,r),u instanceof E&&u.formatAt(0,t-s+e-l,n,r)}insertAt(t,e,n){if(null!=n)return;let[r,o]=this.descendant(d,t);r.insertAt(o,e)}length(){let t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}newlineIndex(t,e=!1){if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");{let e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}}optimize(t){this.domNode.textContent.endsWith("\n")||this.appendChild(o().create("text","\n")),super.optimize(t);let e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===e.statics.formats(e.domNode)&&(e.optimize(t),e.moveChildren(this),e.remove())}replace(t){super.replace(t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){let e=o().find(t);null==e?t.parentNode.removeChild(t):e instanceof o().Embed?e.remove():e.unwrap()}))}}E.blotName="code-block",E.tagName="PRE",E.TAB=" ";class O extends o().Embed{static value(){}constructor(t,e){super(t),this.selection=e,this.textNode=document.createTextNode(O.CONTENTS),this.domNode.appendChild(this.textNode),this._length=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this._length)return super.format(t,e);let n=this,r=0;for(;null!=n&&n.statics.scope!==o().Scope.BLOCK_BLOT;)r+=n.offset(n.parent),n=n.parent;null!=n&&(this._length=O.CONTENTS.length,n.optimize(),n.formatAt(r,O.CONTENTS.length,t,e),this._length=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this._length}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return;let t,e,n,r=this.textNode,i=this.selection.getNativeRange();for(null!=i&&i.start.node===r&&i.end.node===r&&([t,e,n]=[r,i.start.offset,i.end.offset]);null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==O.CONTENTS){let e=this.textNode.data.split(O.CONTENTS).join("");this.next instanceof d?(t=this.next.domNode,this.next.insertAt(0,e),this.textNode.data=O.CONTENTS):(this.textNode.data=e,this.parent.insertBefore(o().create(this.textNode),this),this.textNode=document.createTextNode(O.CONTENTS),this.domNode.appendChild(this.textNode))}return this.remove(),null!=e?([e,n]=[e,n].map((function(e){return Math.max(0,Math.min(t.data.length,e-1))})),{startNode:t,startOffset:e,endNode:t,endOffset:n}):void 0}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){let t=this.restore();t&&(e.range=t)}}value(){return""}}O.blotName="cursor",O.className="ql-cursor",O.tagName="span",O.CONTENTS="\ufeff";const w=O;var x=n(6313),A=n.n(x),N=n(251),k=n.n(N);const T=/^[ -~]*$/;function S(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}const q=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){let e=!1;this.scroll.update();let n=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){let n=A()(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=A()(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){let n=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(n,e.attributes)}return t.push(e)}),new(s()))}(t)).reduce(((t,r)=>{let i=r.retain||r.delete||r.insert.length||1,s=r.attributes||{};if(null!=r.insert){if("string"==typeof r.insert){let i=r.insert;i.endsWith("\n")&&e&&(e=!1,i=i.slice(0,-1)),t>=n&&!i.endsWith("\n")&&(e=!0),this.scroll.insertAt(t,i);let[l,u]=this.scroll.line(t),f=c()({},m(l));if(l instanceof b){let[t]=l.descendant(o().Leaf,u);f=c()(f,m(t))}s=a().attributes.diff(f,s)||{}}else if("object"==typeof r.insert){let e=Object.keys(r.insert)[0];if(null==e)return t;this.scroll.insertAt(t,e,r.insert[e])}n+=i}return Object.keys(s).forEach((e=>{this.scroll.formatAt(t,i,e,s[e])})),t+i}),0),t.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+(e.retain||e.insert.length||1)),0),this.scroll.batchEnd(),this.update(t)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new(s())).retain(t).delete(e))}formatLine(t,e,n={}){return this.scroll.update(),Object.keys(n).forEach((r=>{if(null!=this.scroll.whitelist&&!this.scroll.whitelist[r])return;let o=this.scroll.lines(t,Math.max(e,1)),i=e;o.forEach((e=>{let o=e.length();if(e instanceof E){let o=t-e.offset(this.scroll),s=e.newlineIndex(o+i)-o+1;e.formatAt(o,s,r,n[r])}else e.format(r,n[r]);i-=o}))})),this.scroll.optimize(),this.update((new(s())).retain(t).retain(e,A()(n)))}formatText(t,e,n={}){return Object.keys(n).forEach((r=>{this.scroll.formatAt(t,e,r,n[r])})),this.update((new(s())).retain(t).retain(e,A()(n)))}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new(s()))}getFormat(t,e=0){let n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){let[e]=t;e instanceof b?n.push(e):e instanceof o().Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(o().Leaf,t,e));let i=[n,r].map((function(t){if(0===t.length)return{};let e=m(t.shift());for(;Object.keys(e).length>0;){let n=t.shift();if(null==n)return e;e=S(m(n),e)}return e}));return c().apply(c(),i)}getText(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new(s())).retain(t).insert({[e]:n}))}insertText(t,e,n={}){return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(n).forEach((r=>{this.scroll.formatAt(t,e.length,r,n[r])})),this.update((new(s())).retain(t).insert(e,A()(n)))}isBlank(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;let t=this.scroll.children.head;return t.statics.blotName===b.blotName&&(!(t.children.length>1)&&t.children.head instanceof h)}removeFormat(t,e){let n=this.getText(t,e),[r,o]=this.scroll.line(t+e),i=0,l=new(s());null!=r&&(i=r instanceof E?r.newlineIndex(o)-o+1:r.length()-o,l=r.delta().slice(o,o+i-1).insert("\n"));let a=this.getContents(t,e+i).diff((new(s())).insert(n).concat(l)),u=(new(s())).retain(t).concat(a);return this.applyDelta(u)}update(t,e=[],n){let r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(T)&&o().find(e[0].target)){let i=o().find(e[0].target),l=m(i),a=i.offset(this.scroll),u=e[0].oldValue.replace(w.CONTENTS,""),c=(new(s())).insert(u),f=(new(s())).insert(i.value());t=(new(s())).retain(a).concat(c.diff(f,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,l):t.push(e)}),new(s())),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&k()(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}};var j=n(6729),L=n.n(j);let P=["error","warn","log","info"],C="warn";function R(t,...e){P.indexOf(t)<=P.indexOf(C)&&console[t](...e)}function I(t){return P.reduce((function(e,n){return e[n]=R.bind(console,n,t),e}),{})}R.level=I.level=function(t){C=t};const B=I;let M=B("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,((...t)=>{[].slice.call(document.querySelectorAll(".ql-container")).forEach((e=>{e.__quill&&e.__quill.emitter&&e.__quill.emitter.handleDOM(...t)}))}))}));class D extends(L()){constructor(){super(),this.listeners={},this.on("error",M.error)}emit(){M.log.apply(M,arguments),super.emit.apply(this,arguments)}handleDOM(t,...e){(this.listeners[t.type]||[]).forEach((function({node:n,handler:r}){(t.target===n||n.contains(t.target))&&r(t,...e)}))}listenDOM(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}D.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},D.sources={API:"api",SILENT:"silent",USER:"user"};const U=D;class F{constructor(t,e={}){this.quill=t,this.options=e}}F.DEFAULTS={};const K=F;let H=B("quill:selection");class z{constructor(t,e=0){this.index=t,this.length=e}}class Y{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o().create("cursor",this),this.lastRange=this.savedRange=new z(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(()=>{this.mouseDown||setTimeout(this.update.bind(this,U.sources.USER),1)})),this.emitter.on(U.events.EDITOR_CHANGE,((t,e)=>{t===U.events.TEXT_CHANGE&&e.length()>0&&this.update(U.sources.SILENT)})),this.emitter.on(U.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;let t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(U.events.SCROLL_UPDATE,(()=>{try{this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))})),this.emitter.on(U.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:n,endNode:r,endOffset:o}=e.range;this.setNativeRange(t,n,r,o)}})),this.update(U.sources.SILENT)}handleComposition(){this.root.addEventListener("compositionstart",(()=>{this.composing=!0})),this.root.addEventListener("compositionend",(()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(U.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}format(t,e){if(null!=this.scroll.whitelist&&!this.scroll.whitelist[t])return;this.scroll.update();let n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o().query(t,o().Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){let t=o().find(n.start.node,!1);if(null==t)return;if(t instanceof o().Leaf){let e=t.split(n.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t,e=0){let n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;let r,[o,i]=this.scroll.leaf(t);if(null==o)return null;[r,i]=o.position(i,!0);let s=document.createRange();if(e>0)return s.setStart(r,i),[o,i]=this.scroll.leaf(t+e),null==o?null:([r,i]=o.position(i,!0),s.setEnd(r,i),s.getBoundingClientRect());{let t,e="left";return r instanceof Text?(i0&&(e="right")),{bottom:t.top+t.height,height:t.height,left:t[e],right:t[e],top:t.top,width:0}}}getNativeRange(){let t=document.getSelection();if(null==t||t.rangeCount<=0)return null;let e=t.getRangeAt(0);if(null==e)return null;let n=this.normalizeNative(e);return H.info("getNativeRange",n),n}getRange(){let t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root}normalizedToRange(t){let e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);let n=e.map((t=>{let[e,n]=t,r=o().find(e,!0),i=r.offset(this.scroll);return 0===n?i:r instanceof o().Container?i+r.length():i+r.index(e,n)})),r=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(r,...n);return new z(i,r-i)}normalizeNative(t){if(!W(this.root,t.startContainer)||!t.collapsed&&!W(this.root,t.endContainer))return null;let e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){let e=t.node,n=t.offset;for(;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}rangeToNative(t){let e=t.collapsed?[t.index]:[t.index,t.index+t.length],n=[],r=this.scroll.length();return e.forEach(((t,e)=>{t=Math.min(r-1,t);let o,[i,s]=this.scroll.leaf(t);[o,s]=i.position(s,0!==e),n.push(o,s)})),n.length<2&&(n=n.concat(n)),n}scrollIntoView(t){let e=this.lastRange;if(null==e)return;let n=this.getBounds(e.index,e.length);if(null==n)return;let r=this.scroll.length()-1,[o]=this.scroll.line(Math.min(e.index,r)),i=o;if(e.length>0&&([i]=this.scroll.line(Math.min(e.index+e.length,r))),null==o||null==i)return;let s=t.getBoundingClientRect();n.tops.bottom&&(t.scrollTop+=n.bottom-s.bottom)}setNativeRange(t,e,n=t,r=e,o=!1){if(H.info("setNativeRange",t,e,n,r),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==n.parentNode))return;let i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();let s=(this.getNativeRange()||{}).native;if(null==s||o||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);let o=document.createRange();o.setStart(t,e),o.setEnd(n,r),i.removeAllRanges(),i.addRange(o)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}setRange(t,e=!1,n=U.sources.API){if("string"==typeof e&&(n=e,e=!1),H.info("setRange",t),null!=t){let n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(n)}update(t=U.sources.USER){let e=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,null!=this.lastRange&&(this.savedRange=this.lastRange),!k()(e,this.lastRange)){!this.composing&&null!=r&&r.native.collapsed&&r.start.node!==this.cursor.textNode&&this.cursor.restore();let n=[U.events.SELECTION_CHANGE,A()(this.lastRange),A()(e),t];this.emitter.emit(U.events.EDITOR_CHANGE,...n),t!==U.sources.SILENT&&this.emitter.emit(...n)}}}function W(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}class V{constructor(t,e){this.quill=t,this.options=e,this.modules={}}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){let e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}V.DEFAULTS={modules:{}},V.themes={default:V};const G=V;let $=B("quill");class Z{static debug(t){!0===t&&(t="log"),B.level(t)}static find(t){return t.__quill||o().find(t)}static import(t){return null==this.imports[t]&&$.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(t,e,n=!1){if("string"!=typeof t){let n=t.attrName||t.blotName;"string"==typeof n?this.register("formats/"+n,t,e):Object.keys(t).forEach((n=>{this.register(n,t[n],e)}))}else null==this.imports[t]||n||$.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?o().register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}constructor(t,e={}){if(this.options=function(t,e){if((e=c()(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==Z.DEFAULTS.theme){if(e.theme=Z.import(`themes/${e.theme}`),null==e.theme)throw new Error(`Invalid theme ${e.theme}. Did you register it?`)}else e.theme=G;let n=c()(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));let r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){let n=Z.import(`modules/${e}`);return null==n?$.error(`Cannot load ${e} module. Are you sure you registered it?`):t[e]=n.DEFAULTS||{},t}),{});null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar});return e=c()(!0,{},Z.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}(t,e),this.container=this.options.container,null==this.container)return $.error("Invalid Quill container",t);this.options.debug&&Z.debug(this.options.debug);let n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new U,this.scroll=o().create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new q(this.scroll),this.selection=new Y(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(U.events.EDITOR_CHANGE,(t=>{t===U.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(U.events.SCROLL_UPDATE,((t,e)=>{let n=this.selection.lastRange,r=n&&0===n.length?n.index:void 0;X.call(this,(()=>this.editor.update(null,e,r)),t)}));let r=this.clipboard.convert(`
${n}


`);this.setContents(r),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}addContainer(t,e=null){if("string"==typeof t){let e=t;(t=document.createElement("div")).classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,n){return[t,e,,n]=Q(t,e,n),X.call(this,(()=>this.editor.deleteText(t,e)),n,t,-1*e)}disable(){this.enable(!1)}enable(t=!0){this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}format(t,e,n=U.sources.API){return X.call(this,(()=>{let n=this.getSelection(!0),r=new(s());if(null==n)return r;if(o().query(t,o().Scope.BLOCK))r=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(0===n.length)return this.selection.format(t,e),r;r=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,U.sources.SILENT),r}),n)}formatLine(t,e,n,r,o){let i;return[t,e,i,o]=Q(t,e,n,r,o),X.call(this,(()=>this.editor.formatLine(t,e,i)),o,t,0)}formatText(t,e,n,r,o){let i;return[t,e,i,o]=Q(t,e,n,r,o),X.call(this,(()=>this.editor.formatText(t,e,i)),o,t,0)}getBounds(t,e=0){let n;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);let r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(t=0,e=this.getLength()-t){return[t,e]=Q(t,e),this.editor.getContents(t,e)}getFormat(t=this.getSelection(!0),e=0){return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(t=0,e=Number.MAX_VALUE){return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(t=!1){return t&&this.focus(),this.update(),this.selection.getRange()[0]}getText(t=0,e=this.getLength()-t){return[t,e]=Q(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n,r=Z.sources.API){return X.call(this,(()=>this.editor.insertEmbed(t,e,n)),r,t)}insertText(t,e,n,r,o){let i;return[t,,i,o]=Q(t,0,n,r,o),X.call(this,(()=>this.editor.insertText(t,e,i)),o,t,e.length)}isEnabled(){return!this.container.classList.contains("ql-disabled")}off(){return this.emitter.off.apply(this.emitter,arguments)}on(){return this.emitter.on.apply(this.emitter,arguments)}once(){return this.emitter.once.apply(this.emitter,arguments)}pasteHTML(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}removeFormat(t,e,n){return[t,e,,n]=Q(t,e,n),X.call(this,(()=>this.editor.removeFormat(t,e)),n,t)}scrollIntoView(){this.selection.scrollIntoView(this.scrollingContainer)}setContents(t,e=U.sources.API){return X.call(this,(()=>{t=new(s())(t);let e=this.getLength(),n=this.editor.deleteText(0,e),r=this.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(this.editor.deleteText(this.getLength()-1,1),r.delete(1)),n.compose(r)}),e)}setSelection(t,e,n){null==t?this.selection.setRange(null,e||Z.sources.API):([t,e,,n]=Q(t,e,n),this.selection.setRange(new z(t,e),n),n!==U.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer))}setText(t,e=U.sources.API){let n=(new(s())).insert(t);return this.setContents(n,e)}update(t=U.sources.USER){let e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t,e=U.sources.API){return X.call(this,(()=>(t=new(s())(t),this.editor.applyDelta(t,e))),e,!0)}}function X(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===U.sources.USER)return new(s());let o=null==n?null:this.getSelection(),i=this.editor.delta,l=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=J(o,l,e):0!==r&&(o=J(o,n,r,e)),this.setSelection(o,U.sources.SILENT)),l.length()>0){let t=[U.events.TEXT_CHANGE,l,i,e];this.emitter.emit(U.events.EDITOR_CHANGE,...t),e!==U.sources.SILENT&&this.emitter.emit(...t)}return l}function Q(t,e,n,r,o){let i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"==typeof n?(i=n,o=r):"string"==typeof n&&(null!=r?i[n]=r:o=n),[t,e,i,o=o||U.sources.API]}function J(t,e,n,r){if(null==t)return null;let o,i;return e instanceof s()?[o,i]=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==U.sources.USER)})):[o,i]=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),new z(o,i-o)}Z.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},Z.events=U.events,Z.sources=U.sources,Z.version="undefined"==typeof QUILL_VERSION?"dev":QUILL_VERSION,Z.imports={delta:s(),parchment:o(),"core/module":K,"core/theme":G};class tt extends o().Container{}tt.allowedChildren=[b,v,tt];const et=tt,nt="\ufeff";class rt extends o().Embed{constructor(t){super(t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable",!1),[].slice.call(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(nt),this.rightGuard=document.createTextNode(nt),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e,n,r=t.data.split(nt).join("");if(t===this.leftGuard)if(this.prev instanceof d){let t=this.prev.length();this.prev.insertAt(t,r),e={startNode:this.prev.domNode,startOffset:t+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o().create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof d?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o().create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=nt,e}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){let n=this.restore(t.target);n&&(e.range=n)}}))}}const ot=rt;function it(t){return t instanceof b||t instanceof v}class st extends o().Scroll{constructor(t,e){super(t),this.emitter=e.emitter,Array.isArray(e.whitelist)&&(this.whitelist=e.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),this.domNode.addEventListener("DOMNodeInserted",(function(){})),this.optimize(),this.enable()}batchStart(){this.batch=!0}batchEnd(){this.batch=!1,this.optimize()}deleteAt(t,e){let[n,r]=this.line(t),[o]=this.line(t+e);if(super.deleteAt(t,e),null!=o&&n!==o&&r>0){if(n instanceof v||o instanceof v)return void this.optimize();if(n instanceof E){let t=n.newlineIndex(n.length(),!0);if(t>-1&&(n=n.split(t+1),n===o))return void this.optimize()}else if(o instanceof E){let t=o.newlineIndex(0);t>-1&&o.split(t+1)}let t=o.children.head instanceof h?null:o.children.head;n.moveChildren(o,t),n.remove()}this.optimize()}enable(t=!0){this.domNode.setAttribute("contenteditable",t)}formatAt(t,e,n,r){(null==this.whitelist||this.whitelist[n])&&(super.formatAt(t,e,n,r),this.optimize())}insertAt(t,e,n){if(null==n||null==this.whitelist||this.whitelist[e]){if(t>=this.length())if(null==n||null==o().query(e,o().Scope.BLOCK)){let t=o().create(this.statics.defaultChild);this.appendChild(t),null==n&&e.endsWith("\n")&&(e=e.slice(0,-1)),t.insertAt(0,e,n)}else{let t=o().create(e,n);this.appendChild(t)}else super.insertAt(t,e,n);this.optimize()}}insertBefore(t,e){if(t.statics.scope===o().Scope.INLINE_BLOT){let e=o().create(this.statics.defaultChild);e.appendChild(t),t=e}super.insertBefore(t,e)}leaf(t){return this.path(t).pop()||[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(it,t)}lines(t=0,e=Number.MAX_VALUE){let n=(t,e,r)=>{let i=[],s=r;return t.children.forEachAt(e,r,(function(t,e,r){it(t)?i.push(t):t instanceof o().Container&&(i=i.concat(n(t,e,s))),s-=r})),i};return n(this,t,e)}optimize(t=[],e={}){!0!==this.batch&&(super.optimize(t,e),t.length>0&&this.emitter.emit(U.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}update(t){if(!0===this.batch)return;let e=U.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(U.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(U.events.SCROLL_UPDATE,e,t)}}st.blotName="scroll",st.className="ql-editor",st.tagName="DIV",st.defaultChild="block",st.allowedChildren=[b,v,et];const lt=st;let at={scope:o().Scope.BLOCK,whitelist:["right","center","justify"]},ut=new(o().Attributor.Attribute)("align","align",at),ct=(new(o().Attributor.Class)("align","ql-align",at),new(o().Attributor.Style)("align","text-align",at));class ft extends o().Attributor.Style{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+e.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):e}}new(o().Attributor.Class)("color","ql-color",{scope:o().Scope.INLINE});let ht=new ft("color","color",{scope:o().Scope.INLINE}),pt=(new(o().Attributor.Class)("background","ql-bg",{scope:o().Scope.INLINE}),new ft("background","background-color",{scope:o().Scope.INLINE})),dt={scope:o().Scope.BLOCK,whitelist:["rtl"]},yt=new(o().Attributor.Attribute)("direction","dir",dt),gt=(new(o().Attributor.Class)("direction","ql-direction",dt),new(o().Attributor.Style)("direction","direction",dt)),vt={scope:o().Scope.INLINE,whitelist:["serif","monospace"]};new(o().Attributor.Class)("font","ql-font",vt);class bt extends o().Attributor.Style{value(t){return super.value(t).replace(/["']/g,"")}}let mt=new bt("font","font-family",vt),_t=(new(o().Attributor.Class)("size","ql-size",{scope:o().Scope.INLINE,whitelist:["small","large","huge"]}),new(o().Attributor.Style)("size","font-size",{scope:o().Scope.INLINE,whitelist:["10px","18px","32px"]})),Et=B("quill:clipboard");const Ot="__ql-matcher",wt=[[Node.TEXT_NODE,function(t,e){let n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!Tt(t.parentNode).whiteSpace.startsWith("pre")){let e=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,e.bind(e,!0)),(null==t.previousSibling&&qt(t.parentNode)||null!=t.previousSibling&&qt(t.previousSibling))&&(n=n.replace(/^\s+/,e.bind(e,!1))),(null==t.nextSibling&&qt(t.parentNode)||null!=t.nextSibling&&qt(t.nextSibling))&&(n=n.replace(/\s+$/,e.bind(e,!1)))}return e.insert(n)}],[Node.TEXT_NODE,Pt],["br",function(t,e){St(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,Pt],[Node.ELEMENT_NODE,function(t,e){let n=o().query(t);if(null==n)return e;if(n.prototype instanceof o().Embed){let r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new(s())).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=kt(e,n.blotName,n.formats(t)));return e}],[Node.ELEMENT_NODE,Ct],[Node.ELEMENT_NODE,function(t,e){let n=o().Attributor.Attribute.keys(t),r=o().Attributor.Class.keys(t),i=o().Attributor.Style.keys(t),s={};n.concat(r).concat(i).forEach((e=>{let n=o().query(e,o().Scope.ATTRIBUTE);null!=n&&(s[n.attrName]=n.value(t),s[n.attrName])||(n=xt[e],null==n||n.attrName!==e&&n.keyName!==e||(s[n.attrName]=n.value(t)||void 0),n=At[e],null==n||n.attrName!==e&&n.keyName!==e||(n=At[e],s[n.attrName]=n.value(t)||void 0))})),Object.keys(s).length>0&&(e=kt(e,s));return e}],[Node.ELEMENT_NODE,function(t,e){let n={},r=t.style||{};r.fontStyle&&"italic"===Tt(t).fontStyle&&(n.italic=!0);r.fontWeight&&(Tt(t).fontWeight.startsWith("bold")||parseInt(Tt(t).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=kt(e,n));parseFloat(r.textIndent||0)>0&&(e=(new(s())).insert("\t").concat(e));return e}],["li",function(t,e){let n=o().query(t);if(null==n||"list-item"!==n.blotName||!St(e,"\n"))return e;let r=-1,i=t.parentNode;for(;!i.classList.contains("ql-clipboard");)"list"===(o().query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new(s())).retain(e.length()-1).retain(1,{indent:r}))}],["b",Lt.bind(Lt,"bold")],["i",Lt.bind(Lt,"italic")],["style",function(){return new(s())}]],xt=[ut,yt].reduce((function(t,e){return t[e.keyName]=e,t}),{}),At=[ct,pt,ht,gt,mt,_t].reduce((function(t,e){return t[e.keyName]=e,t}),{});class Nt extends K{constructor(t,e){super(t,e),this.quill.root.addEventListener("paste",this.onPaste.bind(this)),this.container=this.quill.addContainer("ql-clipboard"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex",-1),this.matchers=[],wt.concat(this.options.matchers).forEach((([t,n])=>{(e.matchVisual||n!==Ct)&&this.addMatcher(t,n)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();const e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[E.blotName]){const t=this.container.innerText;return this.container.innerHTML="",(new(s())).insert(t,{[E.blotName]:e[E.blotName]})}let[n,r]=this.prepareMatching(),o=jt(this.container,n,r);return St(o,"\n")&&null==o.ops[o.ops.length-1].attributes&&(o=o.compose((new(s())).retain(o.length()-1).delete(1))),Et.log("convert",this.container.innerHTML,o),this.container.innerHTML="",o}dangerouslyPasteHTML(t,e,n=Z.sources.API){if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,Z.sources.SILENT);else{let r=this.convert(e);this.quill.updateContents((new(s())).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),Z.sources.SILENT)}}onPaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;let e=this.quill.getSelection(),n=(new(s())).retain(e.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(Z.sources.SILENT),setTimeout((()=>{n=n.concat(this.convert()).delete(e.length),this.quill.updateContents(n,Z.sources.USER),this.quill.setSelection(n.length()-e.length,Z.sources.SILENT),this.quill.scrollingContainer.scrollTop=r,this.quill.focus()}),1)}prepareMatching(){let t=[],e=[];return this.matchers.forEach((n=>{let[r,o]=n;switch(r){case Node.TEXT_NODE:e.push(o);break;case Node.ELEMENT_NODE:t.push(o);break;default:[].forEach.call(this.container.querySelectorAll(r),(t=>{t[Ot]=t[Ot]||[],t[Ot].push(o)}))}})),[t,e]}}function kt(t,e,n){return"object"==typeof e?Object.keys(e).reduce((function(t,n){return kt(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,c()({},{[e]:n},r.attributes))}),new(s()))}function Tt(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};const e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function St(t,e){let n="";for(let r=t.ops.length-1;r>=0&&n.length-1}function jt(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new(s())):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],((r,o)=>{let i=jt(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce((function(t,e){return e(o,t)}),i),i=(o[Ot]||[]).reduce((function(t,e){return e(o,t)}),i)),r.concat(i)}),new(s())):new(s())}function Lt(t,e,n){return kt(n,t,!0)}function Pt(t,e){return St(e,"\n")||(qt(t)||e.length()>0&&t.nextSibling&&qt(t.nextSibling))&&e.insert("\n"),e}function Ct(t,e){if(qt(t)&&null!=t.nextElementSibling&&!St(e,"\n\n")){let n=t.offsetHeight+parseFloat(Tt(t).marginTop)+parseFloat(Tt(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}Nt.DEFAULTS={matchers:[],matchVisual:!0};class Rt extends K{constructor(t,e){super(t,e),this.lastRecorded=0,this.ignoreChange=!1,this.clear(),this.quill.on(Z.events.EDITOR_CHANGE,((t,e,n,r)=>{t!==Z.events.TEXT_CHANGE||this.ignoreChange||(this.options.userOnly&&r!==Z.sources.USER?this.transform(e):this.record(e,n))})),this.quill.keyboard.addBinding({key:"Z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"Y",shortKey:!0},this.redo.bind(this))}change(t,e){if(0===this.stack[t].length)return;let n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],Z.sources.USER),this.ignoreChange=!1;let r=function(t){let e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;(function(t){let e=t.ops[t.ops.length-1];if(null==e)return!1;if(null!=e.insert)return"string"==typeof e.insert&&e.insert.endsWith("\n");if(null!=e.attributes)return Object.keys(e.attributes).some((function(t){return null!=o().query(t,o().Scope.BLOCK)}));return!1})(t)&&(n-=1);return n}(n[t]);this.quill.setSelection(r)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){let e=this.stack.undo.pop();n=n.compose(e.undo),t=e.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}redo(){this.change("redo","undo")}transform(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}undo(){this.change("undo","redo")}}Rt.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};let It=B("quill:keyboard");const Bt=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Mt extends K{static match(t,e){return e=Wt(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((e=>{("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&this.options.bindings[e]&&this.addBinding(this.options.bindings[e])})),this.addBinding({key:Mt.keys.ENTER,shiftKey:null},Ht),this.addBinding({key:Mt.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:Mt.keys.BACKSPACE},{collapsed:!0},Ut),this.addBinding({key:Mt.keys.DELETE},{collapsed:!0},Ft)):(this.addBinding({key:Mt.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Ut),this.addBinding({key:Mt.keys.DELETE},{collapsed:!0,suffix:/^.?$/},Ft)),this.addBinding({key:Mt.keys.BACKSPACE},{collapsed:!1},Kt),this.addBinding({key:Mt.keys.DELETE},{collapsed:!1},Kt),this.addBinding({key:Mt.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Ut),this.listen()}addBinding(t,e={},n={}){let r=Wt(t);if(null==r||null==r.key)return It.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=c()(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented)return;let e=t.which||t.keyCode,n=(this.bindings[e]||[]).filter((function(e){return Mt.match(t,e)}));if(0===n.length)return;let r=this.quill.getSelection();if(null==r||!this.quill.hasFocus())return;let[i,s]=this.quill.getLine(r.index),[l,a]=this.quill.getLeaf(r.index),[u,c]=0===r.length?[l,a]:this.quill.getLeaf(r.index+r.length),f=l instanceof o().Text?l.value().slice(0,a):"",h=u instanceof o().Text?u.value().slice(c):"",p={collapsed:0===r.length,empty:0===r.length&&i.length()<=1,format:this.quill.getFormat(r),offset:s,prefix:f,suffix:h};n.some((t=>{if(null!=t.collapsed&&t.collapsed!==p.collapsed)return!1;if(null!=t.empty&&t.empty!==p.empty)return!1;if(null!=t.offset&&t.offset!==p.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(t){return null==p.format[t]})))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=p.format[e]:!1===t.format[e]?null==p.format[e]:k()(t.format[e],p.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(p.prefix))&&(!(null!=t.suffix&&!t.suffix.test(p.suffix))&&!0!==t.handler.call(this,r,p))}))&&t.preventDefault()}))}}function Dt(t,e){const n=t===Mt.keys.LEFT?"prefix":"suffix";return{key:t,shiftKey:e,altKey:null,[n]:/^$/,handler:function(n){let r=n.index;t===Mt.keys.RIGHT&&(r+=n.length+1);const[i]=this.quill.getLeaf(r);return!(i instanceof o().Embed)||(t===Mt.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,Z.sources.USER):this.quill.setSelection(n.index-1,Z.sources.USER):e?this.quill.setSelection(n.index,n.length+1,Z.sources.USER):this.quill.setSelection(n.index+n.length+1,Z.sources.USER),!1)}}}function Ut(t,e){if(0===t.index||this.quill.getLength()<=1)return;let[n]=this.quill.getLine(t.index),r={};if(0===e.offset){let[e]=this.quill.getLine(t.index-1);if(null!=e&&e.length()>1){let e=n.formats(),o=this.quill.getFormat(t.index-1,1);r=a().attributes.diff(e,o)||{}}}let o=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-o,o,Z.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index-o,o,r,Z.sources.USER),this.quill.focus()}function Ft(t,e){let n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let r={},o=0,[i]=this.quill.getLine(t.index);if(e.offset>=i.length()-1){let[e]=this.quill.getLine(t.index+1);if(e){let n=i.formats(),s=this.quill.getFormat(t.index,1);r=a().attributes.diff(n,s)||{},o=e.length()}}this.quill.deleteText(t.index,n,Z.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,Z.sources.USER)}function Kt(t){let e=this.quill.getLines(t),n={};if(e.length>1){let t=e[0].formats(),r=e[e.length-1].formats();n=a().attributes.diff(r,t)||{}}this.quill.deleteText(t,Z.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,Z.sources.USER),this.quill.setSelection(t.index,Z.sources.SILENT),this.quill.focus()}function Ht(t,e){t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);let n=Object.keys(e.format).reduce((function(t,n){return o().query(n,o().Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",n,Z.sources.USER),this.quill.setSelection(t.index+1,Z.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((t=>{null==n[t]&&(Array.isArray(e.format[t])||"link"!==t&&this.quill.format(t,e.format[t],Z.sources.USER))}))}function zt(t){return{key:Mt.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){let n=o().query("code-block"),r=e.index,i=e.length,[s,l]=this.quill.scroll.descendant(n,r);if(null==s)return;let a=this.quill.getIndex(s),u=s.newlineIndex(l,!0)+1,c=s.newlineIndex(a+l+i),f=s.domNode.textContent.slice(u,c).split("\n");l=0,f.forEach(((e,o)=>{t?(s.insertAt(u+l,n.TAB),l+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(s.deleteAt(u+l,n.TAB.length),l-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),l+=e.length+1})),this.quill.update(Z.sources.USER),this.quill.setSelection(r,i,Z.sources.SILENT)}}}function Yt(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],Z.sources.USER)}}}function Wt(t){if("string"==typeof t||"number"==typeof t)return Wt({key:t});if("object"==typeof t&&(t=A()(t,!1)),"string"==typeof t.key)if(null!=Mt.keys[t.key.toUpperCase()])t.key=Mt.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[Bt]=t.shortKey,delete t.shortKey),t}Mt.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},Mt.DEFAULTS={bindings:{bold:Yt("bold"),italic:Yt("italic"),underline:Yt("underline"),indent:{key:Mt.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",Z.sources.USER)}},outdent:{key:Mt.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",Z.sources.USER)}},"outdent backspace":{key:Mt.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",Z.sources.USER):null!=e.format.list&&this.quill.format("list",!1,Z.sources.USER)}},"indent code-block":zt(!0),"outdent code-block":zt(!1),"remove tab":{key:Mt.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,Z.sources.USER)}},tab:{key:Mt.keys.TAB,handler:function(t){this.quill.history.cutoff();let e=(new(s())).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,Z.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,Z.sources.SILENT)}},"list empty enter":{key:Mt.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,Z.sources.USER),e.format.indent&&this.quill.format("indent",!1,Z.sources.USER)}},"checklist enter":{key:Mt.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){let[e,n]=this.quill.getLine(t.index),r=c()({},e.formats(),{list:"checked"}),o=(new(s())).retain(t.index).insert("\n",r).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,Z.sources.USER),this.quill.setSelection(t.index+1,Z.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:Mt.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){let[n,r]=this.quill.getLine(t.index),o=(new(s())).retain(t.index).insert("\n",e.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(o,Z.sources.USER),this.quill.setSelection(t.index+1,Z.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){let n,r=e.prefix.length,[o,i]=this.quill.getLine(t.index);if(i>r)return!0;switch(e.prefix.trim()){case"[]":case"[ ]":n="unchecked";break;case"[x]":n="checked";break;case"-":case"*":n="bullet";break;default:n="ordered"}this.quill.insertText(t.index," ",Z.sources.USER),this.quill.history.cutoff();let l=(new(s())).retain(t.index-i).delete(r+1).retain(o.length()-2-i).retain(1,{list:n});this.quill.updateContents(l,Z.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,Z.sources.SILENT)}},"code exit":{key:Mt.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){const[e,n]=this.quill.getLine(t.index),r=(new(s())).retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(r,Z.sources.USER)}},"embed left":Dt(Mt.keys.LEFT,!1),"embed left shift":Dt(Mt.keys.LEFT,!0),"embed right":Dt(Mt.keys.RIGHT,!1),"embed right shift":Dt(Mt.keys.RIGHT,!0)}},Z.register({"blots/block":b,"blots/block/embed":v,"blots/break":h,"blots/container":et,"blots/cursor":w,"blots/embed":ot,"blots/inline":g,"blots/scroll":lt,"blots/text":d,"modules/clipboard":Nt,"modules/history":Rt,"modules/keyboard":Mt}),o().register(b,h,w,g,lt,d);const Vt=Z;let Gt=B("quill:toolbar");class $t extends K{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){let e=document.createElement("div");!function(t,e){Array.isArray(e[0])||(e=[e]);e.forEach((function(e){let n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)Zt(n,t);else{let e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){let r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){let e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):Zt(n,e,r)}})),t.appendChild(n)}))}(e,this.options.container),t.container.parentNode.insertBefore(e,t.container),this.container=e}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement))return Gt.error("Container required for toolbar",this.options);this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},Object.keys(this.options.handlers).forEach((t=>{this.addHandler(t,this.options.handlers[t])})),[].forEach.call(this.container.querySelectorAll("button, select"),(t=>{this.attach(t)})),this.quill.on(Z.events.EDITOR_CHANGE,((t,e)=>{t===Z.events.SELECTION_CHANGE&&this.update(e)})),this.quill.on(Z.events.SCROLL_OPTIMIZE,(()=>{let[t]=this.quill.selection.getRange();this.update(t)}))}addHandler(t,e){this.handlers[t]=e}attach(t){let e=[].find.call(t.classList,(t=>0===t.indexOf("ql-")));if(!e)return;if(e=e.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[e]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[e])return void Gt.warn("ignoring attaching to disabled format",e,t);if(null==o().query(e))return void Gt.warn("ignoring attaching to nonexistent format",e,t)}let n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let r;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;let e=t.options[t.selectedIndex];r=!e.hasAttribute("selected")&&(e.value||!1)}else r=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();let[i]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,r);else if(o().query(e).prototype instanceof o().Embed){if(r=prompt(`Enter ${e}`),!r)return;this.quill.updateContents((new(s())).retain(i.index).delete(i.length).insert({[e]:r}),Z.sources.USER)}else this.quill.format(e,r,Z.sources.USER);this.update(i)})),this.controls.push([e,t])}update(t){let e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){let[r,o]=n;if("SELECT"===o.tagName){let n;if(null==t)n=null;else if(null==e[r])n=o.querySelector("option[selected]");else if(!Array.isArray(e[r])){let t=e[r];"string"==typeof t&&(t=t.replace(/\"/g,'\\"')),n=o.querySelector(`option[value="${t}"]`)}null==n?(o.value="",o.selectedIndex=-1):n.selected=!0}else if(null==t)o.classList.remove("ql-active");else if(o.hasAttribute("value")){let t=e[r]===o.getAttribute("value")||null!=e[r]&&e[r].toString()===o.getAttribute("value")||null==e[r]&&!o.getAttribute("value");o.classList.toggle("ql-active",t)}else o.classList.toggle("ql-active",null!=e[r])}))}}function Zt(t,e,n){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}$t.DEFAULTS={},$t.DEFAULTS={container:null,handlers:{clean:function(){let t=this.quill.getSelection();if(null!=t)if(0==t.length){let t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=o().query(t,o().Scope.INLINE)&&this.quill.format(t,!1)}))}else this.quill.removeFormat(t,Z.sources.USER)},direction:function(t){let e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",Z.sources.USER):t||"right"!==e||this.quill.format("align",!1,Z.sources.USER),this.quill.format("direction",t,Z.sources.USER)},indent:function(t){let e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===n.direction&&(e*=-1),this.quill.format("indent",r+e,Z.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,Z.sources.USER)},list:function(t){let e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,Z.sources.USER):this.quill.format("list","unchecked",Z.sources.USER):this.quill.format("list",t,Z.sources.USER)}}};let Xt=0;function Qt(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}const Jt=class{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(()=>{this.togglePicker()})),this.label.addEventListener("keydown",(t=>{switch(t.keyCode){case Mt.keys.ENTER:this.togglePicker();break;case Mt.keys.ESCAPE:this.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Qt(this.label,"aria-expanded"),Qt(this.options,"aria-hidden")}buildItem(t){let e=document.createElement("span");return e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item"),t.hasAttribute("value")&&e.setAttribute("data-value",t.getAttribute("value")),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",(()=>{this.selectItem(e,!0)})),e.addEventListener("keydown",(t=>{switch(t.keyCode){case Mt.keys.ENTER:this.selectItem(e,!0),t.preventDefault();break;case Mt.keys.ESCAPE:this.escape(),t.preventDefault()}})),e}buildLabel(){let t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML="/images/vendor/quill/icons/dropdown.svg?c6cd8197101656eb7be9a80dcc6fea48",t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){let t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${Xt}`,Xt+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((e=>{let n=this.buildItem(e);t.appendChild(n),!0===e.selected&&this.selectItem(n)})),this.container.appendChild(t)}buildPicker(){[].slice.call(this.select.attributes).forEach((t=>{this.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t,e=!1){let n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"==typeof Event){let t=document.createEvent("Event");t.initEvent("change",!0,!0),this.select.dispatchEvent(t)}this.close()}}update(){let t;if(this.select.selectedIndex>-1){let e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);let e=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}};const te=class extends Jt{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),[].slice.call(this.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")}))}buildItem(t){let e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);let n=this.label.querySelector(".ql-color-label"),r=t&&t.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=r:n.style.fill=r)}};const ee=class extends Jt{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),[].forEach.call(this.container.querySelectorAll(".ql-picker-item"),(t=>{t.innerHTML=e[t.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}};const ne=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"})),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){let e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");let r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;if(o.right>r.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.leftr.bottom){let e=o.bottom-o.top,r=t.bottom-t.top+e;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return i}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},re=[!1,"center","right","justify"],oe=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],ie=[!1,"serif","monospace"],se=["1","2","3",!1],le=["small",!1,"large","huge"];class ae extends G{constructor(t,e){super(t,e);let n=e=>{if(!document.body.contains(t.root))return document.body.removeEventListener("click",n);null==this.tooltip||this.tooltip.root.contains(e.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((function(t){t.container.contains(e.target)||t.close()}))};t.emitter.listenDOM("click",document.body,n)}addModule(t){let e=super.addModule(t);return"toolbar"===t&&this.extendToolbar(e),e}buildButtons(t,e){t.forEach((t=>{(t.getAttribute("class")||"").split(/\s+/).forEach((n=>{if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{let r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}buildPickers(t,e){this.pickers=t.map((t=>{if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&ce(t,re),new ee(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){let n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&ce(t,oe,"background"===n?"#ffffff":"#000000"),new te(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?ce(t,ie):t.classList.contains("ql-header")?ce(t,se):t.classList.contains("ql-size")&&ce(t,le)),new Jt(t)}));this.quill.on(U.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((function(t){t.update()}))}))}}ae.DEFAULTS=c()(!0,{},G.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){let t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(()=>{if(null!=t.files&&null!=t.files[0]){let e=new FileReader;e.onload=e=>{let n=this.quill.getSelection(!0);this.quill.updateContents((new(s())).retain(n.index).delete(n.length).insert({image:e.target.result}),U.sources.USER),this.quill.setSelection(n.index+1,U.sources.SILENT),t.value=""},e.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});class ue extends ne{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{Mt.match(t,"enter")?(this.save(),t.preventDefault()):Mt.match(t,"escape")&&(this.cancel(),t.preventDefault())}))}cancel(){this.hide()}edit(t="link",e=null){this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){let t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}save(){let t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{let e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,U.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,U.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=function(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":{if(!t)break;let e=this.quill.getSelection(!0);if(null!=e){let n=e.index+e.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),t,U.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",U.sources.USER),this.quill.setSelection(n+2,U.sources.USER)}break}}this.textbox.value="",this.hide()}}function ce(t,e,n=!1){e.forEach((function(e){let r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}class fe extends g{static create(t){let e=super.create(t);return t=this.sanitize(t),e.setAttribute("href",t),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return function(t,e){let n=document.createElement("a");n.href=t;let r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){if(t!==this.statics.blotName||!e)return super.format(t,e);e=this.constructor.sanitize(e),this.domNode.setAttribute("href",e)}}fe.blotName="link",fe.tagName="A",fe.SANITIZED_URL="about:blank",fe.PROTOCOL_WHITELIST=["http","https","mailto","tel"];var he=n(3964),pe=n.n(he);const de=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class ye extends ae{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=de),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),pe()),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),pe()),this.tooltip=new ge(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}ye.DEFAULTS=c()(!0,{},ae.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){let t=this.quill.getSelection();if(null==t||0==t.length)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&0!==e.indexOf("mailto:")&&(e="mailto:"+e),this.quill.theme.tooltip.edit("link",e)}else this.quill.format("link",!1)}}}}});class ge extends ue{constructor(t,e){super(t,e),this.preview=this.root.querySelector("a.ql-preview")}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(t=>{if(null!=this.linkRange){let t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,U.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(U.events.SELECTION_CHANGE,((t,e,n)=>{if(null!=t){if(0===t.length&&n===U.sources.USER){let[e,n]=this.quill.scroll.descendant(fe,t.index);if(null!=e){this.linkRange=new z(t.index-n,e.length());let r=fe.formats(e.domNode);return this.preview.textContent=r,this.preview.setAttribute("href",r),this.show(),void this.position(this.quill.getBounds(this.linkRange))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}ge.TEMPLATE=['','','',''].join("");const ve=ye;Vt.register({"modules/toolbar":$t,"themes/snow":ve});const be=Vt},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=a(t),s=i[0],l=i[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,l)),c=0,f=l>0?s-4:s;for(n=0;n>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===l&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[c++]=255&e);1===l&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=16383,l=0,a=r-o;la?a:l+s));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,r){for(var o,i,s=[],l=e;l>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(t,e,n)=>{"use strict";var r=n(9742),o=n(645),i=n(5826);function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return q(this,e,n);case"utf8":case"utf-8":return N(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return S(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,o);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,o){var i,s=1,l=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,l/=2,a/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var c=-1;for(i=n;il&&(n=l-a),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function N(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&u)<<6|63&i)>127&&(c=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(a=(15&u)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:i=t[o+1],s=t[o+2],l=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&l)&&(a=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&l)>65535&&a<1114112&&(c=a)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),o+=f}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},a.prototype.compare=function(t,e,n,r,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),l=Math.min(i,s),u=this.slice(r,o),c=t.slice(e,n),f=0;fo)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return E(this,t,e,n);case"latin1":case"binary":return O(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function T(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;or)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,r,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function C(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function I(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,i){return i||I(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,i){return i||I(t,0,n,8),o.write(t,e,n,r,52,8),n+8}a.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)r+=this[t+--e]*o;return r},a.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);P(this,t,e,n,o-1,-o)}var i=0,s=1,l=0;for(this[e]=255&t;++i>0)-l&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);P(this,t,e,n,o-1,-o)}var i=n-1,s=1,l=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===l&&0!==this[e+i+1]&&(l=1),this[e+i]=(t/s>>0)-l&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function K(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}},1924:(t,e,n)=>{"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&i(t,".prototype.")>-1?o(n):n}},5559:(t,e,n)=>{"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||r.call(s,i),a=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=l(r,s,arguments);if(a&&u){var n=a(e,"length");n.configurable&&u(e,"length",{value:1+c(0,t.length-(arguments.length-1))})}return e};var f=function(){return l(r,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6313:(t,e,n)=>{var r=n(8764).Buffer,o=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,o;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{o=Promise}catch(t){o=function(){}}function i(s,a,u,c,f){"object"==typeof a&&(u=a.depth,c=a.prototype,f=a.includeNonEnumerable,a=a.circular);var h=[],p=[],d=void 0!==r;return void 0===a&&(a=!0),void 0===u&&(u=1/0),function s(u,y){if(null===u)return null;if(0===y)return u;var g,v;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,n))g=new n;else if(t(u,o))g=new o((function(t,e){u.then((function(e){t(s(e,y-1))}),(function(t){e(s(t,y-1))}))}));else if(i.__isArray(u))g=[];else if(i.__isRegExp(u))g=new RegExp(u.source,l(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(i.__isDate(u))g=new Date(u.getTime());else{if(d&&r.isBuffer(u))return g=r.allocUnsafe?r.allocUnsafe(u.length):new r(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(v=Object.getPrototypeOf(u),g=Object.create(v)):(g=Object.create(c),v=c)}if(a){var b=h.indexOf(u);if(-1!=b)return p[b];h.push(u),p.push(g)}for(var m in t(u,e)&&u.forEach((function(t,e){var n=s(e,y-1),r=s(t,y-1);g.set(n,r)})),t(u,n)&&u.forEach((function(t){var e=s(t,y-1);g.add(e)})),u){var _;v&&(_=Object.getOwnPropertyDescriptor(v,m)),_&&null==_.set||(g[m]=s(u[m],y-1))}if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(u);for(m=0;m{var r=n(2215),o=n(2584),i=n(609),s=n(8420),l=n(2847),a=n(8923),u=Date.prototype.getTime;function c(t,e,n){var p=n||{};return!!(p.strict?i(t,e):t===e)||(!t||!e||"object"!=typeof t&&"object"!=typeof e?p.strict?i(t,e):t==e:function(t,e,n){var i,p;if(typeof t!=typeof e)return!1;if(f(t)||f(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t)!==o(e))return!1;var d=s(t),y=s(e);if(d!==y)return!1;if(d||y)return t.source===e.source&&l(t)===l(e);if(a(t)&&a(e))return u.call(t)===u.call(e);var g=h(t),v=h(e);if(g!==v)return!1;if(g||v){if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(b[i]!=m[i])return!1;for(i=b.length-1;i>=0;i--)if(!c(t[p=b[i]],e[p],n))return!1;return!0}(t,e,p))}function f(t){return null==t}function h(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}t.exports=c},4289:(t,e,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,l=Object.defineProperty,a=l&&function(){var t={};try{for(var e in l(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),u=function(t,e,n,r){var o;(!(e in t)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(a?l(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},c=function(t,e){var n=arguments.length>2?arguments[2]:{},i=r(e);o&&(i=s.call(i,Object.getOwnPropertySymbols(e)));for(var l=0;l{"use strict";var e=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),i.prototype.eventNames=function(){var t,r,o=[];if(0===this._eventsCount)return o;for(r in t=this._events)e.call(t,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},i.prototype.listeners=function(t,e){var r=n?n+t:t,o=this._events[r];if(e)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var i=0,s=o.length,l=new Array(s);i{"use strict";var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===n.call(t)},s=function(t){if(!t||"[object Object]"!==n.call(t))return!1;var r,o=e.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(r in t);return void 0===r||e.call(t,r)},l=function(t,e){r&&"__proto__"===e.name?r(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(o)return o(t,n).value}return t[n]};t.exports=function t(){var e,n,r,o,u,c,f=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof f&&(d=f,f=arguments[1]||{},h=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});h{var e=-1;function n(t,l,u){if(t==l)return t?[[0,t]]:[];(u<0||t.lengths.length?t:s,u=t.length>s.length?s:t,c=a.indexOf(u);if(-1!=c)return l=[[1,a.substring(0,c)],[0,u],[1,a.substring(c+u.length)]],t.length>s.length&&(l[0][0]=l[2][0]=e),l;if(1==u.length)return[[e,t],[1,s]];var f=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,s,l,a,f]:null}var l,a,u,c,f,h=s(n,r,Math.ceil(n.length/4)),p=s(n,r,Math.ceil(n.length/2));if(!h&&!p)return null;l=p?h&&h[4].length>p[4].length?h:p:h;t.length>e.length?(a=l[0],u=l[1],c=l[2],f=l[3]):(c=l[0],f=l[1],a=l[2],u=l[3]);var d=l[4];return[a,u,c,f,d]}(t,s);if(f){var h=f[0],p=f[1],d=f[2],y=f[3],g=f[4],v=n(h,d),b=n(p,y);return v.concat([[0,g]],b)}return function(t,n){for(var o=t.length,i=n.length,s=Math.ceil((o+i)/2),l=s,a=2*s,u=new Array(a),c=new Array(a),f=0;fo)y+=2;else if(E>i)d+=2;else if(p){if((x=l+h-m)>=0&&x=(w=o-c[x]))return r(t,n,N,E)}}for(var O=-b+g;O<=b-v;O+=2){for(var w,x=l+O,A=(w=O==-b||O!=b&&c[x-1]o)v+=2;else if(A>i)g+=2;else if(!p){if((_=l+h-O)>=0&&_=(w=o-w))return r(t,n,N,E)}}}}return[[e,t],[1,n]]}(t,s)}(t=t.substring(0,t.length-c),l=l.substring(0,l.length-c));return f&&p.unshift([0,f]),h&&p.push([0,h]),s(p),null!=u&&(p=function(t,n){var r=function(t,n){if(0===n)return[0,t];for(var r=0,o=0;o0&&o.splice(i+2,0,[l[0],u]),a(o,i,3)}return t}(p,u)),p=function(t){for(var n=!1,r=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},o=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},i=2;i0&&s.push(t[i]);return s}(p)}function r(t,e,r,o){var i=t.substring(0,r),s=e.substring(0,o),l=t.substring(r),a=e.substring(o),u=n(i,s),c=n(l,a);return u.concat(c)}function o(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n1?(0!==l&&0!==a&&(0!==(n=o(c,u))&&(r-l-a>0&&0==t[r-l-a-1][0]?t[r-l-a-1][1]+=c.substring(0,n):(t.splice(0,0,[0,c.substring(0,n)]),r++),c=c.substring(n),u=u.substring(n)),0!==(n=i(c,u))&&(t[r][1]=c.substring(c.length-n)+t[r][1],c=c.substring(0,c.length-n),u=u.substring(0,u.length-n))),0===l?t.splice(r-a,l+a,[1,c]):0===a?t.splice(r-l,l+a,[e,u]):t.splice(r-l-a,l+a,[e,u],[1,c]),r=r-l-a+(l?1:0)+(a?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,a=0,l=0,u="",c=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(r=1;r=0&&r>=e-1;r--)if(r+1{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/align-center.svg?f9afebbb6ae4c2964aa7cb35a8eb0d9d"},3249:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/align-justify.svg?90285f1f11db1912e9645c4a5e525344"},7778:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/align-left.svg?0f8ad7994ca19d6495042555af243eef"},1394:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/align-right.svg?626a3d25131f64ad41bfff6ad1ef10f5"},4188:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/background.svg?82e25f0bd823d4d4fb1e7f4ab0a78ff8"},1364:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/blockquote.svg?928aa5af401fb29fa07515a942ddd4d4"},6:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/bold.svg?7781b6114a3fb65a98f0b178c0d67578"},764:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/clean.svg?d59691df45537ae1a2637d373cdb3c90"},8737:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/code.svg?ea85b5c2863ee647d7bf543564349f8d"},761:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/color.svg?6c2b4048a0fa0cd5f2c5d920eb95ee48"},7073:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/direction-ltr.svg?d8052e6399cfca6a8a71de21b82bad55"},377:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/direction-rtl.svg?1375883b2f1e6de4a4621aca550cbd1d"},6861:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/float-center.svg?5793f183d1a93dc6f65ee9872c887088"},1911:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/float-full.svg?928ea0b8deb9e17786f2bbcd77324de2"},9378:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/float-left.svg?917812e3f874fe7614bdc5302f157012"},6824:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/float-right.svg?a595de253808219158737e11e9172a1a"},5377:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/formula.svg?513e689177d9c7b25d1f232b2497570c"},1239:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/header-2.svg?34914793e4453a1d65d78b933b421fce"},2390:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/header.svg?8c2dc93d4be101f76bae77761ec90c8e"},4485:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/image.svg?bffb79ce0fc8b41e9e6ce90bea00618b"},2195:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/indent.svg?b5fc7f81a004c4855833c500b0c538db"},3225:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/italic.svg?ff0ddc3f7d3244531d0a87389f6e151a"},895:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/link.svg?5c302e73950bc52c1afb8cf4f3ceb707"},1815:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/list-bullet.svg?cb92933c891e9914f1ac99ea79305cd4"},6097:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/list-check.svg?b70fb56c61cdc4dfdacbc1d7914368a6"},6929:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/list-ordered.svg?3e184f964f06cafa0ae283d1ad5b6cd8"},4439:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/outdent.svg?dd7145d26d6ba4aed3ebd11dc181d507"},8497:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/strike.svg?248ad333a3ad0b651e533dfadb12dde0"},7664:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/subscript.svg?9d8ea7c3c97df4bc024f7dab9248f7ce"},448:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/superscript.svg?3bed5966c174cea3f1047990c82290a3"},5479:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/underline.svg?585c47324c8f9d8c076d8d7bb452efaa"},7981:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r="/images/vendor/quill/icons/video.svg?eaeee04ce09d795ae77deaff36281c80"},7648:t=>{"use strict";var e="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";t.exports=function(t){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(e+i);for(var s,l=n.call(arguments,1),a=function(){if(this instanceof s){var e=i.apply(this,l.concat(n.call(arguments)));return Object(e)===e?e:this}return i.apply(t,l.concat(n.call(arguments)))},u=Math.max(0,i.length-l.length),c=[],f=0;f{"use strict";var r=n(7648);t.exports=Function.prototype.bind||r},210:(t,e,n)=>{"use strict";var r,o=SyntaxError,i=Function,s=TypeError,l=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var u=function(){throw new s},c=a?function(){try{return u}catch(t){try{return a(arguments,"callee").get}catch(t){return u}}}():u,f=n(1405)(),h=Object.getPrototypeOf||function(t){return t.__proto__},p={},d="undefined"==typeof Uint8Array?r:h(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":f?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?h(h([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?h((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?h((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?h(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},g=function t(e){var n;if("%AsyncFunction%"===e)n=l("async function () {}");else if("%GeneratorFunction%"===e)n=l("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=l("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(n=h(o.prototype))}return y[e]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(8612),m=n(7642),_=b.call(Function.call,Array.prototype.concat),E=b.call(Function.apply,Array.prototype.splice),O=b.call(Function.call,String.prototype.replace),w=b.call(Function.call,String.prototype.slice),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,N=function(t){var e=w(t,0,1),n=w(t,-1);if("%"===e&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return O(t,x,(function(t,e,n,o){r[r.length]=n?O(o,A,"$1"):e||t})),r},k=function(t,e){var n,r=t;if(m(v,r)&&(r="%"+(n=v[r])[0]+"%"),m(y,r)){var i=y[r];if(i===p&&(i=g(r)),void 0===i&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');var n=N(t),r=n.length>0?n[0]:"",i=k("%"+r+"%",e),l=i.name,u=i.value,c=!1,f=i.alias;f&&(r=f[0],E(n,_([0,1],f)));for(var h=1,p=!0;h=n.length){var b=a(u,d);u=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[d]}else p=m(u,d),u=u[d];p&&!c&&(y[l]=u)}}return u}},1405:(t,e,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5419:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(t,e,n)=>{"use strict";var r=n(8612);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},645:(t,e)=>{e.read=function(t,e,n,r,o){var i,s,l=8*o-r-1,a=(1<>1,c=-7,f=n?o-1:0,h=n?-1:1,p=t[e+f];for(f+=h,i=p&(1<<-c)-1,p>>=-c,c+=l;c>0;i=256*i+t[e+f],f+=h,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=r;c>0;s=256*s+t[e+f],f+=h,c-=8);if(0===i)i=1-u;else{if(i===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,l,a,u=8*i-o-1,c=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+f>=1?h/a:h*Math.pow(2,1-f))*a>=2&&(s++,a/=2),s+f>=c?(l=0,s=c):s+f>=1?(l=(e*a-1)*Math.pow(2,o),s+=f):(l=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+p]=255&l,p+=d,l/=256,o-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,u-=8);t[n+p-d]|=128*y}},2584:(t,e,n)=>{"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=n(1924)("Object.prototype.toString"),i=function(t){return!(r&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},s=function(t){return!!i(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},l=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=l?i:s},8923:t=>{"use strict";var e=Date.prototype.getDay,n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"==typeof t&&null!==t&&(r?function(t){try{return e.call(t),!0}catch(t){return!1}}(t):"[object Date]"===n.call(t))}},8420:(t,e,n)=>{"use strict";var r,o,i,s,l=n(1924),a=n(1405)()&&"symbol"==typeof Symbol.toStringTag;if(a){r=l("Object.prototype.hasOwnProperty"),o=l("RegExp.prototype.exec"),i={};var u=function(){throw i};s={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=u)}var c=l("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=a?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!(e&&r(e,"value")))return!1;try{o(t,s)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===c(t)}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},4244:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,n){return 0===t&&0===n?1/t==1/n:t===n||!(!e(t)||!e(n))}},609:(t,e,n)=>{"use strict";var r=n(4289),o=n(5559),i=n(4244),s=n(5624),l=n(2281),a=o(s(),Object);r(a,{getPolyfill:s,implementation:i,shim:l}),t.exports=a},5624:(t,e,n)=>{"use strict";var r=n(4244);t.exports=function(){return"function"==typeof Object.is?Object.is:r}},2281:(t,e,n)=>{"use strict";var r=n(5624),o=n(4289);t.exports=function(){var t=r();return o(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8987:(t,e,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=n(1414),l=Object.prototype.propertyIsEnumerable,a=!l.call({toString:null},"toString"),u=l.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),r=s(t),l=e&&"[object String]"===i.call(t),h=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=u&&n;if(l&&t.length>0&&!o.call(t,0))for(var y=0;y0)for(var g=0;g{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,s=i?function(t){return i(t)}:n(8987),l=Object.keys;s.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return o(t)?l(r.call(t)):l(t)}):Object.keys=s;return Object.keys||s},t.exports=s},1414:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},347:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return o(e,t),e}(Error);e.ParchmentError=i;var s,l={},a={},u={},c={};function f(t,e){var n;if(void 0===e&&(e=s.ANY),"string"==typeof t)n=c[t]||l[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&s.LEVEL&s.BLOCK?n=c.block:t&s.LEVEL&s.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=a[r[o]])break;n=n||u[t.tagName]}return null==n?null:e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(s=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new i("Unable to create "+t+" blot");var r=n,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(o,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");if(c[r.blotName||r.attrName]=r,"string"==typeof r.keyName)l[r.keyName]=r;else if(null!=r.className&&(a[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var o=Array.isArray(r.tagName)?r.tagName:[r.tagName];o.forEach((function(t){null!=u[t]&&null!=r.className||(u[t]=r)}))}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),s=n(5),l=n(0),a=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof l.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,(function(n,r,s){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=s})),o},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,o){t.formatAt(e,o,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var s=null==n?l.create("text",e):l.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new l.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=l.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],s=[[this,t]];return o instanceof e?s.concat(o.path(i,n)):(null!=o&&s.push([o,i]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,o){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],o=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),o.push.apply(o,t.removedNodes))})),o.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=l.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=l.find(t.nextSibling));var r=u(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))}))},e}(s.default);function u(t){var e=l.find(t);if(null==e)try{e=l.create(t)}catch(n){e=l.create(l.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(6),l=n(2),a=n(0),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new s.default(n.domNode),n}return o(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(l.default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=n(0),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=s.Scope.INLINE_BLOT,e}(i.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var s=r.create(this.statics.scope);i.wrap(s),s.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(7),i=n(8),s=n(0),l=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),l=i.default.keys(this.domNode);e.concat(n).concat(l).forEach((function(e){var n=s.query(e,s.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){i(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(1).default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(1).default);e.default=s},function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(3),i=n(4),s=n(12),l=n(13),a=n(14),u=n(15),c=n(16),f=n(1),h=n(7),p=n(8),d=n(6),y=n(0),g={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:s.default,Block:a.default,Inline:l.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ts?n(r,t-s,Math.min(e,s+a-t)):n(r,0,Math.min(a,t+e-s)),s+=a}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),s=n(0),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,l),n.attach(),n}return o(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)e.push(o.pop());for(var l=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[s.DATA_KEY].mutations&&(t.domNode[s.DATA_KEY].mutations=[]),e&&l(t.parent))},a=function(t){null!=t.domNode[s.DATA_KEY]&&null!=t.domNode[s.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(a),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=s.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(l(s.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=s.find(t,!1);l(e,!1),e instanceof i.default&&e.children.forEach((function(t){l(t,!1)}))}))):"attributes"===t.type&&l(e.prev)),l(e))})),this.children.forEach(a),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=s.find(t.target,!0);return null==e?null:null==e.domNode[s.DATA_KEY].mutations?(e.domNode[s.DATA_KEY].mutations=[t],e):(e.domNode[s.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[s.DATA_KEY]&&t.update(t.domNode[s.DATA_KEY].mutations||[],n)})),null!=this.domNode[s.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),s=n(0),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){null!=this.formats()[r]||s.query(r,s.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=s.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),s=n(0),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){var r=s.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=s.query(r,s.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=s.query(n,s.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),i=s.create(n,r);o.parent.insertBefore(i,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(4).default);e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),s=n(0),l=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=s.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=s.Scope.INLINE_BLOT,e}(i.default);e.default=l}])},t.exports=e()},4175:(t,e,n)=>{var r=n(7529),o=n(251),i=n(4470),s=n(6910),l=String.fromCharCode(0),a=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};a.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},a.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},a.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},a.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},a.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},a.prototype.filter=function(t){return this.ops.filter(t)},a.prototype.forEach=function(t){this.ops.forEach(t)},a.prototype.map=function(t){return this.ops.map(t)},a.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},a.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},a.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+s.length(e):e.delete?t-e.delete:t}),0)},a.prototype.length=function(){return this.reduce((function(t,e){return t+s.length(e)}),0)},a.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=s.iterator(this.ops),o=0;o0&&n.next(i.retain-l)}for(var u=new a(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"==typeof h.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var d=s.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);if(d&&(p.attributes=d),u.push(p),!n.hasNext()&&o(u.ops[u.ops.length-1],p)){var y=new a(e.rest());return u.concat(y).chop()}}else"number"==typeof h.delete&&"number"==typeof f.retain&&u.push(h)}return u.chop()},a.prototype.concat=function(t){var e=new a(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},a.prototype.diff=function(t,e){if(this.ops===t.ops)return new a;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),i=new a,u=r(n[0],n[1],e),c=s.iterator(this.ops),f=s.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var l=c.next(n),a=f.next(n);o(l.insert,a.insert)?i.retain(n,s.attributes.diff(l.attributes,a.attributes)):i.push(a).delete(n)}e-=n}})),i.chop()},a.prototype.eachLine=function(t,e){e=e||"\n";for(var n=s.iterator(this.ops),r=new a,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),l=s.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,l)-l:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new a}}r.length()>0&&t(r,{},o)},a.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=s.iterator(this.ops),r=s.iterator(t.ops),o=new a;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),l=n.next(i),u=r.next(i);if(l.delete)continue;u.delete?o.push(u):o.retain(i,s.attributes.transform(l.attributes,u.attributes,e))}else o.retain(s.length(n.next()));return o.chop()},a.prototype.transformPosition=function(t,e){e=!!e;for(var n=s.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r{var r=n(251),o=n(4470),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e);for(var i in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,o){return r(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new s(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function s(t){this.ops=t,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},s.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=i},8299:()=>{let t=document.createElement("div");if(t.classList.toggle("test-class",!1),t.classList.contains("test-class")){let t=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,n){return arguments.length>1&&!this.contains(e)==!n?n:t.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");if(c[r.blotName||r.attrName]=r,"string"==typeof r.keyName)l[r.keyName]=r;else if(null!=r.className&&(a[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var o=Array.isArray(r.tagName)?r.tagName:[r.tagName];o.forEach((function(t){null!=u[t]&&null!=r.className||(u[t]=r)}))}return r}},function(t,e,n){var r=n(51),o=n(11),i=n(3),s=n(20),l=String.fromCharCode(0),a=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};a.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},a.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},a.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},a.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},a.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},a.prototype.filter=function(t){return this.ops.filter(t)},a.prototype.forEach=function(t){this.ops.forEach(t)},a.prototype.map=function(t){return this.ops.map(t)},a.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},a.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},a.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+s.length(e):e.delete?t-e.delete:t}),0)},a.prototype.length=function(){return this.reduce((function(t,e){return t+s.length(e)}),0)},a.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=s.iterator(this.ops),o=0;o0&&n.next(i.retain-l)}for(var u=new a(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"==typeof h.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var d=s.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);if(d&&(p.attributes=d),u.push(p),!n.hasNext()&&o(u.ops[u.ops.length-1],p)){var y=new a(e.rest());return u.concat(y).chop()}}else"number"==typeof h.delete&&"number"==typeof f.retain&&u.push(h)}return u.chop()},a.prototype.concat=function(t){var e=new a(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},a.prototype.diff=function(t,e){if(this.ops===t.ops)return new a;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),i=new a,u=r(n[0],n[1],e),c=s.iterator(this.ops),f=s.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var l=c.next(n),a=f.next(n);o(l.insert,a.insert)?i.retain(n,s.attributes.diff(l.attributes,a.attributes)):i.push(a).delete(n)}e-=n}})),i.chop()},a.prototype.eachLine=function(t,e){e=e||"\n";for(var n=s.iterator(this.ops),r=new a,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),l=s.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,l)-l:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new a}}r.length()>0&&t(r,{},o)},a.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=s.iterator(this.ops),r=s.iterator(t.ops),o=new a;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),l=n.next(i),u=r.next(i);if(l.delete)continue;u.delete?o.push(u):o.retain(i,s.attributes.transform(l.attributes,u.attributes,e))}else o.retain(s.length(n.next()));return o.chop()},a.prototype.transformPosition=function(t,e){e=!!e;for(var n=s.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}(l.default.Block);function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,i.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,l.default.Embed,c.default],e.bubbleFormats=v,e.BlockEmbed=y,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,t),this.options=E(e,r),this.container=this.options.container,null==this.container)return m.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new a.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(a.default.events.EDITOR_CHANGE,(function(t){t===a.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(a.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;O.call(n,(function(){return n.editor.update(null,e,o)}),t)}));var i=this.clipboard.convert("
"+o+"


");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),d.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&m.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||m.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),i(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=w(t,e,n),s=o(i,4);return t=s[0],e=s[1],n=s[3],O.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.default.sources.API;return O.call(this,(function(){var r=n.getSelection(!0),o=new s.default;if(null==r)return o;if(c.default.query(t,c.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,v({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,v({},t,e))}return n.setSelection(r,a.default.sources.SILENT),o}),r)}},{key:"formatLine",value:function(t,e,n,r,i){var s,l=this,a=w(t,e,n,r,i),u=o(a,4);return t=u[0],e=u[1],s=u[2],i=u[3],O.call(this,(function(){return l.editor.formatLine(t,e,s)}),i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var s,l=this,a=w(t,e,n,r,i),u=o(a,4);return t=u[0],e=u[1],s=u[2],i=u[3],O.call(this,(function(){return l.editor.formatText(t,e,s)}),i,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return O.call(this,(function(){return o.editor.insertEmbed(e,n,r)}),i,e)}},{key:"insertText",value:function(t,e,n,r,i){var s,l=this,a=w(t,0,n,r,i),u=o(a,4);return t=u[0],s=u[2],i=u[3],O.call(this,(function(){return l.editor.insertText(t,e,s)}),i,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=w(t,e,n),s=o(i,4);return t=s[0],e=s[1],n=s[3],O.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.sources.API;return O.call(this,(function(){t=new s.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=w(e,n,r),s=o(i,4);e=s[0],n=s[1],r=s[3],this.selection.setRange(new f.Range(e,n),r),r!==a.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.sources.API,n=(new s.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.sources.API;return O.call(this,(function(){return t=new s.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function E(t,e){if((e=(0,p.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==_.DEFAULTS.theme){if(e.theme=_.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=y.default;var n=(0,p.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=_.import("modules/"+e);return null==n?m.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,p.default)(!0,{},_.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function O(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===a.default.sources.USER)return new s.default;var o=null==n?null:this.getSelection(),i=this.editor.delta,l=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=x(o,l,e):0!==r&&(o=x(o,n,r,e)),this.setSelection(o,a.default.sources.SILENT)),l.length()>0){var u,c,f=[a.default.events.TEXT_CHANGE,l,i,e];(u=this.emitter).emit.apply(u,[a.default.events.EDITOR_CHANGE].concat(f)),e!==a.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return l}function w(t,e,n,o,i){var s={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=o,o=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=o,o=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(s=n,i=o):"string"==typeof n&&(null!=o?s[n]=o:i=n),[t,e,s,i=i||a.default.sources.API]}function x(t,e,n,r){if(null==t)return null;var i=void 0,l=void 0;if(e instanceof s.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==a.default.sources.USER)})),c=o(u,2);i=c[0],l=c[1]}else{var h=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),p=o(h,2);i=p[0],l=p[1]}return new f.Range(i,l-i)}_.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},_.events=a.default.events,_.sources=a.default.sources,_.version="1.3.7",_.imports={delta:s.default,parchment:c.default,"core/module":u.default,"core/theme":y.default},e.expandConfig=E,e.overload=w,e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],o="warn";function i(t){if(r.indexOf(t)<=r.indexOf(o)){for(var e,n=arguments.length,i=Array(n>1?n-1:0),s=1;s=0;u--)if(f[u]!=h[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!s(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function l(t){return null==t}function a(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n=t+n)){var s=this.newlineIndex(t,!0)+1,a=i-s+1,u=this.isolate(s,a),c=u.next;u.format(r,o),c instanceof e&&c.formatAt(0,t-s+n-a,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var o=this.descendant(c.default,t),i=r(o,2),s=i[0],l=i[1];s.insertAt(l,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=l.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof l.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(a.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=y,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n=i&&!p.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,p);var d=e.scroll.line(t),y=o(d,2),v=y[0],b=y[1],m=(0,g.default)({},(0,f.bubbleFormats)(v));if(v instanceof h.default){var _=v.descendant(a.default.Leaf,b),E=o(_,1)[0];m=(0,g.default)(m,(0,f.bubbleFormats)(E))}c=l.default.attributes.diff(m,c)||{}}else if("object"===r(s.insert)){var O=Object.keys(s.insert)[0];if(null==O)return t;e.scroll.insertAt(t,O,s.insert[O])}i+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new s.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),s=e;i.forEach((function(e){var i=e.length();if(e instanceof u.default){var l=t-e.offset(n.scroll),a=e.newlineIndex(l+s)-l+1;e.formatAt(l,a,o,r[o])}else e.format(o,r[o]);s-=i}))}})),this.scroll.optimize(),this.update((new s.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e,o,r[o])})),this.update((new s.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new s.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=o(t,1)[0];e instanceof h.default?n.push(e):e instanceof a.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(a.default.Leaf,t,e));var i=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,i)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new s.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e.length,o,r[o])})),this.update((new s.default).retain(t).insert(e,(0,d.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===h.default.blotName&&!(t.children.length>1)&&t.children.head instanceof p.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),i=o(r,2),l=i[0],a=i[1],c=0,f=new s.default;null!=l&&(c=l instanceof u.default?l.newlineIndex(a)-a+1:l.length()-a,f=l.delta().slice(a,a+c-1).insert("\n"));var h=this.getContents(t,e+c).diff((new s.default).insert(n).concat(f)),p=(new s.default).retain(t).concat(h);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(b)&&a.default.find(e[0].target)){var o=a.default.find(e[0].target),i=(0,f.bubbleFormats)(o),l=o.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),h=(new s.default).insert(u),p=(new s.default).insert(o.value()),d=(new s.default).retain(l).concat(h.diff(p,n));t=d.reduce((function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)}),new s.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,y.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},d=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,a.default.sources.USER),1)})),this.emitter.on(a.default.events.EDITOR_CHANGE,(function(t,e){t===a.default.events.TEXT_CHANGE&&e.length()>0&&r.update(a.default.sources.SILENT)})),this.emitter.on(a.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(a.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(a.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,o=n.startNode,i=n.startOffset,s=n.endNode,l=n.endOffset;r.setNativeRange(o,i,s,l)}})),this.update(a.default.sources.SILENT)}return o(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(a.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(t,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1);if(null==r)return;if(r instanceof i.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var o=void 0,i=this.scroll.leaf(t),s=r(i,2),l=s[0],a=s[1];if(null==l)return null;var u=l.position(a,!0),c=r(u,2);o=c[0],a=c[1];var f=document.createRange();if(e>0){f.setStart(o,a);var h=this.scroll.leaf(t+e),p=r(h,2);if(l=p[0],a=p[1],null==l)return null;var d=l.position(a,!0),y=r(d,2);return o=y[0],a=y[1],f.setEnd(o,a),f.getBoundingClientRect()}var g="left",v=void 0;return o instanceof Text?(a0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var o=n.map((function(t){var n=r(t,2),o=n[0],s=n[1],l=i.default.find(o,!0),a=l.offset(e.scroll);return 0===s?a:l instanceof i.default.Container?a+l.length():a+l.index(o,s)})),s=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),l=Math.min.apply(Math,[s].concat(c(o)));return new p(l,s-l)}},{key:"normalizeNative",value:function(t){if(!y(this.root,t.startContainer)||!t.collapsed&&!y(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],o=[],i=this.scroll.length();return n.forEach((function(t,n){t=Math.min(i-1,t);var s,l=e.scroll.leaf(t),a=r(l,2),u=a[0],c=a[1],f=u.position(c,0!==n),h=r(f,2);s=h[0],c=h[1],o.push(s,c)})),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var o=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,o)),s=r(i,1)[0],l=s;if(e.length>0){var a=this.scroll.line(Math.min(e.index+e.length,o));l=r(a,1)[0]}if(null!=s&&null!=l){var u=t.getBoundingClientRect();n.topu.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||o||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var l=document.createRange();l.setStart(t,e),l.setEnd(n,r),i.removeAllRanges(),i.addRange(l)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.default.sources.API;if("string"==typeof e&&(n=e,e=!1),h.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.default.sources.USER,e=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],u=o[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var f,h=[a.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(e),t];(c=this.emitter).emit.apply(c,[a.default.events.EDITOR_CHANGE].concat(h)),t!==a.default.sources.SILENT&&(f=this.emitter).emit.apply(f,h)}}}]),t}();function y(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=p,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=s.Scope.INLINE_BLOT,e}(i.default);e.default=l},function(t,e,n){var r=n(11),o=n(3),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e);for(var i in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,o){return r(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new s(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function s(t){this.ops=t,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},s.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=i},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,r;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{r=Promise}catch(t){r=function(){}}function i(s,a,u,c,f){"object"==typeof a&&(u=a.depth,c=a.prototype,f=a.includeNonEnumerable,a=a.circular);var h=[],p=[],d=void 0!==o;return void 0===a&&(a=!0),void 0===u&&(u=1/0),function s(u,y){if(null===u)return null;if(0===y)return u;var g,v;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,n))g=new n;else if(t(u,r))g=new r((function(t,e){u.then((function(e){t(s(e,y-1))}),(function(t){e(s(t,y-1))}))}));else if(i.__isArray(u))g=[];else if(i.__isRegExp(u))g=new RegExp(u.source,l(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(i.__isDate(u))g=new Date(u.getTime());else{if(d&&o.isBuffer(u))return g=o.allocUnsafe?o.allocUnsafe(u.length):new o(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(v=Object.getPrototypeOf(u),g=Object.create(v)):(g=Object.create(c),v=c)}if(a){var b=h.indexOf(u);if(-1!=b)return p[b];h.push(u),p.push(g)}for(var m in t(u,e)&&u.forEach((function(t,e){var n=s(e,y-1),r=s(t,y-1);g.set(n,r)})),t(u,n)&&u.forEach((function(t){var e=s(t,y-1);g.add(e)})),u){var _;v&&(_=Object.getOwnPropertyDescriptor(v,m)),_&&null==_.set||(g[m]=s(u[m],y-1))}if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(u);for(m=0;m0){if(l instanceof a.BlockEmbed||p instanceof a.BlockEmbed)return void this.optimize();if(l instanceof f.default){var d=l.newlineIndex(l.length(),!0);if(d>-1&&(l=l.split(d+1))===p)return void this.optimize()}else if(p instanceof f.default){var y=p.newlineIndex(0);y>-1&&p.split(y+1)}var g=p.children.head instanceof c.default?null:p.children.head;l.moveChildren(p,g),l.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==s.default.query(n,s.default.Scope.BLOCK)){var o=s.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var l=s.default.create(n,r);this.appendChild(l)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===s.default.Scope.INLINE_BLOT){var r=s.default.create(this.statics.defaultChild);r.appendChild(t),t=r}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(d,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,(function(e,n,r){d(e)?o.push(e):e instanceof s.default.Container&&(o=o.concat(t(e,n,i))),i-=r})),o};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=l.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,t),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,t)}}}]),e}(s.default.Scroll);y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[u.default,a.BlockEmbed,h.default],e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=k(t);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,a.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,s=(t.bindings[i]||[]).filter((function(t){return e.match(n,t)}));if(0!==s.length){var a=t.quill.getSelection();if(null!=a&&t.quill.hasFocus()){var u=t.quill.getLine(a.index),c=o(u,2),h=c[0],p=c[1],d=t.quill.getLeaf(a.index),y=o(d,2),g=y[0],v=y[1],b=0===a.length?[g,v]:t.quill.getLeaf(a.index+a.length),m=o(b,2),_=m[0],E=m[1],O=g instanceof f.default.Text?g.value().slice(0,v):"",w=_ instanceof f.default.Text?_.value().slice(E):"",x={collapsed:0===a.length,empty:0===a.length&&h.length()<=1,format:t.quill.getFormat(a),offset:p,prefix:O,suffix:w};s.some((function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==x.format[t]})))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,l.default)(e.format[t],x.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix)||null!=e.suffix&&!e.suffix.test(x.suffix)||!0===e.handler.call(t,a,x))}))&&n.preventDefault()}}}}))}}]),e}(d.default);function _(t,e){var n,r=t===m.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;t===m.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(o(i,1)[0]instanceof f.default.Embed&&(t===m.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),1))})),n}function E(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=o(n,1)[0],i={};if(0===e.offset){var s=this.quill.getLine(t.index-1),l=o(s,1)[0];if(null!=l&&l.length()>1){var a=r.formats(),u=this.quill.getFormat(t.index-1,1);i=c.default.attributes.diff(a,u)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,h.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,h.default.sources.USER),this.quill.focus()}}function O(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=0,s=this.quill.getLine(t.index),l=o(s,1)[0];if(e.offset>=l.length()-1){var a=this.quill.getLine(t.index+1),u=o(a,1)[0];if(u){var f=l.formats(),p=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,p)||{},i=u.length()}}this.quill.deleteText(t.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,h.default.sources.USER)}}function w(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),o=e[e.length-1].formats();n=c.default.attributes.diff(o,r)||{}}this.quill.deleteText(t,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,h.default.sources.USER),this.quill.setSelection(t.index,h.default.sources.SILENT),this.quill.focus()}function x(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],h.default.sources.USER))}))}function A(t){return{key:m.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,i=e.length,s=this.quill.scroll.descendant(n,r),l=o(s,2),a=l[0],u=l[1];if(null!=a){var c=this.quill.getIndex(a),p=a.newlineIndex(u,!0)+1,d=a.newlineIndex(c+u+i),y=a.domNode.textContent.slice(p,d).split("\n");u=0,y.forEach((function(e,o){t?(a.insertAt(p+u,n.TAB),u+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(p+u,n.TAB.length),u-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),u+=e.length+1})),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,i,h.default.sources.SILENT)}}}}function N(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],h.default.sources.USER)}}}function k(t){if("string"==typeof t||"number"==typeof t)return k({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,s.default)(t,!1)),"string"==typeof t.key)if(null!=m.keys[t.key.toUpperCase()])t.key=m.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[b]=t.shortKey,delete t.shortKey),t}m.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},m.DEFAULTS={bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{key:m.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:m.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:m.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":A(!0),"outdent code-block":A(!1),"remove tab":{key:m.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,h.default.sources.USER)}},tab:{key:m.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,h.default.sources.SILENT)}},"list empty enter":{key:m.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,h.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:m.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],s=(0,a.default)({},r.formats(),{list:"checked"}),l=(new u.default).retain(t.index).insert("\n",s).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(l,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:m.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=o(n,2),i=r[0],s=r[1],l=(new u.default).retain(t.index).insert("\n",e.format).retain(i.length()-s-1).retain(1,{header:null});this.quill.updateContents(l,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),i=o(r,2),s=i[0],l=i[1];if(l>n)return!0;var a=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(t.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-l).delete(n+1).retain(s.length()-2-l).retain(1,{list:a});this.quill.updateContents(c,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,h.default.sources.SILENT)}},"code exit":{key:m.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],s=(new u.default).retain(t.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,h.default.sources.USER)}},"embed left":_(m.keys.LEFT,!1),"embed left shift":_(m.keys.LEFT,!0),"embed right":_(m.keys.RIGHT,!1),"embed right shift":_(m.keys.RIGHT,!0)}},e.default=m,e.SHORTKEY=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(r):void 0},i=function(){function t(t,e){for(var n=0;n-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=u,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(0)),o=v(n(5)),i=n(4),s=v(i),l=v(n(16)),a=v(n(25)),u=v(n(24)),c=v(n(35)),f=v(n(6)),h=v(n(22)),p=v(n(7)),d=v(n(55)),y=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}o.default.register({"blots/block":s.default,"blots/block/embed":i.BlockEmbed,"blots/break":l.default,"blots/container":a.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":h.default,"blots/text":p.default,"modules/clipboard":d.default,"modules/history":y.default,"modules/keyboard":g.default}),r.default.register(s.default,l.default,u.default,f.default,h.default,p.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var s=r.create(this.statics.scope);i.wrap(s),s.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),o=n(32),i=n(33),s=n(1),l=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),l=i.default.keys(this.domNode);e.concat(n).concat(l).forEach((function(e){var n=s.query(e,s.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){i(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(s(n(9)).default);function a(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=o.default.query(t,o.default.Scope.BLOCK)})))}(t)&&(n-=1),n}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=l,e.getLastChangeIndex=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,l.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var o=this.quill.getSelection(!0);if(null!=o){var i=o.index+o.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",l.default.sources.USER),this.quill.setSelection(i+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(p.default);function A(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}e.BaseTooltip=x,e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ts?n(r,t-s,Math.min(e,s+a-t)):n(r,0,Math.min(a,t+e-s)),s+=a}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),s=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,l),n.attach(),n}return o(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)e.push(o.pop());for(var l=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[s.DATA_KEY].mutations&&(t.domNode[s.DATA_KEY].mutations=[]),e&&l(t.parent))},a=function(t){null!=t.domNode[s.DATA_KEY]&&null!=t.domNode[s.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(a),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=s.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(l(s.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=s.find(t,!1);l(e,!1),e instanceof i.default&&e.children.forEach((function(t){l(t,!1)}))}))):"attributes"===t.type&&l(e.prev)),l(e))})),this.children.forEach(a),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=s.find(t.target,!0);return null==e?null:null==e.domNode[s.DATA_KEY].mutations?(e.domNode[s.DATA_KEY].mutations=[t],e):(e.domNode[s.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[s.DATA_KEY]&&t.update(t.domNode[s.DATA_KEY].mutations||[],n)})),null!=this.domNode[s.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),s=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){null!=this.formats()[r]||s.query(r,s.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=s.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),s=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){var r=s.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=s.query(r,s.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=s.query(n,s.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),i=s.create(n,r);o.parent.insertBefore(i,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),s=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=s.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=s.Scope.INLINE_BLOT,e}(i.default);e.default=l},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;ie.length?t:e,u=t.length>e.length?e:t,c=a.indexOf(u);if(-1!=c)return l=[[1,a.substring(0,c)],[0,u],[1,a.substring(c+u.length)]],t.length>e.length&&(l[0][0]=l[2][0]=n),l;if(1==u.length)return[[n,t],[1,e]];var f=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,o,l,a,f]:null}var l,a,u,c,f,h=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));if(!h&&!p)return null;l=p?h&&h[4].length>p[4].length?h:p:h,t.length>e.length?(a=l[0],u=l[1],c=l[2],f=l[3]):(c=l[0],f=l[1],a=l[2],u=l[3]);var d=l[4];return[a,u,c,f,d]}(t,e);if(f){var h=f[0],p=f[1],d=f[2],y=f[3],g=f[4],v=r(h,d),b=r(p,y);return v.concat([[0,g]],b)}return function(t,e){for(var r=t.length,i=e.length,s=Math.ceil((r+i)/2),l=s,a=2*s,u=new Array(a),c=new Array(a),f=0;fr)y+=2;else if(E>i)d+=2;else if(p&&(x=l+h-m)>=0&&x=(w=r-c[x]))return o(t,e,N,E)}for(var O=-b+g;O<=b-v;O+=2){for(var w,x=l+O,A=(w=O==-b||O!=b&&c[x-1]r)v+=2;else if(A>i)g+=2;else if(!p){var N;if((_=l+h-O)>=0&&_=(w=r-w))return o(t,e,N,E)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-c),e=e.substring(0,e.length-c));return f&&p.unshift([0,f]),h&&p.push([0,h]),l(p),null!=a&&(p=function(t,e){var r=function(t,e){if(0===e)return[0,t];for(var r=0,o=0;o0&&o.splice(i+2,0,[l[0],a]),u(o,i,3)}return t}(p,a)),p=function(t){for(var e=!1,r=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},o=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},i=2;i0&&s.push(t[i]);return s}(p)}function o(t,e,n,o){var i=t.substring(0,n),s=e.substring(0,o),l=t.substring(n),a=e.substring(o),u=r(i,s),c=r(l,a);return u.concat(c)}function i(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n1?(0!==o&&0!==a&&(0!==(e=i(c,u))&&(r-o-a>0&&0==t[r-o-a-1][0]?t[r-o-a-1][1]+=c.substring(0,e):(t.splice(0,0,[0,c.substring(0,e)]),r++),c=c.substring(e),u=u.substring(e)),0!==(e=s(c,u))&&(t[r][1]=c.substring(c.length-e)+t[r][1],c=c.substring(0,c.length-e),u=u.substring(0,u.length-e))),0===o?t.splice(r-a,o+a,[1,c]):0===a?t.splice(r-o,o+a,[n,u]):t.splice(r-o-a,o+a,[n,u],[1,c]),r=r-o-a+(o?1:0)+(a?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,a=0,o=0,u="",c=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(r=1;r=0&&r>=e-1;r--)if(r+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=k(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new l.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=a.default.query(t);if(null==n||"list-item"!==n.blotName||!S(e,"\n"))return e;for(var r=-1,o=t.parentNode;!o.classList.contains("ql-clipboard");)"list"===(a.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?e:e.compose((new l.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",L.bind(L,"bold")],["i",L.bind(L,"italic")],["style",function(){return new l.default}]],x=[h.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),A=[h.AlignStyle,p.BackgroundStyle,y.ColorStyle,g.DirectionStyle,v.FontStyle,b.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),N=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],w.concat(r.options.matchers).forEach((function(t){var e=o(t,2),i=e[0],s=e[1];(n.matchVisual||s!==I)&&r.addMatcher(i,s)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[d.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new l.default).insert(n,_({},d.default.blotName,e[d.default.blotName]))}var r=this.prepareMatching(),i=o(r,2),s=i[0],a=i[1],u=j(this.container,s,a);return S(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new l.default).retain(u.length()-1).delete(1))),E.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new l.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new l.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,u.default.sources.USER),e.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var i=o(r,2),s=i[0],l=i[1];switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:e.push(l);break;default:[].forEach.call(t.container.querySelectorAll(s),(function(t){t[O]=t[O]||[],t[O].push(l)}))}})),[e,n]}}]),e}(f.default);function k(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){return k(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,s.default)({},_({},e,n),r.attributes))}),new l.default)}function T(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function S(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function j(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new l.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(r,o){var i=j(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce((function(t,e){return e(o,t)}),i),i=(o[O]||[]).reduce((function(t,e){return e(o,t)}),i)),r.concat(i)}),new l.default):new l.default}function L(t,e,n){return k(n,t,!0)}function P(t,e){var n=a.default.Attributor.Attribute.keys(t),r=a.default.Attributor.Class.keys(t),o=a.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach((function(e){var n=a.default.query(e,a.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=x[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=A[e])||n.attrName!==e&&n.keyName!==e||(n=A[e],i[n.attrName]=n.value(t)||void 0))})),Object.keys(i).length>0&&(e=k(e,i)),e}function C(t,e){var n=a.default.query(t);if(null==n)return e;if(n.prototype instanceof a.default.Embed){var r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new l.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=k(e,n.blotName,n.formats(t)));return e}function R(t,e){return S(e,"\n")||(q(t)||e.length()>0&&t.nextSibling&&q(t.nextSibling))&&e.insert("\n"),e}function I(t,e){if(q(t)&&null!=t.nextElementSibling&&!S(e,"\n\n")){var n=t.offsetHeight+parseFloat(T(t).marginTop)+parseFloat(T(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function B(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!T(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&q(t.parentNode)||null!=t.previousSibling&&q(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&q(t.parentNode)||null!=t.nextSibling&&q(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}N.DEFAULTS={matchers:[],matchVisual:!0},e.default=N,e.matchAttributor=P,e.matchBlot=C,e.matchNewline=R,e.matchSpacing=I,e.matchText=B},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;nr.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.leftr.bottom){var s=o.bottom-o.top,l=t.bottom-t.top+s;this.root.style.top=n-l+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(r):void 0},i=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=R(n(29)),o=n(36),i=n(38),s=n(64),l=R(n(65)),a=R(n(66)),u=n(67),c=R(u),f=n(37),h=n(26),p=n(39),d=n(40),y=R(n(56)),g=R(n(68)),v=R(n(27)),b=R(n(69)),m=R(n(70)),_=R(n(71)),E=R(n(72)),O=R(n(73)),w=n(13),x=R(w),A=R(n(74)),N=R(n(75)),k=R(n(57)),T=R(n(41)),S=R(n(28)),q=R(n(59)),j=R(n(60)),L=R(n(61)),P=R(n(108)),C=R(n(62));function R(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":d.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":d.SizeStyle},!0),r.default.register({"formats/align":o.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":s.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":p.FontClass,"formats/size":d.SizeClass,"formats/blockquote":l.default,"formats/code-block":x.default,"formats/header":a.default,"formats/list":c.default,"formats/bold":y.default,"formats/code":w.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":b.default,"formats/strike":m.default,"formats/underline":_.default,"formats/image":E.default,"formats/video":O.default,"formats/list/item":u.ListItem,"modules/formula":A.default,"modules/syntax":N.default,"modules/toolbar":k.default,"themes/bubble":P.default,"themes/snow":C.default,"ui/icons":T.default,"ui/picker":S.default,"ui/icon-picker":j.default,"ui/color-picker":q.default,"ui/tooltip":L.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,o=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof h)o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(l.default);p.blotName="list",p.scope=i.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[h],e.ListItem=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(56);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=function(t){function e(){return i(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=o)&&r.__esModule?r:{default:r}).default);l.blotName="italic",l.tagName=["EM","I"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,a.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(l.default.Embed);h.blotName="image",h.tagName="IMG",e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return a.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(a(n(13)).default);h.className="ql-syntax";var p=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),d=function(t){function e(t,n){u(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return r.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(o),o=setTimeout((function(){r.highlight(),o=null}),r.options.interval)})),r.highlight(),r}return f(e,t),r(e,null,[{key:"register",value:function(){s.default.register(p,!0),s.default.register(h,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(h).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(s.default.sources.SILENT),null!=e&&this.quill.setSelection(e,s.default.sources.SILENT)}}}]),e}(l.default);d.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=h,e.CodeToken=p,e.default=d},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(r):void 0},o=function(){function t(t,e){for(var n=0;n0&&o===s.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var l=i[i.length-1],a=r.quill.getIndex(l),c=Math.min(l.length()-1,e.index+e.length-a),f=r.quill.getBounds(new u.Range(a,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return d(e,t),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),e}(l.BaseTooltip);v.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=r()},3964:(t,e,n)=>{t.exports={align:{"":n(7778),center:n(4284),right:n(1394),justify:n(3249)},background:n(4188),blockquote:n(1364),bold:n(6),clean:n(764),code:n(8737),"code-block":n(8737),color:n(761),direction:{"":n(7073),rtl:n(377)},float:{center:n(6861),full:n(1911),left:n(9378),right:n(6824)},formula:n(5377),header:{1:n(2390),2:n(1239)},italic:n(3225),image:n(4485),indent:{"+1":n(2195),"-1":n(4439)},link:n(895),list:{ordered:n(6929),bullet:n(1815),check:n(6097)},script:{sub:n(7664),super:n(448)},strike:n(8497),underline:n(5479),video:n(7981)}},3697:t=>{"use strict";var e=Object,n=TypeError;t.exports=function(){if(null!=this&&this!==e(this))throw new n("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}},2847:(t,e,n)=>{"use strict";var r=n(4289),o=n(5559),i=n(3697),s=n(1721),l=n(2753),a=o(i);r(a,{getPolyfill:s,implementation:i,shim:l}),t.exports=a},1721:(t,e,n)=>{"use strict";var r=n(3697),o=n(4289).supportsDescriptors,i=Object.getOwnPropertyDescriptor,s=TypeError;t.exports=function(){if(!o)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof/a/.dotAll)return t.get}return r}},2753:(t,e,n)=>{"use strict";var r=n(4289).supportsDescriptors,o=n(1721),i=Object.getOwnPropertyDescriptor,s=Object.defineProperty,l=TypeError,a=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!r||!a)throw new l("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=a(u),n=i(e,"flags");return n&&n.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(9166),window.Quill=n(6095)})(); \ No newline at end of file diff --git a/public/js/quill.js.LICENSE.txt b/public/js/quill.js.LICENSE.txt new file mode 100644 index 0000000..b08ac4c --- /dev/null +++ b/public/js/quill.js.LICENSE.txt @@ -0,0 +1,15 @@ +/*! + * Quill Editor v1.3.7 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ diff --git a/public/js/quill.module.js b/public/js/quill.module.js new file mode 100644 index 0000000..93cd384 --- /dev/null +++ b/public/js/quill.module.js @@ -0,0 +1,2 @@ +/*! For license information please see quill.module.js.LICENSE.txt */ +(()=>{var t={9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],l=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,l)),c=0,h=l>0?s-4:s;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e);1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,l=0,a=n-i;la?a:l+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,s=[],l=e;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(t,e,r)=>{"use strict";var n=r(9742),i=r(645),o=r(5826);function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return _(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,s=1,l=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,l/=2,a/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;ol&&(r=l-a),o=r;o>=0;o--){for(var h=!0,f=0;fi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&u)<<6|63&o)>127&&(c=a);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(a=(15&u)<<12|(63&o)<<6|63&s)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:o=t[i+1],s=t[i+2],l=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&l)&&(a=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&l)>65535&&a<1114112&&(c=a)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),u=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return N(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function _(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function I(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,o){return o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,s=1,l=0;for(this[e]=255&t;++o>0)-l&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,s=1,l=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===l&&0!==this[e+o+1]&&(l=1),this[e+o]=(t/s>>0)-l&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}},1924:(t,e,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},5559:(t,e,r)=>{"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),l=i("%Reflect.apply%",!0)||n.call(s,o),a=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=l(n,s,arguments);if(a&&u){var r=a(e,"length");r.configurable&&u(e,"length",{value:1+c(0,t.length-(arguments.length-1))})}return e};var h=function(){return l(n,o,arguments)};u?u(t.exports,"apply",{value:h}):t.exports.apply=h},6313:(t,e,r)=>{var n=r(8764).Buffer,i=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,r,i;try{e=Map}catch(t){e=function(){}}try{r=Set}catch(t){r=function(){}}try{i=Promise}catch(t){i=function(){}}function o(s,a,u,c,h){"object"==typeof a&&(u=a.depth,c=a.prototype,h=a.includeNonEnumerable,a=a.circular);var f=[],p=[],d=void 0!==n;return void 0===a&&(a=!0),void 0===u&&(u=1/0),function s(u,y){if(null===u)return null;if(0===y)return u;var g,m;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,r))g=new r;else if(t(u,i))g=new i((function(t,e){u.then((function(e){t(s(e,y-1))}),(function(t){e(s(t,y-1))}))}));else if(o.__isArray(u))g=[];else if(o.__isRegExp(u))g=new RegExp(u.source,l(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(o.__isDate(u))g=new Date(u.getTime());else{if(d&&n.isBuffer(u))return g=n.allocUnsafe?n.allocUnsafe(u.length):new n(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(m=Object.getPrototypeOf(u),g=Object.create(m)):(g=Object.create(c),m=c)}if(a){var b=f.indexOf(u);if(-1!=b)return p[b];f.push(u),p.push(g)}for(var v in t(u,e)&&u.forEach((function(t,e){var r=s(e,y-1),n=s(t,y-1);g.set(r,n)})),t(u,r)&&u.forEach((function(t){var e=s(t,y-1);g.add(e)})),u){var E;m&&(E=Object.getOwnPropertyDescriptor(m,v)),E&&null==E.set||(g[v]=s(u[v],y-1))}if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(u);for(v=0;v{var n=r(2215),i=r(2584),o=r(609),s=r(8420),l=r(2847),a=r(8923),u=Date.prototype.getTime;function c(t,e,r){var p=r||{};return!!(p.strict?o(t,e):t===e)||(!t||!e||"object"!=typeof t&&"object"!=typeof e?p.strict?o(t,e):t==e:function(t,e,r){var o,p;if(typeof t!=typeof e)return!1;if(h(t)||h(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t)!==i(e))return!1;var d=s(t),y=s(e);if(d!==y)return!1;if(d||y)return t.source===e.source&&l(t)===l(e);if(a(t)&&a(e))return u.call(t)===u.call(e);var g=f(t),m=f(e);if(g!==m)return!1;if(g||m){if(t.length!==e.length)return!1;for(o=0;o=0;o--)if(b[o]!=v[o])return!1;for(o=b.length-1;o>=0;o--)if(!c(t[p=b[o]],e[p],r))return!1;return!0}(t,e,p))}function h(t){return null==t}function f(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}t.exports=c},4289:(t,e,r)=>{"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,l=Object.defineProperty,a=l&&function(){var t={};try{for(var e in l(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),u=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(a?l(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},c=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var l=0;l{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),o.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},o.prototype.listeners=function(t,e){var n=r?r+t:t,i=this._events[n];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,l=new Array(s);o{"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},s=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var n,i=e.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!i&&!o)return!1;for(n in t);return void 0===n||e.call(t,n)},l=function(t,e){n&&"__proto__"===e.name?n(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},a=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(i)return i(t,r).value}return t[r]};t.exports=function t(){var e,r,n,i,u,c,h=arguments[0],f=1,p=arguments.length,d=!1;for("boolean"==typeof h&&(d=h,h=arguments[1]||{},f=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});f{var e=-1;function r(t,l,u){if(t==l)return t?[[0,t]]:[];(u<0||t.lengths.length?t:s,u=t.length>s.length?s:t,c=a.indexOf(u);if(-1!=c)return l=[[1,a.substring(0,c)],[0,u],[1,a.substring(c+u.length)]],t.length>s.length&&(l[0][0]=l[2][0]=e),l;if(1==u.length)return[[e,t],[1,s]];var h=function(t,e){var r=t.length>e.length?t:e,n=t.length>e.length?e:t;if(r.length<4||2*n.length=t.length?[n,s,l,a,h]:null}var l,a,u,c,h,f=s(r,n,Math.ceil(r.length/4)),p=s(r,n,Math.ceil(r.length/2));if(!f&&!p)return null;l=p?f&&f[4].length>p[4].length?f:p:f;t.length>e.length?(a=l[0],u=l[1],c=l[2],h=l[3]):(c=l[0],h=l[1],a=l[2],u=l[3]);var d=l[4];return[a,u,c,h,d]}(t,s);if(h){var f=h[0],p=h[1],d=h[2],y=h[3],g=h[4],m=r(f,d),b=r(p,y);return m.concat([[0,g]],b)}return function(t,r){for(var i=t.length,o=r.length,s=Math.ceil((i+o)/2),l=s,a=2*s,u=new Array(a),c=new Array(a),h=0;hi)y+=2;else if(A>o)d+=2;else if(p){if((w=l+f-v)>=0&&w=(x=i-c[w]))return n(t,r,T,A)}}for(var N=-b+g;N<=b-m;N+=2){for(var x,w=l+N,S=(x=N==-b||N!=b&&c[w-1]i)m+=2;else if(S>o)g+=2;else if(!p){if((E=l+f-N)>=0&&E=(x=i-x))return n(t,r,T,A)}}}}return[[e,t],[1,r]]}(t,s)}(t=t.substring(0,t.length-c),l=l.substring(0,l.length-c));return h&&p.unshift([0,h]),f&&p.push([0,f]),s(p),null!=u&&(p=function(t,r){var n=function(t,r){if(0===r)return[0,t];for(var n=0,i=0;i0&&i.splice(o+2,0,[l[0],u]),a(i,o,3)}return t}(p,u)),p=function(t){for(var r=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},i=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},o=2;o0&&s.push(t[o]);return s}(p)}function n(t,e,n,i){var o=t.substring(0,n),s=e.substring(0,i),l=t.substring(n),a=e.substring(i),u=r(o,s),c=r(l,a);return u.concat(c)}function i(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var r=0,n=Math.min(t.length,e.length),i=n,o=0;r1?(0!==l&&0!==a&&(0!==(r=i(c,u))&&(n-l-a>0&&0==t[n-l-a-1][0]?t[n-l-a-1][1]+=c.substring(0,r):(t.splice(0,0,[0,c.substring(0,r)]),n++),c=c.substring(r),u=u.substring(r)),0!==(r=o(c,u))&&(t[n][1]=c.substring(c.length-r)+t[n][1],c=c.substring(0,c.length-r),u=u.substring(0,u.length-r))),0===l?t.splice(n-a,l+a,[1,c]):0===a?t.splice(n-l,l+a,[e,u]):t.splice(n-l-a,l+a,[e,u],[1,c]),n=n-l-a+(l?1:0)+(a?1:0)+1):0!==n&&0==t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,a=0,l=0,u="",c=""}""===t[t.length-1][1]&&t.pop();var h=!1;for(n=1;n=0&&n>=e-1;n--)if(n+1{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/align-center.svg?f9afebbb6ae4c2964aa7cb35a8eb0d9d"},3249:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/align-justify.svg?90285f1f11db1912e9645c4a5e525344"},7778:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/align-left.svg?0f8ad7994ca19d6495042555af243eef"},1394:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/align-right.svg?626a3d25131f64ad41bfff6ad1ef10f5"},4188:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/background.svg?82e25f0bd823d4d4fb1e7f4ab0a78ff8"},1364:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/blockquote.svg?928aa5af401fb29fa07515a942ddd4d4"},6:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/bold.svg?7781b6114a3fb65a98f0b178c0d67578"},764:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/clean.svg?d59691df45537ae1a2637d373cdb3c90"},8737:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/code.svg?ea85b5c2863ee647d7bf543564349f8d"},761:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/color.svg?6c2b4048a0fa0cd5f2c5d920eb95ee48"},7073:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/direction-ltr.svg?d8052e6399cfca6a8a71de21b82bad55"},377:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/direction-rtl.svg?1375883b2f1e6de4a4621aca550cbd1d"},6861:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/float-center.svg?5793f183d1a93dc6f65ee9872c887088"},1911:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/float-full.svg?928ea0b8deb9e17786f2bbcd77324de2"},9378:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/float-left.svg?917812e3f874fe7614bdc5302f157012"},6824:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/float-right.svg?a595de253808219158737e11e9172a1a"},5377:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/formula.svg?513e689177d9c7b25d1f232b2497570c"},1239:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/header-2.svg?34914793e4453a1d65d78b933b421fce"},2390:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/header.svg?8c2dc93d4be101f76bae77761ec90c8e"},4485:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/image.svg?bffb79ce0fc8b41e9e6ce90bea00618b"},2195:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/indent.svg?b5fc7f81a004c4855833c500b0c538db"},3225:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/italic.svg?ff0ddc3f7d3244531d0a87389f6e151a"},895:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/link.svg?5c302e73950bc52c1afb8cf4f3ceb707"},1815:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/list-bullet.svg?cb92933c891e9914f1ac99ea79305cd4"},6097:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/list-check.svg?b70fb56c61cdc4dfdacbc1d7914368a6"},6929:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/list-ordered.svg?3e184f964f06cafa0ae283d1ad5b6cd8"},4439:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/outdent.svg?dd7145d26d6ba4aed3ebd11dc181d507"},8497:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/strike.svg?248ad333a3ad0b651e533dfadb12dde0"},7664:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/subscript.svg?9d8ea7c3c97df4bc024f7dab9248f7ce"},448:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/superscript.svg?3bed5966c174cea3f1047990c82290a3"},5479:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/underline.svg?585c47324c8f9d8c076d8d7bb452efaa"},7981:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="/images/vendor/quill/icons/video.svg?eaeee04ce09d795ae77deaff36281c80"},7648:t=>{"use strict";var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";t.exports=function(t){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(e+o);for(var s,l=r.call(arguments,1),a=function(){if(this instanceof s){var e=o.apply(this,l.concat(r.call(arguments)));return Object(e)===e?e:this}return o.apply(t,l.concat(r.call(arguments)))},u=Math.max(0,o.length-l.length),c=[],h=0;h{"use strict";var n=r(7648);t.exports=Function.prototype.bind||n},210:(t,e,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,l=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var u=function(){throw new s},c=a?function(){try{return u}catch(t){try{return a(arguments,"callee").get}catch(t){return u}}}():u,h=r(1405)(),f=Object.getPrototypeOf||function(t){return t.__proto__},p={},d="undefined"==typeof Uint8Array?n:f(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?f(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function t(e){var r;if("%AsyncFunction%"===e)r=l("async function () {}");else if("%GeneratorFunction%"===e)r=l("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=l("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=f(i.prototype))}return y[e]=r,r},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(8612),v=r(7642),E=b.call(Function.call,Array.prototype.concat),A=b.call(Function.apply,Array.prototype.splice),N=b.call(Function.call,String.prototype.replace),x=b.call(Function.call,String.prototype.slice),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,T=function(t){var e=x(t,0,1),r=x(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return N(t,w,(function(t,e,r,i){n[n.length]=r?N(i,S,"$1"):e||t})),n},O=function(t,e){var r,n=t;if(v(m,n)&&(n="%"+(r=m[n])[0]+"%"),v(y,n)){var o=y[n];if(o===p&&(o=g(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');var r=T(t),n=r.length>0?r[0]:"",o=O("%"+n+"%",e),l=o.name,u=o.value,c=!1,h=o.alias;h&&(n=h[0],A(r,E([0,1],h)));for(var f=1,p=!0;f=r.length){var b=a(u,d);u=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[d]}else p=v(u,d),u=u[d];p&&!c&&(y[l]=u)}}return u}},1405:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},5419:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7642:(t,e,r)=>{"use strict";var n=r(8612);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,l=8*i-n-1,a=(1<>1,c=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=l;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-u;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,l,a,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+h>=1?f/a:f*Math.pow(2,1-h))*a>=2&&(s++,a/=2),s+h>=c?(l=0,s=c):s+h>=1?(l=(e*a-1)*Math.pow(2,i),s+=h):(l=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&l,p+=d,l/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*y}},2584:(t,e,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=r(1924)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},l=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=l?o:s},8923:t=>{"use strict";var e=Date.prototype.getDay,r=Object.prototype.toString,n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"==typeof t&&null!==t&&(n?function(t){try{return e.call(t),!0}catch(t){return!1}}(t):"[object Date]"===r.call(t))}},8420:(t,e,r)=>{"use strict";var n,i,o,s,l=r(1924),a=r(1405)()&&"symbol"==typeof Symbol.toStringTag;if(a){n=l("Object.prototype.hasOwnProperty"),i=l("RegExp.prototype.exec"),o={};var u=function(){throw o};s={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=u)}var c=l("Object.prototype.toString"),h=Object.getOwnPropertyDescriptor;t.exports=a?function(t){if(!t||"object"!=typeof t)return!1;var e=h(t,"lastIndex");if(!(e&&n(e,"value")))return!1;try{i(t,s)}catch(t){return t===o}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===c(t)}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},4244:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},609:(t,e,r)=>{"use strict";var n=r(4289),i=r(5559),o=r(4244),s=r(5624),l=r(2281),a=i(s(),Object);n(a,{getPolyfill:s,implementation:o,shim:l}),t.exports=a},5624:(t,e,r)=>{"use strict";var n=r(4244);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:(t,e,r)=>{"use strict";var n=r(5624),i=r(4289);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8987:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(1414),l=Object.prototype.propertyIsEnumerable,a=!l.call({toString:null},"toString"),u=l.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=s(t),l=e&&"[object String]"===o.call(t),f=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=u&&r;if(l&&t.length>0&&!i.call(t,0))for(var y=0;y0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,s=o?function(t){return o(t)}:r(8987),l=Object.keys;s.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?l(n.call(t)):l(t)}):Object.keys=s;return Object.keys||s},t.exports=s},1414:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},347:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=9)}([function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var r=this;return e="[Parchment] "+e,(r=t.call(this,e)||this).message=e,r.name=r.constructor.name,r}return i(e,t),e}(Error);e.ParchmentError=o;var s,l={},a={},u={},c={};function h(t,e){var r;if(void 0===e&&(e=s.ANY),"string"==typeof t)r=c[t]||l[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)r=c.text;else if("number"==typeof t)t&s.LEVEL&s.BLOCK?r=c.block:t&s.LEVEL&s.INLINE&&(r=c.inline);else if(t instanceof HTMLElement){var n=(t.getAttribute("class")||"").split(/\s+/);for(var i in n)if(r=a[n[i]])break;r=r||u[t.tagName]}return null==r?null:e&s.LEVEL&r.scope&&e&s.TYPE&r.scope?r:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(s=e.Scope||(e.Scope={})),e.create=function(t,e){var r=h(t);if(null==r)throw new o("Unable to create "+t+" blot");var n=r,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:n.create(e);return new n(i,e)},e.find=function t(r,n){return void 0===n&&(n=!1),null==r?null:null!=r[e.DATA_KEY]?r[e.DATA_KEY].blot:n?t(r.parentNode,n):null},e.query=h,e.register=function t(){for(var e=[],r=0;r1)return e.map((function(e){return t(e)}));var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new o("Invalid definition");if("abstract"===n.blotName)throw new o("Cannot register abstract class");if(c[n.blotName||n.attrName]=n,"string"==typeof n.keyName)l[n.keyName]=n;else if(null!=n.className&&(a[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(t){return t.toUpperCase()})):n.tagName=n.tagName.toUpperCase();var i=Array.isArray(n.tagName)?n.tagName:[n.tagName];i.forEach((function(t){null!=u[t]&&null!=n.className||(u[t]=n)}))}return n}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),i=function(){function t(t,e,r){void 0===r&&(r={}),this.attrName=t,this.keyName=e;var i=n.Scope.TYPE&n.Scope.ATTRIBUTE;null!=r.scope?this.scope=r.scope&n.Scope.LEVEL|i:this.scope=n.Scope.ATTRIBUTE,null!=r.whitelist&&(this.whitelist=r.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=n.query(t,n.Scope.BLOT&(this.scope|n.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),s=r(5),l=r(0),a=function(t){function e(e){var r=t.call(this,e)||this;return r.build(),r}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var r=u(e);t.insertBefore(r,t.children.head||void 0)}catch(t){if(t instanceof l.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,r){t.deleteAt(e,r)}))},e.prototype.descendant=function(t,r){var n=this.children.find(r),i=n[0],o=n[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,r,n){void 0===r&&(r=0),void 0===n&&(n=Number.MAX_VALUE);var i=[],o=n;return this.children.forEachAt(r,n,(function(r,n,s){(null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t)&&i.push(r),r instanceof e&&(i=i.concat(r.descendants(t,n,o))),o-=s})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,r,n){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,r,n)}))},e.prototype.insertAt=function(t,e,r){var n=this.children.find(t),i=n[0],o=n[1];if(i)i.insertAt(o,e,r);else{var s=null==r?l.create("text",e):l.create(e,r);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new l.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(r){t.insertBefore(r,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var r=l.create(this.statics.defaultChild);this.appendChild(r),r.optimize(e)}else this.remove()},e.prototype.path=function(t,r){void 0===r&&(r=!1);var n=this.children.find(t,r),i=n[0],o=n[1],s=[[this,t]];return i instanceof e?s.concat(i.path(o,r)):(null!=i&&s.push([i,o]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(r){r instanceof e&&r.moveChildren(this),t.prototype.replace.call(this,r)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var r=this.clone();return this.parent.insertBefore(r,this.next),this.children.forEachAt(t,this.length(),(function(t,n,i){t=t.split(n,e),r.appendChild(t)})),r},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var r=this,n=[],i=[];t.forEach((function(t){t.target===r.domNode&&"childList"===t.type&&(n.push.apply(n,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=l.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==r.domNode||e.detach())}})),n.filter((function(t){return t.parentNode==r.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=l.find(t.nextSibling));var n=u(t);n.next==e&&null!=n.next||(null!=n.parent&&n.parent.removeChild(r),r.insertBefore(n,e||void 0))}))},e}(s.default);function u(t){var e=l.find(t);if(null==e)try{e=l.create(t)}catch(r){e=l.create(l.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=a},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),s=r(6),l=r(2),a=r(0),u=function(t){function e(e){var r=t.call(this,e)||this;return r.attributes=new s.default(r.domNode),r}return i(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var r=a.query(t);r instanceof o.default?this.attributes.attribute(r,e):e&&(null==r||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,r){var n=t.prototype.replaceWith.call(this,e,r);return this.attributes.copy(n),n},e.prototype.update=function(e,r){var n=this;t.prototype.update.call(this,e,r),e.some((function(t){return t.target===n.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(r,n){var i=t.prototype.wrap.call(this,r,n);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(l.default);e.default=u},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(5),s=r(0),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var r=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=s.Scope.INLINE_BLOT,e}(o.default);e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),i=function(){function t(t){this.domNode=t,this.domNode[n.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new n.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return n.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[n.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,r,i){var o=this.isolate(t,e);if(null!=n.query(r,n.Scope.BLOT)&&i)o.wrap(r,i);else if(null!=n.query(r,n.Scope.ATTRIBUTE)){var s=n.create(this.statics.scope);o.wrap(s),s.format(r,i)}},t.prototype.insertAt=function(t,e,r){var i=null==r?n.create("text",e):n.create(e,r),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var r=null;t.children.insertBefore(this,e),null!=e&&(r=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==r||t.domNode.insertBefore(this.domNode,r),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var r=this.split(t);return r.split(e),r},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[n.DATA_KEY]&&delete this.domNode[n.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var r="string"==typeof t?n.create(t,e):t;return r.replace(this),r},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var r="string"==typeof t?n.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(r,this.next),r.appendChild(this),r},t.blotName="abstract",t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),i=r(7),o=r(8),s=r(0),l=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=n.default.keys(this.domNode),r=i.default.keys(this.domNode),l=o.default.keys(this.domNode);e.concat(r).concat(l).forEach((function(e){var r=s.query(e,s.Scope.ATTRIBUTE);r instanceof n.default&&(t.attributes[r.attrName]=r)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(r){var n=e.attributes[r].value(e.domNode);t.format(r,n)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,r){return e[r]=t.attributes[r].value(t.domNode),e}),{})},t}();e.default=l},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(r(1).default);e.default=s},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function o(t){var e=t.split("-"),r=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+r}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(r(1).default);e.default=s},function(t,e,r){t.exports=r(10)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),i=r(3),o=r(4),s=r(12),l=r(13),a=r(14),u=r(15),c=r(16),h=r(1),f=r(7),p=r(8),d=r(6),y=r(0),g={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:n.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:s.default,Block:a.default,Inline:l.default,Text:c.default,Attributor:{Attribute:h.default,Class:f.default,Style:p.default,Store:d.default}};e.default=g},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,r=this.iterator();e=r();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,r=this.head;null!=r;){if(r===t)return e;e+=r.length(),r=r.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var r,n=this.iterator();r=n();){var i=r.length();if(ts?r(n,t-s,Math.min(e,s+a-t)):r(n,0,Math.min(a,t+e-s)),s+=a}},t.prototype.map=function(t){return this.reduce((function(e,r){return e.push(t(r)),e}),[])},t.prototype.reduce=function(t,e){for(var r,n=this.iterator();r=n();)e=t(e,r);return e},t}();e.default=n},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),s=r(0),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var r=t.call(this,e)||this;return r.scroll=r,r.observer=new MutationObserver((function(t){r.update(t)})),r.observer.observe(r.domNode,l),r.attach(),r}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,r){this.update(),0===e&&r===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,r)},e.prototype.formatAt=function(e,r,n,i){this.update(),t.prototype.formatAt.call(this,e,r,n,i)},e.prototype.insertAt=function(e,r,n){this.update(),t.prototype.insertAt.call(this,e,r,n)},e.prototype.optimize=function(e,r){var n=this;void 0===e&&(e=[]),void 0===r&&(r={}),t.prototype.optimize.call(this,r);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var l=function(t,e){void 0===e&&(e=!0),null!=t&&t!==n&&null!=t.domNode.parentNode&&(null==t.domNode[s.DATA_KEY].mutations&&(t.domNode[s.DATA_KEY].mutations=[]),e&&l(t.parent))},a=function(t){null!=t.domNode[s.DATA_KEY]&&null!=t.domNode[s.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(a),t.optimize(r))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=s.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(l(s.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=s.find(t,!1);l(e,!1),e instanceof o.default&&e.children.forEach((function(t){l(t,!1)}))}))):"attributes"===t.type&&l(e.prev)),l(e))})),this.children.forEach(a),i=(u=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,r){var n=this;void 0===r&&(r={}),(e=e||this.observer.takeRecords()).map((function(t){var e=s.find(t.target,!0);return null==e?null:null==e.domNode[s.DATA_KEY].mutations?(e.domNode[s.DATA_KEY].mutations=[t],e):(e.domNode[s.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==n&&null!=t.domNode[s.DATA_KEY]&&t.update(t.domNode[s.DATA_KEY].mutations||[],r)})),null!=this.domNode[s.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,r),this.optimize(e,r)},e.blotName="scroll",e.defaultChild="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=a},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),s=r(0),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(r){if(r.tagName!==e.tagName)return t.formats.call(this,r)},e.prototype.format=function(r,n){var i=this;r!==this.statics.blotName||n?t.prototype.format.call(this,r,n):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,r,n,i){null!=this.formats()[n]||s.query(n,s.Scope.ATTRIBUTE)?this.isolate(e,r).format(n,i):t.prototype.formatAt.call(this,e,r,n,i)},e.prototype.optimize=function(r){t.prototype.optimize.call(this,r);var n=this.formats();if(0===Object.keys(n).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var r in t)if(t[r]!==e[r])return!1;return!0}(n,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=s.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=l},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),s=r(0),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(r){var n=s.query(e.blotName).tagName;if(r.tagName!==n)return t.formats.call(this,r)},e.prototype.format=function(r,n){null!=s.query(r,s.Scope.BLOCK)&&(r!==this.statics.blotName||n?t.prototype.format.call(this,r,n):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,r,n,i){null!=s.query(n,s.Scope.BLOCK)?this.format(n,i):t.prototype.formatAt.call(this,e,r,n,i)},e.prototype.insertAt=function(e,r,n){if(null==n||null!=s.query(r,s.Scope.INLINE))t.prototype.insertAt.call(this,e,r,n);else{var i=this.split(e),o=s.create(r,n);i.parent.insertBefore(o,i)}},e.prototype.update=function(e,r){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,r)},e.blotName="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=l},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,r){t.prototype.formatAt.call(this,0,this.length(),e,r)},e.prototype.formatAt=function(e,r,n,i){0===e&&r===this.length()?this.format(n,i):t.prototype.formatAt.call(this,e,r,n,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(r(4).default);e.default=o},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(4),s=r(0),l=function(t){function e(e){var r=t.call(this,e)||this;return r.text=r.statics.value(r.domNode),r}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,r,n){null==n?(this.text=this.text.slice(0,e)+r+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,r,n)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(r){t.prototype.optimize.call(this,r),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var r=s.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next),this.text=this.statics.value(this.domNode),r},e.prototype.update=function(t,e){var r=this;t.some((function(t){return"characterData"===t.type&&t.target===r.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=s.Scope.INLINE_BLOT,e}(o.default);e.default=l}])},t.exports=e()},4175:(t,e,r)=>{var n=r(7529),i=r(251),o=r(4470),s=r(6910),l=String.fromCharCode(0),a=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};a.prototype.insert=function(t,e){var r={};return 0===t.length?this:(r.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=e),this.push(r))},a.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},a.prototype.retain=function(t,e){if(t<=0)return this;var r={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=e),this.push(r)},a.prototype.push=function(t){var e=this.ops.length,r=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof r){if("number"==typeof t.delete&&"number"==typeof r.delete)return this.ops[e-1]={delete:r.delete+t.delete},this;if("number"==typeof r.delete&&null!=t.insert&&(e-=1,"object"!=typeof(r=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,r.attributes)){if("string"==typeof t.insert&&"string"==typeof r.insert)return this.ops[e-1]={insert:r.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof r.retain)return this.ops[e-1]={retain:r.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},a.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},a.prototype.filter=function(t){return this.ops.filter(t)},a.prototype.forEach=function(t){this.ops.forEach(t)},a.prototype.map=function(t){return this.ops.map(t)},a.prototype.partition=function(t){var e=[],r=[];return this.forEach((function(n){(t(n)?e:r).push(n)})),[e,r]},a.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},a.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+s.length(e):e.delete?t-e.delete:t}),0)},a.prototype.length=function(){return this.reduce((function(t,e){return t+s.length(e)}),0)},a.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var r=[],n=s.iterator(this.ops),i=0;i0&&r.next(o.retain-l)}for(var u=new a(n);e.hasNext()||r.hasNext();)if("insert"===r.peekType())u.push(r.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),r.peekLength()),h=e.next(c),f=r.next(c);if("number"==typeof f.retain){var p={};"number"==typeof h.retain?p.retain=c:p.insert=h.insert;var d=s.attributes.compose(h.attributes,f.attributes,"number"==typeof h.retain);if(d&&(p.attributes=d),u.push(p),!r.hasNext()&&i(u.ops[u.ops.length-1],p)){var y=new a(e.rest());return u.concat(y).chop()}}else"number"==typeof f.delete&&"number"==typeof h.retain&&u.push(f)}return u.chop()},a.prototype.concat=function(t){var e=new a(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},a.prototype.diff=function(t,e){if(this.ops===t.ops)return new a;var r=[this,t].map((function(e){return e.map((function(r){if(null!=r.insert)return"string"==typeof r.insert?r.insert:l;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new a,u=n(r[0],r[1],e),c=s.iterator(this.ops),h=s.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var r=0;switch(t[0]){case n.INSERT:r=Math.min(h.peekLength(),e),o.push(h.next(r));break;case n.DELETE:r=Math.min(e,c.peekLength()),c.next(r),o.delete(r);break;case n.EQUAL:r=Math.min(c.peekLength(),h.peekLength(),e);var l=c.next(r),a=h.next(r);i(l.insert,a.insert)?o.retain(r,s.attributes.diff(l.attributes,a.attributes)):o.push(a).delete(r)}e-=r}})),o.chop()},a.prototype.eachLine=function(t,e){e=e||"\n";for(var r=s.iterator(this.ops),n=new a,i=0;r.hasNext();){if("insert"!==r.peekType())return;var o=r.peek(),l=s.length(o)-r.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,l)-l:-1;if(u<0)n.push(r.next());else if(u>0)n.push(r.next(u));else{if(!1===t(n,r.next(1).attributes||{},i))return;i+=1,n=new a}}n.length()>0&&t(n,{},i)},a.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var r=s.iterator(this.ops),n=s.iterator(t.ops),i=new a;r.hasNext()||n.hasNext();)if("insert"!==r.peekType()||!e&&"insert"===n.peekType())if("insert"===n.peekType())i.push(n.next());else{var o=Math.min(r.peekLength(),n.peekLength()),l=r.next(o),u=n.next(o);if(l.delete)continue;u.delete?i.push(u):i.retain(o,s.attributes.transform(l.attributes,u.attributes,e))}else i.retain(s.length(r.next()));return i.chop()},a.prototype.transformPosition=function(t,e){e=!!e;for(var r=s.iterator(this.ops),n=0;r.hasNext()&&n<=t;){var i=r.peekLength(),o=r.peekType();r.next(),"delete"!==o?("insert"===o&&(n{var n=r(251),i=r(4470),o={attributes:{compose:function(t,e,r){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=i(!0,{},e);for(var o in r||(n=Object.keys(n).reduce((function(t,e){return null!=n[e]&&(t[e]=n[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(n[o]=t[o]);return Object.keys(n).length>0?n:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=Object.keys(t).concat(Object.keys(e)).reduce((function(r,i){return n(t[i],e[i])||(r[i]=void 0===e[i]?null:e[i]),r}),{});return Object.keys(r).length>0?r:void 0},transform:function(t,e,r){if("object"!=typeof t)return e;if("object"==typeof e){if(!r)return e;var n=Object.keys(e).reduce((function(r,n){return void 0===t[n]&&(r[n]=e[n]),r}),{});return Object.keys(n).length>0?n:void 0}}},iterator:function(t){return new s(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function s(t){this.ops=t,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var r=this.offset,n=o.length(e);if(t>=n-r?(t=n-r,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(r,t):i.insert=e.insert,i}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},s.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[r].concat(n)}return[]},t.exports=o},8299:()=>{let t=document.createElement("div");if(t.classList.toggle("test-class",!1),t.classList.contains("test-class")){let t=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,r){return arguments.length>1&&!this.contains(e)==!r?r:t.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var r=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>r.length)&&(e=r.length),e-=t.length;var n=r.indexOf(t,e);return-1!==n&&n===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,r=Object(this),n=r.length>>>0,i=arguments[1],o=0;o{t.exports={align:{"":r(7778),center:r(4284),right:r(1394),justify:r(3249)},background:r(4188),blockquote:r(1364),bold:r(6),clean:r(764),code:r(8737),"code-block":r(8737),color:r(761),direction:{"":r(7073),rtl:r(377)},float:{center:r(6861),full:r(1911),left:r(9378),right:r(6824)},formula:r(5377),header:{1:r(2390),2:r(1239)},italic:r(3225),image:r(4485),indent:{"+1":r(2195),"-1":r(4439)},link:r(895),list:{ordered:r(6929),bullet:r(1815),check:r(6097)},script:{sub:r(7664),super:r(448)},strike:r(8497),underline:r(5479),video:r(7981)}},3697:t=>{"use strict";var e=Object,r=TypeError;t.exports=function(){if(null!=this&&this!==e(this))throw new r("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}},2847:(t,e,r)=>{"use strict";var n=r(4289),i=r(5559),o=r(3697),s=r(1721),l=r(2753),a=i(o);n(a,{getPolyfill:s,implementation:o,shim:l}),t.exports=a},1721:(t,e,r)=>{"use strict";var n=r(3697),i=r(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor,s=TypeError;t.exports=function(){if(!i)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof/a/.dotAll)return t.get}return n}},2753:(t,e,r)=>{"use strict";var n=r(4289).supportsDescriptors,i=r(1721),o=Object.getOwnPropertyDescriptor,s=Object.defineProperty,l=TypeError,a=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!a)throw new l("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=i(),e=a(u),r=o(e,"flags");return r&&r.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=r(347),e=r.n(t),n=(r(8299),r(4175)),i=r.n(n),o=r(6910),s=r.n(o),l=r(4470),a=r.n(l);class u extends e().Embed{static value(){}insertInto(t,e){0===t.children.length?super.insertInto(t,e):this.remove()}length(){return 0}value(){return""}}u.blotName="break",u.tagName="BR";const c=u;class h extends e().Text{}const f=h;class p extends e().Inline{static compare(t,e){let r=p.order.indexOf(t),n=p.order.indexOf(e);return r>=0||n>=0?r-n:t===e?0:t0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}p.allowedChildren=[p,e().Embed,f],p.order=["cursor","inline","underline","strike","italic","bold","script","link","code"];const d=p;class y extends e().Embed{attach(){super.attach(),this.attributes=new(e().Attributor.Store)(this.domNode)}delta(){return(new(i())).insert(this.value(),a()(this.formats(),this.attributes.values()))}format(t,r){let n=e().query(t,e().Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,r)}formatAt(t,e,r,n){this.format(r,n)}insertAt(t,r,n){if("string"==typeof r&&r.endsWith("\n")){let n=e().create(g.blotName);this.parent.insertBefore(n,0===t?this:this.next),n.insertAt(0,r.slice(0,-1))}else super.insertAt(t,r,n)}}y.scope=e().Scope.BLOCK_BLOT;class g extends e().Block{constructor(t){super(t),this.cache={}}delta(){return null==this.cache.delta&&(this.cache.delta=this.descendants(e().Leaf).reduce(((t,e)=>0===e.length()?t:t.insert(e.value(),m(e))),new(i())).insert("\n",m(this))),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,r,n,i){r<=0||(e().query(n,e().Scope.BLOCK)?t+r===this.length()&&this.format(n,i):super.formatAt(t,Math.min(r,this.length()-t-1),n,i),this.cache={})}insertAt(t,e,r){if(null!=r)return super.insertAt(t,e,r);if(0===e.length)return;let n=e.split("\n"),i=n.shift();i.length>0&&(t=this.length()-1)){let e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}{let r=super.split(t,e);return this.cache={},r}}}function m(t,e={}){return null==t?e:("function"==typeof t.formats&&(e=a()(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:m(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[d,e().Embed,f];class b extends d{}b.blotName="code",b.tagName="CODE";class v extends g{static create(t){let e=super.create(t);return e.setAttribute("spellcheck",!1),e}static formats(){return!0}delta(){let t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(((t,e)=>t.insert(e).insert("\n",this.formats())),new(i()))}format(t,e){if(t===this.statics.blotName&&e)return;let[r]=this.descendant(f,this.length()-1);null!=r&&r.deleteAt(r.length()-1,1),super.format(t,e)}formatAt(t,r,n,i){if(0===r)return;if(null==e().query(n,e().Scope.BLOCK)||n===this.statics.blotName&&i===this.statics.formats(this.domNode))return;let o=this.newlineIndex(t);if(o<0||o>=t+r)return;let s=this.newlineIndex(t,!0)+1,l=o-s+1,a=this.isolate(s,l),u=a.next;a.format(n,i),u instanceof v&&u.formatAt(0,t-s+r-l,n,i)}insertAt(t,e,r){if(null!=r)return;let[n,i]=this.descendant(f,t);n.insertAt(i,e)}length(){let t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}newlineIndex(t,e=!1){if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");{let e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}}optimize(t){this.domNode.textContent.endsWith("\n")||this.appendChild(e().create("text","\n")),super.optimize(t);let r=this.next;null!=r&&r.prev===this&&r.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===r.statics.formats(r.domNode)&&(r.optimize(t),r.moveChildren(this),r.remove())}replace(t){super.replace(t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){let r=e().find(t);null==r?t.parentNode.removeChild(t):r instanceof e().Embed?r.remove():r.unwrap()}))}}v.blotName="code-block",v.tagName="PRE",v.TAB=" ";class E extends e().Embed{static value(){}constructor(t,e){super(t),this.selection=e,this.textNode=document.createTextNode(E.CONTENTS),this.domNode.appendChild(this.textNode),this._length=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,r){if(0!==this._length)return super.format(t,r);let n=this,i=0;for(;null!=n&&n.statics.scope!==e().Scope.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;null!=n&&(this._length=E.CONTENTS.length,n.optimize(),n.formatAt(i,E.CONTENTS.length,t,r),this._length=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this._length}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return;let t,r,n,i=this.textNode,o=this.selection.getNativeRange();for(null!=o&&o.start.node===i&&o.end.node===i&&([t,r,n]=[i,o.start.offset,o.end.offset]);null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==E.CONTENTS){let r=this.textNode.data.split(E.CONTENTS).join("");this.next instanceof f?(t=this.next.domNode,this.next.insertAt(0,r),this.textNode.data=E.CONTENTS):(this.textNode.data=r,this.parent.insertBefore(e().create(this.textNode),this),this.textNode=document.createTextNode(E.CONTENTS),this.domNode.appendChild(this.textNode))}return this.remove(),null!=r?([r,n]=[r,n].map((function(e){return Math.max(0,Math.min(t.data.length,e-1))})),{startNode:t,startOffset:r,endNode:t,endOffset:n}):void 0}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){let t=this.restore();t&&(e.range=t)}}value(){return""}}E.blotName="cursor",E.className="ql-cursor",E.tagName="span",E.CONTENTS="\ufeff";const A=E;var N=r(6313),x=r.n(N),w=r(251),S=r.n(w);const T=/^[ -~]*$/;function O(t,e){return Object.keys(e).reduce((function(r,n){return null==t[n]||(e[n]===t[n]?r[n]=e[n]:Array.isArray(e[n])?e[n].indexOf(t[n])<0&&(r[n]=e[n].concat([t[n]])):r[n]=[e[n],t[n]]),r}),{})}const _=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){let r=!1;this.scroll.update();let n=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){let r=x()(e.attributes);return delete r.image,t.insert({image:e.attributes.image},r)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=x()(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){let r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new(i()))}(t)).reduce(((t,i)=>{let o=i.retain||i.delete||i.insert.length||1,l=i.attributes||{};if(null!=i.insert){if("string"==typeof i.insert){let o=i.insert;o.endsWith("\n")&&r&&(r=!1,o=o.slice(0,-1)),t>=n&&!o.endsWith("\n")&&(r=!0),this.scroll.insertAt(t,o);let[u,c]=this.scroll.line(t),h=a()({},m(u));if(u instanceof g){let[t]=u.descendant(e().Leaf,c);h=a()(h,m(t))}l=s().attributes.diff(h,l)||{}}else if("object"==typeof i.insert){let e=Object.keys(i.insert)[0];if(null==e)return t;this.scroll.insertAt(t,e,i.insert[e])}n+=o}return Object.keys(l).forEach((e=>{this.scroll.formatAt(t,o,e,l[e])})),t+o}),0),t.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+(e.retain||e.insert.length||1)),0),this.scroll.batchEnd(),this.update(t)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new(i())).retain(t).delete(e))}formatLine(t,e,r={}){return this.scroll.update(),Object.keys(r).forEach((n=>{if(null!=this.scroll.whitelist&&!this.scroll.whitelist[n])return;let i=this.scroll.lines(t,Math.max(e,1)),o=e;i.forEach((e=>{let i=e.length();if(e instanceof v){let i=t-e.offset(this.scroll),s=e.newlineIndex(i+o)-i+1;e.formatAt(i,s,n,r[n])}else e.format(n,r[n]);o-=i}))})),this.scroll.optimize(),this.update((new(i())).retain(t).retain(e,x()(r)))}formatText(t,e,r={}){return Object.keys(r).forEach((n=>{this.scroll.formatAt(t,e,n,r[n])})),this.update((new(i())).retain(t).retain(e,x()(r)))}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new(i()))}getFormat(t,r=0){let n=[],i=[];0===r?this.scroll.path(t).forEach((function(t){let[r]=t;r instanceof g?n.push(r):r instanceof e().Leaf&&i.push(r)})):(n=this.scroll.lines(t,r),i=this.scroll.descendants(e().Leaf,t,r));let o=[n,i].map((function(t){if(0===t.length)return{};let e=m(t.shift());for(;Object.keys(e).length>0;){let r=t.shift();if(null==r)return e;e=O(m(r),e)}return e}));return a().apply(a(),o)}getText(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}insertEmbed(t,e,r){return this.scroll.insertAt(t,e,r),this.update((new(i())).retain(t).insert({[e]:r}))}insertText(t,e,r={}){return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((n=>{this.scroll.formatAt(t,e.length,n,r[n])})),this.update((new(i())).retain(t).insert(e,x()(r)))}isBlank(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;let t=this.scroll.children.head;return t.statics.blotName===g.blotName&&(!(t.children.length>1)&&t.children.head instanceof c)}removeFormat(t,e){let r=this.getText(t,e),[n,o]=this.scroll.line(t+e),s=0,l=new(i());null!=n&&(s=n instanceof v?n.newlineIndex(o)-o+1:n.length()-o,l=n.delta().slice(o,o+s-1).insert("\n"));let a=this.getContents(t,e+s).diff((new(i())).insert(r).concat(l)),u=(new(i())).retain(t).concat(a);return this.applyDelta(u)}update(t,r=[],n){let o=this.delta;if(1===r.length&&"characterData"===r[0].type&&r[0].target.data.match(T)&&e().find(r[0].target)){let s=e().find(r[0].target),l=m(s),a=s.offset(this.scroll),u=r[0].oldValue.replace(A.CONTENTS,""),c=(new(i())).insert(u),h=(new(i())).insert(s.value());t=(new(i())).retain(a).concat(c.diff(h,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,l):t.push(e)}),new(i())),this.delta=o.compose(t)}else this.delta=this.getDelta(),t&&S()(o.compose(t),this.delta)||(t=o.diff(this.delta,n));return t}};var k=r(6729),L=r.n(k);let q=["error","warn","log","info"],R="warn";function C(t,...e){q.indexOf(t)<=q.indexOf(R)&&console[t](...e)}function P(t){return q.reduce((function(e,r){return e[r]=C.bind(console,r,t),e}),{})}C.level=P.level=function(t){R=t};const I=P;let j=I("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,((...t)=>{[].slice.call(document.querySelectorAll(".ql-container")).forEach((e=>{e.__quill&&e.__quill.emitter&&e.__quill.emitter.handleDOM(...t)}))}))}));class B extends(L()){constructor(){super(),this.listeners={},this.on("error",j.error)}emit(){j.log.apply(j,arguments),super.emit.apply(this,arguments)}handleDOM(t,...e){(this.listeners[t.type]||[]).forEach((function({node:r,handler:n}){(t.target===r||r.contains(t.target))&&n(t,...e)}))}listenDOM(t,e,r){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:r})}}B.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},B.sources={API:"api",SILENT:"silent",USER:"user"};const U=B;class D{constructor(t,e={}){this.quill=t,this.options=e}}D.DEFAULTS={};const M=D;let F=I("quill:selection");class K{constructor(t,e=0){this.index=t,this.length=e}}class Y{constructor(t,r){this.emitter=r,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=e().create("cursor",this),this.lastRange=this.savedRange=new K(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(()=>{this.mouseDown||setTimeout(this.update.bind(this,U.sources.USER),1)})),this.emitter.on(U.events.EDITOR_CHANGE,((t,e)=>{t===U.events.TEXT_CHANGE&&e.length()>0&&this.update(U.sources.SILENT)})),this.emitter.on(U.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;let t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(U.events.SCROLL_UPDATE,(()=>{try{this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))})),this.emitter.on(U.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:r,endNode:n,endOffset:i}=e.range;this.setNativeRange(t,r,n,i)}})),this.update(U.sources.SILENT)}handleComposition(){this.root.addEventListener("compositionstart",(()=>{this.composing=!0})),this.root.addEventListener("compositionend",(()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(U.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}format(t,r){if(null!=this.scroll.whitelist&&!this.scroll.whitelist[t])return;this.scroll.update();let n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!e().query(t,e().Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){let t=e().find(n.start.node,!1);if(null==t)return;if(t instanceof e().Leaf){let e=t.split(n.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,r),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t,e=0){let r=this.scroll.length();t=Math.min(t,r-1),e=Math.min(t+e,r-1)-t;let n,[i,o]=this.scroll.leaf(t);if(null==i)return null;[n,o]=i.position(o,!0);let s=document.createRange();if(e>0)return s.setStart(n,o),[i,o]=this.scroll.leaf(t+e),null==i?null:([n,o]=i.position(o,!0),s.setEnd(n,o),s.getBoundingClientRect());{let t,e="left";return n instanceof Text?(o0&&(e="right")),{bottom:t.top+t.height,height:t.height,left:t[e],right:t[e],top:t.top,width:0}}}getNativeRange(){let t=document.getSelection();if(null==t||t.rangeCount<=0)return null;let e=t.getRangeAt(0);if(null==e)return null;let r=this.normalizeNative(e);return F.info("getNativeRange",r),r}getRange(){let t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root}normalizedToRange(t){let r=[[t.start.node,t.start.offset]];t.native.collapsed||r.push([t.end.node,t.end.offset]);let n=r.map((t=>{let[r,n]=t,i=e().find(r,!0),o=i.offset(this.scroll);return 0===n?o:i instanceof e().Container?o+i.length():o+i.index(r,n)})),i=Math.min(Math.max(...n),this.scroll.length()-1),o=Math.min(i,...n);return new K(o,i-o)}normalizeNative(t){if(!z(this.root,t.startContainer)||!t.collapsed&&!z(this.root,t.endContainer))return null;let e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){let e=t.node,r=t.offset;for(;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>r)e=e.childNodes[r],r=0;else{if(e.childNodes.length!==r)break;e=e.lastChild,r=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=r})),e}rangeToNative(t){let e=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],n=this.scroll.length();return e.forEach(((t,e)=>{t=Math.min(n-1,t);let i,[o,s]=this.scroll.leaf(t);[i,s]=o.position(s,0!==e),r.push(i,s)})),r.length<2&&(r=r.concat(r)),r}scrollIntoView(t){let e=this.lastRange;if(null==e)return;let r=this.getBounds(e.index,e.length);if(null==r)return;let n=this.scroll.length()-1,[i]=this.scroll.line(Math.min(e.index,n)),o=i;if(e.length>0&&([o]=this.scroll.line(Math.min(e.index+e.length,n))),null==i||null==o)return;let s=t.getBoundingClientRect();r.tops.bottom&&(t.scrollTop+=r.bottom-s.bottom)}setNativeRange(t,e,r=t,n=e,i=!1){if(F.info("setNativeRange",t,e,r,n),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==r.parentNode))return;let o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();let s=(this.getNativeRange()||{}).native;if(null==s||i||t!==s.startContainer||e!==s.startOffset||r!==s.endContainer||n!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==r.tagName&&(n=[].indexOf.call(r.parentNode.childNodes,r),r=r.parentNode);let i=document.createRange();i.setStart(t,e),i.setEnd(r,n),o.removeAllRanges(),o.addRange(i)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}setRange(t,e=!1,r=U.sources.API){if("string"==typeof e&&(r=e,e=!1),F.info("setRange",t),null!=t){let r=this.rangeToNative(t);this.setNativeRange(...r,e)}else this.setNativeRange(null);this.update(r)}update(t=U.sources.USER){let e=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!S()(e,this.lastRange)){!this.composing&&null!=n&&n.native.collapsed&&n.start.node!==this.cursor.textNode&&this.cursor.restore();let r=[U.events.SELECTION_CHANGE,x()(this.lastRange),x()(e),t];this.emitter.emit(U.events.EDITOR_CHANGE,...r),t!==U.sources.SILENT&&this.emitter.emit(...r)}}}function z(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}class ${constructor(t,e){this.quill=t,this.options=e,this.modules={}}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){let e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}$.DEFAULTS={modules:{}},$.themes={default:$};const W=$;let G=I("quill");class H{static debug(t){!0===t&&(t="log"),I.level(t)}static find(t){return t.__quill||e().find(t)}static import(t){return null==this.imports[t]&&G.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(t,r,n=!1){if("string"!=typeof t){let e=t.attrName||t.blotName;"string"==typeof e?this.register("formats/"+e,t,r):Object.keys(t).forEach((e=>{this.register(e,t[e],r)}))}else null==this.imports[t]||n||G.warn(`Overwriting ${t} with`,r),this.imports[t]=r,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==r.blotName?e().register(r):t.startsWith("modules")&&"function"==typeof r.register&&r.register()}constructor(t,r={}){if(this.options=function(t,e){if((e=a()(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==H.DEFAULTS.theme){if(e.theme=H.import(`themes/${e.theme}`),null==e.theme)throw new Error(`Invalid theme ${e.theme}. Did you register it?`)}else e.theme=W;let r=a()(!0,{},e.theme.DEFAULTS);[r,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));let n=Object.keys(r.modules).concat(Object.keys(e.modules)).reduce((function(t,e){let r=H.import(`modules/${e}`);return null==r?G.error(`Cannot load ${e} module. Are you sure you registered it?`):t[e]=r.DEFAULTS||{},t}),{});null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar});return e=a()(!0,{},H.DEFAULTS,{modules:n},r,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,r){return e.modules[r]&&(t[r]=e.modules[r]),t}),{}),e}(t,r),this.container=this.options.container,null==this.container)return G.error("Invalid Quill container",t);this.options.debug&&H.debug(this.options.debug);let n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new U,this.scroll=e().create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new _(this.scroll),this.selection=new Y(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(U.events.EDITOR_CHANGE,(t=>{t===U.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(U.events.SCROLL_UPDATE,((t,e)=>{let r=this.selection.lastRange,n=r&&0===r.length?r.index:void 0;V.call(this,(()=>this.editor.update(null,e,n)),t)}));let i=this.clipboard.convert(`
${n}


`);this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}addContainer(t,e=null){if("string"==typeof t){let e=t;(t=document.createElement("div")).classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,r){return[t,e,,r]=X(t,e,r),V.call(this,(()=>this.editor.deleteText(t,e)),r,t,-1*e)}disable(){this.enable(!1)}enable(t=!0){this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}format(t,r,n=U.sources.API){return V.call(this,(()=>{let n=this.getSelection(!0),o=new(i());if(null==n)return o;if(e().query(t,e().Scope.BLOCK))o=this.editor.formatLine(n.index,n.length,{[t]:r});else{if(0===n.length)return this.selection.format(t,r),o;o=this.editor.formatText(n.index,n.length,{[t]:r})}return this.setSelection(n,U.sources.SILENT),o}),n)}formatLine(t,e,r,n,i){let o;return[t,e,o,i]=X(t,e,r,n,i),V.call(this,(()=>this.editor.formatLine(t,e,o)),i,t,0)}formatText(t,e,r,n,i){let o;return[t,e,o,i]=X(t,e,r,n,i),V.call(this,(()=>this.editor.formatText(t,e,o)),i,t,0)}getBounds(t,e=0){let r;r="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(t=0,e=this.getLength()-t){return[t,e]=X(t,e),this.editor.getContents(t,e)}getFormat(t=this.getSelection(!0),e=0){return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(t=0,e=Number.MAX_VALUE){return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(t=!1){return t&&this.focus(),this.update(),this.selection.getRange()[0]}getText(t=0,e=this.getLength()-t){return[t,e]=X(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,r,n=H.sources.API){return V.call(this,(()=>this.editor.insertEmbed(t,e,r)),n,t)}insertText(t,e,r,n,i){let o;return[t,,o,i]=X(t,0,r,n,i),V.call(this,(()=>this.editor.insertText(t,e,o)),i,t,e.length)}isEnabled(){return!this.container.classList.contains("ql-disabled")}off(){return this.emitter.off.apply(this.emitter,arguments)}on(){return this.emitter.on.apply(this.emitter,arguments)}once(){return this.emitter.once.apply(this.emitter,arguments)}pasteHTML(t,e,r){this.clipboard.dangerouslyPasteHTML(t,e,r)}removeFormat(t,e,r){return[t,e,,r]=X(t,e,r),V.call(this,(()=>this.editor.removeFormat(t,e)),r,t)}scrollIntoView(){this.selection.scrollIntoView(this.scrollingContainer)}setContents(t,e=U.sources.API){return V.call(this,(()=>{t=new(i())(t);let e=this.getLength(),r=this.editor.deleteText(0,e),n=this.editor.applyDelta(t),o=n.ops[n.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(this.editor.deleteText(this.getLength()-1,1),n.delete(1)),r.compose(n)}),e)}setSelection(t,e,r){null==t?this.selection.setRange(null,e||H.sources.API):([t,e,,r]=X(t,e,r),this.selection.setRange(new K(t,e),r),r!==U.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer))}setText(t,e=U.sources.API){let r=(new(i())).insert(t);return this.setContents(r,e)}update(t=U.sources.USER){let e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t,e=U.sources.API){return V.call(this,(()=>(t=new(i())(t),this.editor.applyDelta(t,e))),e,!0)}}function V(t,e,r,n){if(this.options.strict&&!this.isEnabled()&&e===U.sources.USER)return new(i());let o=null==r?null:this.getSelection(),s=this.editor.delta,l=t();if(null!=o&&(!0===r&&(r=o.index),null==n?o=Z(o,l,e):0!==n&&(o=Z(o,r,n,e)),this.setSelection(o,U.sources.SILENT)),l.length()>0){let t=[U.events.TEXT_CHANGE,l,s,e];this.emitter.emit(U.events.EDITOR_CHANGE,...t),e!==U.sources.SILENT&&this.emitter.emit(...t)}return l}function X(t,e,r,n,i){let o={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=n,n=r,r=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=n,n=r,r=e,e=0),"object"==typeof r?(o=r,i=n):"string"==typeof r&&(null!=n?o[r]=n:i=r),[t,e,o,i=i||U.sources.API]}function Z(t,e,r,n){if(null==t)return null;let o,s;return e instanceof i()?[o,s]=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,n!==U.sources.USER)})):[o,s]=[t.index,t.index+t.length].map((function(t){return t=0?t+r:Math.max(e,t+r)})),new K(o,s-o)}H.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},H.events=U.events,H.sources=U.sources,H.version="undefined"==typeof QUILL_VERSION?"dev":QUILL_VERSION,H.imports={delta:i(),parchment:e(),"core/module":M,"core/theme":W};class J extends e().Container{}J.allowedChildren=[g,y,J];const Q=J,tt="\ufeff";class et extends e().Embed{constructor(t){super(t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable",!1),[].slice.call(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(tt),this.rightGuard=document.createTextNode(tt),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let r,n,i=t.data.split(tt).join("");if(t===this.leftGuard)if(this.prev instanceof f){let t=this.prev.length();this.prev.insertAt(t,i),r={startNode:this.prev.domNode,startOffset:t+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(e().create(n),this),r={startNode:n,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof f?(this.next.insertAt(0,i),r={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(e().create(n),this.next),r={startNode:n,startOffset:i.length}));return t.data=tt,r}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){let r=this.restore(t.target);r&&(e.range=r)}}))}}const rt=et;function nt(t){return t instanceof g||t instanceof y}class it extends e().Scroll{constructor(t,e){super(t),this.emitter=e.emitter,Array.isArray(e.whitelist)&&(this.whitelist=e.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),this.domNode.addEventListener("DOMNodeInserted",(function(){})),this.optimize(),this.enable()}batchStart(){this.batch=!0}batchEnd(){this.batch=!1,this.optimize()}deleteAt(t,e){let[r,n]=this.line(t),[i]=this.line(t+e);if(super.deleteAt(t,e),null!=i&&r!==i&&n>0){if(r instanceof y||i instanceof y)return void this.optimize();if(r instanceof v){let t=r.newlineIndex(r.length(),!0);if(t>-1&&(r=r.split(t+1),r===i))return void this.optimize()}else if(i instanceof v){let t=i.newlineIndex(0);t>-1&&i.split(t+1)}let t=i.children.head instanceof c?null:i.children.head;r.moveChildren(i,t),r.remove()}this.optimize()}enable(t=!0){this.domNode.setAttribute("contenteditable",t)}formatAt(t,e,r,n){(null==this.whitelist||this.whitelist[r])&&(super.formatAt(t,e,r,n),this.optimize())}insertAt(t,r,n){if(null==n||null==this.whitelist||this.whitelist[r]){if(t>=this.length())if(null==n||null==e().query(r,e().Scope.BLOCK)){let t=e().create(this.statics.defaultChild);this.appendChild(t),null==n&&r.endsWith("\n")&&(r=r.slice(0,-1)),t.insertAt(0,r,n)}else{let t=e().create(r,n);this.appendChild(t)}else super.insertAt(t,r,n);this.optimize()}}insertBefore(t,r){if(t.statics.scope===e().Scope.INLINE_BLOT){let r=e().create(this.statics.defaultChild);r.appendChild(t),t=r}super.insertBefore(t,r)}leaf(t){return this.path(t).pop()||[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(nt,t)}lines(t=0,r=Number.MAX_VALUE){let n=(t,r,i)=>{let o=[],s=i;return t.children.forEachAt(r,i,(function(t,r,i){nt(t)?o.push(t):t instanceof e().Container&&(o=o.concat(n(t,r,s))),s-=i})),o};return n(this,t,r)}optimize(t=[],e={}){!0!==this.batch&&(super.optimize(t,e),t.length>0&&this.emitter.emit(U.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}update(t){if(!0===this.batch)return;let e=U.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(U.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(U.events.SCROLL_UPDATE,e,t)}}it.blotName="scroll",it.className="ql-editor",it.tagName="DIV",it.defaultChild="block",it.allowedChildren=[g,y,Q];const ot=it;let st={scope:e().Scope.BLOCK,whitelist:["right","center","justify"]},lt=new(e().Attributor.Attribute)("align","align",st),at=(new(e().Attributor.Class)("align","ql-align",st),new(e().Attributor.Style)("align","text-align",st));class ut extends e().Attributor.Style{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+e.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):e}}new(e().Attributor.Class)("color","ql-color",{scope:e().Scope.INLINE});let ct=new ut("color","color",{scope:e().Scope.INLINE}),ht=(new(e().Attributor.Class)("background","ql-bg",{scope:e().Scope.INLINE}),new ut("background","background-color",{scope:e().Scope.INLINE})),ft={scope:e().Scope.BLOCK,whitelist:["rtl"]},pt=new(e().Attributor.Attribute)("direction","dir",ft),dt=(new(e().Attributor.Class)("direction","ql-direction",ft),new(e().Attributor.Style)("direction","direction",ft)),yt={scope:e().Scope.INLINE,whitelist:["serif","monospace"]};new(e().Attributor.Class)("font","ql-font",yt);class gt extends e().Attributor.Style{value(t){return super.value(t).replace(/["']/g,"")}}let mt=new gt("font","font-family",yt),bt=(new(e().Attributor.Class)("size","ql-size",{scope:e().Scope.INLINE,whitelist:["small","large","huge"]}),new(e().Attributor.Style)("size","font-size",{scope:e().Scope.INLINE,whitelist:["10px","18px","32px"]})),vt=I("quill:clipboard");const Et="__ql-matcher",At=[[Node.TEXT_NODE,function(t,e){let r=t.data;if("O:P"===t.parentNode.tagName)return e.insert(r.trim());if(0===r.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!Tt(t.parentNode).whiteSpace.startsWith("pre")){let e=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};r=r.replace(/\r\n/g," ").replace(/\n/g," "),r=r.replace(/\s\s+/g,e.bind(e,!0)),(null==t.previousSibling&&_t(t.parentNode)||null!=t.previousSibling&&_t(t.previousSibling))&&(r=r.replace(/^\s+/,e.bind(e,!1))),(null==t.nextSibling&&_t(t.parentNode)||null!=t.nextSibling&&_t(t.nextSibling))&&(r=r.replace(/\s+$/,e.bind(e,!1)))}return e.insert(r)}],[Node.TEXT_NODE,qt],["br",function(t,e){Ot(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,qt],[Node.ELEMENT_NODE,function(t,r){let n=e().query(t);if(null==n)return r;if(n.prototype instanceof e().Embed){let e={},o=n.value(t);null!=o&&(e[n.blotName]=o,r=(new(i())).insert(e,n.formats(t)))}else"function"==typeof n.formats&&(r=St(r,n.blotName,n.formats(t)));return r}],[Node.ELEMENT_NODE,Rt],[Node.ELEMENT_NODE,function(t,r){let n=e().Attributor.Attribute.keys(t),i=e().Attributor.Class.keys(t),o=e().Attributor.Style.keys(t),s={};n.concat(i).concat(o).forEach((r=>{let n=e().query(r,e().Scope.ATTRIBUTE);null!=n&&(s[n.attrName]=n.value(t),s[n.attrName])||(n=Nt[r],null==n||n.attrName!==r&&n.keyName!==r||(s[n.attrName]=n.value(t)||void 0),n=xt[r],null==n||n.attrName!==r&&n.keyName!==r||(n=xt[r],s[n.attrName]=n.value(t)||void 0))})),Object.keys(s).length>0&&(r=St(r,s));return r}],[Node.ELEMENT_NODE,function(t,e){let r={},n=t.style||{};n.fontStyle&&"italic"===Tt(t).fontStyle&&(r.italic=!0);n.fontWeight&&(Tt(t).fontWeight.startsWith("bold")||parseInt(Tt(t).fontWeight)>=700)&&(r.bold=!0);Object.keys(r).length>0&&(e=St(e,r));parseFloat(n.textIndent||0)>0&&(e=(new(i())).insert("\t").concat(e));return e}],["li",function(t,r){let n=e().query(t);if(null==n||"list-item"!==n.blotName||!Ot(r,"\n"))return r;let o=-1,s=t.parentNode;for(;!s.classList.contains("ql-clipboard");)"list"===(e().query(s)||{}).blotName&&(o+=1),s=s.parentNode;return o<=0?r:r.compose((new(i())).retain(r.length()-1).retain(1,{indent:o}))}],["b",Lt.bind(Lt,"bold")],["i",Lt.bind(Lt,"italic")],["style",function(){return new(i())}]],Nt=[lt,pt].reduce((function(t,e){return t[e.keyName]=e,t}),{}),xt=[at,ht,ct,dt,mt,bt].reduce((function(t,e){return t[e.keyName]=e,t}),{});class wt extends M{constructor(t,e){super(t,e),this.quill.root.addEventListener("paste",this.onPaste.bind(this)),this.container=this.quill.addContainer("ql-clipboard"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex",-1),this.matchers=[],At.concat(this.options.matchers).forEach((([t,r])=>{(e.matchVisual||r!==Rt)&&this.addMatcher(t,r)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();const e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[v.blotName]){const t=this.container.innerText;return this.container.innerHTML="",(new(i())).insert(t,{[v.blotName]:e[v.blotName]})}let[r,n]=this.prepareMatching(),o=kt(this.container,r,n);return Ot(o,"\n")&&null==o.ops[o.ops.length-1].attributes&&(o=o.compose((new(i())).retain(o.length()-1).delete(1))),vt.log("convert",this.container.innerHTML,o),this.container.innerHTML="",o}dangerouslyPasteHTML(t,e,r=H.sources.API){if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,H.sources.SILENT);else{let n=this.convert(e);this.quill.updateContents((new(i())).retain(t).concat(n),r),this.quill.setSelection(t+n.length(),H.sources.SILENT)}}onPaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;let e=this.quill.getSelection(),r=(new(i())).retain(e.index),n=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(H.sources.SILENT),setTimeout((()=>{r=r.concat(this.convert()).delete(e.length),this.quill.updateContents(r,H.sources.USER),this.quill.setSelection(r.length()-e.length,H.sources.SILENT),this.quill.scrollingContainer.scrollTop=n,this.quill.focus()}),1)}prepareMatching(){let t=[],e=[];return this.matchers.forEach((r=>{let[n,i]=r;switch(n){case Node.TEXT_NODE:e.push(i);break;case Node.ELEMENT_NODE:t.push(i);break;default:[].forEach.call(this.container.querySelectorAll(n),(t=>{t[Et]=t[Et]||[],t[Et].push(i)}))}})),[t,e]}}function St(t,e,r){return"object"==typeof e?Object.keys(e).reduce((function(t,r){return St(t,r,e[r])}),t):t.reduce((function(t,n){return n.attributes&&n.attributes[e]?t.push(n):t.insert(n.insert,a()({},{[e]:r},n.attributes))}),new(i()))}function Tt(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};const e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function Ot(t,e){let r="";for(let n=t.ops.length-1;n>=0&&r.length-1}function kt(t,e,r){return t.nodeType===t.TEXT_NODE?r.reduce((function(e,r){return r(t,e)}),new(i())):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],((n,i)=>{let o=kt(i,e,r);return i.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(i,t)}),o),o=(i[Et]||[]).reduce((function(t,e){return e(i,t)}),o)),n.concat(o)}),new(i())):new(i())}function Lt(t,e,r){return St(r,t,!0)}function qt(t,e){return Ot(e,"\n")||(_t(t)||e.length()>0&&t.nextSibling&&_t(t.nextSibling))&&e.insert("\n"),e}function Rt(t,e){if(_t(t)&&null!=t.nextElementSibling&&!Ot(e,"\n\n")){let r=t.offsetHeight+parseFloat(Tt(t).marginTop)+parseFloat(Tt(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*r&&e.insert("\n")}return e}wt.DEFAULTS={matchers:[],matchVisual:!0};class Ct extends M{constructor(t,e){super(t,e),this.lastRecorded=0,this.ignoreChange=!1,this.clear(),this.quill.on(H.events.EDITOR_CHANGE,((t,e,r,n)=>{t!==H.events.TEXT_CHANGE||this.ignoreChange||(this.options.userOnly&&n!==H.sources.USER?this.transform(e):this.record(e,r))})),this.quill.keyboard.addBinding({key:"Z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"Y",shortKey:!0},this.redo.bind(this))}change(t,r){if(0===this.stack[t].length)return;let n=this.stack[t].pop();this.stack[r].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],H.sources.USER),this.ignoreChange=!1;let i=function(t){let r=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-r;(function(t){let r=t.ops[t.ops.length-1];if(null==r)return!1;if(null!=r.insert)return"string"==typeof r.insert&&r.insert.endsWith("\n");if(null!=r.attributes)return Object.keys(r.attributes).some((function(t){return null!=e().query(t,e().Scope.BLOCK)}));return!1})(t)&&(n-=1);return n}(n[t]);this.quill.setSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let r=this.quill.getContents().diff(e),n=Date.now();if(this.lastRecorded+this.options.delay>n&&this.stack.undo.length>0){let e=this.stack.undo.pop();r=r.compose(e.undo),t=e.redo.compose(t)}else this.lastRecorded=n;this.stack.undo.push({redo:t,undo:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}redo(){this.change("redo","undo")}transform(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}undo(){this.change("undo","redo")}}Ct.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};let Pt=I("quill:keyboard");const It=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class jt extends M{static match(t,e){return e=zt(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(r){return!!e[r]!==t[r]&&null!==e[r]}))&&e.key===(t.which||t.keyCode)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((e=>{("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&this.options.bindings[e]&&this.addBinding(this.options.bindings[e])})),this.addBinding({key:jt.keys.ENTER,shiftKey:null},Ft),this.addBinding({key:jt.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:jt.keys.BACKSPACE},{collapsed:!0},Ut),this.addBinding({key:jt.keys.DELETE},{collapsed:!0},Dt)):(this.addBinding({key:jt.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Ut),this.addBinding({key:jt.keys.DELETE},{collapsed:!0,suffix:/^.?$/},Dt)),this.addBinding({key:jt.keys.BACKSPACE},{collapsed:!1},Mt),this.addBinding({key:jt.keys.DELETE},{collapsed:!1},Mt),this.addBinding({key:jt.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Ut),this.listen()}addBinding(t,e={},r={}){let n=zt(t);if(null==n||null==n.key)return Pt.warn("Attempted to add invalid keyboard binding",n);"function"==typeof e&&(e={handler:e}),"function"==typeof r&&(r={handler:r}),n=a()(n,e,r),this.bindings[n.key]=this.bindings[n.key]||[],this.bindings[n.key].push(n)}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented)return;let r=t.which||t.keyCode,n=(this.bindings[r]||[]).filter((function(e){return jt.match(t,e)}));if(0===n.length)return;let i=this.quill.getSelection();if(null==i||!this.quill.hasFocus())return;let[o,s]=this.quill.getLine(i.index),[l,a]=this.quill.getLeaf(i.index),[u,c]=0===i.length?[l,a]:this.quill.getLeaf(i.index+i.length),h=l instanceof e().Text?l.value().slice(0,a):"",f=u instanceof e().Text?u.value().slice(c):"",p={collapsed:0===i.length,empty:0===i.length&&o.length()<=1,format:this.quill.getFormat(i),offset:s,prefix:h,suffix:f};n.some((t=>{if(null!=t.collapsed&&t.collapsed!==p.collapsed)return!1;if(null!=t.empty&&t.empty!==p.empty)return!1;if(null!=t.offset&&t.offset!==p.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(t){return null==p.format[t]})))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=p.format[e]:!1===t.format[e]?null==p.format[e]:S()(t.format[e],p.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(p.prefix))&&(!(null!=t.suffix&&!t.suffix.test(p.suffix))&&!0!==t.handler.call(this,i,p))}))&&t.preventDefault()}))}}function Bt(t,r){const n=t===jt.keys.LEFT?"prefix":"suffix";return{key:t,shiftKey:r,altKey:null,[n]:/^$/,handler:function(n){let i=n.index;t===jt.keys.RIGHT&&(i+=n.length+1);const[o]=this.quill.getLeaf(i);return!(o instanceof e().Embed)||(t===jt.keys.LEFT?r?this.quill.setSelection(n.index-1,n.length+1,H.sources.USER):this.quill.setSelection(n.index-1,H.sources.USER):r?this.quill.setSelection(n.index,n.length+1,H.sources.USER):this.quill.setSelection(n.index+n.length+1,H.sources.USER),!1)}}}function Ut(t,e){if(0===t.index||this.quill.getLength()<=1)return;let[r]=this.quill.getLine(t.index),n={};if(0===e.offset){let[e]=this.quill.getLine(t.index-1);if(null!=e&&e.length()>1){let e=r.formats(),i=this.quill.getFormat(t.index-1,1);n=s().attributes.diff(e,i)||{}}}let i=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-i,i,H.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index-i,i,n,H.sources.USER),this.quill.focus()}function Dt(t,e){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let n={},i=0,[o]=this.quill.getLine(t.index);if(e.offset>=o.length()-1){let[e]=this.quill.getLine(t.index+1);if(e){let r=o.formats(),l=this.quill.getFormat(t.index,1);n=s().attributes.diff(r,l)||{},i=e.length()}}this.quill.deleteText(t.index,r,H.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index+i-1,r,n,H.sources.USER)}function Mt(t){let e=this.quill.getLines(t),r={};if(e.length>1){let t=e[0].formats(),n=e[e.length-1].formats();r=s().attributes.diff(n,t)||{}}this.quill.deleteText(t,H.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index,1,r,H.sources.USER),this.quill.setSelection(t.index,H.sources.SILENT),this.quill.focus()}function Ft(t,r){t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);let n=Object.keys(r.format).reduce((function(t,n){return e().query(n,e().Scope.BLOCK)&&!Array.isArray(r.format[n])&&(t[n]=r.format[n]),t}),{});this.quill.insertText(t.index,"\n",n,H.sources.USER),this.quill.setSelection(t.index+1,H.sources.SILENT),this.quill.focus(),Object.keys(r.format).forEach((t=>{null==n[t]&&(Array.isArray(r.format[t])||"link"!==t&&this.quill.format(t,r.format[t],H.sources.USER))}))}function Kt(t){return{key:jt.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(r){let n=e().query("code-block"),i=r.index,o=r.length,[s,l]=this.quill.scroll.descendant(n,i);if(null==s)return;let a=this.quill.getIndex(s),u=s.newlineIndex(l,!0)+1,c=s.newlineIndex(a+l+o),h=s.domNode.textContent.slice(u,c).split("\n");l=0,h.forEach(((e,r)=>{t?(s.insertAt(u+l,n.TAB),l+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(s.deleteAt(u+l,n.TAB.length),l-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),l+=e.length+1})),this.quill.update(H.sources.USER),this.quill.setSelection(i,o,H.sources.SILENT)}}}function Yt(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,r){this.quill.format(t,!r.format[t],H.sources.USER)}}}function zt(t){if("string"==typeof t||"number"==typeof t)return zt({key:t});if("object"==typeof t&&(t=x()(t,!1)),"string"==typeof t.key)if(null!=jt.keys[t.key.toUpperCase()])t.key=jt.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[It]=t.shortKey,delete t.shortKey),t}jt.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},jt.DEFAULTS={bindings:{bold:Yt("bold"),italic:Yt("italic"),underline:Yt("underline"),indent:{key:jt.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",H.sources.USER)}},outdent:{key:jt.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",H.sources.USER)}},"outdent backspace":{key:jt.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",H.sources.USER):null!=e.format.list&&this.quill.format("list",!1,H.sources.USER)}},"indent code-block":Kt(!0),"outdent code-block":Kt(!1),"remove tab":{key:jt.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,H.sources.USER)}},tab:{key:jt.keys.TAB,handler:function(t){this.quill.history.cutoff();let e=(new(i())).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,H.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,H.sources.SILENT)}},"list empty enter":{key:jt.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,H.sources.USER),e.format.indent&&this.quill.format("indent",!1,H.sources.USER)}},"checklist enter":{key:jt.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){let[e,r]=this.quill.getLine(t.index),n=a()({},e.formats(),{list:"checked"}),o=(new(i())).retain(t.index).insert("\n",n).retain(e.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,H.sources.USER),this.quill.setSelection(t.index+1,H.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:jt.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){let[r,n]=this.quill.getLine(t.index),o=(new(i())).retain(t.index).insert("\n",e.format).retain(r.length()-n-1).retain(1,{header:null});this.quill.updateContents(o,H.sources.USER),this.quill.setSelection(t.index+1,H.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){let r,n=e.prefix.length,[o,s]=this.quill.getLine(t.index);if(s>n)return!0;switch(e.prefix.trim()){case"[]":case"[ ]":r="unchecked";break;case"[x]":r="checked";break;case"-":case"*":r="bullet";break;default:r="ordered"}this.quill.insertText(t.index," ",H.sources.USER),this.quill.history.cutoff();let l=(new(i())).retain(t.index-s).delete(n+1).retain(o.length()-2-s).retain(1,{list:r});this.quill.updateContents(l,H.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,H.sources.SILENT)}},"code exit":{key:jt.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){const[e,r]=this.quill.getLine(t.index),n=(new(i())).retain(t.index+e.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(n,H.sources.USER)}},"embed left":Bt(jt.keys.LEFT,!1),"embed left shift":Bt(jt.keys.LEFT,!0),"embed right":Bt(jt.keys.RIGHT,!1),"embed right shift":Bt(jt.keys.RIGHT,!0)}},H.register({"blots/block":g,"blots/block/embed":y,"blots/break":c,"blots/container":Q,"blots/cursor":A,"blots/embed":rt,"blots/inline":d,"blots/scroll":ot,"blots/text":f,"modules/clipboard":wt,"modules/history":Ct,"modules/keyboard":jt}),e().register(g,c,A,d,ot,f);const $t=H;let Wt=I("quill:toolbar");class Gt extends M{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){let e=document.createElement("div");!function(t,e){Array.isArray(e[0])||(e=[e]);e.forEach((function(e){let r=document.createElement("span");r.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)Ht(r,t);else{let e=Object.keys(t)[0],n=t[e];Array.isArray(n)?function(t,e,r){let n=document.createElement("select");n.classList.add("ql-"+e),r.forEach((function(t){let e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),n.appendChild(e)})),t.appendChild(n)}(r,e,n):Ht(r,e,n)}})),t.appendChild(r)}))}(e,this.options.container),t.container.parentNode.insertBefore(e,t.container),this.container=e}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement))return Wt.error("Container required for toolbar",this.options);this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},Object.keys(this.options.handlers).forEach((t=>{this.addHandler(t,this.options.handlers[t])})),[].forEach.call(this.container.querySelectorAll("button, select"),(t=>{this.attach(t)})),this.quill.on(H.events.EDITOR_CHANGE,((t,e)=>{t===H.events.SELECTION_CHANGE&&this.update(e)})),this.quill.on(H.events.SCROLL_OPTIMIZE,(()=>{let[t]=this.quill.selection.getRange();this.update(t)}))}addHandler(t,e){this.handlers[t]=e}attach(t){let r=[].find.call(t.classList,(t=>0===t.indexOf("ql-")));if(!r)return;if(r=r.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[r]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[r])return void Wt.warn("ignoring attaching to disabled format",r,t);if(null==e().query(r))return void Wt.warn("ignoring attaching to nonexistent format",r,t)}let n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let o;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;let e=t.options[t.selectedIndex];o=!e.hasAttribute("selected")&&(e.value||!1)}else o=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(null!=this.handlers[r])this.handlers[r].call(this,o);else if(e().query(r).prototype instanceof e().Embed){if(o=prompt(`Enter ${r}`),!o)return;this.quill.updateContents((new(i())).retain(s.index).delete(s.length).insert({[r]:o}),H.sources.USER)}else this.quill.format(r,o,H.sources.USER);this.update(s)})),this.controls.push([r,t])}update(t){let e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(r){let[n,i]=r;if("SELECT"===i.tagName){let r;if(null==t)r=null;else if(null==e[n])r=i.querySelector("option[selected]");else if(!Array.isArray(e[n])){let t=e[n];"string"==typeof t&&(t=t.replace(/\"/g,'\\"')),r=i.querySelector(`option[value="${t}"]`)}null==r?(i.value="",i.selectedIndex=-1):r.selected=!0}else if(null==t)i.classList.remove("ql-active");else if(i.hasAttribute("value")){let t=e[n]===i.getAttribute("value")||null!=e[n]&&e[n].toString()===i.getAttribute("value")||null==e[n]&&!i.getAttribute("value");i.classList.toggle("ql-active",t)}else i.classList.toggle("ql-active",null!=e[n])}))}}function Ht(t,e,r){let n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("ql-"+e),null!=r&&(n.value=r),t.appendChild(n)}Gt.DEFAULTS={},Gt.DEFAULTS={container:null,handlers:{clean:function(){let t=this.quill.getSelection();if(null!=t)if(0==t.length){let t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=e().query(t,e().Scope.INLINE)&&this.quill.format(t,!1)}))}else this.quill.removeFormat(t,H.sources.USER)},direction:function(t){let e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",H.sources.USER):t||"right"!==e||this.quill.format("align",!1,H.sources.USER),this.quill.format("direction",t,H.sources.USER)},indent:function(t){let e=this.quill.getSelection(),r=this.quill.getFormat(e),n=parseInt(r.indent||0);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===r.direction&&(e*=-1),this.quill.format("indent",n+e,H.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,H.sources.USER)},list:function(t){let e=this.quill.getSelection(),r=this.quill.getFormat(e);"check"===t?"checked"===r.list||"unchecked"===r.list?this.quill.format("list",!1,H.sources.USER):this.quill.format("list","unchecked",H.sources.USER):this.quill.format("list",t,H.sources.USER)}}};let Vt=0;function Xt(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}const Zt=class{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(()=>{this.togglePicker()})),this.label.addEventListener("keydown",(t=>{switch(t.keyCode){case jt.keys.ENTER:this.togglePicker();break;case jt.keys.ESCAPE:this.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Xt(this.label,"aria-expanded"),Xt(this.options,"aria-hidden")}buildItem(t){let e=document.createElement("span");return e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item"),t.hasAttribute("value")&&e.setAttribute("data-value",t.getAttribute("value")),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",(()=>{this.selectItem(e,!0)})),e.addEventListener("keydown",(t=>{switch(t.keyCode){case jt.keys.ENTER:this.selectItem(e,!0),t.preventDefault();break;case jt.keys.ESCAPE:this.escape(),t.preventDefault()}})),e}buildLabel(){let t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML="/images/vendor/quill/icons/dropdown.svg?c6cd8197101656eb7be9a80dcc6fea48",t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){let t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${Vt}`,Vt+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((e=>{let r=this.buildItem(e);t.appendChild(r),!0===e.selected&&this.selectItem(r)})),this.container.appendChild(t)}buildPicker(){[].slice.call(this.select.attributes).forEach((t=>{this.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t,e=!1){let r=this.container.querySelector(".ql-selected");if(t!==r&&(null!=r&&r.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"==typeof Event){let t=document.createEvent("Event");t.initEvent("change",!0,!0),this.select.dispatchEvent(t)}this.close()}}update(){let t;if(this.select.selectedIndex>-1){let e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);let e=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}};const Jt=class extends Zt{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),[].slice.call(this.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")}))}buildItem(t){let e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);let r=this.label.querySelector(".ql-color-label"),n=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=n:r.style.fill=n)}};const Qt=class extends Zt{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),[].forEach.call(this.container.querySelectorAll(".ql-picker-item"),(t=>{t.innerHTML=e[t.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}};const te=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"})),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){let e=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=r+"px",this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>n.right&&(o=n.right-i.right,this.root.style.left=e+o+"px"),i.leftn.bottom){let e=i.bottom-i.top,n=t.bottom-t.top+e;this.root.style.top=r-n+"px",this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},ee=[!1,"center","right","justify"],re=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],ne=[!1,"serif","monospace"],ie=["1","2","3",!1],oe=["small",!1,"large","huge"];class se extends W{constructor(t,e){super(t,e);let r=e=>{if(!document.body.contains(t.root))return document.body.removeEventListener("click",r);null==this.tooltip||this.tooltip.root.contains(e.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((function(t){t.container.contains(e.target)||t.close()}))};t.emitter.listenDOM("click",document.body,r)}addModule(t){let e=super.addModule(t);return"toolbar"===t&&this.extendToolbar(e),e}buildButtons(t,e){t.forEach((t=>{(t.getAttribute("class")||"").split(/\s+/).forEach((r=>{if(r.startsWith("ql-")&&(r=r.slice("ql-".length),null!=e[r]))if("direction"===r)t.innerHTML=e[r][""]+e[r].rtl;else if("string"==typeof e[r])t.innerHTML=e[r];else{let n=t.value||"";null!=n&&e[r][n]&&(t.innerHTML=e[r][n])}}))}))}buildPickers(t,e){this.pickers=t.map((t=>{if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&ae(t,ee),new Qt(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){let r=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&ae(t,re,"background"===r?"#ffffff":"#000000"),new Jt(t,e[r])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?ae(t,ne):t.classList.contains("ql-header")?ae(t,ie):t.classList.contains("ql-size")&&ae(t,oe)),new Zt(t)}));this.quill.on(U.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((function(t){t.update()}))}))}}se.DEFAULTS=a()(!0,{},W.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){let t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(()=>{if(null!=t.files&&null!=t.files[0]){let e=new FileReader;e.onload=e=>{let r=this.quill.getSelection(!0);this.quill.updateContents((new(i())).retain(r.index).delete(r.length).insert({image:e.target.result}),U.sources.USER),this.quill.setSelection(r.index+1,U.sources.SILENT),t.value=""},e.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});class le extends te{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{jt.match(t,"enter")?(this.save(),t.preventDefault()):jt.match(t,"escape")&&(this.cancel(),t.preventDefault())}))}cancel(){this.hide()}edit(t="link",e=null){this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){let t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}save(){let t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{let e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,U.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,U.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=function(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":{if(!t)break;let e=this.quill.getSelection(!0);if(null!=e){let r=e.index+e.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,U.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",U.sources.USER),this.quill.setSelection(r+2,U.sources.USER)}break}}this.textbox.value="",this.hide()}}function ae(t,e,r=!1){e.forEach((function(e){let n=document.createElement("option");e===r?n.setAttribute("selected","selected"):n.setAttribute("value",e),t.appendChild(n)}))}class ue extends d{static create(t){let e=super.create(t);return t=this.sanitize(t),e.setAttribute("href",t),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return function(t,e){let r=document.createElement("a");r.href=t;let n=r.href.slice(0,r.href.indexOf(":"));return e.indexOf(n)>-1}(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){if(t!==this.statics.blotName||!e)return super.format(t,e);e=this.constructor.sanitize(e),this.domNode.setAttribute("href",e)}}ue.blotName="link",ue.tagName="A",ue.SANITIZED_URL="about:blank",ue.PROTOCOL_WHITELIST=["http","https","mailto","tel"];var ce=r(3964),he=r.n(ce);const fe=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class pe extends se{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=fe),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),he()),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),he()),this.tooltip=new de(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,r){t.handlers.link.call(t,!r.format.link)}))}}pe.DEFAULTS=a()(!0,{},se.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){let t=this.quill.getSelection();if(null==t||0==t.length)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&0!==e.indexOf("mailto:")&&(e="mailto:"+e),this.quill.theme.tooltip.edit("link",e)}else this.quill.format("link",!1)}}}}});class de extends le{constructor(t,e){super(t,e),this.preview=this.root.querySelector("a.ql-preview")}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(t=>{if(null!=this.linkRange){let t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,U.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(U.events.SELECTION_CHANGE,((t,e,r)=>{if(null!=t){if(0===t.length&&r===U.sources.USER){let[e,r]=this.quill.scroll.descendant(ue,t.index);if(null!=e){this.linkRange=new K(t.index-r,e.length());let n=ue.formats(e.domNode);return this.preview.textContent=n,this.preview.setAttribute("href",n),this.show(),void this.position(this.quill.getBounds(this.linkRange))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}de.TEMPLATE=['','','',''].join("");const ye=pe;$t.register({"modules/toolbar":Gt,"themes/snow":ye})})()})(); \ No newline at end of file diff --git a/public/js/quill.module.js.LICENSE.txt b/public/js/quill.module.js.LICENSE.txt new file mode 100644 index 0000000..671b503 --- /dev/null +++ b/public/js/quill.module.js.LICENSE.txt @@ -0,0 +1,8 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index dc42bf2..ded02d1 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,6 +1,7 @@ { "/js/app.js": "/js/app.js", - "/js/recipes/edit.js": "/js/recipes/edit.js", + "/js/draggable.js": "/js/draggable.js", + "/js/quill.js": "/js/quill.js", "/css/recipes/edit.css": "/css/recipes/edit.css", "/css/app.css": "/css/app.css" } diff --git a/resources/js/draggable.js b/resources/js/draggable.js new file mode 100644 index 0000000..abe421a --- /dev/null +++ b/resources/js/draggable.js @@ -0,0 +1 @@ +window.Draggable = require('@shopify/draggable'); diff --git a/resources/js/quill.js b/resources/js/quill.js index 9f0f4f1..5b56945 100644 --- a/resources/js/quill.js +++ b/resources/js/quill.js @@ -1,11 +1,2 @@ -import Quill from 'quill/core'; - -import Toolbar from 'quill/modules/toolbar'; -import Snow from 'quill/themes/snow'; - -Quill.register({ - 'modules/toolbar': Toolbar, - 'themes/snow': Snow, -}); - -export default Quill; +require('./quill.module'); +window.Quill = require('quill'); diff --git a/resources/js/quill.module.js b/resources/js/quill.module.js new file mode 100644 index 0000000..9f0f4f1 --- /dev/null +++ b/resources/js/quill.module.js @@ -0,0 +1,11 @@ +import Quill from 'quill/core'; + +import Toolbar from 'quill/modules/toolbar'; +import Snow from 'quill/themes/snow'; + +Quill.register({ + 'modules/toolbar': Toolbar, + 'themes/snow': Snow, +}); + +export default Quill; diff --git a/resources/js/recipes/edit.js b/resources/js/recipes/edit.js deleted file mode 100644 index cbed42d..0000000 --- a/resources/js/recipes/edit.js +++ /dev/null @@ -1,4 +0,0 @@ -require('../quill'); - -window.Draggable = require('@shopify/draggable'); -window.Quill = require('quill'); diff --git a/resources/views/journal-entries/create-from-nutrients.blade.php b/resources/views/journal-entries/create-from-nutrients.blade.php index 41b7c4b..e1ffad3 100644 --- a/resources/views/journal-entries/create-from-nutrients.blade.php +++ b/resources/views/journal-entries/create-from-nutrients.blade.php @@ -29,7 +29,7 @@ diff --git a/resources/views/journal-entries/delete.blade.php b/resources/views/journal-entries/delete.blade.php index 411f38f..24cd85e 100644 --- a/resources/views/journal-entries/delete.blade.php +++ b/resources/views/journal-entries/delete.blade.php @@ -20,7 +20,7 @@
Meal: - {{ $journal_entry->meal }} + {{ \Illuminate\Support\Facades\Auth::user()->meals->firstWhere('value', $journal_entry->meal)['label'] }}
diff --git a/resources/views/journal-entries/index.blade.php b/resources/views/journal-entries/index.blade.php index 08a0686..7978380 100644 --- a/resources/views/journal-entries/index.blade.php +++ b/resources/views/journal-entries/index.blade.php @@ -135,21 +135,21 @@
- @foreach(['breakfast', 'lunch', 'dinner', 'snacks'] as $meal) + @foreach(\Illuminate\Support\Facades\Auth::user()->meals_enabled as $meal)

-
{{ Str::ucfirst($meal) }}
-

+
{{ $meal['label'] }}
+

@foreach(\App\Support\Nutrients::all()->sortBy('weight') as $nutrient) - {{ \App\Support\Nutrients::round($entries->where('meal', $meal)->sum($nutrient['value']), $nutrient['value']) }}{{ $nutrient['unit'] }} + {{ \App\Support\Nutrients::round($entries->where('meal', $meal['value'])->sum($nutrient['value']), $nutrient['value']) }}{{ $nutrient['unit'] }} {{ $nutrient['value'] }}@if(!$loop->last), @endif @endforeach

- @forelse($entries->where('meal', $meal) as $entry) + @forelse($entries->where('meal', $meal['value']) as $entry)
{{ $entry->summary }}
diff --git a/resources/views/journal-entries/partials/entry-item-input.blade.php b/resources/views/journal-entries/partials/entry-item-input.blade.php index 27a429f..feba322 100644 --- a/resources/views/journal-entries/partials/entry-item-input.blade.php +++ b/resources/views/journal-entries/partials/entry-item-input.blade.php @@ -25,7 +25,7 @@ diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php index 01162c9..a1a5342 100644 --- a/resources/views/layouts/navigation.blade.php +++ b/resources/views/layouts/navigation.blade.php @@ -29,6 +29,7 @@
My Profile My Goals + My Meals @can('administer', \App\Models\User::class)
Manage Users diff --git a/resources/views/meals/edit.blade.php b/resources/views/meals/edit.blade.php new file mode 100644 index 0000000..a714f10 --- /dev/null +++ b/resources/views/meals/edit.blade.php @@ -0,0 +1,76 @@ + + My Meals + +

My Meals

+
+
+ @method('put') + @csrf +
+
+
 
+
Meal name
+
Active
+
+
+ @foreach($meals as $key => $meal) +
+ + +
+
+
+ + + +
+
+ +
+ +
+
+
+ @endforeach +
+
+ +
+ Save +
+
+ + @once + @push('scripts') + + + @endpush + @endonce +
diff --git a/resources/views/recipes/edit.blade.php b/resources/views/recipes/edit.blade.php index 6ff363a..46b0c25 100644 --- a/resources/views/recipes/edit.blade.php +++ b/resources/views/recipes/edit.blade.php @@ -182,7 +182,8 @@ @once @push('scripts') - + +