import { defineComponent, toRefs, openBlock, createElementBlock, unref, createElementVNode, toDisplayString, pushScopeId, popScopeId } from "vue";
import "./index.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _withScopeId = (n) => (pushScopeId("data-v-302b928d"), n = n(), popScopeId(), n);
const _hoisted_1 = { class: "go-border-box" };
const _hoisted_2 = ["width", "height"];
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("feMorphology", {
  operator: "dilate",
  radius: "2",
  in: "SourceAlpha",
  result: "thicken"
}, null, -1));
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("feGaussianBlur", {
  in: "thicken",
  stdDeviation: "3",
  result: "blurred"
}, null, -1));
const _hoisted_5 = ["flood-color"];
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("feComposite", {
  in: "glowColor",
  in2: "blurred",
  operator: "in",
  result: "softGlowColored"
}, null, -1));
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("feMerge", null, [
  /* @__PURE__ */ createElementVNode("feMergeNode", { in: "softGlowColored" }),
  /* @__PURE__ */ createElementVNode("feMergeNode", { in: "SourceGraphic" })
], -1));
const _hoisted_8 = ["fill", "points"];
const _hoisted_9 = ["fill", "stroke", "filter", "points"];
const _hoisted_10 = ["stroke", "points"];
const _hoisted_11 = ["stroke", "points"];
const _hoisted_12 = ["stroke", "fill", "filter", "points"];
const _hoisted_13 = ["filter", "fill", "points"];
const _hoisted_14 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "opacity",
  values: "1;0.7;1",
  dur: "2s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1));
const _hoisted_15 = [
  _hoisted_14
];
const _hoisted_16 = ["filter", "fill", "points"];
const _hoisted_17 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "opacity",
  values: "0.7;0.4;0.7",
  dur: "2s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1));
const _hoisted_18 = [
  _hoisted_17
];
const _hoisted_19 = ["filter", "fill", "points"];
const _hoisted_20 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "opacity",
  values: "0.5;0.2;0.5",
  dur: "2s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1));
const _hoisted_21 = [
  _hoisted_20
];
const _hoisted_22 = ["filter", "fill", "points"];
const _hoisted_23 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "opacity",
  values: "1;0.7;1",
  dur: "2s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1));
const _hoisted_24 = [
  _hoisted_23
];
const _hoisted_25 = ["filter", "fill", "points"];
const _hoisted_26 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "opacity",
  values: "0.7;0.4;0.7",
  dur: "2s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1));
const _hoisted_27 = [
  _hoisted_26
];
const _hoisted_28 = ["filter", "fill", "points"];
const _hoisted_29 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "opacity",
  values: "0.5;0.2;0.5",
  dur: "2s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1));
