@embedpdf/plugin-annotation 2.8.0 → 2.9.0

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.
Files changed (52) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +814 -139
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/geometry/cloudy-border.d.ts +90 -0
  6. package/dist/lib/geometry/index.d.ts +1 -0
  7. package/dist/lib/handlers/types.d.ts +2 -1
  8. package/dist/lib/tools/default-tools.d.ts +38 -87
  9. package/dist/lib/tools/types.d.ts +32 -1
  10. package/dist/preact/index.cjs +1 -1
  11. package/dist/preact/index.cjs.map +1 -1
  12. package/dist/preact/index.js +352 -239
  13. package/dist/preact/index.js.map +1 -1
  14. package/dist/react/index.cjs +1 -1
  15. package/dist/react/index.cjs.map +1 -1
  16. package/dist/react/index.js +352 -239
  17. package/dist/react/index.js.map +1 -1
  18. package/dist/shared/components/annotation-container.d.ts +4 -2
  19. package/dist/shared/components/annotations/circle.d.ts +6 -2
  20. package/dist/shared/components/annotations/polygon.d.ts +3 -1
  21. package/dist/shared/components/annotations/square.d.ts +6 -2
  22. package/dist/shared/components/types.d.ts +6 -2
  23. package/dist/shared-preact/components/annotation-container.d.ts +4 -2
  24. package/dist/shared-preact/components/annotations/circle.d.ts +6 -2
  25. package/dist/shared-preact/components/annotations/polygon.d.ts +3 -1
  26. package/dist/shared-preact/components/annotations/square.d.ts +6 -2
  27. package/dist/shared-preact/components/types.d.ts +6 -2
  28. package/dist/shared-react/components/annotation-container.d.ts +4 -2
  29. package/dist/shared-react/components/annotations/circle.d.ts +6 -2
  30. package/dist/shared-react/components/annotations/polygon.d.ts +3 -1
  31. package/dist/shared-react/components/annotations/square.d.ts +6 -2
  32. package/dist/shared-react/components/types.d.ts +6 -2
  33. package/dist/svelte/components/annotations/Circle.svelte.d.ts +3 -1
  34. package/dist/svelte/components/annotations/Polygon.svelte.d.ts +1 -0
  35. package/dist/svelte/components/annotations/Square.svelte.d.ts +3 -1
  36. package/dist/svelte/components/types.d.ts +2 -1
  37. package/dist/svelte/context/types.d.ts +6 -2
  38. package/dist/svelte/index.cjs +1 -1
  39. package/dist/svelte/index.cjs.map +1 -1
  40. package/dist/svelte/index.js +505 -293
  41. package/dist/svelte/index.js.map +1 -1
  42. package/dist/vue/components/annotation-container.vue.d.ts +7 -6
  43. package/dist/vue/components/annotations/circle.vue.d.ts +5 -1
  44. package/dist/vue/components/annotations/polygon.vue.d.ts +2 -0
  45. package/dist/vue/components/annotations/square.vue.d.ts +5 -1
  46. package/dist/vue/components/annotations.vue.d.ts +8 -9
  47. package/dist/vue/context/types.d.ts +6 -2
  48. package/dist/vue/index.cjs +1 -1
  49. package/dist/vue/index.cjs.map +1 -1
  50. package/dist/vue/index.js +259 -121
  51. package/dist/vue/index.js.map +1 -1
  52. package/package.json +10 -10
@@ -1,5 +1,5 @@
1
1
  import { createPluginPackage } from "@embedpdf/core";
2
- import { AnnotationPlugin, initialDocumentState, patching, getAnnotationsByPageIndex, getSelectedAnnotationIds, resolveInteractionProp, AnnotationPluginPackage as AnnotationPluginPackage$1 } from "@embedpdf/plugin-annotation";
2
+ import { AnnotationPlugin, initialDocumentState, generateCloudyRectanglePath, generateCloudyEllipsePath, patching, generateCloudyPolygonPath, getAnnotationsByPageIndex, getSelectedAnnotationIds, resolveInteractionProp, AnnotationPluginPackage as AnnotationPluginPackage$1 } from "@embedpdf/plugin-annotation";
3
3
  export * from "@embedpdf/plugin-annotation";
4
4
  import "svelte/internal/disclose-version";
5
5
  import * as $ from "svelte/internal/client";
@@ -7,7 +7,7 @@ import { setContext, getContext, untrack } from "svelte";
7
7
  import { useCapability, usePlugin, useDocumentPermissions, useDocumentState } from "@embedpdf/core/svelte";
8
8
  import { getCounterRotation } from "@embedpdf/utils";
9
9
  import { useInteractionHandles, deepToRaw, doublePress, CounterRotate } from "@embedpdf/utils/svelte";
10
- import { inferRotationCenterFromRects, boundingRectOrEmpty, PdfAnnotationBorderStyle, PdfVerticalAlignment, standardFontCssProperties, textAlignmentToCss, ignore, PdfErrorCode, getContrastStrokeColor, PdfAnnotationSubtype, blendModeToCss, PdfBlendMode } from "@embedpdf/models";
10
+ import { inferRotationCenterFromRects, boundingRectOrEmpty, PdfAnnotationBorderStyle, PdfVerticalAlignment, standardFontCssProperties, textAlignmentToCss, ignore, PdfErrorCode, getContrastStrokeColor, PdfBlendMode, PdfAnnotationSubtype, blendModeToCss } from "@embedpdf/models";
11
11
  import { usePointerHandlers } from "@embedpdf/plugin-interaction-manager/svelte";
12
12
  import { useSelectionCapability } from "@embedpdf/plugin-selection/svelte";
13
13
  const REGISTRY_KEY = Symbol("AnnotationRendererRegistry");
@@ -48,6 +48,7 @@ function createRenderer(entry) {
48
48
  component: entry.component,
49
49
  vertexConfig: entry.vertexConfig,
50
50
  zIndex: entry.zIndex,
51
+ defaultBlendMode: entry.defaultBlendMode,
51
52
  containerStyle: entry.containerStyle,
52
53
  interactionDefaults: entry.interactionDefaults,
53
54
  useAppearanceStream: entry.useAppearanceStream,
@@ -95,7 +96,7 @@ const useAnnotation = (getDocumentId) => {
95
96
  }
96
97
  };
97
98
  };
