@netless/fastboard-ui 1.0.0-canary.6 → 1.0.0-canary.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,8 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var Tippy = require('tippy.js');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var Tippy__default = /*#__PURE__*/_interopDefaultLegacy(Tippy);
10
-
11
- // ../../node_modules/.pnpm/svelte@3.49.0/node_modules/svelte/internal/index.mjs
5
+ // ../../node_modules/.pnpm/svelte@3.53.0/node_modules/svelte/internal/index.mjs
12
6
  function noop() {
13
7
  }
14
8
  function assign(tar, src) {
@@ -114,7 +108,9 @@ function insert(target, node, anchor) {
114
108
  target.insertBefore(node, anchor || null);
115
109
  }
116
110
  function detach(node) {
117
- node.parentNode.removeChild(node);
111
+ if (node.parentNode) {
112
+ node.parentNode.removeChild(node);
113
+ }
118
114
  }
119
115
  function destroy_each(iterations, detaching) {
120
116
  for (let i = 0; i < iterations.length; i += 1) {
@@ -176,6 +172,9 @@ function custom_event(type, detail, { bubbles = false, cancelable = false } = {}
176
172
  e.initCustomEvent(type, bubbles, cancelable, detail);
177
173
  return e;
178
174
  }
175
+ function construct_svelte_component(component, props) {
176
+ return new component(props);
177
+ }
179
178
  var current_component;
180
179
  function set_current_component(component) {
181
180
  current_component = component;
@@ -419,13 +418,13 @@ function create_component(block) {
419
418
  block && block.c();
420
419
  }
421
420
  function mount_component(component, target, anchor, customElement) {
422
- const { fragment, on_mount, on_destroy, after_update } = component.$$;
421
+ const { fragment, after_update } = component.$$;
423
422
  fragment && fragment.m(target, anchor);
424
423
  if (!customElement) {
425
424
  add_render_callback(() => {
426
- const new_on_destroy = on_mount.map(run).filter(is_function);
427
- if (on_destroy) {
428
- on_destroy.push(...new_on_destroy);
425
+ const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
426
+ if (component.$$.on_destroy) {
427
+ component.$$.on_destroy.push(...new_on_destroy);
429
428
  } else {
430
429
  run_all(new_on_destroy);
431
430
  }
@@ -456,7 +455,7 @@ function init(component, options, instance62, create_fragment62, not_equal2, pro
456
455
  set_current_component(component);
457
456
  const $$ = component.$$ = {
458
457
  fragment: null,
459
- ctx: null,
458
+ ctx: [],
460
459
  props,
461
460
  update: noop,
462
461
  not_equal: not_equal2,
@@ -509,6 +508,9 @@ var SvelteComponent = class {
509
508
  this.$destroy = noop;
510
509
  }
511
510
  $on(type, callback) {
511
+ if (!is_function(callback)) {
512
+ return noop;
513
+ }
512
514
  const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
513
515
  callbacks.push(callback);
514
516
  return () => {
@@ -3535,7 +3537,7 @@ var Icons = {
3535
3537
  };
3536
3538
  var Icons_default = Icons;
3537
3539
  if (is_client) {
3538
- Tippy__default["default"].setDefaultProps({
3540
+ Tippy.setDefaultProps({
3539
3541
  delay: [1e3, 400],
3540
3542
  duration: 300,
3541
3543
  offset: [0, 11],
@@ -3569,7 +3571,7 @@ if (is_client) {
3569
3571
  });
3570
3572
  }
3571
3573
  var tippy = function(node, props) {
3572
- const instance62 = Tippy__default["default"](node, props);
3574
+ const instance62 = Tippy(node, props);
3573
3575
  return {
3574
3576
  update(props2) {
3575
3577
  instance62.setProps(props2);
@@ -3603,15 +3605,16 @@ function create_else_block_1(ctx) {
3603
3605
  let current;
3604
3606
  let mounted;
3605
3607
  let dispose;
3606
- const default_slot_template = ctx[9].default;
3607
- const default_slot = create_slot(default_slot_template, ctx, ctx[8], null);
3608
+ const default_slot_template = ctx[10].default;
3609
+ const default_slot = create_slot(default_slot_template, ctx, ctx[9], null);
3608
3610
  return {
3609
3611
  c() {
3610
3612
  button = element("button");
3611
3613
  if (default_slot)
3612
3614
  default_slot.c();
3613
3615
  attr(button, "class", button_class_value = ctx[1] + "-btn " + ctx[0] + " " + ctx[2]);
3614
- button.disabled = ctx[3];
3616
+ button.disabled = ctx[4];
3617
+ toggle_class(button, "is-active", ctx[3]);
3615
3618
  },
3616
3619
  m(target, anchor) {
3617
3620
  insert(target, button, anchor);
@@ -3620,19 +3623,19 @@ function create_else_block_1(ctx) {
3620
3623
  }
3621
3624
  current = true;
3622
3625
  if (!mounted) {
3623
- dispose = listen(button, "click", ctx[12]);
3626
+ dispose = listen(button, "click", ctx[13]);
3624
3627
  mounted = true;
3625
3628
  }
3626
3629
  },
3627
3630
  p(ctx2, dirty) {
3628
3631
  if (default_slot) {
3629
- if (default_slot.p && (!current || dirty & 256)) {
3632
+ if (default_slot.p && (!current || dirty & 512)) {
3630
3633
  update_slot_base(
3631
3634
  default_slot,
3632
3635
  default_slot_template,
3633
3636
  ctx2,
3634
- ctx2[8],
3635
- !current ? get_all_dirty_from_scope(ctx2[8]) : get_slot_changes(default_slot_template, ctx2[8], dirty, null),
3637
+ ctx2[9],
3638
+ !current ? get_all_dirty_from_scope(ctx2[9]) : get_slot_changes(default_slot_template, ctx2[9], dirty, null),
3636
3639
  null
3637
3640
  );
3638
3641
  }
@@ -3640,8 +3643,11 @@ function create_else_block_1(ctx) {
3640
3643
  if (!current || dirty & 7 && button_class_value !== (button_class_value = ctx2[1] + "-btn " + ctx2[0] + " " + ctx2[2])) {
3641
3644
  attr(button, "class", button_class_value);
3642
3645
  }
3643
- if (!current || dirty & 8) {
3644
- button.disabled = ctx2[3];
3646
+ if (!current || dirty & 16) {
3647
+ button.disabled = ctx2[4];
3648
+ }
3649
+ if (!current || dirty & 15) {
3650
+ toggle_class(button, "is-active", ctx2[3]);
3645
3651
  }
3646
3652
  },
3647
3653
  i(local) {
@@ -3672,7 +3678,7 @@ function create_if_block2(ctx) {
3672
3678
  const if_block_creators = [create_if_block_1, create_else_block2];
3673
3679
  const if_blocks = [];
3674
3680
  function select_block_type_1(ctx2, dirty) {
3675
- if (ctx2[6])
3681
+ if (ctx2[7])
3676
3682
  return 0;
3677
3683
  return 1;
3678
3684
  }
@@ -3734,15 +3740,16 @@ function create_else_block2(ctx) {
3734
3740
  let current;
3735
3741
  let mounted;
3736
3742
  let dispose;
3737
- const default_slot_template = ctx[9].default;
3738
- const default_slot = create_slot(default_slot_template, ctx, ctx[8], null);
3743
+ const default_slot_template = ctx[10].default;
3744
+ const default_slot = create_slot(default_slot_template, ctx, ctx[9], null);
3739
3745
  return {
3740
3746
  c() {
3741
3747
  button = element("button");
3742
3748
  if (default_slot)
3743
3749
  default_slot.c();
3744
3750
  attr(button, "class", button_class_value = ctx[1] + "-btn " + ctx[0] + " " + ctx[2]);
3745
- button.disabled = ctx[3];
3751
+ button.disabled = ctx[4];
3752
+ toggle_class(button, "is-active", ctx[3]);
3746
3753
  },
3747
3754
  m(target, anchor) {
3748
3755
  insert(target, button, anchor);
@@ -3752,10 +3759,10 @@ function create_else_block2(ctx) {
3752
3759
  current = true;
3753
3760
  if (!mounted) {
3754
3761
  dispose = [
3755
- listen(button, "click", ctx[11]),
3762
+ listen(button, "click", ctx[12]),
3756
3763
  action_destroyer(tippy_action = tippy.call(null, button, {
3757
- content: ctx[4],
3758
- placement: ctx[5],
3764
+ content: ctx[5],
3765
+ placement: ctx[6],
3759
3766
  className: ctx[0]
3760
3767
  }))
3761
3768
  ];
@@ -3764,13 +3771,13 @@ function create_else_block2(ctx) {
3764
3771
  },
3765
3772
  p(ctx2, dirty) {
3766
3773
  if (default_slot) {
3767
- if (default_slot.p && (!current || dirty & 256)) {
3774
+ if (default_slot.p && (!current || dirty & 512)) {
3768
3775
  update_slot_base(
3769
3776
  default_slot,
3770
3777
  default_slot_template,
3771
3778
  ctx2,
3772
- ctx2[8],
3773
- !current ? get_all_dirty_from_scope(ctx2[8]) : get_slot_changes(default_slot_template, ctx2[8], dirty, null),
3779
+ ctx2[9],
3780
+ !current ? get_all_dirty_from_scope(ctx2[9]) : get_slot_changes(default_slot_template, ctx2[9], dirty, null),
3774
3781
  null
3775
3782
  );
3776
3783
  }
@@ -3778,15 +3785,18 @@ function create_else_block2(ctx) {
3778
3785
  if (!current || dirty & 7 && button_class_value !== (button_class_value = ctx2[1] + "-btn " + ctx2[0] + " " + ctx2[2])) {
3779
3786
  attr(button, "class", button_class_value);
3780
3787
  }
3781
- if (!current || dirty & 8) {
3782
- button.disabled = ctx2[3];
3788
+ if (!current || dirty & 16) {
3789
+ button.disabled = ctx2[4];
3783
3790
  }
3784
- if (tippy_action && is_function(tippy_action.update) && dirty & 49)
3791
+ if (tippy_action && is_function(tippy_action.update) && dirty & 97)
3785
3792
  tippy_action.update.call(null, {
3786
- content: ctx2[4],
3787
- placement: ctx2[5],
3793
+ content: ctx2[5],
3794
+ placement: ctx2[6],
3788
3795
  className: ctx2[0]
3789
3796
  });
3797
+ if (!current || dirty & 15) {
3798
+ toggle_class(button, "is-active", ctx2[3]);
3799
+ }
3790
3800
  },
3791
3801
  i(local) {
3792
3802
  if (current)
@@ -3821,8 +3831,8 @@ function create_if_block_1(ctx) {
3821
3831
  let current;
3822
3832
  let mounted;
3823
3833
  let dispose;
3824
- const default_slot_template = ctx[9].default;
3825
- const default_slot = create_slot(default_slot_template, ctx, ctx[8], null);
3834
+ const default_slot_template = ctx[10].default;
3835
+ const default_slot = create_slot(default_slot_template, ctx, ctx[9], null);
3826
3836
  return {
3827
3837
  c() {
3828
3838
  span1 = element("span");
@@ -3832,7 +3842,8 @@ function create_if_block_1(ctx) {
3832
3842
  t = space();
3833
3843
  span0 = element("span");
3834
3844
  attr(button, "class", button_class_value = ctx[1] + "-btn " + ctx[0] + " " + ctx[2]);
3835
- button.disabled = ctx[3];
3845
+ button.disabled = ctx[4];
3846
+ toggle_class(button, "is-active", ctx[3]);
3836
3847
  attr(span0, "class", span0_class_value = ctx[1] + "-triangle");
3837
3848
  attr(span1, "class", span1_class_value = ctx[1] + "-btn-interactive " + ctx[2]);
3838
3849
  },
@@ -3847,18 +3858,18 @@ function create_if_block_1(ctx) {
3847
3858
  current = true;
3848
3859
  if (!mounted) {
3849
3860
  dispose = [
3850
- listen(button, "click", ctx[10]),
3861
+ listen(button, "click", ctx[11]),
3851
3862
  action_destroyer(tippy_action = tippy.call(null, button, {
3852
- content: ctx[6],
3863
+ content: ctx[7],
3853
3864
  ...tippy_menu,
3854
- placement: ctx[7],
3865
+ placement: ctx[8],
3855
3866
  appendTo: document.body,
3856
3867
  theme: ctx[2],
3857
3868
  className: "fastboard-panel"
3858
3869
  })),
3859
3870
  action_destroyer(tippy_action_1 = tippy.call(null, span1, {
3860
- content: ctx[4],
3861
- placement: ctx[5],
3871
+ content: ctx[5],
3872
+ placement: ctx[6],
3862
3873
  className: ctx[0]
3863
3874
  }))
3864
3875
  ];
@@ -3867,13 +3878,13 @@ function create_if_block_1(ctx) {
3867
3878
  },
3868
3879
  p(ctx2, dirty) {
3869
3880
  if (default_slot) {
3870
- if (default_slot.p && (!current || dirty & 256)) {
3881
+ if (default_slot.p && (!current || dirty & 512)) {
3871
3882
  update_slot_base(
3872
3883
  default_slot,
3873
3884
  default_slot_template,
3874
3885
  ctx2,
3875
- ctx2[8],
3876
- !current ? get_all_dirty_from_scope(ctx2[8]) : get_slot_changes(default_slot_template, ctx2[8], dirty, null),
3886
+ ctx2[9],
3887
+ !current ? get_all_dirty_from_scope(ctx2[9]) : get_slot_changes(default_slot_template, ctx2[9], dirty, null),
3877
3888
  null
3878
3889
  );
3879
3890
  }
@@ -3881,28 +3892,31 @@ function create_if_block_1(ctx) {
3881
3892
  if (!current || dirty & 7 && button_class_value !== (button_class_value = ctx2[1] + "-btn " + ctx2[0] + " " + ctx2[2])) {
3882
3893
  attr(button, "class", button_class_value);
3883
3894
  }
3884
- if (!current || dirty & 8) {
3885
- button.disabled = ctx2[3];
3895
+ if (!current || dirty & 16) {
3896
+ button.disabled = ctx2[4];
3886
3897
  }
3887
- if (tippy_action && is_function(tippy_action.update) && dirty & 196)
3898
+ if (tippy_action && is_function(tippy_action.update) && dirty & 388)
3888
3899
  tippy_action.update.call(null, {
3889
- content: ctx2[6],
3900
+ content: ctx2[7],
3890
3901
  ...tippy_menu,
3891
- placement: ctx2[7],
3902
+ placement: ctx2[8],
3892
3903
  appendTo: document.body,
3893
3904
  theme: ctx2[2],
3894
3905
  className: "fastboard-panel"
3895
3906
  });
3907
+ if (!current || dirty & 15) {
3908
+ toggle_class(button, "is-active", ctx2[3]);
3909
+ }
3896
3910
  if (!current || dirty & 2 && span0_class_value !== (span0_class_value = ctx2[1] + "-triangle")) {
3897
3911
  attr(span0, "class", span0_class_value);
3898
3912
  }
3899
3913
  if (!current || dirty & 6 && span1_class_value !== (span1_class_value = ctx2[1] + "-btn-interactive " + ctx2[2])) {
3900
3914
  attr(span1, "class", span1_class_value);
3901
3915
  }
3902
- if (tippy_action_1 && is_function(tippy_action_1.update) && dirty & 49)
3916
+ if (tippy_action_1 && is_function(tippy_action_1.update) && dirty & 97)
3903
3917
  tippy_action_1.update.call(null, {
3904
- content: ctx2[4],
3905
- placement: ctx2[5],
3918
+ content: ctx2[5],
3919
+ placement: ctx2[6],
3906
3920
  className: ctx2[0]
3907
3921
  });
3908
3922
  },
@@ -3934,7 +3948,7 @@ function create_fragment47(ctx) {
3934
3948
  const if_block_creators = [create_if_block2, create_else_block_1];
3935
3949
  const if_blocks = [];
3936
3950
  function select_block_type(ctx2, dirty) {
3937
- if (ctx2[4])
3951
+ if (ctx2[5])
3938
3952
  return 0;
3939
3953
  return 1;
3940
3954
  }
@@ -3994,6 +4008,7 @@ function instance47($$self, $$props, $$invalidate) {
3994
4008
  let { class: className = "" } = $$props;
3995
4009
  let { name: name10 = "fastboard-ui" } = $$props;
3996
4010
  let { theme = "light" } = $$props;
4011
+ let { active = false } = $$props;
3997
4012
  let { disabled = false } = $$props;
3998
4013
  let { content = "" } = $$props;
3999
4014
  let { placement = "top" } = $$props;
@@ -4015,23 +4030,26 @@ function instance47($$self, $$props, $$invalidate) {
4015
4030
  $$invalidate(1, name10 = $$props2.name);
4016
4031
  if ("theme" in $$props2)
4017
4032
  $$invalidate(2, theme = $$props2.theme);
4033
+ if ("active" in $$props2)
4034
+ $$invalidate(3, active = $$props2.active);
4018
4035
  if ("disabled" in $$props2)
4019
- $$invalidate(3, disabled = $$props2.disabled);
4036
+ $$invalidate(4, disabled = $$props2.disabled);
4020
4037
  if ("content" in $$props2)
4021
- $$invalidate(4, content = $$props2.content);
4038
+ $$invalidate(5, content = $$props2.content);
4022
4039
  if ("placement" in $$props2)
4023
- $$invalidate(5, placement = $$props2.placement);
4040
+ $$invalidate(6, placement = $$props2.placement);
4024
4041
  if ("menu" in $$props2)
4025
- $$invalidate(6, menu = $$props2.menu);
4042
+ $$invalidate(7, menu = $$props2.menu);
4026
4043
  if ("menu_placement" in $$props2)
4027
- $$invalidate(7, menu_placement = $$props2.menu_placement);
4044
+ $$invalidate(8, menu_placement = $$props2.menu_placement);
4028
4045
  if ("$$scope" in $$props2)
4029
- $$invalidate(8, $$scope = $$props2.$$scope);
4046
+ $$invalidate(9, $$scope = $$props2.$$scope);
4030
4047
  };
4031
4048
  return [
4032
4049
  className,
4033
4050
  name10,
4034
4051
  theme,
4052
+ active,
4035
4053
  disabled,
4036
4054
  content,
4037
4055
  placement,
@@ -4051,11 +4069,12 @@ var Button = class extends SvelteComponent {
4051
4069
  class: 0,
4052
4070
  name: 1,
4053
4071
  theme: 2,
4054
- disabled: 3,
4055
- content: 4,
4056
- placement: 5,
4057
- menu: 6,
4058
- menu_placement: 7
4072
+ active: 3,
4073
+ disabled: 4,
4074
+ content: 5,
4075
+ placement: 6,
4076
+ menu: 7,
4077
+ menu_placement: 8
4059
4078
  });
4060
4079
  }
4061
4080
  };
@@ -5485,7 +5504,7 @@ function instance50($$self, $$props, $$invalidate) {
5485
5504
  $$invalidate(4, type = disabled ? "disable" : "normal");
5486
5505
  }
5487
5506
  if ($$self.$$.dirty & 16384) {
5488
- $$subscribe_camera($$invalidate(8, camera = app?.baseCamera));
5507
+ $$subscribe_camera($$invalidate(8, camera = app?.camera));
5489
5508
  }
5490
5509
  if ($$self.$$.dirty & 8) {
5491
5510
  $$invalidate(16, scale = $camera?.scale ?? 1);
@@ -5534,7 +5553,7 @@ var ZoomControl = class extends SvelteComponent {
5534
5553
  };
5535
5554
  var ZoomControl_default = ZoomControl;
5536
5555
 
5537
- // ../../node_modules/.pnpm/svelte@3.49.0/node_modules/svelte/store/index.mjs
5556
+ // ../../node_modules/.pnpm/svelte@3.53.0/node_modules/svelte/store/index.mjs
5538
5557
  var subscriber_queue = [];
5539
5558
  function writable(value, start = noop) {
5540
5559
  let stop;
@@ -6053,7 +6072,7 @@ function create_each_block(key_1, ctx) {
6053
6072
  span = element("span");
6054
6073
  t = space();
6055
6074
  attr(span, "class", "fastboard-toolbar-color-item");
6056
- set_style(span, "background-color", ctx[7], false);
6075
+ set_style(span, "background-color", ctx[7]);
6057
6076
  attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + ctx[0]);
6058
6077
  attr(button, "data-color-key", ctx[7]);
6059
6078
  button.disabled = ctx[1];
@@ -6304,7 +6323,7 @@ function create_each_block2(key_1, ctx) {
6304
6323
  span = element("span");
6305
6324
  t = space();
6306
6325
  attr(span, "class", "fastboard-toolbar-color-item");
6307
- set_style(span, "background-color", ctx[7], false);
6326
+ set_style(span, "background-color", ctx[7]);
6308
6327
  attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + ctx[0]);
6309
6328
  attr(button, "data-color-key", ctx[7]);
6310
6329
  button.disabled = ctx[1];
@@ -6451,7 +6470,7 @@ function create_else_block5(ctx) {
6451
6470
  return { props: { theme: ctx2[0] } };
6452
6471
  }
6453
6472
  if (switch_value) {
6454
- switch_instance = new switch_value(switch_props(ctx));
6473
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
6455
6474
  }
6456
6475
  return {
6457
6476
  c() {
@@ -6460,9 +6479,8 @@ function create_else_block5(ctx) {
6460
6479
  switch_instance_anchor = empty();
6461
6480
  },
6462
6481
  m(target, anchor) {
6463
- if (switch_instance) {
6482
+ if (switch_instance)
6464
6483
  mount_component(switch_instance, target, anchor);
6465
- }
6466
6484
  insert(target, switch_instance_anchor, anchor);
6467
6485
  current = true;
6468
6486
  },
@@ -6480,7 +6498,7 @@ function create_else_block5(ctx) {
6480
6498
  check_outros();
6481
6499
  }
6482
6500
  if (switch_value) {
6483
- switch_instance = new switch_value(switch_props(ctx2));
6501
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
6484
6502
  create_component(switch_instance.$$.fragment);
6485
6503
  transition_in(switch_instance.$$.fragment, 1);
6486
6504
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -6522,7 +6540,7 @@ function create_if_block5(ctx) {
6522
6540
  };
6523
6541
  }
6524
6542
  if (switch_value) {
6525
- switch_instance = new switch_value(switch_props(ctx));
6543
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
6526
6544
  }
6527
6545
  return {
6528
6546
  c() {
@@ -6531,9 +6549,8 @@ function create_if_block5(ctx) {
6531
6549
  switch_instance_anchor = empty();
6532
6550
  },
6533
6551
  m(target, anchor) {
6534
- if (switch_instance) {
6552
+ if (switch_instance)
6535
6553
  mount_component(switch_instance, target, anchor);
6536
- }
6537
6554
  insert(target, switch_instance_anchor, anchor);
6538
6555
  current = true;
6539
6556
  },
@@ -6551,7 +6568,7 @@ function create_if_block5(ctx) {
6551
6568
  check_outros();
6552
6569
  }
6553
6570
  if (switch_value) {
6554
- switch_instance = new switch_value(switch_props(ctx2));
6571
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
6555
6572
  create_component(switch_instance.$$.fragment);
6556
6573
  transition_in(switch_instance.$$.fragment, 1);
6557
6574
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -6660,7 +6677,7 @@ function create_each_block3(key_1, ctx) {
6660
6677
  content: tooltip(ctx[6][ctx[12]], ctx[2][ctx[12]]),
6661
6678
  placement: "top"
6662
6679
  });
6663
- if (dirty & 25) {
6680
+ if (!current || dirty & 25) {
6664
6681
  toggle_class(button, "is-active", ctx[13]);
6665
6682
  }
6666
6683
  },
@@ -7491,7 +7508,7 @@ function create_else_block_6(ctx) {
7491
7508
  return { props: { theme: ctx2[1] } };
7492
7509
  }
7493
7510
  if (switch_value) {
7494
- switch_instance = new switch_value(switch_props(ctx));
7511
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7495
7512
  }
7496
7513
  return {
7497
7514
  c() {
@@ -7500,9 +7517,8 @@ function create_else_block_6(ctx) {
7500
7517
  switch_instance_anchor = empty();
7501
7518
  },
7502
7519
  m(target, anchor) {
7503
- if (switch_instance) {
7520
+ if (switch_instance)
7504
7521
  mount_component(switch_instance, target, anchor);
7505
- }
7506
7522
  insert(target, switch_instance_anchor, anchor);
7507
7523
  current = true;
7508
7524
  },
@@ -7520,7 +7536,7 @@ function create_else_block_6(ctx) {
7520
7536
  check_outros();
7521
7537
  }
7522
7538
  if (switch_value) {
7523
- switch_instance = new switch_value(switch_props(ctx2));
7539
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7524
7540
  create_component(switch_instance.$$.fragment);
7525
7541
  transition_in(switch_instance.$$.fragment, 1);
7526
7542
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -7562,7 +7578,7 @@ function create_if_block_12(ctx) {
7562
7578
  };
7563
7579
  }
7564
7580
  if (switch_value) {
7565
- switch_instance = new switch_value(switch_props(ctx));
7581
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7566
7582
  }
7567
7583
  return {
7568
7584
  c() {
@@ -7571,9 +7587,8 @@ function create_if_block_12(ctx) {
7571
7587
  switch_instance_anchor = empty();
7572
7588
  },
7573
7589
  m(target, anchor) {
7574
- if (switch_instance) {
7590
+ if (switch_instance)
7575
7591
  mount_component(switch_instance, target, anchor);
7576
- }
7577
7592
  insert(target, switch_instance_anchor, anchor);
7578
7593
  current = true;
7579
7594
  },
@@ -7591,7 +7606,7 @@ function create_if_block_12(ctx) {
7591
7606
  check_outros();
7592
7607
  }
7593
7608
  if (switch_value) {
7594
- switch_instance = new switch_value(switch_props(ctx2));
7609
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7595
7610
  create_component(switch_instance.$$.fragment);
7596
7611
  transition_in(switch_instance.$$.fragment, 1);
7597
7612
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -7690,6 +7705,9 @@ function create_else_block_4(ctx) {
7690
7705
  let current;
7691
7706
  const button_spread_levels = [
7692
7707
  { class: "eraser" },
7708
+ {
7709
+ active: ctx[8] === ctx[12]
7710
+ },
7693
7711
  ctx[18],
7694
7712
  {
7695
7713
  content: ctx[10][ctx[12]]
@@ -7714,8 +7732,11 @@ function create_else_block_4(ctx) {
7714
7732
  current = true;
7715
7733
  },
7716
7734
  p(ctx2, dirty) {
7717
- const button_changes = dirty[0] & 332800 ? get_spread_update(button_spread_levels, [
7735
+ const button_changes = dirty[0] & 333056 ? get_spread_update(button_spread_levels, [
7718
7736
  button_spread_levels[0],
7737
+ dirty[0] & 4352 && {
7738
+ active: ctx2[8] === ctx2[12]
7739
+ },
7719
7740
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
7720
7741
  dirty[0] & 5120 && {
7721
7742
  content: ctx2[10][ctx2[12]]
@@ -7747,6 +7768,9 @@ function create_if_block_9(ctx) {
7747
7768
  let current;
7748
7769
  const button_spread_levels = [
7749
7770
  { class: "eraser" },
7771
+ {
7772
+ active: ctx[8] === "pencilEraser"
7773
+ },
7750
7774
  ctx[18],
7751
7775
  { content: ctx[21].pencilEraser },
7752
7776
  { menu: ctx[16] }
@@ -7769,8 +7793,11 @@ function create_if_block_9(ctx) {
7769
7793
  current = true;
7770
7794
  },
7771
7795
  p(ctx2, dirty) {
7772
- const button_changes = dirty[0] & 2424832 ? get_spread_update(button_spread_levels, [
7796
+ const button_changes = dirty[0] & 2425088 ? get_spread_update(button_spread_levels, [
7773
7797
  button_spread_levels[0],
7798
+ dirty[0] & 256 && {
7799
+ active: ctx2[8] === "pencilEraser"
7800
+ },
7774
7801
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
7775
7802
  dirty[0] & 2097152 && { content: ctx2[21].pencilEraser },
7776
7803
  dirty[0] & 65536 && { menu: ctx2[16] }
@@ -7798,7 +7825,14 @@ function create_if_block_9(ctx) {
7798
7825
  function create_if_block_7(ctx) {
7799
7826
  let button;
7800
7827
  let current;
7801
- const button_spread_levels = [{ class: "eraser" }, ctx[18], { content: ctx[21].eraser }];
7828
+ const button_spread_levels = [
7829
+ { class: "eraser" },
7830
+ {
7831
+ active: ctx[8] === "eraser"
7832
+ },
7833
+ ctx[18],
7834
+ { content: ctx[21].eraser }
7835
+ ];
7802
7836
  let button_props = {
7803
7837
  $$slots: { default: [create_default_slot_53] },
7804
7838
  $$scope: { ctx }
@@ -7817,8 +7851,11 @@ function create_if_block_7(ctx) {
7817
7851
  current = true;
7818
7852
  },
7819
7853
  p(ctx2, dirty) {
7820
- const button_changes = dirty[0] & 2359296 ? get_spread_update(button_spread_levels, [
7854
+ const button_changes = dirty[0] & 2359552 ? get_spread_update(button_spread_levels, [
7821
7855
  button_spread_levels[0],
7856
+ dirty[0] & 256 && {
7857
+ active: ctx2[8] === "eraser"
7858
+ },
7822
7859
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
7823
7860
  dirty[0] & 2097152 && { content: ctx2[21].eraser }
7824
7861
  ]) : {};
@@ -7851,7 +7888,7 @@ function create_else_block_5(ctx) {
7851
7888
  return { props: { theme: ctx2[1] } };
7852
7889
  }
7853
7890
  if (switch_value) {
7854
- switch_instance = new switch_value(switch_props(ctx));
7891
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7855
7892
  }
7856
7893
  return {
7857
7894
  c() {
@@ -7860,9 +7897,8 @@ function create_else_block_5(ctx) {
7860
7897
  switch_instance_anchor = empty();
7861
7898
  },
7862
7899
  m(target, anchor) {
7863
- if (switch_instance) {
7900
+ if (switch_instance)
7864
7901
  mount_component(switch_instance, target, anchor);
7865
- }
7866
7902
  insert(target, switch_instance_anchor, anchor);
7867
7903
  current = true;
7868
7904
  },
@@ -7880,7 +7916,7 @@ function create_else_block_5(ctx) {
7880
7916
  check_outros();
7881
7917
  }
7882
7918
  if (switch_value) {
7883
- switch_instance = new switch_value(switch_props(ctx2));
7919
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7884
7920
  create_component(switch_instance.$$.fragment);
7885
7921
  transition_in(switch_instance.$$.fragment, 1);
7886
7922
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -7922,7 +7958,7 @@ function create_if_block_11(ctx) {
7922
7958
  };
7923
7959
  }
7924
7960
  if (switch_value) {
7925
- switch_instance = new switch_value(switch_props(ctx));
7961
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7926
7962
  }
7927
7963
  return {
7928
7964
  c() {
@@ -7931,9 +7967,8 @@ function create_if_block_11(ctx) {
7931
7967
  switch_instance_anchor = empty();
7932
7968
  },
7933
7969
  m(target, anchor) {
7934
- if (switch_instance) {
7970
+ if (switch_instance)
7935
7971
  mount_component(switch_instance, target, anchor);
7936
- }
7937
7972
  insert(target, switch_instance_anchor, anchor);
7938
7973
  current = true;
7939
7974
  },
@@ -7951,7 +7986,7 @@ function create_if_block_11(ctx) {
7951
7986
  check_outros();
7952
7987
  }
7953
7988
  if (switch_value) {
7954
- switch_instance = new switch_value(switch_props(ctx2));
7989
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7955
7990
  create_component(switch_instance.$$.fragment);
7956
7991
  transition_in(switch_instance.$$.fragment, 1);
7957
7992
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -8561,6 +8596,9 @@ function create_if_block6(ctx) {
8561
8596
  let current;
8562
8597
  const button0_spread_levels = [
8563
8598
  { class: "eraser" },
8599
+ {
8600
+ active: ctx[8] === "pencilEraser"
8601
+ },
8564
8602
  ctx[18],
8565
8603
  { placement: "top" },
8566
8604
  {
@@ -8578,6 +8616,9 @@ function create_if_block6(ctx) {
8578
8616
  button0.$on("click", ctx[34]);
8579
8617
  const button1_spread_levels = [
8580
8618
  { class: "eraser" },
8619
+ {
8620
+ active: ctx[8] === "eraser"
8621
+ },
8581
8622
  ctx[18],
8582
8623
  { placement: "top" },
8583
8624
  { content: ctx[21].eraserForPanel }
@@ -8616,10 +8657,13 @@ function create_if_block6(ctx) {
8616
8657
  current = true;
8617
8658
  },
8618
8659
  p(ctx2, dirty) {
8619
- const button0_changes = dirty[0] & 2359296 ? get_spread_update(button0_spread_levels, [
8660
+ const button0_changes = dirty[0] & 2359552 ? get_spread_update(button0_spread_levels, [
8620
8661
  button0_spread_levels[0],
8662
+ dirty[0] & 256 && {
8663
+ active: ctx2[8] === "pencilEraser"
8664
+ },
8621
8665
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
8622
- button0_spread_levels[2],
8666
+ button0_spread_levels[3],
8623
8667
  dirty[0] & 2097152 && {
8624
8668
  content: ctx2[21].pencilEraserForPanel
8625
8669
  }
@@ -8628,10 +8672,13 @@ function create_if_block6(ctx) {
8628
8672
  button0_changes.$$scope = { dirty, ctx: ctx2 };
8629
8673
  }
8630
8674
  button0.$set(button0_changes);
8631
- const button1_changes = dirty[0] & 2359296 ? get_spread_update(button1_spread_levels, [
8675
+ const button1_changes = dirty[0] & 2359552 ? get_spread_update(button1_spread_levels, [
8632
8676
  button1_spread_levels[0],
8677
+ dirty[0] & 256 && {
8678
+ active: ctx2[8] === "eraser"
8679
+ },
8633
8680
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
8634
- button1_spread_levels[2],
8681
+ button1_spread_levels[3],
8635
8682
  dirty[0] & 2097152 && { content: ctx2[21].eraserForPanel }
8636
8683
  ]) : {};
8637
8684
  if (dirty[0] & 258 | dirty[1] & 33554432) {
@@ -9157,6 +9204,9 @@ function create_fragment57(ctx) {
9157
9204
  let if_block0 = ctx[5] && create_if_block_17(ctx);
9158
9205
  const button0_spread_levels = [
9159
9206
  { class: "clicker" },
9207
+ {
9208
+ active: ctx[8] === "clicker"
9209
+ },
9160
9210
  ctx[18],
9161
9211
  { content: ctx[21].clicker }
9162
9212
  ];
@@ -9171,6 +9221,9 @@ function create_fragment57(ctx) {
9171
9221
  button0.$on("click", ctx[27]);
9172
9222
  const button1_spread_levels = [
9173
9223
  { class: "selector" },
9224
+ {
9225
+ active: ctx[8] === "selector"
9226
+ },
9174
9227
  ctx[18],
9175
9228
  { content: ctx[21].selector }
9176
9229
  ];
@@ -9185,6 +9238,9 @@ function create_fragment57(ctx) {
9185
9238
  button1.$on("click", ctx[28]);
9186
9239
  const button2_spread_levels = [
9187
9240
  { class: "pencil" },
9241
+ {
9242
+ active: ctx[8] === "pencil"
9243
+ },
9188
9244
  ctx[18],
9189
9245
  { content: ctx[21].pencil },
9190
9246
  { menu: ctx[13] }
@@ -9200,6 +9256,7 @@ function create_fragment57(ctx) {
9200
9256
  button2.$on("click", ctx[29]);
9201
9257
  const button3_spread_levels = [
9202
9258
  { class: "text" },
9259
+ { active: ctx[8] === "text" },
9203
9260
  ctx[18],
9204
9261
  { content: ctx[21].text },
9205
9262
  { menu: ctx[14] }
@@ -9215,6 +9272,9 @@ function create_fragment57(ctx) {
9215
9272
  button3.$on("click", ctx[30]);
9216
9273
  const button4_spread_levels = [
9217
9274
  { class: "shapes" },
9275
+ {
9276
+ active: ctx[8] === ctx[11] || ctx[8] === "shape" && ctx[9] === ctx[11]
9277
+ },
9218
9278
  ctx[18],
9219
9279
  { content: ctx[10].shapes },
9220
9280
  { menu: ctx[15] }
@@ -9471,8 +9531,11 @@ function create_fragment57(ctx) {
9471
9531
  });
9472
9532
  check_outros();
9473
9533
  }
9474
- const button0_changes = dirty[0] & 2359296 ? get_spread_update(button0_spread_levels, [
9534
+ const button0_changes = dirty[0] & 2359552 ? get_spread_update(button0_spread_levels, [
9475
9535
  button0_spread_levels[0],
9536
+ dirty[0] & 256 && {
9537
+ active: ctx2[8] === "clicker"
9538
+ },
9476
9539
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9477
9540
  dirty[0] & 2097152 && { content: ctx2[21].clicker }
9478
9541
  ]) : {};
@@ -9480,8 +9543,11 @@ function create_fragment57(ctx) {
9480
9543
  button0_changes.$$scope = { dirty, ctx: ctx2 };
9481
9544
  }
9482
9545
  button0.$set(button0_changes);
9483
- const button1_changes = dirty[0] & 2359296 ? get_spread_update(button1_spread_levels, [
9546
+ const button1_changes = dirty[0] & 2359552 ? get_spread_update(button1_spread_levels, [
9484
9547
  button1_spread_levels[0],
9548
+ dirty[0] & 256 && {
9549
+ active: ctx2[8] === "selector"
9550
+ },
9485
9551
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9486
9552
  dirty[0] & 2097152 && { content: ctx2[21].selector }
9487
9553
  ]) : {};
@@ -9489,8 +9555,11 @@ function create_fragment57(ctx) {
9489
9555
  button1_changes.$$scope = { dirty, ctx: ctx2 };
9490
9556
  }
9491
9557
  button1.$set(button1_changes);
9492
- const button2_changes = dirty[0] & 2367488 ? get_spread_update(button2_spread_levels, [
9558
+ const button2_changes = dirty[0] & 2367744 ? get_spread_update(button2_spread_levels, [
9493
9559
  button2_spread_levels[0],
9560
+ dirty[0] & 256 && {
9561
+ active: ctx2[8] === "pencil"
9562
+ },
9494
9563
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9495
9564
  dirty[0] & 2097152 && { content: ctx2[21].pencil },
9496
9565
  dirty[0] & 8192 && { menu: ctx2[13] }
@@ -9499,8 +9568,9 @@ function create_fragment57(ctx) {
9499
9568
  button2_changes.$$scope = { dirty, ctx: ctx2 };
9500
9569
  }
9501
9570
  button2.$set(button2_changes);
9502
- const button3_changes = dirty[0] & 2375680 ? get_spread_update(button3_spread_levels, [
9571
+ const button3_changes = dirty[0] & 2375936 ? get_spread_update(button3_spread_levels, [
9503
9572
  button3_spread_levels[0],
9573
+ dirty[0] & 256 && { active: ctx2[8] === "text" },
9504
9574
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9505
9575
  dirty[0] & 2097152 && { content: ctx2[21].text },
9506
9576
  dirty[0] & 16384 && { menu: ctx2[14] }
@@ -9509,8 +9579,11 @@ function create_fragment57(ctx) {
9509
9579
  button3_changes.$$scope = { dirty, ctx: ctx2 };
9510
9580
  }
9511
9581
  button3.$set(button3_changes);
9512
- const button4_changes = dirty[0] & 295936 ? get_spread_update(button4_spread_levels, [
9582
+ const button4_changes = dirty[0] & 298752 ? get_spread_update(button4_spread_levels, [
9513
9583
  button4_spread_levels[0],
9584
+ dirty[0] & 2816 && {
9585
+ active: ctx2[8] === ctx2[11] || ctx2[8] === "shape" && ctx2[9] === ctx2[11]
9586
+ },
9514
9587
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9515
9588
  dirty[0] & 1024 && { content: ctx2[10].shapes },
9516
9589
  dirty[0] & 32768 && { menu: ctx2[15] }
@@ -9569,7 +9642,7 @@ function create_fragment57(ctx) {
9569
9642
  }
9570
9643
  if (scrollHeight_action && is_function(scrollHeight_action.update) && dirty[0] & 16)
9571
9644
  scrollHeight_action.update.call(null, ctx2[4]);
9572
- if (dirty[0] & 32) {
9645
+ if (!current || dirty[0] & 32) {
9573
9646
  toggle_class(div0, "scrollable", ctx2[5]);
9574
9647
  }
9575
9648
  if (ctx2[5]) {
@@ -10035,58 +10108,44 @@ var Contents_default = Contents;
10035
10108
 
10036
10109
  // src/components/Toolbar/Toolbar.svelte
10037
10110
  function create_else_block7(ctx) {
10038
- let path0;
10039
- let path1;
10111
+ let path;
10040
10112
  return {
10041
10113
  c() {
10042
- path0 = svg_element("path");
10043
- path1 = svg_element("path");
10044
- attr(path0, "stroke", "#000");
10045
- attr(path0, "d", "M20 52v16");
10046
- attr(path0, "class", name6 + "-handler-image-stroke-color");
10047
- attr(path1, "fill", "#000");
10048
- attr(path1, "stroke", "none");
10049
- attr(path1, "d", "M16 52v16l-8-8z");
10050
- attr(path1, "class", name6 + "-handler-image-fill-color");
10114
+ path = svg_element("path");
10115
+ attr(path, "fill-rule", "evenodd");
10116
+ attr(path, "clip-rule", "evenodd");
10117
+ attr(path, "d", "M6 19L8 17V25L6 23L4 21L6 19ZM10 17H9V25H10V17Z");
10118
+ attr(path, "fill", "#fff");
10119
+ attr(path, "class", name6 + "-handler-image-fill-color");
10051
10120
  },
10052
10121
  m(target, anchor) {
10053
- insert(target, path0, anchor);
10054
- insert(target, path1, anchor);
10122
+ insert(target, path, anchor);
10055
10123
  },
10056
10124
  p: noop,
10057
10125
  d(detaching) {
10058
10126
  if (detaching)
10059
- detach(path0);
10060
- if (detaching)
10061
- detach(path1);
10127
+ detach(path);
10062
10128
  }
10063
10129
  };
10064
10130
  }
10065
10131
  function create_if_block7(ctx) {
10066
- let path0;
10067
- let path1;
10132
+ let path;
10068
10133
  return {
10069
10134
  c() {
10070
- path0 = svg_element("path");
10071
- path1 = svg_element("path");
10072
- attr(path0, "stroke", "#000");
10073
- attr(path0, "d", "M10 52v16");
10074
- attr(path0, "class", name6 + "-handler-image-stroke-color");
10075
- attr(path1, "fill", "#000");
10076
- attr(path1, "stroke", "none");
10077
- attr(path1, "d", "M14 52v16l8-8z");
10078
- attr(path1, "class", name6 + "-handler-image-fill-color");
10135
+ path = svg_element("path");
10136
+ attr(path, "fill-rule", "evenodd");
10137
+ attr(path, "clip-rule", "evenodd");
10138
+ attr(path, "d", "M8 19L6 17V25L8 23L10 21L8 19ZM4 17H5V25H4V17Z");
10139
+ attr(path, "fill", "#fff");
10140
+ attr(path, "class", name6 + "-handler-image-fill-color");
10079
10141
  },
10080
10142
  m(target, anchor) {
10081
- insert(target, path0, anchor);
10082
- insert(target, path1, anchor);
10143
+ insert(target, path, anchor);
10083
10144
  },
10084
10145
  p: noop,
10085
10146
  d(detaching) {
10086
10147
  if (detaching)
10087
- detach(path0);
10088
- if (detaching)
10089
- detach(path1);
10148
+ detach(path);
10090
10149
  }
10091
10150
  };
10092
10151
  }
@@ -10100,8 +10159,7 @@ function create_fragment58(ctx) {
10100
10159
  let input;
10101
10160
  let t1;
10102
10161
  let svg;
10103
- let path0;
10104
- let path1;
10162
+ let path;
10105
10163
  let label_class_value;
10106
10164
  let div1_class_value;
10107
10165
  let current;
@@ -10137,27 +10195,19 @@ function create_fragment58(ctx) {
10137
10195
  input = element("input");
10138
10196
  t1 = space();
10139
10197
  svg = svg_element("svg");
10140
- path0 = svg_element("path");
10141
- path1 = svg_element("path");
10198
+ path = svg_element("path");
10142
10199
  if_block.c();
10143
10200
  attr(div0, "class", div0_class_value = name6 + "-contents " + ctx[1]);
10144
- set_style(
10145
- div0,
10146
- "height",
10147
- ctx[6] ? ctx[7] + "px" : "auto",
10148
- false
10149
- );
10201
+ set_style(div0, "height", ctx[6] ? ctx[7] + "px" : "auto");
10150
10202
  attr(input, "type", "checkbox");
10151
- attr(path0, "fill", "#fff");
10152
- attr(path0, "stroke", "none");
10153
- attr(path0, "d", "m0 0 24 16q6 4 6 14v60q0 10-6 14L0 120");
10154
- attr(path0, "class", name6 + "-handler-bg-color");
10155
- attr(path1, "stroke", "#000");
10156
- attr(path1, "d", "m0 0 24 16q6 4 6 14v60q0 10-6 14L0 120");
10157
- attr(path1, "class", name6 + "-handler-border-color");
10203
+ attr(path, "d", "M0 41H12C14.2091 41 16 39.2091 16 37V5C16 2.79086 14.2091 1 12 1H0");
10204
+ attr(path, "stroke", "#000");
10205
+ attr(path, "fill", "#fff");
10206
+ attr(path, "class", name6 + "-handler-border-color " + name6 + "-handler-bg-color");
10207
+ attr(svg, "width", "17");
10208
+ attr(svg, "height", "42");
10209
+ attr(svg, "viewBox", "0 0 17 42");
10158
10210
  attr(svg, "fill", "none");
10159
- attr(svg, "stroke-width", "2");
10160
- attr(svg, "viewBox", "0 0 32 120");
10161
10211
  attr(label, "class", label_class_value = name6 + "-handler " + ctx[1]);
10162
10212
  attr(div1, "class", div1_class_value = name6 + " " + ctx[1]);
10163
10213
  toggle_class(div1, "collapsed", ctx[3]);
@@ -10172,8 +10222,7 @@ function create_fragment58(ctx) {
10172
10222
  input.checked = ctx[3];
10173
10223
  append(label, t1);
10174
10224
  append(label, svg);
10175
- append(svg, path0);
10176
- append(svg, path1);
10225
+ append(svg, path);
10177
10226
  if_block.m(svg, null);
10178
10227
  current = true;
10179
10228
  if (!mounted) {
@@ -10207,12 +10256,7 @@ function create_fragment58(ctx) {
10207
10256
  attr(div0, "class", div0_class_value);
10208
10257
  }
10209
10258
  if (dirty & 192) {
10210
- set_style(
10211
- div0,
10212
- "height",
10213
- ctx2[6] ? ctx2[7] + "px" : "auto",
10214
- false
10215
- );
10259
+ set_style(div0, "height", ctx2[6] ? ctx2[7] + "px" : "auto");
10216
10260
  }
10217
10261
  if (dirty & 8) {
10218
10262
  input.checked = ctx2[3];
@@ -10233,7 +10277,7 @@ function create_fragment58(ctx) {
10233
10277
  if (!current || dirty & 2 && div1_class_value !== (div1_class_value = name6 + " " + ctx2[1])) {
10234
10278
  attr(div1, "class", div1_class_value);
10235
10279
  }
10236
- if (dirty & 10) {
10280
+ if (!current || dirty & 10) {
10237
10281
  toggle_class(div1, "collapsed", ctx2[3]);
10238
10282
  }
10239
10283
  },
@@ -11343,7 +11387,7 @@ function create_fragment60(ctx) {
11343
11387
  });
11344
11388
  check_outros();
11345
11389
  }
11346
- if (dirty & 1) {
11390
+ if (!current || dirty & 1) {
11347
11391
  toggle_class(div2, "loading", !ctx2[0]);
11348
11392
  }
11349
11393
  },
@@ -11729,7 +11773,7 @@ function create_fragment61(ctx) {
11729
11773
  });
11730
11774
  check_outros();
11731
11775
  }
11732
- if (dirty & 32) {
11776
+ if (!current || dirty & 32) {
11733
11777
  toggle_class(div1, "hidden", !(ctx2[5] === "visible" || ctx2[5] === "toolbar-only"));
11734
11778
  }
11735
11779
  if (ctx2[3].redo_undo?.enable !== false) {
@@ -11770,7 +11814,7 @@ function create_fragment61(ctx) {
11770
11814
  });
11771
11815
  check_outros();
11772
11816
  }
11773
- if (dirty & 32) {
11817
+ if (!current || dirty & 32) {
11774
11818
  toggle_class(div2, "hidden", ctx2[5] !== "visible");
11775
11819
  }
11776
11820
  if (ctx2[3].page_control?.enable !== false) {
@@ -11792,10 +11836,10 @@ function create_fragment61(ctx) {
11792
11836
  });
11793
11837
  check_outros();
11794
11838
  }
11795
- if (dirty & 32) {
11839
+ if (!current || dirty & 32) {
11796
11840
  toggle_class(div3, "hidden", ctx2[5] !== "visible");
11797
11841
  }
11798
- if (dirty & 1) {
11842
+ if (!current || dirty & 1) {
11799
11843
  toggle_class(div4, "loading", !ctx2[0]);
11800
11844
  }
11801
11845
  },
@@ -12035,4 +12079,3 @@ exports.ZoomControl = ZoomControl_default;
12035
12079
  exports.createReplayUI = createReplayUI;
12036
12080
  exports.createUI = createUI;
12037
12081
  exports.stockedApps = stockedApps;
12038
- //# sourceMappingURL=index.js.map