diff --git a/seminar/lisak.pdf b/seminar/lisak.pdf deleted file mode 100644 index 64f11598..00000000 Binary files a/seminar/lisak.pdf and /dev/null differ diff --git a/seminar/profile_vysledkovka.txt b/seminar/profile_vysledkovka.txt deleted file mode 100644 index a53eb3be..00000000 --- a/seminar/profile_vysledkovka.txt +++ /dev/null @@ -1,548 +0,0 @@ -ncalls tottime percall cumtime percall filename:lineno(function) - 214448 0.097 0.000 0.325 0.000 :1009(_handle_fromlist) - 1 0.000 0.000 21.087 21.087 :1() - 193106 0.083 0.000 0.147 0.000 :1(__new__) - 115 0.000 0.000 0.000 0.000 __init__.py:1001(get_internal_type) - 1130 0.000 0.000 0.000 0.000 __init__.py:1078(get_internal_type) - 444 0.000 0.000 0.000 0.000 __init__.py:1219(get_internal_type) - 14 0.000 0.000 0.000 0.000 __init__.py:133(__init__) - 8 0.000 0.000 0.000 0.000 __init__.py:1351(get_internal_type) - 347 0.000 0.000 0.001 0.000 __init__.py:1361(debug) - 6 0.000 0.000 0.000 0.000 __init__.py:1551(get_internal_type) - 347 0.000 0.000 0.000 0.000 __init__.py:1619(isEnabledFor) - 1 0.000 0.000 0.000 0.000 __init__.py:1821(get_prep_value) - 238 0.000 0.000 0.000 0.000 __init__.py:1827(get_internal_type) - 345 0.000 0.000 0.000 0.000 __init__.py:2083(get_internal_type) - 19646 0.008 0.000 0.039 0.000 __init__.py:235(localize) - 42417 0.138 0.000 0.311 0.000 __init__.py:376(get_col) - 3452 0.000 0.000 0.000 0.000 __init__.py:390(select_format) - 45869 0.037 0.000 0.047 0.000 __init__.py:495(__eq__) - 19349 0.010 0.000 0.013 0.000 __init__.py:507(__hash__) - 39066 0.200 0.000 0.241 0.000 __init__.py:548(__init__) - 78132 0.123 0.000 0.240 0.000 __init__.py:617(update) - 346 0.001 0.000 0.002 0.000 __init__.py:634(db_type_parameters) - 346 0.001 0.000 0.003 0.000 __init__.py:649(db_type) - 4055 0.001 0.000 0.002 0.000 __init__.py:706(get_db_converters) - 38769 0.012 0.000 0.012 0.000 __init__.py:711(unique) - 18 0.000 0.000 0.000 0.000 __init__.py:768(get_internal_type) - 154911 0.046 0.000 0.070 0.000 __init__.py:775(get_prep_value) - 1 0.000 0.000 0.000 0.000 __init__.py:781(get_db_prep_value) - 1622 0.000 0.000 0.000 0.000 __init__.py:940(get_internal_type) - 10 0.000 0.000 0.000 0.000 __init__.py:955(rel_db_type) - 58321 0.038 0.000 0.145 0.000 __init__.py:961(get_db_prep_value) - 97061 0.198 0.000 0.386 0.000 __init__.py:967(get_prep_value) - 101931 0.036 0.000 0.103 0.000 abc.py:137(__instancecheck__) - 347 0.000 0.000 0.000 0.000 base.py:148(queries_logged) - 2 0.000 0.000 0.000 0.000 base.py:181(_base_objects) - 135 0.000 0.000 0.001 0.000 base.py:1822(model_unpickle) - 347 0.000 0.000 0.000 0.000 base.py:213(ensure_connection) - 347 0.001 0.000 0.003 0.000 base.py:221(_prepare_cursor) - 347 0.001 0.000 0.006 0.000 base.py:232(_cursor) - 347 0.000 0.000 0.001 0.000 base.py:240(create_cursor) - 347 0.000 0.000 0.006 0.000 base.py:254(cursor) - 19646 0.011 0.000 0.164 0.000 base.py:37() - 111 0.000 0.000 0.000 0.000 base.py:371(_base_manager) - 347 0.001 0.000 0.089 0.000 base.py:379(execute) - 19601 0.004 0.000 0.004 0.000 base.py:381(__get__) - 347 0.000 0.000 0.014 0.000 base.py:389(convert_query) - 63396 0.265 0.000 1.616 0.000 base.py:401(__init__) - 347 0.000 0.000 0.000 0.000 base.py:435(validate_no_broken_transaction) - 63396 0.085 0.000 1.715 0.000 base.py:505(from_db) - 347 0.001 0.000 0.001 0.000 base.py:519(allow_thread_sharing) - 1316563 1.004 0.000 2.164 0.000 base.py:524(__eq__) - 138 0.000 0.000 0.000 0.000 base.py:534(__hash__) - 347 0.001 0.000 0.001 0.000 base.py:534(validate_thread_sharing) - 135 0.000 0.000 0.002 0.000 base.py:539(__reduce__) - 135 0.000 0.000 0.000 0.000 base.py:545(__getstate__) - 135 0.000 0.000 0.002 0.000 base.py:549(__setstate__) - 2749511 0.758 0.000 1.039 0.000 base.py:567(_get_pk_val) - 347 0.001 0.000 0.001 0.000 base.py:574(make_debug_cursor) - 349 0.000 0.000 0.001 0.000 compiler.py:1037(deferred_to_columns) - 347 0.005 0.000 0.052 0.000 compiler.py:1047(get_converters) - 38980 0.048 0.000 0.178 0.000 compiler.py:1070(apply_converters) - 347 0.001 0.000 0.053 0.000 compiler.py:1081(results_iter) - 347 0.000 0.000 0.000 0.000 compiler.py:1086() - 347 0.003 0.000 0.738 0.002 compiler.py:1105(execute_sql) - 1317 0.002 0.000 0.287 0.000 compiler.py:1539(cursor_iter) - 1317 0.003 0.000 0.285 0.000 compiler.py:1545() - 347 0.006 0.000 0.055 0.000 compiler.py:191(get_select) - 3/1 0.000 0.000 0.000 0.000 compiler.py:243(get_select_from_parent) - 347 0.001 0.000 0.003 0.000 compiler.py:261(get_order_by) - 347 0.001 0.000 0.002 0.000 compiler.py:27(__init__) - 347 0.000 0.000 0.000 0.000 compiler.py:373(get_extra_select) - 8008 0.007 0.000 0.011 0.000 compiler.py:383(quote_name_unless_alias) -4881/4175 0.008 0.000 0.263 0.000 compiler.py:400(compile) - 347 0.002 0.000 0.057 0.000 compiler.py:42(setup_query) - 693 0.000 0.000 0.000 0.000 compiler.py:43() - 347 0.005 0.000 0.317 0.001 compiler.py:464(as_sql) - 347 0.002 0.000 0.067 0.000 compiler.py:48(pre_sql_setup) - 347 0.000 0.000 0.000 0.000 compiler.py:62(get_group_by) - 349 0.007 0.000 0.025 0.000 compiler.py:626(get_default_columns) - 347 0.000 0.000 0.000 0.000 compiler.py:670(get_distinct) - 18/10 0.000 0.000 0.001 0.000 compiler.py:694(find_ordering_name) - 12 0.000 0.000 0.000 0.000 compiler.py:712() - 14 0.000 0.000 0.000 0.000 compiler.py:723() - 18 0.000 0.000 0.001 0.000 compiler.py:725(_setup_joins) - 347 0.001 0.000 0.003 0.000 compiler.py:738(get_from_clause) - 3/1 0.000 0.000 0.000 0.000 compiler.py:772(get_related_selections) - 2 0.000 0.000 0.000 0.000 compiler.py:806(get_related_klass_infos) - 270 0.000 0.000 0.000 0.000 compiler.py:837() - 3 0.000 0.000 0.000 0.000 compiler.py:856() - 675 0.001 0.000 0.001 0.000 config.py:167(get_model) - 555/111 0.001 0.000 0.003 0.000 copy.py:132(deepcopy) - 222 0.000 0.000 0.000 0.000 copy.py:190(_deepcopy_atomic) - 111 0.000 0.000 0.001 0.000 copy.py:210(_deepcopy_list) - 111 0.000 0.000 0.001 0.000 copy.py:219(_deepcopy_tuple) - 111 0.000 0.000 0.001 0.000 copy.py:220() - 222 0.000 0.000 0.000 0.000 copy.py:252(_keep_alive) - 1164 0.003 0.000 0.009 0.000 copy.py:268(_reconstruct) - 1302 0.005 0.000 0.021 0.000 copy.py:66(copy) - 1029 0.001 0.000 0.003 0.000 copyreg.py:87(__newobj__) - 38758 0.082 0.000 0.325 0.000 datastructures.py:106(relabeled_clone) - 58025 0.035 0.000 0.047 0.000 datastructures.py:119(equals) - 9 0.000 0.000 0.003 0.000 datastructures.py:12(__init__) - 58025 0.033 0.000 0.080 0.000 datastructures.py:128(__eq__) - 38758 0.034 0.000 0.359 0.000 datastructures.py:131(demote) - 38956 0.017 0.000 0.017 0.000 datastructures.py:153(__init__) - 347 0.000 0.000 0.000 0.000 datastructures.py:157(as_sql) - 346 0.001 0.000 0.001 0.000 datastructures.py:266(__init__) - 9 0.000 0.000 0.000 0.000 datastructures.py:27(__iter__) - 9 0.000 0.000 0.000 0.000 datastructures.py:33(__bool__) - 96768 0.138 0.000 0.537 0.000 datastructures.py:43(__init__) - 15 0.000 0.000 0.000 0.000 datastructures.py:61(as_sql) - 19646 0.038 0.000 0.038 0.000 dateparse.py:119() - 19646 0.062 0.000 0.150 0.000 dateparse.py:97(parse_datetime) - 222 0.001 0.000 0.001 0.000 dbapi2.py:63(convert_date) - 20369 0.038 0.000 0.046 0.000 deconstruct.py:14(__new__) - 126792 0.085 0.000 1.277 0.000 dispatcher.py:152(send) - 63396 0.069 0.000 0.973 0.000 dispatcher.py:174() - 63396 0.092 0.000 0.183 0.000 dispatcher.py:223(_live_receivers) - 111 0.000 0.000 0.000 0.000 encoding.py:51(force_text) - 2286 0.001 0.000 0.002 0.000 enum.py:284(__call__) - 2286 0.001 0.000 0.001 0.000 enum.py:526(__new__) - 14 0.000 0.000 0.000 0.000 expressions.py:1123(__init__) - 14 0.000 0.000 0.000 0.000 expressions.py:1137(set_source_expressions) - 14 0.000 0.000 0.000 0.000 expressions.py:1140(get_source_expressions) - 14 0.000 0.000 0.000 0.000 expressions.py:1143(as_sql) - 14 0.000 0.000 0.000 0.000 expressions.py:1160(as_sqlite) - 19981 0.008 0.000 0.008 0.000 expressions.py:154(__init__) - 374 0.000 0.000 0.001 0.000 expressions.py:158(__getstate__) - 4 0.000 0.000 0.000 0.000 expressions.py:163(get_db_converters) - 362 0.000 0.000 0.000 0.000 expressions.py:170(get_source_expressions) - 360 0.000 0.000 0.000 0.000 expressions.py:173(set_source_expressions) - 2 0.000 0.000 0.000 0.000 expressions.py:211(contains_aggregate) - 2 0.000 0.000 0.000 0.000 expressions.py:213() - 374/360 0.001 0.000 0.009 0.000 expressions.py:223(resolve_expression) - 374/360 0.000 0.000 0.000 0.000 expressions.py:241() - 4 0.000 0.000 0.000 0.000 expressions.py:300(convert_value) - 38955 0.033 0.000 0.271 0.000 expressions.py:317(get_lookup) - 374 0.000 0.000 0.007 0.000 expressions.py:331(copy) - 4 0.000 0.000 0.000 0.000 expressions.py:687(__init__) - 4 0.000 0.000 0.000 0.000 expressions.py:696(as_sql) - 19977 0.026 0.000 0.034 0.000 expressions.py:725(__init__) - 3808 0.005 0.000 0.015 0.000 expressions.py:735(as_sql) - 3448 0.004 0.000 0.009 0.000 expressions.py:745(get_db_converters) - 111 0.000 0.000 0.001 0.000 fields.py:241(__set__) - 111 0.000 0.000 0.000 0.000 fields.py:31(country_to_text) - 111 0.000 0.000 0.000 0.000 fields.py:315(get_internal_type) - 111 0.000 0.000 0.001 0.000 fields.py:337(get_clean_value) - 111 0.000 0.000 0.000 0.000 files.py:208(__set__) - 111 0.000 0.000 0.000 0.000 files.py:274(get_internal_type) - 111 0.000 0.000 0.000 0.000 files.py:332(__set__) - 111 0.000 0.000 0.000 0.000 files.py:405(update_dimension_fields) - 1046/698 0.001 0.000 0.004 0.000 functional.py:72(__get__) - 14 0.000 0.000 0.000 0.000 hashable.py:4(make_hashable) - 1146 0.000 0.000 0.001 0.000 inspect.py:158(isfunction) - 567 0.002 0.000 0.006 0.000 inspect.py:1799(_signature_bound_method) - 573 0.006 0.000 0.016 0.000 inspect.py:2117(_signature_from_function) - 1140/573 0.004 0.000 0.029 0.000 inspect.py:2198(_signature_from_callable) - 2286 0.003 0.000 0.006 0.000 inspect.py:2467(__init__) - 3987 0.000 0.000 0.000 0.000 inspect.py:2517(name) - 1701 0.000 0.000 0.000 0.000 inspect.py:2521(default) - 2835 0.000 0.000 0.000 0.000 inspect.py:2529(kind) - 1140 0.005 0.000 0.007 0.000 inspect.py:2750(__init__) - 2859 0.001 0.000 0.001 0.000 inspect.py:2799() - 573 0.001 0.000 0.029 0.000 inspect.py:2829(from_callable) - 1140 0.000 0.000 0.000 0.000 inspect.py:2835(parameters) - 567 0.001 0.000 0.004 0.000 inspect.py:2843(replace) - 573 0.001 0.000 0.030 0.000 inspect.py:3081(signature) - 573 0.001 0.000 0.001 0.000 inspect.py:484(unwrap) - 573 0.000 0.000 0.000 0.000 inspect.py:504(_is_wrapper) - 573 0.001 0.000 0.031 0.000 inspect.py:62(func_supports_parameter) - 63396 0.018 0.000 0.025 0.000 inspect.py:72(isclass) - 14 0.000 0.000 0.000 0.000 itercompat.py:1(is_iterable) - 346 0.000 0.000 0.000 0.000 lookups.py:116(contains_aggregate) - 346 0.002 0.000 0.016 0.000 lookups.py:152(process_lhs) - 346 0.002 0.000 0.236 0.001 lookups.py:161(as_sql) - 337 0.000 0.000 0.000 0.000 lookups.py:168(get_rhs_op) - 346 0.001 0.000 0.110 0.000 lookups.py:179(get_db_prep_lookup) - 38955 0.070 0.000 1.236 0.000 lookups.py:18(__init__) - 9 0.013 0.001 0.109 0.012 lookups.py:185() - 9 0.027 0.003 0.050 0.006 lookups.py:198(get_prep_lookup) - 38613 0.071 0.000 0.077 0.000 lookups.py:222(resolve_expression_parameter) - 9 0.015 0.002 0.210 0.023 lookups.py:230(batch_process_rhs) - 38622 0.010 0.000 0.087 0.000 lookups.py:237() - 336 0.001 0.000 0.003 0.000 lookups.py:248(process_rhs) - 1 0.000 0.000 0.000 0.000 lookups.py:300(get_prep_lookup) - 9 0.000 0.000 0.214 0.024 lookups.py:320(process_rhs) - 9 0.000 0.000 0.000 0.000 lookups.py:348(get_rhs_op) - 9 0.000 0.000 0.216 0.024 lookups.py:351(as_sql) - 9 0.000 0.000 0.109 0.012 lookups.py:38(batch_process_rhs) - 38946 0.057 0.000 0.174 0.000 lookups.py:66(get_prep_lookup) - 346 0.001 0.000 0.011 0.000 lookups.py:76(process_lhs) - 337 0.001 0.000 0.002 0.000 lookups.py:82(process_rhs) - 19265 0.009 0.000 0.013 0.000 lookups.py:97(rhs_is_direct_value) - 81884 0.130 0.000 0.130 0.000 manager.py:117(_set_creation_counter) - 655 0.001 0.000 0.009 0.000 manager.py:125(db_manager) - 679 0.000 0.000 0.000 0.000 manager.py:131(db) - 38820 0.082 0.000 0.516 0.000 manager.py:139(get_queryset) - 43376 0.023 0.000 0.090 0.000 manager.py:146(all) - 768 0.001 0.000 0.002 0.000 manager.py:174(__get__) - 82539 0.105 0.000 0.131 0.000 manager.py:20(__new__) - 81884 0.181 0.000 0.311 0.000 manager.py:26(__init__) - 229 0.002 0.000 0.159 0.001 manager.py:81(manager_method) - 136 0.000 0.000 0.003 0.000 managers.py:35(get_queryset) - 525 0.001 0.000 0.001 0.000 mixins.py:10(get_cached_value) - 135 0.000 0.000 0.000 0.000 mixins.py:19(is_cached) - 19871 0.014 0.000 0.021 0.000 mixins.py:22(set_cached_value) - 540 0.000 0.000 0.001 0.000 models.py:104(get_for_id) - 111 0.000 0.000 0.000 0.000 models.py:123(plne_jmeno) - 135 0.000 0.000 0.005 0.000 models.py:143(get_real_concrete_instance_class_id) - 540 0.000 0.000 0.002 0.000 models.py:154(model_class) - 274 0.000 0.000 0.006 0.000 models.py:181(__init__) - 139 0.000 0.000 0.000 0.000 models.py:25(_get_opts) - 139 0.000 0.000 0.000 0.000 models.py:30(_get_from_cache) - 111 0.000 0.000 0.000 0.000 models.py:307(get_titul) - 111 0.000 0.000 0.155 0.001 models.py:326(__str__) - 139 0.000 0.000 0.000 0.000 models.py:34(get_for_model) - 2 0.000 0.000 0.000 0.000 models.py:384(druhy_rok) - 3 0.000 0.000 0.000 0.000 models.py:682(kod_v_rocniku) - 405 0.001 0.000 0.010 0.000 models.py:97(get_real_instance_class) - 384/346 0.005 0.000 0.025 0.000 operations.py:116(_quote_params_for_last_executed_query) - 347 0.003 0.000 0.028 0.000 operations.py:143(last_executed_query) - 3863 0.002 0.000 0.003 0.000 operations.py:161(quote_name) - 346 0.000 0.000 0.000 0.000 operations.py:184(field_cast_sql) - 3452 0.006 0.000 0.007 0.000 operations.py:239(get_db_converters) - 19646 0.027 0.000 0.093 0.000 operations.py:256(convert_datetimefield_value) - 346 0.000 0.000 0.000 0.000 operations.py:257(lookup_cast) - 444 0.000 0.000 0.000 0.000 operations.py:264(convert_datefield_value) - 9 0.000 0.000 0.000 0.000 operations.py:265(max_in_list_size) - 6 0.000 0.000 0.000 0.000 operations.py:276(get_decimalfield_converter) - 19376 0.013 0.000 0.030 0.000 operations.py:283(converter) - 19483 0.006 0.000 0.006 0.000 operations.py:297(convert_booleanfield_value) - 347 0.000 0.000 0.000 0.000 operations.py:323(compiler) - 14 0.000 0.000 0.000 0.000 operations.py:42(check_expression_support) - 19372 0.003 0.000 0.003 0.000 operations.py:455(validate_autopk_value) - 3452 0.000 0.000 0.000 0.000 operations.py:557(get_db_converters) - 768 0.000 0.000 0.000 0.000 options.py:322(swapped) - 271699 0.143 0.000 0.143 0.000 options.py:544(get_field) - 8 0.000 0.000 0.000 0.000 options.py:569(get_base_chain) - 77335 0.054 0.000 0.054 0.000 options.py:597(get_ancestor_link) - 6 0.000 0.000 0.000 0.000 options.py:617(get_path_to_parent) - 3 0.000 0.000 0.000 0.000 query.py:1000(prefetch_related) - 38955 0.036 0.000 0.062 0.000 query.py:1020(resolve_lookup_value) - 38955 0.132 0.000 1.515 0.000 query.py:1040(solve_lookup_type) - 274 0.001 0.000 0.003 0.000 query.py:105(__init__) - 57849 0.041 0.000 0.083 0.000 query.py:1058(check_query_object_type) - 333 0.001 0.000 0.009 0.000 query.py:1068(order_by) - 38955 0.037 0.000 0.127 0.000 query.py:1069(check_related_objects) - 4 0.000 0.000 0.000 0.000 query.py:1087(extra) - 38955 0.140 0.000 1.693 0.000 query.py:1089(build_lookup) - 7 0.000 0.000 0.000 0.000 query.py:1140(using) - 38955 0.557 0.000 8.105 0.000 query.py:1154(build_filter) - 627 0.001 0.000 0.002 0.000 query.py:1165(db) - 138 0.000 0.000 0.004 0.000 query.py:117(_clone) - 38955 0.015 0.000 0.015 0.000 query.py:1203() - 39305 0.047 0.000 0.840 0.000 query.py:1214(_chain) - 39305 0.144 0.000 0.779 0.000 query.py:1226(_clone) -44029/44010 0.034 0.000 17.618 0.000 query.py:1240(_fetch_all) - 19376 0.005 0.000 0.005 0.000 query.py:1246(_next_is_sticky) - 38955 0.161 0.000 10.104 0.000 query.py:1278(add_q) - 38617 0.020 0.000 0.047 0.000 query.py:1288(_add_hints) - 38955 0.014 0.000 0.014 0.000 query.py:1289() -39066/38955 0.328 0.000 9.842 0.000 query.py:1298(_add_q) - 77932 0.843 0.000 2.091 0.000 query.py:1361(names_to_path) - 38977 0.395 0.000 1.997 0.000 query.py:1457(setup_joins) - 38956 0.303 0.000 0.332 0.000 query.py:147(__init__) - 7 0.000 0.000 0.000 0.000 query.py:1481(__init__) - 14 0.000 0.000 0.000 0.000 query.py:1495(final_transformer) - 14 0.000 0.000 0.000 0.000 query.py:1508(get_current_prefetch_to) - 14 0.000 0.000 0.000 0.000 query.py:1511(get_current_to_attr) - 7 0.000 0.000 0.000 0.000 query.py:1517(get_current_queryset) - 10 0.000 0.000 0.000 0.000 query.py:1529(normalize_prefetch_lookups) - 3 0.009 0.003 15.991 5.330 query.py:1541(prefetch_related_objects) - 38969 0.309 0.000 0.572 0.000 query.py:1559(trim_joins) - 38624 0.035 0.000 0.035 0.000 query.py:1578() - 38624 0.014 0.000 0.014 0.000 query.py:1579() - 38621 0.031 0.000 0.031 0.000 query.py:1582() - 77242 0.019 0.000 0.019 0.000 query.py:1583() - 136 0.001 0.000 0.054 0.000 query.py:163(_filter_or_exclude) - 7 0.000 0.000 0.000 0.000 query.py:1667(get_prefetcher) - 7 0.232 0.033 15.978 2.283 query.py:1714(prefetch_one_level) - 39625 0.018 0.000 0.018 0.000 query.py:1719(can_filter) - 7 0.000 0.000 0.000 0.000 query.py:1746() - 333 0.000 0.000 0.000 0.000 query.py:1793(add_ordering) - 333 0.000 0.000 0.000 0.000 query.py:1818(clear_ordering) - 2 0.000 0.000 0.000 0.000 query.py:1829(__init__) - 1 0.000 0.000 0.000 0.000 query.py:1844(add_select_related) - 2 0.000 0.000 0.000 0.000 query.py:1860() - 4 0.000 0.000 0.000 0.000 query.py:1860(add_extra) - 270 0.001 0.000 0.006 0.000 query.py:1875(populate) - 78261 0.170 0.000 0.502 0.000 query.py:189(__init__) - 349/347 0.000 0.000 0.000 0.000 query.py:1891(get_related_populators) - 3 0.000 0.000 0.000 0.000 query.py:1941(get_loaded_field_names) - 364 0.000 0.000 0.000 0.000 query.py:2022(annotation_select) - 4442 0.001 0.000 0.001 0.000 query.py:2041(extra_select) - 38632 0.052 0.000 0.106 0.000 query.py:2126(is_nullable) - 28 0.000 0.000 0.000 0.000 query.py:2145(get_order_dir) - 39066 0.066 0.000 0.307 0.000 query.py:2184(__init__) - 39066 0.042 0.000 0.245 0.000 query.py:2199(add_votes) - 39066 0.151 0.000 0.746 0.000 query.py:2206(update_join_types) - 331 0.000 0.000 0.000 0.000 query.py:236(extra) - 147 0.000 0.000 0.000 0.000 query.py:242(annotations) - 347 0.000 0.000 0.000 0.000 query.py:252(base_table) - 746 0.001 0.000 0.223 0.000 query.py:255(__len__) -43283/43271 0.032 0.000 17.437 0.000 query.py:259(__iter__) - 347 0.001 0.000 0.004 0.000 query.py:284(get_compiler) - 117595 0.032 0.000 0.032 0.000 query.py:291(get_meta) - 39305 0.264 0.000 0.498 0.000 query.py:299(clone) - 2 0.002 0.001 0.026 0.013 query.py:317(_get_real_instances) - 39305 0.058 0.000 0.568 0.000 query.py:345(chain) - 1 0.000 0.000 0.000 0.000 query.py:35(__iter__) - 333 0.002 0.000 0.290 0.001 query.py:394(get) - 347 0.000 0.000 0.000 0.000 query.py:40(__init__) - 136 0.000 0.000 0.037 0.000 query.py:41(_polymorphic_iterator) - 2 0.000 0.000 0.000 0.000 query.py:446() - 2 0.000 0.000 0.000 0.000 query.py:478() - 63473 0.084 0.000 2.785 0.000 query.py:49(__iter__) - 347 0.001 0.000 0.001 0.000 query.py:61() - 350 0.000 0.000 0.000 0.000 query.py:633(deferred_to_data) - 347 0.000 0.000 0.000 0.000 query.py:65() - 38955 0.033 0.000 0.405 0.000 query.py:65(_get_col) - 1 0.000 0.000 0.000 0.000 query.py:66() - 96962 0.098 0.000 0.119 0.000 query.py:719(table_alias) - 362 0.000 0.000 0.000 0.000 query.py:744(ref_alias) - 38993 0.022 0.000 0.022 0.000 query.py:748(unref_alias) - 39066 0.034 0.000 0.034 0.000 query.py:752(promote_joins) - 3 0.001 0.000 15.992 5.331 query.py:769(_prefetch_related_objects) - 78021 0.161 0.000 0.564 0.000 query.py:786(demote_joins) - 347 0.001 0.000 0.001 0.000 query.py:805(reset_refcounts) - 2 0.000 0.000 0.000 0.000 query.py:880(all) - 38955 0.075 0.000 11.368 0.000 query.py:887(filter) - 39314 0.696 0.000 0.915 0.000 query.py:896(get_initial_alias) - 38955 0.167 0.000 11.291 0.000 query.py:901(_filter_or_exclude) - 96966 0.297 0.000 0.579 0.000 query.py:916(join) - 96966 0.069 0.000 0.149 0.000 query.py:939() - 3448 0.001 0.000 0.001 0.000 query.py:964(join_parent_model) - 1 0.000 0.000 0.000 0.000 query.py:978(select_related) - 136 0.000 0.000 0.000 0.000 query_translate.py:103() - 136 0.000 0.000 0.000 0.000 query_translate.py:108(_translate_polymorphic_filter_definition) - 136 0.001 0.000 0.001 0.000 query_translate.py:28(translate_polymorphic_filter_definitions_in_kwargs) - 136 0.000 0.000 0.000 0.000 query_translate.py:89(translate_polymorphic_filter_definitions_in_args) - 38955 0.045 0.000 0.054 0.000 query_utils.py:156(_get_lookup) - 38955 0.096 0.000 0.237 0.000 query_utils.py:166(get_lookup) - 25 0.000 0.000 0.000 0.000 query_utils.py:221(select_related_descend) - 57849 0.021 0.000 0.035 0.000 query_utils.py:270(check_rel_lookup_compatibility) - 57849 0.014 0.000 0.014 0.000 query_utils.py:277(check) - 39177 0.080 0.000 0.171 0.000 query_utils.py:58(__init__) - 111 0.000 0.000 0.003 0.000 query_utils.py:61(_combine) - 111 0.000 0.000 0.004 0.000 query_utils.py:81(__and__) - 347 0.000 0.000 0.001 0.000 re.py:232(compile) - 347 0.001 0.000 0.001 0.000 re.py:271(_compile) - 675 0.000 0.000 0.000 0.000 registry.py:127(check_apps_ready) - 1350 0.000 0.000 0.000 0.000 registry.py:137(check_models_ready) - 675 0.000 0.000 0.001 0.000 registry.py:147(get_app_config) - 675 0.001 0.000 0.003 0.000 registry.py:185(get_model) - 38752 0.157 0.000 0.778 0.000 related.py:1466(_get_path_info) - 38752 0.032 0.000 0.810 0.000 related.py:1495(get_reverse_path_info) - 77500 0.092 0.000 0.161 0.000 related.py:1511(_get_m2m_attr) - 77500 0.061 0.000 0.110 0.000 related.py:1529(_get_m2m_reverse_attr) - 111 0.001 0.000 0.006 0.000 related.py:343(get_reverse_related_filter) - 111 0.000 0.000 0.000 0.000 related.py:350() - 38752 0.024 0.000 0.024 0.000 related.py:421(related_query_name) - 20420 0.003 0.000 0.003 0.000 related.py:440(get_cache_name) - 623548 0.200 0.000 0.299 0.000 related.py:616(related_fields) - 38756 0.037 0.000 0.075 0.000 related.py:622(reverse_related_fields) - 38756 0.018 0.000 0.018 0.000 related.py:624() - 62665 0.118 0.000 0.154 0.000 related.py:626(local_related_fields) - 125330 0.013 0.000 0.013 0.000 related.py:628() - 367263 0.798 0.000 1.095 0.000 related.py:630(foreign_related_fields) - 734526 0.124 0.000 0.124 0.000 related.py:632() - 38592 0.021 0.000 0.126 0.000 related.py:634(get_local_related_value) - 77222 0.076 0.000 0.715 0.000 related.py:637(get_foreign_related_value) - 115814 0.188 0.000 0.317 0.000 related.py:640(get_instance_value_for_fields) - 96768 0.182 0.000 0.345 0.000 related.py:662(get_joining_columns) - 193536 0.057 0.000 0.057 0.000 related.py:664() - 38756 0.027 0.000 0.202 0.000 related.py:666(get_reverse_joining_columns) - 111 0.000 0.000 0.000 0.000 related.py:669(get_extra_descriptor_filter) - 15 0.000 0.000 0.000 0.000 related.py:684(get_extra_restriction) - 154344 0.293 0.000 0.842 0.000 related.py:698(get_path_info) - 58463 0.024 0.000 0.122 0.000 related.py:876(target_field) - 38756 0.123 0.000 0.174 0.000 related.py:880(get_reverse_path_info) - 38612 0.022 0.000 0.096 0.000 related.py:939(get_db_prep_value) - 10 0.000 0.000 0.001 0.000 related.py:962(db_type) - 603 0.001 0.000 0.001 0.000 related.py:973(get_db_converters) - 39224 0.072 0.000 0.381 0.000 related.py:979(get_col) - 111 0.000 0.000 0.005 0.000 related_descriptors.py:108(get_queryset) - 111 0.001 0.000 0.150 0.001 related_descriptors.py:142(get_object) - 525 0.001 0.000 0.155 0.000 related_descriptors.py:147(__get__) - 19372 0.050 0.000 0.093 0.000 related_descriptors.py:194(__set__) - 111 0.000 0.000 0.151 0.001 related_descriptors.py:281(get_object) - 81889 0.157 0.000 1.610 0.000 related_descriptors.py:514(__get__) - 43134 0.085 0.000 0.248 0.000 related_descriptors.py:551(__init__) - 19238 0.168 0.000 5.178 0.000 related_descriptors.py:566(_apply_rel_filters) - 43131 0.113 0.000 5.597 0.000 related_descriptors.py:605(get_queryset) - 3 0.014 0.005 1.183 0.394 related_descriptors.py:612(get_prefetch_queryset) - 3 0.004 0.001 0.267 0.089 related_descriptors.py:621() - 38748 0.398 0.000 1.075 0.000 related_descriptors.py:803(__init__) - 19372 0.057 0.000 6.092 0.000 related_descriptors.py:871(_apply_rel_filters) - 38744 0.084 0.000 6.445 0.000 related_descriptors.py:886(get_queryset) - 4 0.000 0.000 0.254 0.064 related_descriptors.py:893(get_prefetch_queryset) - 4 0.000 0.000 0.000 0.000 related_descriptors.py:914() - 24069 0.022 0.000 0.130 0.000 related_descriptors.py:919() - 48138 0.012 0.000 0.020 0.000 related_descriptors.py:920() - 19372 0.041 0.000 0.269 0.000 related_descriptors.py:923() - 38744 0.029 0.000 0.179 0.000 related_descriptors.py:924() - 19240 0.098 0.000 0.578 0.000 related_lookups.py:103(get_prep_lookup) - 3 0.000 0.000 0.000 0.000 related_lookups.py:119(as_sql) - 57849 0.165 0.000 0.520 0.000 related_lookups.py:26(get_normalized_value) - 7 0.000 0.000 0.446 0.064 related_lookups.py:47(get_prep_lookup) - 7 0.014 0.002 0.295 0.042 related_lookups.py:50() - 7 0.011 0.002 0.102 0.015 related_lookups.py:59() - 7 0.000 0.000 0.216 0.031 related_lookups.py:62(as_sql) - 38756 0.026 0.000 0.228 0.000 reverse_related.py:136(get_joining_columns) - 6 0.000 0.000 0.000 0.000 reverse_related.py:139(get_extra_restriction) - 43244 0.042 0.000 0.042 0.000 reverse_related.py:152(get_accessor_name) - 38756 0.029 0.000 0.838 0.000 reverse_related.py:169(get_path_info) - 43244 0.021 0.000 0.064 0.000 reverse_related.py:172(get_cache_name) - 6 0.000 0.000 0.000 0.000 reverse_related.py:213(get_related_field) - 111 0.001 0.000 0.003 0.000 sourcegroups.py:104(post_init_receiver) - 222 0.000 0.000 0.000 0.000 sourcegroups.py:108() - 222 0.000 0.000 0.000 0.000 sourcegroups.py:112() - 63396 0.837 0.000 0.904 0.000 sourcegroups.py:27(receiver) - 111 0.001 0.000 0.001 0.000 sourcegroups.py:64(init_instance) - 111 0.000 0.000 0.001 0.000 sourcegroups.py:80(get_source_fields) - 222 0.000 0.000 0.000 0.000 sourcegroups.py:85() - 19646 0.006 0.000 0.009 0.000 timezone.py:238(is_aware) - 19646 0.012 0.000 0.054 0.000 timezone.py:264(make_aware) - 195570 0.144 0.000 0.144 0.000 tree.py:21(__init__) - 39305 0.041 0.000 0.070 0.000 tree.py:29(_new_instance) - 111 0.000 0.000 0.002 0.000 tree.py:50(__deepcopy__) - 78132 0.032 0.000 0.032 0.000 tree.py:60(__bool__) - 116976 0.129 0.000 0.171 0.000 tree.py:78(add) - 347 0.000 0.000 0.000 0.000 utils.py:16(__init__) - 97176 0.072 0.000 0.125 0.000 utils.py:194(__getitem__) - 2011 0.002 0.000 0.003 0.000 utils.py:22(__getattr__) - 19863 0.032 0.000 0.037 0.000 utils.py:248(_route_db) - 19372 0.006 0.000 0.006 0.000 utils.py:269(allow_relation) - 2011 0.000 0.000 0.000 0.000 utils.py:65(__enter__) - 347 0.001 0.000 0.092 0.000 utils.py:66(execute) - 2011 0.000 0.000 0.000 0.000 utils.py:68(__exit__) - 347 0.001 0.000 0.091 0.000 utils.py:72(_execute_with_wrappers) - 347 0.001 0.000 0.090 0.000 utils.py:78(_execute) - 1317 0.000 0.000 0.000 0.000 utils.py:91(__call__) - 1317 0.002 0.000 0.279 0.000 utils.py:94(inner) - 347 0.004 0.000 0.124 0.000 utils.py:96(execute) - 270 0.000 0.000 0.003 0.000 version.py:18(get_version) - 270 0.000 0.000 0.001 0.000 version.py:42(get_main_version) - 1080 0.000 0.000 0.000 0.000 version.py:46() - 540 0.001 0.000 0.001 0.000 version.py:49(get_complete_version) - 1 0.000 0.000 0.000 0.000 views_all.py:378(sloupec_s_poradim) - 138 0.000 0.000 0.000 0.000 views_all.py:431(hlavni_problem) - 1 0.000 0.000 0.018 0.018 views_all.py:437(hlavni_problemy_cisla) - 1 0.000 0.000 0.000 0.000 views_all.py:441() - 1 0.000 0.000 0.000 0.000 views_all.py:442() - 3 0.000 0.000 0.000 0.000 views_all.py:455() - 1 0.307 0.307 20.294 20.294 views_all.py:461(body_resitelu_odjakziva) - 1 0.001 0.001 0.211 0.211 views_all.py:489(body_resitelu_za_rocnik) - 111 0.000 0.000 0.001 0.000 views_all.py:646(__init__) - 24110 0.060 0.000 0.079 0.000 views_all.py:658(pricti_body) - 1 0.004 0.004 21.086 21.086 views_all.py:669(spocti_vysledkovku_cisla) - 111 0.000 0.000 0.000 0.000 views_all.py:722() - 1 0.000 0.000 0.000 0.000 views_all.py:729() - 1 0.000 0.000 0.074 0.074 views_all.py:730() - 126792 0.046 0.000 0.064 0.000 weakref.py:432(get) - 63507 0.047 0.000 0.047 0.000 weakref.py:66(__call__) - 39305 0.062 0.000 0.133 0.000 where.py:142(clone) - 693/347 0.001 0.000 0.003 0.000 where.py:162(_contains_aggregate) - 693 0.000 0.000 0.002 0.000 where.py:165() - 347 0.000 0.000 0.003 0.000 where.py:168(contains_aggregate) - 347 0.000 0.000 0.004 0.000 where.py:32(split_having) - 347 0.002 0.000 0.239 0.001 where.py:65(as_sql) - 335126 0.111 0.000 0.111 0.000 {built-in method __new__ of type object at 0x8228a0} - 101931 0.067 0.000 0.067 0.000 {built-in method _abc._abc_instancecheck} - 39066 0.037 0.000 0.037 0.000 {built-in method _collections._count_elements} - 347 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident} - 347 0.000 0.000 0.000 0.000 {built-in method builtins.all} - 349/347 0.000 0.000 0.002 0.000 {built-in method builtins.any} - 1140 0.000 0.000 0.000 0.000 {built-in method builtins.callable} - 1 0.000 0.000 21.087 21.087 {built-in method builtins.exec} -3327406/3230526 0.443 0.000 1.351 0.000 {built-in method builtins.getattr} - 1834380 0.569 0.000 0.569 0.000 {built-in method builtins.hasattr} -19612/19501 0.003 0.000 0.003 0.000 {built-in method builtins.hash} - 1683 0.000 0.000 0.000 0.000 {built-in method builtins.id} - 2373545 0.428 0.000 0.512 0.000 {built-in method builtins.isinstance} - 293997 0.050 0.000 0.050 0.000 {built-in method builtins.issubclass} - 107053 0.021 0.000 0.021 0.000 {built-in method builtins.iter} -685350/682020 0.078 0.000 0.300 0.000 {built-in method builtins.len} - 136 0.000 0.000 0.010 0.000 {built-in method builtins.next} - 224 0.003 0.000 0.003 0.000 {built-in method builtins.print} -426400/407028 0.069 0.000 0.158 0.000 {built-in method builtins.setattr} - 39178 0.045 0.000 0.045 0.000 {built-in method builtins.sorted} - 356 0.000 0.000 0.000 0.000 {built-in method from_iterable} - 9 0.003 0.000 0.003 0.000 {built-in method fromkeys} - 573 0.000 0.000 0.000 0.000 {built-in method sys.getrecursionlimit} - 694 0.000 0.000 0.000 0.000 {built-in method time.time} - 729 0.091 0.000 0.092 0.000 {function SQLiteCursorWrapper.execute at 0x7f70385cc7b8} - 1164 0.002 0.000 0.004 0.000 {method '__reduce_ex__' of 'object' objects} - 97112 0.011 0.000 0.011 0.000 {method 'add' of 'set' objects} - 347 0.000 0.000 0.000 0.000 {method 'append' of 'collections.deque' objects} - 517017 0.070 0.000 0.070 0.000 {method 'append' of 'list' objects} - 1076 0.000 0.000 0.000 0.000 {method 'close' of 'sqlite3.Cursor' objects} - 39305 0.024 0.000 0.024 0.000 {method 'copy' of 'collections.OrderedDict' objects} - 197379 0.067 0.000 0.067 0.000 {method 'copy' of 'dict' objects} - 78748 0.018 0.000 0.018 0.000 {method 'copy' of 'set' objects} - 14 0.000 0.000 0.000 0.000 {method 'count' of 'str' objects} - 19376 0.004 0.000 0.004 0.000 {method 'create_decimal_from_float' of 'decimal.Context' objects} - 729 0.002 0.000 0.002 0.000 {method 'cursor' of 'sqlite3.Connection' objects} - 19646 0.003 0.000 0.003 0.000 {method 'decode' of 'bytes' objects} - 3 0.000 0.000 0.000 0.000 {method 'difference' of 'set' objects} - 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} - 4 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects} - 237775 0.038 0.000 0.038 0.000 {method 'extend' of 'list' objects} - 1317 0.113 0.000 0.277 0.000 {method 'fetchmany' of 'sqlite3.Cursor' objects} - 382 0.001 0.000 0.001 0.000 {method 'fetchone' of 'sqlite3.Cursor' objects} - 4 0.000 0.000 0.000 0.000 {method 'find' of 'str' objects} - 359/248 0.002 0.000 0.157 0.001 {method 'format' of 'str' objects} - 406280 0.091 0.000 0.091 0.000 {method 'get' of 'dict' objects} - 14 0.000 0.000 0.000 0.000 {method 'group' of 're.Match' objects} - 19646 0.018 0.000 0.018 0.000 {method 'groupdict' of 're.Match' objects} - 2 0.000 0.000 0.000 0.000 {method 'index' of 'list' objects} - 2286 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects} - 38624 0.009 0.000 0.009 0.000 {method 'issubset' of 'set' objects} - 96970 0.015 0.000 0.015 0.000 {method 'items' of 'collections.OrderedDict' objects} - 162672 0.026 0.000 0.026 0.000 {method 'items' of 'dict' objects} - 1741 0.002 0.000 0.002 0.000 {method 'join' of 'str' objects} - 137 0.000 0.000 0.000 0.000 {method 'keys' of 'collections.OrderedDict' objects} - 19646 0.003 0.000 0.003 0.000 {method 'ljust' of 'str' objects} - 675 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects} - 19646 0.022 0.000 0.022 0.000 {method 'match' of 're.Pattern' objects} - 20020 0.004 0.000 0.004 0.000 {method 'pop' of 'dict' objects} - 135696 0.055 0.000 0.055 0.000 {method 'pop' of 'list' objects} - 19376 0.013 0.000 0.013 0.000 {method 'quantize' of 'decimal.Decimal' objects} - 19646 0.031 0.000 0.031 0.000 {method 'replace' of 'datetime.datetime' objects} - 347 0.000 0.000 0.000 0.000 {method 'replace' of 'str' objects} - 14 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} - 6 0.000 0.000 0.000 0.000 {method 'scaleb' of 'decimal.Decimal' objects} - 14 0.000 0.000 0.000 0.000 {method 'search' of 're.Pattern' objects} - 43308 0.007 0.000 0.007 0.000 {method 'setdefault' of 'dict' objects} - 1 0.000 0.000 0.000 0.000 {method 'sort' of 'list' objects} - 222 0.000 0.000 0.000 0.000 {method 'split' of 'bytes' objects} - 39024 0.023 0.000 0.023 0.000 {method 'split' of 'str' objects} - 3863 0.001 0.000 0.001 0.000 {method 'startswith' of 'str' objects} - 347 0.013 0.000 0.013 0.000 {method 'sub' of 're.Pattern' objects} - 4 0.000 0.000 0.000 0.000 {method 'update' of 'collections.OrderedDict' objects} - 79152 0.041 0.000 0.041 0.000 {method 'update' of 'dict' objects} - 77917 0.029 0.000 0.029 0.000 {method 'update' of 'set' objects} - 19646 0.003 0.000 0.003 0.000 {method 'utcoffset' of 'datetime.datetime' objects} - 567 0.000 0.000 0.000 0.000 {method 'values' of 'mappingproxy' objects} diff --git a/seminar/restats b/seminar/restats deleted file mode 100644 index 74e7ac7a..00000000 Binary files a/seminar/restats and /dev/null differ diff --git a/seminar/static/seminar/lisak.pdf.odt b/seminar/static/seminar/lisak.pdf.odt deleted file mode 100644 index 5c1daadb..00000000 Binary files a/seminar/static/seminar/lisak.pdf.odt and /dev/null differ diff --git a/seminar/static/seminar/lisak.pdf.pdf b/seminar/static/seminar/lisak.pdf.pdf deleted file mode 100644 index 77d873b8..00000000 Binary files a/seminar/static/seminar/lisak.pdf.pdf and /dev/null differ diff --git a/seminar/static/seminar/vue/css/vue_app_01.css b/seminar/static/seminar/vue/css/vue_app_01.css deleted file mode 100644 index b16467c6..00000000 --- a/seminar/static/seminar/vue/css/vue_app_01.css +++ /dev/null @@ -1 +0,0 @@ -.changed[data-v-56d81b9c]{background-color:"yellow"}.upravit[data-v-ca15a458]{margin-top:-40px}.addnewnode{display:inline}.treenode-org[data-v-dab2489a]{padding:5px;margin:5px;border:2px solid #6a0043}.children-org[data-v-dab2489a]{padding:10px;margin:5px;border:2px dashed #6a0043}@font-face{font-family:OpenSans;src:url(../fonts/OpenSans-Regular.ttf);font-weight:400}body{font-family:OpenSans;background-color:#fffbf6;min-height:100%}div.container{width:970px;margin:auto}.org-logged-in div.container{margin-top:20px}div.login-bar{background:#6a0043;color:#f9d59e;width:100%;position:fixed;margin-top:-20px;min-height:20px;z-index:20;padding-left:5px;padding-right:5px}div.login-bar div{display:inline}a.login-ref-admin{display:inline;color:#fffbf6}a{color:#6f2509}a:active,a:focus,a:hover{color:#e84e10;text-decoration:none}img{-webkit-filter:drop-shadow(0 3px 3px rgba(0,0,0,.4));filter:drop-shadow(0 3px 3px rgba(0,0,0,.4));max-width:100%;height:auto}h1,h2{font-size:200%}h1,h2,h3{font-variant:small-caps;font-weight:700;color:#6f2509}h3{font-size:160%}h4{color:#6f2509}h4,h5{font-size:140%;font-variant:small-caps;font-weight:700}h5{color:#000}h6{font-size:120%;color:#000}.button,h6{font-variant:small-caps;font-weight:700}.button{margin:10px 0 10px 0;padding:4px 0;text-align:center;background-color:#e84e10;color:#fffbf6;font-size:150%;-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4))}.button:hover{position:relative;top:2px;left:2px;background-color:#df490e}.org-logged-in .mam-text-plugin{border:1px dashed #6a0043;padding:5px;margin:-5px}.mam-org-only{background:#eee4ec;padding:10px;margin:10px -10px;border:2px dashed #6a0043}.mam-org-only .mam-org-only{border:0}li.mam-org-only{padding:3px 0;margin:-2px 0}table .border-r{border-right:1px solid}table .border-b{border-bottom:1px solid}.vysledkovka td,.vysledkovka th{padding:.1em .3em}.vysledkovka{border:2px solid}div.container{padding:0}div.content{padding:15px 30px}h1{margin-top:0}#id_comment{width:100%;height:6em}#title{height:55px;width:970px;position:fixed;z-index:10;background-color:#e84e10;-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));font-size:28px;color:#fffbf6;font-weight:400;font-variant:small-caps;text-align:center;text-decoration:none;padding-top:8px;text-shadow:none}#title-mobile{display:none}#header{position:relative;background:url(../img/vikendovka.jpg) no-repeat top;background-size:100%;top:58px}#header img.logo{position:absolute center;width:100%;-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4))}#header img.logo-mobile,nav.nav-button,ul.menu_mobile{display:none}div.dropdown-backdrop{z-index:-1}h1 a:hover{text-decoration:none}ul.menu{width:100%;padding:0;margin-top:-5px;font-variant:small-caps}ul.menu a{text-decoration:none;font-weight:700;font-size:105%}ul.menu li{margin:0;display:inline-block;width:16.666667%;text-align:center;font-size:140%;font-weight:400}ul.menu li>a:active,ul.menu li>a:hover{color:#000}ul.submenu{margin-top:10px;margin-bottom:10px;padding-top:10px;padding-bottom:5px;-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));background-color:#e84e10;z-index:50;font-weight:400}ul.submenu li{width:auto;padding:0 20px 0 20px;display:inline-block}ul.submenu li>a{color:#f9d59e;text-decoration:none;text-shadow:none}ul.submenu li>a:hover{color:#000}ul.menu li.active>a{color:#f9d59e}ul.submenu li.active>a{color:#000}div.novinky_name{text-align:right;font-style:italic}div.zadani_azad_termin{text-align:center;font-size:large;font-weight:700}#footer{background:url(../img/mozaika-footer.svg) no-repeat top;height:200px;background-position:relative;background-size:100%;-webkit-filter:drop-shadow(5px 0 5px rgba(0,0,0,.4));filter:drop-shadow(5px 0 5px rgba(0,0,0,.4));padding-top:3.5%}#footer p.license{text-align:center;font-weight:400;bottom:0}p.license-mobile{display:none}table.form td,table.form tr{table-layout:fixed;word-wrap:break-word;padding:5px}table#reseni.form td,table#reseni.form tr{display:inline-table}input[type=file]{max-width:250px;text-overflow:ellipsis}.field-with-comment{position:relative}.field-comment{display:none;text-shadow:0 1px 0 #fff;background-color:#f0f0f0;border-color:#dbdbdb;position:absolute;z-index:100;border:1px;border-style:solid;border-width:1px;border-radius:5px;padding:3px;top:20px;left:20px}.field-with-comment:hover span.field-comment{display:block}input{margin:5px}.titulnistrana{display:flex;text-align:justify}.titulnistrana h1,.zjistit_vic{text-align:center}.zjistit_vic{margin-bottom:30px}.zjistit_vic hr{display:none}.graf-svg{display:flex}#svg-graf{width:100%;height:auto;margin:30px}.titulnistrana_obsah{width:66%}.temata_titulka,.vitej_titulka{width:49%;padding:10px;display:table-cell}.titulnistrana_novinky{width:33%;padding:10px}.novinka_obrazek{margin:10px 0 10px 0;width:100%}.novinka_datum{font-weight:700}.novinka_autor{text-align:right}.novinka_autor,div.org-text{font-style:italic}div.odpocet{margin:20px;text-align:center}@media (max-width:970px){#title,div.container{width:100%}#title{text-align:center}#header{background-size:100%}#footer,#header img.logo{width:100%}ul.menu{font-size:90%;margin-top:-7px}ul.menu li{margin-top:10px}ul.submenu li{margin-top:0}ul.submenu{margin-top:8px}}@media(max-width:800px){ul.menu{font-size:80%;margin-top:-2px}ul.menu li{margin-top:10px}ul.submenu li{margin-top:0}ul.submenu{margin-top:8px}a.ref-org-foto{pointer-events:none}table#reseni.form td,table#reseni.form tr{display:inline-grid;max-width:300px}.titulnistrana{display:block}.graf{padding-top:40px}.titulnistrana_obsah{width:100%}.temata_titulka,.vitej_titulka{width:49%;padding:10px;display:table-cell}#svg-graf,.titulnistrana_novinky{width:100%;max-width:500px;padding:10px;margin:auto}.zjistit_vic hr{display:flex}}@media (max-width:650px){#hide-if-small.login-bar-flatpage,#title,.no-mobile{display:none}#header{width:100%;top:0}#header,#header.archiv,#header.clanky,#header.cojemam,#header.NOC,#header.NOCarchiv,#header.NOCclanky,#header.NOCcojemam,#header.NOCsoustredeni,#header.NOCzaani,#header.soustredeni,#header.zadani{background-image:none}#header img.logo{display:none}#header img.logo-mobile{display:block;top:0;left:0;width:100%;-webkit-filter:drop-shadow(0 0 5px rgba(0,0,0,.4));filter:drop-shadow(0 0 5px rgba(0,0,0,.4));margin-bottom:3px}ul.menu{display:none}ul.menu_mobile{display:block;z-index:10;position:-webkit-sticky;position:sticky;font-variant:small-caps;font-size:150%;font-weight:700;list-style-type:none;padding-top:3px;padding-bottom:3px;padding-left:12px}ul.menu_mobile a:active,ul.menu_mobile a:focus,ul.menu_mobile a:hover{text-decoration:none;color:#000}ul.menu_mobile ul{list-style-type:none;font-size:90%;color:#000}ul.menu_mobile ul li>a{color:#000}ul.menu_mobile ul li:before{content:" \276D "}ul.menu_mobile br{display:none}nav.nav-button{display:block;position:sticky;position:-webkit-sticky;top:0;z-index:10}#navbar-content,button.navbar-button{background-color:#e84e10}button.navbar-button{color:#f9d59e;font-variant:small-caps;font-size:160%;border-radius:0;border-width:0;width:100%;text-align:right}button.navbar-button span:after{content:" \2261 ";font-size:120%}li.dropdown div.submenu_mobile{display:none}li.dropdown.open div.submenu_mobile{display:block}#footer{display:none}p.license-mobile{position:relative;display:block;font-size:90%;background-color:#e84e10;padding:5%;text-align:justify}table.form td,table.form tr{display:inherit}.titulnistrana{display:block}.graf{padding-top:40px}.titulnistrana_obsah{width:100%}.temata_titulka,.vitej_titulka{width:100%;padding:10px;display:block}.titulnistrana_novinky{width:100%;padding:10px}}div.seznam_orgu{text-align:center}div.org_pole,div.rocnik_pole{display:inline-block;width:30%;min-width:300px;text-align:center}div.cislo_pole{display:inline-block;width:15%;min-width:165px;text-align:center;padding:10px}div.seznam_orgu h3{text-align:center;margin-top:10px;margin-bottom:0}div.org_email{margin-bottom:10px;font-weight:700}.flip-card{perspective:1000px;margin-left:auto;margin-right:auto}#organizatori.flip-card{width:200px;height:250px}#archiv.flip-card{width:210px;height:298px}#archiv-rocnik.flip-card{width:144px;height:205px}.flip-card-inner{position:relative;width:100%;height:100%;transition:transform .8s;transform-style:preserve-3d}.flip-card:hover .flip-card-inner{transform:rotateY(180deg)}.flip-card-back,.flip-card-front{position:absolute;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}div.flip-card-foto img{width:100%;height:100%}.flip-card-back{background-color:#f9d59e;color:#000;transform:rotateY(180deg);padding:10px;padding-top:20px}#archiv.flip-card-back{background-color:#fff}div.popis_rocniku{text-align:left;font-weight:700;margin:20px}div.cislo_odkazy a,div.popis_rocniku a{font-weight:700;color:#000}div.cislo_odkazy a:hover,div.popis_rocniku a:hover{color:#6f2509}div.cislo_odkazy ul{margin:0;padding:0}.galerie .obrazek,.titulni_obrazek{max-width:100%;height:auto;width:auto\9}.predchozi_obrazek{position:absolute;z-index:1;width:33%;height:100%;left:0;top:0}.predchozi_obrazek:hover{background-image:url(/static/galerie/prvky/predchozi.svg);-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));background-position:0;background-repeat:no-repeat}.dalsi_obrazek{position:absolute;z-index:1;width:33%;height:100%;left:67%;top:0}.dalsi_obrazek:hover{background-image:url(/static/galerie/prvky/dalsi.svg);-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));background-position:100%;background-repeat:no-repeat}.galerie{position:relative;margin:20px auto 0 auto}.galerie,.galerie h1{text-align:center}.galerie_hlavicka{margin:30px auto 30px auto}.popis{margin:10px 10px 30px 0}#nahoru,.popis{text-align:center}.galerie_nahledy{margin:auto;padding:10px;text-align:center;overflow:auto}.galerie_nahledy img{margin:10px}.galerie_nahledy div.navigace{display:inline-block}.galerie_nahled,.podgalerie_nahled{display:block;position:relative;float:left;width:200px;height:200px;text-align:center;border:solid;border-width:1px;border-radius:4px;border-color:#f9d59e;background-color:#fffbf6;white-space:nowrap;margin:10px;font-weight:700}.galerie_nahled:hover,.podgalerie_nahled:hover{background-color:#f9d59e;-webkit-filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));filter:drop-shadow(0 5px 5px rgba(0,0,0,.4));color:#6f2509}.vystredeno{display:inline-block;height:100%;vertical-align:middle}.galerie_nahled img{vertical-align:middle;max-height:180px;max-width:180px}.galerie_nahled div{position:absolute;bottom:0;width:100%;text-align:center}.podgalerie_nahled img{margin-top:20px;margin-bottom:15px;max-height:125px;max-width:167px}.podgalerie_nahled .nazev_galerie{position:absolute;width:100%;top:160px}.mam-org-only-galerie{background:#eee4ec;padding:10px;margin:10px 10px 10px -20px;border:2px dashed #333;float:left}.mam-org-only-galerie a{padding:3px 5px;margin:5px;border-radius:20px;background-color:#6f2509;color:#fffbf6;float:left}.galerie_predchozi_nasledujici{overflow:auto;margin:10px auto 10px auto}.galerie_predchozi_nasledujici .predchozi{float:left}.galerie_predchozi_nasledujici .nasledujici{float:right}ul.form{list-style-type:none;padding-left:0}label.field-label{font-weight:400}label.field-required{font-weight:700}.field-error{font-size:14px;color:red}ul.form li{margin-bottom:3px}p.gdpr{margin-bottom:.66em}div.gdpr,p.gdpr{font-size:6pt}.jakresit img{width:33%;padding:10px;-webkit-filter:none;filter:none}@media(max-width:860px){.jakresit img{margin:auto;display:grid;width:100%;max-width:360px}} \ No newline at end of file diff --git a/seminar/static/seminar/vue/fonts/OpenSans-Regular.ttf b/seminar/static/seminar/vue/fonts/OpenSans-Regular.ttf deleted file mode 100644 index db433349..00000000 Binary files a/seminar/static/seminar/vue/fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/seminar/static/seminar/vue/img/mozaika-footer.svg b/seminar/static/seminar/vue/img/mozaika-footer.svg deleted file mode 100644 index f7be05be..00000000 --- a/seminar/static/seminar/vue/img/mozaika-footer.svg +++ /dev/null @@ -1,660 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/seminar/static/seminar/vue/img/vikendovka.jpg b/seminar/static/seminar/vue/img/vikendovka.jpg deleted file mode 100644 index 2f53cbef..00000000 Binary files a/seminar/static/seminar/vue/img/vikendovka.jpg and /dev/null differ diff --git a/seminar/static/seminar/vue/js/chunk-vendors.js b/seminar/static/seminar/vue/js/chunk-vendors.js deleted file mode 100644 index 54026fb8..00000000 --- a/seminar/static/seminar/vue/js/chunk-vendors.js +++ /dev/null @@ -1,22 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00ee":function(t,e,n){var i=n("b622"),o=i("toStringTag"),r={};r[o]="z",t.exports="[object z]"===String(r)},"0366":function(t,e,n){var i=n("1c0b");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},"06cf":function(t,e,n){var i=n("83ab"),o=n("d1e7"),r=n("5c6c"),s=n("fc6a"),a=n("c04e"),c=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;e.f=i?u:function(t,e){if(t=s(t),e=a(e,!0),l)try{return u(t,e)}catch(n){}if(c(t,e))return r(!o.f.call(t,e),t[e])}},"0a06":function(t,e,n){"use strict";var i=n("c532"),o=n("30b5"),r=n("f6b4"),s=n("5270"),a=n("4a7b");function c(t){this.defaults=t,this.interceptors={request:new r,response:new r}}c.prototype.request=function(t){"string"===typeof t?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=a(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));while(e.length)n=n.then(e.shift(),e.shift());return n},c.prototype.getUri=function(t){return t=a(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(t){c.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}})),i.forEach(["post","put","patch"],(function(t){c.prototype[t]=function(e,n,o){return this.request(i.merge(o||{},{method:t,url:e,data:n}))}})),t.exports=c},"0cfb":function(t,e,n){var i=n("83ab"),o=n("d039"),r=n("cc12");t.exports=!i&&!o((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"0df6":function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},1276:function(t,e,n){"use strict";var i=n("d784"),o=n("44e7"),r=n("825a"),s=n("1d80"),a=n("4840"),c=n("8aa5"),l=n("50c4"),u=n("14c3"),d=n("9263"),h=n("d039"),f=[].push,p=Math.min,m=4294967295,g=!h((function(){return!RegExp(m,"y")}));i("split",2,(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(s(this)),r=void 0===n?m:n>>>0;if(0===r)return[];if(void 0===t)return[i];if(!o(t))return e.call(i,t,r);var a,c,l,u=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,g=new RegExp(t.source,h+"g");while(a=d.call(g,i)){if(c=g.lastIndex,c>p&&(u.push(i.slice(p,a.index)),a.length>1&&a.index=r))break;g.lastIndex===a.index&&g.lastIndex++}return p===i.length?!l&&g.test("")||u.push(""):u.push(i.slice(p)),u.length>r?u.slice(0,r):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=s(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,o,n):i.call(String(o),e,n)},function(t,o){var s=n(i,t,this,o,i!==e);if(s.done)return s.value;var d=r(t),h=String(this),f=a(d,RegExp),b=d.unicode,w=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(g?"y":"g"),v=new f(g?d:"^(?:"+d.source+")",w),_=void 0===o?m:o>>>0;if(0===_)return[];if(0===h.length)return null===u(v,h)?[h]:[];var k=0,y=0,x=[];while(yp;p++)if(g=u?v(i(w=t[p])[0],w[1]):v(t[p]),g&&g instanceof l)return g;return new l(!1)}h=f.call(t)}b=h.next;while(!(w=b.call(h)).done)if(g=c(h,v,w.value,u),"object"==typeof g&&g&&g instanceof l)return g;return new l(!1)};u.stop=function(t){return new l(!0,t)}},"23cb":function(t,e,n){var i=n("a691"),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},"23e7":function(t,e,n){var i=n("da84"),o=n("06cf").f,r=n("9112"),s=n("6eeb"),a=n("ce4e"),c=n("e893"),l=n("94ca");t.exports=function(t,e){var n,u,d,h,f,p,m=t.target,g=t.global,b=t.stat;if(u=g?i:b?i[m]||a(m,{}):(i[m]||{}).prototype,u)for(d in e){if(f=e[d],t.noTargetGet?(p=o(u,d),h=p&&p.value):h=u[d],n=l(g?d:m+(b?".":"#")+d,t.forced),!n&&void 0!==h){if(typeof f===typeof h)continue;c(f,h)}(t.sham||h&&h.sham)&&r(f,"sham",!0),s(u,d,f,t)}}},"241c":function(t,e,n){var i=n("ca84"),o=n("7839"),r=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},2444:function(t,e,n){"use strict";(function(e){var i=n("c532"),o=n("c8af"),r={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function a(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof e&&"[object process]"===Object.prototype.toString.call(e))&&(t=n("b50d")),t}var c={adapter:a(),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){c.headers[t]=i.merge(r)})),t.exports=c}).call(this,n("4362"))},2626:function(t,e,n){"use strict";var i=n("d066"),o=n("9bf2"),r=n("b622"),s=n("83ab"),a=r("species");t.exports=function(t){var e=i(t),n=o.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},2877:function(t,e,n){"use strict";function i(t,e,n,i,o,r,s,a){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}n.d(e,"a",(function(){return i}))},"2b0e":function(t,e,n){"use strict";(function(t){ -/*! - * Vue.js v2.6.11 - * (c) 2014-2019 Evan You - * Released under the MIT License. - */ -var n=Object.freeze({});function i(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function r(t){return!0===t}function s(t){return!1===t}function a(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var l=Object.prototype.toString;function u(t){return"[object Object]"===l.call(t)}function d(t){return"[object RegExp]"===l.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function p(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),i=t.split(","),o=0;o-1)return t.splice(n,1)}}var v=Object.prototype.hasOwnProperty;function _(t,e){return v.call(t,e)}function k(t){var e=Object.create(null);return function(n){var i=e[n];return i||(e[n]=t(n))}}var y=/-(\w)/g,x=k((function(t){return t.replace(y,(function(t,e){return e?e.toUpperCase():""}))})),A=k((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,T=k((function(t){return t.replace(C,"-$1").toLowerCase()}));function S(t,e){function n(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function P(t,e){return t.bind(e)}var E=Function.prototype.bind?P:S;function M(t,e){e=e||0;var n=t.length-e,i=new Array(n);while(n--)i[n]=t[n+e];return i}function I(t,e){for(var n in e)t[n]=e[n];return t}function O(t){for(var e={},n=0;n0,nt=X&&X.indexOf("edge/")>0,it=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===Z),ot=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),rt={}.watch,st=!1;if(K)try{var at={};Object.defineProperty(at,"passive",{get:function(){st=!0}}),window.addEventListener("test-passive",null,at)}catch(xs){}var ct=function(){return void 0===G&&(G=!K&&!J&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),G},lt=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ut(t){return"function"===typeof t&&/native code/.test(t.toString())}var dt,ht="undefined"!==typeof Symbol&&ut(Symbol)&&"undefined"!==typeof Reflect&&ut(Reflect.ownKeys);dt="undefined"!==typeof Set&&ut(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ft=N,pt=0,mt=function(){this.id=pt++,this.subs=[]};mt.prototype.addSub=function(t){this.subs.push(t)},mt.prototype.removeSub=function(t){w(this.subs,t)},mt.prototype.depend=function(){mt.target&&mt.target.addDep(this)},mt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(r&&!_(o,"default"))s=!1;else if(""===s||s===T(t)){var c=te(String,o.type);(c<0||a0&&(s=Se(s,(e||"")+"_"+n),Te(s[0])&&Te(l)&&(u[c]=yt(l.text+s[0].text),s.shift()),u.push.apply(u,s)):a(s)?Te(l)?u[c]=yt(l.text+s):""!==s&&u.push(yt(s)):Te(s)&&Te(l)?u[c]=yt(l.text+s.text):(r(t._isVList)&&o(s.tag)&&i(s.key)&&o(e)&&(s.key="__vlist"+e+"_"+n+"__"),u.push(s)));return u}function Pe(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function Ee(t){var e=Me(t.$options.inject,t);e&&(Et(!1),Object.keys(e).forEach((function(n){Rt(t,n,e[n])})),Et(!0))}function Me(t,e){if(t){for(var n=Object.create(null),i=ht?Reflect.ownKeys(t):Object.keys(t),o=0;o0,s=t?!!t.$stable:!r,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&i&&i!==n&&a===i.$key&&!r&&!i.$hasNormal)return i;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Re(e,c,t[c]))}else o={};for(var l in e)l in o||(o[l]=je(e,l));return t&&Object.isExtensible(t)&&(t._normalized=o),q(o,"$stable",s),q(o,"$key",a),q(o,"$hasNormal",r),o}function Re(t,e,n){var i=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ce(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:i,enumerable:!0,configurable:!0}),i}function je(t,e){return function(){return t[e]}}function De(t,e){var n,i,r,s,a;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),i=0,r=t.length;i1?M(n):n;for(var i=M(arguments,1),o='event handler for "'+t+'"',r=0,s=n.length;rdocument.createEvent("Event").timeStamp&&(Gn=function(){return Qn.now()})}function Kn(){var t,e;for(Yn=Gn(),Hn=!0,Bn.sort((function(t,e){return t.id-e.id})),qn=0;qnqn&&Bn[n].id>t.id)n--;Bn.splice(n+1,0,t)}else Bn.push(t);$n||($n=!0,pe(Kn))}}var ei=0,ni=function(t,e,n,i,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync,this.before=i.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++ei,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new dt,this.newDepIds=new dt,this.expression="","function"===typeof e?this.getter=e:(this.getter=Y(e),this.getter||(this.getter=N)),this.value=this.lazy?void 0:this.get()};ni.prototype.get=function(){var t;bt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(xs){if(!this.user)throw xs;ee(xs,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ge(t),wt(),this.cleanupDeps()}return t},ni.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},ni.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},ni.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():ti(this)},ni.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(xs){ee(xs,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},ni.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ni.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},ni.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||w(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var ii={enumerable:!0,configurable:!0,get:N,set:N};function oi(t,e,n){ii.get=function(){return this[e][n]},ii.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ii)}function ri(t){t._watchers=[];var e=t.$options;e.props&&si(t,e.props),e.methods&&pi(t,e.methods),e.data?ai(t):Nt(t._data={},!0),e.computed&&ui(t,e.computed),e.watch&&e.watch!==rt&&mi(t,e.watch)}function si(t,e){var n=t.$options.propsData||{},i=t._props={},o=t.$options._propKeys=[],r=!t.$parent;r||Et(!1);var s=function(r){o.push(r);var s=Kt(r,e,n,t);Rt(i,r,s),r in t||oi(t,"_props",r)};for(var a in e)s(a);Et(!0)}function ai(t){var e=t.$options.data;e=t._data="function"===typeof e?ci(e,t):e||{},u(e)||(e={});var n=Object.keys(e),i=t.$options.props,o=(t.$options.methods,n.length);while(o--){var r=n[o];0,i&&_(i,r)||H(r)||oi(t,"_data",r)}Nt(e,!0)}function ci(t,e){bt();try{return t.call(e,e)}catch(xs){return ee(xs,e,"data()"),{}}finally{wt()}}var li={lazy:!0};function ui(t,e){var n=t._computedWatchers=Object.create(null),i=ct();for(var o in e){var r=e[o],s="function"===typeof r?r:r.get;0,i||(n[o]=new ni(t,s||N,N,li)),o in t||di(t,o,r)}}function di(t,e,n){var i=!ct();"function"===typeof n?(ii.get=i?hi(e):fi(n),ii.set=N):(ii.get=n.get?i&&!1!==n.cache?hi(e):fi(n.get):N,ii.set=n.set||N),Object.defineProperty(t,e,ii)}function hi(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function fi(t){return function(){return t.call(this,this)}}function pi(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?N:E(e[n],t)}function mi(t,e){for(var n in e){var i=e[n];if(Array.isArray(i))for(var o=0;o-1)return this;var n=M(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Ci(t){t.mixin=function(t){return this.options=Gt(this.options,t),this}}function Ti(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,i=n.cid,o=t._Ctor||(t._Ctor={});if(o[i])return o[i];var r=t.name||n.options.name;var s=function(t){this._init(t)};return s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.cid=e++,s.options=Gt(n.options,t),s["super"]=n,s.options.props&&Si(s),s.options.computed&&Pi(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,B.forEach((function(t){s[t]=n[t]})),r&&(s.options.components[r]=s),s.superOptions=n.options,s.extendOptions=t,s.sealedOptions=I({},s.options),o[i]=s,s}}function Si(t){var e=t.options.props;for(var n in e)oi(t.prototype,"_props",n)}function Pi(t){var e=t.options.computed;for(var n in e)di(t.prototype,n,e[n])}function Ei(t){B.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function Mi(t){return t&&(t.Ctor.options.name||t.tag)}function Ii(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function Oi(t,e){var n=t.cache,i=t.keys,o=t._vnode;for(var r in n){var s=n[r];if(s){var a=Mi(s.componentOptions);a&&!e(a)&&Ni(n,r,i,o)}}}function Ni(t,e,n,i){var o=t[e];!o||i&&o.tag===i.tag||o.componentInstance.$destroy(),t[e]=null,w(n,e)}vi(xi),bi(xi),En(xi),Nn(xi),wn(xi);var Ri=[String,RegExp,Array],ji={name:"keep-alive",abstract:!0,props:{include:Ri,exclude:Ri,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ni(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){Oi(t,(function(t){return Ii(e,t)}))})),this.$watch("exclude",(function(e){Oi(t,(function(t){return!Ii(e,t)}))}))},render:function(){var t=this.$slots.default,e=xn(t),n=e&&e.componentOptions;if(n){var i=Mi(n),o=this,r=o.include,s=o.exclude;if(r&&(!i||!Ii(r,i))||s&&i&&Ii(s,i))return e;var a=this,c=a.cache,l=a.keys,u=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[u]?(e.componentInstance=c[u].componentInstance,w(l,u),l.push(u)):(c[u]=e,l.push(u),this.max&&l.length>parseInt(this.max)&&Ni(c,l[0],l,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Di={KeepAlive:ji};function Li(t){var e={get:function(){return U}};Object.defineProperty(t,"config",e),t.util={warn:ft,extend:I,mergeOptions:Gt,defineReactive:Rt},t.set=jt,t.delete=Dt,t.nextTick=pe,t.observable=function(t){return Nt(t),t},t.options=Object.create(null),B.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,I(t.options.components,Di),Ai(t),Ci(t),Ti(t),Ei(t)}Li(xi),Object.defineProperty(xi.prototype,"$isServer",{get:ct}),Object.defineProperty(xi.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(xi,"FunctionalRenderContext",{value:Je}),xi.version="2.6.11";var Vi=g("style,class"),zi=g("input,textarea,option,select,progress"),Bi=function(t,e,n){return"value"===n&&zi(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Fi=g("contenteditable,draggable,spellcheck"),Ui=g("events,caret,typing,plaintext-only"),$i=function(t,e){return Gi(e)||"false"===e?"false":"contenteditable"===t&&Ui(e)?e:"true"},Hi=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),qi="http://www.w3.org/1999/xlink",Wi=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Yi=function(t){return Wi(t)?t.slice(6,t.length):""},Gi=function(t){return null==t||!1===t};function Qi(t){var e=t.data,n=t,i=t;while(o(i.componentInstance))i=i.componentInstance._vnode,i&&i.data&&(e=Ki(i.data,e));while(o(n=n.parent))n&&n.data&&(e=Ki(e,n.data));return Ji(e.staticClass,e.class)}function Ki(t,e){return{staticClass:Zi(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Ji(t,e){return o(t)||o(e)?Zi(t,Xi(e)):""}function Zi(t,e){return t?e?t+" "+e:t:e||""}function Xi(t){return Array.isArray(t)?to(t):c(t)?eo(t):"string"===typeof t?t:""}function to(t){for(var e,n="",i=0,r=t.length;i-1?ao[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ao[t]=/HTMLUnknownElement/.test(e.toString())}var lo=g("text,number,password,search,email,tel,url");function uo(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function ho(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function fo(t,e){return document.createElementNS(no[t],e)}function po(t){return document.createTextNode(t)}function mo(t){return document.createComment(t)}function go(t,e,n){t.insertBefore(e,n)}function bo(t,e){t.removeChild(e)}function wo(t,e){t.appendChild(e)}function vo(t){return t.parentNode}function _o(t){return t.nextSibling}function ko(t){return t.tagName}function yo(t,e){t.textContent=e}function xo(t,e){t.setAttribute(e,"")}var Ao=Object.freeze({createElement:ho,createElementNS:fo,createTextNode:po,createComment:mo,insertBefore:go,removeChild:bo,appendChild:wo,parentNode:vo,nextSibling:_o,tagName:ko,setTextContent:yo,setStyleScope:xo}),Co={create:function(t,e){To(e)},update:function(t,e){t.data.ref!==e.data.ref&&(To(t,!0),To(e))},destroy:function(t){To(t,!0)}};function To(t,e){var n=t.data.ref;if(o(n)){var i=t.context,r=t.componentInstance||t.elm,s=i.$refs;e?Array.isArray(s[n])?w(s[n],r):s[n]===r&&(s[n]=void 0):t.data.refInFor?Array.isArray(s[n])?s[n].indexOf(r)<0&&s[n].push(r):s[n]=[r]:s[n]=r}}var So=new vt("",{},[]),Po=["create","activate","update","remove","destroy"];function Eo(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&Mo(t,e)||r(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&i(e.asyncFactory.error))}function Mo(t,e){if("input"!==t.tag)return!0;var n,i=o(n=t.data)&&o(n=n.attrs)&&n.type,r=o(n=e.data)&&o(n=n.attrs)&&n.type;return i===r||lo(i)&&lo(r)}function Io(t,e,n){var i,r,s={};for(i=e;i<=n;++i)r=t[i].key,o(r)&&(s[r]=i);return s}function Oo(t){var e,n,s={},c=t.modules,l=t.nodeOps;for(e=0;em?(d=i(n[w+1])?null:n[w+1].elm,x(t,d,n,p,w,r)):p>w&&C(e,h,m)}function P(t,e,n,i){for(var r=n;r-1?$o(t,e,n):Hi(e)?Gi(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Fi(e)?t.setAttribute(e,$i(e,n)):Wi(e)?Gi(n)?t.removeAttributeNS(qi,Yi(e)):t.setAttributeNS(qi,e,n):$o(t,e,n)}function $o(t,e,n){if(Gi(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var i=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",i)};t.addEventListener("input",i),t.__ieph=!0}t.setAttribute(e,n)}}var Ho={create:Fo,update:Fo};function qo(t,e){var n=e.elm,r=e.data,s=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(s)||i(s.staticClass)&&i(s.class)))){var a=Qi(e),c=n._transitionClasses;o(c)&&(a=Zi(a,Xi(c))),a!==n._prevClass&&(n.setAttribute("class",a),n._prevClass=a)}}var Wo,Yo={create:qo,update:qo},Go="__r",Qo="__c";function Ko(t){if(o(t[Go])){var e=tt?"change":"input";t[e]=[].concat(t[Go],t[e]||[]),delete t[Go]}o(t[Qo])&&(t.change=[].concat(t[Qo],t.change||[]),delete t[Qo])}function Jo(t,e,n){var i=Wo;return function o(){var r=e.apply(null,arguments);null!==r&&tr(t,o,n,i)}}var Zo=se&&!(ot&&Number(ot[1])<=53);function Xo(t,e,n,i){if(Zo){var o=Yn,r=e;e=r._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return r.apply(this,arguments)}}Wo.addEventListener(t,e,st?{capture:n,passive:i}:n)}function tr(t,e,n,i){(i||Wo).removeEventListener(t,e._wrapper||e,n)}function er(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Wo=e.elm,Ko(n),_e(n,o,Xo,tr,Jo,e.context),Wo=void 0}}var nr,ir={create:er,update:er};function or(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,s=e.elm,a=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=I({},c)),a)n in c||(s[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===a[n])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===n&&"PROGRESS"!==s.tagName){s._value=r;var l=i(r)?"":String(r);rr(s,l)&&(s.value=l)}else if("innerHTML"===n&&oo(s.tagName)&&i(s.innerHTML)){nr=nr||document.createElement("div"),nr.innerHTML=""+r+"";var u=nr.firstChild;while(s.firstChild)s.removeChild(s.firstChild);while(u.firstChild)s.appendChild(u.firstChild)}else if(r!==a[n])try{s[n]=r}catch(xs){}}}}function rr(t,e){return!t.composing&&("OPTION"===t.tagName||sr(t,e)||ar(t,e))}function sr(t,e){var n=!0;try{n=document.activeElement!==t}catch(xs){}return n&&t.value!==e}function ar(t,e){var n=t.value,i=t._vModifiers;if(o(i)){if(i.number)return m(n)!==m(e);if(i.trim)return n.trim()!==e.trim()}return n!==e}var cr={create:or,update:or},lr=k((function(t){var e={},n=/;(?![^(]*\))/g,i=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(i);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function ur(t){var e=dr(t.style);return t.staticStyle?I(t.staticStyle,e):e}function dr(t){return Array.isArray(t)?O(t):"string"===typeof t?lr(t):t}function hr(t,e){var n,i={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=ur(o.data))&&I(i,n)}(n=ur(t.data))&&I(i,n);var r=t;while(r=r.parent)r.data&&(n=ur(r.data))&&I(i,n);return i}var fr,pr=/^--/,mr=/\s*!important$/,gr=function(t,e,n){if(pr.test(e))t.style.setProperty(e,n);else if(mr.test(n))t.style.setProperty(T(e),n.replace(mr,""),"important");else{var i=wr(e);if(Array.isArray(n))for(var o=0,r=n.length;o-1?e.split(kr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function xr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(kr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",i=" "+e+" ";while(n.indexOf(i)>=0)n=n.replace(i," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function Ar(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&I(e,Cr(t.name||"v")),I(e,t),e}return"string"===typeof t?Cr(t):void 0}}var Cr=k((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Tr=K&&!et,Sr="transition",Pr="animation",Er="transition",Mr="transitionend",Ir="animation",Or="animationend";Tr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Er="WebkitTransition",Mr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ir="WebkitAnimation",Or="webkitAnimationEnd"));var Nr=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Rr(t){Nr((function(){Nr(t)}))}function jr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),yr(t,e))}function Dr(t,e){t._transitionClasses&&w(t._transitionClasses,e),xr(t,e)}function Lr(t,e,n){var i=zr(t,e),o=i.type,r=i.timeout,s=i.propCount;if(!o)return n();var a=o===Sr?Mr:Or,c=0,l=function(){t.removeEventListener(a,u),n()},u=function(e){e.target===t&&++c>=s&&l()};setTimeout((function(){c0&&(n=Sr,u=s,d=r.length):e===Pr?l>0&&(n=Pr,u=l,d=c.length):(u=Math.max(s,l),n=u>0?s>l?Sr:Pr:null,d=n?n===Sr?r.length:c.length:0);var h=n===Sr&&Vr.test(i[Er+"Property"]);return{type:n,timeout:u,propCount:d,hasTransform:h}}function Br(t,e){while(t.length1}function Wr(t,e){!0!==e.data.show&&Ur(e)}var Yr=K?{create:Wr,activate:Wr,remove:function(t,e){!0!==t.data.show?$r(t,e):e()}}:{},Gr=[Ho,Yo,ir,cr,_r,Yr],Qr=Gr.concat(Bo),Kr=Oo({nodeOps:Ao,modules:Qr});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&os(t,"input")}));var Jr={inserted:function(t,e,n,i){"select"===n.tag?(i.elm&&!i.elm._vOptions?ke(n,"postpatch",(function(){Jr.componentUpdated(t,e,n)})):Zr(t,e,n.context),t._vOptions=[].map.call(t.options,es)):("textarea"===n.tag||lo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",ns),t.addEventListener("compositionend",is),t.addEventListener("change",is),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Zr(t,e,n.context);var i=t._vOptions,o=t._vOptions=[].map.call(t.options,es);if(o.some((function(t,e){return!D(t,i[e])}))){var r=t.multiple?e.value.some((function(t){return ts(t,o)})):e.value!==e.oldValue&&ts(e.value,o);r&&os(t,"change")}}}};function Zr(t,e,n){Xr(t,e,n),(tt||nt)&&setTimeout((function(){Xr(t,e,n)}),0)}function Xr(t,e,n){var i=e.value,o=t.multiple;if(!o||Array.isArray(i)){for(var r,s,a=0,c=t.options.length;a-1,s.selected!==r&&(s.selected=r);else if(D(es(s),i))return void(t.selectedIndex!==a&&(t.selectedIndex=a));o||(t.selectedIndex=-1)}}function ts(t,e){return e.every((function(e){return!D(e,t)}))}function es(t){return"_value"in t?t._value:t.value}function ns(t){t.target.composing=!0}function is(t){t.target.composing&&(t.target.composing=!1,os(t.target,"input"))}function os(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function rs(t){return!t.componentInstance||t.data&&t.data.transition?t:rs(t.componentInstance._vnode)}var ss={bind:function(t,e,n){var i=e.value;n=rs(n);var o=n.data&&n.data.transition,r=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;i&&o?(n.data.show=!0,Ur(n,(function(){t.style.display=r}))):t.style.display=i?r:"none"},update:function(t,e,n){var i=e.value,o=e.oldValue;if(!i!==!o){n=rs(n);var r=n.data&&n.data.transition;r?(n.data.show=!0,i?Ur(n,(function(){t.style.display=t.__vOriginalDisplay})):$r(n,(function(){t.style.display="none"}))):t.style.display=i?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,i,o){o||(t.style.display=t.__vOriginalDisplay)}},as={model:Jr,show:ss},cs={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ls(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ls(xn(e.children)):t}function us(t){var e={},n=t.$options;for(var i in n.propsData)e[i]=t[i];var o=n._parentListeners;for(var r in o)e[x(r)]=o[r];return e}function ds(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function hs(t){while(t=t.parent)if(t.data.transition)return!0}function fs(t,e){return e.key===t.key&&e.tag===t.tag}var ps=function(t){return t.tag||yn(t)},ms=function(t){return"show"===t.name},gs={name:"transition",props:cs,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ps),n.length)){0;var i=this.mode;0;var o=n[0];if(hs(this.$vnode))return o;var r=ls(o);if(!r)return o;if(this._leaving)return ds(t,o);var s="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?s+"comment":s+r.tag:a(r.key)?0===String(r.key).indexOf(s)?r.key:s+r.key:r.key;var c=(r.data||(r.data={})).transition=us(this),l=this._vnode,u=ls(l);if(r.data.directives&&r.data.directives.some(ms)&&(r.data.show=!0),u&&u.data&&!fs(r,u)&&!yn(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=I({},c);if("out-in"===i)return this._leaving=!0,ke(d,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ds(t,o);if("in-out"===i){if(yn(r))return l;var h,f=function(){h()};ke(c,"afterEnter",f),ke(c,"enterCancelled",f),ke(d,"delayLeave",(function(t){h=t}))}}return o}}},bs=I({tag:String,moveClass:String},cs);delete bs.mode;var ws={props:bs,beforeMount:function(){var t=this,e=this._update;this._update=function(n,i){var o=In(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,i)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,o=this.$slots.default||[],r=this.children=[],s=us(this),a=0;an)e.push(arguments[n++]);return _[++v]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(v),v},m=function(t){delete _[t]},"process"==c(g)?i=function(t){g.nextTick(x(t))}:w&&w.now?i=function(t){w.now(x(t))}:b&&!h?(o=new b,r=o.port2,o.port1.onmessage=A,i=l(r.postMessage,r,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(C)||"file:"===f.protocol?i=k in d("script")?function(t){u.appendChild(d("script"))[k]=function(){u.removeChild(this),y(t)}}:function(t){setTimeout(x(t),0)}:(i=C,s.addEventListener("message",A,!1))),t.exports={set:p,clear:m}},"2d00":function(t,e,n){var i,o,r=n("da84"),s=n("342f"),a=r.process,c=a&&a.versions,l=c&&c.v8;l?(i=l.split("."),o=i[0]+i[1]):s&&(i=s.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/),i&&(o=i[1]))),t.exports=o&&+o},"2d83":function(t,e,n){"use strict";var i=n("387f");t.exports=function(t,e,n,o,r){var s=new Error(t);return i(s,e,n,o,r)}},"2e67":function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},"30b5":function(t,e,n){"use strict";var i=n("c532");function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(i.isURLSearchParams(e))r=e.toString();else{var s=[];i.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(i.isArray(t)?e+="[]":t=[t],i.forEach(t,(function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))})))})),r=s.join("&")}if(r){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t}},"342f":function(t,e,n){var i=n("d066");t.exports=i("navigator","userAgent")||""},"35a1":function(t,e,n){var i=n("f5df"),o=n("3f8c"),r=n("b622"),s=r("iterator");t.exports=function(t){if(void 0!=t)return t[s]||t["@@iterator"]||o[i(t)]}},3730:function(t,e,n){ -/*! - * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ -!function(e,n){t.exports=n()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},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=2)}([function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(1))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);var i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},o=n(0),r="object"==typeof self&&self&&self.Object===Object&&self,s=o.a||r||Function("return this")(),a=function(){return s.Date.now()},c=s.Symbol,l=Object.prototype,u=l.hasOwnProperty,d=l.toString,h=c?c.toStringTag:void 0,f=function(t){var e=u.call(t,h),n=t[h];try{t[h]=void 0;var i=!0}catch(t){}var o=d.call(t);return i&&(e?t[h]=n:delete t[h]),o},p=Object.prototype.toString,m=function(t){return p.call(t)},g="[object Null]",b="[object Undefined]",w=c?c.toStringTag:void 0,v=function(t){return null==t?void 0===t?b:g:w&&w in Object(t)?f(t):m(t)},_=function(t){return null!=t&&"object"==typeof t},k="[object Symbol]",y=function(t){return"symbol"==typeof t||_(t)&&v(t)==k},x=NaN,A=/^\s+|\s+$/g,C=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=parseInt,E=function(t){if("number"==typeof t)return t;if(y(t))return x;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(A,"");var n=T.test(t);return n||S.test(t)?P(t.slice(2),n?2:8):C.test(t)?x:+t},M="Expected a function",I=Math.max,O=Math.min,N=function(t,e,n){var o,r,s,c,l,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError(M);function m(e){var n=o,i=r;return o=r=void 0,d=e,c=t.apply(i,n)}function g(t){var n=t-u;return void 0===u||n>=e||n<0||f&&t-d>=s}function b(){var t=a();if(g(t))return w(t);l=setTimeout(b,function(t){var n=e-(t-u);return f?O(n,s-(t-d)):n}(t))}function w(t){return l=void 0,p&&o?m(t):(o=r=void 0,c)}function v(){var t=a(),n=g(t);if(o=arguments,r=this,u=t,n){if(void 0===l)return function(t){return d=t,l=setTimeout(b,e),h?m(t):c}(u);if(f)return clearTimeout(l),l=setTimeout(b,e),m(u)}return void 0===l&&(l=setTimeout(b,e)),c}return e=E(e)||0,i(n)&&(h=!!n.leading,s=(f="maxWait"in n)?I(E(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==l&&clearTimeout(l),d=0,o=u=r=l=void 0},v.flush=function(){return void 0===l?c:w(a())},v},R={name:"ckeditor",render(t){return t(this.tagName)},props:{editor:{type:Function,default:null},value:{type:String,default:""},config:{type:Object,default:()=>({})},tagName:{type:String,default:"div"},disabled:{type:Boolean,default:!1}},data:()=>({instance:null,$_lastEditorData:{type:String,default:""}}),mounted(){const t=Object.assign({},this.config);this.value&&(t.initialData=this.value),this.editor.create(this.$el,t).then(t=>{this.instance=t,t.isReadOnly=this.disabled,this.$_setUpEditorEvents(),this.$emit("ready",t)}).catch(t=>{console.error(t)})},beforeDestroy(){this.instance&&(this.instance.destroy(),this.instance=null),this.$emit("destroy",this.instance)},watch:{value(t,e){t!==e&&t!==this.$_lastEditorData&&this.instance.setData(t)},disabled(t){this.instance.isReadOnly=t}},methods:{$_setUpEditorEvents(){const t=this.instance;t.model.document.on("change:data",N(e=>{const n=this.$_lastEditorData=t.getData();this.$emit("input",n,e,t)},300)),t.editing.view.document.on("focus",e=>{this.$emit("focus",e,t)}),t.editing.view.document.on("blur",e=>{this.$emit("blur",e,t)})}}};const j={install(t){t.component("ckeditor",R)},component:R};e.default=j}]).default}))},"37e8":function(t,e,n){var i=n("83ab"),o=n("9bf2"),r=n("825a"),s=n("df75");t.exports=i?Object.defineProperties:function(t,e){r(t);var n,i=s(e),a=i.length,c=0;while(a>c)o.f(t,n=i[c++],e[n]);return t}},"387f":function(t,e,n){"use strict";t.exports=function(t,e,n,i,o){return t.config=e,n&&(t.code=n),t.request=i,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},3934:function(t,e,n){"use strict";var i=n("c532");t.exports=i.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var i=t;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=i.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return function(){return!0}}()},"3bbe":function(t,e,n){var i=n("861d");t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3f8c":function(t,e){t.exports={}},"428f":function(t,e,n){var i=n("da84");t.exports=i},4362:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,i="/";e.cwd=function(){return i},e.chdir=function(e){t||(t=n("df7c")),i=t.resolve(e,i)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,n){var i=n("d039"),o=n("c6b6"),r="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?r.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var i=n("b622"),o=n("7c73"),r=n("9bf2"),s=i("unscopables"),a=Array.prototype;void 0==a[s]&&r.f(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},"44de":function(t,e,n){var i=n("da84");t.exports=function(t,e){var n=i.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"44e7":function(t,e,n){var i=n("861d"),o=n("c6b6"),r=n("b622"),s=r("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[s])?!!e:"RegExp"==o(t))}},"467f":function(t,e,n){"use strict";var i=n("2d83");t.exports=function(t,e,n){var o=n.config.validateStatus;!o||o(n.status)?t(n):e(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},4840:function(t,e,n){var i=n("825a"),o=n("1c0b"),r=n("b622"),s=r("species");t.exports=function(t,e){var n,r=i(t).constructor;return void 0===r||void 0==(n=i(r)[s])?e:o(n)}},4930:function(t,e,n){var i=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},"498a":function(t,e,n){"use strict";var i=n("23e7"),o=n("58a8").trim,r=n("c8d2");i({target:"String",proto:!0,forced:r("trim")},{trim:function(){return o(this)}})},"4a7b":function(t,e,n){"use strict";var i=n("c532");t.exports=function(t,e){e=e||{};var n={},o=["url","method","params","data"],r=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(o,(function(t){"undefined"!==typeof e[t]&&(n[t]=e[t])})),i.forEach(r,(function(o){i.isObject(e[o])?n[o]=i.deepMerge(t[o],e[o]):"undefined"!==typeof e[o]?n[o]=e[o]:i.isObject(t[o])?n[o]=i.deepMerge(t[o]):"undefined"!==typeof t[o]&&(n[o]=t[o])})),i.forEach(s,(function(i){"undefined"!==typeof e[i]?n[i]=e[i]:"undefined"!==typeof t[i]&&(n[i]=t[i])}));var a=o.concat(r).concat(s),c=Object.keys(e).filter((function(t){return-1===a.indexOf(t)}));return i.forEach(c,(function(i){"undefined"!==typeof e[i]?n[i]=e[i]:"undefined"!==typeof t[i]&&(n[i]=t[i])})),n}},"4d64":function(t,e,n){var i=n("fc6a"),o=n("50c4"),r=n("23cb"),s=function(t){return function(e,n,s){var a,c=i(e),l=o(c.length),u=r(s,l);if(t&&n!=n){while(l>u)if(a=c[u++],a!=a)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"50c4":function(t,e,n){var i=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5270:function(t,e,n){"use strict";var i=n("c532"),o=n("c401"),r=n("2e67"),s=n("2444");function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){a(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]}));var e=t.adapter||s.adapter;return e(t).then((function(e){return a(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return r(e)||(a(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},5692:function(t,e,n){var i=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var i=n("d066"),o=n("241c"),r=n("7418"),s=n("825a");t.exports=i("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=r.f;return n?e.concat(n(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var i=n("1d80"),o=n("5899"),r="["+o+"]",s=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),c=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(s,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"60da":function(t,e,n){"use strict";var i=n("83ab"),o=n("d039"),r=n("df75"),s=n("7418"),a=n("d1e7"),c=n("7b0b"),l=n("44ad"),u=Object.assign,d=Object.defineProperty;t.exports=!u||o((function(){if(i&&1!==u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||r(u({},e)).join("")!=o}))?function(t,e){var n=c(t),o=arguments.length,u=1,d=s.f,h=a.f;while(o>u){var f,p=l(arguments[u++]),m=d?r(p).concat(d(p)):r(p),g=m.length,b=0;while(g>b)f=m[b++],i&&!h.call(p,f)||(n[f]=p[f])}return n}:u},6547:function(t,e,n){var i=n("a691"),o=n("1d80"),r=function(t){return function(e,n){var r,s,a=String(o(e)),c=i(n),l=a.length;return c<0||c>=l?t?"":void 0:(r=a.charCodeAt(c),r<55296||r>56319||c+1===l||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):r:t?a.slice(c,c+2):s-56320+(r-55296<<10)+65536)}};t.exports={codeAt:r(!1),charAt:r(!0)}},"69f3":function(t,e,n){var i,o,r,s=n("7f9a"),a=n("da84"),c=n("861d"),l=n("9112"),u=n("5135"),d=n("f772"),h=n("d012"),f=a.WeakMap,p=function(t){return r(t)?o(t):i(t,{})},m=function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(s){var g=new f,b=g.get,w=g.has,v=g.set;i=function(t,e){return v.call(g,t,e),e},o=function(t){return b.call(g,t)||{}},r=function(t){return w.call(g,t)}}else{var _=d("state");h[_]=!0,i=function(t,e){return l(t,_,e),e},o=function(t){return u(t,_)?t[_]:{}},r=function(t){return u(t,_)}}t.exports={set:i,get:o,has:r,enforce:p,getterFor:m}},"6eeb":function(t,e,n){var i=n("da84"),o=n("9112"),r=n("5135"),s=n("ce4e"),a=n("8925"),c=n("69f3"),l=c.get,u=c.enforce,d=String(String).split("String");(t.exports=function(t,e,n,a){var c=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||r(n,"name")||o(n,"name",e),u(n).source=d.join("string"==typeof e?e:"")),t!==i?(c?!h&&t[e]&&(l=!0):delete t[e],l?t[e]=n:o(t,e,n)):l?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},7156:function(t,e,n){var i=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var r,s;return o&&"function"==typeof(r=e.constructor)&&r!==n&&i(s=r.prototype)&&s!==n.prototype&&o(t,s),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a77":function(t,e,n){"use strict";function i(t){this.message=t}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,t.exports=i},"7aac":function(t,e,n){"use strict";var i=n("c532");t.exports=i.isStandardBrowserEnv()?function(){return{write:function(t,e,n,o,r,s){var a=[];a.push(t+"="+encodeURIComponent(e)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(o)&&a.push("path="+o),i.isString(r)&&a.push("domain="+r),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(t,e,n){var i=n("1d80");t.exports=function(t){return Object(i(t))}},"7c73":function(t,e,n){var i,o=n("825a"),r=n("37e8"),s=n("7839"),a=n("d012"),c=n("1be4"),l=n("cc12"),u=n("f772"),d=">",h="<",f="prototype",p="script",m=u("IE_PROTO"),g=function(){},b=function(t){return h+p+d+t+h+"/"+p+d},w=function(t){t.write(b("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){var t,e=l("iframe"),n="java"+p+":";return e.style.display="none",c.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(b("document.F=Object")),t.close(),t.F},_=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}_=i?w(i):v();var t=s.length;while(t--)delete _[f][s[t]];return _()};a[m]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[f]=o(t),n=new g,g[f]=null,n[m]=t):n=_(),void 0===e?n:r(n,e)}},"7dd0":function(t,e,n){"use strict";var i=n("23e7"),o=n("9ed3"),r=n("e163"),s=n("d2bb"),a=n("d44e"),c=n("9112"),l=n("6eeb"),u=n("b622"),d=n("c430"),h=n("3f8c"),f=n("ae93"),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=u("iterator"),b="keys",w="values",v="entries",_=function(){return this};t.exports=function(t,e,n,u,f,k,y){o(n,e,u);var x,A,C,T=function(t){if(t===f&&I)return I;if(!m&&t in E)return E[t];switch(t){case b:return function(){return new n(this,t)};case w:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this)}},S=e+" Iterator",P=!1,E=t.prototype,M=E[g]||E["@@iterator"]||f&&E[f],I=!m&&M||T(f),O="Array"==e&&E.entries||M;if(O&&(x=r(O.call(new t)),p!==Object.prototype&&x.next&&(d||r(x)===p||(s?s(x,p):"function"!=typeof x[g]&&c(x,g,_)),a(x,S,!0,!0),d&&(h[S]=_))),f==w&&M&&M.name!==w&&(P=!0,I=function(){return M.call(this)}),d&&!y||E[g]===I||c(E,g,I),h[e]=I,f)if(A={values:T(w),keys:k?I:T(b),entries:T(v)},y)for(C in A)(m||P||!(C in E))&&l(E,C,A[C]);else i({target:e,proto:!0,forced:m||P},A);return A}},"7f9a":function(t,e,n){var i=n("da84"),o=n("8925"),r=i.WeakMap;t.exports="function"===typeof r&&/native code/.test(o(r))},"825a":function(t,e,n){var i=n("861d");t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var i=n("d039");t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(t,e,n){"use strict";var i=n("d925"),o=n("e683");t.exports=function(t,e){return t&&!i(e)?o(t,e):e}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8925:function(t,e,n){var i=n("c6cd"),o=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return o.call(t)}),t.exports=i.inspectSource},"8aa5":function(t,e,n){"use strict";var i=n("6547").charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},"8c4f":function(t,e,n){"use strict"; -/*! - * vue-router v3.4.3 - * (c) 2020 Evan You - * @license MIT - */function i(t,e){0}function o(t,e){for(var n in e)t[n]=e[n];return t}var r={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,i=e.children,r=e.parent,a=e.data;a.routerView=!0;var c=r.$createElement,l=n.name,u=r.$route,d=r._routerViewCache||(r._routerViewCache={}),h=0,f=!1;while(r&&r._routerRoot!==r){var p=r.$vnode?r.$vnode.data:{};p.routerView&&h++,p.keepAlive&&r._directInactive&&r._inactive&&(f=!0),r=r.$parent}if(a.routerViewDepth=h,f){var m=d[l],g=m&&m.component;return g?(m.configProps&&s(g,a,m.route,m.configProps),c(g,a,i)):c()}var b=u.matched[h],w=b&&b.components[l];if(!b||!w)return d[l]=null,c();d[l]={component:w},a.registerRouteInstance=function(t,e){var n=b.instances[l];(e&&n!==t||!e&&n===t)&&(b.instances[l]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){b.instances[l]=e.componentInstance},a.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==b.instances[l]&&(b.instances[l]=t.componentInstance)};var v=b.props&&b.props[l];return v&&(o(d[l],{route:u,configProps:v}),s(w,a,u,v)),c(w,a,i)}};function s(t,e,n,i){var r=e.props=a(n,i);if(r){r=e.props=o({},r);var s=e.attrs=e.attrs||{};for(var c in r)t.props&&c in t.props||(s[c]=r[c],delete r[c])}}function a(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}var c=/[!'()*]/g,l=function(t){return"%"+t.charCodeAt(0).toString(16)},u=/%2C/g,d=function(t){return encodeURIComponent(t).replace(c,l).replace(u,",")},h=decodeURIComponent;function f(t,e,n){void 0===e&&(e={});var i,o=n||m;try{i=o(t||"")}catch(a){i={}}for(var r in e){var s=e[r];i[r]=Array.isArray(s)?s.map(p):p(s)}return i}var p=function(t){return null==t||"object"===typeof t?t:String(t)};function m(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),i=h(n.shift()),o=n.length>0?h(n.join("=")):null;void 0===e[i]?e[i]=o:Array.isArray(e[i])?e[i].push(o):e[i]=[e[i],o]})),e):e}function g(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return d(e);if(Array.isArray(n)){var i=[];return n.forEach((function(t){void 0!==t&&(null===t?i.push(d(e)):i.push(d(e)+"="+d(t)))})),i.join("&")}return d(e)+"="+d(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var b=/\/?$/;function w(t,e,n,i){var o=i&&i.options.stringifyQuery,r=e.query||{};try{r=v(r)}catch(a){}var s={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:r,params:e.params||{},fullPath:y(e,o),matched:t?k(t):[]};return n&&(s.redirectedFrom=y(n,o)),Object.freeze(s)}function v(t){if(Array.isArray(t))return t.map(v);if(t&&"object"===typeof t){var e={};for(var n in t)e[n]=v(t[n]);return e}return t}var _=w(null,{path:"/"});function k(t){var e=[];while(t)e.unshift(t),t=t.parent;return e}function y(t,e){var n=t.path,i=t.query;void 0===i&&(i={});var o=t.hash;void 0===o&&(o="");var r=e||g;return(n||"/")+r(i)+o}function x(t,e){return e===_?t===e:!!e&&(t.path&&e.path?t.path.replace(b,"")===e.path.replace(b,"")&&t.hash===e.hash&&A(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&A(t.query,e.query)&&A(t.params,e.params)))}function A(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),i=Object.keys(e);return n.length===i.length&&n.every((function(n){var i=t[n],o=e[n];return null==i||null==o?i===o:"object"===typeof i&&"object"===typeof o?A(i,o):String(i)===String(o)}))}function C(t,e){return 0===t.path.replace(b,"/").indexOf(e.path.replace(b,"/"))&&(!e.hash||t.hash===e.hash)&&T(t.query,e.query)}function T(t,e){for(var n in e)if(!(n in t))return!1;return!0}function S(t,e,n){var i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;var o=e.split("/");n&&o[o.length-1]||o.pop();for(var r=t.replace(/^\//,"").split("/"),s=0;s=0&&(e=t.slice(i),t=t.slice(0,i));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function E(t){return t.replace(/\/\//g,"/")}var M=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},I=K,O=L,N=V,R=F,j=Q,D=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function L(t,e){var n,i=[],o=0,r=0,s="",a=e&&e.delimiter||"/";while(null!=(n=D.exec(t))){var c=n[0],l=n[1],u=n.index;if(s+=t.slice(r,u),r=u+c.length,l)s+=l[1];else{var d=t[r],h=n[2],f=n[3],p=n[4],m=n[5],g=n[6],b=n[7];s&&(i.push(s),s="");var w=null!=h&&null!=d&&d!==h,v="+"===g||"*"===g,_="?"===g||"*"===g,k=n[2]||a,y=p||m;i.push({name:f||o++,prefix:h||"",delimiter:k,optional:_,repeat:v,partial:w,asterisk:!!b,pattern:y?$(y):b?".*":"[^"+U(k)+"]+?"})}}return r1||!y.length)return 0===y.length?t():t("span",{},y)}if("a"===this.tag)k.on=_,k.attrs={href:c,"aria-current":b};else{var A=st(this.$slots.default);if(A){A.isStatic=!1;var T=A.data=o({},A.data);for(var S in T.on=T.on||{},T.on){var P=T.on[S];S in _&&(T.on[S]=Array.isArray(P)?P:[P])}for(var E in _)E in T.on?T.on[E].push(_[E]):T.on[E]=v;var M=A.data.attrs=o({},A.data.attrs);M.href=c,M["aria-current"]=b}else k.on=_}return t(this.tag,k,this.$slots.default)}};function rt(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function st(t){if(t)for(var e,n=0;n-1&&(a.params[h]=n.params[h]);return a.path=Z(l.path,a.params,'named route "'+c+'"'),u(l,a,s)}if(a.path){a.params={};for(var f=0;f=t.length?n():t[o]?e(t[o],(function(){i(o+1)})):i(o+1)};i(0)}var Vt={redirected:2,aborted:4,cancelled:8,duplicated:16};function zt(t,e){return $t(t,e,Vt.redirected,'Redirected when going from "'+t.fullPath+'" to "'+qt(e)+'" via a navigation guard.')}function Bt(t,e){var n=$t(t,e,Vt.duplicated,'Avoided redundant navigation to current location: "'+t.fullPath+'".');return n.name="NavigationDuplicated",n}function Ft(t,e){return $t(t,e,Vt.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function Ut(t,e){return $t(t,e,Vt.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}function $t(t,e,n,i){var o=new Error(i);return o._isRouter=!0,o.from=t,o.to=e,o.type=n,o}var Ht=["params","query","hash"];function qt(t){if("string"===typeof t)return t;if("path"in t)return t.path;var e={};return Ht.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}function Wt(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Yt(t,e){return Wt(t)&&t._isRouter&&(null==e||t.type===e)}function Gt(t){return function(e,n,i){var o=!1,r=0,s=null;Qt(t,(function(t,e,n,a){if("function"===typeof t&&void 0===t.cid){o=!0,r++;var c,l=Xt((function(e){Zt(e)&&(e=e.default),t.resolved="function"===typeof e?e:tt.extend(e),n.components[a]=e,r--,r<=0&&i()})),u=Xt((function(t){var e="Failed to resolve async component "+a+": "+t;s||(s=Wt(t)?t:new Error(e),i(s))}));try{c=t(l,u)}catch(h){u(h)}if(c)if("function"===typeof c.then)c.then(l,u);else{var d=c.component;d&&"function"===typeof d.then&&d.then(l,u)}}})),o||i()}}function Qt(t,e){return Kt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Kt(t){return Array.prototype.concat.apply([],t)}var Jt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Zt(t){return t.__esModule||Jt&&"Module"===t[Symbol.toStringTag]}function Xt(t){var e=!1;return function(){var n=[],i=arguments.length;while(i--)n[i]=arguments[i];if(!e)return e=!0,t.apply(this,n)}}var te=function(t,e){this.router=t,this.base=ee(e),this.current=_,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function ee(t){if(!t)if(ct){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function ne(t,e){var n,i=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,i=Rt&&n;i&&this.listeners.push(yt());var o=function(){var n=t.current,o=he(t.base);t.current===_&&o===t._startLocation||t.transitionTo(o,(function(t){i&&xt(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var i=this,o=this,r=o.current;this.transitionTo(t,(function(t){jt(E(i.base+t.fullPath)),xt(i.router,t,r,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var i=this,o=this,r=o.current;this.transitionTo(t,(function(t){Dt(E(i.base+t.fullPath)),xt(i.router,t,r,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(he(this.base)!==this.current.fullPath){var e=E(this.base+this.current.fullPath);t?jt(e):Dt(e)}},e.prototype.getCurrentLocation=function(){return he(this.base)},e}(te);function he(t){var e=decodeURI(window.location.pathname);return t&&0===e.toLowerCase().indexOf(t.toLowerCase())&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var fe=function(t){function e(e,n,i){t.call(this,e,n),i&&pe(this.base)||me()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,i=Rt&&n;i&&this.listeners.push(yt());var o=function(){var e=t.current;me()&&t.transitionTo(ge(),(function(n){i&&xt(t.router,n,e,!0),Rt||ve(n.fullPath)}))},r=Rt?"popstate":"hashchange";window.addEventListener(r,o),this.listeners.push((function(){window.removeEventListener(r,o)}))}},e.prototype.push=function(t,e,n){var i=this,o=this,r=o.current;this.transitionTo(t,(function(t){we(t.fullPath),xt(i.router,t,r,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var i=this,o=this,r=o.current;this.transitionTo(t,(function(t){ve(t.fullPath),xt(i.router,t,r,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;ge()!==e&&(t?we(e):ve(e))},e.prototype.getCurrentLocation=function(){return ge()},e}(te);function pe(t){var e=he(t);if(!/^\/#/.test(e))return window.location.replace(E(t+"/#"+e)),!0}function me(){var t=ge();return"/"===t.charAt(0)||(ve("/"+t),!1)}function ge(){var t=window.location.href,e=t.indexOf("#");if(e<0)return"";t=t.slice(e+1);var n=t.indexOf("?");if(n<0){var i=t.indexOf("#");t=i>-1?decodeURI(t.slice(0,i))+t.slice(i):decodeURI(t)}else t=decodeURI(t.slice(0,n))+t.slice(n);return t}function be(t){var e=window.location.href,n=e.indexOf("#"),i=n>=0?e.slice(0,n):e;return i+"#"+t}function we(t){Rt?jt(be(t)):window.location.hash=t}function ve(t){Rt?Dt(be(t)):window.location.replace(be(t))}var _e=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var i=this;this.transitionTo(t,(function(t){i.stack=i.stack.slice(0,i.index+1).concat(t),i.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var i=this;this.transitionTo(t,(function(t){i.stack=i.stack.slice(0,i.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var i=this.stack[n];this.confirmTransition(i,(function(){e.index=n,e.updateRoute(i)}),(function(t){Yt(t,Vt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(te),ke=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=ft(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Rt&&!1!==t.fallback,this.fallback&&(e="hash"),ct||(e="abstract"),this.mode=e,e){case"history":this.history=new de(this,t.base);break;case"hash":this.history=new fe(this,t.base,this.fallback);break;case"abstract":this.history=new _e(this,t.base);break;default:0}},ye={currentRoute:{configurable:!0}};function xe(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ae(t,e,n){var i="hash"===n?"#"+e:e;return t?E(t+"/"+i):i}ke.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},ye.currentRoute.get=function(){return this.history&&this.history.current},ke.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardownListeners()})),!this.app){this.app=t;var n=this.history;if(n instanceof de||n instanceof fe){var i=function(t){var i=n.current,o=e.options.scrollBehavior,r=Rt&&o;r&&"fullPath"in t&&xt(e,t,i,!1)},o=function(t){n.setupListeners(),i(t)};n.transitionTo(n.getCurrentLocation(),o,o)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},ke.prototype.beforeEach=function(t){return xe(this.beforeHooks,t)},ke.prototype.beforeResolve=function(t){return xe(this.resolveHooks,t)},ke.prototype.afterEach=function(t){return xe(this.afterHooks,t)},ke.prototype.onReady=function(t,e){this.history.onReady(t,e)},ke.prototype.onError=function(t){this.history.onError(t)},ke.prototype.push=function(t,e,n){var i=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){i.history.push(t,e,n)}));this.history.push(t,e,n)},ke.prototype.replace=function(t,e,n){var i=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){i.history.replace(t,e,n)}));this.history.replace(t,e,n)},ke.prototype.go=function(t){this.history.go(t)},ke.prototype.back=function(){this.go(-1)},ke.prototype.forward=function(){this.go(1)},ke.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},ke.prototype.resolve=function(t,e,n){e=e||this.history.current;var i=X(t,e,n,this),o=this.match(i,e),r=o.redirectedFrom||o.fullPath,s=this.history.base,a=Ae(s,r,this.mode);return{location:i,route:o,href:a,normalizedTo:i,resolved:o}},ke.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==_&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(ke.prototype,ye),ke.install=at,ke.version="3.4.3",ke.isNavigationFailure=Yt,ke.NavigationFailureType=Vt,ct&&window.Vue&&window.Vue.use(ke),e["a"]=ke},"8df4":function(t,e,n){"use strict";var i=n("7a77");function o(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new i(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t,e=new o((function(e){t=e}));return{token:e,cancel:t}},t.exports=o},"90e3":function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+i).toString(36)}},9112:function(t,e,n){var i=n("83ab"),o=n("9bf2"),r=n("5c6c");t.exports=i?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},9263:function(t,e,n){"use strict";var i=n("ad6d"),o=n("9f7f"),r=RegExp.prototype.exec,s=String.prototype.replace,a=r,c=function(){var t=/a/,e=/b*/g;return r.call(t,"a"),r.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),l=o.UNSUPPORTED_Y||o.BROKEN_CARET,u=void 0!==/()??/.exec("")[1],d=c||u||l;d&&(a=function(t){var e,n,o,a,d=this,h=l&&d.sticky,f=i.call(d),p=d.source,m=0,g=t;return h&&(f=f.replace("y",""),-1===f.indexOf("g")&&(f+="g"),g=String(t).slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==t[d.lastIndex-1])&&(p="(?: "+p+")",g=" "+g,m++),n=new RegExp("^(?:"+p+")",f)),u&&(n=new RegExp("^"+p+"$(?!\\s)",f)),c&&(e=d.lastIndex),o=r.call(h?n:d,g),h?o?(o.input=o.input.slice(m),o[0]=o[0].slice(m),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:c&&o&&(d.lastIndex=d.global?o.index+o[0].length:e),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(a=1;a0?i:n)(t)}},a79d:function(t,e,n){"use strict";var i=n("23e7"),o=n("c430"),r=n("fea9"),s=n("d039"),a=n("d066"),c=n("4840"),l=n("cdf9"),u=n("6eeb"),d=!!r&&s((function(){r.prototype["finally"].call({then:function(){}},(function(){}))}));i({target:"Promise",proto:!0,real:!0,forced:d},{finally:function(t){var e=c(this,a("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),o||"function"!=typeof r||r.prototype["finally"]||u(r.prototype,"finally",a("Promise").prototype["finally"])},a9e3:function(t,e,n){"use strict";var i=n("83ab"),o=n("da84"),r=n("94ca"),s=n("6eeb"),a=n("5135"),c=n("c6b6"),l=n("7156"),u=n("c04e"),d=n("d039"),h=n("7c73"),f=n("241c").f,p=n("06cf").f,m=n("9bf2").f,g=n("58a8").trim,b="Number",w=o[b],v=w.prototype,_=c(h(v))==b,k=function(t){var e,n,i,o,r,s,a,c,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=g(l),e=l.charCodeAt(0),43===e||45===e){if(n=l.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+l}for(r=l.slice(2),s=r.length,a=0;ao)return NaN;return parseInt(r,i)}return+l};if(r(b,!w(" 0o1")||!w("0b1")||w("+0x1"))){for(var y,x=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof x&&(_?d((function(){v.valueOf.call(n)})):c(n)!=b)?l(new w(k(e)),n,x):k(e)},A=i?f(w):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;A.length>C;C++)a(w,y=A[C])&&!a(x,y)&&m(x,y,p(w,y));x.prototype=v,v.constructor=x,s(o,b,x)}},ac1f:function(t,e,n){"use strict";var i=n("23e7"),o=n("9263");i({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(t,e,n){"use strict";var i=n("825a");t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ae93:function(t,e,n){"use strict";var i,o,r,s=n("e163"),a=n("9112"),c=n("5135"),l=n("b622"),u=n("c430"),d=l("iterator"),h=!1,f=function(){return this};[].keys&&(r=[].keys(),"next"in r?(o=s(s(r)),o!==Object.prototype&&(i=o)):h=!0),void 0==i&&(i={}),u||c(i,d)||a(i,d,f),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:h}},b50d:function(t,e,n){"use strict";var i=n("c532"),o=n("467f"),r=n("30b5"),s=n("83b9"),a=n("c345"),c=n("3934"),l=n("2d83");t.exports=function(t){return new Promise((function(e,u){var d=t.data,h=t.headers;i.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",m=t.auth.password||"";h.Authorization="Basic "+btoa(p+":"+m)}var g=s(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),r(g,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,i=t.responseType&&"text"!==t.responseType?f.response:f.responseText,r={data:i,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};o(e,u,r),f=null}},f.onabort=function(){f&&(u(l("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){u(l("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),u(l(e,t,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var b=n("7aac"),w=(t.withCredentials||c(g))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;w&&(h[t.xsrfHeaderName]=w)}if("setRequestHeader"in f&&i.forEach(h,(function(t,e){"undefined"===typeof d&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)})),i.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(v){if("json"!==t.responseType)throw v}"function"===typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),u(t),f=null)})),void 0===d&&(d=null),f.send(d)}))}},b575:function(t,e,n){var i,o,r,s,a,c,l,u,d=n("da84"),h=n("06cf").f,f=n("c6b6"),p=n("2cf4").set,m=n("1cdc"),g=d.MutationObserver||d.WebKitMutationObserver,b=d.process,w=d.Promise,v="process"==f(b),_=h(d,"queueMicrotask"),k=_&&_.value;k||(i=function(){var t,e;v&&(t=b.domain)&&t.exit();while(o){e=o.fn,o=o.next;try{e()}catch(n){throw o?s():r=void 0,n}}r=void 0,t&&t.enter()},v?s=function(){b.nextTick(i)}:g&&!m?(a=!0,c=document.createTextNode(""),new g(i).observe(c,{characterData:!0}),s=function(){c.data=a=!a}):w&&w.resolve?(l=w.resolve(void 0),u=l.then,s=function(){u.call(l,i)}):s=function(){p.call(d,i)}),t.exports=k||function(t){var e={fn:t,next:void 0};r&&(r.next=e),o||(o=e,s()),r=e}},b622:function(t,e,n){var i=n("da84"),o=n("5692"),r=n("5135"),s=n("90e3"),a=n("4930"),c=n("fdbf"),l=o("wks"),u=i.Symbol,d=c?u:u&&u.withoutSetter||s;t.exports=function(t){return r(l,t)||(a&&r(u,t)?l[t]=u[t]:l[t]=d("Symbol."+t)),l[t]}},bc3a:function(t,e,n){t.exports=n("cee4")},c04e:function(t,e,n){var i=n("861d");t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c345:function(t,e,n){"use strict";var i=n("c532"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,r,s={};return t?(i.forEach(t.split("\n"),(function(t){if(r=t.indexOf(":"),e=i.trim(t.substr(0,r)).toLowerCase(),n=i.trim(t.substr(r+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},c401:function(t,e,n){"use strict";var i=n("c532");t.exports=function(t,e,n){return i.forEach(n,(function(n){t=n(t,e)})),t}},c430:function(t,e){t.exports=!1},c532:function(t,e,n){"use strict";var i=n("1d2b"),o=Object.prototype.toString;function r(t){return"[object Array]"===o.call(t)}function s(t){return"undefined"===typeof t}function a(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function c(t){return"[object ArrayBuffer]"===o.call(t)}function l(t){return"undefined"!==typeof FormData&&t instanceof FormData}function u(t){var e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function d(t){return"string"===typeof t}function h(t){return"number"===typeof t}function f(t){return null!==t&&"object"===typeof t}function p(t){return"[object Date]"===o.call(t)}function m(t){return"[object File]"===o.call(t)}function g(t){return"[object Blob]"===o.call(t)}function b(t){return"[object Function]"===o.call(t)}function w(t){return f(t)&&b(t.pipe)}function v(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams}function _(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function k(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function y(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;nc)i(a,n=e[c++])&&(~r(l,n)||l.push(n));return l}},cc12:function(t,e,n){var i=n("da84"),o=n("861d"),r=i.document,s=o(r)&&o(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},cca6:function(t,e,n){var i=n("23e7"),o=n("60da");i({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},cdf9:function(t,e,n){var i=n("825a"),o=n("861d"),r=n("f069");t.exports=function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=r.f(t),s=n.resolve;return s(e),n.promise}},ce4e:function(t,e,n){var i=n("da84"),o=n("9112");t.exports=function(t,e){try{o(i,t,e)}catch(n){i[t]=e}return e}},cee4:function(t,e,n){"use strict";var i=n("c532"),o=n("1d2b"),r=n("0a06"),s=n("4a7b"),a=n("2444");function c(t){var e=new r(t),n=o(r.prototype.request,e);return i.extend(n,r.prototype,e),i.extend(n,e),n}var l=c(a);l.Axios=r,l.create=function(t){return c(s(l.defaults,t))},l.Cancel=n("7a77"),l.CancelToken=n("8df4"),l.isCancel=n("2e67"),l.all=function(t){return Promise.all(t)},l.spread=n("0df6"),t.exports=l,t.exports.default=l},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var i=n("428f"),o=n("da84"),r=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?r(i[t])||r(o[t]):i[t]&&i[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,n){"use strict";var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!i.call({1:2},1);e.f=r?function(t){var e=o(this,t);return!!e&&e.enumerable}:i},d2bb:function(t,e,n){var i=n("825a"),o=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(r){}return function(n,r){return i(n),o(r),e?t.call(n,r):n.__proto__=r,n}}():void 0)},d44e:function(t,e,n){var i=n("9bf2").f,o=n("5135"),r=n("b622"),s=r("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,s)&&i(t,s,{configurable:!0,value:e})}},d784:function(t,e,n){"use strict";n("ac1f");var i=n("6eeb"),o=n("d039"),r=n("b622"),s=n("9263"),a=n("9112"),c=r("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),u=function(){return"$0"==="a".replace(/./,"$0")}(),d=r("replace"),h=function(){return!!/./[d]&&""===/./[d]("a","$0")}(),f=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,d){var p=r(t),m=!o((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),g=m&&!o((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!m||!g||"replace"===t&&(!l||!u||h)||"split"===t&&!f){var b=/./[p],w=n(p,""[t],(function(t,e,n,i,o){return e.exec===s?m&&!o?{done:!0,value:b.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),v=w[0],_=w[1];i(String.prototype,t,v),i(RegExp.prototype,p,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}d&&a(RegExp.prototype[p],"sham",!0)}},d925:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("c8ba"))},df75:function(t,e,n){var i=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return i(t,o)}},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,i=t.length-1;i>=0;i--){var o=t[i];"."===o?t.splice(i,1):".."===o?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function i(t){"string"!==typeof t&&(t+="");var e,n=0,i=-1,o=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!o){n=e+1;break}}else-1===i&&(o=!1,i=e+1);return-1===i?"":t.slice(n,i)}function o(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i=-1&&!i;r--){var s=r>=0?arguments[r]:t.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,i="/"===s.charAt(0))}return e=n(o(e.split("/"),(function(t){return!!t})),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),s="/"===r(t,-1);return t=n(o(t.split("/"),(function(t){return!!t})),!i).join("/"),t||i||(t="."),t&&s&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(o(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function i(t){for(var e=0;e=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var o=i(t.split("/")),r=i(n.split("/")),s=Math.min(o.length,r.length),a=s,c=0;c=1;--r)if(e=t.charCodeAt(r),47===e){if(!o){i=r;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"/":t.slice(0,i)},e.basename=function(t,e){var n=i(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,n=0,i=-1,o=!0,r=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===i&&(o=!1,i=s+1),46===a?-1===e?e=s:1!==r&&(r=1):-1!==e&&(r=-1);else if(!o){n=s+1;break}}return-1===e||-1===i||0===r||1===r&&e===i-1&&e===n+1?"":t.slice(e,i)};var r="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e163:function(t,e,n){var i=n("5135"),o=n("7b0b"),r=n("f772"),s=n("e177"),a=r("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},e177:function(t,e,n){var i=n("d039");t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var i=n("fc6a"),o=n("44d2"),r=n("3f8c"),s=n("69f3"),a=n("7dd0"),c="Array Iterator",l=s.set,u=s.getterFor(c);t.exports=a(Array,"Array",(function(t,e){l(this,{type:c,target:i(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},e2cc:function(t,e,n){var i=n("6eeb");t.exports=function(t,e,n){for(var o in e)i(t,o,e[o],n);return t}},e39b:function(t,e,n){ -/*! - * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ -!function(t){t.en=Object.assign(t.en||{},{a:"Cannot upload file:",b:"Image toolbar",c:"Table toolbar",d:"Upload in progress",e:"Block quote",f:"Bold",g:"Choose heading",h:"Heading",i:"Italic",j:"image widget",k:"Full size image",l:"Side image",m:"Left aligned image",n:"Centered image",o:"Right aligned image",p:"Enter image caption",q:"Insert image",r:"Upload failed",s:"Increase indent",t:"Decrease indent",u:"Numbered List",v:"Bulleted List",w:"Link",x:"media widget",y:"Insert media",z:"The URL must not be empty.",aa:"This media URL is not supported.",ab:"Insert table",ac:"Header column",ad:"Insert column left",ae:"Insert column right",af:"Delete column",ag:"Column",ah:"Header row",ai:"Insert row below",aj:"Insert row above",ak:"Delete row",al:"Row",am:"Merge cell up",an:"Merge cell right",ao:"Merge cell down",ap:"Merge cell left",aq:"Split cell vertically",ar:"Split cell horizontally",as:"Merge cells",at:"Widget toolbar",au:"Change image text alternative",av:"Editor toolbar",aw:"Show more items",ax:"Rich Text Editor",ay:"Rich Text Editor, %0",az:"%0 of %1",ba:"Previous",bb:"Next",bc:"Save",bd:"Cancel",be:"Text alternative",bf:"Dropdown toolbar",bg:"Undo",bh:"Redo",bi:"Open in a new tab",bj:"Downloadable",bk:"Paste the media URL in the input.",bl:"Tip: Paste the URL into the content to embed faster.",bm:"Media URL",bn:"Unlink",bo:"Edit link",bp:"Open link in new tab",bq:"This link has no URL",br:"Link URL",bs:"Paragraph",bt:"Heading 1",bu:"Heading 2",bv:"Heading 3",bw:"Heading 4",bx:"Heading 5",by:"Heading 6"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,n){t.exports=n()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},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=95)}([function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return r}));const i="https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html";class o extends Error{constructor(t,e,n){t=r(t),n&&(t+=" "+JSON.stringify(n)),super(t),this.name="CKEditorError",this.context=e,this.data=n}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;throw new o("unexpected-error",e,{originalError:{message:t.message,stack:t.stack,name:t.name}})}}function r(t){const e=t.match(/^([^:]+):/);return e?t+` Read more: ${i}#error-${e[1]}\n`:t}},function(t,e,n){"use strict";var i={},o=function(){var t;return function(){return void 0===t&&(t=Boolean(window&&document&&document.all&&!window.atob)),t}}(),r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}();function s(t,e){for(var n=[],i={},o=0;o:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}"},function(t,e,n){var i=n(21);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(t,e,n){var i=n(23);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(t,e,n){var i=n(25);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{transform:translate3d(0,100%,0)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}"},function(t,e,n){var i=n(27);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(t,e,n){var i=n(29);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(t,e,n){var i=n(31);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;border-color:transparent}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1*var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}"},function(t,e,n){var i=n(33);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;border:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:hover:not(ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(t,e,n){var i=n(35);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:1.3846153847em}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}"},function(t,e,n){var i=n(37);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}"},function(t,e,n){var i=n(39);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}"},function(t,e,n){var i=n(41);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__grouped-dropdown,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{padding-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__items>:last-child,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__items>:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__grouped-dropdown,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{padding-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__items>*,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__items>*{margin-left:var(--ck-spacing-small);margin-right:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__items>:last-child,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__items>:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{margin-left:var(--ck-spacing-small)}"},function(t,e,n){var i=n(43);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}"},function(t,e,n){var i=n(45);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}"},function(t,e){t.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(t,e,n){var i=n(48);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handle:hover,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-read-only .ck-widget{--ck-widget-outline-thickness:0}"},function(t,e,n){var i=n(50);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}"},function(t,e,n){var i=n(52);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(t,e,n){var i=n(54);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-input{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(t,e,n){var i=n(56);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}'},function(t,e,n){var i=n(58);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(t,e,n){var i=n(60);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}"},function(t,e,n){var i=n(62);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}"},function(t,e,n){var i=n(64);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}"},function(t,e,n){var i=n(66);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center,.ck-content .image-style-align-left,.ck-content .image-style-align-right,.ck-content .image-style-side{max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}"},function(t,e,n){var i=n(68);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(t,e,n){var i=n(70);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(t,e,n){var i=n(72);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(t,e,n){var i=n(74);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}"},function(t,e,n){var i=n(76);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-input{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(t,e,n){var i=n(78);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(t,e,n){var i=n(80);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c8,#b900b4,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(t,e,n){var i=n(82);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-input{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-input{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-input .ck-labeled-input__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(t,e,n){var i=n(84);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(t,e,n){var i=n(86);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-color-table-focused-cell-background:#f5fafe}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(t,e,n){var i=n(88);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=":root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px;--ck-insert-table-dropdown-box-border-color:#bfbfbf;--ck-insert-table-dropdown-box-border-active-color:#53a0e4;--ck-insert-table-dropdown-box-active-background:#c7e5ff}.ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-insert-table-dropdown-box-border-color);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-insert-table-dropdown-box-border-active-color);background:var(--ck-insert-table-dropdown-box-active-background)}"},function(t,e,n){var i=n(90);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border-color:#d9d9d9}.ck-content .table table th{font-weight:700;background:#fafafa}"},function(t,e,n){var i=n(92);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}"},function(t,e,n){var i=n(94);"string"==typeof i&&(i=[[t.i,i,""]]);var o={injectType:"singletonStyleTag",insert:"head",singleton:!0};n(1)(i,o),i.locals&&(t.exports=i.locals)},function(t,e){t.exports=".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}"},function(t,e,n){"use strict";n.r(e);var i=n(3),o=i.a.Symbol,r=Object.prototype,s=r.hasOwnProperty,a=r.toString,c=o?o.toStringTag:void 0,l=function(t){var e=s.call(t,c),n=t[c];try{t[c]=void 0;var i=!0}catch(t){}var o=a.call(t);return i&&(e?t[c]=n:delete t[c]),o},u=Object.prototype.toString,d=function(t){return u.call(t)},h="[object Null]",f="[object Undefined]",p=o?o.toStringTag:void 0,m=function(t){return null==t?void 0===t?f:h:p&&p in Object(t)?l(t):d(t)},g=function(t,e){return function(n){return t(e(n))}},b=g(Object.getPrototypeOf,Object),w=function(t){return null!=t&&"object"==typeof t},v="[object Object]",_=Function.prototype,k=Object.prototype,y=_.toString,x=k.hasOwnProperty,A=y.call(Object),C=function(t){if(!w(t)||m(t)!=v)return!1;var e=b(t);if(null===e)return!0;var n=x.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&y.call(n)==A},T=function(){this.__data__=[],this.size=0},S=function(t,e){return t===e||t!=t&&e!=e},P=function(t,e){for(var n=t.length;n--;)if(S(t[n][0],e))return n;return-1},E=Array.prototype.splice,M=function(t){var e=this.__data__,n=P(e,t);return!(n<0||(n==e.length-1?e.pop():E.call(e,n,1),--this.size,0))},I=function(t){var e=this.__data__,n=P(e,t);return n<0?void 0:e[n][1]},O=function(t){return P(this.__data__,t)>-1},N=function(t,e){var n=this.__data__,i=P(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function R(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=Kt},Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;var Xt=function(t){return w(t)&&Jt(t.length)&&!!Zt[m(t)]},te=function(t){return function(e){return t(e)}},ee=n(4),ne=ee.a&&ee.a.isTypedArray,ie=ne?te(ne):Xt,oe=Object.prototype.hasOwnProperty,re=function(t,e){var n=qt(t),i=!n&&Ht(t),o=!n&&!i&&Object(Wt.a)(t),r=!n&&!i&&!o&&ie(t),s=n||i||o||r,a=s?Vt(t.length,String):[],c=a.length;for(var l in t)!e&&!oe.call(t,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Qt(l,c))||a.push(l);return a},se=Object.prototype,ae=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)},ce=g(Object.keys,Object),le=Object.prototype.hasOwnProperty,ue=function(t){if(!ae(t))return ce(t);var e=[];for(var n in Object(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e},de=function(t){return null!=t&&Jt(t.length)&&!q(t)},he=function(t){return de(t)?re(t):ue(t)},fe=function(t,e){return t&&Lt(e,he(e),t)},pe=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},me=Object.prototype.hasOwnProperty,ge=function(t){if(!B(t))return pe(t);var e=ae(t),n=[];for(var i in t)("constructor"!=i||!e&&me.call(t,i))&&n.push(i);return n},be=function(t){return de(t)?re(t,!0):ge(t)},we=function(t,e){return t&&Lt(e,be(e),t)},ve=n(12),_e=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n{this._setToTarget(t,i,e[i],n)})}}function Yn(t){return qn(t)?t:void 0}var Gn=n(0),Qn=function(){return function t(){t.called=!0}};class Kn{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=Qn(),this.off=Qn()}}function Jn(){let t="e";for(let e=0;e<8;e++)t+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return t}var Zn={get(t){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};n(6);const Xn=Symbol("listeningTo"),ti=Symbol("emitterId");var ei={on(t,e,n={}){this.listenTo(this,t,e,n)},once(t,e,n){let i=!1;this.listenTo(this,t,(function(t,...n){i||(i=!0,t.off(),e.call(this,t,...n))}),n)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,n,i={}){let o,r;this[Xn]||(this[Xn]={});const s=this[Xn];ii(t)||ni(t);const a=ii(t);(o=s[a])||(o=s[a]={emitter:t,callbacks:{}}),(r=o.callbacks[e])||(r=o.callbacks[e]=[]),r.push(n),function(t,e){const n=oi(t);if(n[e])return;let i=e,o=null;const r=[];for(;""!==i&&!n[i];)n[i]={callbacks:[],childEvents:[]},r.push(n[i]),o&&n[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const t of r)t.callbacks=n[i].callbacks.slice();n[i].childEvents.push(o)}}(t,e);const c=ri(t,e),l=Zn.get(i.priority),u={callback:n,priority:l};for(const d of c){let t=!1;for(let e=0;e-1?t(e,n.substr(0,n.lastIndexOf(":"))):null}(this,i);if(n.path.push(this),o){const t=[n,...e];o=Array.from(o);for(let e=0;e{this._delegations||(this._delegations=new Map),t.forEach(t=>{const i=this._delegations.get(t);i?i.set(e,n):this._delegations.set(t,new Map([[e,n]]))})}}},stopDelegating(t,e){if(this._delegations)if(t)if(e){const n=this._delegations.get(t);n&&n.delete(e)}else this._delegations.delete(t);else this._delegations.clear()}};function ni(t,e){t[ti]||(t[ti]=e||Jn())}function ii(t){return t[ti]}function oi(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function ri(t,e){const n=oi(t)[e];if(!n)return[];let i=[n.callbacks];for(let o=0;o{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(n=>{if(n in t.prototype)return;const i=Object.getOwnPropertyDescriptor(e,n);i.enumerable=!1,Object.defineProperty(t.prototype,n,i)})})}function li(t,e){const n=Math.min(t.length,e.length);for(let i=0;it.data.length)throw new Gn.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(n<0||e+n>t.data.length)throw new Gn.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return"textProxy"==t||"view:textProxy"==t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}function mi(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}function gi(t){return!(!t||!t[Symbol.iterator])}class bi{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),e.classes&&("string"==typeof e.classes||e.classes instanceof RegExp)&&(e.classes=[e.classes]),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=wi(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const i=wi(n,t);i&&e.push({element:n,pattern:t,match:i})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function wi(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){return t instanceof RegExp?t.test(e):t===e}(e.name,t.name),!n.name)||e.attributes&&(n.attributes=function(t,e){const n=[];for(const i in t){const o=t[i];if(!e.hasAttribute(i))return null;{const t=e.getAttribute(i);if(!0===o)n.push(i);else if(o instanceof RegExp){if(!o.test(t))return null;n.push(i)}else{if(t!==o)return null;n.push(i)}}}return n}(e.attributes,t),!n.attributes)?null:!(e.classes&&(n.classes=function(t,e){const n=[];for(const i of t)if(i instanceof RegExp){const t=e.getClassNames();for(const e of t)i.test(e)&&n.push(e);if(0===n.length)return null}else{if(!e.hasClass(i))return null;n.push(i)}return n}(e.classes,t),!n.classes))&&!(e.styles&&(n.styles=function(t,e){const n=[];for(const i in t){const o=t[i];if(!e.hasStyle(i))return null;{const t=e.getStyle(i);if(o instanceof RegExp){if(!o.test(t))return null;n.push(i)}else{if(t!==o)return null;n.push(i)}}}return n}(e.styles,t),!n.styles))&&n}class vi extends hi{constructor(t,e,n){if(super(),this.name=t,this._attrs=function(t){t=C(t)?mi(t):new Map(t);for(const[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(e),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");ki(this._classes,t),this._attrs.delete("class")}this._styles=new Map,this._attrs.has("style")&&(_i(this._styles,this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(t,e=null){const n=t.replace(/^view:/,"");return e?"element"==n&&e==this.name:"element"==n||n==this.name||super.is(t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.size>0&&(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.size>0&&(yield["style",this.getAttribute("style")])}getAttribute(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"!=t)return this._attrs.get(t);if(this._styles.size>0){let t="";for(const[e,n]of this._styles)t+=`${e}:${n};`;return t}}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?this._styles.size>0:this._attrs.has(t)}isSimilar(t){if(!(t instanceof vi))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const[e,n]of this._styles)if(!t._styles.has(e)||t._styles.get(e)!==n)return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.get(t)}getStyleNames(){return this._styles.keys()}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new bi(...t);let n=this.parent;for(;n;){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=Array.from(this._styles).map(t=>`${t[0]}:${t[1]}`).sort().join(";"),n=Array.from(this._attrs).map(t=>`${t[0]}="${t[1]}"`).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(""==e?"":` style="${e}"`)+(""==n?"":" "+n)}_clone(t=!1){const e=[];if(t)for(const i of this.getChildren())e.push(i._clone(t));const n=new this.constructor(this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const i=function(t){return"string"==typeof t?[new fi(t)]:(gi(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new fi(t):t instanceof pi?new fi(t.data):t))}(e);for(const o of i)null!==o.parent&&o._remove(),o.parent=this,this._children.splice(t,0,o),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n0&&(this._classes.clear(),!0):"style"==t?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.add(t))}_removeClass(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.delete(t))}_setStyle(t,e){if(this._fireChange("attributes",this),C(t)){const e=Object.keys(t);for(const n of e)this._styles.set(n,t[n])}else this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._styles.delete(t))}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function _i(t,e){let n=null,i=0,o=0,r=null;if(t.clear(),""!==e){";"!=e.charAt(e.length-1)&&(e+=";");for(let s=0;st.add(e))}class yi extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=xi}is(t,e=null){const n=t&&t.replace(/^view:/,"");return e?"containerElement"==n&&e==this.name||super.is(t,e):"containerElement"==n||super.is(t)}}function xi(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const n of t)if(!n.is("uiElement"))return null;return this.childCount}var Ai=function(t){return t},Ci=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Ti=Math.max,Si=function(t,e,n){return e=Ti(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,r=Ti(i.length-e,0),s=Array(r);++o0){if(++e>=Mi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ei),Ri=function(t,e){return Ni(Si(t,e,Ai),t+"")},ji=function(t,e,n){if(!B(n))return!1;var i=typeof e;return!!("number"==i?de(n)&&Qt(e,n.length):"string"==i&&e in n)&&S(n[e],t)},Di=function(t){return Ri((function(e,n){var i=-1,o=n.length,r=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(o--,r):void 0,s&&ji(n[0],n[1],s)&&(r=o<3?void 0:r,o=1),e=Object(e);++i{this.set(e,t[e])},this);Ui(this);const n=this[Li];if(t in this&&!n.has(t))throw new Gn.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const i=n.get(t);let o=this.fire("set:"+t,t,e,i);void 0===o&&(o=e),i===o&&n.has(t)||(n.set(t,o),this.fire("change:"+t,t,o,i))}}),this[t]=e},bind(...t){if(!t.length||!qi(t))throw new Gn.b("observable-bind-wrong-properties: All properties must be strings.",this);if(new Set(t).size!==t.length)throw new Gn.b("observable-bind-duplicate-properties: Properties must be unique.",this);Ui(this);const e=this[zi];t.forEach(t=>{if(e.has(t))throw new Gn.b("observable-bind-rebind: Cannot bind the same property more that once.",this)});const n=new Map;return t.forEach(t=>{const i={property:t,to:[]};e.set(t,i),n.set(t,i)}),{to:$i,toMany:Hi,_observable:this,_bindProperties:t,_to:[],_bindings:n}},unbind(...t){if(!(Li in this))return;const e=this[zi],n=this[Vi];if(t.length){if(!qi(t))throw new Gn.b("observable-unbind-wrong-properties: Properties must be strings.",this);t.forEach(t=>{const i=e.get(t);if(!i)return;let o,r,s,a;i.to.forEach(t=>{o=t[0],r=t[1],s=n.get(o),(a=s[r]).delete(i),a.size||delete s[r],Object.keys(s).length||(n.delete(o),this.stopListening(o,"change"))}),e.delete(t)})}else n.forEach((t,e)=>{this.stopListening(e,"change")}),n.clear(),e.clear()},decorate(t){const e=this[t];if(!e)throw new Gn.b("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:t});this.on(t,(t,n)=>{t.return=e.apply(this,n)}),this[t]=function(...e){return this.fire(t,e)}}};Di(Bi,ei);var Fi=Bi;function Ui(t){Li in t||(Object.defineProperty(t,Li,{value:new Map}),Object.defineProperty(t,Vi,{value:new Map}),Object.defineProperty(t,zi,{value:new Map}))}function $i(...t){const e=function(...t){if(!t.length)throw new Gn.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);const e={to:[]};let n;return"function"==typeof t[t.length-1]&&(e.callback=t.pop()),t.forEach(t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new Gn.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);n={observable:t,properties:[]},e.to.push(n)}}),e}(...t),n=Array.from(this._bindings.keys()),i=n.length;if(!e.callback&&e.to.length>1)throw new Gn.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(i>1&&e.callback)throw new Gn.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==i)throw new Gn.b("observable-bind-to-properties-length: The number of properties must match.",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),function(t,e){e.forEach(e=>{const n=t[Vi];let i;n.get(e.observable)||t.listenTo(e.observable,"change",(o,r)=>{(i=n.get(e.observable)[r])&&i.forEach(e=>{Wi(t,e.property)})})})}(this._observable,this._to),function(t){let e;t._bindings.forEach((n,i)=>{t._to.forEach(o=>{e=o.properties[n.callback?0:t._bindProperties.indexOf(i)],n.to.push([o.observable,e]),function(t,e,n,i){const o=t[Vi],r=o.get(n),s=r||{};s[i]||(s[i]=new Set),s[i].add(e),r||o.set(n,s)}(t._observable,n,o.observable,e)})})}(this),this._bindProperties.forEach(t=>{Wi(this._observable,t)})}function Hi(t,e,n){if(this._bindings.size>1)throw new Gn.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(t,e){const n=t.map(t=>[t,e]);return Array.prototype.concat.apply([],n)}(t,e),n)}function qi(t){return t.every(t=>"string"==typeof t)}function Wi(t,e){const n=t[zi].get(e);let i;i=n.callback?n.callback.apply(t,n.to.map(t=>t[0][t[1]])):(i=n.to[0])[0][i[1]],t.hasOwnProperty(e)?t[e]=i:t.set(e,i)}const Yi=Symbol("document");class Gi extends yi{constructor(t,e,n){super(t,e,n),this.set("isReadOnly",!1),this.set("isFocused",!1)}is(t,e=null){const n=t&&t.replace(/^view:/,"");return e?"editableElement"==n&&e==this.name||super.is(t,e):"editableElement"==n||super.is(t)}destroy(){this.stopListening()}get document(){return this.getCustomProperty(Yi)}set _document(t){if(this.getCustomProperty(Yi))throw new Gn.b("view-editableelement-document-already-set: View document is already set.",this);this._setCustomProperty(Yi,t),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",e=>e&&t.selection.editableElement==this),this.listenTo(t.selection,"change",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}}ci(Gi,Fi);const Qi=Symbol("rootName");class Ki extends Gi{constructor(t){super(t),this.rootName="main"}is(t,e=null){const n=t.replace(/^view:/,"");return e?"rootElement"==n&&e==this.name||super.is(t,e):"rootElement"==n||super.is(t)}get rootName(){return this.getCustomProperty(Qi)}set rootName(t){this._setCustomProperty(Qi,t)}set _name(t){this.name=t}}class Ji{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new Gn.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new Gn.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=Zi._createAt(t.startPosition):this.position=Zi._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,n,i;do{i=this.position,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};let i;if(n instanceof fi){if(t.isAtEnd)return this.position=Zi._createAfter(n),this._next();i=n.data[t.offset]}else i=n.getChild(t.offset);if(i instanceof vi)return this.shallow?t.offset++:t=new Zi(i,0),this.position=t,this._formatReturnValue("elementStart",i,e,t,1);if(i instanceof fi){if(this.singleCharacters)return t=new Zi(i,0),this.position=t,this._next();{let n,o=i.data.length;return i==this._boundaryEndParent?(o=this.boundaries.end.offset,n=new pi(i,0,o),t=Zi._createAfter(n)):(n=new pi(i,0,i.data.length),t.offset++),this.position=t,this._formatReturnValue("text",n,e,t,o)}}if("string"==typeof i){let i;i=this.singleCharacters?1:(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset;const o=new pi(n,t.offset,i);return t.offset+=i,this.position=t,this._formatReturnValue("text",o,e,t,i)}return t=Zi._createAfter(n),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};let i;if(n instanceof fi){if(t.isAtStart)return this.position=Zi._createBefore(n),this._previous();i=n.data[t.offset-1]}else i=n.getChild(t.offset-1);if(i instanceof vi)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",i,e,t,1)):(t=new Zi(i,i.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,e,t));if(i instanceof fi){if(this.singleCharacters)return t=new Zi(i,i.data.length),this.position=t,this._previous();{let n,o=i.data.length;if(i==this._boundaryStartParent){const e=this.boundaries.start.offset;o=(n=new pi(i,e,i.data.length-e)).data.length,t=Zi._createBefore(n)}else n=new pi(i,0,i.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",n,e,t,o)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;i=t.offset-e}t.offset-=i;const o=new pi(n,t.offset,i);return this.position=t,this._formatReturnValue("text",o,e,t,i)}return t=Zi._createBefore(n),this.position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,i,o){return e instanceof pi&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=Zi._createAfter(e.textNode):(i=Zi._createAfter(e.textNode),this.position=i)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=Zi._createBefore(e.textNode):(i=Zi._createBefore(e.textNode),this.position=i))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:o}}}}class Zi{constructor(t,e){this.parent=t,this.offset=e}get nodeAfter(){return this.parent.is("text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const t=this.parent.is("text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof Gi);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=Zi._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new Ji(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let i=0;for(;e[i]==n[i]&&e[i];)i++;return 0===i?null:e[i-1]}is(t){return"position"==t||"view:position"==t}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const i=li(e,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return e[i]0?new this(n,i):new this(i,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(Zi._createBefore(t),e)}}function to(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}function eo(t){let e=0;for(const n of t)e++;return e}class no{constructor(t=null,e,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(t,e,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const i of t._ranges)if(e.isEqual(i)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=eo(this.getRanges());if(e!=eo(t.getRanges()))return!1;if(0==e)return!0;for(let n of this.getRanges()){n=n.getTrimmed();let e=!1;for(let i of t.getRanges())if(i=i.getTrimmed(),n.start.isEqual(i.start)&&n.end.isEqual(i.end)){e=!0;break}if(!e)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const t=this.getFirstRange();let e=t.start.nodeAfter,n=t.end.nodeBefore;return t.start.parent.is("text")&&t.start.isAtEnd&&t.start.parent.nextSibling&&(e=t.start.parent.nextSibling),t.end.parent.is("text")&&t.end.isAtStart&&t.end.parent.previousSibling&&(n=t.end.parent.previousSibling),e instanceof vi&&e==n?e:null}setTo(t,e,n){if(null===t)this._setRanges([]),this._setFakeOptions(e);else if(t instanceof no||t instanceof io)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Xi)this._setRanges([t],e&&e.backward),this._setFakeOptions(e);else if(t instanceof Zi)this._setRanges([new Xi(t)]),this._setFakeOptions(e);else if(t instanceof hi){const i=!!n&&!!n.backward;let o;if(void 0===e)throw new Gn.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);o="in"==e?Xi._createIn(t):"on"==e?Xi._createOn(t):new Xi(Zi._createAt(t,e)),this._setRanges([o],i),this._setFakeOptions(n)}else{if(!gi(t))throw new Gn.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(t,e&&e.backward),this._setFakeOptions(e)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new Gn.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);const n=Zi._createAt(t,e);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==n.compareWith(i)?this._addRange(new Xi(n,i),!0):this._addRange(new Xi(i,n)),this.fire("change")}is(t){return"selection"==t||"view:selection"==t}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const n of t)this._addRange(n);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof Xi))throw new Gn.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new Gn.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:t,intersectingRange:e});this._ranges.push(new Xi(t.start,t.end))}}ci(no,ei);class io{constructor(t=null,e,n){this._selection=new no,this._selection.delegate("change").to(this),this._selection.setTo(t,e,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return"selection"==t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setFocus(t,e){this._selection.setFocus(t,e)}}ci(io,ei);class oo{constructor(t={}){this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[]}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){let n;const i=this._idProperty;if(i in t){if("string"!=typeof(n=t[i]))throw new Gn.b("collection-add-invalid-id",this);if(this.get(n))throw new Gn.b("collection-add-item-already-exists",this)}else t[i]=n=Jn();if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new Gn.b("collection-add-item-invalid-index",this);return this._items.splice(e,0,t),this._itemMap.set(n,t),this.fire("add",t,e),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new Gn.b("collection-get-invalid-arg: Index or id must be given.",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,this._items.indexOf(e)}remove(t){let e,n,i,o=!1;const r=this._idProperty;if("string"==typeof t?(n=t,o=!(i=this._itemMap.get(n)),i&&(e=this._items.indexOf(i))):"number"==typeof t?(e=t,o=!(i=this._items[e]),i&&(n=i[r])):(n=(i=t)[r],o=-1==(e=this._items.indexOf(i))||!this._itemMap.get(n)),o)throw new Gn.b("collection-remove-404: Item not found.",this);this._items.splice(e,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(s),this.fire("remove",i,e),i}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(t){if(this._bindToCollection)throw new Gn.b("collection-bind-to-rebind: The collection cannot be bound more than once.",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{"function"==typeof t?this._setUpBindToBinding(e=>t(e)):this._setUpBindToBinding(e=>e[t])}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,i,o)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(i);if(r&&s)this._bindToExternalToInternalMap.set(i,s),this._bindToInternalToExternalMap.set(s,i);else{const n=t(i);if(!n)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const t of this._skippedIndexesFromExternal)o>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(i,n),this._bindToInternalToExternalMap.set(n,i),this.add(n,r);for(let t=0;t{const i=this._bindToExternalToInternalMap.get(e);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>(ne&&t.push(e),t),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}ci(oo,ei);class ro{constructor(){this.selection=new io,this.roots=new oo({idProperty:"rootName"}),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy()),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t))break}while(e)}}ci(ro,Fi);const so=10;class ao extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=co,this._priority=so,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new Gn.b("attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",this);return new Set(this._clonesGroup)}is(t,e=null){const n=t&&t.replace(/^view:/,"");return e?"attributeElement"==n&&e==this.name||super.is(t,e):"attributeElement"==n||super.is(t)}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function co(){if(lo(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(lo(t)>1)return null;t=t.parent}return!t||lo(t)>1?null:this.childCount}function lo(t){return Array.from(t.getChildren()).filter(t=>!t.is("uiElement")).length}ao.DEFAULT_PRIORITY=so;class uo extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=ho}is(t,e=null){const n=t.replace(/^view:/,"");return e?"emptyElement"==n&&e==this.name||super.is(t,e):"emptyElement"==n||super.is(t)}_insertChild(t,e){if(e&&(e instanceof hi||Array.from(e).length>0))throw new Gn.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,e])}}function ho(){return null}const fo=navigator.userAgent.toLowerCase();var po={isMac:function(t){return t.indexOf("macintosh")>-1}(fo),isEdge:function(t){return!!t.match(/edge\/(\d+.?\d*)/)}(fo),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(fo),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(fo),isAndroid:function(t){return t.indexOf("android")>-1}(fo),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}};const mo={"⌘":"ctrl","⇧":"shift","⌥":"alt"},go={ctrl:"⌘",shift:"⇧",alt:"⌥"},bo=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let e=65;e<=90;e++){const n=String.fromCharCode(e);t[n.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;return t}();function wo(t){let e;if("string"==typeof t){if(!(e=bo[t.toLowerCase()]))throw new Gn.b("keyboard-unknown-key: Unknown key name.",null,{key:t})}else e=t.keyCode+(t.altKey?bo.alt:0)+(t.ctrlKey?bo.ctrl:0)+(t.shiftKey?bo.shift:0);return e}function vo(t){return"string"==typeof t&&(t=_o(t)),t.map(t=>"string"==typeof t?wo(t):t).reduce((t,e)=>e+t,0)}function _o(t){return t.split(/\s*\+\s*/)}class ko extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=xo}is(t,e=null){const n=t.replace(/^view:/,"");return e?"uiElement"==n&&e==this.name||super.is(t,e):"uiElement"==n||super.is(t)}_insertChild(t,e){if(e&&(e instanceof hi||Array.from(e).length>0))throw new Gn.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const n of this.getAttributeKeys())e.setAttribute(n,this.getAttribute(n));return e}}function yo(t){t.document.on("keydown",(e,n)=>function(t,e,n){if(e.keyCode==bo.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),i=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(i||e.shiftKey){const e=t.focusNode,o=t.focusOffset,r=n.domPositionToView(e,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement"))));if(s){const e=n.viewPositionToDom(a);i?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,n,t.domConverter))}function xo(){return null}class Ao{constructor(t){this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"==t||"view:documentFragment"==t}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const i=function(t){return"string"==typeof t?[new fi(t)]:(gi(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new fi(t):t instanceof pi?new fi(t.data):t))}(e);for(const o of i)null!==o.parent&&o._remove(),o.parent=this,this._children.splice(t,0,o),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;ni instanceof t))throw new Gn.b("view-writer-insert-invalid-node",n);i.is("text")||t(i.getChildren(),n)}})(e=gi(e)?[...e]:[e],this.document);const n=To(t);if(!n)throw new Gn.b("view-writer-invalid-position-container",this.document);const i=this._breakAttributes(t,!0),o=n._insertChild(i.offset,e);for(const a of e)this._addToClonedElementsGroup(a);const r=i.getShiftedBy(o),s=this.mergeAttributes(i);if(0===o)return new Xi(s,s);{s.isEqual(i)||r.offset--;const t=this.mergeAttributes(r);return new Xi(s,t)}}remove(t){const e=t instanceof Xi?t:Xi._createOn(t);if(No(e,this.document),e.isCollapsed)return new Ao;const{start:n,end:i}=this._breakAttributesRange(e,!0),o=n.parent,r=i.offset-n.offset,s=o._removeChildren(n.offset,r);for(const c of s)this._removeFromClonedElementsGroup(c);const a=this.mergeAttributes(n);return e.start=a,e.end=a.clone(),new Ao(s)}clear(t,e){No(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of n){const n=i.item;let o;if(n.is("element")&&e.isSimilar(n))o=Xi._createOn(n);else if(!i.nextPosition.isAfter(t.start)&&n.is("textProxy")){const t=n.getAncestors().find(t=>t.is("element")&&e.isSimilar(t));t&&(o=Xi._createIn(t))}o&&(o.end.isAfter(t.end)&&(o.end=t.end),o.start.isBefore(t.start)&&(o.start=t.start),this.remove(o))}}move(t,e){let n;if(e.isAfter(t.end)){const i=(e=this._breakAttributes(e,!0)).parent,o=i.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=i.childCount-o}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof ao))throw new Gn.b("view-writer-wrap-invalid-attribute",this.document);if(No(t,this.document),t.isCollapsed){let n=t.start;n.parent.is("element")&&!function(t){return Array.from(t.getChildren()).some(t=>!t.is("uiElement"))}(n.parent)&&(n=n.getLastMatchingPosition(t=>t.item.is("uiElement"))),n=this._wrapPosition(n,e);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(t.start)&&this.setSelection(n),new Xi(n)}return this._wrapRange(t,e)}unwrap(t,e){if(!(e instanceof ao))throw new Gn.b("view-writer-unwrap-invalid-attribute",this.document);if(No(t,this.document),t.isCollapsed)return t;const{start:n,end:i}=this._breakAttributesRange(t,!0),o=n.parent,r=this._unwrapChildren(o,n.offset,i.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Xi(s,a)}rename(t,e){const n=new yi(t,e.getAttributes());return this.insert(Zi._createAfter(e),n),this.move(Xi._createIn(e),Zi._createAt(n,0)),this.remove(Xi._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return Zi._createAt(t,e)}createPositionAfter(t){return Zi._createAfter(t)}createPositionBefore(t){return Zi._createBefore(t)}createRange(t,e){return new Xi(t,e)}createRangeOn(t){return Xi._createOn(t)}createRangeIn(t){return Xi._createIn(t)}createSelection(t,e,n){return new no(t,e,n)}_wrapChildren(t,e,n,i){let o=e;const r=[];for(;o!1,t.parent._insertChild(t.offset,n);const i=new Xi(t,t.getShiftedBy(1));this.wrap(i,e);const o=new Zi(n.parent,n.index);n._remove();const r=o.nodeBefore,s=o.nodeAfter;return r instanceof fi&&s instanceof fi?Mo(r,s):Po(o)}_wrapAttributeElement(t,e){if(!Ro(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!Ro(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,i=t.end;if(No(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new Xi(n,n)}const o=this._breakAttributes(i,e),r=o.parent.childCount,s=this._breakAttributes(n,e);return o.offset+=o.parent.childCount-r,new Xi(s,o)}_breakAttributes(t,e=!1){const n=t.offset,i=t.parent;if(t.parent.is("emptyElement"))throw new Gn.b("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new Gn.b("view-writer-cannot-break-ui-element",this.document);if(!e&&i.is("text")&&Oo(i.parent))return t.clone();if(Oo(i))return t.clone();if(i.is("text"))return this._breakAttributes(Eo(t),e);if(n==i.childCount){const t=new Zi(i.parent,i.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new Zi(i.parent,i.index);return this._breakAttributes(t,e)}{const t=i.index+1,o=i._clone();i.parent._insertChild(t,o),this._addToClonedElementsGroup(o);const r=i.childCount-n,s=i._removeChildren(n,r);o._appendChild(s);const a=new Zi(i.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const i of t.getChildren())this._addToClonedElementsGroup(i);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const i of t.getChildren())this._removeFromClonedElementsGroup(i);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function To(t){let e=t.parent;for(;!Oo(e);){if(!e)return;e=e.parent}return e}function So(t,e){return t.prioritye.priority)&&t.getIdentity()t.createTextNode(" "),Lo=t=>{const e=t.createElement("br");return e.dataset.ckeFiller=!0,e},Vo=7,zo=(()=>{let t="";for(let e=0;e0&&(r=r.concat(Array(n).fill("equal"))),o-n>0&&(r=r.concat(Array(o-n).fill("insert"))),i-n>0&&(r=r.concat(Array(i-n).fill("delete"))),o0&&n.push({index:i,type:"insert",values:t.slice(i,r)}),o-i>0&&n.push({index:i+(r-i),type:"delete",howMany:o-i}),n}(e,o)}function qo(t,e,n){for(let i=0;i200||o>200||i+o>300)return Yo.fastDiff(t,e,n,!0);let r,s;if(ol?-1:1;u[i+h]&&(u[i]=u[i+h].slice(0)),u[i]||(u[i]=[]),u[i].push(o>l?r:s);let f=Math.max(o,l),p=f-i;for(;pl;f--)d[f]=h(f);d[l]=h(l),p++}while(d[l]!==c);return u[l].slice(1)}function Go(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function Qo(t){const e=t.parentNode;e&&e.removeChild(t)}function Ko(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}Yo.fastDiff=Ho;class Jo{constructor(t,e){this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t)throw new Gn.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(e)}}}render(){let t;for(const e of this.markedChildren)this._updateChildrenMappings(e);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent));for(const e of this.markedAttributes)this._updateAttrs(e);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;Bo(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=Zo(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=this.domConverter.mapViewToDom(t).childNodes,i=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(n,i),r=this._findReplaceActions(o,n,i);if(-1!==r.indexOf("replace")){const e={equal:0,insert:0,delete:0};for(const o of r)if("replace"===o){const o=e.equal+e.insert,r=e.equal+e.delete,s=t.getChild(o);s&&!s.is("uiElement")&&this._updateElementMappings(s,n[r]),Qo(i[o]),e.equal++}else e[o]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("text")?Zi._createBefore(this.selection.getFirstPosition().parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&jo(e.parent)&&Bo(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!Bo(t))throw new Gn.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);Fo(t)?t.parentNode.removeChild(t):t.data=t.data.substr(Vo),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor(t=>t.hasAttribute("contenteditable"));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const i=t.nodeBefore,o=t.nodeAfter;return!(i instanceof fi||o instanceof fi)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t),i=this.domConverter.viewToDom(t,n.ownerDocument),o=n.data;let r=i.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index&&(r=zo+r),o!=r){const t=Ho(o,r);for(const e of t)"insert"===e.type?n.insertData(e.index,e.values.join("")):n.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map(t=>t.name),i=t.getAttributeKeys();for(const o of i)e.setAttribute(o,t.getAttribute(o));for(const o of n)t.hasAttribute(o)||e.removeAttribute(o)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;const i=e.inlineFillerPosition,o=this.domConverter.mapViewToDom(t).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(t,n.ownerDocument,{bind:!0,inlineFillerPosition:i}));i&&i.parent===t&&Zo(n.ownerDocument,r,i.offset);const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const l of s)"insert"===l?(Go(n,a,r[a]),a++):"delete"===l?(c.add(o[a]),Qo(o[a])):(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const l of c)l.parentNode||this.domConverter.unbindDomElement(l)}_diffNodeLists(t,e){return Yo(t=function(t,e){const n=Array.from(t);return 0!=n.length&&e?(n[n.length-1]==e&&n.pop(),n):n}(t,this._fakeSelectionContainer),e,function(t,e,n){return e===n||(jo(e)&&jo(n)?e.data===n.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(n)))}.bind(null,this.domConverter))}_findReplaceActions(t,e,n){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let i=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of t)"insert"===a?r.push(n[s.equal+s.insert]):"delete"===a?o.push(e[s.equal+s.delete]):((i=i.concat(Yo(o,r,Xo).map(t=>"equal"===t?"replace":t))).push("equal"),o=[],r=[]),s[a]++;return i.concat(Yo(o,r,Xo).map(t=>"equal"===t?"replace":t))}_markDescendantTextToSync(t){if(t)if(t.is("text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(t))return;n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const i=e.getSelection(),o=e.createRange();i.removeAllRanges(),o.selectNodeContents(n),i.addRange(o)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.focus(),e.collapse(n.parent,n.offset),e.extend(i.parent,i.offset),po.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const i=n.childNodes[t.offset];i&&"BR"==i.tagName&&e.addRange(e.getRangeAt(0))}(i,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,n=t.ownerDocument.getSelection();return!e||e.parentElement!==t||n.anchorNode!==e&&!e.contains(n.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const t of this.domDocuments)if(t.getSelection().rangeCount){const e=t.activeElement,n=this.domConverter.mapDomToView(e);e&&n&&t.getSelection().removeAllRanges()}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function Zo(t,e,n){const i=e instanceof Array?e:e.childNodes,o=i[n];if(jo(o))return o.data=zo+o.data,o;{const o=t.createTextNode(zo);return Array.isArray(e)?i.splice(n,0,o):Go(e,n,o),o}}function Xo(t,e){return Ko(t)&&Ko(e)&&!jo(t)&&!jo(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}ci(Jo,Fi);var tr={window:window,document:document};function er(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function nr(t){const e=[];for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}const ir=Lo(document);class or{constructor(t={}){this.blockFillerMode=t.blockFillerMode||"br",this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption"],this._blockFiller="br"==this.blockFillerMode?Lo:Do,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new no(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of Array.from(t.childNodes))this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}viewToDom(t,e,n={}){if(t.is("text")){const n=this._processDataFromViewText(t);return e.createTextNode(n)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let i;if(t.is("documentFragment"))i=e.createDocumentFragment(),n.bind&&this.bindDocumentFragments(i,t);else{if(t.is("uiElement"))return i=t.render(e),n.bind&&this.bindElements(i,t),i;i=t.hasAttribute("xmlns")?e.createElementNS(t.getAttribute("xmlns"),t.name):e.createElement(t.name),n.bind&&this.bindElements(i,t);for(const e of t.getAttributeKeys())i.setAttribute(e,t.getAttribute(e))}if(n.withChildren||void 0===n.withChildren)for(const o of this.viewChildrenToDom(t,e,n))i.appendChild(o);return i}}*viewChildrenToDom(t,e,n={}){const i=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const r of t.getChildren())i===o&&(yield this._blockFiller(e)),yield this.viewToDom(r,e,n),o++;i===o&&(yield this._blockFiller(e))}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),i=document.createRange();return i.setStart(e.parent,e.offset),i.setEnd(n.parent,n.offset),i}viewPositionToDom(t){const e=t.parent;if(e.is("text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let i=t.offset;return Bo(n)&&(i+=Vo),{parent:n,offset:i}}{let n,i,o;if(0===t.offset){if(!(n=this.mapViewToDom(e)))return null;o=n.childNodes[0]}else{const e=t.nodeBefore;if(!(i=e.is("text")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore)))return null;n=i.parentNode,o=i.nextSibling}return jo(o)&&Bo(o)?{parent:o,offset:Vo}:{parent:n,offset:i?er(i)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t,this.blockFillerMode))return null;const n=this.getParentUIElement(t,this._domToViewMapping);if(n)return n;if(jo(t)){if(Fo(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new fi(e)}}if(this.isComment(t))return null;{if(this.mapDomToView(t))return this.mapDomToView(t);let n;if(this.isDocumentFragment(t))n=new Ao,e.bind&&this.bindDocumentFragments(t,n);else{const i=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();n=new vi(i),e.bind&&this.bindElements(t,n);const o=t.attributes;for(let t=o.length-1;t>=0;t--)n._setAttribute(o[t].name,o[t].value)}if(e.withChildren||void 0===e.withChildren)for(const i of this.domChildrenToView(t,e))n._appendChild(i);return n}}*domChildrenToView(t,e={}){for(let n=0;n{const{scrollLeft:e,scrollTop:n}=t;i.push([e,n])}),e.focus(),sr(e,t=>{const[e,n]=i.shift();t.scrollLeft=e,t.scrollTop=n}),tr.window.scrollTo(t,n)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(ir):function(t,e){return jo(t)&&" "==t.data&&function(t,e){const n=t.parentNode;return n&&n.tagName&&e.includes(n.tagName.toLowerCase())}(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const n=e.collapsed;return e.detach(),n}getParentUIElement(t){const e=nr(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&n.is("uiElement"))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}_isDomSelectionPositionCorrect(t,e){if(jo(t)&&Bo(t)&&ethis.preElements.includes(t.name)))return e;if(" "==e.charAt(0)){const n=this._getTouchingViewTextNode(t,!1);(!n||!this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingViewTextNode(t,!0);" "!=e.charAt(e.length-2)&&n&&" "!=n.data.charAt(0)||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(rr(t,this.preElements))return Uo(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(t,!1),i=this._getTouchingInlineDomNode(t,!0),o=this._checkShouldLeftTrimDomText(n),r=this._checkShouldRightTrimDomText(t,i);return o&&(e=e.replace(/^ /,"")),r&&(e=e.replace(/ $/,"")),e=(e=Uo(new Text(e))).replace(/ \u00A0/g," "),(/( |\u00A0)\u00A0$/.test(e)||!i||i.data&&" "==i.data.charAt(0))&&(e=e.replace(/\u00A0$/," ")),o&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t){return!t||!!qn(t)||/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1))}_checkShouldRightTrimDomText(t,e){return!e&&!Bo(t)}_getTouchingViewTextNode(t,e){const n=new Ji({startPosition:e?Zi._createAfter(t):Zi._createBefore(t),direction:e?"forward":"backward"});for(const i of n){if(i.item.is("containerElement"))return null;if(i.item.is("br"))return null;if(i.item.is("textProxy"))return i.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const n=e?"nextNode":"previousNode",i=t.ownerDocument,o=nr(t)[0],r=i.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:t=>jo(t)||"BR"==t.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});r.currentNode=t;const s=r[n]();if(null!==s){const e=function(t,e){const n=nr(t),i=nr(e);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}(t,s);if(e&&!rr(t,this.blockElements,e)&&!rr(s,this.blockElements,e))return s}return null}}function rr(t,e,n){let i=nr(t);return n&&(i=i.slice(i.indexOf(n)+1)),i.some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}function sr(t,e){for(;t&&t!=tr.document;)e(t),t=t.parentNode}function ar(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}var cr=Di({},ei,{listenTo(t,...e){if(Ko(t)||ar(t)){const n=this._getProxyEmitter(t)||new lr(t);n.attach(...e),t=n}ei.listenTo.call(this,t,...e)},stopListening(t,e,n){if(Ko(t)||ar(t)){const e=this._getProxyEmitter(t);if(!e)return;t=e}ei.stopListening.call(this,t,e,n),t instanceof lr&&t.detach(e)},_getProxyEmitter(t){return function(t,e){return t[Xn]&&t[Xn][e]?t[Xn][e].emitter:null}(this,ur(t))}});class lr{constructor(t){ni(this,ur(t)),this._domNode=t}}function ur(t){return t["data-ck-expando"]||(t["data-ck-expando"]=Jn())}Di(lr.prototype,ei,{attach(t,e,n={}){if(this._domListeners&&this._domListeners[t])return;const i=this._createDomListener(t,!!n.useCapture);this._domNode.addEventListener(t,i,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[t]=i},detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()},_createDomListener(t,e){const n=e=>{this.fire(t,e)};return n.removeListener=()=>{this._domNode.removeEventListener(t,n,e),delete this._domListeners[t]},n}});class dr{constructor(t){this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}ci(dr,cr);var hr="__lodash_hash_undefined__",fr=function(t){return this.__data__.set(t,hr),this},pr=function(t){return this.__data__.has(t)};function mr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new St;++ea))return!1;var l=r.get(t);if(l&&r.get(e))return l==e;var u=-1,d=!0,h=n&_r?new gr:void 0;for(r.set(t,e),r.set(e,t);++u{this.listenTo(t,e,(t,e)=>{this.isEnabled&&this.onDomEvent(e)},{useCapture:this.useCapture})})}fire(t,e,n){this.isEnabled&&this.document.fire(t,new Zr(this.view,e,n))}}class ts extends Xr{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,get keystroke(){return wo(this)}})}}var es=function(){return i.a.Date.now()},ns="[object Symbol]",is=function(t){return"symbol"==typeof t||w(t)&&m(t)==ns},os=NaN,rs=/^\s+|\s+$/g,ss=/^[-+]0x[0-9a-f]+$/i,as=/^0b[01]+$/i,cs=/^0o[0-7]+$/i,ls=parseInt,us=function(t){if("number"==typeof t)return t;if(is(t))return os;if(B(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=B(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(rs,"");var n=as.test(t);return n||cs.test(t)?ls(t.slice(2),n?2:8):ss.test(t)?os:+t},ds="Expected a function",hs=Math.max,fs=Math.min,ps=function(t,e,n){var i,o,r,s,a,c,l=0,u=!1,d=!1,h=!0;if("function"!=typeof t)throw new TypeError(ds);function f(e){var n=i,r=o;return i=o=void 0,l=e,s=t.apply(r,n)}function p(t){var n=t-c;return void 0===c||n>=e||n<0||d&&t-l>=r}function m(){var t=es();if(p(t))return g(t);a=setTimeout(m,function(t){var n=e-(t-c);return d?fs(n,r-(t-l)):n}(t))}function g(t){return a=void 0,h&&i?f(t):(i=o=void 0,s)}function b(){var t=es(),n=p(t);if(i=arguments,o=this,c=t,n){if(void 0===a)return function(t){return l=t,a=setTimeout(m,e),u?f(t):s}(c);if(d)return clearTimeout(a),a=setTimeout(m,e),f(c)}return void 0===a&&(a=setTimeout(m,e)),s}return e=us(e)||0,B(n)&&(u=!!n.leading,r=(d="maxWait"in n)?hs(us(n.maxWait)||0,e):r,h="trailing"in n?!!n.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=o=a=void 0},b.flush=function(){return void 0===a?s:g(es())},b};class ms extends dr{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=ps(t=>this.document.fire("selectionChangeDone",t),200)}observe(){const t=this.document;t.on("keydown",(e,n)=>{t.selection.isFake&&function(t){return t==bo.arrowright||t==bo.arrowleft||t==bo.arrowup||t==bo.arrowdown}(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new no(e.getRanges(),{backward:e.isBackward,fake:!1});t!=bo.arrowleft&&t!=bo.arrowup||n.setTo(n.getFirstPosition()),t!=bo.arrowright&&t!=bo.arrowdown||n.setTo(n.getLastPosition());const i={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}class gs extends dr{constructor(t){super(t),this.mutationObserver=t.getObserver(Jr),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=ps(t=>this.document.fire("selectionChangeDone",t),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument;this._documents.has(e)||(this.listenTo(e,"selectionchange",()=>{this._handleSelectionChange(e)}),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(t){if(!this.isEnabled||!this.document.isFocused&&!this.document.isReadOnly)return;this.mutationObserver.flush();const e=t.defaultView.getSelection(),n=this.domConverter.domSelectionToView(e);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(e)||++this._loopbackCounter>60))if(this.selection.isSimilar(n))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:n,domSelection:e};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class bs extends Xr{constructor(t){super(t),this.domEventType=["focus","blur"],this.useCapture=!0;const e=this.document;e.on("focus",()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>t.forceRender(),50)}),e.on("blur",(n,i)=>{const o=e.selection.editableElement;null!==o&&o!==i.target||(e.isFocused=!1,t.forceRender())})}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ws extends Xr{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",()=>{e.isComposing=!0}),e.on("compositionend",()=>{e.isComposing=!1})}onDomEvent(t){this.fire(t.type,t)}}class vs extends Xr{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}function _s(t){return"[object Range]"==Object.prototype.toString.apply(t)}function ks(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const ys=["top","right","bottom","left","width","height"];class xs{constructor(t){const e=_s(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),qn(t)||e)As(this,e?xs.getDomRangeRects(t)[0]:t.getBoundingClientRect());else if(ar(t)){const{innerWidth:e,innerHeight:n}=t;As(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else As(this,t)}clone(){return new xs(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new xs(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!Cs(t)){let n=t.parentNode||t.commonAncestorContainer;for(;n&&!Cs(n);){const t=new xs(n),i=e.getIntersection(t);if(!i)return null;i.getArea()js(t,i));const s=js(t,i);if(Ss(i,s,e),i.parent!=i){if(o=i.frameElement,i=i.parent,!o)return}else i=null}}function Ss(t,e,n){const i=e.clone().moveBy(0,n),o=e.clone().moveBy(0,-n),r=new xs(t).excludeScrollbarsAndBorders();if(![o,i].every(t=>r.contains(t))){let{scrollX:s,scrollY:a}=t;Ms(o,r)?a-=r.top-e.top+n:Es(i,r)&&(a+=e.bottom-r.bottom+n),Is(e,r)?s-=r.left-e.left+n:Os(e,r)&&(s+=e.right-r.right+n),t.scrollTo(s,a)}}function Ps(t,e){const n=Ns(t);let i,o;for(;t!=n.document.body;)o=e(),(i=new xs(t).excludeScrollbarsAndBorders()).contains(o)||(Ms(o,i)?t.scrollTop-=i.top-o.top:Es(o,i)&&(t.scrollTop+=o.bottom-i.bottom),Is(o,i)?t.scrollLeft-=i.left-o.left:Os(o,i)&&(t.scrollLeft+=o.right-i.right)),t=t.parentNode}function Es(t,e){return t.bottom>e.bottom}function Ms(t,e){return t.tope.right}function Ns(t){return _s(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function Rs(t){if(_s(t)){let e=t.commonAncestorContainer;return jo(e)&&(e=e.parentNode),e}return t.parentNode}function js(t,e){const n=Ns(t),i=new xs(t);if(n===e)return i;{let t=n;for(;t!=e;){const e=t.frameElement,n=new xs(e).excludeScrollbarsAndBorders();i.moveBy(n.left,n.top),t=t.parent}}return i}Object.assign({},{scrollViewportToShowTarget:Ts,scrollAncestorsToShowTarget:function(t){Ps(Rs(t),()=>new xs(t))}});class Ds{constructor(){this.document=new ro,this.domConverter=new or,this.domRoots=new Map,this.set("isRenderingInProgress",!1),this._renderer=new Jo(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Co(this.document),this.addObserver(Jr),this.addObserver(gs),this.addObserver(bs),this.addObserver(ts),this.addObserver(ms),this.addObserver(ws),po.isAndroid&&this.addObserver(vs),function(t){t.document.on("keydown",$o)}(this),yo(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const i={};for(const{name:r,value:s}of Array.from(t.attributes))i[r]=s,"class"===r?this._writer.addClass(s.split(" "),n):this._writer.setAttribute(r,s,n);this._initialDomRootAttributes.set(t,i);const o=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};o(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",(t,e)=>this._renderer.markToSync("children",e)),n.on("change:attributes",(t,e)=>this._renderer.markToSync("attributes",e)),n.on("change:text",(t,e)=>this._renderer.markToSync("text",e)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const r of this._observers.values())r.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const n=this._initialDomRootAttributes.get(e);for(const i in n)e.setAttribute(i,n[i]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[n,i]of this.domRoots)e.observe(i,n);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&Ts({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new Gn.b("cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){Gn.b.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return Zi._createAt(t,e)}createPositionAfter(t){return Zi._createAfter(t)}createPositionBefore(t){return Zi._createBefore(t)}createRange(t,e){return new Xi(t,e)}createRangeOn(t){return Xi._createOn(t)}createRangeIn(t){return Xi._createIn(t)}createSelection(t,e,n){return new no(t,e,n)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}function Ls(t){return C(t)?mi(t):new Map(t)}ci(Ds,Fi);class Vs{constructor(t){this.parent=null,this._attrs=Ls(t)}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new Gn.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new Gn.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}get document(){return this.root==this?null:this.root.document||null}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),i=t.getAncestors(e);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),i=li(e,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return e[i](t[e[0]]=e[1],t),{})),t}is(t){return"node"==t||"model:node"==t}_clone(){return new Vs(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Ls(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class zs extends Vs{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return"text"==t||"model:text"==t||super.is(t)}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new zs(this.data,this.getAttributes())}static fromJSON(t){return new zs(t.data,t.attributes)}}class Bs{constructor(t,e,n){if(this.textNode=t,e<0||e>t.offsetSize)throw new Gn.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(n<0||e+n>t.offsetSize)throw new Gn.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return"textProxy"==t||"model:textProxy"==t}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Fs{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new Gn.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&tt.toJSON())}}class Us extends Vs{constructor(t,e,n){super(e),this.name=t,this._children=new Fs,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){const n=t.replace(/^model:/,"");return e?"element"==n&&e==this.name:"element"==n||n==this.name||super.is(t)}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map(t=>t._clone(!0)):null;return new Us(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){return"string"==typeof t?[new zs(t)]:(gi(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new zs(t):t instanceof Bs?new zs(t.data,t.getAttributes()):t))}(e);for(const i of n)null!==i.parent&&i._remove(),i.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const i of n)i.parent=null;return n}static fromJSON(t){let e=null;if(t.children){e=[];for(const n of t.children)n.name?e.push(Us.fromJSON(n)):e.push(zs.fromJSON(n))}return new Us(t.name,t.attributes,e)}}class $s{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new Gn.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new Gn.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Ws._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(t){let e,n,i,o;do{i=this.position,o=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=i,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};const i=e.textNode?e.textNode:e.nodeAfter;if(i instanceof Us)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=i),this.position=e,Hs("elementStart",i,t,e,1);if(i instanceof zs){let o;if(this.singleCharacters)o=1;else{let t=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsett&&(t=this.boundaries.start.offset),o=e.offset-t}const r=e.offset-i.startOffset,s=new Bs(i,r-o,o);return e.offset-=o,this.position=e,Hs("text",s,t,e,o)}return e.path.pop(),this.position=e,this._visitedParent=n.parent,Hs("elementStart",n,t,e,1)}}function Hs(t,e,n,i,o){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:o}}}var qs=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};class Ws{constructor(t,e,n="toNone"){if(!t.is("element")&&!t.is("documentFragment"))throw new Gn.b("model-position-root-invalid: Position root invalid.",t);if(!(e instanceof Array)||0===e.length)throw new Gn.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",t,{path:e});e=t.getPath().concat(e),t=t.root,this.root=t,this.path=e,this.stickiness=n}get offset(){return qs(this.path)}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;en.path.length){if(e.offset!==i.maxOffset)return!1;e.path=e.path.slice(0,-1),i=i.parent,e.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(t){return"position"==t||"model:position"==t}hasSameParentAs(t){return this.root===t.root&&"same"==li(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Ws._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.start.isEqual(this)?(n=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(n=n._getTransformedByDeletion(t.deletionPosition,1))):n=this.isEqual(t.deletionPosition)?Ws._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=Ws._createAt(this);if(this.root!=t.root)return n;if("same"==li(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;n.offset-=e}}else if("prefix"==li(t.getParentPath(),this.getParentPath())){const i=t.path.length-1;if(t.offset<=this.path[i]){if(t.offset+e>this.path[i])return null;n.path[i]-=e}}return n}_getTransformedByInsertion(t,e){const n=Ws._createAt(this);if(this.root!=t.root)return n;if("same"==li(t.getParentPath(),this.getParentPath()))(t.offsete+1;){const e=i.maxOffset-n.offset;0!==e&&t.push(new Ys(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,i=i.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],i=e-n.offset;0!==i&&t.push(new Ys(n,n.getShiftedBy(i))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new $s(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new $s(t);for(const n of e)yield n.item}*getPositions(t={}){t.boundaries=this;const e=new $s(t);yield e.position;for(const n of e)yield n.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new Ys(this.start,this.end)]}getTransformedByOperations(t){const e=[new Ys(this.start,this.end)];for(const n of t)for(let t=0;t0?new this(n,i):new this(i,n)}static _createIn(t){return new this(Ws._createAt(t,0),Ws._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Ws._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new Gn.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const n=t.indexOf(e),i=new this(e.start,e.end);if(n>0)for(let o=n-1;t[o].end.isEqual(i.start);o++)i.start=Ws._createAt(t[o].start);for(let o=n+1;o{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this._findPositionIn(n,e.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),i=this._viewToModelMapping.get(n),o=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=Ws._createAt(i,o)},{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);if(this._viewToModelMapping.delete(t),this._elementToMarkerNames.has(t))for(const n of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(n);this._modelToViewMapping.get(e)==t&&this._modelToViewMapping.delete(e)}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const i=this._elementToMarkerNames.get(t)||new Set;i.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,i)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const i=this._elementToMarkerNames.get(t);i&&(i.delete(e),0==i.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new Ys(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new Xi(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={isPhantom:!1}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const i of e)if(i.is("attributeElement"))for(const t of i.getElementsWithSameId())n.add(t);else n.add(i);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t)return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t);if(t.is("text"))return e;let i=0;for(let o=0;o1?e[0]+":"+e[1]:e[0]}class Js{constructor(t){this.conversionApi=Di({dispatcher:this},t)}convertChanges(t,e,n){for(const i of t.getMarkersToRemove())this.convertMarkerRemove(i.name,i.range,n);for(const i of t.getChanges())"insert"==i.type?this.convertInsert(Ys._createFromPositionAndShift(i.position,i.length),n):"remove"==i.type?this.convertRemove(i.position,i.length,i.name,n):this.convertAttribute(i.range,i.attributeKey,i.attributeOldValue,i.attributeNewValue,n);for(const i of this.conversionApi.mapper.flushUnboundMarkerNames()){const t=e.get(i).getRange();this.convertMarkerRemove(i,t,n),this.convertMarkerAdd(i,t,n)}for(const i of t.getMarkersToAdd())this.convertMarkerAdd(i.name,i.range,n)}convertInsert(t,e){this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(t);for(const n of t){const t=n.item,e={item:t,range:Ys._createFromPositionAndShift(n.previousPosition,n.length)};this._testAndFire("insert",e);for(const n of t.getAttributeKeys())e.attributeKey=n,e.attributeOldValue=null,e.attributeNewValue=t.getAttribute(n),this._testAndFire("attribute:"+n,e)}this._clearConversionApi()}convertRemove(t,e,n,i){this.conversionApi.writer=i,this.fire("remove:"+n,{position:t,length:e},this.conversionApi),this._clearConversionApi()}convertAttribute(t,e,n,i,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(t,"attribute:"+e);for(const r of t){const t={item:r.item,range:Ys._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:e,attributeOldValue:n,attributeNewValue:i};this._testAndFire("attribute:"+e,t)}this._clearConversionApi()}convertSelection(t,e,n){const i=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(t,i),this.fire("selection",{selection:t},this.conversionApi),t.isCollapsed){for(const e of i){const n=e.getRange();if(!Zs(t.getFirstPosition(),e,this.conversionApi.mapper))continue;const i={item:t,markerName:e.name,markerRange:n};this.conversionApi.consumable.test(t,"addMarker:"+e.name)&&this.fire("addMarker:"+e.name,i,this.conversionApi)}for(const e of t.getAttributeKeys()){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.conversionApi.consumable.test(t,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(t,e,n){if(!e.root.document||"$graveyard"==e.root.rootName)return;this.conversionApi.writer=n;const i="addMarker:"+t,o=new Qs;if(o.add(e,i),this.conversionApi.consumable=o,this.fire(i,{markerName:t,markerRange:e},this.conversionApi),o.test(e,i)){this.conversionApi.consumable=this._createConsumableForRange(e,i);for(const n of e.getItems()){if(!this.conversionApi.consumable.test(n,i))continue;const o={item:n,range:Ys._createOn(n),markerName:t,markerRange:e};this.fire(i,o,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(t,e,n){e.root.document&&"$graveyard"!=e.root.rootName&&(this.conversionApi.writer=n,this.fire("removeMarker:"+t,{markerName:t,markerRange:e},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(t){const e=new Qs;for(const n of t){const t=n.item;e.add(t,"insert");for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n)}return e}_createConsumableForRange(t,e){const n=new Qs;for(const i of t.getItems())n.add(i,e);return n}_createSelectionConsumable(t,e){const n=new Qs;n.add(t,"selection");for(const i of e)n.add(t,"addMarker:"+i.name);for(const i of t.getAttributeKeys())n.add(t,"attribute:"+i);return n}_testAndFire(t,e){if(!this.conversionApi.consumable.test(e.item,t))return;const n=e.item.name||"$text";this.fire(t+":"+n,e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function Zs(t,e,n){const i=e.getRange(),o=Array.from(t.getAncestors());return o.shift(),o.reverse(),!o.some(t=>{if(i.containsItem(t))return!!n.toViewElement(t).getCustomProperty("addHighlight")})}ci(Js,ei);class Xs{constructor(t,e,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,e,n)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const i of t._ranges)if(e.isEqual(i)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new Ys(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new Ys(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new Ys(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,n){if(null===t)this._setRanges([]);else if(t instanceof Xs)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Ys)this._setRanges([t],!!e&&!!e.backward);else if(t instanceof Ws)this._setRanges([new Ys(t)]);else if(t instanceof Vs){const i=!!n&&!!n.backward;let o;if("in"==e)o=Ys._createIn(t);else if("on"==e)o=Ys._createOn(t);else{if(void 0===e)throw new Gn.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,t]);o=new Ys(Ws._createAt(t,e))}this._setRanges([o],i)}else{if(!gi(t))throw new Gn.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,t]);this._setRanges(t,e&&!!e.backward)}}_setRanges(t,e=!1){const n=(t=Array.from(t)).some(e=>{if(!(e instanceof Ys))throw new Gn.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[this,t]);return this._ranges.every(t=>!t.isEqual(e))});if(t.length!==this._ranges.length||n){this._removeAllRanges();for(const e of t)this._pushRange(e);this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0})}}setFocus(t,e){if(null===this.anchor)throw new Gn.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,t]);const n=Ws._createAt(t,e);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(i)?(this._pushRange(new Ys(n,i)),this._lastRangeBackward=!0):(this._pushRange(new Ys(i,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const t=this.getFirstRange(),e=t.start.nodeAfter,n=t.end.nodeBefore;return e instanceof Us&&e==n?e:null}is(t){return"selection"==t||"model:selection"==t}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=na(e.start,t);n&&ia(n,e)&&(yield n);for(const o of e.getWalker()){const n=o.item;"elementEnd"==o.type&&ea(n,t,e)&&(yield n)}const i=na(e.end,t);i&&!e.end.isTouching(Ws._createAt(i,0))&&ia(i,e)&&(yield i)}}containsEntireContent(t=this.anchor.root){const e=Ws._createAt(t,0),n=Ws._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new Ys(t.start,t.end))}_checkRange(t){for(let e=0;e0;)this._popRange()}_popRange(){this._ranges.pop()}}function ta(t,e){return!e.has(t)&&(e.add(t),t.document.model.schema.isBlock(t)&&t.parent)}function ea(t,e,n){return ta(t,e)&&ia(t,n)}function na(t,e){const n=t.parent.document.model.schema,i=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=i.find(t=>!o&&!(o=n.isLimit(t))&&ta(t,e));return i.forEach(t=>e.add(t)),r}function ia(t,e){const n=function(t){const e=t.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}(t);return!n||!e.containsRange(Ys._createOn(n),!0)}ci(Xs,ei);class oa extends Ys{constructor(t,e){super(t,e),function(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&function(t){const e=this.getTransformedByOperation(t),n=Ys._createFromRanges(e),i=!n.isEqual(this),o=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(i){"$graveyard"==n.root.rootName&&(r="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:r})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:r})}.call(this,n)},{priority:"low"})}.call(this)}detach(){this.stopListening()}is(t){return"liveRange"==t||"model:liveRange"==t||super.is(t)}toRange(){return new Ys(this.start,this.end)}static fromRange(t){return new oa(t.start,t.end)}}ci(oa,ei);const ra="selection:";class sa{constructor(t){this._selection=new aa(t),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}is(t){return"selection"==t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return ra+t}static _isStoreAttributeKey(t){return t.startsWith(ra)}}ci(sa,ei);class aa extends Xs{constructor(t){super(),this.markers=new oo({idProperty:"name"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._fixGraveyardRangesData=[],this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,"applyOperation",(t,e)=>{const n=e[0];if(n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type){for(;this._fixGraveyardRangesData.length;){const{liveRange:t,sourcePosition:e}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(t,e)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1}))}},{priority:"lowest"}),this.on("change:range",()=>{for(const t of this.getRanges())if(!this._document._validateSelectionRange(t))throw new Gn.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:t})}),this.listenTo(this._model.markers,"update",()=>this._updateMarkers()),this.listenTo(this._document,"change",(t,e)=>{!function(t,e){const n=t.document.differ;for(const i of n.getChanges()){if("insert"!=i.type)continue;const n=i.position.parent,o=i.length===n.maxOffset;o&&t.enqueueChange(e,t=>{const e=Array.from(n.getAttributeKeys()).filter(t=>t.startsWith(ra));for(const i of e)t.removeAttribute(i,n)})}}(this._model,e)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t{this._hasChangedRange=!0,e.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:e,sourcePosition:i.deletionPosition})}),e}_updateMarkers(){const t=[];for(const e of this._model.markers){const n=e.getRange();for(const i of this.getRanges())n.containsRange(i,!i.isCollapsed)&&t.push(e)}for(const e of t)this.markers.has(e)||this.markers.add(e);for(const e of Array.from(this.markers))t.includes(e)||this.markers.remove(e)}_updateAttributes(t){const e=Ls(this._getSurroundingAttributes()),n=Ls(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[o,r]of this._attributePriority)"low"==r&&(this._attrs.delete(o),this._attributePriority.delete(o));this._setAttributesTo(e);const i=[];for(const[o,r]of this.getAttributes())n.has(o)&&n.get(o)===r||i.push(o);for(const[o]of n)this.hasAttribute(o)||i.push(o);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(t,e,n=!0){const i=n?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(t))&&super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,i),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,n),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[n,i]of this.getAttributes())t.get(n)!==i&&this._removeAttribute(n,!1);for(const[n,i]of t)this._setAttribute(n,i,!1)&&e.add(n);return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())e.startsWith(ra)&&(yield[e.substr(ra.length),t.getAttribute(e)])}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let n=null;if(this.isCollapsed){const e=t.textNode?t.textNode:t.nodeBefore,i=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=ca(e)),n||(n=ca(i)),!this.isGravityOverridden&&!n){let t=e;for(;t&&!n;)n=ca(t=t.previousSibling)}if(!n){let t=i;for(;t&&!n;)n=ca(t=t.nextSibling)}n||(n=this._getStoredAttributes())}else{const t=this.getFirstRange();for(const i of t){if(i.item.is("element")&&e.isObject(i.item))break;if("text"==i.type){n=i.item.getAttributes();break}}}return n}_fixGraveyardSelection(t,e){const n=e.clone(),i=this._model.schema.getNearestSelectionRange(n),o=this._ranges.indexOf(t);if(this._ranges.splice(o,1),t.detach(),i){const t=this._prepareRange(i);this._ranges.splice(o,0,t)}}}function ca(t){return t instanceof Bs||t instanceof zs?t.getAttributes():null}class la{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}var ua=1,da=4,ha=function(t){return Fn(t,ua|da)};class fa extends la{elementToElement(t){return this.add(function(t){return(t=ha(t)).view=ma(t.view,"container"),e=>{e.on("insert:"+t.model,function(t){return(e,n,i)=>{const o=t(n.item,i.writer);if(!o)return;if(!i.consumable.consume(n.item,"insert"))return;const r=i.mapper.toViewPosition(n.range.start);i.mapper.bindElements(n.item,o),i.writer.insert(r,o)}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}attributeToElement(t){return this.add(function(t){let e="attribute:"+((t=ha(t)).model.key?t.model.key:t.model);if(t.model.name&&(e+=":"+t.model.name),t.model.values)for(const i of t.model.values)t.view[i]=ma(t.view[i],"attribute");else t.view=ma(t.view,"attribute");const n=ga(t);return i=>{i.on(e,function(t){return(e,n,i)=>{const o=t(n.attributeOldValue,i.writer),r=t(n.attributeNewValue,i.writer);if(!o&&!r)return;if(!i.consumable.consume(n.item,e.name))return;const s=i.writer,a=s.document.selection;if(n.item instanceof Xs||n.item instanceof sa)s.wrap(a.getFirstRange(),r);else{let t=i.mapper.toViewRange(n.range);null!==n.attributeOldValue&&o&&(t=s.unwrap(t,o)),null!==n.attributeNewValue&&r&&s.wrap(t,r)}}}(n),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e="attribute:"+((t=ha(t)).model.key?t.model.key:t.model);if(t.model.name&&(e+=":"+t.model.name),t.model.values)for(const i of t.model.values)t.view[i]=ba(t.view[i]);else t.view=ba(t.view);const n=ga(t);return i=>{i.on(e,function(t){return(e,n,i)=>{const o=t(n.attributeOldValue,n),r=t(n.attributeNewValue,n);if(!o&&!r)return;if(!i.consumable.consume(n.item,e.name))return;const s=i.mapper.toViewElement(n.item),a=i.writer;if(!s)throw new Gn.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[n,i]);if(null!==n.attributeOldValue&&o)if("class"==o.key){const t=Array.isArray(o.value)?o.value:[o.value];for(const e of t)a.removeClass(e,s)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(o.key,s);if(null!==n.attributeNewValue&&r)if("class"==r.key){const t=Array.isArray(r.value)?r.value:[r.value];for(const e of t)a.addClass(e,s)}else if("style"==r.key){const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}}(n),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){return(t=ha(t)).view=ma(t.view,"ui"),e=>{e.on("addMarker:"+t.model,function(t){return(e,n,i)=>{n.isOpening=!0;const o=t(n,i.writer);n.isOpening=!1;const r=t(n,i.writer);if(!o||!r)return;const s=n.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,e.name))return;for(const t of s)if(!i.consumable.consume(t.item,e.name))return;const a=i.mapper,c=i.writer;c.insert(a.toViewPosition(s.start),o),i.mapper.bindElementToMarker(o,n.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,n.markerName)),e.stop()}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,(t.view,(t,e,n)=>{const i=n.mapper.markerNameToElements(e.markerName);if(i){for(const t of i)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{e.on("addMarker:"+t.model,function(t){return(e,n,i)=>{if(!n.item)return;if(!(n.item instanceof Xs||n.item instanceof sa||n.item.is("textProxy")))return;const o=wa(t,n,i);if(!o)return;if(!i.consumable.consume(n.item,e.name))return;const r=pa(o),s=i.writer,a=s.document.selection;if(n.item instanceof Xs||n.item instanceof sa)s.wrap(a.getFirstRange(),r,a);else{const t=i.mapper.toViewRange(n.range),e=s.wrap(t,r);for(const o of e.getItems())if(o.is("attributeElement")&&o.isSimilar(r)){i.mapper.bindElementToMarker(o,n.markerName);break}}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("addMarker:"+t.model,function(t){return(e,n,i)=>{if(!n.item)return;if(!(n.item instanceof Us))return;const o=wa(t,n,i);if(!o)return;if(!i.consumable.test(n.item,e.name))return;const r=i.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){i.consumable.consume(n.item,e.name);for(const t of Ys._createIn(n.item))i.consumable.consume(t.item,e.name);r.getCustomProperty("addHighlight")(r,o,i.writer),i.mapper.bindElementToMarker(r,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,function(t){return(e,n,i)=>{if(n.markerRange.isCollapsed)return;const o=wa(t,n,i);if(!o)return;const r=pa(o),s=i.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)i.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(t),r):t.getCustomProperty("removeHighlight")(t,o.id,i.writer);i.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}}function pa(t){const e=new ao("span",t.attributes);return t.classes&&e._addClass(t.classes),t.priority&&(e._priority=t.priority),e._id=t.id,e}function ma(t,e){return"function"==typeof t?t:(n,i)=>function(t,e,n){let i;"string"==typeof t&&(t={name:t});const o=Object.assign({},t.attributes);if("container"==n)i=e.createContainerElement(t.name,o);else if("attribute"==n){const n={priority:t.priority||ao.DEFAULT_PRIORITY};i=e.createAttributeElement(t.name,o,n)}else i=e.createUIElement(t.name,o);if(t.styles){const n=Object.keys(t.styles);for(const o of n)e.setStyle(o,t.styles[o],i)}if(t.classes){const n=t.classes;if("string"==typeof n)e.addClass(n,i);else for(const t of n)e.addClass(t,i)}return i}(t,i,e)}function ga(t){return t.model.values?(e,n)=>{const i=t.view[e];return i?i(e,n):null}:t.view}function ba(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function wa(t,e,n){const i="function"==typeof t?t(e,n):t;return i?(i.priority||(i.priority=10),i.id||(i.id=e.markerName),i):null}class va extends la{elementToElement(t){return this.add(_a(t))}elementToAttribute(t){return this.add(function(t){ya(t=ha(t));const e=xa(t,!1),n=ka(t.view),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e=null;("string"==typeof(t=ha(t)).view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;if("class"==e||"style"==e){const i="class"==e?"classes":"styles";n={[i]:t.view.value}}else{const i=void 0===t.view.value?/[\s\S]*/:t.view.value;n={attributes:{[e]:i}}}return t.view.name&&(n.name=t.view.name),t.view=n,e}(t)),ya(t,e);const n=xa(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){return function(t){const e=t.model;t.model=(t,n)=>{const i="string"==typeof e?e:e(t);return n.createElement("$marker",{"data-name":i})}}(t=ha(t)),_a(t)}(t))}}function _a(t){const e=function(t){const e=t.view?new bi(t.view):null;return(n,i,o)=>{let r={};if(e){const t=e.match(i.viewItem);if(!t)return;r=t.match}r.name=!0;const s=function(t,e,n){return t instanceof Function?t(e,n):n.createElement(t)}(t.model,i.viewItem,o.writer);if(!s)return;if(!o.consumable.test(i.viewItem,r))return;const a=o.splitToAllowedParent(s,i.modelCursor);if(!a)return;o.writer.insert(s,a.position),o.convertChildren(i.viewItem,o.writer.createPositionAt(s,0)),o.consumable.consume(i.viewItem,r);const c=o.getSplitParts(s);i.modelRange=new Ys(o.writer.createPositionBefore(s),o.writer.createPositionAfter(c[c.length-1])),a.cursorParent?i.modelCursor=o.writer.createPositionAt(a.cursorParent,0):i.modelCursor=i.modelRange.end}}(t=ha(t)),n=ka(t.view),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"normal"})}}function ka(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function ya(t,e=null){const n=null===e||(t=>t.getAttribute(e)),i="object"!=typeof t.model?t.model:t.model.key,o="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:i,value:o}}function xa(t,e){const n=new bi(t.view);return(i,o,r)=>{const s=n.match(o.viewItem);if(!s)return;const a=t.model.key,c="function"==typeof t.model.value?t.model.value(o.viewItem):t.model.value;null!==c&&(function(t,e){const n="function"==typeof t?t(e):t;return!("object"==typeof n&&!ka(n))&&(!n.classes&&!n.attributes&&!n.styles)}(t.view,o.viewItem)?s.match.name=!0:delete s.match.name,r.consumable.test(o.viewItem,s.match)&&(o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor))),function(t,e,n,i){let o=!1;for(const r of Array.from(t.getItems({shallow:n})))i.schema.checkAttribute(r,e.key)&&(i.writer.setAttribute(e.key,e.value,r),o=!0);return o}(o.modelRange,{key:a,value:c},e,r)&&r.consumable.consume(o.viewItem,s.match)))}}class Aa{constructor(t){this.model=t,this.view=new Ds,this.mapper=new Gs,this.downcastDispatcher=new Js({mapper:this.mapper});const e=this.model.document,n=e.selection,i=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(e,"change",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(e.differ,i,t),this.downcastDispatcher.convertSelection(n,i,t)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(n,i)=>{const o=i.newSelection,r=new Xs,s=[];for(const t of o.getRanges())s.push(e.toModelRange(t));r.setTo(s,{backward:o.isBackward}),r.isEqual(t.document.selection)||t.change(t=>{t.setSelection(r)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(t,e,n)=>{if(!n.consumable.consume(e.item,"insert"))return;const i=n.writer,o=n.mapper.toViewPosition(e.range.start),r=i.createText(e.item.data);i.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(t,e,n)=>{const i=n.mapper.toViewPosition(e.position),o=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(o,{isPhantom:!0}),s=n.writer.createRange(i,r),a=n.writer.remove(s.getTrimmed());for(const c of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(c)},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,n)=>{const i=n.writer,o=i.document.selection;for(const r of o.getRanges())r.isCollapsed&&r.end.parent.document&&n.writer.mergeAttributes(r.start);i.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,n)=>{const i=e.selection;if(i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=[];for(const r of i.getRanges()){const t=n.mapper.toViewRange(r);o.push(t)}n.writer.setSelection(o,{backward:i.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,n)=>{const i=e.selection;if(!i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=n.writer,r=i.getFirstPosition(),s=n.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if("$graveyard"==t.rootName)return null;const e=new Ki(t.name);return e.rootName=t.rootName,e._document=this.view.document,this.mapper.bindElements(t,e),e})}destroy(){this.view.destroy(),this.stopListening()}}ci(Aa,Fi);class Ca{constructor(t,e=[]){this._editor=t,this._availablePlugins=new Map,this._plugins=new Map;for(const n of e)this._availablePlugins.set(n,n),n.pluginName&&this._availablePlugins.set(n.pluginName,n)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){const e="plugincollection-plugin-not-loaded: The requested plugin is not loaded.";let n=t;throw"function"==typeof t&&(n=t.pluginName||t.name),new Gn.b(e,this._editor,{plugin:n})}return e}has(t){return this._plugins.has(t)}init(t,e=[]){const n=this,i=this._editor,o=new Set,r=[],s=h(t),a=h(e),c=function(t){const e=[];for(const n of t)d(n)||e.push(n);return e.length?e:null}(t);if(c){const t="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(Gn.a)(t),{plugins:c}),Promise.reject(new Gn.b(t,this._editor,{plugins:c}))}return Promise.all(s.map(l)).then(()=>u(r,"init")).then(()=>u(r,"afterInit")).then(()=>r);function l(t){if(!a.includes(t)&&!n._plugins.has(t)&&!o.has(t))return function(t){return new Promise(s=>{o.add(t),t.requires&&t.requires.forEach(n=>{const o=d(n);if(e.includes(o))throw new Gn.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",i,{plugin:o,requiredBy:t});l(o)});const a=new t(i);n._add(t,a),r.push(a),s()})}(t).catch(e=>{throw console.error(Object(Gn.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:t}),e})}function u(t,e){return t.reduce((t,n)=>n[e]?t.then(n[e].bind(n)):t,Promise.resolve())}function d(t){return"function"==typeof t?t:n._availablePlugins.get(t)}function h(t){return t.map(t=>d(t)).filter(t=>!!t)}}destroy(){const t=Array.from(this).map(([,t])=>t).filter(t=>"function"==typeof t.destroy).map(t=>t.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new Gn.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}ci(Ca,ei);class Ta{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new Gn.b("commandcollection-command-not-found: Command does not exist.",this,{commandName:t});n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}function Sa(t,e){const n=Object.keys(window.CKEDITOR_TRANSLATIONS).length;return 1===n&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0!==n&&function(t,e){return t in window.CKEDITOR_TRANSLATIONS&&e in window.CKEDITOR_TRANSLATIONS[t]}(t,e)?window.CKEDITOR_TRANSLATIONS[t][e].replace(/ \[context: [^\]]+\]$/,""):e.replace(/ \[context: [^\]]+\]$/,"")}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const Pa=["ar","fa","he","ku","ug"];class Ea{constructor(t={}){this.uiLanguage=t.uiLanguage||"en",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Ma(this.uiLanguage),this.contentLanguageDirection=Ma(this.contentLanguage),this.t=(...t)=>this._t(...t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(t,e){let n=Sa(this.uiLanguage,t);return e&&(n=n.replace(/%(\d+)/g,(t,n)=>n{e[0]=new Ra(e[0])},{priority:"highest"}),this.on("checkChild",(t,e)=>{e[0]=new Ra(e[0]),e[1]=this.getDefinition(e[1])},{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new Gn.b("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new Gn.b("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:t.is&&(t.is("text")||t.is("textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!(!e||!e.isObject)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof Ws){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof Us))throw new Gn.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(n instanceof Us))throw new Gn.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",(e,[n,i])=>{if(!i)return;const o=t(n,i);"boolean"==typeof o&&(e.stop(),e.return=o)},{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",(e,[n,i])=>{const o=t(n,i);"boolean"==typeof o&&(e.stop(),e.return=o)},{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;for(e=t instanceof Ws?t.parent:(t instanceof Ys?[t]:Array.from(t.getRanges())).reduce((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n},null);!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new zs("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new Ys(t);let n,i;"both"!=e&&"backward"!=e||(n=new $s({startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(i=new $s({startPosition:t}));for(const o of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,i)){const t=o.walker==n?"elementEnd":"elementStart",e=o.value;if(e.type==t&&this.isObject(e.item))return Ys._createOn(e.item);if(this.checkChild(e.nextPosition,"$text"))return new Ys(e.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}removeDisallowedAttributes(t,e){for(const n of t)if(n.is("text"))qa(this,n,e);else{const t=Ys._createIn(n).getPositions();for(const n of t)qa(this,n.nodeBefore||n.parent,e)}}createContext(t){return new Ra(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const i of n)t[i]=ja(e[i],i);for(const i of n)Da(t,i);for(const i of n)La(t,i);for(const i of n)Va(t,i),za(t,i);for(const i of n)Ba(t,i),Fa(t,i);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const i=e.getItem(n);if(t.allowIn.includes(i.name)){if(0==n)return!0;{const t=this.getDefinition(i);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,i=t.start;for(const o of t.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(Ys._createIn(o),e)),this.checkAttribute(o,e)||(n.isEqual(i)||(yield new Ys(n,i)),n=Ws._createAfter(o)),i=Ws._createAfter(o);n.isEqual(i)||(yield new Ys(n,i))}}ci(Na,Fi);class Ra{constructor(t){if(t instanceof Ra)return t;"string"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),t[0]&&"string"!=typeof t[0]&&t[0].is("documentFragment")&&t.shift(),this._items=t.map(Ha)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new Ra([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}}function ja(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter(t=>t.startsWith("is"));for(const i of t)e[i]=n[i]}}(t,n),Ua(t,n,"allowIn"),Ua(t,n,"allowContentOf"),Ua(t,n,"allowWhere"),Ua(t,n,"allowAttributes"),Ua(t,n,"allowAttributesOf"),Ua(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function Da(t,e){for(const n of t[e].allowContentOf)t[n]&&$a(t,n).forEach(t=>{t.allowIn.push(e)});delete t[e].allowContentOf}function La(t,e){for(const n of t[e].allowWhere){const i=t[n];if(i){const n=i.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function Va(t,e){for(const n of t[e].allowAttributesOf){const i=t[n];if(i){const n=i.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function za(t,e){const n=t[e];for(const i of n.inheritTypesFrom){const e=t[i];if(e){const t=Object.keys(e).filter(t=>t.startsWith("is"));for(const i of t)i in n||(n[i]=e[i])}}delete n.inheritTypesFrom}function Ba(t,e){const n=t[e],i=n.allowIn.filter(e=>t[e]);n.allowIn=Array.from(new Set(i))}function Fa(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Ua(t,e,n){for(const i of t)"string"==typeof i[n]?e[n].push(i[n]):Array.isArray(i[n])&&e[n].push(...i[n])}function $a(t,e){const n=t[e];return function(t){return Object.keys(t).map(e=>t[e])}(t).filter(t=>t.allowIn.includes(n.name))}function Ha(t){return"string"==typeof t?{name:t,*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function qa(t,e,n){for(const i of e.getAttributeKeys())t.checkAttribute(e,i)||n.removeAttribute(i,e)}class Wa{constructor(t={}){this._splitParts=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const i of new Ra(t)){const t={};for(const e of i.getAttributeKeys())t[e]=i.getAttribute(e);const o=e.createElement(i.name,t);n&&e.append(o,n),n=Ws._createAt(o,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=Ia.createFrom(t),this.conversionApi.store={};const{modelRange:i}=this._convertItem(t,this._modelCursor),o=e.createDocumentFragment();if(i){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,o);o.markers=function(t,e){const n=new Set,i=new Map,o=Ys._createIn(t).getItems();for(const r of o)"$marker"==r.name&&n.add(r);for(const r of n){const t=r.getAttribute("data-name"),n=e.createPositionBefore(r);i.has(t)?i.get(t).end=n.clone():i.set(t,new Ys(n.clone())),e.remove(r)}return i}(o,e)}return this._modelCursor=null,this._splitParts.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(t,e){const n=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is("element")?this.fire("element:"+t.name,n,this.conversionApi):t.is("text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Ys))throw new Gn.b("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){const n=new Ys(e);let i=e;for(const o of Array.from(t.getChildren())){const t=this._convertItem(o,i);t.modelRange instanceof Ys&&(n.end=t.modelRange.end,i=t.modelCursor)}return{modelRange:n,modelCursor:i}}_splitToAllowedParent(t,e){const n=this.conversionApi.schema.findAllowedParent(e,t);if(!n)return null;if(n===e.parent)return{position:e};if(this._modelCursor.parent.getAncestors().includes(n))return null;const i=this.conversionApi.writer.split(e,n),o=[];for(const r of i.range.getWalker())if("elementEnd"==r.type)o.push(r.item);else{const t=o.pop(),e=r.item;this._registerSplitPair(t,e)}return{position:i.position,cursorParent:i.range.end.parent}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){return this._splitParts.has(t)?this._splitParts.get(t):[t]}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}ci(Wa,ei);class Ya{constructor(t,e){this.model=t,this.processor=e,this.mapper=new Gs,this.downcastDispatcher=new Js({mapper:this.mapper}),this.downcastDispatcher.on("insert:$text",(t,e,n)=>{if(!n.consumable.consume(e.item,"insert"))return;const i=n.writer,o=n.mapper.toViewPosition(e.range.start),r=i.createText(e.item.data);i.insert(o,r)},{priority:"lowest"}),this.upcastDispatcher=new Wa({schema:t.schema}),this.upcastDispatcher.on("text",(t,e,n)=>{if(n.schema.checkChild(e.modelCursor,"$text")&&n.consumable.consume(e.viewItem)){const t=n.writer.createText(e.viewItem.data);n.writer.insert(t,e.modelCursor),e.modelRange=Ys._createFromPositionAndShift(e.modelCursor,t.offsetSize),e.modelCursor=e.modelRange.end}},{priority:"lowest"}),this.upcastDispatcher.on("element",(t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}},{priority:"lowest"}),this.decorate("init"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"})}get(t){const{rootName:e="main",trim:n="empty"}=t||{};if(!this._checkIfRootsExists([e]))throw new Gn.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);const i=this.model.document.getRoot(e);return"empty"!==n||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i):""}stringify(t){const e=this.toView(t);return this.processor.toData(e)}toView(t){this.mapper.clearBindings();const e=Ys._createIn(t),n=new Ao,i=new Co(new ro);if(this.mapper.bindElements(t,n),this.downcastDispatcher.convertInsert(e,i),!t.is("documentFragment")){const e=function(t){const e=[],n=t.root.document;if(!n)return[];const i=Ys._createIn(t);for(const o of n.model.markers){const t=i.getIntersection(o.getRange());t&&e.push([o.name,t])}return e}(t);for(const[t,n]of e)this.downcastDispatcher.convertMarkerAdd(t,n,i)}return n}init(t){if(this.model.document.version)throw new Gn.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new Gn.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",t=>{for(const n of Object.keys(e)){const i=this.model.document.getRoot(n);t.insert(this.parse(e[n],i),i,0)}}),Promise.resolve()}set(t){let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new Gn.b("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this);this.model.enqueueChange("transparent",t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const n of Object.keys(e)){const i=this.model.document.getRoot(n);t.remove(t.createRangeIn(i)),t.insert(this.parse(e[n],i),i,0)}})}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change(n=>this.upcastDispatcher.convert(t,n,e))}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}ci(Ya,Fi);class Ga{constructor(t,e){this._helpers=new Map,this._downcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new Gn.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new Gn.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of Qa(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of Qa(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of Qa(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new Gn.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);const i=n?new fa(e):new va(e);this._helpers.set(t,i)}}function*Qa(t){if(t.model.values)for(const e of t.model.values)yield*Ka({key:t.model.key,value:e},t.view[e],t.upcastAlso?t.upcastAlso[e]:void 0);else yield*Ka(t.model,t.view,t.upcastAlso)}function*Ka(t,e,n){if(yield{model:t,view:e},n){n=Array.isArray(n)?n:[n];for(const e of n)yield{model:t,view:e}}}class Ja{constructor(t="default"){this.operations=[],this.type=t}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}class Za{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t){return new this(t.baseVersion)}}class Xa{constructor(t){this.markers=new Map,this._children=new Fs,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"==t||"model:documentFragment"==t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(Us.fromJSON(n)):e.push(zs.fromJSON(n));return new Xa(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){return"string"==typeof t?[new zs(t)]:(gi(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new zs(t):t instanceof Bs?new zs(t.data,t.getAttributes()):t))}(e);for(const i of n)null!==i.parent&&i._remove(),i.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const i of n)i.parent=null;return n}}function tc(t,e){const n=(e=ic(e)).reduce((t,e)=>t+e.offsetSize,0),i=t.parent;rc(t);const o=t.index;return i._insertChild(o,e),oc(i,o+e.length),oc(i,o),new Ys(t,t.getShiftedBy(n))}function ec(t){if(!t.isFlat)throw new Gn.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);const e=t.start.parent;rc(t.start),rc(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return oc(e,t.start.index),n}function nc(t,e){if(!t.isFlat)throw new Gn.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);const n=ec(t);return tc(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function ic(t){const e=[];t instanceof Array||(t=[t]);for(let n=0;nt.maxOffset)throw new Gn.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(t===e&&n=n&&this.targetPosition.path[t]t._clone(!0))),e=new dc(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Ws(t,[0]);return new uc(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffsett._clone(!0))),tc(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const o of t.nodes)o.name?n.push(Us.fromJSON(o)):n.push(zs.fromJSON(o));const i=new dc(Ws.fromJSON(t.position,e),n,t.baseVersion);return i.shouldReceiveAttributes=t.shouldReceiveAttributes,i}}class hc extends Za{constructor(t,e,n,i,o,r){super(r),this.name=t,this.oldRange=e?e.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=i}get type(){return"marker"}clone(){return new hc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new hc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?"_set":"_remove";this._markers[t](this.name,this.newRange,!0,this.affectsData)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new hc(t.name,t.oldRange?Ys.fromJSON(t.oldRange,e):null,t.newRange?Ys.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class fc extends Za{constructor(t,e,n,i){super(i),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=n}get type(){return"rename"}clone(){return new fc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new fc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Us))throw new Gn.b("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this);if(t.name!==this.oldName)throw new Gn.b("rename-operation-wrong-name: Element to change has different name than operation's old name.",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new fc(Ws.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class pc extends Za{constructor(t,e,n,i,o){super(o),this.root=t,this.key=e,this.oldValue=n,this.newValue=i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new pc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new pc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new Gn.b("rootattribute-operation-not-a-root: The element to change is not a root element.",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new Gn.b("rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new Gn.b("rootattribute-operation-attribute-exists: The attribute with given key already exists.",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new Gn.b("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:t.root});return new pc(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class mc extends Za{constructor(t,e,n,i,o){super(o),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new Ws(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ys(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),n=new Ws(this.sourcePosition.root,e)._getTransformedByMergeOperation(this),i=new gc(t,this.howMany,this.graveyardPosition,this.baseVersion+1);return i.insertionPosition=n,i}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new Gn.b("merge-operation-source-position-invalid: Merge source position is invalid.",this);if(!e.parent)throw new Gn.b("merge-operation-target-position-invalid: Merge target position is invalid.",this);if(this.howMany!=t.maxOffset)throw new Gn.b("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}_execute(){const t=this.sourcePosition.parent;nc(Ys._createIn(t),this.targetPosition),nc(Ys._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const n=Ws.fromJSON(t.sourcePosition,e),i=Ws.fromJSON(t.targetPosition,e),o=Ws.fromJSON(t.graveyardPosition,e);return new this(n,t.howMany,i,o,t.baseVersion)}}class gc extends Za{constructor(t,e,n,i){super(i),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=gc.getInsertionPosition(t),this.insertionPosition.stickiness="toNone",this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Ws(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ys(this.splitPosition,t)}clone(){const t=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return t.insertionPosition=this.insertionPosition,t}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Ws(t,[0]);return new mc(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof Ys)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof Ys))throw new Gn.b("writer-move-invalid-range: Invalid range to move.",this);if(!t.isFlat)throw new Gn.b("writer-move-range-not-flat: Range to move is not flat.",this);const i=Ws._createAt(e,n);if(i.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!xc(t.root,i.root))throw new Gn.b("writer-move-different-document: Range is going to be moved between different documents.",this);const o=t.root.document?t.root.document.version:null,r=new uc(t.start,t.end.offset-t.start.offset,i,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof Ys?t:Ys._createOn(t)).getMinimalFlatRanges().reverse();for(const n of e)this._addOperationForAffectedMarkers("move",n),yc(n.start,n.end.offset-n.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof Us))throw new Gn.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(n instanceof Us))throw new Gn.b("writer-merge-no-element-after: Node after merge position must be an element.",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,n){return this.model.createSelection(t,e,n)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(Ys._createIn(n),Ws._createAt(e,"end")),this.remove(n)}_merge(t){const e=Ws._createAt(t.nodeBefore,"end"),n=Ws._createAt(t.nodeAfter,0),i=t.root.document.graveyard,o=new Ws(i,[0]),r=t.root.document.version,s=new mc(n,t.nodeAfter.maxOffset,e,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Us))throw new Gn.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);const n=t.root.document?t.root.document.version:null,i=new fc(Ws._createBefore(t),t.name,e,n);this.batch.addOperation(i),this.model.applyOperation(i)}split(t,e){this._assertWriterUsedCorrectly();let n,i,o=t.parent;if(!o.parent)throw new Gn.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(e||(e=o.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new Gn.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{const e=o.root.document?o.root.document.version:null,r=o.maxOffset-t.offset,s=new gc(t,r,null,e);this.batch.addOperation(s),this.model.applyOperation(s),n||i||(n=o,i=t.parent.nextSibling),o=(t=this.createPositionAfter(t.parent)).parent}while(o!==e);return{position:t,range:new Ys(Ws._createAt(n,"end"),Ws._createAt(i,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new Gn.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);const n=e instanceof Us?e:new Us(e);if(n.childCount>0)throw new Gn.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==n.parent)throw new Gn.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(n,t.start);const i=new Ys(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(i,Ws._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new Gn.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(Ys._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new Gn.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);const n=e.usingOperation,i=e.range,o=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new Gn.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!i)throw new Gn.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return n?(kc(this,t,null,i,o),this.model.markers.get(t)):this.model.markers._set(t,i,n,o)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,i=this.model.markers.get(n);if(!i)throw new Gn.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(!e)return void this.model.markers._refresh(i);const o="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:i.affectsData;if(!o&&!e.range&&!r)throw new Gn.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);const a=i.getRange(),c=e.range?e.range:a;o&&e.usingOperation!==i.managedUsingOperations?e.usingOperation?kc(this,n,null,c,s):(kc(this,n,a,null,s),this.model.markers._set(n,c,void 0,s)):i.managedUsingOperations?kc(this,n,a,c,s):this.model.markers._set(n,c,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new Gn.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);const n=this.model.markers.get(e);n.managedUsingOperations?kc(this,e,n.getRange(),null,n.affectsData):this.model.markers._remove(e)}setSelection(t,e,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(t,e,n)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[n,i]of Ls(t))this._setSelectionAttribute(n,i)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const i=sa._getStoreAttributeKey(t);this.setAttribute(i,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=sa._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new Gn.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const i=n.getRange();let o=!1;if("move"==t)o=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end);else{const t=e.nodeBefore,n=e.nodeAfter,r=i.start.parent==t&&i.start.isAtEnd,s=i.end.parent==n&&0==i.end.offset,a=i.end.nodeAfter==n,c=i.start.nodeAfter==n;o=r||s||a||c}o&&this.updateMarker(n.name,{range:i})}}}function vc(t,e,n,i){const o=t.model,r=o.document;let s,a,c,l=i.start;for(const d of i.getWalker({shallow:!0}))c=d.item.getAttribute(e),s&&a!=c&&(a!=n&&u(),l=s),s=d.nextPosition,a=c;function u(){const i=new Ys(l,s),c=i.root.document?r.version:null,u=new cc(i,e,a,n,c);t.batch.addOperation(u),o.applyOperation(u)}s instanceof Ws&&s!=l&&a!=n&&u()}function _c(t,e,n,i){const o=t.model,r=o.document,s=i.getAttribute(e);let a,c;if(s!=n){if(i.root===i){const t=i.document?r.version:null;c=new pc(i,e,s,n,t)}else{const o=(a=new Ys(Ws._createBefore(i),t.createPositionAfter(i))).root.document?r.version:null;c=new cc(a,e,s,n,o)}t.batch.addOperation(c),o.applyOperation(c)}}function kc(t,e,n,i,o){const r=t.model,s=r.document,a=new hc(e,n,i,r.markers,o,s.version);t.batch.addOperation(a),r.applyOperation(a)}function yc(t,e,n,i){let o;if(t.root.document){const n=i.document,r=new Ws(n.graveyard,[0]);o=new uc(t,e,r,n.version)}else o=new lc(t,e);n.addOperation(o),i.applyOperation(o)}function xc(t,e){return t===e||t instanceof bc&&e instanceof bc}class Ac{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=Ys._createOn(t);for(const n of this._markerCollection.getMarkersIntersectingRange(e)){const t=n.getRange();this.bufferMarkerChange(n.name,t,t,n.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),n=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),n||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Ys._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const n=t.graveyardPosition.parent;this._markInsert(n,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n,i){const o=this._changedMarkers.get(t);o?(o.newRange=n,o.affectsData=i,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{oldRange:e,newRange:n,affectsData:i})}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldRange&&t.push({name:e,range:n.oldRange});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newRange&&t.push({name:e,range:n.newRange});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers)if(t.affectsData)return!0;return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:!1}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const e=[];for(const n of this._changesInElement.keys()){const t=this._changesInElement.get(n).sort((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offsett.position.root!=e.position.root?t.position.root.rootNamen.offset){if(i>o){const t={type:"attribute",offset:o,howMany:i-o,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offseto?(t.nodesToHandle=i-o,t.offset=o):t.nodesToHandle=0);if("remove"==n.type&&t.offsetn.offset){const o={type:"attribute",offset:n.offset,howMany:i-n.offset,count:this._changeCount++};this._handleChange(o,e),e.push(o),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&i<=o?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&i>=o&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:Ws._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,n){return{type:"remove",position:Ws._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,n){const i=[];n=new Map(n);for(const[o,r]of e){const e=n.has(o)?n.get(o):null;e!==r&&i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(o)}for(const[o,r]of n)i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:null,attributeNewValue:r,changeCount:this._changeCount++});return i}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),i=t.startOffset;if(n)for(const o of n)if("insert"==o.type&&i>=o.offset&&ii){for(let t=0;t{const n=e[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new Gn.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:n})},{priority:"highest"}),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(t.markers,"update",(t,e,n,i)=>{this.differ.bufferMarkerChange(e.name,n,i,e.affectsData),null===n&&e.on("change",(t,n)=>{this.differ.bufferMarkerChange(e.name,n,e.getRange(),e.affectsData)})})}get graveyard(){return this.getRoot(Ic)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new Gn.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:e});const n=new bc(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>t!=Ic)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=di(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,i=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(i)||e.createRange(i)}_validateSelectionRange(t){return Nc(t.start)&&Nc(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t))break}while(e)}}function Nc(t){const e=t.textNode;if(e){const n=e.data,i=t.offset-e.startOffset;return!Ec(n,i)&&!Mc(n,i)}return!0}ci(Oc,ei);class Rc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){return this._markers.has(t)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,i=!1){const o=t instanceof jc?t.name:t,r=this._markers.get(o);if(r){const t=r.getRange();let s=!1;return t.isEqual(e)||(r._attachLiveRange(oa.fromRange(e)),s=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,s=!0),"boolean"==typeof i&&i!=r.affectsData&&(r._affectsData=i,s=!0),s&&this.fire("update:"+o,r,t,e),r}const s=oa.fromRange(e),a=new jc(o,s,n,i);return this._markers.set(o,a),this.fire("update:"+o,a,null,e),a}_remove(t){const e=t instanceof jc?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire("update:"+e,n,n.getRange(),null),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof jc?t.name:t,n=this._markers.get(e);if(!n)throw new Gn.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);const i=n.getRange();this.fire("update:"+e,n,i,i,n.managedUsingOperations,n.affectsData)}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}ci(Rc,ei);class jc{constructor(t,e,n,i){this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new Gn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new Gn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}getStart(){if(!this._liveRange)throw new Gn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new Gn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new Gn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}is(t){return"marker"==t||"model:marker"==t}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}ci(jc,ei);class Dc extends Ws{constructor(t,e,n="toNone"){if(super(t,e,n),!this.root.is("rootElement"))throw new Gn.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",t);(function(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&function(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}.call(this,n)},{priority:"low"})}).call(this)}detach(){this.stopListening()}is(t){return"livePosition"==t||"model:livePosition"==t||super.is(t)}toPosition(){return new Ws(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}ci(Dc,ei);class Lc{constructor(t,e,n){this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t,e){t=Array.from(t);for(let n=0;n{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const i=e.getFirstRange();return i.start.parent!=i.end.parent&&t.checkChild(n,"paragraph")}(o,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),zc(t,t.createPositionAt(n,0),e)}(t,e);const r=i.start,s=Dc.fromPosition(i.end,"toNext");if(i.start.isTouching(i.end)||t.remove(i),n.leaveUnmerged||(function t(e,n,i){const o=n.parent,r=i.parent;if(o!=r&&!e.model.schema.isLimit(o)&&!e.model.schema.isLimit(r)&&function(t,e,n){const i=new Ys(t,e);for(const o of i.getWalker())if(n.isLimit(o.item))return!1;return!0}(n,i,e.model.schema)){for(n=e.createPositionAfter(o),i=e.createPositionBefore(r),i.isEqual(n)||e.insert(r,n),e.merge(n);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}t(e,n,i)}}(t,r,s),o.removeDisallowedAttributes(r.parent.getChildren(),t)),Bc(t,e,r),function(t,e){const n=t.checkChild(e,"$text"),i=t.checkChild(e,"paragraph");return!n&&i}(o,r)){const i=o.getNearestSelectionRange(r);n.doNotAutoparagraph&&i?Bc(t,e,i):zc(t,r,e)}s.detach()})}function zc(t,e,n){const i=t.createElement("paragraph");t.insert(i,e),Bc(t,n,t.createPositionAt(i,0))}function Bc(t,e,n){e instanceof sa?t.setSelection(n):e.setTo(n)}const Fc=' ,.?!:;"-()';function Uc(t,e,n={}){const i=t.schema,o="backward"!=n.direction,r=n.unit?n.unit:"character",s=e.focus,a=new $s({boundaries:function(t,e){const n=t.root,i=Ws._createAt(n,e?"end":0);return e?new Ys(t,i):new Ys(i,t)}(s,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:a,schema:i,isForward:o,unit:r};let l;for(;l=a.next();){if(l.done)return;const n=$c(c,l.value);if(n)return void(e instanceof sa?t.change(t=>{t.setSelectionFocus(n)}):e.setFocus(n))}}function $c(t,e){if("text"==e.type)return"word"===t.unit?function(t,e){let n=t.position.textNode;if(n){let i=t.position.offset-n.startOffset;for(;!Hc(n.data,i,e)&&!qc(n,i,e);){t.next();const o=e?t.position.nodeAfter:t.position.nodeBefore;if(o&&o.is("text")){const i=o.data.charAt(e?0:o.data.length-1);Fc.includes(i)||(t.next(),n=t.position.textNode)}i=t.position.offset-n.startOffset}}return t.position}(t.walker,t.isForward):function(t,e){const n=t.position.textNode;if(n){const i=n.data;let o=t.position.offset-n.startOffset;for(;Ec(i,o)||"character"==e&&Mc(i,o);)t.next(),o=t.position.offset-n.startOffset}return t.position}(t.walker,t.unit,t.isForward);if(e.type==(t.isForward?"elementStart":"elementEnd")){if(t.schema.isObject(e.item))return Ws._createAt(e.item,t.isForward?"after":"before");if(t.schema.checkChild(e.nextPosition,"$text"))return e.nextPosition}else{if(t.schema.isLimit(e.item))return void t.walker.skip(()=>!0);if(t.schema.checkChild(e.nextPosition,"$text"))return e.nextPosition}}function Hc(t,e,n){const i=e+(n?0:-1);return Fc.includes(t.charAt(i))}function qc(t,e,n){return e===(n?t.endOffset:0)}function Wc(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map(t=>e.createRangeOn(t)).filter(e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end))).forEach(t=>{n.push(t.start.parent),e.remove(t)}),n.forEach(t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}})}function Yc(t){t.document.registerPostFixer(e=>function(t,e){const n=e.document.selection,i=e.schema,o=[];let r=!1;for(const s of n.getRanges()){const t=Gc(s,i);t?(o.push(t),r=!0):o.push(s)}if(r){let e=o;if(o.length>1){const t=o[0].start,n=o[o.length-1].end;e=[new Ys(t,n)]}t.setSelection(e,{backward:n.isBackward})}}(e,t))}function Gc(t,e){return t.isCollapsed?function(t,e){const n=t.start,i=e.getNearestSelectionRange(n);if(!i)return null;const o=i.start;return n.isEqual(o)?null:o.nodeAfter&&e.isLimit(o.nodeAfter)?new Ys(o,Ws._createAfter(o.nodeAfter)):new Ys(o)}(t,e):function(t,e){const n=t.start,i=t.end,o=e.checkChild(n,"$text"),r=e.checkChild(i,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(i);if(s===a){if(o&&r)return null;if(function(t,e,n){const i=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),o=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return i||o}(n,i,e)){const t=n.nodeAfter&&e.isObject(n.nodeAfter),o=t?null:e.getNearestSelectionRange(n,"forward"),r=i.nodeBefore&&e.isObject(i.nodeBefore),s=r?null:e.getNearestSelectionRange(i,"backward"),a=o?o.start:n,c=s?s.start:i;return new Ys(a,c)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const t=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,o=c&&(!t||!Kc(n.nodeAfter,e)),r=l&&(!t||!Kc(i.nodeBefore,e));let u=n,d=i;return o&&(u=Ws._createBefore(Qc(s,e))),r&&(d=Ws._createAfter(Qc(a,e))),new Ys(u,d)}return null}(t,e)}function Qc(t,e){let n=t,i=n;for(;e.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function Kc(t,e){return t&&e.isObject(t)}class Jc{constructor(){this.markers=new Rc,this.document=new Oc(this),this.schema=new Na,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t)),this.on("applyOperation",(t,e)=>{e[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((t,e)=>{if("$marker"===e.name)return!0}),Yc(this)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Ja,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){Gn.b.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{"string"==typeof t?t=new Ja(t):"function"==typeof t&&(e=t,t=new Ja),this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){Gn.b.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,n){return function(t,e,n,i){return t.change(o=>{let r;const s=(r=n?n instanceof Xs||n instanceof sa?n:o.createSelection(n,i):t.document.selection).getFirstPosition();r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const a=new Lc(t,o,s);let c;c=e.is("documentFragment")?e.getChildren():[e],a.handleNodes(c,{isFirst:!0,isLast:!0});const l=a.getSelectionRange();l&&(r instanceof sa?o.setSelection(l):r.setTo(l));const u=a.getAffectedRange()||t.createRange(s);return a.destroy(),u})}(this,t,e,n)}deleteContent(t,e){Vc(this,t,e)}modifySelection(t,e){Uc(this,t,e)}getSelectedContent(t){return function(t,e){return t.change(t=>{const n=t.createDocumentFragment(),i=e.getFirstRange();if(!i||i.isCollapsed)return n;const o=i.start.root,r=i.start.getCommonPath(i.end),s=o.getNodeByPath(r);let a;const c=(a=i.start.parent==i.end.parent?i:t.createRange(t.createPositionAt(s,i.start.path[r.length]),t.createPositionAt(s,i.end.path[r.length]+1))).end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(e._clone(!0),n);if(a!=i){const e=i._getTransformedByMove(a.start,t.createPositionAt(n,0),c)[0],o=t.createRange(t.createPositionAt(n,0),e.start);Wc(t.createRange(e.end,t.createPositionAt(n,"end")),t),Wc(o,t)}return n})}(this,t)}hasContent(t,e){const n=t instanceof Us?Ys._createIn(t):t;if(n.isCollapsed)return!1;for(const o of this.markers.getMarkersIntersectingRange(n))if(o.affectsData)return!0;const{ignoreWhitespaces:i=!1}=e||{};for(const o of n.getItems())if(o.is("textProxy")){if(!i)return!0;if(-1!==o.data.search(/\S/))return!0}else if(this.schema.isObject(o))return!0;return!1}createPositionFromPath(t,e,n){return new Ws(t,e,n)}createPositionAt(t,e){return Ws._createAt(t,e)}createPositionAfter(t){return Ws._createAfter(t)}createPositionBefore(t){return Ws._createBefore(t)}createRange(t,e){return new Ys(t,e)}createRangeIn(t){return Ys._createIn(t)}createRangeOn(t){return Ys._createOn(t)}createSelection(t,e,n){return new Xs(t,e,n)}createBatch(t){return new Ja(t)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new wc(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),t}}ci(Jc,Fi);class Zc{constructor(){this._listener=Object.create(cr)}listenTo(t){this._listener.listenTo(t,"keydown",(t,e)=>{this._listener.fire("_keydown:"+wo(e),e)})}set(t,e,n={}){const i=vo(t),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(t,n)=>{e(n,()=>{n.preventDefault(),n.stopPropagation(),t.stop()}),t.return=!0},{priority:o})}press(t){return!!this._listener.fire("_keydown:"+wo(t),t)}destroy(){this._listener.stopListening()}}class Xc extends Zc{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}class tl{constructor(t){const e=this.constructor.builtinPlugins;this.config=new Wn(t,this.constructor.defaultConfig),this.config.define("plugins",e),this.plugins=new Ca(this,e),this.commands=new Ta;const n=this.config.get("language")||{};this.locale=new Ea({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new Jc,this.data=new Ya(this.model),this.editing=new Aa(this.model),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Ga([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new Xc(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config,e=t.get("plugins")||[],n=t.get("removePlugins")||[],i=t.get("extraPlugins")||[];return this.plugins.init(e.concat(i),n)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise(t=>this.once("ready",t))),t.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})}execute(...t){try{this.commands.execute(...t)}catch(t){Gn.b.rethrowUnexpectedError(t,this)}}}ci(tl,Fi);var el={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}},nl={updateSourceElement(){if(!this.sourceElement)throw new Gn.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);!function(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}(this.sourceElement,this.data.get())}};class il{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class ol{constructor(){this._domParser=new DOMParser,this._domConverter=new or({blockFillerMode:"nbsp"}),this._htmlWriter=new il}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e)}_toDom(t){const e=this._domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment(),i=e.body.childNodes;for(;i.length>0;)n.appendChild(i[0]);return n}}class rl{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){if(this.has(t))throw new Gn.b("componentfactory-item-exists: The item already exists in the component factory.",this,{name:t});this._components.set(sl(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new Gn.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:t});return this._components.get(sl(t)).callback(this.editor.locale)}has(t){return this._components.has(sl(t))}}function sl(t){return String(t).toLowerCase()}class al{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new Gn.b("focusTracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>this._focus(t),{useCapture:!0}),this.listenTo(t,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(t),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}ci(al,cr),ci(al,Fi);class cl{constructor(t){this.editor=t,this.componentFactory=new rl(t),this.focusTracker=new al,this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}}ci(cl,ei),n(14);const ll=new WeakMap;function ul(t){const{view:e,element:n,text:i,isDirectHost:o=!0}=t,r=e.document;ll.has(r)||(ll.set(r,new Map),r.registerPostFixer(t=>hl(r,t))),ll.get(r).set(n,{text:i,isDirectHost:o}),e.change(t=>hl(r,t))}function dl(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function hl(t,e){const n=ll.get(t);let i=!1;for(const[o,r]of n)fl(e,o,r)&&(i=!0);return i}function fl(t,e,n){const{text:i,isDirectHost:o}=n,r=o?e:function(t){if(1===t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement"))return e}return null}(e);let s=!1;return!!r&&(n.hostElement=r,r.getAttribute("data-placeholder")!==i&&(t.setAttribute("data-placeholder",i,r),s=!0),function(t){const e=t.document;if(!e)return!1;const n=!Array.from(t.getChildren()).some(t=>!t.is("uiElement"));if(!e.isFocused&&n)return!0;const i=e.selection.anchor;return!(!n||!i||i.parent===t)}(r)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,r)&&(s=!0):dl(t,r)&&(s=!0),s)}class pl{constructor(){this._replacedElements=[]}replace(t,e){this._replacedElements.push({element:t,newElement:e}),t.style.display="none",e&&t.parentNode.insertBefore(e,t.nextSibling)}restore(){this._replacedElements.forEach(({element:t,newElement:e})=>{t.style.display="",e&&e.remove()}),this._replacedElements=[]}}class ml extends cl{constructor(t,e){super(t),this.view=e,this._toolbarConfig=function(t){return Array.isArray(t)?{items:t}:t?Object.assign({items:[]},t):{items:[]}}(t.config.get("toolbar")),this._elementReplacer=new pl}get element(){return this.view.element}init(t){const e=this.editor,n=this.view,i=e.editing.view,o=n.editable,r=i.document.getRoot();o.name=r.rootName,n.render();const s=o.element;this.setEditableElement(o.name,s),this.focusTracker.add(s),n.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(s),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,n=t.editing.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,this._toolbarConfig.viewportTopOffset&&(e.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),e.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:t,originKeystrokeHandler:e,originFocusTracker:n,toolbar:i,beforeFocus:o,afterBlur:r}){n.add(i.element),e.set("Alt+F10",(t,e)=>{n.isFocused&&!i.focusTracker.isFocused&&(o&&o(),i.focus(),e())}),i.keystrokes.set("Esc",(e,n)=>{i.focusTracker.isFocused&&(t.focus(),r&&r(),n())})}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:e.toolbar})}_initPlaceholder(){const t=this.editor,e=t.editing.view,n=e.document.getRoot(),i=t.sourceElement,o=t.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");o&&ul({view:e,element:n,text:o,isDirectHost:!1})}}class gl extends oo{constructor(t){super({idProperty:"viewUid"}),this.on("add",(t,e,n)=>{e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[n])}),this.on("remove",(t,e)=>{e.element&&this._parentElement&&e.element.remove()}),this.locale=t,this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t}delegate(...t){if(!t.length||!function(t){return t.every(t=>"string"==typeof t)}(t))throw new Gn.b("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this);return{to:e=>{for(const n of this)for(const i of t)n.delegate(i).to(e);this.on("add",(n,i)=>{for(const o of t)i.delegate(o).to(e)}),this.on("remove",(n,i)=>{for(const o of t)i.stopDelegating(o,e)})}}}}const bl="http://www.w3.org/1999/xhtml";class wl{constructor(t){Object.assign(this,Sl(Tl(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new Gn.b("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)Ol(n)?yield n:Nl(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,i)=>new _l({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:i}),if:(n,i,o)=>new kl({observable:t,emitter:e,attribute:n,valueIfTrue:i,callback:o})}}static extend(t,e){if(t._isRendered)throw new Gn.b("template-extend-render: Attempting to extend a template which has already been rendered.",[this,t]);!function t(e,n){if(n.attributes&&(e.attributes||(e.attributes={}),Ml(e.attributes,n.attributes)),n.eventListeners&&(e.eventListeners||(e.eventListeners={}),Ml(e.eventListeners,n.eventListeners)),n.text&&e.text.push(...n.text),n.children&&n.children.length){if(e.children.length!=n.children.length)throw new Gn.b("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",e);let i=0;for(const o of n.children)t(e.children[i++],o)}}(t,Sl(Tl(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text)throw new Gn.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||bl,this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),yl(this.text)?this._bindToObservable({schema:this.text,updater:function(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){let e,n,i,o;if(!this.attributes)return;const r=t.node,s=t.revertData;for(e in this.attributes)if(i=r.getAttribute(e),n=this.attributes[e],s&&(s.attributes[e]=i),o=B(n[0])&&n[0].ns?n[0].ns:null,yl(n)){const a=o?n[0].value:n;s&&jl(e)&&a.unshift(i),this._bindToObservable({schema:a,updater:Al(r,e,o),data:t})}else"style"==e&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],t):(s&&i&&jl(e)&&n.unshift(i),Il(n=n.map(t=>t&&t.value||t).reduce((t,e)=>t.concat(e),[]).reduce(El,""))||r.setAttributeNS(o,e,n))}_renderStyleAttribute(t,e){const n=e.node;for(const i in t){const o=t[i];yl(o)?this._bindToObservable({schema:[o],updater:Cl(n,i),data:e}):n.style[i]=o}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,i=t.isApplying;let o=0;for(const r of this.children)if(Rl(r)){if(!i){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(Ol(r))i||(r.isRendered||r.render(),n.appendChild(r.element));else if(Ko(r))n.appendChild(r);else if(i){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map(n=>{const[i,o]=e.split("@");return n.activateDomEventListener(i,o,t)});t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const i=n.revertData;xl(t,e,n);const o=t.filter(t=>!Il(t)).filter(t=>t.observable).map(i=>i.activateAttributeListener(t,e,n));i&&i.bindings.push(o)}_revertTemplateFromNode(t,e){for(const n of e.bindings)for(const t of n)t();if(e.text)t.textContent=e.text;else{for(const n in e.attributes){const i=e.attributes[n];null===i?t.removeAttribute(n):t.setAttribute(n,i)}for(let n=0;nxl(t,e,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,i),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,i)}}}class _l extends vl{activateDomEventListener(t,e,n){const i=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,i),()=>{this.emitter.stopListening(n.node,t,i)}}}class kl extends vl{getValue(t){return!Il(super.getValue(t))&&(this.valueIfTrue||!0)}}function yl(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(yl):t instanceof vl)}function xl(t,e,{node:n}){let i=function(t,e){return t.map(t=>t instanceof vl?t.getValue(e):t)}(t,n);Il(i=1==t.length&&t[0]instanceof kl?i[0]:i.reduce(El,""))?e.remove():e.set(i)}function Al(t,e,n){return{set(i){t.setAttributeNS(n,e,i)},remove(){t.removeAttributeNS(n,e)}}}function Cl(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function Tl(t){return Hn(t,t=>{if(t&&(t instanceof vl||Nl(t)||Ol(t)||Rl(t)))return t})}function Sl(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){Array.isArray(t.text)||(t.text=[t.text])}(t),t.on&&(t.eventListeners=function(t){for(const e in t)Pl(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=[].concat(t[e].value)),Pl(t,e)}(t.attributes);const e=[];if(t.children)if(Rl(t.children))e.push(t.children);else for(const n of t.children)Nl(n)||Ol(n)||Ko(n)?e.push(n):e.push(new wl(n));t.children=e}return t}function Pl(t,e){Array.isArray(t[e])||(t[e]=[t[e]])}function El(t,e){return Il(e)?t:Il(t)?e:`${t} ${e}`}function Ml(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function Il(t){return!t&&0!==t}function Ol(t){return t instanceof Dl}function Nl(t){return t instanceof wl}function Rl(t){return t instanceof gl}function jl(t){return"class"==t||"style"==t}n(16);class Dl{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new oo,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(e,n)=>{n.locale=t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=wl.bind(this,this)}createCollection(){const t=new gl;return this._viewCollections.add(t),t}registerChild(t){gi(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){gi(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new wl(t)}extendTemplate(t){wl.extend(this.template,t)}render(){if(this.isRendered)throw new Gn.b("ui-view-render-already-rendered: This View has already been rendered.",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(t=>t.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}ci(Dl,cr),ci(Dl,Fi),n(18);class Ll extends Dl{constructor(t){super(t),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const t=this.locale,e=this._bodyCollectionContainer=new wl({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:t.uiLanguageDirection},children:this.body}).render();document.body.appendChild(e)}}n(20);class Vl extends Dl{constructor(t){super(t),this.set("text"),this.set("for");const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],for:e.to("for")},children:[{text:e.to("text")}]})}}class zl extends Ll{constructor(t){super(t);const e=Jn();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:t.uiLanguageDirection,lang:t.uiLanguage,"aria-labelledby":"ck-editor__aria-label_"+e},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(t){const e=this.t,n=new Vl;return n.text=e("ax"),n.extendTemplate({attributes:{id:"ck-editor__aria-label_"+t,class:"ck-voice-label"}}),n}}class Bl extends Dl{constructor(t,e,n){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const t=this._editingView;function e(e){t.change(n=>{const i=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",i)})}t.isRenderingInProgress?function n(i){t.once("change:isRenderingInProgress",(t,o,r)=>{r?n(i):e(i)})}(this):e(this)}}class Fl extends Bl{constructor(t,e,n){super(t,e,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const t=this._editingView,e=this.t;t.change(n=>{const i=t.document.getRoot(this.name);n.setAttribute("aria-label",e("ay",[this.name]),i)})}}function Ul(t){return e=>e+t}n(22);const $l=Ul("px");class Hl extends Dl{constructor(t){super(t);const e=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new wl({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:e.to("isSticky",t=>t?"block":"none"),height:e.to("isSticky",t=>t?$l(this._panelRect.height):null)}}}).render(),this._contentPanel=new wl({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",e.if("isSticky","ck-sticky-panel__content_sticky"),e.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:e.to("isSticky",t=>t?$l(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:e.to("_hasViewportTopOffset",t=>t?$l(this.viewportTopOffset):null),bottom:e.to("_isStickyToTheLimiter",t=>t?$l(this.limiterBottomOffset):null),marginLeft:e.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(tr.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const t=this._panelRect=this._contentPanel.getBoundingClientRect();let e;this.limiterElement?(e=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&e.top{this[e](),n()})}}get first(){return this.focusables.find(Wl)||null}get last(){return this.focusables.filter(Wl).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((e,n)=>{const i=e.element===this.focusTracker.focusedElement;return i&&(t=n),i}),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,n=this.focusables.length;if(!n)return null;if(null===e)return this[1===t?"first":"last"];let i=(e+n+t)%n;do{const e=this.focusables.get(i);if(Wl(e))return e;i=(i+n+t)%n}while(i!==e);return null}}function Wl(t){return!(!t.focus||"none"==tr.window.getComputedStyle(t.element).display)}class Yl extends Dl{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}const Gl=100;class Ql{constructor(t){this._callback=t,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(t){this._elements.add(t),1===this._elements.size&&this._startPeriodicCheck()}unobserve(t){this._elements.delete(t),this._previousRects.delete(t),this._elements.size||this._stopPeriodicCheck()}disconnect(){this._elements.forEach(t=>this.unobserve(t))}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(t,Gl)};this.listenTo(tr.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),t()}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements)this._hasRectChanged(e)&&t.push({target:e,contentRect:this._previousRects.get(e)});t.length&&this._callback(t)}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t))return!1;const e=new xs(t),n=this._previousRects.get(t),i=!n||!n.isEqual(e);return this._previousRects.set(t,e),i}}ci(Ql,cr);class Kl extends Dl{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",e.to("position",t=>"ck-dropdown__panel_"+t),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}function Jl({element:t,target:e,positions:n,limiter:i,fitInViewport:o}){q(e)&&(e=e()),q(i)&&(i=i());const r=function(t){for(;t&&"html"!=t.tagName.toLowerCase();){if("static"!=tr.window.getComputedStyle(t).position)return t;t=t.parentElement}return null}(t.parentElement),s=new xs(t),a=new xs(e);let c,l;if(i||o){const t=i&&new xs(i).getVisible(),e=o&&new xs(tr.window);[l,c]=function(t,e,n,i,o){let r,s,a=0,c=0;const l=n.getArea();return t.some(t=>{const[u,d]=Zl(t,e,n);let h,f;if(i)if(o){const t=i.getIntersection(o);h=t?t.getIntersectionArea(d):0}else h=i.getIntersectionArea(d);function p(){c=f,a=h,r=d,s=u}return o&&(f=o.getIntersectionArea(d)),o&&!i?f>c&&p():!o&&i?h>a&&p():(f>c&&h>=a||f>=c&&h>a)&&p(),h===l}),r?[s,r]:null}(n,a,s,t,e)||Zl(n[0],a,s)}else[l,c]=Zl(n[0],a,s);let{left:u,top:d}=Xl(c);if(r){const t=Xl(new xs(r)),e=ks(r);u-=t.left,d-=t.top,u+=r.scrollLeft,d+=r.scrollTop,u-=e.left,d-=e.top}return{left:u,top:d,name:l}}function Zl(t,e,n){const{left:i,top:o,name:r}=t(e,n);return[r,n.clone().moveTo(i,o)]}function Xl({left:t,top:e}){const{scrollX:n,scrollY:i}=tr.window;return{left:t+n,top:e+i}}n(24);class tu extends Dl{constructor(t,e,n){super(t);const i=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("panelPosition","auto"),this.focusTracker=new al,this.keystrokes=new Zc,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",t=>!t)]},children:[e,n]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=tu._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const t=(t,e)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,e())};this.keystrokes.set("arrowdown",(t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())}),this.keystrokes.set("arrowright",(t,e)=>{this.isOpen&&e()}),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:t,southWest:e,northEast:n,northWest:i}=tu.defaultPanelPositions;return"ltr"===this.locale.uiLanguageDirection?[t,e,n,i]:[e,t,i,n]}}tu.defaultPanelPositions={southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.bottom-e.height,left:t.left-e.width+t.width,name:"nw"})},tu._getOptimalPosition=Jl,n(26);class eu extends Dl{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:t.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");for(e&&(this.viewBox=e),this.element.innerHTML="";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(t=>{t.style.fill=this.fillColor})}}n(28);class nu extends Dl{constructor(t){super(t),this.set("text",""),this.set("position","s");const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",e.to("position",t=>"ck-tooltip_"+t),e.if("text","ck-hidden",t=>!t.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:e.to("text")}]}]})}}n(30);class iu extends Dl{constructor(t){super(t);const e=this.bindTemplate,n=Jn();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new eu,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",t=>!t),e.if("isVisible","ck-hidden",t=>!t),e.to("isOn",t=>t?"ck-on":"ck-off"),e.if("withText","ck-button_with-text")],type:e.to("type",t=>t||"button"),tabindex:e.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+n,"aria-disabled":e.if("isEnabled",!0,t=>!t),"aria-pressed":e.to("isOn",t=>!!this.isToggleable&&String(t))},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{this.isEnabled?this.fire("execute"):t.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const t=new nu;return t.bind("text").to(this,"_tooltipString"),t.bind("position").to(this,"tooltipPosition"),t}_createLabelView(t){const e=new Dl,n=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:"ck-editor__aria-label_"+t},children:[{text:this.bindTemplate.to("label")}]}),e}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=function(t){return po.isMac?_o(t).map(t=>go[t.toLowerCase()]||t).reduce((t,e)=>t.slice(-1)in mo?t+e:t+"+"+e):t}(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var ou='';class ru extends iu{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new eu;return t.content=ou,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}n(32);class su extends Dl{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new al,this.keystrokes=new Zc,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class au extends Dl{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class cu extends Dl{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}n(34);class lu extends iu{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new Dl;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}function uu({emitter:t,activator:e,callback:n,contextElements:i}){t.listenTo(document,"mousedown",(t,{target:o})=>{if(e()){for(const t of i)if(t.contains(o))return;n()}})}function du(t,e=ru){const n=new e(t),i=new Kl(t),o=new tu(t,n,i);return n.bind("isEnabled").to(o),n instanceof ru?n.bind("isOn").to(o,"isOpen"):n.arrowView.bind("isOn").to(o,"isOpen"),function(t){(function(t){t.on("render",()=>{uu({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})})})(t),function(t){t.on("execute",e=>{e.source instanceof lu||(t.isOpen=!1)})}(t),function(t){t.keystrokes.set("arrowdown",(e,n)=>{t.isOpen&&(t.panelView.focus(),n())}),t.keystrokes.set("arrowup",(e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())})}(t)}(o),o}function hu(t,e){const n=t.locale,i=t.listView=new su(n);i.items.bindTo(e).using(({type:t,model:e})=>{if("separator"===t)return new cu(n);if("button"===t||"switchbutton"===t){const i=new au(n);let o;return(o="button"===t?new iu(n):new lu(n)).bind(...Object.keys(e)).to(e),o.delegate("execute").to(i),i.children.add(o),i}}),t.panelView.children.add(i),i.items.delegate("execute").to(t)}n(36),n(38);var fu='\n';n(40);class pu extends Dl{constructor(t,e){super(t);const n=this.bindTemplate,i=this.t;this.options=e||{},this.set("ariaLabel",i("av")),this.items=this.createCollection(),this.focusTracker=new al,this.keystrokes=new Zc,this.set("class"),this.itemsView=new mu(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection(),this._focusCycler=new ql({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar",n.to("class")],role:"toolbar","aria-label":n.to("ariaLabel")},children:this.children,on:{mousedown:function(t){return t.bindTemplate.to(e=>{e.target===t.element&&e.preventDefault()})}(this)}}),this._behavior=this.options.shouldGroupWhenFull?new bu(this):new gu(this)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){t.map(t=>{"|"==t?this.items.add(new Yl):e.has(t)?this.items.add(e.create(t)):console.warn(Object(Gn.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:t})})}}class mu extends Dl{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class gu{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using(t=>t),t.focusables.bindTo(t.items).using(t=>t),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class bu{constructor(t){this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,t.itemsView.children.bindTo(this.ungroupedItems).using(t=>t),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),t.children.on("add",this._updateFocusCycleableItems.bind(this)),t.children.on("remove",this._updateFocusCycleableItems.bind(this)),t.items.on("add",(t,e,n)=>{n>this.ungroupedItems.length?this.groupedItems.add(e,n-this.ungroupedItems.length):this.ungroupedItems.add(e,n),this._updateGrouping()}),t.items.on("remove",(t,e,n)=>{n>this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e),this._updateGrouping()}),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize()}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.disconnect()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,n=new xs(t.lastChild),i=new xs(t);if(!this.cachedPadding){const n=tr.window.getComputedStyle(t),i="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[i])}return"ltr"===e?n.right>i.right-this.cachedPadding:n.left{t&&t===e.contentRect.width||(this._updateGrouping(),t=e.contentRect.width)}),this.resizeObserver.observe(this.viewElement),this._updateGrouping()}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Yl),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const t=this.viewLocale,e=t.t,n=du(t);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",function(t,e){const n=t.locale,i=n.t,o=t.toolbarView=new pu(n);o.set("ariaLabel",i("bf")),t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.map(t=>o.items.add(t)),t.panelView.children.add(o),o.items.delegate("execute").to(t)}(n,[]),n.buttonView.set({label:e("aw"),tooltip:!0,icon:fu}),n.toolbarView.items.bindTo(this.groupedItems).using(t=>t),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(t=>{this.viewFocusables.add(t)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}n(42);class wu extends zl{constructor(t,e){super(t),this.stickyPanel=new Hl(t),this.toolbar=new pu(t,{shouldGroupWhenFull:!0}),this.editable=new Fl(t,e)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class vu extends tl{constructor(t,e){super(e),qn(t)&&(this.sourceElement=t),this.data.processor=new ol,this.model.document.createRoot(),this.ui=new ml(this,new wu(this.locale,this.editing.view)),function(t){if(!q(t.updateSourceElement))throw new Gn.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",t);const e=t.sourceElement;if(e&&"textarea"===e.tagName.toLowerCase()&&e.form){let n;const i=e.form,o=()=>t.updateSourceElement();q(i.submit)&&(n=i.submit,i.submit=()=>{o(),n.apply(i)}),i.addEventListener("submit",o),t.on("destroy",()=>{i.removeEventListener("submit",o),n&&(i.submit=n)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise(n=>{const i=new this(t,e);n(i.initPlugins().then(()=>i.ui.init(qn(t)?t:null)).then(()=>{if(!qn(t)&&e.initialData)throw new Gn.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);const n=e.initialData||function(t){return qn(t)?function(t){return t instanceof HTMLTextAreaElement?t.value:t.innerHTML}(t):t}(t);return i.data.init(n)}).then(()=>i.fire("ready")).then(()=>i))})}}ci(vu,el),ci(vu,nl);class _u{constructor(t){this.editor=t}destroy(){this.stopListening()}}ci(_u,Fi);class ku{constructor(t){this.files=function(t){const e=t.files?Array.from(t.files):[],n=t.items?Array.from(t.items):[];return e.length?e:n.filter(t=>"file"===t.kind).map(t=>t.getAsFile())}(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}}class yu extends Xr{constructor(t){super(t);const e=this.document;function n(t,n){n.preventDefault();const i=n.dropRange?[n.dropRange]:Array.from(e.selection.getRanges()),o=new Kn(e,"clipboardInput");e.fire(o,{dataTransfer:n.dataTransfer,targetRanges:i}),o.stop.called&&n.stopPropagation()}this.domEventType=["paste","copy","cut","drop","dragover"],this.listenTo(e,"paste",n,{priority:"low"}),this.listenTo(e,"drop",n,{priority:"low"})}onDomEvent(t){const e={dataTransfer:new ku(t.clipboardData?t.clipboardData:t.dataTransfer)};"drop"==t.type&&(e.dropRange=function(t,e){const n=e.target.ownerDocument,i=e.clientX,o=e.clientY;let r;return n.caretRangeFromPoint&&n.caretRangeFromPoint(i,o)?r=n.caretRangeFromPoint(i,o):e.rangeParent&&((r=n.createRange()).setStart(e.rangeParent,e.rangeOffset),r.collapse(!0)),r?t.domConverter.domRangeToView(r):t.document.selection.getFirstRange()}(this.view,t)),this.fire(t.type,t,e)}}const xu=["figcaption","li"];class Au extends _u{static get pluginName(){return"Clipboard"}init(){const t=this.editor,e=t.model.document,n=t.editing.view,i=n.document;function o(n,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));i.fire("clipboardOutput",{dataTransfer:r,content:s,method:n.name})}this._htmlDataProcessor=new ol,n.addObserver(yu),this.listenTo(i,"clipboardInput",e=>{t.isReadOnly&&e.stop()},{priority:"highest"}),this.listenTo(i,"clipboardInput",(t,e)=>{const i=e.dataTransfer;let o="";i.getData("text/html")?o=function(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>1==e.length?" ":e)}(i.getData("text/html")):i.getData("text/plain")&&(o=function(t){return(t=t.replace(//g,">").replace(/\n/g,"

").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).indexOf("

")>-1&&(t=`

${t}

`),t}(i.getData("text/plain"))),o=this._htmlDataProcessor.toView(o),this.fire("inputTransformation",{content:o,dataTransfer:i}),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(t,e)=>{if(!e.content.isEmpty){const t=this.editor.data,n=this.editor.model,i=t.toModel(e.content,"$clipboardHolder");if(0==i.childCount)return;n.insertContent(i)}},{priority:"low"}),this.listenTo(i,"copy",o,{priority:"low"}),this.listenTo(i,"cut",(e,n)=>{t.isReadOnly?n.preventDefault():o(e,n)},{priority:"low"}),this.listenTo(i,"clipboardOutput",(n,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this._htmlDataProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",function t(e){let n="";if(e.is("text")||e.is("textProxy"))n=e.data;else if(e.is("img")&&e.hasAttribute("alt"))n=e.getAttribute("alt");else{let i=null;for(const o of e.getChildren()){const e=t(o);i&&(i.is("containerElement")||o.is("containerElement"))&&(xu.includes(i.name)||xu.includes(o.name)?n+="\n":n+="\n\n"),n+=e,i=o}}return n}(i.content))),"cut"==i.method&&t.model.deleteContent(e.selection)},{priority:"low"})}}class Cu{constructor(t){this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"}),this.listenTo(t,"change:isReadOnly",(t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",Tu,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",Tu),this.refresh())}execute(){}destroy(){this.stopListening()}}function Tu(t){t.return=!1,t.stop()}function*Su(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}ci(Cu,Fi);class Pu extends Cu{execute(){const t=this.editor.model,e=t.document;t.change(n=>{!function(t,e,n,i){const o=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(i.isLimit(s)||i.isLimit(a))o||s!=a||t.deleteContent(n);else if(o){const t=Su(e.model.schema,n.getAttributes());Eu(e,r.start),e.setSelectionAttribute(t)}else{const i=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;t.deleteContent(n,{leaveUnmerged:i}),i&&(o?Eu(e,n.focus):e.setSelection(a,0))}}(this.editor.model,n,e.selection,t.schema),this.fire("afterExecute",{writer:n})})}}function Eu(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}class Mu extends dr{constructor(t){super(t);const e=this.document;e.on("keydown",(t,n)=>{if(this.isEnabled&&n.keyCode==bo.enter){let i;e.once("enter",t=>i=t,{priority:"highest"}),e.fire("enter",new Zr(e,n.domEvent,{isSoft:n.shiftKey})),i&&i.stop.called&&t.stop()}})}observe(){}}class Iu extends _u{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document;e.addObserver(Mu),t.commands.add("enter",new Pu(t)),this.listenTo(n,"enter",(n,i)=>{i.preventDefault(),i.isSoft||(t.execute("enter"),e.scrollToTheSelection())},{priority:"low"})}}class Ou extends Cu{execute(){const t=this.editor.model,e=t.document;t.change(n=>{!function(t,e,n){const i=n.isCollapsed,o=n.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(i){const i=Su(t.schema,n.getAttributes());Nu(e,o.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(i)}else{const i=!(o.start.isAtStart&&o.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:i}),a?Nu(e,n.focus):i&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})})}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const i=e.getFirstRange(),o=i.start.parent,r=i.end.parent;return!Ru(o,t)&&!Ru(r,t)||o===r}(t.schema,e.selection)}}function Nu(t,e){const n=t.createElement("softBreak");t.insert(n,e),t.setSelection(n,"after")}function Ru(t,e){return!t.is("rootElement")&&(e.isLimit(t)||Ru(t.parent,e))}class ju extends _u{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,i=t.editing.view,o=i.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,e)=>e.createEmptyElement("br")}),i.addObserver(Mu),t.commands.add("shiftEnter",new Ou(t)),this.listenTo(o,"enter",(e,n)=>{n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),i.scrollToTheSelection())},{priority:"low"})}}class Du{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=(t,e)=>{"transparent"!=e.type&&e!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(t){this.size+=t,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}class Lu extends Cu{constructor(t,e){super(t),this._buffer=new Du(t.model,e),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,i=t.text||"",o=i.length,r=t.range||n.selection.getFirstRange(),s=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{const a=r.isCollapsed;this._buffer.lock(),e.deleteContent(e.createSelection(r)),i&&e.insertContent(t.createText(i,n.selection.getAttributes()),r.start),s?t.setSelection(s):a&&t.setSelection(r.start.getShiftedBy(o)),this._buffer.unlock(),this._buffer.input(o),this._batches.add(this._buffer.batch)})}}function Vu(t){let e=null;const n=t.model,i=t.editing.view,o=t.commands.get("input");function r(t){const r=n.document,a=i.document.isComposing,c=e&&e.isEqual(r.selection);e=null,o.isEnabled&&(function(t){return!!t.ctrlKey||zu.includes(t.keyCode)}(t)||r.selection.isCollapsed||a&&229===t.keyCode||!a&&229===t.keyCode&&c||s())}function s(){const t=o.buffer;t.lock(),n.enqueueChange(t.batch,()=>{n.deleteContent(n.document.selection)}),t.unlock()}po.isAndroid?i.document.on("beforeinput",(t,e)=>r(e),{priority:"lowest"}):i.document.on("keydown",(t,e)=>r(e),{priority:"lowest"}),i.document.on("compositionstart",(function(){const t=n.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;t.selection.isCollapsed||e||s()}),{priority:"lowest"}),i.document.on("compositionend",()=>{e=n.createSelection(n.document.selection)},{priority:"lowest"})}const zu=[wo("arrowUp"),wo("arrowRight"),wo("arrowDown"),wo("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let mb=112;mb<=135;mb++)zu.push(mb);function Bu(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=function(t,e){const n=[];let i,o=0;return t.forEach(t=>{"equal"==t?(r(),o++):"insert"==t?(s("insert")?i.values.push(e[o]):(r(),i={type:"insert",index:o,values:[e[o]]}),o++):s("delete")?i.howMany++:(r(),i={type:"delete",index:o,howMany:1})}),r(),n;function r(){i&&(n.push(i),i=null)}function s(t){return i&&i.type==t}}(Yo(t.oldChildren,t.newChildren,Fu),t.newChildren);if(e.length>1)return;const n=e[0];return n.values[0]&&n.values[0].is("text")?n:void 0}function Fu(t,e){return t&&t.is("text")&&e&&e.is("text")?t.data===e.data:t===e}class Uu{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!Bu(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const n of t)this._handleTextMutation(n,e),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(t,e){const n=function(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:!0}));if(e)return e.getAncestors({includeSelf:!0,parentFirst:!0}).find(t=>t.is("containerElement")||t.is("rootElement"))}(t);if(!n)return;const i=this.editor.editing.view.domConverter.mapViewToDom(n),o=new or,r=this.editor.data.toModel(o.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],u=c[c.length-1];l&&l.is("softBreak")&&u&&!u.is("softBreak")&&a.pop();const d=this.editor.model.schema;if(!$u(a,d)||!$u(c,d))return;const h=a.map(t=>t.is("text")?t.data:"@").join("").replace(/\u00A0/g," "),f=c.map(t=>t.is("text")?t.data:"@").join("").replace(/\u00A0/g," ");if(f===h)return;const p=Yo(f,h),{firstChangeAt:m,insertions:g,deletions:b}=Hu(p);let w=null;e&&(w=this.editing.mapper.toModelRange(e.getFirstRange()));const v=h.substr(m,g),_=this.editor.model.createRange(this.editor.model.createPositionAt(s,m),this.editor.model.createPositionAt(s,m+b));this.editor.execute("input",{text:v,range:_,resultRange:w})}_handleTextMutation(t,e){if("text"!=t.type)return;const n=t.newText.replace(/\u00A0/g," "),i=t.oldText.replace(/\u00A0/g," ");if(i===n)return;const o=Yo(i,n),{firstChangeAt:r,insertions:s,deletions:a}=Hu(o);let c=null;e&&(c=this.editing.mapper.toModelRange(e.getFirstRange()));const l=this.editing.view.createPositionAt(t.node,r),u=this.editing.mapper.toModelPosition(l),d=this.editor.model.createRange(u,u.getShiftedBy(a)),h=n.substr(r,s);this.editor.execute("input",{text:h,range:d,resultRange:c})}_handleTextNodeInsertion(t){if("children"!=t.type)return;const e=Bu(t),n=this.editing.view.createPositionAt(t.node,e.index),i=this.editing.mapper.toModelPosition(n),o=e.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}}function $u(t,e){return t.every(t=>e.isInline(t))}function Hu(t){let e=null,n=null;for(let r=0;r{new Uu(t).handle(n,i)})}(t)}isInput(t){return this.editor.commands.get("input")._batches.has(t)}}class Wu extends Cu{constructor(t,e){super(t),this.direction=e,this._buffer=new Du(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();const o=i.createSelection(t.selection||n.selection),r=o.isCollapsed;if(o.isCollapsed&&e.modifySelection(o,{direction:this.direction,unit:t.unit}),this._shouldEntireContentBeReplacedWithParagraph(t.sequence||1))return void this._replaceEntireContentWithParagraph(i);if(o.isCollapsed)return;let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(t=>{s+=eo(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),e.deleteContent(o,{doNotResetEntireContent:r}),this._buffer.input(s),i.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,i=e.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(i))return!1;if(!e.schema.checkChild(i,"paragraph"))return!1;const o=i.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,i=e.schema.getLimitElement(n),o=t.createElement("paragraph");t.remove(t.createRangeIn(i)),t.insert(o,i),t.setSelection(o,0)}}class Yu extends dr{constructor(t){super(t);const e=t.document;let n=0;function i(t,n,i){let o;e.once("delete",t=>o=t,{priority:Number.POSITIVE_INFINITY}),e.fire("delete",new Zr(e,n,i)),o&&o.stop.called&&t.stop()}e.on("keyup",(t,e)=>{e.keyCode!=bo.delete&&e.keyCode!=bo.backspace||(n=0)}),e.on("keydown",(t,e)=>{const o={};if(e.keyCode==bo.delete)o.direction="forward",o.unit="character";else{if(e.keyCode!=bo.backspace)return;o.direction="backward",o.unit="codePoint"}const r=po.isMac?e.altKey:e.ctrlKey;o.unit=r?"word":o.unit,o.sequence=++n,i(t,e.domEvent,o)}),po.isAndroid&&e.on("beforeinput",(e,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=t.domConverter.domSelectionToView(r)),i(e,n.domEvent,o)})}observe(){}}class Gu extends _u{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document;if(e.addObserver(Yu),t.commands.add("forwardDelete",new Wu(t,"forward")),t.commands.add("delete",new Wu(t,"backward")),this.listenTo(n,"delete",(n,i)=>{const o={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){const e=t.model.createSelection(),n=[];for(const o of i.selectionToRemove.getRanges())n.push(t.editing.mapper.toModelRange(o));e.setTo(n),o.selection=e}t.execute("forward"==i.direction?"forwardDelete":"delete",o),i.preventDefault(),e.scrollToTheSelection()}),po.isAndroid){let t=null;this.listenTo(n,"delete",(e,n)=>{const i=n.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(e,n)=>{if(t){const e=n.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}})}}}class Qu extends _u{static get requires(){return[qu,Gu]}static get pluginName(){return"Typing"}}class Ku extends Za{get type(){return"noop"}clone(){return new Ku(this.baseVersion)}getReversed(){return new Ku(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const Ju=new Map;function Zu(t,e,n){let i=Ju.get(t);i||(i=new Map,Ju.set(t,i)),i.set(e,n)}function Xu(t){return[t]}function td(t,e,n={}){const i=function(t,e){const n=Ju.get(t);return n&&n.has(e)?n.get(e):Xu}(t.constructor,e.constructor);try{return i(t=t.clone(),e,n)}catch(t){throw t}}function ed(t,e,n){t=t.slice(),e=e.slice();const i=new nd(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(t),i.setOriginalOperations(e);const o=i.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:o};const r=new WeakMap;for(const c of t)r.set(c,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a{if(t.key===e.key){const i=t.range.getDifference(e.range).map(e=>new cc(e,t.key,t.oldValue,t.newValue,0)),o=t.range.getIntersection(e.range);return o&&n.aIsStrong&&i.push(new cc(o,e.key,e.newValue,t.newValue,0)),0==i.length?[new Ku(0)]:i}return[t]}),Zu(cc,dc,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(e=>new cc(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const i=rd(e,t.key,t.oldValue);i&&n.unshift(i)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]}),Zu(cc,mc,(t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(Ys._createFromPositionAndShift(e.graveyardPosition,1));const i=t.range._getTransformedByMergeOperation(e);return i.isCollapsed||n.push(i),n.map(e=>new cc(e,t.key,t.oldValue,t.newValue,t.baseVersion))}),Zu(cc,uc,(t,e)=>function(t,e){const n=Ys._createFromPositionAndShift(e.sourcePosition,e.howMany);let i=null,o=[];n.containsRange(t,!0)?i=t:t.start.hasSameParentAs(n.start)?(o=t.getDifference(n),i=t.getIntersection(n)):o=[t];const r=[];for(let s of o){s=s._getTransformedByDeletion(e.sourcePosition,e.howMany);const t=e.getMovedRangeStart(),n=s.start.hasSameParentAs(t);s=s._getTransformedByInsertion(t,e.howMany,n),r.push(...s)}return i&&r.push(i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]),r}(t.range,e).map(e=>new cc(e,t.key,t.oldValue,t.newValue,t.baseVersion))),Zu(cc,gc,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new Ys(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]}),Zu(dc,cc,(t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const i=rd(t,e.key,e.newValue);i&&n.push(i)}return n}),Zu(dc,dc,(t,e,n)=>(t.position.isEqual(e.position)&&n.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t])),Zu(dc,uc,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),Zu(dc,gc,(t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t])),Zu(dc,mc,(t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t])),Zu(hc,dc,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t])),Zu(hc,hc,(t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new Ku(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]}),Zu(hc,mc,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t])),Zu(hc,uc,(t,e,n)=>{if(t.oldRange&&(t.oldRange=Ys._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const i=Ys._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.start.path=n.abRelation.path,t.newRange.end=i.end,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=i.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=Ys._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]}),Zu(hc,gc,(t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const i=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Ws._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=Ws._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=Ws._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Ws._createAt(e.insertionPosition):t.newRange.end=i.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]}),Zu(mc,dc,(t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t])),Zu(mc,mc,(t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new Ws(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new Ku(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const i="$graveyard"==t.targetPosition.root.rootName,o="$graveyard"==e.targetPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),i=t.targetPosition._getTransformedByMergeOperation(e);return[new uc(n,t.howMany,i,0)]}return[new Ku(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),Zu(mc,uc,(t,e,n)=>{const i=Ys._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)?[new Ku(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])}),Zu(mc,gc,(t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const i=0!=e.howMany,o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(i||o||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}),Zu(uc,dc,(t,e)=>{const n=Ys._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]}),Zu(uc,uc,(t,e,n)=>{const i=Ys._createFromPositionAndShift(t.sourcePosition,t.howMany),o=Ys._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),sd(t,e)&&sd(e,t))return[e.getReversed()];if(i.containsPosition(e.targetPosition)&&i.containsRange(o,!0))return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ad([i],r);if(o.containsPosition(t.targetPosition)&&o.containsRange(i,!0))return i.start=i.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),i.end=i.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),ad([i],r);const c=li(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ad([i],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const l=[],u=i.getDifference(o);for(const h of u){h.start=h.start._getTransformedByDeletion(e.sourcePosition,e.howMany),h.end=h.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const t="same"==li(h.start.getParentPath(),e.getMovedRangeStart().getParentPath()),n=h._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,t);l.push(...n)}const d=i.getIntersection(o);return null!==d&&s&&(d.start=d.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),d.end=d.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(d):1==l.length?o.start.isBefore(i.start)||o.start.isEqual(i.start)?l.unshift(d):l.push(d):l.splice(1,0,d)),0===l.length?[new Ku(t.baseVersion)]:ad(l,r)}),Zu(uc,gc,(t,e,n)=>{let i=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=t.targetPosition._getTransformedBySplitOperation(e));const o=Ys._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=i,[t];if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new Ys(e.splitPosition,o.end);return t=t._getTransformedBySplitOperation(e),ad([new Ys(o.start,e.splitPosition),t],i)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(i=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(i=t.targetPosition);const r=[o._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const i=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);t.howMany>1&&i&&!n.aWasUndone&&r.push(Ys._createFromPositionAndShift(e.insertionPosition,1))}return ad(r,i)}),Zu(uc,mc,(t,e,n)=>{const i=Ys._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new Ku(0)]}else if(!n.aWasUndone){const n=[];let i=e.graveyardPosition.clone(),o=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new uc(t.sourcePosition,t.howMany-1,t.targetPosition,0)),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new uc(i,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new Ws(s.targetPosition.root,a);o=o._getTransformedByMove(i,r,1);const l=new uc(o,e.howMany,c,0);return n.push(s),n.push(l),n}const o=Ys._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=o.start,t.howMany=o.end.offset-o.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]}),Zu(fc,dc,(t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t])),Zu(fc,mc,(t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t])),Zu(fc,uc,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),Zu(fc,fc,(t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new Ku(0)];t.oldName=e.newName}return[t]}),Zu(fc,gc,(t,e)=>"same"!=li(t.position.path,e.splitPosition.getParentPath())||e.graveyardPosition?(t.position=t.position._getTransformedBySplitOperation(e),[t]):[t,new fc(t.position.getShiftedBy(1),t.oldName,t.newName,0)]),Zu(pc,pc,(t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new Ku(0)];t.oldValue=e.newValue}return[t]}),Zu(gc,dc,(t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const i=new Ws(e.graveyardPosition.root,n),o=gc.getInsertionPosition(new Ws(e.graveyardPosition.root,n)),r=new gc(i,0,null,0);return r.insertionPosition=o,t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=gc.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=gc.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),Zu(gc,uc,(t,e,n)=>{const i=Ys._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&o){const n=t.splitPosition._getTransformedByMoveOperation(e),i=t.graveyardPosition._getTransformedByMoveOperation(e),o=i.path.slice();o.push(0);const r=new Ws(i.root,o);return[new uc(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new Ku(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new Ku(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const i="$graveyard"==t.splitPosition.root.rootName,o="$graveyard"==e.splitPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=[];return e.howMany&&n.push(new uc(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new uc(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new Ku(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const i=new Ws(e.insertionPosition.root,n);return[t,new uc(t.insertionPosition,1,i,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset0}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const i=this.editor.model,o=i.document,r=[];for(const s of t){const t=ld(s,n).find(t=>t.start.root!=o.graveyard);t&&r.push(t)}r.length&&i.change(t=>{t.setSelection(r,{backward:e})})}_undo(t,e){const n=this.editor.model,i=n.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const r of o){const t=r.baseVersion+1,o=Array.from(i.history.getOperations(t)),s=ed([r.getReversed()],o,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const a of s)e.addOperation(a),n.applyOperation(a),i.history.setOperationAsUndone(r,a)}}}function ld(t,e){const n=t.getTransformedByOperations(e);n.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let i=1;ie.batch==t):this._stack.length-1,n=this._stack.splice(e,1)[0],i=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(i,()=>{this._undo(n.batch,i);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t),this.fire("revert",n.batch,i)}),this.refresh()}}class dd extends cd{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(e,()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,i),this._undo(t.batch,e)}),this.refresh()}}class hd extends _u{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new ud(t),this._redoCommand=new dd(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const i=n.batch,o=this._redoCommand._createdBatches.has(i),r=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||"transparent"==i.type&&!o&&!r||(o?this._undoCommand.addBatch(i):r||(this._undoCommand.addBatch(i),this._redoCommand.clearStack()),this._batchRegistry.add(i))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(t,e,n)=>{this._redoCommand.addBatch(n)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}var fd='',pd='';class md extends _u{init(){const t=this.editor,e=t.locale,n=t.t,i="ltr"==e.uiLanguageDirection?fd:pd,o="ltr"==e.uiLanguageDirection?pd:fd;this._addButton("undo",n("bg"),"CTRL+Z",i),this._addButton("redo",n("bh"),"CTRL+Y",o)}_addButton(t,e,n,i){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t),a=new iu(r);return a.set({label:e,icon:i,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>o.execute(t)),a})}}class gd extends _u{static get requires(){return[hd,md]}static get pluginName(){return"Undo"}}class bd extends _u{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new oo({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new Gn.b("pendingactions-add-invalid-message: The message must be a string.",this);const e=Object.create(Fi);return e.set("message",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class wd{constructor(){const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise((n,i)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{i("error")},e.onabort=()=>{i("aborted")},this._reader.readAsDataURL(t)})}abort(){this._reader.abort()}}ci(wd,Fi);class vd extends _u{static get pluginName(){return"FileRepository"}static get requires(){return[bd]}init(){this.loaders=new oo,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,e)=>e?t/e*100:0)}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return console.warn(Object(Gn.a)("filerepository-no-upload-adapter: Upload adapter is not defined.")),null;const e=new _d(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then(t=>{this._loadersMap.set(t,e)}).catch(()=>{}),e.on("change:uploaded",()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t}),e.on("change:uploadTotal",()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t}),e}destroyLoader(t){const e=t instanceof _d?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach((t,n)=>{t===e&&this._loadersMap.delete(n)})}_updatePendingAction(){const t=this.editor.plugins.get(bd);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("d")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}ci(vd,Fi);class _d{constructor(t,e){this.id=Jn(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new wd,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,e)=>e?t/e*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(t=>this._filePromiseWrapper?t:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new Gn.b("filerepository-read-wrong-status: You cannot call read if the status is different than idle.",this);return this.status="reading",this.file.then(t=>this._reader.read(t)).then(t=>{if("reading"!==this.status)throw this.status;return this.status="idle",t}).catch(t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t})}upload(){if("idle"!=this.status)throw new Gn.b("filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(t=>(this.uploadResponse=t,this.status="idle",t)).catch(t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t})}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(t){const e={};return e.promise=new Promise((n,i)=>{e.rejecter=i,e.isFulfilled=!1,t.then(t=>{e.isFulfilled=!0,n(t)}).catch(t=>{e.isFulfilled=!0,i(t)})}),e}}ci(_d,Fi);const kd="ckCsrfToken",yd=40,xd="abcdefghijklmnopqrstuvwxyz0123456789";function Ad(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("="),i=decodeURIComponent(e[0].trim().toLowerCase());if(i===t)return decodeURIComponent(e[1])}return null}(kd);return t&&t.length==yd||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let i=0;i.5?t.toUpperCase():t}return e}(yd),function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+";path=/"}(kd,t)),t}class Cd{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then(t=>new Promise((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const i=this.xhr,o=this.loader,r=(0,this.t)("a")+` ${n.name}.`;i.addEventListener("error",()=>e(r)),i.addEventListener("abort",()=>e()),i.addEventListener("load",()=>{const n=i.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})}),i.upload&&i.upload.addEventListener("progress",t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)})}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",Ad()),this.xhr.send(e)}}class Td{static get pluginName(){return"BlockAutoformatEditing"}constructor(t,e,n){let i,o=null;"function"==typeof n?i=n:(o=t.commands.get(n),i=()=>{t.execute(n)}),t.model.document.on("change",(n,r)=>{if(o&&!o.isEnabled)return;if("transparent"==r.type)return;const s=Array.from(t.model.document.differ.getChanges()),a=s[0];if(1!=s.length||"insert"!==a.type||"$text"!=a.name||1!=a.length)return;const c=a.position.textNode||a.position.nodeAfter;if(!c.parent.is("paragraph"))return;const l=e.exec(c.data);l&&t.model.enqueueChange(t=>{const e=t.createPositionAt(c.parent,0),n=t.createPositionAt(c.parent,l[0].length),o=new oa(e,n);!1!==i({match:l})&&t.remove(o),o.detach()})})}}class Sd{static get pluginName(){return"InlineAutoformatEditing"}constructor(t,e,n){let i,o,r,s;e instanceof RegExp?i=e:r=e,"string"==typeof n?o=n:s=n,r=r||(t=>{let e;const n=[],o=[];for(;null!==(e=i.exec(t))&&!(e&&e.length<4);){let{index:t,1:i,2:r,3:s}=e;const a=i+r+s,c=[t+=e[0].length-a.length,t+i.length],l=[t+i.length+r.length,t+i.length+r.length+s.length];n.push(c),n.push(l),o.push([t+i.length,t+i.length+r.length])}return{remove:n,format:o}}),s=s||((e,n)=>{const i=t.model.schema.getValidRanges(n,o);for(const t of i)e.setAttribute(o,!0,t);e.removeSelectionAttribute(o)}),t.model.document.on("change",(e,n)=>{if("transparent"==n.type)return;const i=t.model,o=i.document.selection;if(!o.isCollapsed)return;const a=Array.from(i.document.differ.getChanges()),c=a[0];if(1!=a.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const l=o.focus,u=l.parent,{text:d,range:h}=function(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce((t,i)=>i.is("text")||i.is("textProxy")?t+i.data:(n=e.createPositionAfter(i),""),""),range:e.createRange(n,t.end)}}(i.createRange(i.createPositionAt(u,0),l),i),f=r(d),p=Pd(h.start,f.format,i),m=Pd(h.start,f.remove,i);p.length&&m.length&&i.enqueueChange(t=>{if(!1!==s(t,p))for(const e of m.reverse())t.remove(e)})})}}function Pd(t,e,n){return e.filter(t=>void 0!==t[0]&&void 0!==t[1]).map(e=>n.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1])))}function Ed(t,e){return(n,i)=>{if(!t.commands.get(e).isEnabled)return!1;const o=t.model.schema.getValidRanges(i,e);for(const t of o)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class Md extends Cu{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,i=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(n.isCollapsed)i?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const o=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of o)i?t.setAttribute(this.attributeKey,i,e):t.removeAttribute(this.attributeKey,e)}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const i of n.getRanges())for(const t of i.getItems())if(e.checkAttribute(t,this.attributeKey))return t.hasAttribute(this.attributeKey);return!1}}const Id="bold";class Od extends _u{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Id}),t.model.schema.setAttributeProperties(Id,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Id,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e?"bold"==e||Number(e)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),t.commands.add(Id,new Md(t,Id)),t.keystrokes.set("CTRL+B",Id)}}var Nd='';const Rd="bold";class jd extends _u{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Rd,n=>{const i=t.commands.get(Rd),o=new iu(n);return o.set({label:e("f"),icon:Nd,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>t.execute(Rd)),o})}}const Dd="italic";class Ld extends _u{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Dd}),t.model.schema.setAttributeProperties(Dd,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Dd,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(Dd,new Md(t,Dd)),t.keystrokes.set("CTRL+I",Dd)}}var Vd='';const zd="italic";class Bd extends _u{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(zd,n=>{const i=t.commands.get(zd),o=new iu(n);return o.set({label:e("i"),icon:Vd,keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>t.execute(zd)),o})}}function Fd(t){const e=t.next();return e.done?null:e.value}class Ud extends Cu{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,i=e.document.selection,o=Array.from(i.getSelectedBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(r){const e=o.filter(t=>$d(t)||qd(n,t));this._applyQuote(t,e)}else this._removeQuote(t,o.filter($d))})}_getValue(){const t=Fd(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!$d(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=Fd(t.getSelectedBlocks());return!!n&&qd(e,n)}_removeQuote(t,e){Hd(t,e).reverse().forEach(e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)})}_applyQuote(t,e){const n=[];Hd(t,e).reverse().forEach(e=>{let i=$d(e.start);i||(i=t.createElement("blockQuote"),t.wrap(e,i)),n.push(i)}),n.reverse().reduce((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n)}}function $d(t){return"blockQuote"==t.parent.name?t.parent:null}function Hd(t,e){let n,i=0;const o=[];for(;i{if(t.endsWith("blockQuote")&&"blockQuote"==e.name)return!1}),t.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),t.model.document.registerPostFixer(n=>{const i=t.model.document.differ.getChanges();for(const t of i)if("insert"==t.type){const i=t.position.nodeAfter;if(!i)continue;if(i.is("blockQuote")&&i.isEmpty)return n.remove(i),!0;if(i.is("blockQuote")&&!e.checkChild(t.position,i))return n.unwrap(i),!0;if(i.is("element")){const t=n.createRangeIn(i);for(const i of t.getItems())if(i.is("blockQuote")&&!e.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1})}afterInit(){const t=this.editor.commands.get("blockQuote");this.listenTo(this.editor.editing.view.document,"enter",(e,n)=>{const i=this.editor.model.document,o=i.selection.getLastPosition().parent;i.selection.isCollapsed&&o.isEmpty&&t.value&&(this.editor.execute("blockQuote"),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}var Yd='';n(44);class Gd extends _u{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("blockQuote",n=>{const i=t.commands.get("blockQuote"),o=new iu(n);return o.set({label:e("e"),icon:Yd,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>t.execute("blockQuote")),o})}}class Qd extends Cu{refresh(){const t=this.editor.model,e=Fd(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("paragraph"),this.isEnabled=!!e&&Kd(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document;e.change(i=>{const o=(t.selection||n.selection).getSelectedBlocks();for(const t of o)!t.is("paragraph")&&Kd(t,e.schema)&&i.rename(t,"paragraph")})}}function Kd(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class Jd extends _u{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model,n=t.data;t.commands.add("paragraph",new Qd(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,e)=>Jd.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,converterPriority:"low"}),n.upcastDispatcher.on("element",(t,e,n)=>{n.consumable.test(e.viewItem,{name:e.viewItem.name})&&Xd(e.viewItem,e.modelCursor,n.schema)&&Object.assign(e,Zd(e.viewItem,e.modelCursor,n))},{priority:"low"}),n.upcastDispatcher.on("text",(t,e,n)=>{e.modelRange||Xd(e.viewItem,e.modelCursor,n.schema)&&Object.assign(e,Zd(e.viewItem,e.modelCursor,n))},{priority:"lowest"}),e.document.registerPostFixer(t=>this._autoparagraphEmptyRoots(t)),t.data.on("ready",()=>{e.enqueueChange("transparent",t=>this._autoparagraphEmptyRoots(t))},{priority:"lowest"})}_autoparagraphEmptyRoots(t){const e=this.editor.model;for(const n of e.document.getRootNames()){const i=e.document.getRoot(n);if(i.isEmpty&&"$graveyard"!=i.rootName&&e.schema.checkChild(i,"paragraph"))return t.insertElement("paragraph",i),!0}}}function Zd(t,e,n){const i=n.writer.createElement("paragraph");return n.writer.insert(i,e),n.convertItem(t,n.writer.createPositionAt(i,0))}function Xd(t,e,n){const i=n.createContext(e);return!!n.checkChild(i,"paragraph")&&!!n.checkChild(i.push("paragraph"),t)}Jd.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td"]);class th extends Cu{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=Fd(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some(e=>eh(t,e,this.editor.model.schema))}execute(t){const e=this.editor.model,n=e.document,i=t.value;e.change(t=>{const o=Array.from(n.selection.getSelectedBlocks()).filter(t=>eh(t,i,e.schema));for(const e of o)e.is(i)||t.rename(e,i)})}}function eh(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const nh="paragraph";class ih extends _u{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[Jd]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const i of e)i.model!==nh&&(t.model.schema.register(i.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(i),n.push(i.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new th(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",(e,i)=>{const o=t.model.document.selection.getFirstPosition().parent;n.some(t=>o.is(t.model))&&!o.is(nh)&&0===o.childCount&&i.writer.rename(o,nh)})}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:Zn.get("low")+1})}}class oh{constructor(t,e){e&&Di(this,e),t&&this.set(t)}}ci(oh,Fi),n(10);class rh extends _u{init(){const t=this.editor,e=t.t,n=function(t){const e=t.t,n={Paragraph:e("bs"),"Heading 1":e("bt"),"Heading 2":e("bu"),"Heading 3":e("bv"),"Heading 4":e("bw"),"Heading 5":e("bx"),"Heading 6":e("by")};return t.config.get("heading.options").map(t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t})}(t),i=e("g"),o=e("h");t.ui.componentFactory.add("heading",e=>{const r={},s=new oo,a=t.commands.get("heading"),c=t.commands.get("paragraph"),l=[a];for(const t of n){const e={type:"button",model:new oh({label:t.title,class:t.class,withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(c,"value"),e.model.set("commandName","paragraph"),l.push(c)):(e.model.bind("isOn").to(a,"value",e=>e===t.model),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),r[t.model]=t.title}const u=du(e);return hu(u,s),u.buttonView.set({isOn:!1,withText:!0,tooltip:o}),u.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),u.bind("isEnabled").toMany(l,"isEnabled",(...t)=>t.some(t=>t)),u.buttonView.bind("label").to(a,"value",c,"value",(t,e)=>{const n=t||e&&"paragraph";return r[n]?r[n]:i}),this.listenTo(u,"execute",e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:void 0),t.editing.view.focus()}),u})}}class sh extends dr{constructor(t){super(t),this._observedElements=new Set}observe(t,e){this.document.getRoot(e).on("change:children",(e,n)=>{this.view.once("render",()=>this._updateObservedElements(t,n))})}_updateObservedElements(t,e){if(!e.is("element")||e.is("attributeElement"))return;const n=this.view.domConverter.mapViewToDom(e);if(n){for(const t of n.querySelectorAll("img"))this._observedElements.has(t)||(this.listenTo(t,"load",(t,e)=>this._fireEvents(e)),this._observedElements.add(t));for(const e of this._observedElements)t.contains(e)||(this.stopListening(e),this._observedElements.delete(e))}}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}destroy(){this._observedElements.clear(),super.destroy()}}function ah(t){return n=>{n.on(`attribute:${t}:image`,e)};function e(t,e,n){if(!n.consumable.consume(e.item,t.name))return;const i=n.writer,o=n.mapper.toViewElement(e.item).getChild(0);null!==e.attributeNewValue?i.setAttribute(e.attributeKey,e.attributeNewValue,o):i.removeAttribute(e.attributeKey,o)}}class ch{constructor(){this._stack=[]}add(t,e){const n=this._stack,i=n[0];this._insertDescriptor(t);const o=n[0];i===o||lh(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:e})}remove(t,e){const n=this._stack,i=n[0];this._removeDescriptor(t);const o=n[0];i===o||lh(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex(e=>e.id===t.id);if(lh(t,e[n]))return;n>-1&&e.splice(n,1);let i=0;for(;e[i]&&uh(e[i],t);)i++;e.splice(i,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex(e=>e.id===t);n>-1&&e.splice(n,1)}}function lh(t,e){return t&&e&&t.priority==e.priority&&dh(t.classes)==dh(e.classes)}function uh(t,e){return t.priority>e.priority||!(t.prioritydh(e.classes)}function dh(t){return Array.isArray(t)?t.sort().join(","):t}ci(ch,ei);var hh='';const fh="ck-widget",ph="ck-widget_selected";function mh(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function gh(t,e,n={}){return po.isEdge||e.setAttribute("contenteditable","false",t),e.addClass(fh,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=_h,n.label&&function(t,e,n){n.setCustomProperty("widgetLabel",e,t)}(t,n.label,e),n.hasSelectionHandle&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),n=new eu;return n.set("content",hh),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),function(t,e,n,i){const o=new ch;o.on("change:top",(e,o)=>{o.oldDescriptor&&i(t,o.oldDescriptor,o.writer),o.newDescriptor&&n(t,o.newDescriptor,o.writer)}),e.setCustomProperty("addHighlight",(t,e,n)=>o.add(e,n),t),e.setCustomProperty("removeHighlight",(t,e,n)=>o.remove(e,n),t)}(t,e,(t,e,n)=>n.addClass(i(e.classes),t),(t,e,n)=>n.removeClass(i(e.classes),t)),t;function i(t){return Array.isArray(t)?t:[t]}}function bh(t){const e=t.getCustomProperty("widgetLabel");return e?"function"==typeof e?e():e:""}function wh(t,e){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),po.isEdge||(e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",(n,i,o)=>{e.setAttribute("contenteditable",o?"false":"true",t)})),t.on("change:isFocused",(n,i,o)=>{o?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)}),t}function vh(t,e){const n=t.getSelectedElement();if(n&&e.schema.isBlock(n))return e.createPositionAfter(n);const i=t.getSelectedBlocks().next().value;if(i){if(i.isEmpty)return e.createPositionAt(i,0);const n=e.createPositionAfter(i);return t.focus.isTouching(n)?n:e.createPositionBefore(i)}return t.focus}function _h(){return null}function kh(t){const e=t.getSelectedElement();return e&&function(t){return!!t.getCustomProperty("image")&&mh(t)}(e)?e:null}function yh(t){return!!t&&t.is("image")}function xh(t,e,n={}){const i=t.createElement("image",n),o=vh(e.document.selection,e);e.insertContent(i,o),i.parent&&t.setSelection(i,"on")}function Ah(t){const e=t.schema,n=t.document.selection;return function(t,e,n){const i=function(t,e){const n=vh(t,e).parent;return n.isEmpty&&!n.is("$root")?n.parent:n}(t,n);return e.checkChild(i,"image")}(n,e,t)&&!function(t,e){const n=t.getSelectedElement();return n&&e.isObject(n)}(n,e)&&function(t){return[...t.focus.getAncestors()].every(t=>!t.is("image"))}(n)}class Ch extends Cu{refresh(){this.isEnabled=Ah(this.editor.model)}execute(t){const e=this.editor.model;e.change(n=>{const i=Array.isArray(t.source)?t.source:[t.source];for(const t of i)xh(n,e,{src:t})})}}class Th extends _u{static get pluginName(){return"ImageEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,i=t.conversion;t.editing.view.addObserver(sh),e.register("image",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),i.for("dataDowncast").elementToElement({model:"image",view:(t,e)=>Sh(e)}),i.for("editingDowncast").elementToElement({model:"image",view:(t,e)=>function(t,e,n){return e.setCustomProperty("image",!0,t),gh(t,e,{label:function(){const e=t.getChild(0).getAttribute("alt");return e?`${e} ${n}`:n}})}(Sh(e),e,n("j"))}),i.for("downcast").add(ah("src")).add(ah("alt")).add(function(){return e=>{e.on("attribute:srcset:image",t)};function t(t,e,n){if(!n.consumable.consume(e.item,t.name))return;const i=n.writer,o=n.mapper.toViewElement(e.item).getChild(0);if(null===e.attributeNewValue){const t=e.attributeOldValue;t.data&&(i.removeAttribute("srcset",o),i.removeAttribute("sizes",o),t.width&&i.removeAttribute("width",o))}else{const t=e.attributeNewValue;t.data&&(i.setAttribute("srcset",t.data,o),i.setAttribute("sizes","100vw",o),t.width&&i.setAttribute("width",t.width,o))}}}()),i.for("upcast").elementToElement({view:{name:"img",attributes:{src:!0}},model:(t,e)=>e.createElement("image",{src:t.getAttribute("src")})}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:t=>{const e={data:t.getAttribute("srcset")};return t.hasAttribute("width")&&(e.width=t.getAttribute("width")),e}}}).add(function(){return e=>{e.on("element:figure",t)};function t(t,e,n){if(!n.consumable.test(e.viewItem,{name:!0,classes:"image"}))return;const i=Array.from(e.viewItem.getChildren()).find(t=>t.is("img"));if(!i||!i.hasAttribute("src")||!n.consumable.test(i,{name:!0}))return;const o=n.convertItem(i,e.modelCursor),r=Fd(o.modelRange.getItems());r&&(n.convertChildren(e.viewItem,n.writer.createPositionAt(r,0)),e.modelRange=o.modelRange,e.modelCursor=o.modelCursor)}}()),t.commands.add("imageInsert",new Ch(t))}}function Sh(t){const e=t.createEmptyElement("img"),n=t.createContainerElement("figure",{class:"image"});return t.insert(t.createPositionAt(n,0),e),n}class Ph extends Xr{constructor(t){super(t),this.domEventType="mousedown"}onDomEvent(t){this.fire(t.type,t)}}n(47);const Eh=vo("Ctrl+A");class Mh extends _u{static get pluginName(){return"Widget"}init(){const t=this.editor.editing.view,e=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const i=n.writer,o=i.document.selection,r=o.getSelectedElement();let s=null;for(const a of o.getRanges())for(const t of a){const e=t.item;mh(e)&&!Ih(e,s)&&(i.addClass(ph,e),this._previouslySelected.add(e),s=e,e==r&&i.setSelection(o.getRanges(),{fake:!0,label:bh(r)}))}},{priority:"low"}),t.addObserver(Ph),this.listenTo(e,"mousedown",(...t)=>this._onMousedown(...t)),this.listenTo(e,"keydown",(...t)=>this._onKeydown(...t),{priority:"high"}),this.listenTo(e,"delete",(t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())},{priority:"high"})}_onMousedown(t,e){const n=this.editor,i=n.editing.view,o=i.document;let r=e.target;if(function(t){for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(mh(t))return!1;t=t.parent}return!1}(r)){if(po.isSafari&&e.domEvent.detail>=3){const t=n.editing.mapper.toModelElement(r);this.editor.model.change(n=>{e.preventDefault(),n.setSelection(t,"in")})}return}if(!mh(r)&&!(r=r.findAncestor(mh)))return;e.preventDefault(),o.isFocused||i.focus();const s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_onKeydown(t,e){const n=e.keyCode,i="ltr"===this.editor.locale.contentLanguageDirection,o=n==bo.arrowdown||n==bo[i?"arrowright":"arrowleft"];let r=!1;!function(t){return t==bo.arrowright||t==bo.arrowleft||t==bo.arrowup||t==bo.arrowdown}(n)?function(t){return wo(t)==Eh}(e)?r=this._selectAllNestedEditableContent()||this._selectAllContent():n===bo.enter&&(r=this._handleEnterKey(e.shiftKey)):r=this._handleArrowKeys(o),r&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change(t=>{let i=e.anchor.parent;for(;i.isEmpty;){const e=i;i=e.parent,t.remove(e)}this._setSelectionOverElement(n)}),!0):void 0}_handleArrowKeys(t){const e=this.editor.model,n=e.schema,i=e.document.selection,o=i.getSelectedElement();if(o&&n.isObject(o)){const o=t?i.getLastPosition():i.getFirstPosition(),r=n.getNearestSelectionRange(o,t?"forward":"backward");return r&&e.change(t=>{t.setSelection(r)}),!0}if(!i.isCollapsed)return;const r=this._getObjectElementNextToSelection(t);return r&&n.isObject(r)?(this._setSelectionOverElement(r),!0):void 0}_handleEnterKey(t){const e=this.editor.model,n=e.document.selection.getSelectedElement();if(function(t,e){return t&&e.isObject(t)&&!e.isInline(t)}(n,e.schema))return e.change(i=>{let o=i.createPositionAt(n,t?"before":"after");const r=i.createElement("paragraph");if(e.schema.isBlock(n.parent)){const t=e.schema.findAllowedParent(o,r);o=i.split(o,t).position}i.insert(r,o),i.setSelection(r,"in")}),!0}_selectAllNestedEditableContent(){const t=this.editor.model,e=t.document.selection,n=t.schema.getLimitElement(e);return e.getFirstRange().root!=n&&(t.change(t=>{t.setSelection(t.createRangeIn(n))}),!0)}_selectAllContent(){const t=this.editor.model,e=this.editor.editing,n=e.view.document.selection.getSelectedElement();if(n&&mh(n)){const i=e.mapper.toModelElement(n.parent);return t.change(t=>{t.setSelection(t.createRangeIn(i))}),!0}return!1}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,i=e.document.selection,o=e.createSelection(i);e.modifySelection(o,{direction:t?"forward":"backward"});const r=t?o.focus.nodeBefore:o.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(ph,e);this._previouslySelected.clear()}}function Ih(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class Oh extends Cu{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=yh(t),yh(t)&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor.model,n=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute("alt",t.newValue,n)})}}class Nh extends _u{static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Oh(this.editor))}}n(49);class Rh extends Dl{constructor(t,e){super(t);const n="ck-input-"+Jn(),i="ck-status-"+Jn();this.set("label"),this.set("value"),this.set("isReadOnly",!1),this.set("errorText",null),this.set("infoText",null),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(e,n,i),this.statusView=this._createStatusView(i),this.bind("_statusText").to(this,"errorText",this,"infoText",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input",o.if("isReadOnly","ck-disabled")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new Vl(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createInputView(t,e,n){const i=new t(this.locale,n);return i.id=e,i.ariaDescribedById=n,i.bind("value").to(this),i.bind("isReadOnly").to(this),i.bind("hasError").to(this,"errorText",t=>!!t),i.on("input",()=>{this.errorText=null}),i}_createStatusView(t){const e=new Dl(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input__status",n.if("errorText","ck-labeled-input__status_error"),n.if("_statusText","ck-hidden",t=>!t)],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}select(){this.inputView.select()}focus(){this.inputView.focus()}}n(51);class jh extends Dl{constructor(t){super(t),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById");const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to("input")}})}render(){super.render();const t=t=>{this.element.value=t||0===t?t:""};t(this.value),this.on("change:value",(e,n,i)=>{t(i)})}select(){this.element.select()}focus(){this.element.focus()}}function Dh({view:t}){t.listenTo(t.element,"submit",(e,n)=>{n.preventDefault(),t.fire("submit")},{useCapture:!0})}var Lh='',Vh='';n(53);class zh extends Dl{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new al,this.keystrokes=new Zc,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("bc"),Lh,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("bd"),Vh,"ck-button-cancel","cancel"),this._focusables=new gl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Dh({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)})}_createButton(t,e,n,i){const o=new iu(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createLabeledInputView(){const t=this.locale.t,e=new Rh(this.locale,jh);return e.label=t("be"),e.inputView.placeholder=t("be"),e}}n(55);const Bh=Ul("px"),Fh=tr.document.body;class Uh extends Dl{constructor(t){super(t);const e=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",e.to("position",t=>"ck-balloon-panel_"+t),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",Bh),left:e.to("left",Bh)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Uh.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthWest,e.northArrowSouthEast],limiter:Fh,fitInViewport:!0},t),i=Uh._getOptimalPosition(n),o=parseInt(i.left),r=parseInt(i.top),s=i.name;Object.assign(this,{top:r,left:o,position:s})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(t){this.attachTo(t);const e=$h(t.target),n=t.limiter?$h(t.limiter):Fh;this.listenTo(tr.document,"scroll",(i,o)=>{const r=o.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)},{useCapture:!0}),this.listenTo(tr.window,"resize",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(tr.document,"scroll"),this.stopListening(tr.window,"resize")}}function $h(t){return qn(t)?t:_s(t)?t.commonAncestorContainer:"function"==typeof t?$h(t()):null}function Hh(t,e){return t.top-e.height-Uh.arrowVerticalOffset}function qh(t){return t.bottom+Uh.arrowVerticalOffset}Uh.arrowHorizontalOffset=25,Uh.arrowVerticalOffset=10,Uh._getOptimalPosition=Jl,Uh.defaultPositions={northArrowSouth:(t,e)=>({top:Hh(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"}),northArrowSouthEast:(t,e)=>({top:Hh(t,e),left:t.left+t.width/2-e.width+Uh.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(t,e)=>({top:Hh(t,e),left:t.left+t.width/2-Uh.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouth:(t,e)=>({top:Hh(t,e),left:t.left-e.width/2,name:"arrow_s"}),northWestArrowSouthWest:(t,e)=>({top:Hh(t,e),left:t.left-Uh.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthEast:(t,e)=>({top:Hh(t,e),left:t.left-e.width+Uh.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouth:(t,e)=>({top:Hh(t,e),left:t.right-e.width/2,name:"arrow_s"}),northEastArrowSouthEast:(t,e)=>({top:Hh(t,e),left:t.right-e.width+Uh.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(t,e)=>({top:Hh(t,e),left:t.right-Uh.arrowHorizontalOffset,name:"arrow_sw"}),southArrowNorth:(t,e)=>({top:qh(t),left:t.left+t.width/2-e.width/2,name:"arrow_n"}),southArrowNorthEast:(t,e)=>({top:qh(t),left:t.left+t.width/2-e.width+Uh.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(t,e)=>({top:qh(t),left:t.left+t.width/2-Uh.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorth:(t,e)=>({top:qh(t),left:t.left-e.width/2,name:"arrow_n"}),southWestArrowNorthWest:(t,e)=>({top:qh(t),left:t.left-Uh.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthEast:(t,e)=>({top:qh(t),left:t.left-e.width+Uh.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorth:(t,e)=>({top:qh(t),left:t.right-e.width/2,name:"arrow_n"}),southEastArrowNorthEast:(t,e)=>({top:qh(t),left:t.right-e.width+Uh.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(t,e)=>({top:qh(t),left:t.right-Uh.arrowHorizontalOffset,name:"arrow_nw"})};var Wh='\n',Yh='\n';n(57),n(59);const Gh=Ul("px");class Qh extends _u{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.view=new Uh(t.locale),t.ui.view.body.add(this.view),t.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new Gn.b("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new Gn.b("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new Gn.b("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find(e=>e[1]===t)[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Kh(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>1),t.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(t,n)=>{if(n<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("az",[i,n])}),t.buttonNextView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),t.buttonPrevView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),t}_createFakePanelsView(){const t=new Jh(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>=2?Math.min(t-1,2):0),t.listenTo(this.view,"change:top",()=>t.updatePosition()),t.listenTo(this.view,"change:left",()=>t.updatePosition()),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:i=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&!t.limiter&&(t=Object.assign({},t,{limiter:this.positionLimiter})),t}}class Kh extends Dl{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new al,this.buttonPrevView=this._createButtonView(e("ba"),Wh),this.buttonNextView=this._createButtonView(e("bb"),Yh),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",t=>t?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new iu(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class Jh extends Dl{constructor(t,e){super(t);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",t=>t?"":"ck-hidden")],style:{top:n.to("top",Gh),left:n.to("left",Gh),width:n.to("width",Gh),height:n.to("height",Gh)}},children:this.content}),this.on("change:numberOfPanels",(t,e,n,i)=>{n>i?this._addPanels(n-i):this._removePanels(i-n),this.updatePosition()})}_addPanels(t){for(;t--;){const t=new Dl;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:i}=new xs(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:i})}}}var Zh='';function Xh(t){const e=t.editing.view,n=Uh.defaultPositions;return{target:e.domConverter.viewToDom(e.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}class tf extends _u{static get requires(){return[Qh]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",n=>{const i=t.commands.get("imageTextAlternative"),o=new iu(n);return o.set({label:e("au"),icon:Zh,tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",()=>this._showForm()),o})}_createForm(){const t=this.editor,e=t.editing.view.document;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new zh(t.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{t.execute("imageTextAlternative",{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(t,e)=>{this._hideForm(!0),e()}),this.listenTo(t.ui,"update",()=>{kh(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(kh(t.editing.view.document.selection)){const n=Xh(t);e.updatePosition(n)}}(t):this._hideForm(!0)}),uu({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:Xh(t)}),n.value=n.inputView.element.value=e.value||"",this._form.labeledInput.select()}_hideForm(t){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class ef extends _u{static get requires(){return[Nh,tf]}static get pluginName(){return"ImageTextAlternative"}}function nf(t){for(const e of t.getChildren())if(e&&e.is("caption"))return e;return null}function of(t){const e=t.parent;return"figcaption"==t.name&&e&&"figure"==e.name&&e.hasClass("image")?{name:!0}:null}n(61);class rf extends _u{static get pluginName(){return"ImageCaptionEditing"}init(){const t=this.editor,e=t.editing.view,n=t.model.schema,i=t.data,o=t.editing,r=t.t;n.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:!0}),t.model.document.registerPostFixer(t=>this._insertMissingModelCaptionElement(t)),t.conversion.for("upcast").elementToElement({view:of,model:"caption"}),i.downcastDispatcher.on("insert:caption",sf(t=>t.createContainerElement("figcaption"),!1));const s=function(t,e){return n=>{const i=n.createEditableElement("figcaption");return n.setCustomProperty("imageCaption",!0,i),ul({view:t,element:i,text:e}),wh(i,n)}}(e,r("p"));o.downcastDispatcher.on("insert:caption",sf(s)),o.downcastDispatcher.on("insert",this._fixCaptionVisibility(t=>t.item),{priority:"high"}),o.downcastDispatcher.on("remove",this._fixCaptionVisibility(t=>t.position.parent),{priority:"high"}),e.document.registerPostFixer(t=>this._updateCaptionVisibility(t))}_updateCaptionVisibility(t){const e=this.editor.editing.mapper,n=this._lastSelectedCaption;let i;const o=this.editor.model.document.selection,r=o.getSelectedElement();if(r&&r.is("image")){const t=nf(r);i=e.toViewElement(t)}const s=af(o.getFirstPosition().parent);if(s&&(i=e.toViewElement(s)),i)return n?(n===i||(cf(n,t),this._lastSelectedCaption=i),lf(i,t)):(this._lastSelectedCaption=i,lf(i,t));if(n){const e=cf(n,t);return this._lastSelectedCaption=null,e}return!1}_fixCaptionVisibility(t){return(e,n,i)=>{const o=af(t(n)),r=this.editor.editing.mapper,s=i.writer;if(o){const t=r.toViewElement(o);t&&(o.childCount?s.removeClass("ck-hidden",t):s.addClass("ck-hidden",t))}}}_insertMissingModelCaptionElement(t){const e=this.editor.model,n=e.document.differ.getChanges(),i=[];for(const o of n)if("insert"==o.type&&"$text"!=o.name){const t=o.position.nodeAfter;if(t.is("image")&&!nf(t)&&i.push(t),!t.is("image")&&t.childCount)for(const n of e.createRangeIn(t).getItems())n.is("image")&&!nf(n)&&i.push(n)}for(const o of i)t.appendElement("caption",o);return!!i.length}}function sf(t,e=!0){return(n,i,o)=>{const r=i.item;if((r.childCount||e)&&yh(r.parent)){if(!o.consumable.consume(i.item,"insert"))return;const e=o.mapper.toViewElement(i.range.start.parent),n=t(o.writer),s=o.writer;r.childCount||s.addClass("ck-hidden",n),function(t,e,n,i){const o=i.writer.createPositionAt(n,"end");i.writer.insert(o,t),i.mapper.bindElements(e,t)}(n,i.item,e,o)}}}function af(t){const e=t.getAncestors({includeSelf:!0}).find(t=>"caption"==t.name);return e&&e.parent&&"image"==e.parent.name?e:null}function cf(t,e){return!t.childCount&&!t.hasClass("ck-hidden")&&(e.addClass("ck-hidden",t),!0)}function lf(t,e){return!!t.hasClass("ck-hidden")&&(e.removeClass("ck-hidden",t),!0)}n(63);class uf extends Cu{constructor(t,e){super(t),this.defaultStyle=!1,this.styles=e.reduce((t,e)=>(t[e.name]=e,e.isDefault&&(this.defaultStyle=e.name),t),{})}refresh(){const t=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=yh(t),t)if(t.hasAttribute("imageStyle")){const e=t.getAttribute("imageStyle");this.value=!!this.styles[e]&&e}else this.value=this.defaultStyle;else this.value=!1}execute(t){const e=t.value,n=this.editor.model,i=n.document.selection.getSelectedElement();n.change(t=>{this.styles[e].isDefault?t.removeAttribute("imageStyle",i):t.setAttribute("imageStyle",e,i)})}}function df(t,e){for(const n of e)if(n.name===t)return n}var hf='',ff='',pf='',mf='';const gf={full:{name:"full",title:"Full size image",icon:hf,isDefault:!0},side:{name:"side",title:"Side image",icon:mf,className:"image-style-side"},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:ff,className:"image-style-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:pf,className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:mf,className:"image-style-align-right"}},bf={full:hf,left:ff,right:mf,center:pf};function wf(t=[]){return t.map(vf)}function vf(t){if("string"==typeof t){const e=t;gf[e]?t=Object.assign({},gf[e]):(console.warn(Object(Gn.a)("image-style-not-found: There is no such image style of given name."),{name:e}),t={name:e})}else if(gf[t.name]){const e=gf[t.name],n=Object.assign({},t);for(const i in e)t.hasOwnProperty(i)||(n[i]=e[i]);t=n}return"string"==typeof t.icon&&bf[t.icon]&&(t.icon=bf[t.icon]),t}class _f extends _u{static get pluginName(){return"ImageStyleEditing"}init(){const t=this.editor,e=t.model.schema,n=t.data,i=t.editing;t.config.define("image.styles",["full","side"]);const o=wf(t.config.get("image.styles"));e.extend("image",{allowAttributes:"imageStyle"});const r=function(t){return(e,n,i)=>{if(!i.consumable.consume(n.item,e.name))return;const o=df(n.attributeNewValue,t),r=df(n.attributeOldValue,t),s=i.mapper.toViewElement(n.item),a=i.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)}}(o);i.downcastDispatcher.on("attribute:imageStyle:image",r),n.downcastDispatcher.on("attribute:imageStyle:image",r),n.upcastDispatcher.on("element:figure",function(t){const e=t.filter(t=>!t.isDefault);return(t,n,i)=>{if(!n.modelRange)return;const o=n.viewItem,r=Fd(n.modelRange.getItems());if(i.schema.checkAttribute(r,"imageStyle"))for(const s of e)i.consumable.consume(o,{classes:s.className})&&i.writer.setAttribute("imageStyle",s.name,r)}}(o),{priority:"low"}),t.commands.add("imageStyle",new uf(t,o))}}n(65);class kf extends _u{static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Full size image":t("k"),"Side image":t("l"),"Left aligned image":t("m"),"Centered image":t("n"),"Right aligned image":t("o")}}init(){const t=function(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}(wf(this.editor.config.get("image.styles")),this.localizedDefaultStylesTitles);for(const e of t)this._createButton(e)}_createButton(t){const e=this.editor,n="imageStyle:"+t.name;e.ui.componentFactory.add(n,n=>{const i=e.commands.get("imageStyle"),o=new iu(n);return o.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i,"isEnabled"),o.bind("isOn").to(i,"value",e=>e===t.name),this.listenTo(o,"execute",()=>e.execute("imageStyle",{value:t.name})),o})}}class yf extends _u{static get requires(){return[Qh]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",e=>{(function(t){const e=t.getSelectedElement();return!(!e||!mh(e))})(t.editing.view.document.selection)&&e.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.listenTo(t.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(t.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:i,balloonClassName:o="ck-toolbar-container"}){const r=this.editor,s=r.t,a=new pu(r.locale);if(a.ariaLabel=e||s("at"),this._toolbarDefinitions.has(t))throw new Gn.b("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:t});a.fillFromConfig(n,r.ui.componentFactory),this._toolbarDefinitions.set(t,{view:a,getRelatedElement:i,balloonClassName:o})}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const i of this._toolbarDefinitions.values()){const o=i.getRelatedElement(this.editor.editing.view.document.selection);if(this.editor.ui.focusTracker.isFocused)if(o){const r=o.getAncestors().length;r>t&&(t=r,e=o,n=i)}else this._isToolbarInBalloon(i)&&this._hideToolbar(i);else this._isToolbarVisible(i)&&this._hideToolbar(i)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?xf(this.editor,e):this._isToolbarInBalloon(t)||(this._balloon.add({view:t.view,position:Af(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);xf(this.editor,e)}}))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function xf(t,e){const n=t.plugins.get("ContextualBalloon"),i=Af(t,e);n.updatePosition(i)}function Af(t,e){const n=t.editing.view,i=Uh.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}class Cf extends Dl{constructor(t){super(t),this.buttonView=new iu(t),this._fileInputView=new Tf(t),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class Tf extends Dl{constructor(t){super(t),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}var Sf='';function Pf(t){const e=t.map(t=>t.replace("+","\\+"));return new RegExp(`^image\\/(${e.join("|")})$`)}function Ef(t){return new Promise((e,n)=>{const i=t.getAttribute("src");fetch(i).then(t=>t.blob()).then(t=>{const o=function(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}(t,i),r=function(t,e,n){try{return new File([t],e,{type:n})}catch(t){return null}}(t,"image."+o.replace("image/",""),o);r?e(r):n()}).catch(n)})}class Mf extends _u{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageUpload",n=>{const i=new Cf(n),o=t.commands.get("imageUpload"),r=t.config.get("image.upload.types"),s=Pf(r);return i.set({acceptedType:r.map(t=>"image/"+t).join(","),allowMultipleFiles:!0}),i.buttonView.set({label:e("q"),icon:Sf,tooltip:!0}),i.buttonView.bind("isEnabled").to(o),i.on("done",(e,n)=>{const i=Array.from(n).filter(t=>s.test(t.type));i.length&&t.execute("imageUpload",{file:i})}),i})}}var If='';n(67),n(69),n(71);class Of extends _u{constructor(t){super(t),this.placeholder="data:image/svg+xml;utf8,"+encodeURIComponent(If)}init(){this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image",(...t)=>this.uploadStatusChange(...t))}uploadStatusChange(t,e,n){const i=this.editor,o=e.item,r=o.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=i.plugins.get(vd),a=r?e.attributeNewValue:null,c=this.placeholder,l=i.editing.mapper.toViewElement(o),u=n.writer;if("reading"==a)return Nf(l,u),void Rf(c,l,u);if("uploading"==a){const t=s.loaders.get(r);return Nf(l,u),void(t?(jf(l,u),function(t,e,n,i){const o=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),o),n.on("change:uploadedPercent",(t,e,n)=>{i.change(t=>{t.setStyle("width",n+"%",o)})})}(l,u,t,i.editing.view),function(t,e,n){if(n.data){const i=t.getChild(0);e.setAttribute("src",n.data,i)}}(l,u,t)):Rf(c,l,u))}"complete"==a&&s.loaders.get(r)&&!po.isEdge&&function(t,e,n){const i=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),i),setTimeout(()=>{n.change(t=>t.remove(t.createRangeOn(i)))},3e3)}(l,u,i.editing.view),function(t,e){Lf(t,e,"progressBar")}(l,u),jf(l,u),function(t,e){e.removeClass("ck-appear",t)}(l,u)}}function Nf(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function Rf(t,e,n){e.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",e);const i=e.getChild(0);i.getAttribute("src")!==t&&n.setAttribute("src",t,i),Df(e,"placeholder")||n.insert(n.createPositionAfter(i),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(n))}function jf(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),Lf(t,e,"placeholder")}function Df(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function Lf(t,e,n){const i=Df(t,n);i&&e.remove(e.createRangeOn(i))}class Vf extends _u{static get pluginName(){return"Notification"}init(){this.on("show:warning",(t,e)=>{window.alert(e.message)},{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e="show:"+t.type+(t.namespace?":"+t.namespace:"");this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class zf{createDocumentFragment(t){return new Ao(t)}createElement(t,e,n){return new vi(t,e,n)}createText(t){return new fi(t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,n){return n._insertChild(t,e)}removeChildren(t,e,n){return n._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const n=t.parent;if(n){const i=n.getChildIndex(t);return this.removeChildren(i,1,n),this.insertChild(i,e,n),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const n=e.getChildIndex(t);this.remove(t),this.insertChild(n,t.getChildren(),e)}}rename(t,e){const n=new vi(t,e.getAttributes(),e.getChildren());return this.replace(e,n)?n:null}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){C(t)&&void 0===n&&(n=e),n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return Zi._createAt(t,e)}createPositionAfter(t){return Zi._createAfter(t)}createPositionBefore(t){return Zi._createBefore(t)}createRange(t,e){return new Xi(t,e)}createRangeOn(t){return Xi._createOn(t)}createRangeIn(t){return Xi._createIn(t)}createSelection(t,e,n){return new no(t,e,n)}}class Bf extends Cu{refresh(){this.isEnabled=Ah(this.editor.model)}execute(t){const e=this.editor,n=e.model,i=e.plugins.get(vd);n.change(e=>{const o=Array.isArray(t.file)?t.file:[t.file];for(const t of o)Ff(e,n,i,t)})}}function Ff(t,e,n,i){const o=n.createLoader(i);o&&xh(t,e,{uploadId:o.id})}class Uf extends _u{static get requires(){return[vd,Vf,Au]}static get pluginName(){return"ImageUploadEditing"}constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}})}init(){const t=this.editor,e=t.model.document,n=t.model.schema,i=t.conversion,o=t.plugins.get(vd),r=Pf(t.config.get("image.upload.types"));n.extend("image",{allowAttributes:["uploadId","uploadStatus"]}),t.commands.add("imageUpload",new Bf(t)),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",(e,n)=>{if(function(t){return Array.from(t.types).includes("text/html")&&""!==t.getData("text/html")}(n.dataTransfer))return;const i=Array.from(n.dataTransfer.files).filter(t=>!!t&&r.test(t.type)),o=n.targetRanges.map(e=>t.editing.mapper.toModelRange(e));t.model.change(n=>{n.setSelection(o),i.length&&(e.stop(),t.model.enqueueChange("default",()=>{t.execute("imageUpload",{file:i})}))})}),this.listenTo(t.plugins.get(Au),"inputTransformation",(e,n)=>{const i=Array.from(t.editing.view.createRangeIn(n.content)).filter(t=>function(t){return!(!t.is("element","img")||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))}(t.item)&&!t.item.getAttribute("uploadProcessed")).map(t=>({promise:Ef(t.item),imageElement:t.item}));if(!i.length)return;const r=new zf;for(const t of i){r.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(r.setAttribute("src","",t.imageElement),r.setAttribute("uploadId",e.id,t.imageElement))}}),t.editing.view.document.on("dragover",(t,e)=>{e.preventDefault()}),e.on("change",()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0});for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,i="$graveyard"==e.position.root.rootName;for(const e of $f(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(i?n.abort():"idle"==n.status&&this._readAndUpload(n,e))}}})}_readAndUpload(t,e){const n=this.editor,i=n.model,o=n.locale.t,r=n.plugins.get(vd),s=n.plugins.get(Vf);return i.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","reading",e)}),t.read().then(()=>{const o=t.upload();if(po.isSafari){const t=n.editing.mapper.toViewElement(e).getChild(0);n.editing.view.once("render",()=>{if(!t.parent)return;const e=n.editing.view.domConverter.mapViewToDom(t.parent);if(!e)return;const i=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=i})}return i.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","uploading",e)}),o}).then(t=>{i.enqueueChange("transparent",n=>{n.setAttributes({uploadStatus:"complete",src:t.default},e),this._parseAndSetSrcsetAttributeOnImage(t,e,n)}),a()}).catch(n=>{if("error"!==t.status&&"aborted"!==t.status)throw n;"error"==t.status&&n&&s.showWarning(n,{title:o("r"),namespace:"upload"}),a(),i.enqueueChange("transparent",t=>{t.remove(e)})});function a(){i.enqueueChange("transparent",t=>{t.removeAttribute("uploadId",e),t.removeAttribute("uploadStatus",e)}),r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let i=0;const o=Object.keys(t).filter(t=>{const e=parseInt(t,10);if(!isNaN(e))return i=Math.max(i,e),!0}).map(e=>`${t[e]} ${e}w`).join(", ");""!=o&&n.setAttribute("srcset",{data:o,width:i},e)}}function $f(t,e){return Array.from(t.model.createRangeOn(e)).filter(t=>t.item.is("image")).map(t=>t.item)}class Hf extends Cu{constructor(t){super(t),this._childCommands=[]}refresh(){}execute(...t){this._getFirstEnabledCommand().execute(t)}registerChildCommand(t){this._childCommands.push(t),t.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(t=>t.isEnabled)}}class qf extends _u{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new Hf(t)),t.commands.add("outdent",new Hf(t))}}var Wf='\n',Yf='\n';class Gf extends _u{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,n=t.t,i="ltr"==e.uiLanguageDirection?Wf:Yf,o="ltr"==e.uiLanguageDirection?Yf:Wf;this._defineButton("indent",n("s"),i),this._defineButton("outdent",n("t"),o)}_defineButton(t,e,n){const i=this.editor;i.ui.componentFactory.add(t,o=>{const r=i.commands.get(t),s=new iu(o);return s.set({label:e,icon:n,tooltip:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(s,"execute",()=>i.execute(t)),s})}}function Qf(t,e,n){return n.createRange(Kf(t,e,!0,n),Kf(t,e,!1,n))}function Kf(t,e,n,i){let o=t.textNode||(n?t.nodeBefore:t.nodeAfter),r=null;for(;o&&o.getAttribute("linkHref")==e;)r=o,o=n?o.previousSibling:o.nextSibling;return r?i.createPositionAt(r,n?"before":"after"):t}class Jf extends Cu{constructor(t){super(t),this.manualDecorators=new oo}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute("linkHref");for(const n of this.manualDecorators)n.value=this._getDecoratorStateFromModel(n.id);this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"linkHref")}execute(t,e={}){const n=this.editor.model,i=n.document.selection,o=[],r=[];for(const s in e)e[s]?o.push(s):r.push(s);n.change(e=>{if(i.isCollapsed){const s=i.getFirstPosition();if(i.hasAttribute("linkHref")){const a=Qf(s,i.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,a),o.forEach(t=>{e.setAttribute(t,!0,a)}),r.forEach(t=>{e.removeAttribute(t,a)}),e.setSelection(a)}else if(""!==t){const r=Ls(i.getAttributes());r.set("linkHref",t),o.forEach(t=>{r.set(t,!0)});const a=e.createText(t,r);n.insertContent(a,s),e.setSelection(e.createRangeOn(a))}}else{const s=n.schema.getValidRanges(i.getRanges(),"linkHref");for(const n of s)e.setAttribute("linkHref",t,n),o.forEach(t=>{e.setAttribute(t,!0,n)}),r.forEach(t=>{e.removeAttribute(t,n)})}})}_getDecoratorStateFromModel(t){return this.editor.model.document.selection.getAttribute(t)||!1}}class Zf extends Cu{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute("linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,i=t.commands.get("link");e.change(t=>{const o=n.isCollapsed?[Qf(n.getFirstPosition(),n.getAttribute("linkHref"),e)]:n.getRanges();for(const e of o)if(t.removeAttribute("linkHref",e),i)for(const n of i.manualDecorators)t.removeAttribute(n.id,e)})}}var Xf=function(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(o);++i=i?t:Xf(t,e,n)},ep=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),np=function(t){return ep.test(t)},ip=function(t){return t.split("")},op="[\\ud800-\\udfff]",rp="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",sp="\\ud83c[\\udffb-\\udfff]",ap="[^\\ud800-\\udfff]",cp="(?:\\ud83c[\\udde6-\\uddff]){2}",lp="[\\ud800-\\udbff][\\udc00-\\udfff]",up="(?:"+rp+"|"+sp+")?",dp="[\\ufe0e\\ufe0f]?"+up+"(?:\\u200d(?:"+[ap,cp,lp].join("|")+")[\\ufe0e\\ufe0f]?"+up+")*",hp="(?:"+[ap+rp+"?",rp,cp,lp,op].join("|")+")",fp=RegExp(sp+"(?="+sp+")|"+hp+dp,"g"),pp=function(t){return t.match(fp)||[]},mp=function(t){return np(t)?pp(t):ip(t)},gp=function(t,e){for(var n=-1,i=null==t?0:t.length,o=Array(i);++nthis._definitions.add(t)):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",(t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;const i=n.writer,o=i.document.selection;for(const r of this._definitions){const t=i.createAttributeElement("a",r.attributes,{priority:5});i.setCustomProperty("link",!0,t),r.callback(e.attributeNewValue)?e.item.is("selection")?i.wrap(o.getFirstRange(),t):i.wrap(n.mapper.toViewRange(e.range),t):i.unwrap(n.mapper.toViewRange(e.range),t)}},{priority:"high"})}}}class Pp{constructor({id:t,label:e,attributes:n}){this.id=t,this.set("value"),this.label=e,this.attributes=n}}ci(Pp,Fi);class Ep{constructor(t,e,n){this.model=t,this.attribute=n,this._modelSelection=t.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,e.listenTo(this._modelSelection,"change:range",(t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&Mp(this._modelSelection.getFirstPosition(),n)||this._restoreGravity())})}handleForwardMovement(t,e){const n=this.attribute;if(!(this._isGravityOverridden||t.isAtStart&&this._hasSelectionAttribute))return Np(t,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._removeSelectionAttribute(),!0):Ip(t,n)||Op(t,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._overrideGravity(),!0):void 0}handleBackwardMovement(t,e){const n=this.attribute;return this._isGravityOverridden?Np(t,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(e),this._restoreGravity(),t.isAtStart&&this._removeSelectionAttribute(),!0):Np(t,n)&&!this._hasSelectionAttribute?(this._preventCaretMovement(e),this._setSelectionAttributeFromTheNodeBefore(t),!0):t.isAtEnd&&Op(t,n)?this._hasSelectionAttribute?void(Rp(t,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(e),this._setSelectionAttributeFromTheNodeBefore(t),!0):t.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(e),!0):void 0:void(Rp(t,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.model.change(t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(t){t.preventDefault()}_removeSelectionAttribute(){this.model.change(t=>{t.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(t){const e=this.attribute;this.model.change(n=>{n.setSelectionAttribute(this.attribute,t.nodeBefore.getAttribute(e))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}function Mp(t,e){return Ip(t,e)||Op(t,e)}function Ip(t,e){const{nodeBefore:n,nodeAfter:i}=t,o=!!n&&n.hasAttribute(e);return!!i&&i.hasAttribute(e)&&(!o||n.getAttribute(e)!==i.getAttribute(e))}function Op(t,e){const{nodeBefore:n,nodeAfter:i}=t,o=!!n&&n.hasAttribute(e),r=!!i&&i.hasAttribute(e);return o&&(!r||n.getAttribute(e)!==i.getAttribute(e))}function Np(t,e){const{nodeBefore:n,nodeAfter:i}=t,o=!!n&&n.hasAttribute(e);if(i&&i.hasAttribute(e)&&o)return i.getAttribute(e)!==n.getAttribute(e)}function Rp(t,e){return Mp(t.getShiftedBy(-1),e)}n(73);const jp="ck-link_selected",Dp="automatic",Lp="manual",Vp=/^(https?:)?\/\//;class zp extends _u{static get pluginName(){return"LinkEditing"}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor,e=t.locale;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Cp}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>Cp(Tp(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new Jf(t)),t.commands.add("unlink",new Zf(t));const n=function(t,e){const n={"Open in a new tab":t("bi"),Downloadable:t("bj")};return e.forEach(t=>(t.label&&n[t.label]&&(t.label=n[t.label]),t)),e}(t.t,function(t){const e=[];if(t)for(const[n,i]of Object.entries(t)){const t=Object.assign({},i,{id:"link"+yp(n)});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter(t=>t.mode===Dp)),this._enableManualDecorators(n.filter(t=>t.mode===Lp)),function({view:t,model:e,emitter:n,attribute:i,locale:o}){const r=new Ep(e,n,i),s=e.document.selection;n.listenTo(t.document,"keydown",(t,e)=>{if(!s.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==bo.arrowright,i=e.keyCode==bo.arrowleft;if(!n&&!i)return;const a=s.getFirstPosition(),c=o.contentLanguageDirection;let l;(l="ltr"===c&&n||"rtl"===c&&i?r.handleForwardMovement(a,e):r.handleBackwardMovement(a,e))&&t.stop()},{priority:Zn.get("high")+1})}({view:t.editing.view,model:t.model,emitter:this,attribute:"linkHref",locale:e}),this._setupLinkHighlight()}_enableAutomaticDecorators(t){const e=this.editor,n=new Sp;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:Dp,callback:t=>Vp.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach(t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),n.add(new Pp(t)),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,i)=>{if(e){const e=n.get(t.id).attributes,o=i.createAttributeElement("a",e,{priority:5});return i.setCustomProperty("link",!0,o),o}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:n.get(t.id).attributes},model:{key:t.id}})})}_setupLinkHighlight(){const t=this.editor,e=t.editing.view,n=new Set;e.document.registerPostFixer(e=>{const i=t.model.document.selection;let o=!1;if(i.hasAttribute("linkHref")){const r=Qf(i.getFirstPosition(),i.getAttribute("linkHref"),t.model),s=t.editing.mapper.toViewRange(r);for(const t of s.getItems())t.is("a")&&!t.hasClass(jp)&&(e.addClass(jp,t),n.add(t),o=!0)}return o}),t.conversion.for("editingDowncast").add(t=>{function i(){e.change(t=>{for(const e of n.values())t.removeClass(jp,e),n.delete(e)})}t.on("insert",i,{priority:"highest"}),t.on("remove",i,{priority:"highest"}),t.on("attribute",i,{priority:"highest"}),t.on("selection",i,{priority:"highest"})})}}class Bp extends Xr{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}n(75);class Fp extends Dl{constructor(t,e=[]){super(t);const n=t.t;this.focusTracker=new al,this.keystrokes=new Zc,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("bc"),Lh,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("bd"),Vh,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e),this._focusables=new gl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form"];e.length&&i.push("ck-link-form_layout-vertical"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>(t[e.name]=e.isOn,t),{})}render(){super.render(),Dh({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new Rh(this.locale,jh);return e.label=t("br"),e.inputView.placeholder="https://example.com",e}_createButton(t,e,n,i){const o=new iu(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t){const t=new lu(this.locale);t.set({name:n.id,label:n.label,withText:!0}),t.bind("isOn").to(n,"value"),t.on("execute",()=>{n.set("value",!t.isOn)}),e.add(t)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new Dl;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var Up='',$p='';n(77);class Hp extends Dl{constructor(t){super(t);const e=t.t;this.focusTracker=new al,this.keystrokes=new Zc,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("bn"),Up,"unlink"),this.editButtonView=this._createButton(e("bo"),$p,"edit"),this.set("href"),this._focusables=new gl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const i=new iu(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){const t=new iu(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("bp")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",t=>t&&Tp(t)),target:"_blank"}}),t.bind("label").to(this,"href",t=>t||n("bq")),t.bind("isEnabled").to(this,"href",t=>!!t),t.template.tag="a",t.template.eventListeners={},t}}var qp='';const Wp="Ctrl+K";class Yp extends _u{static get requires(){return[Qh]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(Bp),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(Qh),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new Hp(t.locale),n=t.commands.get("link"),i=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(e,"edit",()=>{this._addFormView()}),this.listenTo(e,"unlink",()=>{t.execute("unlink"),this._hideUI()}),e.keystrokes.set("Esc",(t,e)=>{this._hideUI(),e()}),e.keystrokes.set(Wp,(t,e)=>{this._addFormView(),e()}),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=new Fp(t.locale,e.manualDecorators);return n.urlInputView.bind("value").to(e,"value"),n.urlInputView.bind("isReadOnly").to(e,"isEnabled",t=>!t),n.saveButtonView.bind("isEnabled").to(e),this.listenTo(n,"submit",()=>{t.execute("link",n.urlInputView.inputView.element.value,n.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(t,e)=>{this._closeFormView(),e()}),n}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),n=t.t;t.keystrokes.set(Wp,(t,n)=>{n(),e.isEnabled&&this._showUI(!0)}),t.ui.componentFactory.add("link",t=>{const i=new iu(t);return i.isEnabled=!0,i.label=n("w"),i.icon=qp,i.keystroke=Wp,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(e,"isEnabled"),i.bind("isOn").to(e,"value",t=>!!t),this.listenTo(i,"execute",()=>this._showUI(!0)),i})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())},{priority:"high"}),this.editor.keystrokes.set("Esc",(t,e)=>{this._isUIVisible&&(this._hideUI(),e())}),uu({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const t=this.editor.commands.get("link");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.select(),this.formView.urlInputView.inputView.element.value=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(t=!1){this.editor.commands.get("link").isEnabled&&(this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI())}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView)}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),i=r();const o=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,i=e};function r(){return e.selection.focus.getAncestors().reverse().find(t=>t.is("element"))}this.listenTo(t.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=t.document,n=this._getSelectedLinkElement();return{target:n?t.domConverter.mapViewToDom(n):t.domConverter.viewRangeToDom(e.selection.getFirstRange())}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection;if(e.isCollapsed)return Gp(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),i=Gp(n.start),o=Gp(n.end);return i&&i==o&&t.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}}function Gp(t){return t.getAncestors().find(t=>function(t){return t.is("attributeElement")&&!!t.getCustomProperty("link")}(t))}class Qp extends Cu{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document,n=Array.from(e.selection.getSelectedBlocks()).filter(e=>Jp(e,t.schema)),i=!0===this.value;t.change(t=>{if(i){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,o=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t=n;)r>o.getAttribute("listIndent")&&(r=o.getAttribute("listIndent")),o.getAttribute("listIndent")==r&&t[e?"unshift":"push"](o),o=o[e?"previousSibling":"nextSibling"]}}function Jp(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class Zp extends Cu{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let n=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=n[n.length-1];let i=e.nextSibling;for(;i&&"listItem"==i.name&&i.getAttribute("listIndent")>e.getAttribute("listIndent");)n.push(i),i=i.nextSibling;this._indentBy<0&&(n=n.reverse());for(const o of n){const e=o.getAttribute("listIndent")+this._indentBy;e<0?t.rename(o,"paragraph"):t.setAttribute("listIndent",e,o)}})}_checkEnabled(){const t=Fd(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),n=t.getAttribute("listType");let i=t.previousSibling;for(;i&&i.is("listItem")&&i.getAttribute("listIndent")>=e;){if(i.getAttribute("listIndent")==e)return i.getAttribute("listType")==n;i=i.previousSibling}return!1}return!0}}function Xp(t,e){const n=e.mapper,i=e.writer,o="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=rm,e}(i),s=i.createContainerElement(o,null);return i.insert(i.createPositionAt(s,0),r),n.bindElements(t,r),r}function tm(t,e,n,i){const o=e.parent,r=n.mapper,s=n.writer;let a=r.toViewPosition(i.createPositionBefore(t));const c=im(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),l=t.previousSibling;if(c&&c.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(t))}else a=l&&"listItem"==l.name?r.toViewPosition(i.createPositionAt(l,"end")):r.toViewPosition(i.createPositionBefore(t));if(a=nm(a),s.insert(a,o),l&&"listItem"==l.name){const t=r.toViewElement(l),n=s.createRange(s.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const i of n)if(i.item.is("li")){const t=s.breakContainer(s.createPositionBefore(i.item)),o=i.item.parent,r=s.createPositionAt(e,"end");em(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),n.position=t}}else{const n=o.nextSibling;if(n&&(n.is("ul")||n.is("ol"))){let i=null;for(const e of n.getChildren()){const n=r.toModelElement(e);if(!(n&&n.getAttribute("listIndent")>t.getAttribute("listIndent")))break;i=e}i&&(s.breakContainer(s.createPositionAfter(i)),s.move(s.createRangeOn(i.parent),s.createPositionAt(e,"end")))}}em(s,o,o.nextSibling),em(s,o.previousSibling,o)}function em(t,e,n){return!e||!n||"ul"!=e.name&&"ol"!=e.name||e.name!=n.name||e.getAttribute("class")!==n.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function nm(t){return t.getLastMatchingPosition(t=>t.item.is("uiElement"))}function im(t,e){const n=!!e.sameIndent,i=!!e.smallerIndent,o=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(n&&o==t||i&&o>t)return r;r=r.previousSibling}return null}function om(t,e,n,i){t.ui.componentFactory.add(e,o=>{const r=t.commands.get(e),s=new iu(o);return s.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",()=>t.execute(e)),s})}function rm(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:xi.call(this)}function sm(t){return(e,n,i)=>{const o=i.consumable;if(!o.test(n.item,"insert")||!o.test(n.item,"attribute:listType")||!o.test(n.item,"attribute:listIndent"))return;o.consume(n.item,"insert"),o.consume(n.item,"attribute:listType"),o.consume(n.item,"attribute:listIndent");const r=n.item;tm(r,Xp(r,i),i,t)}}function am(t,e,n){if(!n.consumable.consume(e.item,"attribute:listType"))return;const i=n.mapper.toViewElement(e.item),o=n.writer;o.breakContainer(o.createPositionBefore(i)),o.breakContainer(o.createPositionAfter(i));const r=i.parent,s="numbered"==e.attributeNewValue?"ol":"ul";o.rename(s,r)}function cm(t,e,n){const i=n.mapper.toViewElement(e.item).parent,o=n.writer;em(o,i,i.nextSibling),em(o,i.previousSibling,i);for(const r of e.item.getChildren())n.consumable.consume(r,"insert")}function lm(t,e,n){if("listItem"!=e.item.name){let t=n.mapper.toViewPosition(e.range.start);const i=n.writer,o=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&"li"==(t=i.breakContainer(t)).parent.name;){const e=t,n=i.createPositionAt(t.parent,"end");if(!e.isEqual(n)){const t=i.remove(i.createRange(e,n));o.push(t)}t=i.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e0){const e=em(i,n,n.nextSibling);e&&e.parent==n&&t.offset--}}em(i,t.nodeBefore,t.nodeAfter)}}}function um(t,e,n){const i=n.mapper.toViewPosition(e.position),o=i.nodeBefore,r=i.nodeAfter;em(n.writer,o,r)}function dm(t,e,n){if(n.consumable.consume(e.viewItem,{name:!0})){const t=n.writer,i=t.createElement("listItem"),o=function(t){let e=0,n=t.parent;for(;n;){if(n.is("li"))e++;else{const t=n.previousSibling;t&&t.is("li")&&e++}n=n.parent}return e}(e.viewItem);t.setAttribute("listIndent",o,i);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";t.setAttribute("listType",r,i);const s=n.splitToAllowedParent(i,e.modelCursor);if(!s)return;t.insert(i,s.position);const a=function(t,e,n){const{writer:i,schema:o}=n;let r=i.createPositionAfter(t);for(const s of e)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const e=n.convertItem(s,i.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter,c=a&&a.is("element")&&!o.checkChild(t,a.name);c&&(t=e.modelCursor.parent.is("listItem")?e.modelCursor.parent:gm(e.modelCursor),r=i.createPositionAfter(t))}return r}(i,e.viewItem.getChildren(),n);e.modelRange=t.createRange(e.modelCursor,a),s.cursorParent?e.modelCursor=t.createPositionAt(s.cursorParent,0):e.modelCursor=e.modelRange.end}}function hm(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t)!e.is("li")&&!wm(e)&&e._remove()}}function fm(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let n=!1,i=!0;for(const e of t)n&&!wm(e)&&e._remove(),e.is("text")?(i&&(e._data=e.data.replace(/^\s+/,"")),e.nextSibling&&!wm(e.nextSibling)||(e._data=e.data.replace(/\s+$/,""))):wm(e)&&(n=!0),i=!1}}function pm(t){return(e,n)=>{if(n.isPhantom)return;const i=n.modelPosition.nodeBefore;if(i&&i.is("listItem")){const e=n.mapper.toViewElement(i),o=e.getAncestors().find(wm),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("li")){n.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==o){n.viewPosition=t.nextPosition;break}}}}}function mm(t,[e,n]){let i,o=e.is("documentFragment")?e.getChild(0):e;if(i=n?this.createSelection(n):this.document.selection,o&&o.is("listItem")){const t=i.getFirstPosition();let e=null;if(t.parent.is("listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;o&&o.is("listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+t),o=o.nextSibling}}}function gm(t){const e=new $s({startPosition:t});let n;do{n=e.next()}while(!n.value.item.is("listItem"));return n.value.item}function bm(t,e,n,i,o,r){const s=im(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),a=o.mapper,c=o.writer,l=s?s.getAttribute("listIndent"):null;let u;if(s)if(l==t){const t=a.toViewElement(s).parent;u=c.createPositionAfter(t)}else{const t=r.createPositionAt(s,"end");u=a.toViewPosition(t)}else u=n;u=nm(u);for(const d of[...i.getChildren()])wm(d)&&(u=c.move(c.createRangeOn(d),u).end,em(c,d,d.nextSibling),em(c,d.previousSibling,d))}function wm(t){return t.is("ol")||t.is("ul")}class vm extends _u{static get pluginName(){return"ListEditing"}static get requires(){return[Jd]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,n=t.editing;t.model.document.registerPostFixer(e=>function(t,e){const n=t.document.differ.getChanges(),i=new Map;let o=!1;for(const c of n)if("insert"==c.type&&"listItem"==c.name)r(c.position);else if("insert"==c.type&&"listItem"!=c.name){if("$text"!=c.name){const n=c.position.nodeAfter;n.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",n),o=!0),n.hasAttribute("listType")&&(e.removeAttribute("listType",n),o=!0);for(const e of Array.from(t.createRangeIn(n)).filter(t=>t.item.is("listItem")))r(e.previousPosition)}r(c.position.getShiftedBy(c.length))}else"remove"==c.type&&"listItem"==c.name?r(c.position):("attribute"==c.type&&"listIndent"==c.attributeKey||"attribute"==c.type&&"listType"==c.attributeKey)&&r(c.range.start);for(const c of i.values())s(c),a(c);return o;function r(t){const e=t.nodeBefore;if(e&&e.is("listItem")){let n=e;if(i.has(n))return;for(;n.previousSibling&&n.previousSibling.is("listItem");)if(n=n.previousSibling,i.has(n))return;i.set(t.nodeBefore,n)}else{const e=t.nodeAfter;e&&e.is("listItem")&&i.set(e,e)}}function s(t){let n=0,i=null;for(;t&&t.is("listItem");){const r=t.getAttribute("listIndent");if(r>n){let s;null===i?(i=r-n,s=n):(i>r&&(i=r),s=r-i),e.setAttribute("listIndent",s,t),o=!0}else i=null,n=t.getAttribute("listIndent")+1;t=t.nextSibling}}function a(t){let n=[],i=null;for(;t&&t.is("listItem");){const r=t.getAttribute("listIndent");if(i&&i.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const i=n[r];t.getAttribute("listType")!=i&&(e.setAttribute("listType",i,t),o=!0)}else n[r]=t.getAttribute("listType");i=t,t=t.nextSibling}}}(t.model,e)),n.mapper.registerViewToModelLength("li",_m),e.mapper.registerViewToModelLength("li",_m),n.mapper.on("modelToViewPosition",pm(n.view)),n.mapper.on("viewToModelPosition",function(t){return(e,n)=>{const i=n.viewPosition,o=i.parent,r=n.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const e=r.toModelElement(i.nodeBefore),o=r.getModelLength(i.nodeBefore);n.modelPosition=t.createPositionBefore(e).getShiftedBy(o)}else{const e=r.toModelElement(i.nodeAfter);n.modelPosition=t.createPositionBefore(e)}e.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(o);let a=1,c=i.nodeBefore;for(;c&&wm(c);)a+=r.getModelLength(c),c=c.previousSibling;n.modelPosition=t.createPositionBefore(s).getShiftedBy(a),e.stop()}}}(t.model)),e.mapper.on("modelToViewPosition",pm(n.view)),n.downcastDispatcher.on("insert",lm,{priority:"high"}),n.downcastDispatcher.on("insert:listItem",sm(t.model)),e.downcastDispatcher.on("insert",lm,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",sm(t.model)),n.downcastDispatcher.on("attribute:listType:listItem",am,{priority:"high"}),n.downcastDispatcher.on("attribute:listType:listItem",cm,{priority:"low"}),n.downcastDispatcher.on("attribute:listIndent:listItem",function(t){return(e,n,i)=>{if(!i.consumable.consume(n.item,"attribute:listIndent"))return;const o=i.mapper.toViewElement(n.item),r=i.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&em(r,a,a.nextSibling),bm(n.attributeOldValue+1,n.range.start,c.start,o,i,t),tm(n.item,o,i,t);for(const t of n.item.getChildren())i.consumable.consume(t,"insert")}}(t.model)),n.downcastDispatcher.on("remove:listItem",function(t){return(e,n,i)=>{const o=i.mapper.toViewPosition(n.position).getLastMatchingPosition(t=>!t.item.is("li")).nodeAfter,r=i.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s),l=r.remove(c);a&&a.nextSibling&&em(r,a,a.nextSibling),bm(i.mapper.toModelElement(o).getAttribute("listIndent")+1,n.position,c.start,o,i,t);for(const t of r.createRangeIn(l).getItems())i.mapper.unbindViewElement(t);e.stop()}}(t.model)),n.downcastDispatcher.on("remove",um,{priority:"low"}),e.upcastDispatcher.on("element:ul",hm,{priority:"high"}),e.upcastDispatcher.on("element:ol",hm,{priority:"high"}),e.upcastDispatcher.on("element:li",fm,{priority:"high"}),e.upcastDispatcher.on("element:li",dm),t.model.on("insertContent",mm,{priority:"high"}),t.commands.add("numberedList",new Qp(t,"numbered")),t.commands.add("bulletedList",new Qp(t,"bulleted")),t.commands.add("indentList",new Zp(t,"forward")),t.commands.add("outdentList",new Zp(t,"backward"));const i=n.view.document;this.listenTo(i,"enter",(t,e)=>{const n=this.editor.model.document,i=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==i.name&&i.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),this.listenTo(i,"delete",(t,e)=>{if("backward"!==e.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const i=n.getFirstPosition();if(!i.isAtStart)return;const o=i.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop()))},{priority:"high"});const o=t=>(e,n)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),n())};t.keystrokes.set("Tab",o("indentList")),t.keystrokes.set("Shift+Tab",o("outdentList"))}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),n&&n.registerChildCommand(t.get("outdentList"))}}function _m(t){let e=1;for(const n of t.getChildren())if("ul"==n.name||"ol"==n.name)for(const t of n.getChildren())e+=_m(t);return e}var km='',ym='';class xm extends _u{init(){const t=this.editor.t;om(this.editor,"numberedList",t("u"),km),om(this.editor,"bulletedList",t("v"),ym)}}function Am(t,e){return t=>{t.on("attribute:url:media",n)};function n(n,i,o){if(!o.consumable.consume(i.item,n.name))return;const r=i.attributeNewValue,s=o.writer,a=o.mapper.toViewElement(i.item);s.remove(s.createRangeIn(a));const c=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),c)}}function Cm(t,e,n,i){const o=t.createContainerElement("figure",{class:"media"});return o.getFillerOffset=Pm,t.insert(t.createPositionAt(o,0),e.getMediaViewElement(t,n,i)),o}function Tm(t){const e=t.getSelectedElement();return e&&e.is("media")?e:null}function Sm(t,e,n){t.change(i=>{const o=i.createElement("media",{url:e});t.insertContent(o,n),i.setSelection(o,"on")})}function Pm(){return null}class Em extends Cu{refresh(){const t=this.editor.model,e=t.document.selection,n=t.schema,i=e.getFirstPosition(),o=Tm(e);let r=i.parent;r!=r.root&&(r=r.parent),this.value=o?o.getAttribute("url"):null,this.isEnabled=n.checkChild(r,"media")}execute(t){const e=this.editor.model,n=e.document.selection,i=Tm(n);if(i)e.change(e=>{e.setAttribute("url",t,i)});else{const i=vh(n,e);Sm(e,t,i)}}}var Mm='';const Im="0 0 64 42";class Om{constructor(t,e){const n=e.providers,i=e.extraProviders||[],o=new Set(e.removeProviders),r=n.concat(i).filter(t=>{const e=t.name;return e?!o.has(e):(console.warn(Object(Gn.a)("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:t}),!1)});this.locale=t,this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,n){return this._getMedia(e).getViewElement(t,n)}_getMedia(t){if(!t)return new Nm(this.locale);t=t.trim();for(const e of this.providerDefinitions){const n=e.html;let i=e.url;Array.isArray(i)||(i=[i]);for(const e of i){const i=this._getUrlMatches(t,e);if(i)return new Nm(this.locale,t,i,n)}}return null}_getUrlMatches(t,e){let n=t.match(e);if(n)return n;let i=t.replace(/^https?:\/\//,"");return(n=i.match(e))?n:(n=(i=i.replace(/^www\./,"")).match(e))||null}}class Nm{constructor(t,e,n,i){this.url=this._getValidUrl(e),this._t=t.t,this._match=n,this._previewRenderer=i}getViewElement(t,e){const n={};if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),e.renderForEditingView&&(n.class="ck-media__wrapper");const i=this._getPreviewHtml(e);return t.createUIElement("div",n,(function(t){const e=this.toDomElement(t);return e.innerHTML=i,e}))}return this.url&&(n.url=this.url),t.createEmptyElement("oembed",n)}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const t=new nu,e=new eu;return t.text=this._t("Open media in new tab"),e.content=Mm,e.viewBox=Im,new wl({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},t]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:"https://"+t:null}}n(79);class Rm extends _u{static get pluginName(){return"MediaEmbedEditing"}constructor(t){super(t),t.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:t=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>`
`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:t=>`
`},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:t=>`
`},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new Om(t.locale,t.config.get("mediaEmbed"))}init(){const t=this.editor,e=t.model.schema,n=t.t,i=t.conversion,o=t.config.get("mediaEmbed.previewsInData"),r=this.registry;t.commands.add("mediaEmbed",new Em(t)),e.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),i.for("dataDowncast").elementToElement({model:"media",view:(t,e)=>{const n=t.getAttribute("url");return Cm(e,r,n,{renderMediaPreview:n&&o})}}),i.for("dataDowncast").add(Am(r,{renderMediaPreview:o})),i.for("editingDowncast").elementToElement({model:"media",view:(t,e)=>{const i=t.getAttribute("url");return function(t,e,n){return e.setCustomProperty("media",!0,t),gh(t,e,{label:n})}(Cm(e,r,i,{renderForEditingView:!0}),e,n("x"))}}),i.for("editingDowncast").add(Am(r,{renderForEditingView:!0})),i.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:!0}},model:(t,e)=>{const n=t.getAttribute("url");if(r.hasMedia(n))return e.createElement("media",{url:n})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(t,e)=>{const n=t.getAttribute("data-oembed-url");if(r.hasMedia(n))return e.createElement("media",{url:n})}})}}const jm=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;class Dm extends _u{static get requires(){return[Au,gd]}static get pluginName(){return"AutoMediaEmbed"}constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}init(){const t=this.editor,e=t.model.document;this.listenTo(t.plugins.get(Au),"inputTransformation",()=>{const t=e.selection.getFirstRange(),n=Dc.fromPosition(t.start);n.stickiness="toPrevious";const i=Dc.fromPosition(t.end);i.stickiness="toNext",e.once("change:data",()=>{this._embedMediaBetweenPositions(n,i),n.detach(),i.detach()},{priority:"high"})}),t.commands.get("undo").on("execute",()=>{this._timeoutId&&(tr.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(t,e){const n=this.editor,i=n.plugins.get(Rm).registry,o=new oa(t,e),r=o.getWalker({ignoreElementEnd:!0});let s="";for(const a of r)a.item.is("textProxy")&&(s+=a.item.data);(s=s.trim()).match(jm)&&i.hasMedia(s)&&n.commands.get("mediaEmbed").isEnabled&&(this._positionToInsert=Dc.fromPosition(t),this._timeoutId=tr.window.setTimeout(()=>{n.model.change(t=>{let e;this._timeoutId=null,t.remove(o),"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),Sm(n.model,s,e),this._positionToInsert.detach(),this._positionToInsert=null})},100))}}n(81);class Lm extends Dl{constructor(t,e){super(e);const n=e.t;this.focusTracker=new al,this.keystrokes=new Zc,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("bc"),Lh,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("bd"),Vh,"ck-button-cancel","cancel"),this._focusables=new gl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=t,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Dh({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(this.urlInputView.element,"selectstart",(t,e)=>{e.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(t){this.urlInputView.inputView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,e=new Rh(this.locale,jh),n=e.inputView;return this._urlInputViewInfoDefault=t("bk"),this._urlInputViewInfoTip=t("bl"),e.label=t("bm"),e.infoText=this._urlInputViewInfoDefault,n.placeholder="https://example.com",n.on("input",()=>{e.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault}),e}_createButton(t,e,n,i){const o=new iu(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}}var Vm='';class zm extends _u{static get requires(){return[Rm]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor,e=t.commands.get("mediaEmbed"),n=t.plugins.get(Rm).registry;this.form=new Lm(function(t,e){return[e=>{if(!e.url.length)return t("z")},n=>{if(!e.hasMedia(n.url))return t("aa")}]}(t.t,n),t.locale),t.ui.componentFactory.add("mediaEmbed",n=>{const i=du(n);return this._setUpDropdown(i,this.form,e,t),this._setUpForm(this.form,i,e),i})}_setUpDropdown(t,e,n){const i=this.editor,o=i.t,r=t.buttonView;function s(){i.editing.view.focus(),t.isOpen=!1}t.bind("isEnabled").to(n),t.panelView.children.add(e),r.set({label:o("y"),icon:Vm,tooltip:!0}),r.on("open",()=>{e.url=n.value||"",e.urlInputView.select(),e.focus()},{priority:"low"}),t.on("submit",()=>{e.isValid()&&(i.execute("mediaEmbed",e.url),s())}),t.on("change:isOpen",()=>e.resetFormStatus()),t.on("cancel",()=>s())}_setUpForm(t,e,n){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(n,"value"),t.urlInputView.bind("isReadOnly").to(n,"isEnabled",t=>!t),t.saveButtonView.bind("isEnabled").to(n)}}function Bm(t,e){if(!t.childCount)return;const n=new zf,i=function(t,e){const n=e.createRangeIn(t),i=new bi({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),o=[];for(const r of n)if("elementStart"===r.type&&i.match(r.item)){const t=Fm(r.item);o.push({element:r.item,id:t.id,order:t.order,indent:t.indent})}return o}(t,n);if(!i.length)return;let o=null;i.forEach((t,r)=>{if(!o||function(t,e){if(t.id!==e.id)return!0;const n=e.element.previousSibling;return!n||!function(t){return t.is("ol")||t.is("ul")}(n)}(i[r-1],t)){const i=function(t,e){const n=/mso-level-number-format:([^;]*);/gi,i=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi").exec(e);let o="decimal";if(i&&i[1]){const t=n.exec(i[1]);t&&t[1]&&(o=t[1].trim())}return{type:"bullet"!==o&&"image"!==o?"ol":"ul",style:o}}(t,e);o=function(t,e,n){const i=new vi(t.type),o=e.parent.getChildIndex(e);return n.insertChild(o,i,e.parent),i}(i,t.element,n)}const s=function(t,e){return function(t,e){const n=new bi({name:"span",styles:{"mso-list":"Ignore"}}),i=e.createRangeIn(t);for(const o of i)"elementStart"===o.type&&n.match(o.item)&&e.remove(o.item)}(t,e),e.rename("li",t)}(t.element,n);n.appendChild(s,o)})}function Fm(t){const e={},n=t.getStyle("mso-list");return n&&(e.id=parseInt(n.match(/(^|\s+)l(\d+)/i)[2]),e.order=parseInt(n.match(/\s*lfo(\d+)/i)[1]),e.indent=parseInt(n.match(/\s*level(\d+)/i)[1])),e}n(83);const Um=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class $m{isActive(t){return Um.test(t)}execute(t){const e=new zf;!function(t,e){for(const n of t.getChildren())if(n.is("b")&&"normal"===n.getStyle("font-weight")){const i=t.getChildIndex(n);e.remove(n),e.insertChild(i,n.getChildren(),t)}}(t.content,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("li")){const n=t.getChild(0);n.is("p")&&e.unwrapElement(n)}}}(t.content,e)}}function Hm(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length))}function qm(t){const e=new DOMParser,n=function(t){return Hm(Hm(t)).replace(/([\s]*?)[\r\n]+(\s*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>(\s*[\r\n]\s*)<")}(function(t){const e=t.match(/<\/body>(.*?)(<\/html>|$)/);return e&&e[1]&&(t=t.slice(0,e.index)+t.slice(e.index).replace(e[1],"")),t}(t=t.replace(/