98
- var root_1$h = $.from_html(`<img alt="" draggable="false"/>`);
99
+ var root_1$f = $.from_html(`<img alt="" draggable="false"/>`);
99
100
  function AppearanceImage($$anchor, $$props) {
100
101
  $.push($$props, true);
101
102
  let imageUrl = $.state(null);
@@ -121,7 +122,7 @@ function AppearanceImage($$anchor, $$props) {
121
122
  var node = $.first_child(fragment);
122
123
  {
123
124
  var consequent = ($$anchor2) => {
124
- var img = root_1$h();
125
+ var img = root_1$f();
125
126
  $.template_effect(() => {
126
127
  $.set_attribute(img, "src", $.get(imageUrl));
127
128
  $.set_style(img, `position: absolute; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; ${$$props.style ?? "" ?? ""}`);
@@ -137,14 +138,14 @@ function AppearanceImage($$anchor, $$props) {
137
138
  $.append($$anchor, fragment);
138
139
  $.pop();
139
140
  }
140
- var root_1$g = $.from_html(`<div></div> <div></div> <div></div>`, 1);
141
- var root_3$5 = $.from_html(`<div style="display: contents;"><!></div>`);
142
- var root_5$4 = $.from_html(`<div></div>`);
143
- var root_4$4 = $.from_html(`<div style="display: contents;"><!> <div><svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path></svg></div></div>`);
141
+ var root_4$7 = $.from_html(`<div></div> <div></div> <div></div>`, 1);
142
+ var root_6$2 = $.from_html(`<div style="display: contents;"><!></div>`);
143
+ var root_8$1 = $.from_html(`<div></div>`);
144
+ var root_7$1 = $.from_html(`<div style="display: contents;"><!> <div><svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path></svg></div></div>`);
144
145
  var root_12 = $.from_html(`<div></div>`);
145
146
  var root_16 = $.from_html(`<div></div>`);
146
147
  var root_23 = $.from_html(`<div><div> </div></div>`);
147
- var root$e = $.from_html(`<div data-no-interaction=""><div><!> <!> <div><!> <!> <!> <!></div></div> <!> <!></div>`);
148
+ var root$e = $.from_html(`<div data-no-interaction=""><div><div><!> <!></div></div> <div><!> <!> <div><!> <!></div></div> <!> <!></div>`);
148
149
  function AnnotationContainer($$anchor, $$props) {
149
150
  $.push($$props, true);
150
151
  let isEditing = $.prop($$props, "isEditing", 3, false), isMultiSelected = $.prop($$props, "isMultiSelected", 3, false), isRotatable = $.prop($$props, "isRotatable", 3, true), lockAspectRatio = $.prop($$props, "lockAspectRatio", 3, false), propsClass = $.prop($$props, "class", 3, ""), outlineOffset = $.prop($$props, "outlineOffset", 3, 1), zIndex = $.prop($$props, "zIndex", 3, 1), restProps = $.rest_props($$props, [
@@ -166,6 +167,7 @@ function AnnotationContainer($$anchor, $$props) {
166
167
  "isResizable",
167
168
  "isRotatable",
168
169
  "lockAspectRatio",
170
+ "blendMode",
169
171
  "style",
170
172
  "class",
171
173
  "vertexConfig",
@@ -504,8 +506,62 @@ function AnnotationContainer($$anchor, $$props) {
504
506
  }
505
507
  var div = root$e();
506
508
  var div_1 = $.child(div);
507
- $.attribute_effect(div_1, () => ({
508
- style: $$props.style || "",
509
+ let styles;
510
+ var div_2 = $.child(div_1);
511
+ let styles_1;
512
+ var node_1 = $.child(div_2);
513
+ {
514
+ var consequent = ($$anchor2) => {
515
+ var fragment = $.comment();
516
+ var node_2 = $.first_child(fragment);
517
+ $.snippet(node_2, () => $$props.customAnnotationRenderer ?? $.noop, () => ({
518
+ annotation: $.get(childObject),
519
+ children: $$props.children,
520
+ isSelected: $$props.isSelected,
521
+ scale: $$props.scale,
522
+ rotation: $$props.rotation,
523
+ pageWidth: $$props.pageWidth,
524
+ pageHeight: $$props.pageHeight,
525
+ pageIndex: $$props.pageIndex,
526
+ onSelect: $$props.onSelect
527
+ }));
528
+ $.append($$anchor2, fragment);
529
+ };
530
+ var alternate = ($$anchor2) => {
531
+ var fragment_1 = $.comment();
532
+ var node_3 = $.first_child(fragment_1);
533
+ $.snippet(node_3, () => $$props.children, () => $.get(childObject), () => ({ appearanceActive: $.get(apActive) }));
534
+ $.append($$anchor2, fragment_1);
535
+ };
536
+ $.if(node_1, ($$render) => {
537
+ if ($$props.customAnnotationRenderer) $$render(consequent);
538
+ else $$render(alternate, false);
539
+ });
540
+ }
541
+ var node_4 = $.sibling(node_1, 2);
542
+ {
543
+ var consequent_1 = ($$anchor2) => {
544
+ {
545
+ let $0 = $.derived(() => $.get(apActive) ? "block" : "none");
546
+ AppearanceImage($$anchor2, {
547
+ get appearance() {
548
+ return $$props.appearance.normal;
549
+ },
550
+ get style() {
551
+ return `display: ${$.get($0) ?? ""};`;
552
+ }
553
+ });
554
+ }
555
+ };
556
+ $.if(node_4, ($$render) => {
557
+ var _a;
558
+ if ((_a = $$props.appearance) == null ? void 0 : _a.normal) $$render(consequent_1);
559
+ });
560
+ }
561
+ $.reset(div_2);
562
+ $.reset(div_1);
563
+ var div_3 = $.sibling(div_1, 2);
564
+ $.attribute_effect(div_3, () => ({
509
565
  class: propsClass(),
510
566
  ...restProps,
511
567
  [$.STYLE]: {
@@ -520,18 +576,18 @@ function AnnotationContainer($$anchor, $$props) {
520
576
  "transform-origin": $.get(counterRot) ? "0 0" : void 0
521
577
  }
522
578
  }));
523
- var node_1 = $.child(div_1);
579
+ var node_5 = $.child(div_3);
524
580
  {
525
- var consequent = ($$anchor2) => {
526
- var fragment = root_1$g();
527
- var div_2 = $.first_child(fragment);
528
- let styles;
529
- var div_3 = $.sibling(div_2, 2);
530
- let styles_1;
531
- var div_4 = $.sibling(div_3, 2);
581
+ var consequent_2 = ($$anchor2) => {
582
+ var fragment_3 = root_4$7();
583
+ var div_4 = $.first_child(fragment_3);
532
584
  let styles_2;
585
+ var div_5 = $.sibling(div_4, 2);
586
+ let styles_3;
587
+ var div_6 = $.sibling(div_5, 2);
588
+ let styles_4;
533
589
  $.template_effect(() => {
534
- styles = $.set_style(div_2, "", styles, {
590
+ styles_2 = $.set_style(div_4, "", styles_2, {
535
591
  position: "absolute",
536
592
  left: `${$.get(centerX) - $.get(guideLength) / 2}px`,
537
593
  top: `${$.get(centerY) ?? ""}px`,
@@ -541,7 +597,7 @@ function AnnotationContainer($$anchor, $$props) {
541
597
  opacity: "0.35",
542
598
  "pointer-events": "none"
543
599
  });
544
- styles_1 = $.set_style(div_3, "", styles_1, {
600
+ styles_3 = $.set_style(div_5, "", styles_3, {
545
601
  position: "absolute",
546
602
  left: `${$.get(centerX) ?? ""}px`,
547
603
  top: `${$.get(centerY) - $.get(guideLength) / 2}px`,
@@ -551,7 +607,7 @@ function AnnotationContainer($$anchor, $$props) {
551
607
  opacity: "0.35",
552
608
  "pointer-events": "none"
553
609
  });
554
- styles_2 = $.set_style(div_4, "", styles_2, {
610
+ styles_4 = $.set_style(div_6, "", styles_4, {
555
611
  position: "absolute",
556
612
  left: `${$.get(centerX) - $.get(guideLength) / 2}px`,
557
613
  top: `${$.get(centerY) ?? ""}px`,
@@ -564,24 +620,24 @@ function AnnotationContainer($$anchor, $$props) {
564
620
  "pointer-events": "none"
565
621
  });
566
622
  });
567
- $.append($$anchor2, fragment);
623
+ $.append($$anchor2, fragment_3);
568
624
  };
569
- $.if(node_1, ($$render) => {
570
- if ($.get(rotationActive)) $$render(consequent);
625
+ $.if(node_5, ($$render) => {
626
+ if ($.get(rotationActive)) $$render(consequent_2);
571
627
  });
572
628
  }
573
- var node_2 = $.sibling(node_1, 2);
629
+ var node_6 = $.sibling(node_5, 2);
574
630
  {
575
- var consequent_3 = ($$anchor2) => {
576
- var fragment_1 = $.comment();
577
- var node_3 = $.first_child(fragment_1);
631
+ var consequent_5 = ($$anchor2) => {
632
+ var fragment_4 = $.comment();
633
+ var node_7 = $.first_child(fragment_4);
578
634
  {
579
- var consequent_1 = ($$anchor3) => {
580
- var div_5 = root_3$5();
581
- div_5.__pointermove = (e) => {
635
+ var consequent_3 = ($$anchor3) => {
636
+ var div_7 = root_6$2();
637
+ div_7.__pointermove = (e) => {
582
638
  if (!$.get(rotationActive)) $.set(cursorScreen, { x: e.clientX, y: e.clientY }, true);
583
639
  };
584
- var node_4 = $.child(div_5);
640
+ var node_8 = $.child(div_7);
585
641
  {
586
642
  let $0 = $.derived(() => ({
587
643
  ...$.get(rotationHandle).handle,
@@ -596,34 +652,34 @@ function AnnotationContainer($$anchor, $$props) {
596
652
  style: $.get(ROTATION_BORDER_STYLE)
597
653
  }
598
654
  }));
599
- $.snippet(node_4, () => $$props.rotationUI.component, () => $.get($0));
655
+ $.snippet(node_8, () => $$props.rotationUI.component, () => $.get($0));
600
656
  }
601
- $.reset(div_5);
602
- $.event("pointerenter", div_5, () => $.set(isHandleHovered, true));
603
- $.event("pointerleave", div_5, () => {
657
+ $.reset(div_7);
658
+ $.event("pointerenter", div_7, () => $.set(isHandleHovered, true));
659
+ $.event("pointerleave", div_7, () => {
604
660
  $.set(isHandleHovered, false);
605
661
  $.set(cursorScreen, null);
606
662
  });
607
- $.append($$anchor3, div_5);
663
+ $.append($$anchor3, div_7);
608
664
  };
609
- var alternate = ($$anchor3) => {
610
- var div_6 = root_4$4();
611
- div_6.__pointermove = (e) => {
665
+ var alternate_1 = ($$anchor3) => {
666
+ var div_8 = root_7$1();
667
+ div_8.__pointermove = (e) => {
612
668
  if (!$.get(rotationActive)) $.set(cursorScreen, { x: e.clientX, y: e.clientY }, true);
613
669
  };
614
- var node_5 = $.child(div_6);
670
+ var node_9 = $.child(div_8);
615
671
  {
616
- var consequent_2 = ($$anchor4) => {
617
- var div_7 = root_5$4();
618
- $.template_effect(() => $.set_style(div_7, `${$.get(rotationHandle).connector.style ?? ""}; background-color: ${$.get(ROTATION_CONNECTOR_COLOR) ?? ""}; opacity: ${$.get(rotationActive) ? 0 : 1};`));
619
- $.append($$anchor4, div_7);
672
+ var consequent_4 = ($$anchor4) => {
673
+ var div_9 = root_8$1();
674
+ $.template_effect(() => $.set_style(div_9, `${$.get(rotationHandle).connector.style ?? ""}; background-color: ${$.get(ROTATION_CONNECTOR_COLOR) ?? ""}; opacity: ${$.get(rotationActive) ? 0 : 1};`));
675
+ $.append($$anchor4, div_9);
620
676
  };
621
- $.if(node_5, ($$render) => {
622
- if ($.get(SHOW_CONNECTOR)) $$render(consequent_2);
677
+ $.if(node_9, ($$render) => {
678
+ if ($.get(SHOW_CONNECTOR)) $$render(consequent_4);
623
679
  });
624
680
  }
625
- var div_8 = $.sibling(node_5, 2);
626
- $.attribute_effect(div_8, () => ({
681
+ var div_10 = $.sibling(node_9, 2);
682
+ $.attribute_effect(div_10, () => ({
627
683
  ...{
628
684
  onpointerdown: $.get(rotationHandle).handle.onpointerdown,
629
685
  onpointermove: $.get(rotationHandle).handle.onpointermove,
@@ -632,9 +688,9 @@ function AnnotationContainer($$anchor, $$props) {
632
688
  },
633
689
  style: `${$.get(rotationHandle).handle.style ?? ""}; background-color: ${$.get(ROTATION_COLOR) ?? ""}; border: ${$.get(ROTATION_BORDER_WIDTH) ?? ""}px ${$.get(ROTATION_BORDER_STYLE) ?? ""} ${$.get(ROTATION_BORDER_COLOR) ?? ""}; box-sizing: border-box; display: flex; align-items: center; justify-content: center; pointer-events: auto; opacity: ${$.get(rotationActive) ? 0 : 1};`
634
690
  }));
635
- var svg = $.child(div_8);
691
+ var svg = $.child(div_10);
692
+ $.reset(div_10);
636
693
  $.reset(div_8);
637
- $.reset(div_6);
638
694
  $.template_effect(
639
695
  ($0, $1) => {
640
696
  $.set_attribute(svg, "width", $0);
@@ -646,27 +702,27 @@ function AnnotationContainer($$anchor, $$props) {
646
702
  () => Math.round($.get(ROTATION_SIZE) * 0.6)
647
703
  ]
648
704
  );
649
- $.event("pointerenter", div_6, () => $.set(isHandleHovered, true));
650
- $.event("pointerleave", div_6, () => {
705
+ $.event("pointerenter", div_8, () => $.set(isHandleHovered, true));
706
+ $.event("pointerleave", div_8, () => {
651
707
  $.set(isHandleHovered, false);
652
708
  $.set(cursorScreen, null);
653
709
  });
654
- $.append($$anchor3, div_6);
710
+ $.append($$anchor3, div_8);
655
711
  };
656
- $.if(node_3, ($$render) => {
712
+ $.if(node_7, ($$render) => {
657
713
  var _a;
658
- if ((_a = $$props.rotationUI) == null ? void 0 : _a.component) $$render(consequent_1);
659
- else $$render(alternate, false);
714
+ if ((_a = $$props.rotationUI) == null ? void 0 : _a.component) $$render(consequent_3);
715
+ else $$render(alternate_1, false);
660
716
  });
661
717
  }
662
- $.append($$anchor2, fragment_1);
718
+ $.append($$anchor2, fragment_4);
663
719
  };
664
- $.if(node_2, ($$render) => {
665
- if ($$props.isSelected && $.get(effectiveIsRotatable) && $.get(rotationHandle)) $$render(consequent_3);
720
+ $.if(node_6, ($$render) => {
721
+ if ($$props.isSelected && $.get(effectiveIsRotatable) && $.get(rotationHandle)) $$render(consequent_5);
666
722
  });
667
723
  }
668
- var div_9 = $.sibling(node_2, 2);
669
- $.attribute_effect(div_9, () => ({
724
+ var div_11 = $.sibling(node_6, 2);
725
+ $.attribute_effect(div_11, () => ({
670
726
  ...$.get(effectiveIsDraggable) && $$props.isSelected ? interactionHandles.dragProps : {},
671
727
  [$.STYLE]: {
672
728
  position: "absolute",
@@ -683,56 +739,7 @@ function AnnotationContainer($$anchor, $$props) {
683
739
  cursor: $$props.isSelected && $.get(effectiveIsDraggable) ? "move" : "default"
684
740
  }
685
741
  }));
686
- var node_6 = $.child(div_9);
687
- {
688
- var consequent_4 = ($$anchor2) => {
689
- var fragment_2 = $.comment();
690
- var node_7 = $.first_child(fragment_2);
691
- $.snippet(node_7, () => $$props.customAnnotationRenderer ?? $.noop, () => ({
692
- annotation: $.get(childObject),
693
- children: $$props.children,
694
- isSelected: $$props.isSelected,
695
- scale: $$props.scale,
696
- rotation: $$props.rotation,
697
- pageWidth: $$props.pageWidth,
698
- pageHeight: $$props.pageHeight,
699
- pageIndex: $$props.pageIndex,
700
- onSelect: $$props.onSelect
701
- }));
702
- $.append($$anchor2, fragment_2);
703
- };
704
- var alternate_1 = ($$anchor2) => {
705
- var fragment_3 = $.comment();
706
- var node_8 = $.first_child(fragment_3);
707
- $.snippet(node_8, () => $$props.children, () => $.get(childObject), () => ({ appearanceActive: $.get(apActive) }));
708
- $.append($$anchor2, fragment_3);
709
- };
710
- $.if(node_6, ($$render) => {
711
- if ($$props.customAnnotationRenderer) $$render(consequent_4);
712
- else $$render(alternate_1, false);
713
- });
714
- }
715
- var node_9 = $.sibling(node_6, 2);
716
- {
717
- var consequent_5 = ($$anchor2) => {
718
- {
719
- let $0 = $.derived(() => $.get(apActive) ? "block" : "none");
720
- AppearanceImage($$anchor2, {
721
- get appearance() {
722
- return $$props.appearance.normal;
723
- },
724
- get style() {
725
- return `display: ${$.get($0) ?? ""};`;
726
- }
727
- });
728
- }
729
- };
730
- $.if(node_9, ($$render) => {
731
- var _a;
732
- if ((_a = $$props.appearance) == null ? void 0 : _a.normal) $$render(consequent_5);
733
- });
734
- }
735
- var node_10 = $.sibling(node_9, 2);
742
+ var node_10 = $.child(div_11);
736
743
  {
737
744
  var consequent_7 = ($$anchor2) => {
738
745
  var fragment_5 = $.comment();
@@ -757,12 +764,12 @@ function AnnotationContainer($$anchor, $$props) {
757
764
  $.append($$anchor4, fragment_7);
758
765
  };
759
766
  var alternate_2 = ($$anchor4) => {
760
- var div_10 = root_12();
761
- $.attribute_effect(div_10, () => ({
767
+ var div_12 = root_12();
768
+ $.attribute_effect(div_12, () => ({
762
769
  ...hProps(),
763
770
  style: `${handleStyle() ?? ""}; background-color: ${$.get(HANDLE_COLOR) ?? ""};`
764
771
  }));
765
- $.append($$anchor4, div_10);
772
+ $.append($$anchor4, div_12);
766
773
  };
767
774
  $.if(node_12, ($$render) => {
768
775
  var _a;
@@ -803,12 +810,12 @@ function AnnotationContainer($$anchor, $$props) {
803
810
  $.append($$anchor4, fragment_10);
804
811
  };
805
812
  var alternate_3 = ($$anchor4) => {
806
- var div_11 = root_16();
807
- $.attribute_effect(div_11, () => ({
813
+ var div_13 = root_16();
814
+ $.attribute_effect(div_13, () => ({
808
815
  ...vProps(),
809
816
  style: `${vertexStyle() ?? ""}; background-color: ${$.get(VERTEX_COLOR) ?? ""};`
810
817
  }));
811
- $.append($$anchor4, div_11);
818
+ $.append($$anchor4, div_13);
812
819
  };
813
820
  $.if(node_16, ($$render) => {
814
821
  var _a;
@@ -824,13 +831,13 @@ function AnnotationContainer($$anchor, $$props) {
824
831
  if ($$props.isSelected && permissions.canModifyAnnotations && !isMultiSelected() && !$.get(rotationActive)) $$render(consequent_9);
825
832
  });
826
833
  }
827
- $.reset(div_9);
828
- $.action(div_9, ($$node, $$action_arg) => {
834
+ $.reset(div_11);
835
+ $.action(div_11, ($$node, $$action_arg) => {
829
836
  var _a;
830
837
  return (_a = doublePress) == null ? void 0 : _a($$node, $$action_arg);
831
838
  }, () => ({ onDouble: $.get(guardedOnDoubleClick) }));
832
- $.reset(div_1);
833
- var node_18 = $.sibling(div_1, 2);
839
+ $.reset(div_3);
840
+ var node_18 = $.sibling(div_3, 2);
834
841
  {
835
842
  var consequent_13 = ($$anchor2) => {
836
843
  {
@@ -916,16 +923,16 @@ function AnnotationContainer($$anchor, $$props) {
916
923
  var node_24 = $.sibling(node_18, 2);
917
924
  {
918
925
  var consequent_14 = ($$anchor2) => {
919
- var div_12 = root_23();
920
- var div_13 = $.child(div_12);
921
- let styles_3;
922
- var text = $.child(div_13);
923
- $.reset(div_13);
924
- $.reset(div_12);
925
- $.action(div_12, ($$node) => portalToBody == null ? void 0 : portalToBody($$node));
926
+ var div_14 = root_23();
927
+ var div_15 = $.child(div_14);
928
+ let styles_5;
929
+ var text = $.child(div_15);
930
+ $.reset(div_15);
931
+ $.reset(div_14);
932
+ $.action(div_14, ($$node) => portalToBody == null ? void 0 : portalToBody($$node));
926
933
  $.template_effect(
927
934
  ($0) => {
928
- styles_3 = $.set_style(div_13, "", styles_3, {
935
+ styles_5 = $.set_style(div_15, "", styles_5, {
929
936
  position: "fixed",
930
937
  left: `${$.get(cursorScreen).x + 16}px`,
931
938
  top: `${$.get(cursorScreen).y - 16}px`,
@@ -943,13 +950,37 @@ function AnnotationContainer($$anchor, $$props) {
943
950
  },
944
951
  [() => $.get(normalizedRotationDisplay).toFixed(0)]
945
952
  );
946
- $.append($$anchor2, div_12);
953
+ $.append($$anchor2, div_14);
947
954
  };
948
955
  $.if(node_24, ($$render) => {
949
956
  if (($.get(rotationActive) || $.get(isHandleHovered)) && $.get(cursorScreen)) $$render(consequent_14);
950
957
  });
951
958
  }
952
959
  $.reset(div);
960
+ $.template_effect(() => {
961
+ styles = $.set_style(div_1, $$props.style, styles, {
962
+ position: "absolute",
963
+ left: `${$.get(currentObject).rect.origin.x * $$props.scale}px`,
964
+ top: `${$.get(currentObject).rect.origin.y * $$props.scale}px`,
965
+ width: `${($.get(counterRot) ? $.get(counterRot).width : $.get(aabbWidth)) ?? ""}px`,
966
+ height: `${($.get(counterRot) ? $.get(counterRot).height : $.get(aabbHeight)) ?? ""}px`,
967
+ "pointer-events": "none",
968
+ "z-index": zIndex(),
969
+ transform: $.get(counterRot) ? $.get(counterRot).matrix : void 0,
970
+ "transform-origin": $.get(counterRot) ? "0 0" : void 0,
971
+ "mix-blend-mode": $$props.blendMode
972
+ });
973
+ styles_1 = $.set_style(div_2, "", styles_1, {
974
+ position: "absolute",
975
+ left: `${$.get(innerLeft) ?? ""}px`,
976
+ top: `${$.get(innerTop) ?? ""}px`,
977
+ width: `${$.get(innerWidth) ?? ""}px`,
978
+ height: `${$.get(innerHeight) ?? ""}px`,
979
+ transform: $.get(annotationRotation) !== 0 ? `rotate(${$.get(annotationRotation)}deg)` : void 0,
980
+ "transform-origin": $.get(innerTransformOrigin),
981
+ "pointer-events": "none"
982
+ });
983
+ });
953
984
  $.append($$anchor, div);
954
985
  $.pop();
955
986
  }
@@ -1005,13 +1036,13 @@ function getAnnotationScreenBounds(annotation, scale, rotation) {
1005
1036
  bottom: top + maxY
1006
1037
  };
1007
1038
  }
1008
- var root_2$8 = $.from_html(`<div></div> <div></div> <div></div>`, 1);
1009
- var root_4$3 = $.from_html(`<div style="display: contents;"><!></div>`);
1039
+ var root_2$a = $.from_html(`<div></div> <div></div> <div></div>`, 1);
1040
+ var root_4$6 = $.from_html(`<div style="display: contents;"><!></div>`);
1010
1041
  var root_6$1 = $.from_html(`<div></div>`);
1011
- var root_5$3 = $.from_html(`<div style="display: contents;"><!> <div><svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path></svg></div></div>`);
1042
+ var root_5$6 = $.from_html(`<div style="display: contents;"><!> <div><svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path></svg></div></div>`);
1012
1043
  var root_10 = $.from_html(`<div></div>`);
1013
1044
  var root_11$1 = $.from_html(`<div><div> </div></div>`);
1014
- var root_1$f = $.from_html(`<div data-group-selection-box="" data-no-interaction=""><div><!> <!> <div><!></div></div> <!> <!></div>`);
1045
+ var root_1$e = $.from_html(`<div data-group-selection-box="" data-no-interaction=""><div><!> <!> <div><!></div></div> <!> <!></div>`);
1015
1046
  function GroupSelectionBox($$anchor, $$props) {
1016
1047
  $.push($$props, true);
1017
1048
  let isRotatable = $.prop($$props, "isRotatable", 3, true), lockAspectRatio = $.prop($$props, "lockAspectRatio", 3, false), zIndex = $.prop($$props, "zIndex", 3, 2);
@@ -1294,13 +1325,13 @@ function GroupSelectionBox($$anchor, $$props) {
1294
1325
  var node_1 = $.first_child(fragment);
1295
1326
  {
1296
1327
  var consequent_11 = ($$anchor2) => {
1297
- var div = root_1$f();
1328
+ var div = root_1$e();
1298
1329
  var div_1 = $.child(div);
1299
1330
  let styles;
1300
1331
  var node_2 = $.child(div_1);
1301
1332
  {
1302
1333
  var consequent = ($$anchor3) => {
1303
- var fragment_1 = root_2$8();
1334
+ var fragment_1 = root_2$a();
1304
1335
  var div_2 = $.first_child(fragment_1);
1305
1336
  let styles_1;
1306
1337
  var div_3 = $.sibling(div_2, 2);
@@ -1354,7 +1385,7 @@ function GroupSelectionBox($$anchor, $$props) {
1354
1385
  var node_4 = $.first_child(fragment_2);
1355
1386
  {
1356
1387
  var consequent_1 = ($$anchor4) => {
1357
- var div_5 = root_4$3();
1388
+ var div_5 = root_4$6();
1358
1389
  div_5.__pointermove = (e) => {
1359
1390
  if (!$.get(rotationActive)) $.set(cursorScreen, { x: e.clientX, y: e.clientY }, true);
1360
1391
  };
@@ -1384,7 +1415,7 @@ function GroupSelectionBox($$anchor, $$props) {
1384
1415
  $.append($$anchor4, div_5);
1385
1416
  };
1386
1417
  var alternate = ($$anchor4) => {
1387
- var div_6 = root_5$3();
1418
+ var div_6 = root_5$6();
1388
1419
  div_6.__pointermove = (e) => {
1389
1420
  if (!$.get(rotationActive)) $.set(cursorScreen, { x: e.clientX, y: e.clientY }, true);
1390
1421
  };
@@ -1616,7 +1647,7 @@ function GroupSelectionBox($$anchor, $$props) {
1616
1647
  }
1617
1648
  };
1618
1649
  $.if(node_12, ($$render) => {
1619
- if ($.get(shouldShowMenu)) $$render(consequent_10);
1650
+ if ($.get(shouldShowMenu) && !$.get(rotationActive)) $$render(consequent_10);
1620
1651
  });
1621
1652
  }
1622
1653
  $.reset(div);
@@ -1639,7 +1670,7 @@ function GroupSelectionBox($$anchor, $$props) {
1639
1670
  $.pop();
1640
1671
  }
1641
1672
  $.delegate(["pointermove"]);
1642
- var root_1$e = $.from_svg(`<path fill="none" stroke="transparent"></path>`);
1673
+ var root_1$d = $.from_svg(`<path fill="none" stroke="transparent"></path>`);
1643
1674
  var root_3$4 = $.from_svg(`<path fill="none"></path>`);
1644
1675
  var root$d = $.from_svg(`<svg><!><!></svg>`);
1645
1676
  function Ink($$anchor, $$props) {
@@ -1664,7 +1695,7 @@ function Ink($$anchor, $$props) {
1664
1695
  let styles;
1665
1696
  var node = $.child(svg);
1666
1697
  $.each(node, 19, () => $.get(paths), (d, i) => `hit-${i}`, ($$anchor2, d) => {
1667
- var path = root_1$e();
1698
+ var path = root_1$d();
1668
1699
  path.__pointerdown = function(...$$args) {
1669
1700
  var _a;
1670
1701
  (_a = $$props.onClick) == null ? void 0 : _a.apply(this, $$args);
@@ -1736,12 +1767,16 @@ function InkRenderer($$anchor, $$props) {
1736
1767
  }
1737
1768
  }));
1738
1769
  }
1739
- var root_1$d = $.from_svg(`<rect></rect>`);
1740
- var root$c = $.from_svg(`<svg overflow="visible"><rect fill="transparent" stroke="transparent"></rect><!></svg>`);
1770
+ var root_1$c = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
1771
+ var root_2$9 = $.from_svg(`<rect fill="transparent" stroke="transparent"></rect>`);
1772
+ var root_4$5 = $.from_svg(`<path stroke-linejoin="round"></path>`);
1773
+ var root_5$5 = $.from_svg(`<rect></rect>`);
1774
+ var root$c = $.from_svg(`<svg overflow="visible"><!><!></svg>`);
1741
1775
  function Square($$anchor, $$props) {
1742
1776
  $.push($$props, true);
1743
1777
  const MIN_HIT_AREA_SCREEN_PX = 20;
1744
1778
  let color = $.prop($$props, "color", 3, "#000000"), opacity = $.prop($$props, "opacity", 3, 1), strokeStyle = $.prop($$props, "strokeStyle", 19, () => PdfAnnotationBorderStyle.SOLID), appearanceActive = $.prop($$props, "appearanceActive", 3, false);
1779
+ const isCloudy = $.derived(() => ($$props.cloudyBorderIntensity ?? 0) > 0);
1745
1780
  const $$d = $.derived(() => {
1746
1781
  const outerW = $$props.rect.size.width;
1747
1782
  const outerH = $$props.rect.size.height;
@@ -1754,6 +1789,20 @@ function Square($$anchor, $$props) {
1754
1789
  y: $$props.strokeWidth / 2
1755
1790
  };
1756
1791
  }), width = $.derived(() => $.get($$d).width), height = $.derived(() => $.get($$d).height), x = $.derived(() => $.get($$d).x), y = $.derived(() => $.get($$d).y);
1792
+ const cloudyPath = $.derived(() => {
1793
+ if (!$.get(isCloudy)) return null;
1794
+ return generateCloudyRectanglePath(
1795
+ {
1796
+ x: 0,
1797
+ y: 0,
1798
+ width: $$props.rect.size.width,
1799
+ height: $$props.rect.size.height
1800
+ },
1801
+ $$props.rectangleDifferences,
1802
+ $$props.cloudyBorderIntensity,
1803
+ $$props.strokeWidth
1804
+ );
1805
+ });
1757
1806
  const svgWidth = $.derived(() => ($.get(width) + $$props.strokeWidth) * $$props.scale);
1758
1807
  const svgHeight = $.derived(() => ($.get(height) + $$props.strokeWidth) * $$props.scale);
1759
1808
  const hitStrokeWidth = $.derived(() => Math.max($$props.strokeWidth, MIN_HIT_AREA_SCREEN_PX / $$props.scale));
@@ -1763,35 +1812,99 @@ function Square($$anchor, $$props) {
1763
1812
  });
1764
1813
  var svg = root$c();
1765
1814
  let styles;
1766
- var rect_1 = $.child(svg);
1767
- rect_1.__pointerdown = function(...$$args) {
1768
- var _a;
1769
- (_a = $$props.onClick) == null ? void 0 : _a.apply(this, $$args);
1770
- };
1771
- let styles_1;
1772
- var node = $.sibling(rect_1);
1815
+ var node = $.child(svg);
1773
1816
  {
1774
1817
  var consequent = ($$anchor2) => {
1775
- var rect_2 = root_1$d();
1818
+ var path = root_1$c();
1819
+ path.__pointerdown = function(...$$args) {
1820
+ var _a;
1821
+ (_a = $$props.onClick) == null ? void 0 : _a.apply(this, $$args);
1822
+ };
1823
+ let styles_1;
1824
+ $.template_effect(() => {
1825
+ $.set_attribute(path, "d", $.get(cloudyPath).path);
1826
+ $.set_attribute(path, "stroke-width", $.get(hitStrokeWidth));
1827
+ styles_1 = $.set_style(path, "", styles_1, {
1828
+ cursor: $$props.isSelected ? "move" : "pointer",
1829
+ "pointer-events": $$props.isSelected ? "none" : color() === "transparent" ? "visibleStroke" : "visible"
1830
+ });
1831
+ });
1832
+ $.append($$anchor2, path);
1833
+ };
1834
+ var alternate = ($$anchor2) => {
1835
+ var rect_1 = root_2$9();
1836
+ rect_1.__pointerdown = function(...$$args) {
1837
+ var _a;
1838
+ (_a = $$props.onClick) == null ? void 0 : _a.apply(this, $$args);
1839
+ };
1776
1840
  let styles_2;
1777
1841
  $.template_effect(() => {
1778
- $.set_attribute(rect_2, "x", $.get(x));
1779
- $.set_attribute(rect_2, "y", $.get(y));
1780
- $.set_attribute(rect_2, "width", $.get(width));
1781
- $.set_attribute(rect_2, "height", $.get(height));
1782
- $.set_attribute(rect_2, "fill", color());
1783
- $.set_attribute(rect_2, "opacity", opacity());
1784
- styles_2 = $.set_style(rect_2, "", styles_2, {
1785
- "pointer-events": "none",
1786
- stroke: $$props.strokeColor ?? color(),
1787
- "stroke-width": $$props.strokeWidth,
1788
- "stroke-dasharray": $.get(dash)
1842
+ $.set_attribute(rect_1, "x", $.get(x));
1843
+ $.set_attribute(rect_1, "y", $.get(y));
1844
+ $.set_attribute(rect_1, "width", $.get(width));
1845
+ $.set_attribute(rect_1, "height", $.get(height));
1846
+ $.set_attribute(rect_1, "stroke-width", $.get(hitStrokeWidth));
1847
+ styles_2 = $.set_style(rect_1, "", styles_2, {
1848
+ cursor: $$props.isSelected ? "move" : "pointer",
1849
+ "pointer-events": $$props.isSelected ? "none" : color() === "transparent" ? "visibleStroke" : "visible"
1789
1850
  });
1790
1851
  });
1791
- $.append($$anchor2, rect_2);
1852
+ $.append($$anchor2, rect_1);
1792
1853
  };
1793
1854
  $.if(node, ($$render) => {
1794
- if (!appearanceActive()) $$render(consequent);
1855
+ if ($.get(isCloudy) && $.get(cloudyPath)) $$render(consequent);
1856
+ else $$render(alternate, false);
1857
+ });
1858
+ }
1859
+ var node_1 = $.sibling(node);
1860
+ {
1861
+ var consequent_2 = ($$anchor2) => {
1862
+ var fragment = $.comment();
1863
+ var node_2 = $.first_child(fragment);
1864
+ {
1865
+ var consequent_1 = ($$anchor3) => {
1866
+ var path_1 = root_4$5();
1867
+ let styles_3;
1868
+ $.template_effect(() => {
1869
+ $.set_attribute(path_1, "d", $.get(cloudyPath).path);
1870
+ $.set_attribute(path_1, "fill", color());
1871
+ $.set_attribute(path_1, "opacity", opacity());
1872
+ styles_3 = $.set_style(path_1, "", styles_3, {
1873
+ "pointer-events": "none",
1874
+ stroke: $$props.strokeColor ?? color(),
1875
+ "stroke-width": $$props.strokeWidth
1876
+ });
1877
+ });
1878
+ $.append($$anchor3, path_1);
1879
+ };
1880
+ var alternate_1 = ($$anchor3) => {
1881
+ var rect_2 = root_5$5();
1882
+ let styles_4;
1883
+ $.template_effect(() => {
1884
+ $.set_attribute(rect_2, "x", $.get(x));
1885
+ $.set_attribute(rect_2, "y", $.get(y));
1886
+ $.set_attribute(rect_2, "width", $.get(width));
1887
+ $.set_attribute(rect_2, "height", $.get(height));
1888
+ $.set_attribute(rect_2, "fill", color());
1889
+ $.set_attribute(rect_2, "opacity", opacity());
1890
+ styles_4 = $.set_style(rect_2, "", styles_4, {
1891
+ "pointer-events": "none",
1892
+ stroke: $$props.strokeColor ?? color(),
1893
+ "stroke-width": $$props.strokeWidth,
1894
+ "stroke-dasharray": $.get(dash)
1895
+ });
1896
+ });
1897
+ $.append($$anchor3, rect_2);
1898
+ };
1899
+ $.if(node_2, ($$render) => {
1900
+ if ($.get(isCloudy) && $.get(cloudyPath)) $$render(consequent_1);
1901
+ else $$render(alternate_1, false);
1902
+ });
1903
+ }
1904
+ $.append($$anchor2, fragment);
1905
+ };
1906
+ $.if(node_1, ($$render) => {
1907
+ if (!appearanceActive()) $$render(consequent_2);
1795
1908
  });
1796
1909
  }
1797
1910
  $.reset(svg);
@@ -1803,15 +1916,6 @@ function Square($$anchor, $$props) {
1803
1916
  $.set_attribute(svg, "width", $.get(svgWidth));
1804
1917
  $.set_attribute(svg, "height", $.get(svgHeight));
1805
1918
  $.set_attribute(svg, "viewBox", `0 0 ${$.get(width) + $$props.strokeWidth} ${$.get(height) + $$props.strokeWidth}`);
1806
- $.set_attribute(rect_1, "x", $.get(x));
1807
- $.set_attribute(rect_1, "y", $.get(y));
1808
- $.set_attribute(rect_1, "width", $.get(width));
1809
- $.set_attribute(rect_1, "height", $.get(height));
1810
- $.set_attribute(rect_1, "stroke-width", $.get(hitStrokeWidth));
1811
- styles_1 = $.set_style(rect_1, "", styles_1, {
1812
- cursor: $$props.isSelected ? "move" : "pointer",
1813
- "pointer-events": $$props.isSelected ? "none" : color() === "transparent" ? "visibleStroke" : "visible"
1814
- });
1815
1919
  });
1816
1920
  $.append($$anchor, svg);
1817
1921
  $.pop();
@@ -1833,12 +1937,16 @@ function SquareRenderer($$anchor, $$props) {
1833
1937
  }
1834
1938
  }));
1835
1939
  }
1836
- var root_1$c = $.from_svg(`<ellipse></ellipse>`);
1837
- var root$b = $.from_svg(`<svg overflow="visible"><ellipse fill="transparent" stroke="transparent"></ellipse><!></svg>`);
1940
+ var root_1$b = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
1941
+ var root_2$8 = $.from_svg(`<ellipse fill="transparent" stroke="transparent"></ellipse>`);
1942
+ var root_4$4 = $.from_svg(`<path stroke-linejoin="round"></path>`);
1943
+ var root_5$4 = $.from_svg(`<ellipse></ellipse>`);
1944
+ var root$b = $.from_svg(`<svg overflow="visible"><!><!></svg>`);
1838
1945
  function Circle($$anchor, $$props) {
1839
1946
  $.push($$props, true);
1840
1947
  const MIN_HIT_AREA_SCREEN_PX = 20;
1841
1948
  let color = $.prop($$props, "color", 3, "#000000"), opacity = $.prop($$props, "opacity", 3, 1), strokeStyle = $.prop($$props, "strokeStyle", 19, () => PdfAnnotationBorderStyle.SOLID), appearanceActive = $.prop($$props, "appearanceActive", 3, false);
1949
+ const isCloudy = $.derived(() => ($$props.cloudyBorderIntensity ?? 0) > 0);
1842
1950
  const $$d = $.derived(() => {
1843
1951
  const outerW = $$props.rect.size.width;
1844
1952
  const outerH = $$props.rect.size.height;
@@ -1853,46 +1961,117 @@ function Circle($$anchor, $$props) {
1853
1961
  ry: innerH / 2
1854
1962
  };
1855
1963
  }), width = $.derived(() => $.get($$d).width), height = $.derived(() => $.get($$d).height), cx = $.derived(() => $.get($$d).cx), cy = $.derived(() => $.get($$d).cy), rx = $.derived(() => $.get($$d).rx), ry = $.derived(() => $.get($$d).ry);
1964
+ const cloudyPath = $.derived(() => {
1965
+ if (!$.get(isCloudy)) return null;
1966
+ return generateCloudyEllipsePath(
1967
+ {
1968
+ x: 0,
1969
+ y: 0,
1970
+ width: $$props.rect.size.width,
1971
+ height: $$props.rect.size.height
1972
+ },
1973
+ $$props.rectangleDifferences,
1974
+ $$props.cloudyBorderIntensity,
1975
+ $$props.strokeWidth
1976
+ );
1977
+ });
1856
1978
  let svgWidth = $.derived(() => $.get(width) * $$props.scale);
1857
1979
  let svgHeight = $.derived(() => $.get(height) * $$props.scale);
1858
1980
  let hitStrokeWidth = $.derived(() => Math.max($$props.strokeWidth, MIN_HIT_AREA_SCREEN_PX / $$props.scale));
1859
1981
  let peValue = $.derived(() => $$props.isSelected ? "none" : color() === "transparent" ? "visibleStroke" : "visible");
1860
1982
  var svg = root$b();
1861
1983
  let styles;
1862
- var ellipse = $.child(svg);
1863
- ellipse.__pointerdown = (e) => {
1864
- var _a;
1865
- return (_a = $$props.onClick) == null ? void 0 : _a.call($$props, e);
1866
- };
1867
- let styles_1;
1868
- var node = $.sibling(ellipse);
1984
+ var node = $.child(svg);
1869
1985
  {
1870
1986
  var consequent = ($$anchor2) => {
1871
- var ellipse_1 = root_1$c();
1872
- $.set_style(ellipse_1, "", {}, { "pointer-events": "none" });
1873
- $.template_effect(
1874
- ($0) => {
1875
- $.set_attribute(ellipse_1, "cx", $.get(cx));
1876
- $.set_attribute(ellipse_1, "cy", $.get(cy));
1877
- $.set_attribute(ellipse_1, "rx", $.get(rx));
1878
- $.set_attribute(ellipse_1, "ry", $.get(ry));
1879
- $.set_attribute(ellipse_1, "fill", color());
1880
- $.set_attribute(ellipse_1, "opacity", opacity());
1881
- $.set_attribute(ellipse_1, "stroke", $$props.strokeColor ?? color());
1882
- $.set_attribute(ellipse_1, "stroke-width", $$props.strokeWidth);
1883
- $.set_attribute(ellipse_1, "stroke-dasharray", $0);
1884
- },
1885
- [
1886
- () => {
1887
- var _a;
1888
- return strokeStyle() === PdfAnnotationBorderStyle.DASHED ? (_a = $$props.strokeDashArray) == null ? void 0 : _a.join(",") : void 0;
1889
- }
1890
- ]
1891
- );
1892
- $.append($$anchor2, ellipse_1);
1987
+ var path = root_1$b();
1988
+ path.__pointerdown = (e) => {
1989
+ var _a;
1990
+ return (_a = $$props.onClick) == null ? void 0 : _a.call($$props, e);
1991
+ };
1992
+ let styles_1;
1993
+ $.template_effect(() => {
1994
+ $.set_attribute(path, "d", $.get(cloudyPath).path);
1995
+ $.set_attribute(path, "stroke-width", $.get(hitStrokeWidth));
1996
+ $.set_attribute(path, "pointer-events", $.get(peValue));
1997
+ styles_1 = $.set_style(path, "", styles_1, { cursor: $$props.isSelected ? "move" : "pointer" });
1998
+ });
1999
+ $.append($$anchor2, path);
2000
+ };
2001
+ var alternate = ($$anchor2) => {
2002
+ var ellipse = root_2$8();
2003
+ ellipse.__pointerdown = (e) => {
2004
+ var _a;
2005
+ return (_a = $$props.onClick) == null ? void 0 : _a.call($$props, e);
2006
+ };
2007
+ let styles_2;
2008
+ $.template_effect(() => {
2009
+ $.set_attribute(ellipse, "cx", $.get(cx));
2010
+ $.set_attribute(ellipse, "cy", $.get(cy));
2011
+ $.set_attribute(ellipse, "rx", $.get(rx));
2012
+ $.set_attribute(ellipse, "ry", $.get(ry));
2013
+ $.set_attribute(ellipse, "stroke-width", $.get(hitStrokeWidth));
2014
+ $.set_attribute(ellipse, "pointer-events", $.get(peValue));
2015
+ styles_2 = $.set_style(ellipse, "", styles_2, { cursor: $$props.isSelected ? "move" : "pointer" });
2016
+ });
2017
+ $.append($$anchor2, ellipse);
1893
2018
  };
1894
2019
  $.if(node, ($$render) => {
1895
- if (!appearanceActive()) $$render(consequent);
2020
+ if ($.get(isCloudy) && $.get(cloudyPath)) $$render(consequent);
2021
+ else $$render(alternate, false);
2022
+ });
2023
+ }
2024
+ var node_1 = $.sibling(node);
2025
+ {
2026
+ var consequent_2 = ($$anchor2) => {
2027
+ var fragment = $.comment();
2028
+ var node_2 = $.first_child(fragment);
2029
+ {
2030
+ var consequent_1 = ($$anchor3) => {
2031
+ var path_1 = root_4$4();
2032
+ $.set_style(path_1, "", {}, { "pointer-events": "none" });
2033
+ $.template_effect(() => {
2034
+ $.set_attribute(path_1, "d", $.get(cloudyPath).path);
2035
+ $.set_attribute(path_1, "fill", color());
2036
+ $.set_attribute(path_1, "opacity", opacity());
2037
+ $.set_attribute(path_1, "stroke", $$props.strokeColor ?? color());
2038
+ $.set_attribute(path_1, "stroke-width", $$props.strokeWidth);
2039
+ });
2040
+ $.append($$anchor3, path_1);
2041
+ };
2042
+ var alternate_1 = ($$anchor3) => {
2043
+ var ellipse_1 = root_5$4();
2044
+ $.set_style(ellipse_1, "", {}, { "pointer-events": "none" });
2045
+ $.template_effect(
2046
+ ($0) => {
2047
+ $.set_attribute(ellipse_1, "cx", $.get(cx));
2048
+ $.set_attribute(ellipse_1, "cy", $.get(cy));
2049
+ $.set_attribute(ellipse_1, "rx", $.get(rx));
2050
+ $.set_attribute(ellipse_1, "ry", $.get(ry));
2051
+ $.set_attribute(ellipse_1, "fill", color());
2052
+ $.set_attribute(ellipse_1, "opacity", opacity());
2053
+ $.set_attribute(ellipse_1, "stroke", $$props.strokeColor ?? color());
2054
+ $.set_attribute(ellipse_1, "stroke-width", $$props.strokeWidth);
2055
+ $.set_attribute(ellipse_1, "stroke-dasharray", $0);
2056
+ },
2057
+ [
2058
+ () => {
2059
+ var _a;
2060
+ return strokeStyle() === PdfAnnotationBorderStyle.DASHED ? (_a = $$props.strokeDashArray) == null ? void 0 : _a.join(",") : void 0;
2061
+ }
2062
+ ]
2063
+ );
2064
+ $.append($$anchor3, ellipse_1);
2065
+ };
2066
+ $.if(node_2, ($$render) => {
2067
+ if ($.get(isCloudy) && $.get(cloudyPath)) $$render(consequent_1);
2068
+ else $$render(alternate_1, false);
2069
+ });
2070
+ }
2071
+ $.append($$anchor2, fragment);
2072
+ };
2073
+ $.if(node_1, ($$render) => {
2074
+ if (!appearanceActive()) $$render(consequent_2);
1896
2075
  });
1897
2076
  }
1898
2077
  $.reset(svg);
@@ -1907,13 +2086,6 @@ function Circle($$anchor, $$props) {
1907
2086
  "pointer-events": "none",
1908
2087
  "z-index": "2"
1909
2088
  });
1910
- $.set_attribute(ellipse, "cx", $.get(cx));
1911
- $.set_attribute(ellipse, "cy", $.get(cy));
1912
- $.set_attribute(ellipse, "rx", $.get(rx));
1913
- $.set_attribute(ellipse, "ry", $.get(ry));
1914
- $.set_attribute(ellipse, "stroke-width", $.get(hitStrokeWidth));
1915
- $.set_attribute(ellipse, "pointer-events", $.get(peValue));
1916
- styles_1 = $.set_style(ellipse, "", styles_1, { cursor: $$props.isSelected ? "move" : "pointer" });
1917
2089
  });
1918
2090
  $.append($$anchor, svg);
1919
2091
  $.pop();
@@ -1935,10 +2107,10 @@ function CircleRenderer($$anchor, $$props) {
1935
2107
  }
1936
2108
  }));
1937
2109
  }
1938
- var root_1$b = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
2110
+ var root_1$a = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
1939
2111
  var root_2$7 = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
1940
- var root_4$2 = $.from_svg(`<path></path>`);
1941
- var root_5$2 = $.from_svg(`<path></path>`);
2112
+ var root_4$3 = $.from_svg(`<path></path>`);
2113
+ var root_5$3 = $.from_svg(`<path></path>`);
1942
2114
  var root_3$3 = $.from_svg(`<line></line><!><!>`, 1);
1943
2115
  var root$a = $.from_svg(`<svg><line stroke="transparent"></line><!><!><!></svg>`);
1944
2116
  function Line($$anchor, $$props) {
@@ -1975,7 +2147,7 @@ function Line($$anchor, $$props) {
1975
2147
  var node = $.sibling(line);
1976
2148
  {
1977
2149
  var consequent = ($$anchor2) => {
1978
- var path = root_1$b();
2150
+ var path = root_1$a();
1979
2151
  path.__pointerdown = function(...$$args) {
1980
2152
  var _a;
1981
2153
  (_a = $$props.onClick) == null ? void 0 : _a.apply(this, $$args);
@@ -2031,7 +2203,7 @@ function Line($$anchor, $$props) {
2031
2203
  var node_3 = $.sibling(line_1);
2032
2204
  {
2033
2205
  var consequent_2 = ($$anchor3) => {
2034
- var path_2 = root_4$2();
2206
+ var path_2 = root_4$3();
2035
2207
  let styles_5;
2036
2208
  $.template_effect(() => {
2037
2209
  $.set_attribute(path_2, "d", $.get(endings).start.d);
@@ -2054,7 +2226,7 @@ function Line($$anchor, $$props) {
2054
2226
  var node_4 = $.sibling(node_3);
2055
2227
  {
2056
2228
  var consequent_3 = ($$anchor3) => {
2057
- var path_3 = root_5$2();
2229
+ var path_3 = root_5$3();
2058
2230
  let styles_6;
2059
2231
  $.template_effect(() => {
2060
2232
  $.set_attribute(path_3, "d", $.get(endings).end.d);
@@ -2131,10 +2303,10 @@ function LineRenderer($$anchor, $$props) {
2131
2303
  }
2132
2304
  }));
2133
2305
  }
2134
- var root_1$a = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
2306
+ var root_1$9 = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
2135
2307
  var root_2$6 = $.from_svg(`<path fill="transparent" stroke="transparent"></path>`);
2136
- var root_4$1 = $.from_svg(`<path></path>`);
2137
- var root_5$1 = $.from_svg(`<path></path>`);
2308
+ var root_4$2 = $.from_svg(`<path></path>`);
2309
+ var root_5$2 = $.from_svg(`<path></path>`);
2138
2310
  var root_3$2 = $.from_svg(`<path></path><!><!>`, 1);
2139
2311
  var root$9 = $.from_svg(`<svg><path fill="none" stroke="transparent"></path><!><!><!></svg>`);
2140
2312
  function Polyline($$anchor, $$props) {
@@ -2175,7 +2347,7 @@ function Polyline($$anchor, $$props) {
2175
2347
  var node = $.sibling(path);
2176
2348
  {
2177
2349
  var consequent = ($$anchor2) => {
2178
- var path_1 = root_1$a();
2350
+ var path_1 = root_1$9();
2179
2351
  path_1.__pointerdown = function(...$$args) {
2180
2352
  var _a;
2181
2353
  (_a = $$props.onClick) == null ? void 0 : _a.apply(this, $$args);
@@ -2231,7 +2403,7 @@ function Polyline($$anchor, $$props) {
2231
2403
  var node_3 = $.sibling(path_3);
2232
2404
  {
2233
2405
  var consequent_2 = ($$anchor3) => {
2234
- var path_4 = root_4$1();
2406
+ var path_4 = root_4$2();
2235
2407
  let styles_5;
2236
2408
  $.template_effect(() => {
2237
2409
  $.set_attribute(path_4, "d", $.get(endings).start.d);
@@ -2254,7 +2426,7 @@ function Polyline($$anchor, $$props) {
2254
2426
  var node_4 = $.sibling(node_3);
2255
2427
  {
2256
2428
  var consequent_3 = ($$anchor3) => {
2257
- var path_5 = root_5$1();
2429
+ var path_5 = root_5$2();
2258
2430
  let styles_6;
2259
2431
  $.template_effect(() => {
2260
2432
  $.set_attribute(path_5, "d", $.get(endings).end.d);
@@ -2328,14 +2500,16 @@ function PolylineRenderer($$anchor, $$props) {
2328
2500
  }
2329
2501
  }));
2330
2502
  }
2331
- var root_2$5 = $.from_svg(`<path fill="none"></path>`);
2332
- var root_3$1 = $.from_svg(`<rect></rect>`);
2333
- var root_1$9 = $.from_svg(`<path></path><!><!>`, 1);
2503
+ var root_2$5 = $.from_svg(`<path></path>`);
2504
+ var root_4$1 = $.from_svg(`<path fill="none"></path>`);
2505
+ var root_5$1 = $.from_svg(`<rect></rect>`);
2506
+ var root_3$1 = $.from_svg(`<path></path><!><!>`, 1);
2334
2507
  var root$8 = $.from_svg(`<svg><path fill="transparent" stroke="transparent"></path><!></svg>`);
2335
2508
  function Polygon($$anchor, $$props) {
2336
2509
  $.push($$props, true);
2337
2510
  const MIN_HIT_AREA_SCREEN_PX = 20;
2338
2511
  let color = $.prop($$props, "color", 3, "transparent"), strokeColor = $.prop($$props, "strokeColor", 3, "#000000"), opacity = $.prop($$props, "opacity", 3, 1), strokeStyle = $.prop($$props, "strokeStyle", 19, () => PdfAnnotationBorderStyle.SOLID), handleSize = $.prop($$props, "handleSize", 3, 14), appearanceActive = $.prop($$props, "appearanceActive", 3, false);
2512
+ const isCloudy = $.derived(() => ($$props.cloudyBorderIntensity ?? 0) > 0);
2339
2513
  const allPoints = $.derived(() => $$props.currentVertex ? [...$$props.vertices, $$props.currentVertex] : $$props.vertices);
2340
2514
  const localPts = $.derived(() => $.get(allPoints).map(({ x, y }) => ({ x: x - $$props.rect.origin.x, y: y - $$props.rect.origin.y })));
2341
2515
  const pathData = $.derived(() => {
@@ -2344,6 +2518,10 @@ function Polygon($$anchor, $$props) {
2344
2518
  const isPreview = !!$$props.currentVertex;
2345
2519
  return (`M ${first.x} ${first.y} ` + rest.map((p) => `L ${p.x} ${p.y}`).join(" ") + (isPreview ? "" : " Z")).trim();
2346
2520
  });
2521
+ const cloudyPath = $.derived(() => {
2522
+ if (!$.get(isCloudy) || $.get(allPoints).length < 3) return null;
2523
+ return generateCloudyPolygonPath($.get(allPoints), $$props.rect.origin, $$props.cloudyBorderIntensity, $$props.strokeWidth);
2524
+ });
2347
2525
  const isPreviewing = $.derived(() => !!$$props.currentVertex && $$props.vertices.length > 0);
2348
2526
  const width = $.derived(() => $$props.rect.size.width * $$props.scale);
2349
2527
  const height = $.derived(() => $$props.rect.size.height * $$props.scale);
@@ -2362,69 +2540,96 @@ function Polygon($$anchor, $$props) {
2362
2540
  let styles_1;
2363
2541
  var node = $.sibling(path);
2364
2542
  {
2365
- var consequent_2 = ($$anchor2) => {
2366
- var fragment = root_1$9();
2367
- var path_1 = $.first_child(fragment);
2368
- let styles_2;
2369
- var node_1 = $.sibling(path_1);
2543
+ var consequent_3 = ($$anchor2) => {
2544
+ var fragment = $.comment();
2545
+ var node_1 = $.first_child(fragment);
2370
2546
  {
2371
2547
  var consequent = ($$anchor3) => {
2372
- var path_2 = root_2$5();
2373
- let styles_3;
2548
+ var path_1 = root_2$5();
2549
+ let styles_2;
2374
2550
  $.template_effect(() => {
2375
- $.set_attribute(path_2, "d", `M ${$.get(localPts)[$.get(localPts).length - 1].x} ${$.get(localPts)[$.get(localPts).length - 1].y} L ${$.get(localPts)[0].x} ${$.get(localPts)[0].y}`);
2376
- styles_3 = $.set_style(path_2, "", styles_3, {
2377
- stroke: strokeColor(),
2551
+ $.set_attribute(path_1, "d", $.get(cloudyPath).path);
2552
+ $.set_attribute(path_1, "opacity", opacity());
2553
+ styles_2 = $.set_style(path_1, "", styles_2, {
2554
+ fill: color(),
2555
+ stroke: strokeColor() ?? color(),
2378
2556
  "stroke-width": $$props.strokeWidth,
2379
- "stroke-dasharray": "4,4",
2380
- opacity: 0.7,
2381
- "pointer-events": "none"
2557
+ "pointer-events": "none",
2558
+ "stroke-linejoin": "round"
2382
2559
  });
2383
2560
  });
2384
- $.append($$anchor3, path_2);
2561
+ $.append($$anchor3, path_1);
2385
2562
  };
2386
- $.if(node_1, ($$render) => {
2387
- if ($.get(isPreviewing) && $$props.vertices.length > 1) $$render(consequent);
2388
- });
2389
- }
2390
- var node_2 = $.sibling(node_1);
2391
- {
2392
- var consequent_1 = ($$anchor3) => {
2393
- var rect_1 = root_3$1();
2394
- $.set_attribute(rect_1, "opacity", 0.4);
2395
- $.set_style(rect_1, "", {}, { "pointer-events": "none" });
2563
+ var alternate = ($$anchor3) => {
2564
+ var fragment_1 = root_3$1();
2565
+ var path_2 = $.first_child(fragment_1);
2566
+ let styles_3;
2567
+ var node_2 = $.sibling(path_2);
2568
+ {
2569
+ var consequent_1 = ($$anchor4) => {
2570
+ var path_3 = root_4$1();
2571
+ let styles_4;
2572
+ $.template_effect(() => {
2573
+ $.set_attribute(path_3, "d", `M ${$.get(localPts)[$.get(localPts).length - 1].x} ${$.get(localPts)[$.get(localPts).length - 1].y} L ${$.get(localPts)[0].x} ${$.get(localPts)[0].y}`);
2574
+ styles_4 = $.set_style(path_3, "", styles_4, {
2575
+ stroke: strokeColor(),
2576
+ "stroke-width": $$props.strokeWidth,
2577
+ "stroke-dasharray": "4,4",
2578
+ opacity: 0.7,
2579
+ "pointer-events": "none"
2580
+ });
2581
+ });
2582
+ $.append($$anchor4, path_3);
2583
+ };
2584
+ $.if(node_2, ($$render) => {
2585
+ if ($.get(isPreviewing) && $$props.vertices.length > 1) $$render(consequent_1);
2586
+ });
2587
+ }
2588
+ var node_3 = $.sibling(node_2);
2589
+ {
2590
+ var consequent_2 = ($$anchor4) => {
2591
+ var rect_1 = root_5$1();
2592
+ $.set_attribute(rect_1, "opacity", 0.4);
2593
+ $.set_style(rect_1, "", {}, { "pointer-events": "none" });
2594
+ $.template_effect(() => {
2595
+ $.set_attribute(rect_1, "x", $.get(localPts)[0].x - handleSize() / $$props.scale / 2);
2596
+ $.set_attribute(rect_1, "y", $.get(localPts)[0].y - handleSize() / $$props.scale / 2);
2597
+ $.set_attribute(rect_1, "width", handleSize() / $$props.scale);
2598
+ $.set_attribute(rect_1, "height", handleSize() / $$props.scale);
2599
+ $.set_attribute(rect_1, "fill", strokeColor());
2600
+ $.set_attribute(rect_1, "stroke", strokeColor());
2601
+ $.set_attribute(rect_1, "stroke-width", $$props.strokeWidth / 2);
2602
+ });
2603
+ $.append($$anchor4, rect_1);
2604
+ };
2605
+ $.if(node_3, ($$render) => {
2606
+ if ($.get(isPreviewing) && $$props.vertices.length >= 2) $$render(consequent_2);
2607
+ });
2608
+ }
2396
2609
  $.template_effect(() => {
2397
- $.set_attribute(rect_1, "x", $.get(localPts)[0].x - handleSize() / $$props.scale / 2);
2398
- $.set_attribute(rect_1, "y", $.get(localPts)[0].y - handleSize() / $$props.scale / 2);
2399
- $.set_attribute(rect_1, "width", handleSize() / $$props.scale);
2400
- $.set_attribute(rect_1, "height", handleSize() / $$props.scale);
2401
- $.set_attribute(rect_1, "fill", strokeColor());
2402
- $.set_attribute(rect_1, "stroke", strokeColor());
2403
- $.set_attribute(rect_1, "stroke-width", $$props.strokeWidth / 2);
2610
+ $.set_attribute(path_2, "d", $.get(pathData));
2611
+ $.set_attribute(path_2, "opacity", opacity());
2612
+ styles_3 = $.set_style(path_2, "", styles_3, {
2613
+ fill: $$props.currentVertex ? "none" : color(),
2614
+ stroke: strokeColor() ?? color(),
2615
+ "stroke-width": $$props.strokeWidth,
2616
+ "pointer-events": "none",
2617
+ "stroke-linecap": "butt",
2618
+ "stroke-linejoin": "miter",
2619
+ "stroke-dasharray": $.get(dash)
2620
+ });
2404
2621
  });
2405
- $.append($$anchor3, rect_1);
2622
+ $.append($$anchor3, fragment_1);
2406
2623
  };
2407
- $.if(node_2, ($$render) => {
2408
- if ($.get(isPreviewing) && $$props.vertices.length >= 2) $$render(consequent_1);
2624
+ $.if(node_1, ($$render) => {
2625
+ if ($.get(isCloudy) && $.get(cloudyPath)) $$render(consequent);
2626
+ else $$render(alternate, false);
2409
2627
  });
2410
2628
  }
2411
- $.template_effect(() => {
2412
- $.set_attribute(path_1, "d", $.get(pathData));
2413
- $.set_attribute(path_1, "opacity", opacity());
2414
- styles_2 = $.set_style(path_1, "", styles_2, {
2415
- fill: $$props.currentVertex ? "none" : color(),
2416
- stroke: strokeColor() ?? color(),
2417
- "stroke-width": $$props.strokeWidth,
2418
- "pointer-events": "none",
2419
- "stroke-linecap": "butt",
2420
- "stroke-linejoin": "miter",
2421
- "stroke-dasharray": $.get(dash)
2422
- });
2423
- });
2424
2629
  $.append($$anchor2, fragment);
2425
2630
  };
2426
2631
  $.if(node, ($$render) => {
2427
- if (!appearanceActive()) $$render(consequent_2);
2632
+ if (!appearanceActive()) $$render(consequent_3);
2428
2633
  });
2429
2634
  }
2430
2635
  $.reset(svg);
@@ -2433,7 +2638,7 @@ function Polygon($$anchor, $$props) {
2433
2638
  $.set_attribute(svg, "width", $.get(width));
2434
2639
  $.set_attribute(svg, "height", $.get(height));
2435
2640
  $.set_attribute(svg, "viewBox", `0 0 ${$$props.rect.size.width} ${$$props.rect.size.height}`);
2436
- $.set_attribute(path, "d", $.get(pathData));
2641
+ $.set_attribute(path, "d", $.get(isCloudy) && $.get(cloudyPath) ? $.get(cloudyPath).path : $.get(pathData));
2437
2642
  $.set_attribute(path, "stroke-width", $.get(hitStrokeWidth));
2438
2643
  styles_1 = $.set_style(path, "", styles_1, {
2439
2644
  cursor: $$props.isSelected ? "move" : "pointer",
@@ -3349,7 +3554,7 @@ const builtInRenderers = [
3349
3554
  component: HighlightRenderer,
3350
3555
  zIndex: 0,
3351
3556
  interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false },
3352
- containerStyle: (a) => `mix-blend-mode: ${blendModeToCss(a.blendMode ?? PdfBlendMode.Multiply)}`
3557
+ defaultBlendMode: PdfBlendMode.Multiply
3353
3558
  }),
3354
3559
  createRenderer({
3355
3560
  id: "underline",
@@ -3654,11 +3859,12 @@ function Annotations($$anchor, $$props) {
3654
3859
  e.stopPropagation();
3655
3860
  $.get(renderer).onDoubleClick($.get(annotation).object.id, setEditingId);
3656
3861
  } : void 0);
3657
- let $6 = $.derived(() => {
3862
+ let $6 = $.derived(() => blendModeToCss($.get(annotation).object.blendMode ?? $.get(renderer).defaultBlendMode ?? PdfBlendMode.Normal));
3863
+ let $7 = $.derived(() => {
3658
3864
  var _a, _b;
3659
- return ((_b = (_a = $.get(renderer)).containerStyle) == null ? void 0 : _b.call(_a, $.get(annotation).object)) ?? `mix-blend-mode: ${blendModeToCss($.get(annotation).object.blendMode ?? PdfBlendMode.Normal)}`;
3865
+ return (_b = (_a = $.get(renderer)).containerStyle) == null ? void 0 : _b.call(_a, $.get(annotation).object);
3660
3866
  });
3661
- let $7 = $.derived(() => $.get(useAP) ? getAppearanceForAnnotation($.get(annotation)) : void 0);
3867
+ let $8 = $.derived(() => $.get(useAP) ? getAppearanceForAnnotation($.get(annotation)) : void 0);
3662
3868
  AnnotationContainer($$anchor3, $.spread_props(
3663
3869
  {
3664
3870
  get trackedAnnotation() {
@@ -3703,11 +3909,14 @@ function Annotations($$anchor, $$props) {
3703
3909
  get zIndex() {
3704
3910
  return $.get(renderer).zIndex;
3705
3911
  },
3706
- get style() {
3912
+ get blendMode() {
3707
3913
  return $.get($6);
3708
3914
  },
3709
- get appearance() {
3915
+ get style() {
3710
3916
  return $.get($7);
3917
+ },
3918
+ get appearance() {
3919
+ return $.get($8);
3711
3920
  }
3712
3921
  },
3713
3922
  () => annotationsProps,
@@ -4212,15 +4421,18 @@ function PreviewRenderer($$anchor, $$props) {
4212
4421
  () => $$props.preview.data
4213
4422
  ));
4214
4423
  $.reset(div_5);
4215
- $.template_effect(() => styles_5 = $.set_style(div_5, "", styles_5, {
4216
- position: "absolute",
4217
- left: `${$.get(style).left ?? ""}px`,
4218
- top: `${$.get(style).top ?? ""}px`,
4219
- width: `${$.get(style).width ?? ""}px`,
4220
- height: `${$.get(style).height ?? ""}px`,
4221
- "pointer-events": "none",
4222
- "z-index": "10"
4223
- }));
4424
+ $.template_effect(($0) => styles_5 = $.set_style(div_5, "", styles_5, $0), [
4425
+ () => ({
4426
+ position: "absolute",
4427
+ left: `${$.get(style).left ?? ""}px`,
4428
+ top: `${$.get(style).top ?? ""}px`,
4429
+ width: `${$.get(style).width ?? ""}px`,
4430
+ height: `${$.get(style).height ?? ""}px`,
4431
+ "pointer-events": "none",
4432
+ "z-index": "10",
4433
+ "mix-blend-mode": blendModeToCss($$props.preview.data.blendMode ?? PdfBlendMode.Normal)
4434
+ })
4435
+ ]);
4224
4436
  $.append($$anchor7, div_5);
4225
4437
  };
4226
4438
  var alternate = ($$anchor7) => {