"use strict";

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.DefaultRichTextIconAttribute = exports.DefaultImageAttribute = exports.DefaultRichTextAttribute = exports.DefaultTextAttribute = exports.DefaultSymbolAttribute = exports.DefaultRect3dAttribute = exports.DefaultRectAttribute = exports.DefaultStarAttribute = exports.DefaultPolygonAttribute = exports.DefaultPathAttribute = exports.DefaultLineAttribute = exports.DefaultGlyphAttribute = exports.DefaultGroupAttribute = exports.DefaultCircleAttribute = exports.DefaultAreaAttribute = exports.DefaultArcAttribute = exports.rewriteProto = exports.addAttributeToPrototype = exports.DefaultAttribute = exports.DefaultDebugAttribute = exports.DefaultConnectAttribute = exports.DefaultStyle = exports.DefaultPickStyle = exports.DefaultTextStyle = exports.DefaultStrokeStyle = exports.DefaultFillStyle = exports.DefaultTransform = exports.DefaultLayout = void 0;

const vutils_1 = require("@visactor/vutils"), custom_path2d_1 = require("../common/custom-path2d"), interface_1 = require("../interface");

exports.DefaultLayout = {
    alignSelf: "auto"
}, exports.DefaultTransform = {
    x: 0,
    y: 0,
    z: 0,
    dx: 0,
    dy: 0,
    dz: 0,
    scrollX: 0,
    scrollY: 0,
    scaleX: 1,
    scaleY: 1,
    scaleZ: 1,
    angle: 0,
    alpha: 0,
    beta: 0,
    scaleCenter: [ 0, 0 ],
    anchor: [ 0, 0 ],
    anchor3d: [ 0, 0 ],
    postMatrix: new vutils_1.Matrix
}, exports.DefaultFillStyle = {
    fillOpacity: 1,
    fill: !1,
    shadowBlur: 0,
    shadowColor: "black",
    shadowOffsetX: 0,
    shadowOffsetY: 0
};

const commonStroke = {
    strokeOpacity: 1,
    lineDash: [],
    lineDashOffset: 0,
    lineWidth: 1,
    lineCap: "butt",
    lineJoin: "miter",
    miterLimit: 10,
    strokeBoundsBuffer: 2,
    stroke: !1
};

function addAttributeToPrototype(obj, c, keys) {
    keys.forEach((key => {
        c.prototype[key] = obj[key];
    }));
}

function rewriteProto(obj, c) {
    Object.setPrototypeOf(obj, c);
}