const _hoisted_30 = [
  _hoisted_29
];
const _hoisted_31 = ["x", "y", "fill", "font-size"];
const _hoisted_32 = ["fill", "filter", "points"];
const _hoisted_33 = ["fill", "filter", "points"];
const __default__ = defineComponent({ name: "EBorder04" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const getUUID = (randomLength = 10) => {
      return Number(
        Math.random().toString().substring(2, randomLength) + Date.now()
      ).toString(36);
    };
    const filterId = `border-box-04-filterId-${getUUID()}`;
    const { w, h } = toRefs(props.chartConfig.attr);
    const {
      colors,
      borderTitle,
      borderTitleColor,
      borderTitleSize,
      borderTitleHeight,
      borderTitleWidth,
      backgroundColor
    } = toRefs(props.chartConfig.option);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        (openBlock(), createElementBlock("svg", {
          width: unref(w),
          height: unref(h)
        }, [
          createElementVNode("defs", null, [
            createElementVNode("filter", {
              id: filterId,
              height: "150%",
              width: "150%",
              x: "-25%",
              y: "-25%"
            }, [
              _hoisted_3,
              _hoisted_4,
              createElementVNode("feFlood", {
                "flood-color": unref(colors)[1],
                result: "glowColor"
              }, null, 8, _hoisted_5),
              _hoisted_6,
              _hoisted_7
            ])
          ]),
          createElementVNode("polygon", {
            fill: unref(backgroundColor),
            points: `
        20, 32 ${unref(w) * 0.5 - unref(borderTitleWidth) / 2}, 32 ${unref(w) * 0.5 - unref(borderTitleWidth) / 2 + 20}, 53
        ${unref(w) * 0.5 + unref(borderTitleWidth) / 2 - 20}, 53 ${unref(w) * 0.5 + unref(borderTitleWidth) / 2}, 32
        ${unref(w) - 20}, 32 ${unref(w) - 8}, 48 ${unref(w) - 8}, ${unref(h) - 25} ${unref(w) - 20}, ${unref(h) - 8}
        20, ${unref(h) - 8} 8, ${unref(h) - 25} 8, 50
      `
          }, null, 8, _hoisted_8),
          createElementVNode("polyline", {
            fill: unref(backgroundColor),
            stroke: unref(colors)[0],
            filter: `url(#${filterId})`,
            points: `
          ${(unref(w) - unref(borderTitleWidth)) / 2}, 30
          20, 30 7, 50 7, ${50 + (unref(h) - 167) / 2}
          13, ${55 + (unref(h) - 167) / 2} 13, ${135 + (unref(h) - 167) / 2}
          7, ${140 + (unref(h) - 167) / 2} 7, ${unref(h) - 27}
          20, ${unref(h) - 7} ${unref(w) - 20}, ${unref(h) - 7} ${unref(w) - 7}, ${unref(h) - 27}
          ${unref(w) - 7}, ${140 + (unref(h) - 167) / 2} ${unref(w) - 13}, ${135 + (unref(h) - 167) / 2}
          ${unref(w) - 13}, ${55 + (unref(h) - 167) / 2} ${unref(w) - 7}, ${50 + (unref(h) - 167) / 2}
          ${unref(w) - 7}, 50 ${unref(w) - 20}, 30 ${(unref(w) + unref(borderTitleWidth)) / 2}, 30
          ${(unref(w) + unref(borderTitleWidth)) / 2 - 20}, 7 ${(unref(w) - unref(borderTitleWidth)) / 2 + 20}, 7
          ${(unref(w) - unref(borderTitleWidth)) / 2}, 30 ${(unref(w) - unref(borderTitleWidth)) / 2 + 20}, 52
          ${(unref(w) + unref(borderTitleWidth)) / 2 - 20}, 52 ${(unref(w) + unref(borderTitleWidth)) / 2}, 30
        `
          }, null, 8, _hoisted_9),
          createElementVNode("polygon", {
            stroke: unref(colors)[0],
            fill: "transparent",
            points: `
          ${(unref(w) + unref(borderTitleWidth)) / 2 - 5}, 30 ${(unref(w) + unref(borderTitleWidth)) / 2 - 21}, 11
          ${(unref(w) + unref(borderTitleWidth)) / 2 - 27}, 11 ${(unref(w) + unref(borderTitleWidth)) / 2 - 8}, 34
        `
          }, null, 8, _hoisted_10),
          createElementVNode("polygon", {
            stroke: unref(colors)[0],
            fill: "transparent",
            points: `
          ${(unref(w) - unref(borderTitleWidth)) / 2 + 5}, 30 ${(unref(w) - unref(borderTitleWidth)) / 2 + 22}, 49
          ${(unref(w) - unref(borderTitleWidth)) / 2 + 28}, 49 ${(unref(w) - unref(borderTitleWidth)) / 2 + 8}, 26
        `
          }, null, 8, _hoisted_11),
          createElementVNode("polygon", {
            stroke: unref(colors)[0],
            fill: unref(colors)[1],
            filter: `url(#${filterId})`,
            points: `
          ${(unref(w) + unref(borderTitleWidth)) / 2 - 11}, 37 ${(unref(w) + unref(borderTitleWidth)) / 2 - 32}, 11
          ${(unref(w) - unref(borderTitleWidth)) / 2 + 23}, 11 ${(unref(w) - unref(borderTitleWidth)) / 2 + 11}, 23
          ${(unref(w) - unref(borderTitleWidth)) / 2 + 33}, 49 ${(unref(w) + unref(borderTitleWidth)) / 2 - 22}, 49
        `
          }, null, 8, _hoisted_12),
          createElementVNode("polygon", {
            filter: `url(#${filterId})`,
            fill: unref(colors)[0],
            opacity: "1",
            points: `
          ${(unref(w) - unref(borderTitleWidth)) / 2 - 10}, 37 ${(unref(w) - unref(borderTitleWidth)) / 2 - 31}, 37
          ${(unref(w) - unref(borderTitleWidth)) / 2 - 25}, 46 ${(unref(w) - unref(borderTitleWidth)) / 2 - 4}, 46
        `
          }, _hoisted_15, 8, _hoisted_13),
          createElementVNode("polygon", {
            filter: `url(#${filterId})`,
            fill: unref(colors)[0],
            opacity: "0.7",
            points: `
          ${(unref(w) - unref(borderTitleWidth)) / 2 - 40}, 37 ${(unref(w) - unref(borderTitleWidth)) / 2 - 61}, 37
          ${(unref(w) - unref(borderTitleWidth)) / 2 - 55}, 46 ${(unref(w) - unref(borderTitleWidth)) / 2 - 34}, 46
        `
          }, _hoisted_18, 8, _hoisted_16),
          createElementVNode("polygon", {
            filter: `url(#${filterId})`,
            fill: unref(colors)[0],
            opacity: "0.5",
            points: `
          ${(unref(w) - unref(borderTitleWidth)) / 2 - 70}, 37 ${(unref(w) - unref(borderTitleWidth)) / 2 - 91}, 37
          ${(unref(w) - unref(borderTitleWidth)) / 2 - 85}, 46 ${(unref(w) - unref(borderTitleWidth)) / 2 - 64}, 46
        `
          }, _hoisted_21, 8, _hoisted_19),
          createElementVNode("polygon", {
            filter: `url(#${filterId})`,
            fill: unref(colors)[0],
            opacity: "1",
            points: `
          ${(unref(w) + unref(borderTitleWidth)) / 2 + 30}, 37 ${(unref(w) + unref(borderTitleWidth)) / 2 + 9}, 37
          ${(unref(w) + unref(borderTitleWidth)) / 2 + 3}, 46 ${(unref(w) + unref(borderTitleWidth)) / 2 + 24}, 46
        `
          }, _hoisted_24, 8, _hoisted_22),
          createElementVNode("polygon", {
            filter: `url(#${filterId})`,
            fill: unref(colors)[0],
            opacity: "0.7",
            points: `
          ${(unref(w) + unref(borderTitleWidth)) / 2 + 60}, 37 ${(unref(w) + unref(borderTitleWidth)) / 2 + 39}, 37
          ${(unref(w) + unref(borderTitleWidth)) / 2 + 33}, 46 ${(unref(w) + unref(borderTitleWidth)) / 2 + 54}, 46
        `
          }, _hoisted_27, 8, _hoisted_25),
          createElementVNode("polygon", {
            filter: `url(#${filterId})`,
            fill: unref(colors)[0],
            opacity: "0.5",
            points: `
          ${(unref(w) + unref(borderTitleWidth)) / 2 + 90}, 37 ${(unref(w) + unref(borderTitleWidth)) / 2 + 69}, 37
          ${(unref(w) + unref(borderTitleWidth)) / 2 + 63}, 46 ${(unref(w) + unref(borderTitleWidth)) / 2 + 84}, 46
        `
          }, _hoisted_30, 8, _hoisted_28),
          createElementVNode("text", {
            x: `${unref(w) / 2}`,
            y: unref(borderTitleHeight),
            fill: unref(borderTitleColor),
            "font-size": unref(borderTitleSize),
            "text-anchor": "middle",
            "dominant-baseline": "middle"
          }, toDisplayString(unref(borderTitle)), 9, _hoisted_31),
          createElementVNode("polygon", {
            fill: unref(colors)[0],
            filter: `url(#${filterId})`,
            points: `
          7, ${53 + (unref(h) - 167) / 2} 11, ${57 + (unref(h) - 167) / 2}
          11, ${133 + (unref(h) - 167) / 2} 7, ${137 + (unref(h) - 167) / 2}
        `
          }, null, 8, _hoisted_32),
          createElementVNode("polygon", {
            fill: unref(colors)[0],
            filter: `url(#${filterId})`,
            points: `
          ${unref(w) - 7}, ${53 + (unref(h) - 167) / 2} ${unref(w) - 11}, ${57 + (unref(h) - 167) / 2}
          ${unref(w) - 11}, ${133 + (unref(h) - 167) / 2} ${unref(w) - 7}, ${137 + (unref(h) - 167) / 2}
        `
          }, null, 8, _hoisted_33)
        ], 8, _hoisted_2))
      ]);
    };
  }
});
var _EBorder04 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-302b928d"]]);
export { _EBorder04 as default };