exports.DefaultStrokeStyle = Object.assign({
    outerBorder: Object.assign(Object.assign({}, commonStroke), {
        distance: 0
    }),
    innerBorder: Object.assign(Object.assign({}, commonStroke), {
        distance: 0
    })
}, commonStroke), exports.DefaultTextStyle = {
    text: "",
    maxLineWidth: 1 / 0,
    maxWidth: 1 / 0,
    textAlign: "left",
    textBaseline: "alphabetic",
    fontSize: 16,
    fontFamily: "PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n    Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",
    fontWeight: "",
    ellipsis: "…",
    fontVariant: "",
    fontStyle: "",
    lineHeight: void 0,
    underline: 0,
    lineThrough: 0,
    scaleIn3d: !1,
    direction: "horizontal",
    wordBreak: "break-all",
    ignoreBuf: !1,
    verticalMode: 0,
    wrap: !1,
    whiteSpace: "no-wrap",
    heightLimit: 1 / 0,
    lineClamp: 1 / 0,
    suffixPosition: "end",
    underlineDash: [],
    underlineOffset: 0,
    disableAutoClipedPoptip: void 0,
    measureMode: interface_1.MeasureModeEnum.fontBounding,
    keepCenterInLine: !1
}, exports.DefaultPickStyle = {
    pickStrokeBuffer: 0
}, exports.DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
    forceBoundsWidth: void 0,
    forceBoundsHeight: void 0,
    opacity: 1,
    background: null,
    autoAnimateTexture: !1,
    textureRatio: 1,
    textureOptions: null,
    backgroundOpacity: 1,
    backgroundCornerRadius: 0,
    texture: null,
    textureColor: "black",
    textureSize: 10,
    texturePadding: 2,
    backgroundMode: "no-repeat",
    backgroundFit: !0,
    backgroundKeepAspectRatio: !1,
    backgroundClip: !0,
    backgroundScale: 1,
    backgroundOffsetX: 0,
    backgroundOffsetY: 0,
    blur: 0,
    filter: "",
    cursor: null,
    html: null,
    react: null,
    vue: null
}, exports.DefaultFillStyle), exports.DefaultStrokeStyle), exports.DefaultLayout), exports.DefaultPickStyle), 
exports.DefaultConnectAttribute = {
    connectedType: "none",
    connectedStyle: {},
    connectedX: NaN,
    connectedY: NaN
}, exports.DefaultDebugAttribute = {
    _debug_bounds: !1
}, exports.DefaultAttribute = Object.assign(Object.assign(Object.assign({
    strokeSeg: null,
    renderable: !0,
    pickable: !0,
    shadowGraphic: void 0,
    childrenPickable: !0,
    fillPickable: !0,
    strokePickable: !0,
    visible: !0,
    zIndex: 0,
    layout: null,
    boundsPadding: 0,
    fillStrokeOrder: 0,
    renderStyle: "default",
    pickMode: "accurate",
    customPickShape: null,
    boundsMode: "accurate",
    keepDirIn3d: !0,
    shadowRootIdx: 1,
    globalZIndex: 1,
    globalCompositeOperation: "",
    overflow: "hidden",
    shadowPickMode: "graphic",
    keepStrokeScale: !1,
    clipConfig: null,
    roughStyle: null
}, exports.DefaultDebugAttribute), exports.DefaultStyle), exports.DefaultTransform), 
exports.addAttributeToPrototype = addAttributeToPrototype, exports.rewriteProto = rewriteProto, 
exports.DefaultArcAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    startAngle: 0,
    endAngle: vutils_1.pi2,
    innerRadius: 0,
    outerRadius: 1,
    innerPadding: 0,
    outerPadding: 0,
    cornerRadius: 0,
    padRadius: 0,
    padAngle: 0,
    cap: !1,
    forceShowCap: !1
}), exports.DefaultAreaAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultConnectAttribute), {
    points: [],
    segments: [],
    curveType: "linear",
    clipRange: 1,
    closePath: !1,
    curveTension: 1
}), exports.DefaultCircleAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    radius: 1,
    startAngle: 0,
    endAngle: vutils_1.pi2
}), exports.DefaultGroupAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    width: 0,
    height: 0,
    cornerRadius: 0,
    path: [],
    clip: !1,
    visibleAll: !0,
    display: "relative",
    flexDirection: "row",
    flexWrap: "wrap",
    justifyContent: "flex-start",
    alignItems: "flex-start",
    alignContent: "flex-start",
    baseOpacity: 1,
    cornerType: "round"
}), exports.DefaultGlyphAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    path: "",
    width: 0,
    height: 0,
    cornerRadius: 0,
    clip: !1
}), exports.DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultConnectAttribute), {
    points: [],
    segments: [],
    curveType: "linear",
    clipRange: 1,
    clipRangeByDimension: "default",
    closePath: !1,
    curveTension: 1
}), exports.DefaultPathAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    path: new custom_path2d_1.CustomPath2D,
    fillStrokeOrder: 1,
    clipRange: 1,
    customPath: () => {
        vutils_1.Logger.getInstance().warn("空函数");
    }
}), exports.DefaultPolygonAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    points: [],
    cornerRadius: 0,
    closePath: !0
}), exports.DefaultStarAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    width: 100,
    height: 100,
    spikes: 5,
    thickness: .5
}), exports.DefaultRectAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    width: 0,
    height: 0,
    x1: 0,
    y1: 0,
    strokeBoundsBuffer: 0,
    cornerRadius: 0,
    cornerType: "round"
}), exports.DefaultRect3dAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    width: 0,
    height: 0,
    x1: 0,
    y1: 0,
    cornerRadius: 0,
    length: 0,
    cornerType: "round"
}), exports.DefaultSymbolAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
    symbolType: "circle",
    size: 10,
    keepDirIn3d: !0,
    clipRange: 1
}), exports.DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultTextStyle), {
    strokeBoundsBuffer: 0,
    keepDirIn3d: !0
}), exports.DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultTextStyle), {
    upgradeAttrs: null,
    editable: !1,
    editOptions: null,
    ascentDescentMode: "actual",
    width: 300,
    height: 300,
    ellipsis: !0,
    wordBreak: "break-word",
    verticalDirection: "top",
    textAlign: "left",
    textBaseline: "top",
    layoutDirection: "horizontal",
    textConfig: [],
    disableAutoWrapLine: !1,
    maxHeight: void 0,
    maxWidth: void 0,
    singleLine: !1
}), exports.DefaultImageAttribute = Object.assign(Object.assign({
    repeatX: "no-repeat",
    repeatY: "no-repeat",
    image: "",
    width: 0,
    height: 0,
    maxWidth: 500,
    maxHeight: 500
}, exports.DefaultAttribute), {
    fill: !0,
    cornerRadius: 0,
    cornerType: "round"
}), exports.DefaultRichTextIconAttribute = Object.assign(Object.assign({}, exports.DefaultImageAttribute), {
    backgroundShowMode: "never",
    backgroundWidth: 0,
    backgroundHeight: 0,
    textAlign: "left",
    textBaseline: "middle",
    direction: "horizontal",
    margin: 0,
    id: "",
    width: 20,
    height: 20,
    backgroundFill: "rgba(101, 117, 168, 0.1)",
    backgroundFillOpacity: 1,
    backgroundStroke: !1,
    backgroundStrokeOpacity: 1,
    backgroundRadius: 4,
    opacity: 1
});
//# sourceMappingURL=config.js.map
