template-designer 0.5.4 → 0.5.5
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.
|
@@ -14250,7 +14250,7 @@ const uI = { class: "label-designer" }, fI = { class: "toolbar" }, hI = { class:
|
|
|
14250
14250
|
]);
|
|
14251
14251
|
};
|
|
14252
14252
|
}
|
|
14253
|
-
}, ex = /* @__PURE__ */ xt(Ax, [["__scopeId", "data-v-
|
|
14253
|
+
}, ex = /* @__PURE__ */ xt(Ax, [["__scopeId", "data-v-02672dca"]]);
|
|
14254
14254
|
const tx = {
|
|
14255
14255
|
__name: "index",
|
|
14256
14256
|
props: {
|
|
@@ -22359,7 +22359,7 @@ function(e) {
|
|
|
22359
22359
|
*/
|
|
22360
22360
|
function(e) {
|
|
22361
22361
|
function A() {
|
|
22362
|
-
return (me.canvg ? Promise.resolve(me.canvg) : import("./index.es-
|
|
22362
|
+
return (me.canvg ? Promise.resolve(me.canvg) : import("./index.es-ecf18833.mjs")).catch(function(t) {
|
|
22363
22363
|
return Promise.reject(new Error("Could not load canvg: " + t));
|
|
22364
22364
|
}).then(function(t) {
|
|
22365
22365
|
return t.default ? t.default : t;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.td-text-component{width:100%;height:100%;position:relative;display:flex;align-items:center;overflow:hidden;box-sizing:border-box}.td-text-content{width:100%;min-width:0;box-sizing:border-box}.label[data-v-10ba6a3d]{display:flex;align-items:center;justify-content:flex-start;gap:4px}.help-icon[data-v-10ba6a3d]{font-size:14px;color:#999;cursor:help;transition:color .2s ease}.help-icon[data-v-10ba6a3d]:hover{color:var(--el-color-primary)}.property-item[data-v-10ba6a3d]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-10ba6a3d]{font-size:14px;color:#666}.property-item input[data-v-10ba6a3d],.property-item select[data-v-10ba6a3d]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-10ba6a3d]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-10ba6a3d]{width:16px;height:16px}.file-input-container[data-v-10ba6a3d]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-10ba6a3d]{height:100%!important}.file-url-input[data-v-10ba6a3d]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-url-input[data-v-10ba6a3d]:disabled{background-color:#f5f5f5;cursor:not-allowed}.file-input[data-v-10ba6a3d]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-10ba6a3d]{padding:4px 12px;border:1px solid #ddd;border-radius:4px;background:var(--el-color-primary);color:#fff;cursor:pointer;font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.file-select-btn[data-v-10ba6a3d]:hover:not(:disabled){background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-select-btn[data-v-10ba6a3d]:disabled{background:#ccc;cursor:not-allowed}.file-info[data-v-10ba6a3d]{display:flex;align-items:center;justify-content:space-between;padding:4px 8px;background-color:#f5f5f5;border-radius:4px;margin-top:4px}.file-name[data-v-10ba6a3d]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-10ba6a3d]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-10ba6a3d]:hover{background-color:#fff2f0}.property-item .el-select[data-v-10ba6a3d]{width:100%}.property-item .el-select .el-input__wrapper[data-v-10ba6a3d]{height:32px;line-height:32px;font-size:14px;padding:0 8px}.property-item .el-select .el-input__inner[data-v-10ba6a3d]{font-size:14px;height:32px;line-height:32px}.property-item .el-select .el-select__tags[data-v-10ba6a3d]{font-size:12px}.property-item .el-select .el-select__tags .el-tag[data-v-10ba6a3d]{font-size:12px;height:20px;line-height:18px;margin:2px 4px 2px 0}.property-item .el-select--multiple .el-input__wrapper[data-v-10ba6a3d]{min-height:32px;height:auto;padding:2px 8px}.property-item .el-select--multiple .el-input__inner[data-v-10ba6a3d]{height:28px;line-height:28px}.property-panel[data-v-127d69aa]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-127d69aa]{margin-bottom:16px}.property-group-title[data-v-127d69aa]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-127d69aa]{margin-bottom:12px}.text-property-panel .property-item[data-v-127d69aa]:last-child,.barcode-property-panel .property-item[data-v-127d69aa]:last-child,.qrcode-property-panel .property-item[data-v-127d69aa]:last-child,.image-property-panel .property-item[data-v-127d69aa]:last-child,.rectangle-property-panel .property-item[data-v-127d69aa]:last-child,.line-property-panel .property-item[data-v-127d69aa]:last-child,.verline-property-panel .property-item[data-v-127d69aa]:last-child{margin-bottom:0}.property-layout-container[data-v-127d69aa]{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.property-item-wrapper[data-v-127d69aa]{margin-bottom:0}.property-item-wrapper.full-width[data-v-127d69aa]{width:100%;flex-basis:100%}.property-item-wrapper.half-width[data-v-127d69aa]{width:calc(50% - 6px);flex-basis:calc(50% - 6px)}.property-item-wrapper.default-width[data-v-127d69aa]{width:100%;flex-basis:100%}.property-item-wrapper .property-item[data-v-127d69aa]{margin-bottom:0;width:100%}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.barcode-component svg{width:100%!important;height:100%!important;max-width:100%;max-height:100%;display:block}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-component[data-v-7db88513]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-canvas-fixed[data-v-7db88513]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-7db88513]{display:block;width:100%!important;height:100%!important;padding:0;margin:0;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;image-rendering:pixelated;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-crisp-edges;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:none;-webkit-filter:none;object-fit:cover;object-position:center}.component-selection-overlay[data-v-7db88513]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-property-panel[data-v-cce393d5]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-cce393d5]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-cce393d5]{font-size:14px;color:#666}.property-item input[data-v-cce393d5],.property-item select[data-v-cce393d5]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-cce393d5]{height:32px;padding:2px}.image-component[data-v-23ff9ae2]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;pointer-events:auto}.image-placeholder[data-v-23ff9ae2]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px;pointer-events:auto}.image-loading-overlay[data-v-23ff9ae2]{position:absolute;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:5;pointer-events:none}.image-content[data-v-23ff9ae2]{display:block;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:high-quality;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:auto;object-fit:contain;object-position:center}.component-selection-overlay[data-v-23ff9ae2]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.image-property-panel[data-v-462c8b63]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-462c8b63]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-462c8b63]{font-size:14px;color:#666}.property-item input[data-v-462c8b63],.property-item select[data-v-462c8b63]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-462c8b63]{height:32px;padding:2px}.rectangle-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box;position:relative}.hairline-edge{position:absolute;pointer-events:none}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.line-component{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.line-selection-outline{position:absolute;left:0;top:0;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.component-list[data-v-010ae52b]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-010ae52b]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-010ae52b]{font-size:14px;font-weight:600;color:#333;padding:8px 12px;border-left:4px solid var(--el-color-primary);background:linear-gradient(135deg,var(--el-color-primary-light-9) 0%,var(--el-color-primary-light-8) 100%);border-radius:0 6px 6px 0;margin-bottom:4px;box-shadow:0 1px 3px #0000001a}.group-content[data-v-010ae52b]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-010ae52b]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 0;border:1px solid #ddd;border-radius:4px;cursor:grab;font-size:13px;color:#555;transition:all .2s ease;width:100%;height:70px;background:#fff;box-shadow:0 1px 3px #0000001a}.component-item[data-v-010ae52b]:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary);color:var(--el-color-primary);box-shadow:0 2px 8px #00000014}.component-item i[data-v-010ae52b]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-010ae52b]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-010ae52b],.component-item:hover span[data-v-010ae52b]{color:var(--el-color-primary)!important}.ruler[data-v-3635eba4]{position:absolute;z-index:1}.ruler.horizontal[data-v-3635eba4]{left:20px;top:0;width:calc(100% - 40px);height:20px;border-bottom:none}.ruler.vertical[data-v-3635eba4]{top:20px;left:0;width:20px;height:calc(100% - 40px);border-right:none}.ruler-unit[data-v-3635eba4]{position:absolute}.ruler.horizontal .ruler-unit[data-v-3635eba4]{height:100%}.ruler.vertical .ruler-unit[data-v-3635eba4]{width:100%}.ruler-mark[data-v-3635eba4]{position:absolute;background:#999}.ruler.horizontal .ruler-mark[data-v-3635eba4]{bottom:0}.ruler.vertical .ruler-mark[data-v-3635eba4]{right:0}.ruler-text[data-v-3635eba4]{position:absolute;font-size:8px;color:#666;white-space:nowrap}.ruler.horizontal .ruler-text[data-v-3635eba4]{bottom:8px;transform:translate(-50%)}.ruler.vertical .ruler-text[data-v-3635eba4]{right:8px;transform:translateY(-50%) rotate(-90deg)}.label-container[data-v-21b6e8d1]{display:flex;flex-direction:column;align-items:flex-end}.tg-title[data-v-21b6e8d1]{display:flex;align-items:center}.tg-title p[data-v-21b6e8d1]{font-size:18px;font-weight:700}.tge-main[data-v-21b6e8d1]{max-height:82vh;padding:0}.tge-text[data-v-21b6e8d1]{font-size:14px;line-height:26px}.tge-content[data-v-21b6e8d1]{display:flex;width:100%}.tge-block[data-v-21b6e8d1]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-21b6e8d1]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-21b6e8d1]{width:100%;height:auto}.table-container[data-v-21b6e8d1]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-21b6e8d1]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-21b6e8d1]{margin-top:10px}.tge-divider[data-v-21b6e8d1]{width:1px;background:var(--el-border-color);margin:0 10px}.table-container .el-table .el-table__body-wrapper{background:transparent!important}.graph-table .el-table__header,.graph-table .el-table__body{width:100%!important}.graph-table .el-table__body{margin-bottom:10px!important}.graph-table .el-form-item__error{position:static!important;top:0!important}.graph-table .el-input-number{width:auto}.graph-table .el-input-number.is-without-controls .el-input__wrapper{padding-left:4px;padding-right:4px}button[data-v-0752e7d5]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-0752e7d5]{display:flex;height:100%}.toolbar[data-v-0752e7d5]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-0752e7d5]{width:44px;text-align:center}.zoom-controls[data-v-0752e7d5]{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-0752e7d5]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-0752e7d5]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-0752e7d5]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-0752e7d5]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0;background:rgba(0,0,0,.05)}.canvas-container[data-v-0752e7d5]{flex:1;padding:0 16px 16px;overflow:auto;background:rgba(0,0,0,.05);position:relative;display:flex;flex-direction:column}.canvas-wrapper[data-v-0752e7d5]{position:relative;transform-origin:0 0;overflow:visible;width:fit-content;height:fit-content;margin-top:20px;transition:all .2s ease;transform:translateZ(0);will-change:transform}.ruler-horizontal[data-v-0752e7d5]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-0752e7d5]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-0752e7d5]{position:relative;overflow:visible;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-0752e7d5]{width:260px;background:#fff;border-left:1px solid #ddd;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px;position:relative;z-index:100;overflow-y:auto}.property-panel-title[data-v-0752e7d5]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:10px 0 0;gap:8px}.property-panel-title .help-icon[data-v-0752e7d5]{font-size:18px;color:#999;transition:color .2s ease}.property-panel-title .help-icon[data-v-0752e7d5]:hover{color:var(--el-color-primary)}.position-controls[data-v-0752e7d5]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-0752e7d5]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-0752e7d5]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-0752e7d5]{display:flex;align-items:center;gap:4px}.number-input input[data-v-0752e7d5]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-0752e7d5]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.canvas-item[data-v-0752e7d5]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0;pointer-events:auto}.resize-handle[data-v-0752e7d5]{position:absolute;width:4px;height:4px;background:#ffffff;border:.5px solid var(--el-color-primary);z-index:1001;transition:all .2s ease;border-radius:50%;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important;cursor:pointer}.resize-handle.top-left[data-v-0752e7d5]{top:-3px;left:-3px;background:#ffffff;border:.5px solid var(--el-color-primary)}.resize-handle.top[data-v-0752e7d5]{top:-2px;left:50%;transform:translate(-50%);width:6px;height:2px;border-radius:1.5px}.resize-handle.top-right[data-v-0752e7d5]{top:-3px;right:-3px}.resize-handle.right[data-v-0752e7d5]{top:50%;right:-2.5px;transform:translateY(-50%);width:2px;height:6px;border-radius:1.5px}.resize-handle.bottom-right[data-v-0752e7d5]{bottom:-3px;right:-3px}.resize-handle.bottom[data-v-0752e7d5]{bottom:-2px;left:50%;transform:translate(-50%);width:6px;height:2px;border-radius:1.5px}.resize-handle.bottom-left[data-v-0752e7d5]{bottom:-3px;left:-3px}.resize-handle.left[data-v-0752e7d5]{top:50%;left:-2.5px;transform:translateY(-50%);width:2px;height:6px;border-radius:1.5px}.resize-handle.line-anchor[data-v-0752e7d5]{width:4px;height:4px;border-radius:50%}.rotate-handle[data-v-0752e7d5]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:-8px;width:12px;height:12px;background:#ffffff;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-0752e7d5]{display:flex;justify-content:center;flex-wrap:nowrap;white-space:nowrap;position:absolute;top:-14px;left:-4px;width:auto;min-width:70px;height:auto;background:rgba(255,34,34,.8);color:#fff;font-size:7px;border-radius:6px;z-index:20;line-height:1.2;box-shadow:0 2px 8px #00000014;pointer-events:none;padding:1px 8px 0}.delete-btn[data-v-0752e7d5]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:8px;width:12px;height:12px;background:#ffffff;color:#ff4d4f;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.drag-extend-lines[data-v-0752e7d5]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-0752e7d5]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-0752e7d5]{width:100%;height:1px;left:0;background:linear-gradient(to right,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.drag-extend-line.vertical[data-v-0752e7d5]{width:1px;height:100%;top:0;background:linear-gradient(to bottom,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.drag-extend-line.rotated[data-v-0752e7d5]{position:absolute;border:1px dashed var(--el-color-primary);pointer-events:none;z-index:998}.alignment-guides[data-v-0752e7d5]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.alignment-guide[data-v-0752e7d5]{background-color:transparent;pointer-events:none;z-index:9999}.alignment-guide.horizontal[data-v-0752e7d5]{position:absolute;left:0;right:0;height:1px;background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.alignment-guide.vertical[data-v-0752e7d5]{position:absolute;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.alignment-guide.guide-center[data-v-0752e7d5]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-center.vertical[data-v-0752e7d5]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-resize-anchor[data-v-0752e7d5]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-resize-anchor.vertical[data-v-0752e7d5]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-canvas-center[data-v-0752e7d5]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px}.alignment-guide.guide-canvas-center.vertical[data-v-0752e7d5]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px}.number-input input[type=number][data-v-0752e7d5]::-webkit-inner-spin-button,.number-input input[type=number][data-v-0752e7d5]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-0752e7d5]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-0752e7d5]{width:20px;height:20px;cursor:pointer;accent-color:var(--el-color-primary)}.component-selected[data-v-0752e7d5],.component-current[data-v-0752e7d5]{outline:1px dashed var(--el-color-primary)!important;outline-offset:0!important}.component-selected[data-v-0752e7d5],.component-current[data-v-0752e7d5]{box-sizing:border-box}.no-outline.component-selected[data-v-0752e7d5],.no-outline.component-current[data-v-0752e7d5]{outline:none!important}.component-config-missing[data-v-0752e7d5]{display:flex;align-items:center;justify-content:center;background:#fff3cd;border:1px dashed #ffc107;border-radius:4px;color:#856404;font-size:12px}.missing-config-tip[data-v-0752e7d5]{display:flex;align-items:center;gap:4px;padding:8px}.missing-config-tip .el-icon[data-v-0752e7d5]{font-size:14px;color:#ffc107}.loader-container[data-v-0752e7d5]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center}.loader-container p[data-v-0752e7d5]{color:var(--el-color-primary-light-3);font-size:14px;margin-top:20px}.loader-circle[data-v-0752e7d5]{width:70px;height:70px;display:inline-block;margin-right:10px;position:relative;vertical-align:top}.loader-circle[data-v-0752e7d5]:before{border-radius:50%;border-top:5px solid var(--el-color-primary-light-3);content:" ";display:block;position:absolute;top:10%;left:10%;height:80%;width:80%;animation:loader-circle_rotation-0752e7d5 1s linear infinite}.loader-circle[data-v-0752e7d5]:after{border-radius:50%;border-bottom:5px solid var(--el-color-primary-light-3);content:" ";display:block;height:100%;width:100%;animation:loader-circle_rotation-reverse-0752e7d5 1s linear infinite;position:absolute;top:0}@keyframes loader-circle_rotation-reverse-0752e7d5{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@keyframes loader-circle_rotation-0752e7d5{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.template-designer[data-v-a3d9b11f]{overflow-y:hidden}.template-designer-border-top[data-v-a3d9b11f]{border-top:1px solid #e0e0e0}
|
|
1
|
+
.td-text-component{width:100%;height:100%;position:relative;display:flex;align-items:center;overflow:hidden;box-sizing:border-box}.td-text-content{width:100%;min-width:0;box-sizing:border-box}.label[data-v-10ba6a3d]{display:flex;align-items:center;justify-content:flex-start;gap:4px}.help-icon[data-v-10ba6a3d]{font-size:14px;color:#999;cursor:help;transition:color .2s ease}.help-icon[data-v-10ba6a3d]:hover{color:var(--el-color-primary)}.property-item[data-v-10ba6a3d]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-10ba6a3d]{font-size:14px;color:#666}.property-item input[data-v-10ba6a3d],.property-item select[data-v-10ba6a3d]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-10ba6a3d]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-10ba6a3d]{width:16px;height:16px}.file-input-container[data-v-10ba6a3d]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-10ba6a3d]{height:100%!important}.file-url-input[data-v-10ba6a3d]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-url-input[data-v-10ba6a3d]:disabled{background-color:#f5f5f5;cursor:not-allowed}.file-input[data-v-10ba6a3d]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-10ba6a3d]{padding:4px 12px;border:1px solid #ddd;border-radius:4px;background:var(--el-color-primary);color:#fff;cursor:pointer;font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.file-select-btn[data-v-10ba6a3d]:hover:not(:disabled){background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-select-btn[data-v-10ba6a3d]:disabled{background:#ccc;cursor:not-allowed}.file-info[data-v-10ba6a3d]{display:flex;align-items:center;justify-content:space-between;padding:4px 8px;background-color:#f5f5f5;border-radius:4px;margin-top:4px}.file-name[data-v-10ba6a3d]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-10ba6a3d]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-10ba6a3d]:hover{background-color:#fff2f0}.property-item .el-select[data-v-10ba6a3d]{width:100%}.property-item .el-select .el-input__wrapper[data-v-10ba6a3d]{height:32px;line-height:32px;font-size:14px;padding:0 8px}.property-item .el-select .el-input__inner[data-v-10ba6a3d]{font-size:14px;height:32px;line-height:32px}.property-item .el-select .el-select__tags[data-v-10ba6a3d]{font-size:12px}.property-item .el-select .el-select__tags .el-tag[data-v-10ba6a3d]{font-size:12px;height:20px;line-height:18px;margin:2px 4px 2px 0}.property-item .el-select--multiple .el-input__wrapper[data-v-10ba6a3d]{min-height:32px;height:auto;padding:2px 8px}.property-item .el-select--multiple .el-input__inner[data-v-10ba6a3d]{height:28px;line-height:28px}.property-panel[data-v-127d69aa]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-127d69aa]{margin-bottom:16px}.property-group-title[data-v-127d69aa]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-127d69aa]{margin-bottom:12px}.text-property-panel .property-item[data-v-127d69aa]:last-child,.barcode-property-panel .property-item[data-v-127d69aa]:last-child,.qrcode-property-panel .property-item[data-v-127d69aa]:last-child,.image-property-panel .property-item[data-v-127d69aa]:last-child,.rectangle-property-panel .property-item[data-v-127d69aa]:last-child,.line-property-panel .property-item[data-v-127d69aa]:last-child,.verline-property-panel .property-item[data-v-127d69aa]:last-child{margin-bottom:0}.property-layout-container[data-v-127d69aa]{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.property-item-wrapper[data-v-127d69aa]{margin-bottom:0}.property-item-wrapper.full-width[data-v-127d69aa]{width:100%;flex-basis:100%}.property-item-wrapper.half-width[data-v-127d69aa]{width:calc(50% - 6px);flex-basis:calc(50% - 6px)}.property-item-wrapper.default-width[data-v-127d69aa]{width:100%;flex-basis:100%}.property-item-wrapper .property-item[data-v-127d69aa]{margin-bottom:0;width:100%}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.barcode-component svg{width:100%!important;height:100%!important;max-width:100%;max-height:100%;display:block}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-component[data-v-7db88513]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-canvas-fixed[data-v-7db88513]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-7db88513]{display:block;width:100%!important;height:100%!important;padding:0;margin:0;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;image-rendering:pixelated;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-crisp-edges;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:none;-webkit-filter:none;object-fit:cover;object-position:center}.component-selection-overlay[data-v-7db88513]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-property-panel[data-v-cce393d5]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-cce393d5]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-cce393d5]{font-size:14px;color:#666}.property-item input[data-v-cce393d5],.property-item select[data-v-cce393d5]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-cce393d5]{height:32px;padding:2px}.image-component[data-v-23ff9ae2]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;pointer-events:auto}.image-placeholder[data-v-23ff9ae2]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px;pointer-events:auto}.image-loading-overlay[data-v-23ff9ae2]{position:absolute;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:5;pointer-events:none}.image-content[data-v-23ff9ae2]{display:block;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:high-quality;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:auto;object-fit:contain;object-position:center}.component-selection-overlay[data-v-23ff9ae2]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.image-property-panel[data-v-462c8b63]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-462c8b63]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-462c8b63]{font-size:14px;color:#666}.property-item input[data-v-462c8b63],.property-item select[data-v-462c8b63]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-462c8b63]{height:32px;padding:2px}.rectangle-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box;position:relative}.hairline-edge{position:absolute;pointer-events:none}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.line-component{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.line-selection-outline{position:absolute;left:0;top:0;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.component-list[data-v-010ae52b]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-010ae52b]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-010ae52b]{font-size:14px;font-weight:600;color:#333;padding:8px 12px;border-left:4px solid var(--el-color-primary);background:linear-gradient(135deg,var(--el-color-primary-light-9) 0%,var(--el-color-primary-light-8) 100%);border-radius:0 6px 6px 0;margin-bottom:4px;box-shadow:0 1px 3px #0000001a}.group-content[data-v-010ae52b]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-010ae52b]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 0;border:1px solid #ddd;border-radius:4px;cursor:grab;font-size:13px;color:#555;transition:all .2s ease;width:100%;height:70px;background:#fff;box-shadow:0 1px 3px #0000001a}.component-item[data-v-010ae52b]:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary);color:var(--el-color-primary);box-shadow:0 2px 8px #00000014}.component-item i[data-v-010ae52b]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-010ae52b]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-010ae52b],.component-item:hover span[data-v-010ae52b]{color:var(--el-color-primary)!important}.ruler[data-v-3635eba4]{position:absolute;z-index:1}.ruler.horizontal[data-v-3635eba4]{left:20px;top:0;width:calc(100% - 40px);height:20px;border-bottom:none}.ruler.vertical[data-v-3635eba4]{top:20px;left:0;width:20px;height:calc(100% - 40px);border-right:none}.ruler-unit[data-v-3635eba4]{position:absolute}.ruler.horizontal .ruler-unit[data-v-3635eba4]{height:100%}.ruler.vertical .ruler-unit[data-v-3635eba4]{width:100%}.ruler-mark[data-v-3635eba4]{position:absolute;background:#999}.ruler.horizontal .ruler-mark[data-v-3635eba4]{bottom:0}.ruler.vertical .ruler-mark[data-v-3635eba4]{right:0}.ruler-text[data-v-3635eba4]{position:absolute;font-size:8px;color:#666;white-space:nowrap}.ruler.horizontal .ruler-text[data-v-3635eba4]{bottom:8px;transform:translate(-50%)}.ruler.vertical .ruler-text[data-v-3635eba4]{right:8px;transform:translateY(-50%) rotate(-90deg)}.label-container[data-v-21b6e8d1]{display:flex;flex-direction:column;align-items:flex-end}.tg-title[data-v-21b6e8d1]{display:flex;align-items:center}.tg-title p[data-v-21b6e8d1]{font-size:18px;font-weight:700}.tge-main[data-v-21b6e8d1]{max-height:82vh;padding:0}.tge-text[data-v-21b6e8d1]{font-size:14px;line-height:26px}.tge-content[data-v-21b6e8d1]{display:flex;width:100%}.tge-block[data-v-21b6e8d1]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-21b6e8d1]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-21b6e8d1]{width:100%;height:auto}.table-container[data-v-21b6e8d1]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-21b6e8d1]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-21b6e8d1]{margin-top:10px}.tge-divider[data-v-21b6e8d1]{width:1px;background:var(--el-border-color);margin:0 10px}.table-container .el-table .el-table__body-wrapper{background:transparent!important}.graph-table .el-table__header,.graph-table .el-table__body{width:100%!important}.graph-table .el-table__body{margin-bottom:10px!important}.graph-table .el-form-item__error{position:static!important;top:0!important}.graph-table .el-input-number{width:auto}.graph-table .el-input-number.is-without-controls .el-input__wrapper{padding-left:4px;padding-right:4px}button[data-v-02672dca]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-02672dca]{display:flex;height:100%}.toolbar[data-v-02672dca]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-02672dca]{width:44px;text-align:center}.zoom-controls[data-v-02672dca]{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-02672dca]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-02672dca]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-02672dca]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-02672dca]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0;background:rgba(0,0,0,.05)}.canvas-container[data-v-02672dca]{flex:1;padding:0 16px 16px;overflow:auto;background:rgba(0,0,0,.05);position:relative;display:flex;flex-direction:column}.canvas-wrapper[data-v-02672dca]{position:relative;transform-origin:0 0;overflow:visible;width:fit-content;height:fit-content;margin-top:20px;transition:all .2s ease;transform:translateZ(0);will-change:transform}.ruler-horizontal[data-v-02672dca]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-02672dca]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-02672dca]{position:relative;overflow:visible;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-02672dca]{width:260px;background:#fff;border-left:1px solid #ddd;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px;position:relative;z-index:100;overflow-y:auto}.property-panel-title[data-v-02672dca]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:10px 0 0;gap:8px}.property-panel-title .help-icon[data-v-02672dca]{font-size:18px;color:#999;transition:color .2s ease}.property-panel-title .help-icon[data-v-02672dca]:hover{color:var(--el-color-primary)}.position-controls[data-v-02672dca]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-02672dca]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-02672dca]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-02672dca]{display:flex;align-items:center;gap:4px}.number-input input[data-v-02672dca]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-02672dca]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.canvas-item[data-v-02672dca]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0;pointer-events:auto}.resize-handle[data-v-02672dca]{position:absolute;width:6px;height:6px;background:#ffffff;border:.5px solid var(--el-color-primary-light-3);z-index:1001;transition:all .2s ease;border-radius:50%;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important;cursor:pointer}.resize-handle.top-left[data-v-02672dca]{top:-4px;left:-4px}.resize-handle.top[data-v-02672dca]{top:-3px;left:50%;transform:translate(-50%);width:8px;height:4px;border-radius:1.5px}.resize-handle.top-right[data-v-02672dca]{top:-4px;right:-4px}.resize-handle.right[data-v-02672dca]{top:50%;right:-3px;transform:translateY(-50%);width:4px;height:8px;border-radius:1.5px}.resize-handle.bottom-right[data-v-02672dca]{bottom:-4px;right:-4px}.resize-handle.bottom[data-v-02672dca]{bottom:-3px;left:50%;transform:translate(-50%);width:8px;height:4px;border-radius:1.5px}.resize-handle.bottom-left[data-v-02672dca]{bottom:-4px;left:-4px}.resize-handle.left[data-v-02672dca]{top:50%;left:-3px;transform:translateY(-50%);width:4px;height:8px;border-radius:1.5px}.resize-handle.line-anchor[data-v-02672dca]{width:4px;height:4px;border-radius:50%}.rotate-handle[data-v-02672dca]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:-8px;width:12px;height:12px;background:#ffffff;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-02672dca]{display:flex;justify-content:center;flex-wrap:nowrap;white-space:nowrap;position:absolute;top:-14px;left:-4px;width:auto;min-width:70px;height:auto;background:rgba(255,34,34,.8);color:#fff;font-size:7px;border-radius:6px;z-index:20;line-height:1.2;box-shadow:0 2px 8px #00000014;pointer-events:none;padding:1px 8px 0}.delete-btn[data-v-02672dca]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:8px;width:12px;height:12px;background:#ffffff;color:#ff4d4f;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.drag-extend-lines[data-v-02672dca]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-02672dca]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-02672dca]{width:100%;height:1px;left:0;background:linear-gradient(to right,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.drag-extend-line.vertical[data-v-02672dca]{width:1px;height:100%;top:0;background:linear-gradient(to bottom,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.drag-extend-line.rotated[data-v-02672dca]{position:absolute;border:1px dashed var(--el-color-primary-light-3);pointer-events:none;z-index:998}.alignment-guides[data-v-02672dca]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.alignment-guide[data-v-02672dca]{background-color:transparent;pointer-events:none;z-index:9999}.alignment-guide.horizontal[data-v-02672dca]{position:absolute;left:0;right:0;height:1px;background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.alignment-guide.vertical[data-v-02672dca]{position:absolute;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.alignment-guide.guide-center[data-v-02672dca]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-center.vertical[data-v-02672dca]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-resize-anchor[data-v-02672dca]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-resize-anchor.vertical[data-v-02672dca]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-canvas-center[data-v-02672dca]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px}.alignment-guide.guide-canvas-center.vertical[data-v-02672dca]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px}.number-input input[type=number][data-v-02672dca]::-webkit-inner-spin-button,.number-input input[type=number][data-v-02672dca]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-02672dca]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-02672dca]{width:20px;height:20px;cursor:pointer;accent-color:var(--el-color-primary-light-3)}.component-selected[data-v-02672dca],.component-current[data-v-02672dca]{outline:1px dashed var(--el-color-primary-light-3)!important;outline-offset:0!important}.component-selected[data-v-02672dca],.component-current[data-v-02672dca]{box-sizing:border-box}.no-outline.component-selected[data-v-02672dca],.no-outline.component-current[data-v-02672dca]{outline:none!important}.component-config-missing[data-v-02672dca]{display:flex;align-items:center;justify-content:center;background:#fff3cd;border:1px dashed #ffc107;border-radius:4px;color:#856404;font-size:12px}.missing-config-tip[data-v-02672dca]{display:flex;align-items:center;gap:4px;padding:8px}.missing-config-tip .el-icon[data-v-02672dca]{font-size:14px;color:#ffc107}.loader-container[data-v-02672dca]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center}.loader-container p[data-v-02672dca]{color:var(--el-color-primary-light-3);font-size:14px;margin-top:20px}.loader-circle[data-v-02672dca]{width:70px;height:70px;display:inline-block;margin-right:10px;position:relative;vertical-align:top}.loader-circle[data-v-02672dca]:before{border-radius:50%;border-top:5px solid var(--el-color-primary-light-3);content:" ";display:block;position:absolute;top:10%;left:10%;height:80%;width:80%;animation:loader-circle_rotation-02672dca 1s linear infinite}.loader-circle[data-v-02672dca]:after{border-radius:50%;border-bottom:5px solid var(--el-color-primary-light-3);content:" ";display:block;height:100%;width:100%;animation:loader-circle_rotation-reverse-02672dca 1s linear infinite;position:absolute;top:0}@keyframes loader-circle_rotation-reverse-02672dca{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@keyframes loader-circle_rotation-02672dca{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.template-designer[data-v-a3d9b11f]{overflow-y:hidden}.template-designer-border-top[data-v-a3d9b11f]{border-top:1px solid #e0e0e0}
|
|
@@ -56,7 +56,7 @@ Minimum version required to store current data is: `+a+`.
|
|
|
56
56
|
content: "" !important;
|
|
57
57
|
display: none !important;
|
|
58
58
|
}`,i8=function(t){o8(t,"."+q0+n8+Lw+`
|
|
59
|
-
.`+$0+a8+Lw)},o8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},Ow=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),s8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(tp(e)||f8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return gr(this,void 0,void 0,function(){var A,r,n,a,i=this;return ar(this,function(o){switch(o.label){case 0:return A=Ow.isSameOrigin(e),r=!ep(e)&&this._options.useCORS===!0&&qA.SUPPORT_CORS_IMAGES&&!A,n=!ep(e)&&!A&&!tp(e)&&typeof this._options.proxy=="string"&&qA.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!ep(e)&&!tp(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(h8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=qA.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),l8=/^data:image\/svg\+xml/i,c8=/^data:image\/.*;base64,/i,u8=/^data:image\/.*/i,f8=function(t){return qA.SUPPORT_SVG_DRAWING||!d8(t)},ep=function(t){return u8.test(t)},h8=function(t){return c8.test(t)},tp=function(t){return t.substr(0,4)==="blob"},d8=function(t){return t.substr(-3).toLowerCase()==="svg"||l8.test(t)},$e=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),Uo=function(t,e,A){return new $e(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Su=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=Uo(this.start,this.startControl,e),n=Uo(this.startControl,this.endControl,e),a=Uo(this.endControl,this.end,e),i=Uo(r,n,e),o=Uo(n,a,e),s=Uo(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Yr=function(t){return t.type===1},p8=function(){function t(e){var A=e.styles,r=e.bounds,n=tl(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=tl(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=tl(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=tl(A.borderBottomLeftRadius,r.width,r.height),y=h[0],B=h[1],b=[];b.push((a+s)/r.width),b.push((y+d)/r.width),b.push((i+B)/r.height),b.push((l+g)/r.height);var w=Math.max.apply(Math,b);w>1&&(a/=w,i/=w,s/=w,l/=w,d/=w,g/=w,y/=w,B/=w);var E=r.width-s,N=r.height-g,T=r.width-d,M=r.height-B,H=A.borderTopWidth,I=A.borderRightWidth,L=A.borderBottomWidth,P=A.borderLeftWidth,J=eA(A.paddingTop,e.bounds.width),F=eA(A.paddingRight,e.bounds.width),Q=eA(A.paddingBottom,e.bounds.width),O=eA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?oA(r.left+P/3,r.top+H/3,a-P/3,i-H/3,Pt.TOP_LEFT):new $e(r.left+P/3,r.top+H/3),this.topRightBorderDoubleOuterBox=a>0||i>0?oA(r.left+E,r.top+H/3,s-I/3,l-H/3,Pt.TOP_RIGHT):new $e(r.left+r.width-I/3,r.top+H/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?oA(r.left+T,r.top+N,d-I/3,g-L/3,Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I/3,r.top+r.height-L/3),this.bottomLeftBorderDoubleOuterBox=y>0||B>0?oA(r.left+P/3,r.top+M,y-P/3,B-L/3,Pt.BOTTOM_LEFT):new $e(r.left+P/3,r.top+r.height-L/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?oA(r.left+P*2/3,r.top+H*2/3,a-P*2/3,i-H*2/3,Pt.TOP_LEFT):new $e(r.left+P*2/3,r.top+H*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?oA(r.left+E,r.top+H*2/3,s-I*2/3,l-H*2/3,Pt.TOP_RIGHT):new $e(r.left+r.width-I*2/3,r.top+H*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?oA(r.left+T,r.top+N,d-I*2/3,g-L*2/3,Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I*2/3,r.top+r.height-L*2/3),this.bottomLeftBorderDoubleInnerBox=y>0||B>0?oA(r.left+P*2/3,r.top+M,y-P*2/3,B-L*2/3,Pt.BOTTOM_LEFT):new $e(r.left+P*2/3,r.top+r.height-L*2/3),this.topLeftBorderStroke=a>0||i>0?oA(r.left+P/2,r.top+H/2,a-P/2,i-H/2,Pt.TOP_LEFT):new $e(r.left+P/2,r.top+H/2),this.topRightBorderStroke=a>0||i>0?oA(r.left+E,r.top+H/2,s-I/2,l-H/2,Pt.TOP_RIGHT):new $e(r.left+r.width-I/2,r.top+H/2),this.bottomRightBorderStroke=d>0||g>0?oA(r.left+T,r.top+N,d-I/2,g-L/2,Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I/2,r.top+r.height-L/2),this.bottomLeftBorderStroke=y>0||B>0?oA(r.left+P/2,r.top+M,y-P/2,B-L/2,Pt.BOTTOM_LEFT):new $e(r.left+P/2,r.top+r.height-L/2),this.topLeftBorderBox=a>0||i>0?oA(r.left,r.top,a,i,Pt.TOP_LEFT):new $e(r.left,r.top),this.topRightBorderBox=s>0||l>0?oA(r.left+E,r.top,s,l,Pt.TOP_RIGHT):new $e(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?oA(r.left+T,r.top+N,d,g,Pt.BOTTOM_RIGHT):new $e(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=y>0||B>0?oA(r.left,r.top+M,y,B,Pt.BOTTOM_LEFT):new $e(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?oA(r.left+P,r.top+H,Math.max(0,a-P),Math.max(0,i-H),Pt.TOP_LEFT):new $e(r.left+P,r.top+H),this.topRightPaddingBox=s>0||l>0?oA(r.left+Math.min(E,r.width-I),r.top+H,E>r.width+I?0:Math.max(0,s-I),Math.max(0,l-H),Pt.TOP_RIGHT):new $e(r.left+r.width-I,r.top+H),this.bottomRightPaddingBox=d>0||g>0?oA(r.left+Math.min(T,r.width-P),r.top+Math.min(N,r.height-L),Math.max(0,d-I),Math.max(0,g-L),Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I,r.top+r.height-L),this.bottomLeftPaddingBox=y>0||B>0?oA(r.left+P,r.top+Math.min(M,r.height-L),Math.max(0,y-P),Math.max(0,B-L),Pt.BOTTOM_LEFT):new $e(r.left+P,r.top+r.height-L),this.topLeftContentBox=a>0||i>0?oA(r.left+P+O,r.top+H+J,Math.max(0,a-(P+O)),Math.max(0,i-(H+J)),Pt.TOP_LEFT):new $e(r.left+P+O,r.top+H+J),this.topRightContentBox=s>0||l>0?oA(r.left+Math.min(E,r.width+P+O),r.top+H+J,E>r.width+P+O?0:s-P+O,l-(H+J),Pt.TOP_RIGHT):new $e(r.left+r.width-(I+F),r.top+H+J),this.bottomRightContentBox=d>0||g>0?oA(r.left+Math.min(T,r.width-(P+O)),r.top+Math.min(N,r.height+H+J),Math.max(0,d-(I+F)),g-(L+Q),Pt.BOTTOM_RIGHT):new $e(r.left+r.width-(I+F),r.top+r.height-(L+Q)),this.bottomLeftContentBox=y>0||B>0?oA(r.left+P+O,r.top+M,Math.max(0,y-(P+O)),B-(L+Q),Pt.BOTTOM_LEFT):new $e(r.left+P+O,r.top+r.height-(L+Q))}return t}(),Pt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Pt||(Pt={}));var oA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Pt.TOP_LEFT:return new Su(new $e(t,l),new $e(t,l-o),new $e(s-i,e),new $e(s,e));case Pt.TOP_RIGHT:return new Su(new $e(t,e),new $e(t+i,e),new $e(s,l-o),new $e(s,l));case Pt.BOTTOM_RIGHT:return new Su(new $e(s,e),new $e(s,e+o),new $e(t+i,l),new $e(t,l));case Pt.BOTTOM_LEFT:default:return new Su(new $e(s,l),new $e(s-i,l),new $e(t,e+o),new $e(t,e))}},Tu=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},g8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},xu=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},m8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Ru=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),v8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),B8=function(t){return t.type===0},kw=function(t){return t.type===1},w8=function(t){return t.type===2},Hw=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},y8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},Dw=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),Pw=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new p8(this.container),this.container.styles.opacity<1&&this.effects.push(new v8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new m8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Tu(this.curves),o=xu(this.curves);Hw(i,o)?this.effects.push(new Ru(i,6)):(this.effects.push(new Ru(i,2)),this.effects.push(new Ru(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!kw(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Tu(r.curves),o=xu(r.curves);Hw(i,o)||n.unshift(new Ru(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return OA(s.target,e)})},t}(),Ap=function(t,e,A,r){t.container.elements.forEach(function(n){var a=OA(n.flags,4),i=OA(n.flags,2),o=new Pw(n,t);OA(n.styles.display,2048)&&r.push(o);var s=OA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new Dw(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(y,B){return d>y.element.container.styles.zIndex.order?(g=B,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(y,B){return d>=y.element.container.styles.zIndex.order?(h=B+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Ap(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),Ap(o,e,A,s);OA(n.flags,8)&&_w(n,s)})},_w=function(t,e){for(var A=t instanceof j0?t.start:1,r=t instanceof j0?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof hw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=ol(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},b8=function(t){var e=new Pw(t,null),A=new Dw(e),r=[];return Ap(e,A,A,r),_w(e.container,r),A},Ww=function(t,e){switch(e){case 0:return Xr(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Xr(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Xr(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Xr(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},E8=function(t,e){switch(e){case 0:return Xr(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Xr(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Xr(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Xr(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},C8=function(t,e){switch(e){case 0:return Xr(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Xr(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Xr(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Xr(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},U8=function(t,e){switch(e){case 0:return Iu(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Iu(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Iu(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Iu(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Iu=function(t,e){var A=[];return Yr(t)?A.push(t.subdivide(.5,!1)):A.push(t),Yr(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},Xr=function(t,e,A,r){var n=[];return Yr(t)?n.push(t.subdivide(.5,!1)):n.push(t),Yr(A)?n.push(A.subdivide(.5,!0)):n.push(A),Yr(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),Yr(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},Zw=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Vu=function(t){var e=t.styles,A=t.bounds,r=eA(e.paddingLeft,A.width),n=eA(e.paddingRight,A.width),a=eA(e.paddingTop,A.width),i=eA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},F8=function(t,e){return t===0?e.bounds:t===2?Vu(e):Zw(e)},N8=function(t,e){return t===0?e.bounds:t===2?Vu(e):Zw(e)},rp=function(t,e,A){var r=F8(No(t.styles.backgroundOrigin,e),t),n=N8(No(t.styles.backgroundClip,e),t),a=Q8(No(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=tl(No(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=S8(No(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},Fo=function(t){return Jt(t)&&t.value===yo.AUTO},Mu=function(t){return typeof t=="number"},Q8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(SA(i)&&o&&SA(o))return[eA(i,A.width),eA(o,A.height)];var s=Mu(a);if(Jt(i)&&(i.value===yo.CONTAIN||i.value===yo.COVER)){if(Mu(a)){var l=A.width/A.height;return l<a!=(i.value===yo.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Mu(r),d=Mu(n),g=u||d;if(Fo(i)&&(!o||Fo(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,y=d?n:r/a;return[h,y]}var B=u?r:A.width,b=d?n:A.height;return[B,b]}if(s){var w=0,E=0;return SA(i)?w=eA(i,A.width):SA(o)&&(E=eA(o,A.height)),Fo(i)?w=E*a:(!o||Fo(o))&&(E=w/a),[w,E]}var N=null,T=null;if(SA(i)?N=eA(i,A.width):o&&SA(o)&&(T=eA(o,A.height)),N!==null&&(!o||Fo(o))&&(T=u&&d?N/r*n:A.height),T!==null&&Fo(i)&&(N=u&&d?T/n*r:A.width),N!==null&&T!==null)return[N,T];throw new Error("Unable to calculate background-size for element")},No=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},S8=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new $e(Math.round(r.left),Math.round(r.top+i)),new $e(Math.round(r.left+r.width),Math.round(r.top+i)),new $e(Math.round(r.left+r.width),Math.round(s+r.top+i)),new $e(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new $e(Math.round(r.left+a),Math.round(r.top)),new $e(Math.round(r.left+a+o),Math.round(r.top)),new $e(Math.round(r.left+a+o),Math.round(r.height+r.top)),new $e(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new $e(Math.round(r.left+a),Math.round(r.top+i)),new $e(Math.round(r.left+a+o),Math.round(r.top+i)),new $e(Math.round(r.left+a+o),Math.round(r.top+i+s)),new $e(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new $e(Math.round(n.left),Math.round(n.top)),new $e(Math.round(n.left+n.width),Math.round(n.top)),new $e(Math.round(n.left+n.width),Math.round(n.height+n.top)),new $e(Math.round(n.left),Math.round(n.height+n.top))]}},T8="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",jw="Hidden Text",x8=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=T8,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(jw)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(jw)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),Jw=function(){function t(e,A){this.context=e,this.options=A}return t}(),R8=1e4,I8=function(t){cn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new x8(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),w8(A)&&(this.ctx.globalAlpha=A.opacity),B8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),kw(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return gr(this,void 0,void 0,function(){var r;return ar(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return gr(this,void 0,void 0,function(){return ar(this,function(r){switch(r.label){case 0:if(OA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=Z0(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=k8(A.fontFamily).join(", "),a=el(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return gr(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ar(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(y){d.forEach(function(B){switch(B){case 0:g.ctx.fillStyle=WA(r.color),g.renderTextWithLetterSpacing(y,r.letterSpacing,l);var b=r.textShadow;b.length&&y.text.trim().length&&(b.slice(0).reverse().forEach(function(w){g.ctx.shadowColor=WA(w.color),g.ctx.shadowOffsetX=w.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=w.offsetY.number*g.options.scale,g.ctx.shadowBlur=w.blur.number,g.renderTextWithLetterSpacing(y,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=WA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top+l),y.bounds.width,1);break;case 2:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top),y.bounds.width,1);break;case 3:g.ctx.fillRect(y.bounds.left,Math.ceil(y.bounds.top+u),y.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&y.text.trim().length&&(g.ctx.strokeStyle=WA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(y.text,y.bounds.left,y.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Vu(A),i=xu(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return gr(this,void 0,void 0,function(){var r,n,a,i,o,s,E,E,l,u,d,g,T,h,y,M,B,b,w,E,N,T,M;return ar(this,function(H){switch(H.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,H.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:H.sent(),H.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof cw))return[3,8];H.label=5;case 5:return H.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return E=H.sent(),this.renderReplacedElement(r,n,E),[3,8];case 7:return H.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof uw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof fw))return[3,12];H.label=9;case 9:return H.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return E=H.sent(),this.renderReplacedElement(r,n,E),[3,12];case 11:return H.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof mw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=H.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),H.label=14;case 14:if(r instanceof J0&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Eu?r.checked&&(this.ctx.save(),this.path([new $e(r.bounds.left+d*.39363,r.bounds.top+d*.79),new $e(r.bounds.left+d*.16,r.bounds.top+d*.5549),new $e(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new $e(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new $e(r.bounds.left+d*.72983,r.bounds.top+d*.23),new $e(r.bounds.left+d*.84,r.bounds.top+d*.34085),new $e(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=WA(dw),this.ctx.fill(),this.ctx.restore()):r.type===Cu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=WA(dw),this.ctx.fill(),this.ctx.restore())),V8(r)&&r.value.length){switch(g=this.createFontStyle(a),T=g[0],h=g[1],y=this.fontMetrics.getMetrics(T,h).baseline,this.ctx.font=T,this.ctx.fillStyle=WA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=L8(r.styles.textAlign),M=Vu(r),B=0,r.styles.textAlign){case 1:B+=M.width/2;break;case 2:B+=M.width;break}b=M.add(B,0,0,-M.height/2+1),this.ctx.save(),this.path([new $e(M.left,M.top),new $e(M.left+M.width,M.top),new $e(M.left+M.width,M.top+M.height),new $e(M.left,M.top+M.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new al(r.value,b),a.letterSpacing,y),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!OA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];E=void 0,N=w.url,H.label=15;case 15:return H.trys.push([15,17,,18]),[4,this.context.cache.match(N)];case 16:return E=H.sent(),this.ctx.drawImage(E,r.bounds.left-(E.width+10),r.bounds.top),[3,18];case 17:return H.sent(),this.context.logger.error("Error loading list-style-image "+N),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(T=this.createFontStyle(a)[0],this.ctx.font=T,this.ctx.fillStyle=WA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",M=new zn(r.bounds.left,r.bounds.top+eA(r.styles.paddingTop,r.bounds.width),r.bounds.width,jB(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new al(A.listValue,M),a.letterSpacing,jB(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),H.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return gr(this,void 0,void 0,function(){var r,n,w,a,i,w,o,s,w,l,u,w,d,g,w,h,y,w,B,b,w;return ar(this,function(E){switch(E.label){case 0:if(OA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:E.sent(),r=0,n=A.negativeZIndex,E.label=2;case 2:return r<n.length?(w=n[r],[4,this.renderStack(w)]):[3,5];case 3:E.sent(),E.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:E.sent(),a=0,i=A.nonInlineLevel,E.label=7;case 7:return a<i.length?(w=i[a],[4,this.renderNode(w)]):[3,10];case 8:E.sent(),E.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,E.label=11;case 11:return o<s.length?(w=s[o],[4,this.renderStack(w)]):[3,14];case 12:E.sent(),E.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,E.label=15;case 15:return l<u.length?(w=u[l],[4,this.renderStack(w)]):[3,18];case 16:E.sent(),E.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,E.label=19;case 19:return d<g.length?(w=g[d],[4,this.renderNode(w)]):[3,22];case 20:E.sent(),E.label=21;case 21:return d++,[3,19];case 22:h=0,y=A.zeroOrAutoZIndexOrTransformedOrOpacity,E.label=23;case 23:return h<y.length?(w=y[h],[4,this.renderStack(w)]):[3,26];case 24:E.sent(),E.label=25;case 25:return h++,[3,23];case 26:B=0,b=A.positiveZIndex,E.label=27;case 27:return B<b.length?(w=b[B],[4,this.renderStack(w)]):[3,30];case 28:E.sent(),E.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=Yr(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),Yr(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return gr(this,void 0,void 0,function(){var r,n,a,i,o,s;return ar(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,J,K,re,O,_,L,y,J,K,re,O,_,B,b,w,E,N,T,M,H,I,L,P,J,F,Q,O,_,te,K,re,X,oe,$,ce,U,k,Z,G;return ar(this,function(ee){switch(ee.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,ee.label=1;case 1:return ee.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=ee.sent(),[3,4];case 3:return ee.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=rp(A,r,[d.width,d.height,d.width/d.height]),J=h[0],K=h[1],re=h[2],O=h[3],_=h[4],L=a.ctx.createPattern(a.resizeImage(d,O,_),"repeat"),a.renderRepeat(J,L,K,re)),[3,6];case 5:BO(u)?(y=rp(A,r,[null,null,null]),J=y[0],K=y[1],re=y[2],O=y[3],_=y[4],B=dO(u.angle,O,_),b=B[0],w=B[1],E=B[2],N=B[3],T=B[4],M=document.createElement("canvas"),M.width=O,M.height=_,H=M.getContext("2d"),I=H.createLinearGradient(w,N,E,T),VB(u.stops,b).forEach(function(Ae){return I.addColorStop(Ae.stop,WA(Ae.color))}),H.fillStyle=I,H.fillRect(0,0,O,_),O>0&&_>0&&(L=a.ctx.createPattern(M,"repeat"),a.renderRepeat(J,L,K,re))):wO(u)&&(P=rp(A,r,[null,null,null]),J=P[0],F=P[1],Q=P[2],O=P[3],_=P[4],te=u.position.length===0?[S0]:u.position,K=eA(te[0],O),re=eA(te[te.length-1],_),X=pO(u,K,re,O,_),oe=X[0],$=X[1],oe>0&&$>0&&(ce=a.ctx.createRadialGradient(F+K,Q+re,0,F+K,Q+re,oe),VB(u.stops,oe*2).forEach(function(Ae){return ce.addColorStop(Ae.stop,WA(Ae.color))}),a.path(J),a.ctx.fillStyle=ce,oe!==$?(U=A.bounds.left+.5*A.bounds.width,k=A.bounds.top+.5*A.bounds.height,Z=$/oe,G=1/Z,a.ctx.save(),a.ctx.translate(U,k),a.ctx.transform(1,0,0,Z,0,0),a.ctx.translate(-U,-k),a.ctx.fillRect(F,G*(Q-k)+k,O,_*G),a.ctx.restore()):a.ctx.fill())),ee.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return gr(this,void 0,void 0,function(){return ar(this,function(a){return this.path(Ww(n,r)),this.ctx.fillStyle=WA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return gr(this,void 0,void 0,function(){var i,o;return ar(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=E8(a,n),this.path(i),this.ctx.fillStyle=WA(A),this.ctx.fill(),o=C8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return gr(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ar(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Qa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=M8(No(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Qa(r.backgroundColor)||(this.ctx.fillStyle=WA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var y=Tu(A.curves),B=h.inset?0:R8,b=y8(y,-B+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(y),d.ctx.clip(),d.mask(b)):(d.mask(y),d.ctx.clip(),d.path(b)),d.ctx.shadowOffsetX=h.offsetX.number+B,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=WA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?WA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Qa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return gr(this,void 0,void 0,function(){var o,s,l,u,d,g,h,y,B,b,w,E,N,T,M,H,M,H;return ar(this,function(I){return this.ctx.save(),o=U8(a,n),s=Ww(a,n),i===2&&(this.path(s),this.ctx.clip()),Yr(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),Yr(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),y=r<3?r*3:r*2,B=r<3?r*2:r,i===3&&(y=r,B=r),b=!0,h<=y*2?b=!1:h<=y*2+B?(w=h/(2*y+B),y*=w,B*=w):(E=Math.floor((h+B)/(y+B)),N=(h-E*y)/(E-1),T=(h-(E+1)*y)/E,B=T<=0||Math.abs(B-N)<Math.abs(B-T)?N:T),b&&(i===3?this.ctx.setLineDash([0,y+B]):this.ctx.setLineDash([y,B])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=WA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(Yr(s[0])&&(M=s[3],H=s[0],this.ctx.beginPath(),this.formatPath([new $e(M.end.x,M.end.y),new $e(H.start.x,H.start.y)]),this.ctx.stroke()),Yr(s[1])&&(M=s[1],H=s[2],this.ctx.beginPath(),this.formatPath([new $e(M.end.x,M.end.y),new $e(H.start.x,H.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return gr(this,void 0,void 0,function(){var r;return ar(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=WA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=b8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Jw),V8=function(t){return t instanceof gw||t instanceof pw?!0:t instanceof J0&&t.type!==Cu&&t.type!==Eu},M8=function(t,e){switch(t){case 0:return Tu(e);case 2:return g8(e);case 1:default:return xu(e)}},L8=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},O8=["-apple-system","system-ui"],k8=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return O8.indexOf(e)===-1}):t},H8=function(t){cn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return gr(this,void 0,void 0,function(){var r,n;return ar(this,function(a){switch(a.label){case 0:return r=W0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,D8(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=WA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Jw),D8=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},P8=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Wc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Wc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Wc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Wc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),_8=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new P8({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new s8(this,e)}return t.instanceCount=1,t}(),Kw=function(t,e){return e===void 0&&(e={}),W8(t,e)};typeof window<"u"&&Ow.setContext(window);var W8=function(t,e){return gr(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,y,B,b,w,E,N,T,M,I,H,I,L,P,J,F,Q,O,_,te,K,re,X,oe,$,ce,U,k,Z;return ar(this,function(G){switch(G.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(L=e.allowTaint)!==null&&L!==void 0?L:!1,imageTimeout:(P=e.imageTimeout)!==null&&P!==void 0?P:15e3,proxy:e.proxy,useCORS:(J=e.useCORS)!==null&&J!==void 0?J:!1},a=s0({logging:(F=e.logging)!==null&&F!==void 0?F:!0,cache:e.cache},n),i={windowWidth:(Q=e.windowWidth)!==null&&Q!==void 0?Q:r.innerWidth,windowHeight:(O=e.windowHeight)!==null&&O!==void 0?O:r.innerHeight,scrollX:(_=e.scrollX)!==null&&_!==void 0?_:r.pageXOffset,scrollY:(te=e.scrollY)!==null&&te!==void 0?te:r.pageYOffset},o=new zn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new _8(a,o),l=(K=e.foreignObjectRendering)!==null&&K!==void 0?K:!1,u={allowTaint:(re=e.allowTaint)!==null&&re!==void 0?re:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Mw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=G.sent(),y=G0(g)||j6(g)?yM(g.ownerDocument):Zc(s,g),B=y.width,b=y.height,w=y.left,E=y.top,N=Z8(s,g,e.backgroundColor),T={canvas:e.canvas,backgroundColor:N,scale:(oe=(X=e.scale)!==null&&X!==void 0?X:r.devicePixelRatio)!==null&&oe!==void 0?oe:1,x:(($=e.x)!==null&&$!==void 0?$:0)+w,y:((ce=e.y)!==null&&ce!==void 0?ce:0)+E,width:(U=e.width)!==null&&U!==void 0?U:Math.ceil(B),height:(k=e.height)!==null&&k!==void 0?k:Math.ceil(b)},l?(s.logger.debug("Document cloned, using foreign object rendering"),I=new H8(s,T),[4,I.render(g)]):[3,3];case 2:return M=G.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+w+","+E+" with size "+B+"x"+b+" using computed rendering"),s.logger.debug("Starting DOM parsing"),H=Bw(s,g),N===H.styles.backgroundColor&&(H.styles.backgroundColor=Xn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+T.x+","+T.y+" with size "+T.width+"x"+T.height),I=new I8(s,T),[4,I.render(H)];case 4:M=G.sent(),G.label=5;case 5:return(!((Z=e.removeContainer)!==null&&Z!==void 0)||Z)&&(Mw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,M]}})})},Z8=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?Al(t,getComputedStyle(r.documentElement).backgroundColor):Xn.TRANSPARENT,a=r.body?Al(t,getComputedStyle(r.body).backgroundColor):Xn.TRANSPARENT,i=typeof A=="string"?Al(t,A):A===null?Xn.TRANSPARENT:4294967295;return e===r.documentElement?Qa(n)?Qa(a)?i:a:n:i};const Gw=Object.freeze(Object.defineProperty({__proto__:null,default:Kw},Symbol.toStringTag,{value:"Module"})),Cq="",j8={class:"label-designer"},J8={class:"toolbar"},K8={class:"center-container"},G8={key:0,class:"loader-container"},z8={class:"center-toolbar"},Y8={class:"zoom-controls"},X8=["disabled"],q8=["disabled"],$8={class:"canvas-container"},eH={class:"ruler-horizontal"},tH={class:"ruler-vertical"},AH={key:0,class:"drag-extend-lines"},rH={key:1,class:"alignment-guides"},nH=["data-item-id","onMousedown"],aH=["onMousedown"],iH=["onMousedown"],oH=["onMousedown"],sH=["onMousedown"],lH=["onMousedown"],cH=["onMousedown"],uH=["onMousedown"],fH=["onMousedown"],hH=["onMousedown"],dH=["onMousedown"],pH=["onClick"],gH={class:"property-panel",tabindex:"0"},mH={class:"property-panel-title"},vH=["innerHTML"],BH={class:"position-controls"},wH={class:"control-group"},yH={class:"number-input"},bH=["value"],EH={class:"control-group"},CH={class:"number-input"},UH=["value"],FH={key:0,class:"control-group"},NH={class:"number-input"},QH={key:1,class:"control-group"},SH={class:"number-input"},TH={class:"control-group"},xH={class:"number-input"},RH={key:2,class:"control-group"},IH={class:"switch-input"},Lu=.05,VH=_A({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ue;return((ue=r.value)==null?void 0:ue.printWidth)||0}),u=f.computed(()=>{var ue;return((ue=r.value)==null?void 0:ue.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new ui(BA.CACHE.STYLE_CACHE_SIZE),y=new ui(BA.CACHE.BOUNDING_BOX_CACHE_SIZE),B=new Map(_v.map(ue=>[ue.type,ue])),{selectedItems:b,selectItem:w,getCurrentSelected:E,clearSelection:N}=hM(),{dragging:T,dragItem:M,startDrag:H}=uM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:w,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{O()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),_()},onDragUpdate:()=>{O()}}),{startResize:I,resizing:L,resizeDirection:P,resizeItem:J}=fM(l,u,o,b),{alignmentGuides:F,showGuides:Q,updateAlignmentGuides:O,clearAlignmentGuides:_}=vM({items:i,dragItem:M,resizeItem:J,dragging:T,resizing:L,resizeDirection:P,canvasWidth:l,canvasHeight:u}),{startRotate:te}=dM();f.watch(()=>b.value,()=>{h.clear()},{deep:!0}),f.watch(()=>L.value,ue=>{ue?O():_()}),f.watch(()=>{var ue;return(ue=J.value)==null?void 0:ue.props},()=>{L.value&&O()},{deep:!0}),f.watch(()=>M.value,()=>{(T.value||L.value)&&O()}),f.watch(()=>J.value,()=>{(T.value||L.value)&&O()}),f.watch(()=>i.value,()=>{(T.value||L.value)&&O()},{deep:!0});const K=ue=>{const q=`${ue.id}_${Ve(ue.props.x,1)}_${Ve(ue.props.y,1)}_${ue.props.width}_${ue.props.height}_${ue.props.rotation}`;if(y.has(q))return y.get(q);const Xe=(ue.props.rotation||0)*Math.PI/180,qe=[{x:0,y:0},{x:ue.props.width,y:0},{x:ue.props.width,y:ue.props.height},{x:0,y:ue.props.height}],ze=ue.props.width/2,Ye=ue.props.height/2,We=qe.map(it=>{const Le=it.x-ze,De=it.y-Ye,ve=Le*Math.cos(Xe)-De*Math.sin(Xe),Ut=Le*Math.sin(Xe)+De*Math.cos(Xe);return{x:Ve(ve+ze+ue.props.x,3),y:Ve(Ut+Ye+ue.props.y,3)}});return y.set(q,We),We},re=ue=>{const q=K(ue),be=q.map(Le=>Le.x),Xe=q.map(Le=>Le.y),qe=Ve(Math.min(...be),3),ze=Ve(Math.max(...be),3),Ye=Ve(Math.min(...Xe),3),We=Ve(Math.max(...Xe),3);return{minX:qe,maxX:ze,minY:Ye,maxY:We,width:Ve(ze-qe,3),height:Ve(We-Ye,3),centerX:Ve((qe+ze)/2,3),centerY:Ve((Ye+We)/2,3)}},X=(ue,q)=>{const be=re(ue),qe=(Ye=>Ye.type==="rectangle"?parseFloat(Ye.props.LineWidth||"0.5")/3.78:0)(ue),ze=(Ye,We,it)=>{if(it==="rectangle"&&qe>0){const Le=qe/2;if(We==="left"||We==="top")return Ye-Le;if(We==="right"||We==="bottom")return Ye+Le}return Ye};if(ue.type==="line")switch(q){case"left":return{left:Ve(ze(be.minX,q,ue.type),3)+"mm"};case"right":return{left:Ve(ze(be.maxX,q,ue.type),3)+"mm"};case"top":return{top:Ve(ze(be.minY,q,ue.type),3)+"mm"};case"bottom":return{top:Ve(ze(be.maxY,q,ue.type),3)+"mm"};default:return{}}if(ue.type==="verline"&&q==="right"){const We=parseFloat(ue.props.LineWidth||"0.5")/3.78;return{left:Ve(ze(be.minX+We,q,ue.type),3)+"mm"}}switch(q){case"left":return{left:Ve(ze(be.minX,q,ue.type),3)+"mm"};case"right":return{left:Ve(ze(be.maxX,q,ue.type),3)+"mm"};case"top":return{top:Ve(ze(be.minY,q,ue.type),3)+"mm"};case"bottom":return{top:Ve(ze(be.maxY,q,ue.type),3)+"mm"};default:return{}}},oe=()=>{f.nextTick(()=>{const ue=document.querySelector(".canvas-container");if(!ue||!l.value||!u.value)return;const q=ue.getBoundingClientRect(),be=lo(l.value),Xe=lo(u.value),qe=16,ze=21,Ye=21,We=20,it=24,Le=24,De=q.width-qe*2-ze-Le,ve=q.height-qe-Ye-We-it;let Ut=De/be,ft=ve/Xe,Ht=Math.min(Ut,ft);Ht=Ht*.95;const Ke=Math.min(4,Ht);s=Math.max(.8,Math.min(Ke,Ht)),o.value=$(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function $(ue,q){ue=ue.toString();let be=ue.indexOf(".");return be!==-1?ue=ue.substring(0,q+be+1):ue=ue.substring(0),Number(parseFloat(ue).toFixed(q))}const ce=ue=>B.get(ue)||null,U=ue=>{const q=b.value.indexOf(ue),be=q===b.value.length-1,Xe=q!==-1,qe=`${ue.id}_${Math.round(ue.props.x*10)}_${Math.round(ue.props.y*10)}_${ue.props.width}_${ue.props.height}_${ue.props.rotation}_${Xe}_${be}`;if(h.has(qe))return h.get(qe);const ze={width:ue.props.width+"mm",height:ue.props.height+"mm",transform:`translate(${ue.props.x}mm, ${ue.props.y}mm) rotate(${ue.props.rotation}deg)`};return Xe?be?ze.zIndex=1e3:ze.zIndex=999:ze.zIndex=10,h.set(qe,ze),ze},k=ue=>{const q=b.value.some(Xe=>Xe.id===ue.id),be=E()===ue;return{"component-selected":q,"component-current":q&&be,"no-outline":q&&(ue.type==="line"||ue.type==="verline")}},Z=(ue,q)=>{const Xe=((ue.props.rotation||0)%360+360)%360;if(ue.type==="line"&&(q==="left"||q==="right")){let We;const Le=((q==="left"?270:90)+Xe)%360;return Le>=337.5||Le<22.5?We="n-resize":Le>=22.5&&Le<67.5?We="ne-resize":Le>=67.5&&Le<112.5?We="e-resize":Le>=112.5&&Le<157.5?We="se-resize":Le>=157.5&&Le<202.5?We="s-resize":Le>=202.5&&Le<247.5?We="sw-resize":Le>=247.5&&Le<292.5?We="w-resize":Le>=292.5&&Le<337.5&&(We="nw-resize"),{cursor:We,top:"50%",transform:"translateY(-50%)"}}if(ue.type==="verline"&&(q==="top"||q==="bottom")){let We;const Le=((q==="top"?0:180)+Xe)%360;return Le>=337.5||Le<22.5?We="n-resize":Le>=22.5&&Le<67.5?We="ne-resize":Le>=67.5&&Le<112.5?We="e-resize":Le>=112.5&&Le<157.5?We="se-resize":Le>=157.5&&Le<202.5?We="s-resize":Le>=202.5&&Le<247.5?We="sw-resize":Le>=247.5&&Le<292.5?We="w-resize":Le>=292.5&&Le<337.5&&(We="nw-resize"),{cursor:We,left:"50%",transform:"translateX(-50%)"}}const ze=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[q]+Xe)%360;let Ye="pointer";return ze>=337.5||ze<22.5?Ye="n-resize":ze>=22.5&&ze<67.5?Ye="ne-resize":ze>=67.5&&ze<112.5?Ye="e-resize":ze>=112.5&&ze<157.5?Ye="se-resize":ze>=157.5&&ze<202.5?Ye="s-resize":ze>=202.5&&ze<247.5?Ye="sw-resize":ze>=247.5&&ze<292.5?Ye="w-resize":ze>=292.5&&ze<337.5&&(Ye="nw-resize"),{cursor:Ye,display:"block",visibility:"visible",opacity:"1"}},G=()=>{o.value<4&&(o.value+=.1)},ee=()=>{o.value>.8&&(o.value-=.1)},Ae=()=>{var q;const ue=E();return!ue||ue.type!=="line"?((q=ue==null?void 0:ue.props)==null?void 0:q.x)||0:ue.props.x1||ue.props.x||0},he=()=>{var q;const ue=E();return!ue||ue.type!=="line"?((q=ue==null?void 0:ue.props)==null?void 0:q.y)||0:ue.props.y1||ue.props.y||0},pe=(ue,q)=>{const be=E();if(!be||be.type!=="line"){Je(ue,q);return}const Xe=Number(q);if(isNaN(Xe))return;const qe=be.props.width||15,ze=be.props.rotation||0,We=(be.props.height||.5)/2,it=qe/2,Le=We,De=ze*Math.PI/180,ve=Math.cos(De),Ut=Math.sin(De),Ht=-(qe/2),Mt=0,Ke=Ht*ve-Mt*Ut,Rt=Ht*Ut+Mt*ve;if(ue==="x"){const Wt=Xe-it-Ke;be.props.x=Number(Wt.toFixed(2))}else if(ue==="y"){const Wt=Xe-Le-Rt;be.props.y=Number(Wt.toFixed(2))}};function xe(ue){const q=document.activeElement.tagName.toLowerCase();if(q==="input"||q==="textarea")return;const be=E();if(!be)return;const Xe=Number(be.props.width)||0,qe=Number(be.props.height)||0;let ze=be.props.x,Ye=be.props.y,We=!1;if(ue.key==="ArrowLeft"?(ze=Ve(be.props.x-Lu),We=!0):ue.key==="ArrowRight"?(ze=Ve(be.props.x+Lu),We=!0):ue.key==="ArrowUp"?(Ye=Ve(be.props.y-Lu),We=!0):ue.key==="ArrowDown"&&(Ye=Ve(be.props.y+Lu),We=!0),We){const it=l.value-Xe,Le=u.value-qe;ze<0?ze=0:ze>it&&(ze=it),Ye<0?Ye=0:Ye>Le&&(Ye=Le),(ba(be.props.x,ze)||ba(be.props.y,Ye))&&(be.props.x=ze,be.props.y=Ye),ue.preventDefault()}}const Qe=({e:ue,comp:q,previewDiv:be})=>{var Xe,qe;(Xe=ue==null?void 0:ue.dataTransfer)==null||Xe.setData("comp",JSON.stringify(q)),document.body.appendChild(be),(qe=ue==null?void 0:ue.dataTransfer)==null||qe.setDragImage(be,0,0),setTimeout(()=>document.body.removeChild(be),0)},He=async ue=>{var tA,Xt,Tt;ue.preventDefault();const q=JSON.parse(((Xt=(tA=ue==null?void 0:ue.dataTransfer)==null?void 0:tA.getData)==null?void 0:Xt.call(tA,"comp"))||"{}")||{},be=(q==null?void 0:q.type)||"";if(!be)return;const Xe=document.querySelector("#design").getBoundingClientRect(),qe=(ue.clientX-Xe.left)/o.value,ze=(ue.clientY-Xe.top)/o.value,Ye=_e.value[be]||{};let We=gv(qe),it=gv(ze);const Le=Ye.width,De=Ye.height,ve=l.value-Le,Ut=u.value-De;We=Math.max(0,Math.min(We,ve)),it=Math.max(0,Math.min(it,Ut));const{propertyPanel:ft,...Ht}=Ye;let Mt={...Ht,x:Ve(We),y:Ve(it),width:Ve(Le),height:Ve(De)};if((Tt=_e.value[be])!=null&&Tt.propertyPanel){const Kt=fi(_e.value[be].propertyPanel)||{};if(Mt={...Mt,...Kt},be==="line"&&Kt.LineWidth){const kA=parseFloat(Kt.LineWidth)*.3528;Mt.height=Ve(kA,3)}}const Rt=((Kt,Pr)=>{const{width:kA,height:RA,lockAspectRatio:HA}=Kt;let qt=kA,DA=RA;const IA=l.value-2,JA=u.value-2;let Sr=!1;if(kA>IA&&(qt=IA,Sr=!0),RA>JA&&(DA=JA,Sr=!0),HA&&Sr){const _n=IA/kA,st=JA/RA,ae=Math.min(_n,st);qt=Ve(kA*ae,2),DA=Ve(RA*ae,2),qt=Math.min(qt,IA),DA=Math.min(DA,JA)}return{width:qt,height:DA}})(Mt);if(Mt.width=Rt.width,Mt.height=Rt.height,Rt.width!==Le||Rt.height!==De){const Kt=l.value-Rt.width,Pr=u.value-Rt.height;We=Math.max(0,Math.min(We,Kt)),it=Math.max(0,Math.min(it,Pr)),Mt.x=Ve(We),Mt.y=Ve(it)}const Wt={id:ct(),type:be,props:Mt};i.value.push(Wt),w(Wt)};function ke(ue){let q=ue.target;for(;q&&q!==document.querySelector("#design");){if(q.classList&&(q.classList.contains("canvas-item")||q.classList.contains("resize-handle")||q.classList.contains("delete-btn")||q.classList.contains("rotate-handle")||q.classList.contains("property-panel")||q.tagName==="INPUT"||q.tagName==="TEXTAREA"||q.tagName==="BUTTON"))return;q=q.parentElement}N()}const nt=(ue,q)=>{if(ue.stopPropagation(),b.value.length===0){w(q),H(ue,q);return}if(E()===q){H(ue,q);return}w(q),H(ue,q)},Be=ue=>{if(h.clear(),y.clear(),i.value.find(be=>be.id===ue)&&(i.value=i.value.filter(be=>be.id!==ue)),b.value.some(be=>be.id===ue)){const be=b.value.filter(Xe=>Xe.id!==ue);b.value=be}f.nextTick(()=>{})},Y=ue=>{var be;const q=document.activeElement.tagName.toLowerCase();q==="input"||q==="textarea"||(ue.key==="Delete"||ue.key==="Backspace")&&b.value.length>0&&Be((be=E())==null?void 0:be.id)},{handleMouseWheel:ot,handleInputChange:Je,adjustRotation:Fe}=gM(b,l,u),Ie=()=>{setTimeout(()=>{const ue=document.querySelector(".center-container");if(!ue)return;const q=ue.getBoundingClientRect();ue.style.height=`calc(100vh - ${q==null?void 0:q.top}px)`,oe()},200)};f.watch(()=>A.templateInfo,(ue,q)=>{ue!==q&&(r.value=ue||{},i.value=(ue==null?void 0:ue.items)||[])},{deep:!0,immediate:!0});const{handleCopy:Oe,handlePaste:Me}=mM(i,b,l,u),_e=f.ref({}),at=f.ref(!1),rt=async ue=>{try{at.value=!1,_e.value=await OV(ue),at.value=!0}catch{_e.value={},at.value=!0}};f.watch(()=>A.templateType,async ue=>{try{await rt(ue),N(),h.clear(),y.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{at.value||await rt(A.templateType),window.addEventListener("resize",Ie),window.addEventListener("keydown",Y),window.addEventListener("keydown",Oe),window.addEventListener("keydown",Me),window.addEventListener("keydown",xe),Ie(),mt()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",Ie),window.removeEventListener("keydown",Y),window.removeEventListener("keydown",Oe),window.removeEventListener("keydown",Me),window.removeEventListener("keydown",xe),h.clear(),y.clear()});function ct(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ue=>{const q=Math.random()*16|0;return(ue==="x"?q:q&3|8).toString(16)})}const pt=ue=>{var be;if(!_e.value||!_e.value[ue])return{};const q=_e.value[ue]||{};return ue==="image"&&((be=A.config)!=null&&be.image)?{...q,image:{...q.image,...A.config.image}}:q},wt=()=>pM(i,r.value),ut=ue=>{r.value.graphData=ue||{},mt()},mt=()=>{var q;const ue=wM(r.value.graphData)||"";ue&&((q=document.querySelector("#design"))==null||q.appendChild(ue))},Pe=async ue=>{var be;const q=JSON.parse(JSON.stringify(ue));for(const Xe of q)if(Xe.type==="image"&&((be=Xe.props)!=null&&be.ImageSrc)){const qe=Xe.props.ImageSrc;typeof qe=="object"&&qe.fileSrc&&qe.fileSrc}return q},Yt=()=>new Promise(async(ue,q)=>{var be;try{N();const Xe=JSON.parse(JSON.stringify(i.value)),qe=((be=A.config)==null?void 0:be.textDisplayPriority)||"text";Xe==null||Xe.forEach(it=>{var Le,De,ve,Ut,ft,Ht;if(it.type=="text"){let Mt="";const Ke=((Le=it==null?void 0:it.props)==null?void 0:Le.FieldName)||[];if(Array.isArray(Ke)){const Rt=((De=it==null?void 0:it.props)==null?void 0:De.FieldConnector)||" ";Mt=((ve=Ke.map(Wt=>{var tA,Xt,Tt;return(Tt=(Xt=(tA=A.options)==null?void 0:tA.fields)==null?void 0:Xt.find(Kt=>Kt.value==Wt))==null?void 0:Tt.label}))==null?void 0:ve.join(Rt))||""}else Mt=((Ht=(ft=(Ut=A.options)==null?void 0:Ut.fields)==null?void 0:ft.find(Rt=>{var Wt;return Rt.value==((Wt=it==null?void 0:it.props)==null?void 0:Wt.FieldName)}))==null?void 0:Ht.label)||"";it.props.Text=qe=="text"?it.props.Text||Mt:Mt||it.props.Text}});const ze=await Pe(Xe),Ye=[...i.value];i.value=ze;const We=()=>{var De;const it=((De=document.querySelector("#design"))==null?void 0:De.querySelectorAll("img"))||[],Le=Array.from(it).map(ve=>ve.complete?Promise.resolve():new Promise(Ut=>{ve.onload=ve.onerror=Ut}));return Promise.all(Le)};f.nextTick(async()=>{var ve;await new Promise(Ut=>setTimeout(Ut,100)),await We(),(((ve=document.querySelector("#design"))==null?void 0:ve.querySelectorAll("img"))||[]).forEach((Ut,ft)=>{});const Le=document.querySelector("#design");if(!Le){q(new Error("找不到要转换的DOM元素"));return}const De=o.value;We().then(()=>{Kw(Le,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:Ut=>{const ft=Ut.querySelector(".canvas-wrapper");if(ft){const Rt=ft.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();ft.style.transform=Rt||"none",ft.style.opacity="1"}const Ht=Ut.querySelector("#design");if(Ht){const Ke=window.getComputedStyle(Le);for(let Rt=0;Rt<Ke.length;Rt++){const Wt=Ke[Rt];Ht.style[Wt]=Ke.getPropertyValue(Wt)}}Ut.querySelectorAll("img").forEach(Ke=>{Ke.style.imageRendering="high-quality",Ke.style.webkitImageRendering="high-quality",Ke.style.mozImageRendering="high-quality",Ke.style.objectFit="contain",Ke.style.objectPosition="center"})}}).then(Ut=>{i.value=Ye;const ft=Ut.toDataURL("image/png");ue({data:wt(),image:ft})}).catch(Ut=>{i.value=Ye,q(Ut)})}).catch(Ut=>{q(Ut)})})}catch(Xe){q(Xe)}}),Qt=()=>new Promise((ue,q)=>{i.value.forEach(Xe=>{if(Xe.type==="image"&&!Xe.props.ImageSrc)return Ns.warning("图片控件请选择图片!"),q("图片控件请选择图片!")}),ue(!0)});return e({getJson:()=>Qt().then(()=>wt()),clear:()=>{i.value=[],N()},snapshot:()=>Qt().then(()=>Yt())}),(ue,q)=>{var it,Le,De;const be=f.resolveComponent("el-icon-refresh"),Xe=f.resolveComponent("el-icon"),qe=f.resolveComponent("el-icon-close"),ze=f.resolveComponent("el-icon-info-filled"),Ye=f.resolveComponent("el-tooltip"),We=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",j8,[f.createElementVNode("div",J8,[f.createVNode(jV,{onDragStart:Qe,config:t.config,propsConfig:_e.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",K8,[a.value?(f.openBlock(),f.createElementBlock("div",G8,[...q[32]||(q[32]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",z8,[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(cM,{"graph-data":(it=r.value)==null?void 0:it.graphData,onSuccess:ut},null,8,["graph-data"]),q[33]||(q[33]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",Y8,[f.createElementVNode("button",{onClick:ee,disabled:o.value<=.8},"-",8,X8),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:G,disabled:o.value>=4},"+",8,q8)])]),f.createElementVNode("div",$8,[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",eH,[f.createVNode(Wv,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",tH,[f.createVNode(Wv,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:He,onDragover:q[1]||(q[1]=f.withModifiers(()=>{},["prevent"])),onPointerdown:ke},[f.unref(T)&&f.unref(M)?(f.openBlock(),f.createElementBlock("div",AH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(X(f.unref(M),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(X(f.unref(M),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(X(f.unref(M),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(X(f.unref(M),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(Q)?(f.openBlock(),f.createElementBlock("div",rH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).horizontal,(ve,Ut)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${Ut}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${ve.type}`]),style:f.normalizeStyle({top:`${ve.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).vertical,(ve,Ut)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${Ut}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${ve.type}`]),style:f.normalizeStyle({left:`${ve.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,ve=>{var Ut;return f.openBlock(),f.createElementBlock("div",{key:ve.id,class:f.normalizeClass(["canvas-item",k(ve)]),style:f.normalizeStyle(U(ve)),"data-item-id":ve.id,onMousedown:ft=>nt(ft,ve)},[f.unref(E)()===ve?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ve.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ve.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(Z(ve,"top")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"top"),["stop"])},null,44,aH)):f.createCommentVNode("",!0),ve.type!=="verline"&&ve.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(Z(ve,"right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"right"),["stop"])},null,44,iH)):f.createCommentVNode("",!0),ve.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(Z(ve,"bottom")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"bottom"),["stop"])},null,44,oH)):f.createCommentVNode("",!0),ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":ve.type==="line"}]),style:f.normalizeStyle(Z(ve,"left")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"left"),["stop"])},null,46,sH)):f.createCommentVNode("",!0),ve.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(Z(ve,"right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"right"),["stop"])},null,44,lH)):f.createCommentVNode("",!0)],64)),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(Z(ve,"top-left")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"top-left"),["stop"])},null,44,cH)):f.createCommentVNode("",!0),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(Z(ve,"top-right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"top-right"),["stop"])},null,44,uH)):f.createCommentVNode("",!0),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(Z(ve,"bottom-right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"bottom-right"),["stop"])},null,44,fH)):f.createCommentVNode("",!0),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(Z(ve,"bottom-left")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"bottom-left"),["stop"])},null,44,hH)):f.createCommentVNode("",!0),ve.type!=="verline"&&!f.unref(T)?(f.openBlock(),f.createElementBlock("div",{key:5,class:"rotate-handle",onMousedown:f.withModifiers(ft=>f.unref(te)(ft,ve),["stop"])},[f.createVNode(Xe,{size:"8"},{default:f.withCtx(()=>[f.createVNode(be)]),_:1})],40,dH)):f.createCommentVNode("",!0),f.unref(T)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",{key:6,class:"delete-btn",onClick:f.withModifiers(ft=>Be(ve.id),["stop"]),onMousedown:q[0]||(q[0]=f.withModifiers(()=>{},["stop"])),title:"删除"},[f.createVNode(Xe,{size:"8"},{default:f.withCtx(()=>[f.createVNode(qe)]),_:1})],40,pH))],64)):f.createCommentVNode("",!0),ve.props&&at.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((Ut=ce(ve.type))==null?void 0:Ut.component)||null),{key:`${ve.id}-${ve.type}`,modelValue:{...ve.props,__selected:f.unref(E)()===ve,options:A.options},propsConfig:_e.value,"onUpdate:modelValue":ft=>{const{__selected:Ht,options:Mt,...Ke}=ft;Object.keys(Ke).forEach(Rt=>{Ke[Rt]!==void 0&&(ve.props[Rt]=Ke[Rt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,nH)}),128))],36)],4)])]),f.createElementVNode("div",gH,[f.unref(b).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("h3",mH,[q[34]||(q[34]=f.createTextVNode(" 属性设置 ",-1)),(Le=pt(f.unref(E)().type))!=null&&Le.desc?(f.openBlock(),f.createBlock(Ye,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:pt(f.unref(E)().type).desc},null,8,vH)]),default:f.withCtx(()=>[f.createVNode(Xe,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(ze)]),_:1})]),_:1})):f.createCommentVNode("",!0)]),f.createElementVNode("div",BH,[f.createElementVNode("div",wH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(E)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",yH,[f.createElementVNode("button",{onClick:q[2]||(q[2]=f.withModifiers(ve=>f.unref(ot)(ve,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ae(),onInput:q[3]||(q[3]=ve=>pe("x",ve.target.value)),onClick:q[4]||(q[4]=f.withModifiers(()=>{},["stop"])),onMousedown:q[5]||(q[5]=f.withModifiers(()=>{},["stop"]))},null,40,bH),f.createElementVNode("button",{onClick:q[6]||(q[6]=f.withModifiers(ve=>f.unref(ot)(ve,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",EH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(E)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",CH,[f.createElementVNode("button",{onClick:q[7]||(q[7]=f.withModifiers(ve=>f.unref(ot)(ve,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:he(),onInput:q[8]||(q[8]=ve=>pe("y",ve.target.value)),onClick:q[9]||(q[9]=f.withModifiers(()=>{},["stop"])),onMousedown:q[10]||(q[10]=f.withModifiers(()=>{},["stop"]))},null,40,UH),f.createElementVNode("button",{onClick:q[11]||(q[11]=f.withModifiers(ve=>f.unref(ot)(ve,"y",.5),["stop"]))},"+")])]),f.unref(E)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",FH,[q[35]||(q[35]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",NH,[f.createElementVNode("button",{onClick:q[12]||(q[12]=f.withModifiers(ve=>f.unref(ot)(ve,"width",-.5,1),["stop"]))},"-"),f.withDirectives(f.createElementVNode("input",{type:"number","onUpdate:modelValue":q[13]||(q[13]=ve=>f.unref(E)().props.width=ve),onInput:q[14]||(q[14]=ve=>f.unref(Je)("width",ve.target.value)),onClick:q[15]||(q[15]=f.withModifiers(()=>{},["stop"])),onMousedown:q[16]||(q[16]=f.withModifiers(()=>{},["stop"]))},null,544),[[f.vModelText,f.unref(E)().props.width,void 0,{number:!0}]]),f.createElementVNode("button",{onClick:q[17]||(q[17]=f.withModifiers(ve=>f.unref(ot)(ve,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(E)().type!=="line"?(f.openBlock(),f.createElementBlock("div",QH,[q[36]||(q[36]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",SH,[f.createElementVNode("button",{onClick:q[18]||(q[18]=f.withModifiers(ve=>f.unref(ot)(ve,"height",-.5,1),["stop"]))},"-"),f.withDirectives(f.createElementVNode("input",{type:"number","onUpdate:modelValue":q[19]||(q[19]=ve=>f.unref(E)().props.height=ve),onInput:q[20]||(q[20]=ve=>f.unref(Je)("height",ve.target.value)),onClick:q[21]||(q[21]=f.withModifiers(()=>{},["stop"])),onMousedown:q[22]||(q[22]=f.withModifiers(()=>{},["stop"]))},null,544),[[f.vModelText,f.unref(E)().props.height,void 0,{number:!0}]]),f.createElementVNode("button",{onClick:q[23]||(q[23]=f.withModifiers(ve=>f.unref(ot)(ve,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.createElementVNode("div",TH,[q[37]||(q[37]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",xH,[f.createElementVNode("button",{onClick:q[24]||(q[24]=f.withModifiers(ve=>f.unref(Fe)(-1),["stop"]))},"-"),f.withDirectives(f.createElementVNode("input",{type:"number","onUpdate:modelValue":q[25]||(q[25]=ve=>f.unref(E)().props.rotation=ve),onInput:q[26]||(q[26]=ve=>f.unref(Je)("rotation",ve.target.value)),onClick:q[27]||(q[27]=f.withModifiers(()=>{},["stop"])),onMousedown:q[28]||(q[28]=f.withModifiers(()=>{},["stop"]))},null,544),[[f.vModelText,f.unref(E)().props.rotation,void 0,{number:!0}]]),f.createElementVNode("button",{onClick:q[29]||(q[29]=f.withModifiers(ve=>f.unref(Fe)(1),["stop"]))},"+")])]),f.unref(E)().type!=="line"?(f.openBlock(),f.createElementBlock("div",RH,[q[38]||(q[38]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",IH,[f.createVNode(We,{modelValue:f.unref(E)().props.lockAspectRatio,"onUpdate:modelValue":q[30]||(q[30]=ve=>f.unref(E)().props.lockAspectRatio=ve),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((De=ce(f.unref(E)().type))==null?void 0:De.propertyPanel)||null),{modelValue:f.unref(E)().props,"onUpdate:modelValue":q[31]||(q[31]=ve=>f.unref(E)().props=ve),options:t.options,"props-config":pt(f.unref(E)().type)},null,8,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-0752e7d5"]]),Fq="",ll=_A({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(b,w)=>{let E;return function(...T){const M=()=>{clearTimeout(E),b(...T)};clearTimeout(E),E=setTimeout(M,w)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const b=a.value.getBoundingClientRect(),w=g(a.value);let E=0;if(b.top>0)E=b.top;else if(w){const N=h(a.value);E=N>0?N:60}else{const N=a.value.offsetTop;N>0?E=N:E=60}(E!==l.value.rectTop||w!==l.value.isInModal)&&(i.value=E,o.value=w,l.value={rectTop:E,isInModal:w})},d=s(u,100),g=b=>{let w=b.parentElement;for(;w;){if(w.classList&&(w.classList.contains("el-dialog")||w.classList.contains("el-drawer")||w.classList.contains("sc-dialog")))return!0;w=w.parentElement}return!1},h=b=>{let w=b.parentElement;for(;w;){if(w.classList&&(w.classList.contains("el-dialog")||w.classList.contains("el-drawer")||w.classList.contains("sc-dialog"))){const E=w.getBoundingClientRect();return E.top>0?E.top:60}w=w.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,b=>{b&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,b=>y(b),{deep:!0,immediate:!0});function y(b){if(r.value=(b==null?void 0:b.width)>0&&(b==null?void 0:b.height)>0,!r.value)return;const w={...b};w.printWidth||Object.assign(w,{printWidth:w.width}),w.printHeight||Object.assign(w,{printHeight:w.height}),w!=null&&w.graphData||Object.assign(w,{graphData:{printList:[{x:0,y:0,width:b.printWidth,height:b.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),w!=null&&w.items||Object.assign(w,{items:[]}),n.value=w}function B(b){e.exposed=b||{},e.exposeProxy=b||{}}return(b,w)=>{const E=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h(VH,{...b.$attrs,...A,ref:B},b.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[E,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var or=Uint8Array,Hr=Uint16Array,np=Int32Array,Ou=new or([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ku=new or([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ap=new or([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zw=function(t,e){for(var A=new Hr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new np(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},Yw=zw(Ou,2),Xw=Yw.b,ip=Yw.r;Xw[28]=258,ip[258]=28;for(var qw=zw(ku,0),MH=qw.b,$w=qw.r,op=new Hr(32768),aA=0;aA<32768;++aA){var Ra=(aA&43690)>>1|(aA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,op[aA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var Ln=function(t,e,A){for(var r=t.length,n=0,a=new Hr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Hr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Hr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[op[d]>>s]=l}else for(o=new Hr(r),n=0;n<r;++n)t[n]&&(o[n]=op[i[t[n]-1]++]>>15-t[n]);return o},Ia=new or(288),aA=0;aA<144;++aA)Ia[aA]=8;for(var aA=144;aA<256;++aA)Ia[aA]=9;for(var aA=256;aA<280;++aA)Ia[aA]=7;for(var aA=280;aA<288;++aA)Ia[aA]=8;for(var cl=new or(32),aA=0;aA<32;++aA)cl[aA]=5;var LH=Ln(Ia,9,0),OH=Ln(Ia,9,1),kH=Ln(cl,5,0),HH=Ln(cl,5,1),sp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},fn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},lp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},cp=function(t){return(t+7)/8|0},ey=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new or(t.subarray(e,A))},DH=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],hn=function(t,e,A){var r=new Error(e||DH[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,hn),!A)throw r;return r},PH=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new or(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new or(n*3));var l=function(Qe){var He=A.length;if(Qe>He){var ke=new or(Math.max(He*2,Qe));ke.set(A),A=ke}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,y=e.d,B=e.m,b=e.n,w=n*8;do{if(!h){u=fn(t,d,1);var E=fn(t,d+1,3);if(d+=3,E)if(E==1)h=OH,y=HH,B=9,b=5;else if(E==2){var H=fn(t,d,31)+257,I=fn(t,d+10,15)+4,L=H+fn(t,d+5,31)+1;d+=14;for(var P=new or(L),J=new or(19),F=0;F<I;++F)J[ap[F]]=fn(t,d+F*3,7);d+=I*3;for(var Q=sp(J),O=(1<<Q)-1,_=Ln(J,Q,1),F=0;F<L;){var te=_[fn(t,d,O)];d+=te&15;var N=te>>4;if(N<16)P[F++]=N;else{var K=0,re=0;for(N==16?(re=3+fn(t,d,3),d+=2,K=P[F-1]):N==17?(re=3+fn(t,d,7),d+=3):N==18&&(re=11+fn(t,d,127),d+=7);re--;)P[F++]=K}}var X=P.subarray(0,H),oe=P.subarray(H);B=sp(X),b=sp(oe),h=Ln(X,B,1),y=Ln(oe,b,1)}else hn(1);else{var N=cp(d)+4,T=t[N-4]|t[N-3]<<8,M=N+T;if(M>n){s&&hn(0);break}o&&l(g+T),A.set(t.subarray(N,M),g),e.b=g+=T,e.p=d=M*8,e.f=u;continue}if(d>w){s&&hn(0);break}}o&&l(g+131072);for(var $=(1<<B)-1,ce=(1<<b)-1,U=d;;U=d){var K=h[lp(t,d)&$],k=K>>4;if(d+=K&15,d>w){s&&hn(0);break}if(K||hn(2),k<256)A[g++]=k;else if(k==256){U=d,h=null;break}else{var Z=k-254;if(k>264){var F=k-257,G=Ou[F];Z=fn(t,d,(1<<G)-1)+Xw[F],d+=G}var ee=y[lp(t,d)&ce],Ae=ee>>4;ee||hn(3),d+=ee&15;var oe=MH[Ae];if(Ae>3){var G=ku[Ae];oe+=lp(t,d)&(1<<G)-1,d+=G}if(d>w){s&&hn(0);break}o&&l(g+131072);var he=g+Z;if(g<oe){var pe=a-oe,xe=Math.min(oe,he);for(pe+g<0&&hn(3);g<xe;++g)A[g]=r[pe+g]}for(;g<he;++g)A[g]=A[g-oe]}}e.l=h,e.p=U,e.b=g,e.f=u,h&&(u=1,e.m=B,e.d=y,e.n=b)}while(!u);return g!=A.length&&i?ey(A,0,g):A.subarray(0,g)},$n=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},ul=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},up=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:ny,l:0};if(n==1){var i=new or(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(M,H){return M.f-H.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Hr(g+1),y=fp(A[u-1],h,0);if(y>e){var r=0,B=0,b=y-e,w=1<<b;for(a.sort(function(H,I){return h[I.s]-h[H.s]||H.f-I.f});r<n;++r){var E=a[r].s;if(h[E]>e)B+=w-(1<<y-h[E]),h[E]=e;else break}for(B>>=b;B>0;){var N=a[r].s;h[N]<e?B-=1<<e-h[N]++-1:++r}for(;r>=0&&B;--r){var T=a[r].s;h[T]==e&&(--h[T],++B)}y=e}return{t:new or(h),l:y}},fp=function(t,e,A){return t.s==-1?Math.max(fp(t.l,e,A+1),fp(t.r,e,A+1)):e[t.s]=A},ty=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Hr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},fl=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},Ay=function(t,e,A){var r=A.length,n=cp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},ry=function(t,e,A,r,n,a,i,o,s,l,u){$n(e,u++,A),++n[256];for(var d=up(n,15),g=d.t,h=d.l,y=up(a,15),B=y.t,b=y.l,w=ty(g),E=w.c,N=w.n,T=ty(B),M=T.c,H=T.n,I=new Hr(19),L=0;L<E.length;++L)++I[E[L]&31];for(var L=0;L<M.length;++L)++I[M[L]&31];for(var P=up(I,7),J=P.t,F=P.l,Q=19;Q>4&&!J[ap[Q-1]];--Q);var O=l+5<<3,_=fl(n,Ia)+fl(a,cl)+i,te=fl(n,g)+fl(a,B)+i+14+3*Q+fl(I,J)+2*I[16]+3*I[17]+7*I[18];if(s>=0&&O<=_&&O<=te)return Ay(e,u,t.subarray(s,s+l));var K,re,X,oe;if($n(e,u,1+(te<_)),u+=2,te<_){K=Ln(g,h,0),re=g,X=Ln(B,b,0),oe=B;var $=Ln(J,F,0);$n(e,u,N-257),$n(e,u+5,H-1),$n(e,u+10,Q-4),u+=14;for(var L=0;L<Q;++L)$n(e,u+3*L,J[ap[L]]);u+=3*Q;for(var ce=[E,M],U=0;U<2;++U)for(var k=ce[U],L=0;L<k.length;++L){var Z=k[L]&31;$n(e,u,$[Z]),u+=J[Z],Z>15&&($n(e,u,k[L]>>5&127),u+=k[L]>>12)}}else K=LH,re=Ia,X=kH,oe=cl;for(var L=0;L<o;++L){var G=r[L];if(G>255){var Z=G>>18&31;ul(e,u,K[Z+257]),u+=re[Z+257],Z>7&&($n(e,u,G>>23&31),u+=Ou[Z]);var ee=G&31;ul(e,u,X[ee]),u+=oe[ee],ee>3&&(ul(e,u,G>>5&8191),u+=ku[ee])}else ul(e,u,K[G]),u+=re[G]}return ul(e,u,K[256]),u+re[256]},_H=new np([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ny=new or(0),WH=function(t,e,A,r,n,a){var i=a.z||t.length,o=new or(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=_H[e-1],g=d>>13,h=d&8191,y=(1<<A)-1,B=a.p||new Hr(32768),b=a.h||new Hr(y+1),w=Math.ceil(A/3),E=2*w,N=function(nt){return(t[nt]^t[nt+1]<<w^t[nt+2]<<E)&y},T=new np(25e3),M=new Hr(288),H=new Hr(32),I=0,L=0,P=a.i||0,J=0,F=a.w||0,Q=0;P+2<i;++P){var O=N(P),_=P&32767,te=b[O];if(B[_]=te,b[O]=_,F<=P){var K=i-P;if((I>7e3||J>24576)&&(K>423||!l)){u=ry(t,s,0,T,M,H,L,J,Q,P-Q,u),J=I=L=0,Q=P;for(var re=0;re<286;++re)M[re]=0;for(var re=0;re<30;++re)H[re]=0}var X=2,oe=0,$=h,ce=_-te&32767;if(K>2&&O==N(P-ce))for(var U=Math.min(g,K)-1,k=Math.min(32767,P),Z=Math.min(258,K);ce<=k&&--$&&_!=te;){if(t[P+X]==t[P+X-ce]){for(var G=0;G<Z&&t[P+G]==t[P+G-ce];++G);if(G>X){if(X=G,oe=ce,G>U)break;for(var ee=Math.min(ce,G-2),Ae=0,re=0;re<ee;++re){var he=P-ce+re&32767,pe=B[he],xe=he-pe&32767;xe>Ae&&(Ae=xe,te=he)}}}_=te,te=B[_],ce+=_-te&32767}if(oe){T[J++]=268435456|ip[X]<<18|$w[oe];var Qe=ip[X]&31,He=$w[oe]&31;L+=Ou[Qe]+ku[He],++M[257+Qe],++H[He],F=P+X,++I}else T[J++]=t[P],++M[t[P]]}}for(P=Math.max(P,F);P<i;++P)T[J++]=t[P],++M[t[P]];u=ry(t,s,l,T,M,H,L,J,Q,P-Q,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=b,a.p=B,a.i=P,a.w=F)}else{for(var P=a.w||0;P<i+l;P+=65535){var ke=P+65535;ke>=i&&(s[u/8|0]=l,ke=i),u=Ay(s,u+1,t.subarray(P,ke))}a.i=i}return ey(o,0,r+cp(u)+n)},ay=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},ZH=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new or(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return WH(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},iy=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},jH=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=ay();n.p(e.dictionary),iy(t,2,n.d())}},JH=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&hn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&hn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function hp(t,e){e||(e={});var A=ay();A.p(t);var r=ZH(t,e,e.dictionary?6:2,4);return jH(r,e),iy(r,r.length-4,A.d()),r}function KH(t,e){return PH(t.subarray(JH(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var GH=typeof TextDecoder<"u"&&new TextDecoder,zH=0;try{GH.decode(ny,{stream:!0}),zH=1}catch{}/** @license
|
|
59
|
+
.`+$0+a8+Lw)},o8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},Ow=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),s8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(tp(e)||f8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return gr(this,void 0,void 0,function(){var A,r,n,a,i=this;return ar(this,function(o){switch(o.label){case 0:return A=Ow.isSameOrigin(e),r=!ep(e)&&this._options.useCORS===!0&&qA.SUPPORT_CORS_IMAGES&&!A,n=!ep(e)&&!A&&!tp(e)&&typeof this._options.proxy=="string"&&qA.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!ep(e)&&!tp(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(h8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=qA.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),l8=/^data:image\/svg\+xml/i,c8=/^data:image\/.*;base64,/i,u8=/^data:image\/.*/i,f8=function(t){return qA.SUPPORT_SVG_DRAWING||!d8(t)},ep=function(t){return u8.test(t)},h8=function(t){return c8.test(t)},tp=function(t){return t.substr(0,4)==="blob"},d8=function(t){return t.substr(-3).toLowerCase()==="svg"||l8.test(t)},$e=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),Uo=function(t,e,A){return new $e(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Su=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=Uo(this.start,this.startControl,e),n=Uo(this.startControl,this.endControl,e),a=Uo(this.endControl,this.end,e),i=Uo(r,n,e),o=Uo(n,a,e),s=Uo(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Yr=function(t){return t.type===1},p8=function(){function t(e){var A=e.styles,r=e.bounds,n=tl(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=tl(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=tl(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=tl(A.borderBottomLeftRadius,r.width,r.height),y=h[0],B=h[1],b=[];b.push((a+s)/r.width),b.push((y+d)/r.width),b.push((i+B)/r.height),b.push((l+g)/r.height);var w=Math.max.apply(Math,b);w>1&&(a/=w,i/=w,s/=w,l/=w,d/=w,g/=w,y/=w,B/=w);var E=r.width-s,N=r.height-g,T=r.width-d,M=r.height-B,H=A.borderTopWidth,I=A.borderRightWidth,L=A.borderBottomWidth,P=A.borderLeftWidth,J=eA(A.paddingTop,e.bounds.width),F=eA(A.paddingRight,e.bounds.width),Q=eA(A.paddingBottom,e.bounds.width),O=eA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?oA(r.left+P/3,r.top+H/3,a-P/3,i-H/3,Pt.TOP_LEFT):new $e(r.left+P/3,r.top+H/3),this.topRightBorderDoubleOuterBox=a>0||i>0?oA(r.left+E,r.top+H/3,s-I/3,l-H/3,Pt.TOP_RIGHT):new $e(r.left+r.width-I/3,r.top+H/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?oA(r.left+T,r.top+N,d-I/3,g-L/3,Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I/3,r.top+r.height-L/3),this.bottomLeftBorderDoubleOuterBox=y>0||B>0?oA(r.left+P/3,r.top+M,y-P/3,B-L/3,Pt.BOTTOM_LEFT):new $e(r.left+P/3,r.top+r.height-L/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?oA(r.left+P*2/3,r.top+H*2/3,a-P*2/3,i-H*2/3,Pt.TOP_LEFT):new $e(r.left+P*2/3,r.top+H*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?oA(r.left+E,r.top+H*2/3,s-I*2/3,l-H*2/3,Pt.TOP_RIGHT):new $e(r.left+r.width-I*2/3,r.top+H*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?oA(r.left+T,r.top+N,d-I*2/3,g-L*2/3,Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I*2/3,r.top+r.height-L*2/3),this.bottomLeftBorderDoubleInnerBox=y>0||B>0?oA(r.left+P*2/3,r.top+M,y-P*2/3,B-L*2/3,Pt.BOTTOM_LEFT):new $e(r.left+P*2/3,r.top+r.height-L*2/3),this.topLeftBorderStroke=a>0||i>0?oA(r.left+P/2,r.top+H/2,a-P/2,i-H/2,Pt.TOP_LEFT):new $e(r.left+P/2,r.top+H/2),this.topRightBorderStroke=a>0||i>0?oA(r.left+E,r.top+H/2,s-I/2,l-H/2,Pt.TOP_RIGHT):new $e(r.left+r.width-I/2,r.top+H/2),this.bottomRightBorderStroke=d>0||g>0?oA(r.left+T,r.top+N,d-I/2,g-L/2,Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I/2,r.top+r.height-L/2),this.bottomLeftBorderStroke=y>0||B>0?oA(r.left+P/2,r.top+M,y-P/2,B-L/2,Pt.BOTTOM_LEFT):new $e(r.left+P/2,r.top+r.height-L/2),this.topLeftBorderBox=a>0||i>0?oA(r.left,r.top,a,i,Pt.TOP_LEFT):new $e(r.left,r.top),this.topRightBorderBox=s>0||l>0?oA(r.left+E,r.top,s,l,Pt.TOP_RIGHT):new $e(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?oA(r.left+T,r.top+N,d,g,Pt.BOTTOM_RIGHT):new $e(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=y>0||B>0?oA(r.left,r.top+M,y,B,Pt.BOTTOM_LEFT):new $e(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?oA(r.left+P,r.top+H,Math.max(0,a-P),Math.max(0,i-H),Pt.TOP_LEFT):new $e(r.left+P,r.top+H),this.topRightPaddingBox=s>0||l>0?oA(r.left+Math.min(E,r.width-I),r.top+H,E>r.width+I?0:Math.max(0,s-I),Math.max(0,l-H),Pt.TOP_RIGHT):new $e(r.left+r.width-I,r.top+H),this.bottomRightPaddingBox=d>0||g>0?oA(r.left+Math.min(T,r.width-P),r.top+Math.min(N,r.height-L),Math.max(0,d-I),Math.max(0,g-L),Pt.BOTTOM_RIGHT):new $e(r.left+r.width-I,r.top+r.height-L),this.bottomLeftPaddingBox=y>0||B>0?oA(r.left+P,r.top+Math.min(M,r.height-L),Math.max(0,y-P),Math.max(0,B-L),Pt.BOTTOM_LEFT):new $e(r.left+P,r.top+r.height-L),this.topLeftContentBox=a>0||i>0?oA(r.left+P+O,r.top+H+J,Math.max(0,a-(P+O)),Math.max(0,i-(H+J)),Pt.TOP_LEFT):new $e(r.left+P+O,r.top+H+J),this.topRightContentBox=s>0||l>0?oA(r.left+Math.min(E,r.width+P+O),r.top+H+J,E>r.width+P+O?0:s-P+O,l-(H+J),Pt.TOP_RIGHT):new $e(r.left+r.width-(I+F),r.top+H+J),this.bottomRightContentBox=d>0||g>0?oA(r.left+Math.min(T,r.width-(P+O)),r.top+Math.min(N,r.height+H+J),Math.max(0,d-(I+F)),g-(L+Q),Pt.BOTTOM_RIGHT):new $e(r.left+r.width-(I+F),r.top+r.height-(L+Q)),this.bottomLeftContentBox=y>0||B>0?oA(r.left+P+O,r.top+M,Math.max(0,y-(P+O)),B-(L+Q),Pt.BOTTOM_LEFT):new $e(r.left+P+O,r.top+r.height-(L+Q))}return t}(),Pt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Pt||(Pt={}));var oA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Pt.TOP_LEFT:return new Su(new $e(t,l),new $e(t,l-o),new $e(s-i,e),new $e(s,e));case Pt.TOP_RIGHT:return new Su(new $e(t,e),new $e(t+i,e),new $e(s,l-o),new $e(s,l));case Pt.BOTTOM_RIGHT:return new Su(new $e(s,e),new $e(s,e+o),new $e(t+i,l),new $e(t,l));case Pt.BOTTOM_LEFT:default:return new Su(new $e(s,l),new $e(s-i,l),new $e(t,e+o),new $e(t,e))}},Tu=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},g8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},xu=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},m8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Ru=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),v8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),B8=function(t){return t.type===0},kw=function(t){return t.type===1},w8=function(t){return t.type===2},Hw=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},y8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},Dw=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),Pw=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new p8(this.container),this.container.styles.opacity<1&&this.effects.push(new v8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new m8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Tu(this.curves),o=xu(this.curves);Hw(i,o)?this.effects.push(new Ru(i,6)):(this.effects.push(new Ru(i,2)),this.effects.push(new Ru(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!kw(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Tu(r.curves),o=xu(r.curves);Hw(i,o)||n.unshift(new Ru(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return OA(s.target,e)})},t}(),Ap=function(t,e,A,r){t.container.elements.forEach(function(n){var a=OA(n.flags,4),i=OA(n.flags,2),o=new Pw(n,t);OA(n.styles.display,2048)&&r.push(o);var s=OA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new Dw(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(y,B){return d>y.element.container.styles.zIndex.order?(g=B,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(y,B){return d>=y.element.container.styles.zIndex.order?(h=B+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Ap(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),Ap(o,e,A,s);OA(n.flags,8)&&_w(n,s)})},_w=function(t,e){for(var A=t instanceof j0?t.start:1,r=t instanceof j0?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof hw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=ol(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},b8=function(t){var e=new Pw(t,null),A=new Dw(e),r=[];return Ap(e,A,A,r),_w(e.container,r),A},Ww=function(t,e){switch(e){case 0:return Xr(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Xr(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Xr(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Xr(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},E8=function(t,e){switch(e){case 0:return Xr(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Xr(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Xr(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Xr(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},C8=function(t,e){switch(e){case 0:return Xr(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Xr(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Xr(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Xr(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},U8=function(t,e){switch(e){case 0:return Iu(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Iu(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Iu(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Iu(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Iu=function(t,e){var A=[];return Yr(t)?A.push(t.subdivide(.5,!1)):A.push(t),Yr(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},Xr=function(t,e,A,r){var n=[];return Yr(t)?n.push(t.subdivide(.5,!1)):n.push(t),Yr(A)?n.push(A.subdivide(.5,!0)):n.push(A),Yr(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),Yr(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},Zw=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Vu=function(t){var e=t.styles,A=t.bounds,r=eA(e.paddingLeft,A.width),n=eA(e.paddingRight,A.width),a=eA(e.paddingTop,A.width),i=eA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},F8=function(t,e){return t===0?e.bounds:t===2?Vu(e):Zw(e)},N8=function(t,e){return t===0?e.bounds:t===2?Vu(e):Zw(e)},rp=function(t,e,A){var r=F8(No(t.styles.backgroundOrigin,e),t),n=N8(No(t.styles.backgroundClip,e),t),a=Q8(No(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=tl(No(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=S8(No(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},Fo=function(t){return Jt(t)&&t.value===yo.AUTO},Mu=function(t){return typeof t=="number"},Q8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(SA(i)&&o&&SA(o))return[eA(i,A.width),eA(o,A.height)];var s=Mu(a);if(Jt(i)&&(i.value===yo.CONTAIN||i.value===yo.COVER)){if(Mu(a)){var l=A.width/A.height;return l<a!=(i.value===yo.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Mu(r),d=Mu(n),g=u||d;if(Fo(i)&&(!o||Fo(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,y=d?n:r/a;return[h,y]}var B=u?r:A.width,b=d?n:A.height;return[B,b]}if(s){var w=0,E=0;return SA(i)?w=eA(i,A.width):SA(o)&&(E=eA(o,A.height)),Fo(i)?w=E*a:(!o||Fo(o))&&(E=w/a),[w,E]}var N=null,T=null;if(SA(i)?N=eA(i,A.width):o&&SA(o)&&(T=eA(o,A.height)),N!==null&&(!o||Fo(o))&&(T=u&&d?N/r*n:A.height),T!==null&&Fo(i)&&(N=u&&d?T/n*r:A.width),N!==null&&T!==null)return[N,T];throw new Error("Unable to calculate background-size for element")},No=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},S8=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new $e(Math.round(r.left),Math.round(r.top+i)),new $e(Math.round(r.left+r.width),Math.round(r.top+i)),new $e(Math.round(r.left+r.width),Math.round(s+r.top+i)),new $e(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new $e(Math.round(r.left+a),Math.round(r.top)),new $e(Math.round(r.left+a+o),Math.round(r.top)),new $e(Math.round(r.left+a+o),Math.round(r.height+r.top)),new $e(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new $e(Math.round(r.left+a),Math.round(r.top+i)),new $e(Math.round(r.left+a+o),Math.round(r.top+i)),new $e(Math.round(r.left+a+o),Math.round(r.top+i+s)),new $e(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new $e(Math.round(n.left),Math.round(n.top)),new $e(Math.round(n.left+n.width),Math.round(n.top)),new $e(Math.round(n.left+n.width),Math.round(n.height+n.top)),new $e(Math.round(n.left),Math.round(n.height+n.top))]}},T8="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",jw="Hidden Text",x8=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=T8,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(jw)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(jw)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),Jw=function(){function t(e,A){this.context=e,this.options=A}return t}(),R8=1e4,I8=function(t){cn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new x8(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),w8(A)&&(this.ctx.globalAlpha=A.opacity),B8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),kw(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return gr(this,void 0,void 0,function(){var r;return ar(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return gr(this,void 0,void 0,function(){return ar(this,function(r){switch(r.label){case 0:if(OA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=Z0(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=k8(A.fontFamily).join(", "),a=el(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return gr(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ar(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(y){d.forEach(function(B){switch(B){case 0:g.ctx.fillStyle=WA(r.color),g.renderTextWithLetterSpacing(y,r.letterSpacing,l);var b=r.textShadow;b.length&&y.text.trim().length&&(b.slice(0).reverse().forEach(function(w){g.ctx.shadowColor=WA(w.color),g.ctx.shadowOffsetX=w.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=w.offsetY.number*g.options.scale,g.ctx.shadowBlur=w.blur.number,g.renderTextWithLetterSpacing(y,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=WA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top+l),y.bounds.width,1);break;case 2:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top),y.bounds.width,1);break;case 3:g.ctx.fillRect(y.bounds.left,Math.ceil(y.bounds.top+u),y.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&y.text.trim().length&&(g.ctx.strokeStyle=WA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(y.text,y.bounds.left,y.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Vu(A),i=xu(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return gr(this,void 0,void 0,function(){var r,n,a,i,o,s,E,E,l,u,d,g,T,h,y,M,B,b,w,E,N,T,M;return ar(this,function(H){switch(H.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,H.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:H.sent(),H.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof cw))return[3,8];H.label=5;case 5:return H.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return E=H.sent(),this.renderReplacedElement(r,n,E),[3,8];case 7:return H.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof uw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof fw))return[3,12];H.label=9;case 9:return H.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return E=H.sent(),this.renderReplacedElement(r,n,E),[3,12];case 11:return H.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof mw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=H.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),H.label=14;case 14:if(r instanceof J0&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Eu?r.checked&&(this.ctx.save(),this.path([new $e(r.bounds.left+d*.39363,r.bounds.top+d*.79),new $e(r.bounds.left+d*.16,r.bounds.top+d*.5549),new $e(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new $e(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new $e(r.bounds.left+d*.72983,r.bounds.top+d*.23),new $e(r.bounds.left+d*.84,r.bounds.top+d*.34085),new $e(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=WA(dw),this.ctx.fill(),this.ctx.restore()):r.type===Cu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=WA(dw),this.ctx.fill(),this.ctx.restore())),V8(r)&&r.value.length){switch(g=this.createFontStyle(a),T=g[0],h=g[1],y=this.fontMetrics.getMetrics(T,h).baseline,this.ctx.font=T,this.ctx.fillStyle=WA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=L8(r.styles.textAlign),M=Vu(r),B=0,r.styles.textAlign){case 1:B+=M.width/2;break;case 2:B+=M.width;break}b=M.add(B,0,0,-M.height/2+1),this.ctx.save(),this.path([new $e(M.left,M.top),new $e(M.left+M.width,M.top),new $e(M.left+M.width,M.top+M.height),new $e(M.left,M.top+M.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new al(r.value,b),a.letterSpacing,y),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!OA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];E=void 0,N=w.url,H.label=15;case 15:return H.trys.push([15,17,,18]),[4,this.context.cache.match(N)];case 16:return E=H.sent(),this.ctx.drawImage(E,r.bounds.left-(E.width+10),r.bounds.top),[3,18];case 17:return H.sent(),this.context.logger.error("Error loading list-style-image "+N),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(T=this.createFontStyle(a)[0],this.ctx.font=T,this.ctx.fillStyle=WA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",M=new zn(r.bounds.left,r.bounds.top+eA(r.styles.paddingTop,r.bounds.width),r.bounds.width,jB(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new al(A.listValue,M),a.letterSpacing,jB(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),H.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return gr(this,void 0,void 0,function(){var r,n,w,a,i,w,o,s,w,l,u,w,d,g,w,h,y,w,B,b,w;return ar(this,function(E){switch(E.label){case 0:if(OA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:E.sent(),r=0,n=A.negativeZIndex,E.label=2;case 2:return r<n.length?(w=n[r],[4,this.renderStack(w)]):[3,5];case 3:E.sent(),E.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:E.sent(),a=0,i=A.nonInlineLevel,E.label=7;case 7:return a<i.length?(w=i[a],[4,this.renderNode(w)]):[3,10];case 8:E.sent(),E.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,E.label=11;case 11:return o<s.length?(w=s[o],[4,this.renderStack(w)]):[3,14];case 12:E.sent(),E.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,E.label=15;case 15:return l<u.length?(w=u[l],[4,this.renderStack(w)]):[3,18];case 16:E.sent(),E.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,E.label=19;case 19:return d<g.length?(w=g[d],[4,this.renderNode(w)]):[3,22];case 20:E.sent(),E.label=21;case 21:return d++,[3,19];case 22:h=0,y=A.zeroOrAutoZIndexOrTransformedOrOpacity,E.label=23;case 23:return h<y.length?(w=y[h],[4,this.renderStack(w)]):[3,26];case 24:E.sent(),E.label=25;case 25:return h++,[3,23];case 26:B=0,b=A.positiveZIndex,E.label=27;case 27:return B<b.length?(w=b[B],[4,this.renderStack(w)]):[3,30];case 28:E.sent(),E.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=Yr(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),Yr(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return gr(this,void 0,void 0,function(){var r,n,a,i,o,s;return ar(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,J,K,re,O,_,L,y,J,K,re,O,_,B,b,w,E,N,T,M,H,I,L,P,J,F,Q,O,_,te,K,re,X,oe,$,ce,U,k,Z,G;return ar(this,function(ee){switch(ee.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,ee.label=1;case 1:return ee.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=ee.sent(),[3,4];case 3:return ee.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=rp(A,r,[d.width,d.height,d.width/d.height]),J=h[0],K=h[1],re=h[2],O=h[3],_=h[4],L=a.ctx.createPattern(a.resizeImage(d,O,_),"repeat"),a.renderRepeat(J,L,K,re)),[3,6];case 5:BO(u)?(y=rp(A,r,[null,null,null]),J=y[0],K=y[1],re=y[2],O=y[3],_=y[4],B=dO(u.angle,O,_),b=B[0],w=B[1],E=B[2],N=B[3],T=B[4],M=document.createElement("canvas"),M.width=O,M.height=_,H=M.getContext("2d"),I=H.createLinearGradient(w,N,E,T),VB(u.stops,b).forEach(function(Ae){return I.addColorStop(Ae.stop,WA(Ae.color))}),H.fillStyle=I,H.fillRect(0,0,O,_),O>0&&_>0&&(L=a.ctx.createPattern(M,"repeat"),a.renderRepeat(J,L,K,re))):wO(u)&&(P=rp(A,r,[null,null,null]),J=P[0],F=P[1],Q=P[2],O=P[3],_=P[4],te=u.position.length===0?[S0]:u.position,K=eA(te[0],O),re=eA(te[te.length-1],_),X=pO(u,K,re,O,_),oe=X[0],$=X[1],oe>0&&$>0&&(ce=a.ctx.createRadialGradient(F+K,Q+re,0,F+K,Q+re,oe),VB(u.stops,oe*2).forEach(function(Ae){return ce.addColorStop(Ae.stop,WA(Ae.color))}),a.path(J),a.ctx.fillStyle=ce,oe!==$?(U=A.bounds.left+.5*A.bounds.width,k=A.bounds.top+.5*A.bounds.height,Z=$/oe,G=1/Z,a.ctx.save(),a.ctx.translate(U,k),a.ctx.transform(1,0,0,Z,0,0),a.ctx.translate(-U,-k),a.ctx.fillRect(F,G*(Q-k)+k,O,_*G),a.ctx.restore()):a.ctx.fill())),ee.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return gr(this,void 0,void 0,function(){return ar(this,function(a){return this.path(Ww(n,r)),this.ctx.fillStyle=WA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return gr(this,void 0,void 0,function(){var i,o;return ar(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=E8(a,n),this.path(i),this.ctx.fillStyle=WA(A),this.ctx.fill(),o=C8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return gr(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ar(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Qa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=M8(No(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Qa(r.backgroundColor)||(this.ctx.fillStyle=WA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var y=Tu(A.curves),B=h.inset?0:R8,b=y8(y,-B+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(y),d.ctx.clip(),d.mask(b)):(d.mask(y),d.ctx.clip(),d.path(b)),d.ctx.shadowOffsetX=h.offsetX.number+B,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=WA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?WA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Qa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return gr(this,void 0,void 0,function(){var o,s,l,u,d,g,h,y,B,b,w,E,N,T,M,H,M,H;return ar(this,function(I){return this.ctx.save(),o=U8(a,n),s=Ww(a,n),i===2&&(this.path(s),this.ctx.clip()),Yr(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),Yr(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),y=r<3?r*3:r*2,B=r<3?r*2:r,i===3&&(y=r,B=r),b=!0,h<=y*2?b=!1:h<=y*2+B?(w=h/(2*y+B),y*=w,B*=w):(E=Math.floor((h+B)/(y+B)),N=(h-E*y)/(E-1),T=(h-(E+1)*y)/E,B=T<=0||Math.abs(B-N)<Math.abs(B-T)?N:T),b&&(i===3?this.ctx.setLineDash([0,y+B]):this.ctx.setLineDash([y,B])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=WA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(Yr(s[0])&&(M=s[3],H=s[0],this.ctx.beginPath(),this.formatPath([new $e(M.end.x,M.end.y),new $e(H.start.x,H.start.y)]),this.ctx.stroke()),Yr(s[1])&&(M=s[1],H=s[2],this.ctx.beginPath(),this.formatPath([new $e(M.end.x,M.end.y),new $e(H.start.x,H.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return gr(this,void 0,void 0,function(){var r;return ar(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=WA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=b8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Jw),V8=function(t){return t instanceof gw||t instanceof pw?!0:t instanceof J0&&t.type!==Cu&&t.type!==Eu},M8=function(t,e){switch(t){case 0:return Tu(e);case 2:return g8(e);case 1:default:return xu(e)}},L8=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},O8=["-apple-system","system-ui"],k8=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return O8.indexOf(e)===-1}):t},H8=function(t){cn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return gr(this,void 0,void 0,function(){var r,n;return ar(this,function(a){switch(a.label){case 0:return r=W0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,D8(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=WA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Jw),D8=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},P8=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Wc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Wc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Wc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Wc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),_8=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new P8({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new s8(this,e)}return t.instanceCount=1,t}(),Kw=function(t,e){return e===void 0&&(e={}),W8(t,e)};typeof window<"u"&&Ow.setContext(window);var W8=function(t,e){return gr(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,y,B,b,w,E,N,T,M,I,H,I,L,P,J,F,Q,O,_,te,K,re,X,oe,$,ce,U,k,Z;return ar(this,function(G){switch(G.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(L=e.allowTaint)!==null&&L!==void 0?L:!1,imageTimeout:(P=e.imageTimeout)!==null&&P!==void 0?P:15e3,proxy:e.proxy,useCORS:(J=e.useCORS)!==null&&J!==void 0?J:!1},a=s0({logging:(F=e.logging)!==null&&F!==void 0?F:!0,cache:e.cache},n),i={windowWidth:(Q=e.windowWidth)!==null&&Q!==void 0?Q:r.innerWidth,windowHeight:(O=e.windowHeight)!==null&&O!==void 0?O:r.innerHeight,scrollX:(_=e.scrollX)!==null&&_!==void 0?_:r.pageXOffset,scrollY:(te=e.scrollY)!==null&&te!==void 0?te:r.pageYOffset},o=new zn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new _8(a,o),l=(K=e.foreignObjectRendering)!==null&&K!==void 0?K:!1,u={allowTaint:(re=e.allowTaint)!==null&&re!==void 0?re:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Mw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=G.sent(),y=G0(g)||j6(g)?yM(g.ownerDocument):Zc(s,g),B=y.width,b=y.height,w=y.left,E=y.top,N=Z8(s,g,e.backgroundColor),T={canvas:e.canvas,backgroundColor:N,scale:(oe=(X=e.scale)!==null&&X!==void 0?X:r.devicePixelRatio)!==null&&oe!==void 0?oe:1,x:(($=e.x)!==null&&$!==void 0?$:0)+w,y:((ce=e.y)!==null&&ce!==void 0?ce:0)+E,width:(U=e.width)!==null&&U!==void 0?U:Math.ceil(B),height:(k=e.height)!==null&&k!==void 0?k:Math.ceil(b)},l?(s.logger.debug("Document cloned, using foreign object rendering"),I=new H8(s,T),[4,I.render(g)]):[3,3];case 2:return M=G.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+w+","+E+" with size "+B+"x"+b+" using computed rendering"),s.logger.debug("Starting DOM parsing"),H=Bw(s,g),N===H.styles.backgroundColor&&(H.styles.backgroundColor=Xn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+T.x+","+T.y+" with size "+T.width+"x"+T.height),I=new I8(s,T),[4,I.render(H)];case 4:M=G.sent(),G.label=5;case 5:return(!((Z=e.removeContainer)!==null&&Z!==void 0)||Z)&&(Mw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,M]}})})},Z8=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?Al(t,getComputedStyle(r.documentElement).backgroundColor):Xn.TRANSPARENT,a=r.body?Al(t,getComputedStyle(r.body).backgroundColor):Xn.TRANSPARENT,i=typeof A=="string"?Al(t,A):A===null?Xn.TRANSPARENT:4294967295;return e===r.documentElement?Qa(n)?Qa(a)?i:a:n:i};const Gw=Object.freeze(Object.defineProperty({__proto__:null,default:Kw},Symbol.toStringTag,{value:"Module"})),Cq="",j8={class:"label-designer"},J8={class:"toolbar"},K8={class:"center-container"},G8={key:0,class:"loader-container"},z8={class:"center-toolbar"},Y8={class:"zoom-controls"},X8=["disabled"],q8=["disabled"],$8={class:"canvas-container"},eH={class:"ruler-horizontal"},tH={class:"ruler-vertical"},AH={key:0,class:"drag-extend-lines"},rH={key:1,class:"alignment-guides"},nH=["data-item-id","onMousedown"],aH=["onMousedown"],iH=["onMousedown"],oH=["onMousedown"],sH=["onMousedown"],lH=["onMousedown"],cH=["onMousedown"],uH=["onMousedown"],fH=["onMousedown"],hH=["onMousedown"],dH=["onMousedown"],pH=["onClick"],gH={class:"property-panel",tabindex:"0"},mH={class:"property-panel-title"},vH=["innerHTML"],BH={class:"position-controls"},wH={class:"control-group"},yH={class:"number-input"},bH=["value"],EH={class:"control-group"},CH={class:"number-input"},UH=["value"],FH={key:0,class:"control-group"},NH={class:"number-input"},QH={key:1,class:"control-group"},SH={class:"number-input"},TH={class:"control-group"},xH={class:"number-input"},RH={key:2,class:"control-group"},IH={class:"switch-input"},Lu=.05,VH=_A({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ue;return((ue=r.value)==null?void 0:ue.printWidth)||0}),u=f.computed(()=>{var ue;return((ue=r.value)==null?void 0:ue.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new ui(BA.CACHE.STYLE_CACHE_SIZE),y=new ui(BA.CACHE.BOUNDING_BOX_CACHE_SIZE),B=new Map(_v.map(ue=>[ue.type,ue])),{selectedItems:b,selectItem:w,getCurrentSelected:E,clearSelection:N}=hM(),{dragging:T,dragItem:M,startDrag:H}=uM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:w,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{O()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),_()},onDragUpdate:()=>{O()}}),{startResize:I,resizing:L,resizeDirection:P,resizeItem:J}=fM(l,u,o,b),{alignmentGuides:F,showGuides:Q,updateAlignmentGuides:O,clearAlignmentGuides:_}=vM({items:i,dragItem:M,resizeItem:J,dragging:T,resizing:L,resizeDirection:P,canvasWidth:l,canvasHeight:u}),{startRotate:te}=dM();f.watch(()=>b.value,()=>{h.clear()},{deep:!0}),f.watch(()=>L.value,ue=>{ue?O():_()}),f.watch(()=>{var ue;return(ue=J.value)==null?void 0:ue.props},()=>{L.value&&O()},{deep:!0}),f.watch(()=>M.value,()=>{(T.value||L.value)&&O()}),f.watch(()=>J.value,()=>{(T.value||L.value)&&O()}),f.watch(()=>i.value,()=>{(T.value||L.value)&&O()},{deep:!0});const K=ue=>{const q=`${ue.id}_${Ve(ue.props.x,1)}_${Ve(ue.props.y,1)}_${ue.props.width}_${ue.props.height}_${ue.props.rotation}`;if(y.has(q))return y.get(q);const Xe=(ue.props.rotation||0)*Math.PI/180,qe=[{x:0,y:0},{x:ue.props.width,y:0},{x:ue.props.width,y:ue.props.height},{x:0,y:ue.props.height}],ze=ue.props.width/2,Ye=ue.props.height/2,We=qe.map(it=>{const Le=it.x-ze,De=it.y-Ye,ve=Le*Math.cos(Xe)-De*Math.sin(Xe),Ut=Le*Math.sin(Xe)+De*Math.cos(Xe);return{x:Ve(ve+ze+ue.props.x,3),y:Ve(Ut+Ye+ue.props.y,3)}});return y.set(q,We),We},re=ue=>{const q=K(ue),be=q.map(Le=>Le.x),Xe=q.map(Le=>Le.y),qe=Ve(Math.min(...be),3),ze=Ve(Math.max(...be),3),Ye=Ve(Math.min(...Xe),3),We=Ve(Math.max(...Xe),3);return{minX:qe,maxX:ze,minY:Ye,maxY:We,width:Ve(ze-qe,3),height:Ve(We-Ye,3),centerX:Ve((qe+ze)/2,3),centerY:Ve((Ye+We)/2,3)}},X=(ue,q)=>{const be=re(ue),qe=(Ye=>Ye.type==="rectangle"?parseFloat(Ye.props.LineWidth||"0.5")/3.78:0)(ue),ze=(Ye,We,it)=>{if(it==="rectangle"&&qe>0){const Le=qe/2;if(We==="left"||We==="top")return Ye-Le;if(We==="right"||We==="bottom")return Ye+Le}return Ye};if(ue.type==="line")switch(q){case"left":return{left:Ve(ze(be.minX,q,ue.type),3)+"mm"};case"right":return{left:Ve(ze(be.maxX,q,ue.type),3)+"mm"};case"top":return{top:Ve(ze(be.minY,q,ue.type),3)+"mm"};case"bottom":return{top:Ve(ze(be.maxY,q,ue.type),3)+"mm"};default:return{}}if(ue.type==="verline"&&q==="right"){const We=parseFloat(ue.props.LineWidth||"0.5")/3.78;return{left:Ve(ze(be.minX+We,q,ue.type),3)+"mm"}}switch(q){case"left":return{left:Ve(ze(be.minX,q,ue.type),3)+"mm"};case"right":return{left:Ve(ze(be.maxX,q,ue.type),3)+"mm"};case"top":return{top:Ve(ze(be.minY,q,ue.type),3)+"mm"};case"bottom":return{top:Ve(ze(be.maxY,q,ue.type),3)+"mm"};default:return{}}},oe=()=>{f.nextTick(()=>{const ue=document.querySelector(".canvas-container");if(!ue||!l.value||!u.value)return;const q=ue.getBoundingClientRect(),be=lo(l.value),Xe=lo(u.value),qe=16,ze=21,Ye=21,We=20,it=24,Le=24,De=q.width-qe*2-ze-Le,ve=q.height-qe-Ye-We-it;let Ut=De/be,ft=ve/Xe,Ht=Math.min(Ut,ft);Ht=Ht*.95;const Ke=Math.min(4,Ht);s=Math.max(.8,Math.min(Ke,Ht)),o.value=$(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function $(ue,q){ue=ue.toString();let be=ue.indexOf(".");return be!==-1?ue=ue.substring(0,q+be+1):ue=ue.substring(0),Number(parseFloat(ue).toFixed(q))}const ce=ue=>B.get(ue)||null,U=ue=>{const q=b.value.indexOf(ue),be=q===b.value.length-1,Xe=q!==-1,qe=`${ue.id}_${Math.round(ue.props.x*10)}_${Math.round(ue.props.y*10)}_${ue.props.width}_${ue.props.height}_${ue.props.rotation}_${Xe}_${be}`;if(h.has(qe))return h.get(qe);const ze={width:ue.props.width+"mm",height:ue.props.height+"mm",transform:`translate(${ue.props.x}mm, ${ue.props.y}mm) rotate(${ue.props.rotation}deg)`};return Xe?be?ze.zIndex=1e3:ze.zIndex=999:ze.zIndex=10,h.set(qe,ze),ze},k=ue=>{const q=b.value.some(Xe=>Xe.id===ue.id),be=E()===ue;return{"component-selected":q,"component-current":q&&be,"no-outline":q&&(ue.type==="line"||ue.type==="verline")}},Z=(ue,q)=>{const Xe=((ue.props.rotation||0)%360+360)%360;if(ue.type==="line"&&(q==="left"||q==="right")){let We;const Le=((q==="left"?270:90)+Xe)%360;return Le>=337.5||Le<22.5?We="n-resize":Le>=22.5&&Le<67.5?We="ne-resize":Le>=67.5&&Le<112.5?We="e-resize":Le>=112.5&&Le<157.5?We="se-resize":Le>=157.5&&Le<202.5?We="s-resize":Le>=202.5&&Le<247.5?We="sw-resize":Le>=247.5&&Le<292.5?We="w-resize":Le>=292.5&&Le<337.5&&(We="nw-resize"),{cursor:We,top:"50%",transform:"translateY(-50%)"}}if(ue.type==="verline"&&(q==="top"||q==="bottom")){let We;const Le=((q==="top"?0:180)+Xe)%360;return Le>=337.5||Le<22.5?We="n-resize":Le>=22.5&&Le<67.5?We="ne-resize":Le>=67.5&&Le<112.5?We="e-resize":Le>=112.5&&Le<157.5?We="se-resize":Le>=157.5&&Le<202.5?We="s-resize":Le>=202.5&&Le<247.5?We="sw-resize":Le>=247.5&&Le<292.5?We="w-resize":Le>=292.5&&Le<337.5&&(We="nw-resize"),{cursor:We,left:"50%",transform:"translateX(-50%)"}}const ze=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[q]+Xe)%360;let Ye="pointer";return ze>=337.5||ze<22.5?Ye="n-resize":ze>=22.5&&ze<67.5?Ye="ne-resize":ze>=67.5&&ze<112.5?Ye="e-resize":ze>=112.5&&ze<157.5?Ye="se-resize":ze>=157.5&&ze<202.5?Ye="s-resize":ze>=202.5&&ze<247.5?Ye="sw-resize":ze>=247.5&&ze<292.5?Ye="w-resize":ze>=292.5&&ze<337.5&&(Ye="nw-resize"),{cursor:Ye,display:"block",visibility:"visible",opacity:"1"}},G=()=>{o.value<4&&(o.value+=.1)},ee=()=>{o.value>.8&&(o.value-=.1)},Ae=()=>{var q;const ue=E();return!ue||ue.type!=="line"?((q=ue==null?void 0:ue.props)==null?void 0:q.x)||0:ue.props.x1||ue.props.x||0},he=()=>{var q;const ue=E();return!ue||ue.type!=="line"?((q=ue==null?void 0:ue.props)==null?void 0:q.y)||0:ue.props.y1||ue.props.y||0},pe=(ue,q)=>{const be=E();if(!be||be.type!=="line"){Je(ue,q);return}const Xe=Number(q);if(isNaN(Xe))return;const qe=be.props.width||15,ze=be.props.rotation||0,We=(be.props.height||.5)/2,it=qe/2,Le=We,De=ze*Math.PI/180,ve=Math.cos(De),Ut=Math.sin(De),Ht=-(qe/2),Mt=0,Ke=Ht*ve-Mt*Ut,Rt=Ht*Ut+Mt*ve;if(ue==="x"){const Wt=Xe-it-Ke;be.props.x=Number(Wt.toFixed(2))}else if(ue==="y"){const Wt=Xe-Le-Rt;be.props.y=Number(Wt.toFixed(2))}};function xe(ue){const q=document.activeElement.tagName.toLowerCase();if(q==="input"||q==="textarea")return;const be=E();if(!be)return;const Xe=Number(be.props.width)||0,qe=Number(be.props.height)||0;let ze=be.props.x,Ye=be.props.y,We=!1;if(ue.key==="ArrowLeft"?(ze=Ve(be.props.x-Lu),We=!0):ue.key==="ArrowRight"?(ze=Ve(be.props.x+Lu),We=!0):ue.key==="ArrowUp"?(Ye=Ve(be.props.y-Lu),We=!0):ue.key==="ArrowDown"&&(Ye=Ve(be.props.y+Lu),We=!0),We){const it=l.value-Xe,Le=u.value-qe;ze<0?ze=0:ze>it&&(ze=it),Ye<0?Ye=0:Ye>Le&&(Ye=Le),(ba(be.props.x,ze)||ba(be.props.y,Ye))&&(be.props.x=ze,be.props.y=Ye),ue.preventDefault()}}const Qe=({e:ue,comp:q,previewDiv:be})=>{var Xe,qe;(Xe=ue==null?void 0:ue.dataTransfer)==null||Xe.setData("comp",JSON.stringify(q)),document.body.appendChild(be),(qe=ue==null?void 0:ue.dataTransfer)==null||qe.setDragImage(be,0,0),setTimeout(()=>document.body.removeChild(be),0)},He=async ue=>{var tA,Xt,Tt;ue.preventDefault();const q=JSON.parse(((Xt=(tA=ue==null?void 0:ue.dataTransfer)==null?void 0:tA.getData)==null?void 0:Xt.call(tA,"comp"))||"{}")||{},be=(q==null?void 0:q.type)||"";if(!be)return;const Xe=document.querySelector("#design").getBoundingClientRect(),qe=(ue.clientX-Xe.left)/o.value,ze=(ue.clientY-Xe.top)/o.value,Ye=_e.value[be]||{};let We=gv(qe),it=gv(ze);const Le=Ye.width,De=Ye.height,ve=l.value-Le,Ut=u.value-De;We=Math.max(0,Math.min(We,ve)),it=Math.max(0,Math.min(it,Ut));const{propertyPanel:ft,...Ht}=Ye;let Mt={...Ht,x:Ve(We),y:Ve(it),width:Ve(Le),height:Ve(De)};if((Tt=_e.value[be])!=null&&Tt.propertyPanel){const Kt=fi(_e.value[be].propertyPanel)||{};if(Mt={...Mt,...Kt},be==="line"&&Kt.LineWidth){const kA=parseFloat(Kt.LineWidth)*.3528;Mt.height=Ve(kA,3)}}const Rt=((Kt,Pr)=>{const{width:kA,height:RA,lockAspectRatio:HA}=Kt;let qt=kA,DA=RA;const IA=l.value-2,JA=u.value-2;let Sr=!1;if(kA>IA&&(qt=IA,Sr=!0),RA>JA&&(DA=JA,Sr=!0),HA&&Sr){const _n=IA/kA,st=JA/RA,ae=Math.min(_n,st);qt=Ve(kA*ae,2),DA=Ve(RA*ae,2),qt=Math.min(qt,IA),DA=Math.min(DA,JA)}return{width:qt,height:DA}})(Mt);if(Mt.width=Rt.width,Mt.height=Rt.height,Rt.width!==Le||Rt.height!==De){const Kt=l.value-Rt.width,Pr=u.value-Rt.height;We=Math.max(0,Math.min(We,Kt)),it=Math.max(0,Math.min(it,Pr)),Mt.x=Ve(We),Mt.y=Ve(it)}const Wt={id:ct(),type:be,props:Mt};i.value.push(Wt),w(Wt)};function ke(ue){let q=ue.target;for(;q&&q!==document.querySelector("#design");){if(q.classList&&(q.classList.contains("canvas-item")||q.classList.contains("resize-handle")||q.classList.contains("delete-btn")||q.classList.contains("rotate-handle")||q.classList.contains("property-panel")||q.tagName==="INPUT"||q.tagName==="TEXTAREA"||q.tagName==="BUTTON"))return;q=q.parentElement}N()}const nt=(ue,q)=>{if(ue.stopPropagation(),b.value.length===0){w(q),H(ue,q);return}if(E()===q){H(ue,q);return}w(q),H(ue,q)},Be=ue=>{if(h.clear(),y.clear(),i.value.find(be=>be.id===ue)&&(i.value=i.value.filter(be=>be.id!==ue)),b.value.some(be=>be.id===ue)){const be=b.value.filter(Xe=>Xe.id!==ue);b.value=be}f.nextTick(()=>{})},Y=ue=>{var be;const q=document.activeElement.tagName.toLowerCase();q==="input"||q==="textarea"||(ue.key==="Delete"||ue.key==="Backspace")&&b.value.length>0&&Be((be=E())==null?void 0:be.id)},{handleMouseWheel:ot,handleInputChange:Je,adjustRotation:Fe}=gM(b,l,u),Ie=()=>{setTimeout(()=>{const ue=document.querySelector(".center-container");if(!ue)return;const q=ue.getBoundingClientRect();ue.style.height=`calc(100vh - ${q==null?void 0:q.top}px)`,oe()},200)};f.watch(()=>A.templateInfo,(ue,q)=>{ue!==q&&(r.value=ue||{},i.value=(ue==null?void 0:ue.items)||[])},{deep:!0,immediate:!0});const{handleCopy:Oe,handlePaste:Me}=mM(i,b,l,u),_e=f.ref({}),at=f.ref(!1),rt=async ue=>{try{at.value=!1,_e.value=await OV(ue),at.value=!0}catch{_e.value={},at.value=!0}};f.watch(()=>A.templateType,async ue=>{try{await rt(ue),N(),h.clear(),y.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{at.value||await rt(A.templateType),window.addEventListener("resize",Ie),window.addEventListener("keydown",Y),window.addEventListener("keydown",Oe),window.addEventListener("keydown",Me),window.addEventListener("keydown",xe),Ie(),mt()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",Ie),window.removeEventListener("keydown",Y),window.removeEventListener("keydown",Oe),window.removeEventListener("keydown",Me),window.removeEventListener("keydown",xe),h.clear(),y.clear()});function ct(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ue=>{const q=Math.random()*16|0;return(ue==="x"?q:q&3|8).toString(16)})}const pt=ue=>{var be;if(!_e.value||!_e.value[ue])return{};const q=_e.value[ue]||{};return ue==="image"&&((be=A.config)!=null&&be.image)?{...q,image:{...q.image,...A.config.image}}:q},wt=()=>pM(i,r.value),ut=ue=>{r.value.graphData=ue||{},mt()},mt=()=>{var q;const ue=wM(r.value.graphData)||"";ue&&((q=document.querySelector("#design"))==null||q.appendChild(ue))},Pe=async ue=>{var be;const q=JSON.parse(JSON.stringify(ue));for(const Xe of q)if(Xe.type==="image"&&((be=Xe.props)!=null&&be.ImageSrc)){const qe=Xe.props.ImageSrc;typeof qe=="object"&&qe.fileSrc&&qe.fileSrc}return q},Yt=()=>new Promise(async(ue,q)=>{var be;try{N();const Xe=JSON.parse(JSON.stringify(i.value)),qe=((be=A.config)==null?void 0:be.textDisplayPriority)||"text";Xe==null||Xe.forEach(it=>{var Le,De,ve,Ut,ft,Ht;if(it.type=="text"){let Mt="";const Ke=((Le=it==null?void 0:it.props)==null?void 0:Le.FieldName)||[];if(Array.isArray(Ke)){const Rt=((De=it==null?void 0:it.props)==null?void 0:De.FieldConnector)||" ";Mt=((ve=Ke.map(Wt=>{var tA,Xt,Tt;return(Tt=(Xt=(tA=A.options)==null?void 0:tA.fields)==null?void 0:Xt.find(Kt=>Kt.value==Wt))==null?void 0:Tt.label}))==null?void 0:ve.join(Rt))||""}else Mt=((Ht=(ft=(Ut=A.options)==null?void 0:Ut.fields)==null?void 0:ft.find(Rt=>{var Wt;return Rt.value==((Wt=it==null?void 0:it.props)==null?void 0:Wt.FieldName)}))==null?void 0:Ht.label)||"";it.props.Text=qe=="text"?it.props.Text||Mt:Mt||it.props.Text}});const ze=await Pe(Xe),Ye=[...i.value];i.value=ze;const We=()=>{var De;const it=((De=document.querySelector("#design"))==null?void 0:De.querySelectorAll("img"))||[],Le=Array.from(it).map(ve=>ve.complete?Promise.resolve():new Promise(Ut=>{ve.onload=ve.onerror=Ut}));return Promise.all(Le)};f.nextTick(async()=>{var ve;await new Promise(Ut=>setTimeout(Ut,100)),await We(),(((ve=document.querySelector("#design"))==null?void 0:ve.querySelectorAll("img"))||[]).forEach((Ut,ft)=>{});const Le=document.querySelector("#design");if(!Le){q(new Error("找不到要转换的DOM元素"));return}const De=o.value;We().then(()=>{Kw(Le,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:Ut=>{const ft=Ut.querySelector(".canvas-wrapper");if(ft){const Rt=ft.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();ft.style.transform=Rt||"none",ft.style.opacity="1"}const Ht=Ut.querySelector("#design");if(Ht){const Ke=window.getComputedStyle(Le);for(let Rt=0;Rt<Ke.length;Rt++){const Wt=Ke[Rt];Ht.style[Wt]=Ke.getPropertyValue(Wt)}}Ut.querySelectorAll("img").forEach(Ke=>{Ke.style.imageRendering="high-quality",Ke.style.webkitImageRendering="high-quality",Ke.style.mozImageRendering="high-quality",Ke.style.objectFit="contain",Ke.style.objectPosition="center"})}}).then(Ut=>{i.value=Ye;const ft=Ut.toDataURL("image/png");ue({data:wt(),image:ft})}).catch(Ut=>{i.value=Ye,q(Ut)})}).catch(Ut=>{q(Ut)})})}catch(Xe){q(Xe)}}),Qt=()=>new Promise((ue,q)=>{i.value.forEach(Xe=>{if(Xe.type==="image"&&!Xe.props.ImageSrc)return Ns.warning("图片控件请选择图片!"),q("图片控件请选择图片!")}),ue(!0)});return e({getJson:()=>Qt().then(()=>wt()),clear:()=>{i.value=[],N()},snapshot:()=>Qt().then(()=>Yt())}),(ue,q)=>{var it,Le,De;const be=f.resolveComponent("el-icon-refresh"),Xe=f.resolveComponent("el-icon"),qe=f.resolveComponent("el-icon-close"),ze=f.resolveComponent("el-icon-info-filled"),Ye=f.resolveComponent("el-tooltip"),We=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",j8,[f.createElementVNode("div",J8,[f.createVNode(jV,{onDragStart:Qe,config:t.config,propsConfig:_e.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",K8,[a.value?(f.openBlock(),f.createElementBlock("div",G8,[...q[32]||(q[32]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",z8,[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(cM,{"graph-data":(it=r.value)==null?void 0:it.graphData,onSuccess:ut},null,8,["graph-data"]),q[33]||(q[33]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",Y8,[f.createElementVNode("button",{onClick:ee,disabled:o.value<=.8},"-",8,X8),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:G,disabled:o.value>=4},"+",8,q8)])]),f.createElementVNode("div",$8,[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",eH,[f.createVNode(Wv,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",tH,[f.createVNode(Wv,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:He,onDragover:q[1]||(q[1]=f.withModifiers(()=>{},["prevent"])),onPointerdown:ke},[f.unref(T)&&f.unref(M)?(f.openBlock(),f.createElementBlock("div",AH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(X(f.unref(M),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(X(f.unref(M),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(X(f.unref(M),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(X(f.unref(M),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(Q)?(f.openBlock(),f.createElementBlock("div",rH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).horizontal,(ve,Ut)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${Ut}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${ve.type}`]),style:f.normalizeStyle({top:`${ve.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).vertical,(ve,Ut)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${Ut}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${ve.type}`]),style:f.normalizeStyle({left:`${ve.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,ve=>{var Ut;return f.openBlock(),f.createElementBlock("div",{key:ve.id,class:f.normalizeClass(["canvas-item",k(ve)]),style:f.normalizeStyle(U(ve)),"data-item-id":ve.id,onMousedown:ft=>nt(ft,ve)},[f.unref(E)()===ve?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ve.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ve.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(Z(ve,"top")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"top"),["stop"])},null,44,aH)):f.createCommentVNode("",!0),ve.type!=="verline"&&ve.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(Z(ve,"right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"right"),["stop"])},null,44,iH)):f.createCommentVNode("",!0),ve.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(Z(ve,"bottom")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"bottom"),["stop"])},null,44,oH)):f.createCommentVNode("",!0),ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":ve.type==="line"}]),style:f.normalizeStyle(Z(ve,"left")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"left"),["stop"])},null,46,sH)):f.createCommentVNode("",!0),ve.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(Z(ve,"right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"right"),["stop"])},null,44,lH)):f.createCommentVNode("",!0)],64)),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(Z(ve,"top-left")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"top-left"),["stop"])},null,44,cH)):f.createCommentVNode("",!0),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(Z(ve,"top-right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"top-right"),["stop"])},null,44,uH)):f.createCommentVNode("",!0),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(Z(ve,"bottom-right")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"bottom-right"),["stop"])},null,44,fH)):f.createCommentVNode("",!0),ve.type!=="line"&&ve.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(Z(ve,"bottom-left")),onMousedown:f.withModifiers(ft=>f.unref(I)(ft,ve,"bottom-left"),["stop"])},null,44,hH)):f.createCommentVNode("",!0),ve.type!=="verline"&&!f.unref(T)?(f.openBlock(),f.createElementBlock("div",{key:5,class:"rotate-handle",onMousedown:f.withModifiers(ft=>f.unref(te)(ft,ve),["stop"])},[f.createVNode(Xe,{size:"8"},{default:f.withCtx(()=>[f.createVNode(be)]),_:1})],40,dH)):f.createCommentVNode("",!0),f.unref(T)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",{key:6,class:"delete-btn",onClick:f.withModifiers(ft=>Be(ve.id),["stop"]),onMousedown:q[0]||(q[0]=f.withModifiers(()=>{},["stop"])),title:"删除"},[f.createVNode(Xe,{size:"8"},{default:f.withCtx(()=>[f.createVNode(qe)]),_:1})],40,pH))],64)):f.createCommentVNode("",!0),ve.props&&at.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((Ut=ce(ve.type))==null?void 0:Ut.component)||null),{key:`${ve.id}-${ve.type}`,modelValue:{...ve.props,__selected:f.unref(E)()===ve,options:A.options},propsConfig:_e.value,"onUpdate:modelValue":ft=>{const{__selected:Ht,options:Mt,...Ke}=ft;Object.keys(Ke).forEach(Rt=>{Ke[Rt]!==void 0&&(ve.props[Rt]=Ke[Rt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,nH)}),128))],36)],4)])]),f.createElementVNode("div",gH,[f.unref(b).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("h3",mH,[q[34]||(q[34]=f.createTextVNode(" 属性设置 ",-1)),(Le=pt(f.unref(E)().type))!=null&&Le.desc?(f.openBlock(),f.createBlock(Ye,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:pt(f.unref(E)().type).desc},null,8,vH)]),default:f.withCtx(()=>[f.createVNode(Xe,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(ze)]),_:1})]),_:1})):f.createCommentVNode("",!0)]),f.createElementVNode("div",BH,[f.createElementVNode("div",wH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(E)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",yH,[f.createElementVNode("button",{onClick:q[2]||(q[2]=f.withModifiers(ve=>f.unref(ot)(ve,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ae(),onInput:q[3]||(q[3]=ve=>pe("x",ve.target.value)),onClick:q[4]||(q[4]=f.withModifiers(()=>{},["stop"])),onMousedown:q[5]||(q[5]=f.withModifiers(()=>{},["stop"]))},null,40,bH),f.createElementVNode("button",{onClick:q[6]||(q[6]=f.withModifiers(ve=>f.unref(ot)(ve,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",EH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(E)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",CH,[f.createElementVNode("button",{onClick:q[7]||(q[7]=f.withModifiers(ve=>f.unref(ot)(ve,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:he(),onInput:q[8]||(q[8]=ve=>pe("y",ve.target.value)),onClick:q[9]||(q[9]=f.withModifiers(()=>{},["stop"])),onMousedown:q[10]||(q[10]=f.withModifiers(()=>{},["stop"]))},null,40,UH),f.createElementVNode("button",{onClick:q[11]||(q[11]=f.withModifiers(ve=>f.unref(ot)(ve,"y",.5),["stop"]))},"+")])]),f.unref(E)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",FH,[q[35]||(q[35]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",NH,[f.createElementVNode("button",{onClick:q[12]||(q[12]=f.withModifiers(ve=>f.unref(ot)(ve,"width",-.5,1),["stop"]))},"-"),f.withDirectives(f.createElementVNode("input",{type:"number","onUpdate:modelValue":q[13]||(q[13]=ve=>f.unref(E)().props.width=ve),onInput:q[14]||(q[14]=ve=>f.unref(Je)("width",ve.target.value)),onClick:q[15]||(q[15]=f.withModifiers(()=>{},["stop"])),onMousedown:q[16]||(q[16]=f.withModifiers(()=>{},["stop"]))},null,544),[[f.vModelText,f.unref(E)().props.width,void 0,{number:!0}]]),f.createElementVNode("button",{onClick:q[17]||(q[17]=f.withModifiers(ve=>f.unref(ot)(ve,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(E)().type!=="line"?(f.openBlock(),f.createElementBlock("div",QH,[q[36]||(q[36]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",SH,[f.createElementVNode("button",{onClick:q[18]||(q[18]=f.withModifiers(ve=>f.unref(ot)(ve,"height",-.5,1),["stop"]))},"-"),f.withDirectives(f.createElementVNode("input",{type:"number","onUpdate:modelValue":q[19]||(q[19]=ve=>f.unref(E)().props.height=ve),onInput:q[20]||(q[20]=ve=>f.unref(Je)("height",ve.target.value)),onClick:q[21]||(q[21]=f.withModifiers(()=>{},["stop"])),onMousedown:q[22]||(q[22]=f.withModifiers(()=>{},["stop"]))},null,544),[[f.vModelText,f.unref(E)().props.height,void 0,{number:!0}]]),f.createElementVNode("button",{onClick:q[23]||(q[23]=f.withModifiers(ve=>f.unref(ot)(ve,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.createElementVNode("div",TH,[q[37]||(q[37]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",xH,[f.createElementVNode("button",{onClick:q[24]||(q[24]=f.withModifiers(ve=>f.unref(Fe)(-1),["stop"]))},"-"),f.withDirectives(f.createElementVNode("input",{type:"number","onUpdate:modelValue":q[25]||(q[25]=ve=>f.unref(E)().props.rotation=ve),onInput:q[26]||(q[26]=ve=>f.unref(Je)("rotation",ve.target.value)),onClick:q[27]||(q[27]=f.withModifiers(()=>{},["stop"])),onMousedown:q[28]||(q[28]=f.withModifiers(()=>{},["stop"]))},null,544),[[f.vModelText,f.unref(E)().props.rotation,void 0,{number:!0}]]),f.createElementVNode("button",{onClick:q[29]||(q[29]=f.withModifiers(ve=>f.unref(Fe)(1),["stop"]))},"+")])]),f.unref(E)().type!=="line"?(f.openBlock(),f.createElementBlock("div",RH,[q[38]||(q[38]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",IH,[f.createVNode(We,{modelValue:f.unref(E)().props.lockAspectRatio,"onUpdate:modelValue":q[30]||(q[30]=ve=>f.unref(E)().props.lockAspectRatio=ve),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((De=ce(f.unref(E)().type))==null?void 0:De.propertyPanel)||null),{modelValue:f.unref(E)().props,"onUpdate:modelValue":q[31]||(q[31]=ve=>f.unref(E)().props=ve),options:t.options,"props-config":pt(f.unref(E)().type)},null,8,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-02672dca"]]),Fq="",ll=_A({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(b,w)=>{let E;return function(...T){const M=()=>{clearTimeout(E),b(...T)};clearTimeout(E),E=setTimeout(M,w)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const b=a.value.getBoundingClientRect(),w=g(a.value);let E=0;if(b.top>0)E=b.top;else if(w){const N=h(a.value);E=N>0?N:60}else{const N=a.value.offsetTop;N>0?E=N:E=60}(E!==l.value.rectTop||w!==l.value.isInModal)&&(i.value=E,o.value=w,l.value={rectTop:E,isInModal:w})},d=s(u,100),g=b=>{let w=b.parentElement;for(;w;){if(w.classList&&(w.classList.contains("el-dialog")||w.classList.contains("el-drawer")||w.classList.contains("sc-dialog")))return!0;w=w.parentElement}return!1},h=b=>{let w=b.parentElement;for(;w;){if(w.classList&&(w.classList.contains("el-dialog")||w.classList.contains("el-drawer")||w.classList.contains("sc-dialog"))){const E=w.getBoundingClientRect();return E.top>0?E.top:60}w=w.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,b=>{b&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,b=>y(b),{deep:!0,immediate:!0});function y(b){if(r.value=(b==null?void 0:b.width)>0&&(b==null?void 0:b.height)>0,!r.value)return;const w={...b};w.printWidth||Object.assign(w,{printWidth:w.width}),w.printHeight||Object.assign(w,{printHeight:w.height}),w!=null&&w.graphData||Object.assign(w,{graphData:{printList:[{x:0,y:0,width:b.printWidth,height:b.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),w!=null&&w.items||Object.assign(w,{items:[]}),n.value=w}function B(b){e.exposed=b||{},e.exposeProxy=b||{}}return(b,w)=>{const E=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h(VH,{...b.$attrs,...A,ref:B},b.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[E,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var or=Uint8Array,Hr=Uint16Array,np=Int32Array,Ou=new or([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ku=new or([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ap=new or([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zw=function(t,e){for(var A=new Hr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new np(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},Yw=zw(Ou,2),Xw=Yw.b,ip=Yw.r;Xw[28]=258,ip[258]=28;for(var qw=zw(ku,0),MH=qw.b,$w=qw.r,op=new Hr(32768),aA=0;aA<32768;++aA){var Ra=(aA&43690)>>1|(aA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,op[aA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var Ln=function(t,e,A){for(var r=t.length,n=0,a=new Hr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Hr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Hr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[op[d]>>s]=l}else for(o=new Hr(r),n=0;n<r;++n)t[n]&&(o[n]=op[i[t[n]-1]++]>>15-t[n]);return o},Ia=new or(288),aA=0;aA<144;++aA)Ia[aA]=8;for(var aA=144;aA<256;++aA)Ia[aA]=9;for(var aA=256;aA<280;++aA)Ia[aA]=7;for(var aA=280;aA<288;++aA)Ia[aA]=8;for(var cl=new or(32),aA=0;aA<32;++aA)cl[aA]=5;var LH=Ln(Ia,9,0),OH=Ln(Ia,9,1),kH=Ln(cl,5,0),HH=Ln(cl,5,1),sp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},fn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},lp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},cp=function(t){return(t+7)/8|0},ey=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new or(t.subarray(e,A))},DH=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],hn=function(t,e,A){var r=new Error(e||DH[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,hn),!A)throw r;return r},PH=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new or(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new or(n*3));var l=function(Qe){var He=A.length;if(Qe>He){var ke=new or(Math.max(He*2,Qe));ke.set(A),A=ke}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,y=e.d,B=e.m,b=e.n,w=n*8;do{if(!h){u=fn(t,d,1);var E=fn(t,d+1,3);if(d+=3,E)if(E==1)h=OH,y=HH,B=9,b=5;else if(E==2){var H=fn(t,d,31)+257,I=fn(t,d+10,15)+4,L=H+fn(t,d+5,31)+1;d+=14;for(var P=new or(L),J=new or(19),F=0;F<I;++F)J[ap[F]]=fn(t,d+F*3,7);d+=I*3;for(var Q=sp(J),O=(1<<Q)-1,_=Ln(J,Q,1),F=0;F<L;){var te=_[fn(t,d,O)];d+=te&15;var N=te>>4;if(N<16)P[F++]=N;else{var K=0,re=0;for(N==16?(re=3+fn(t,d,3),d+=2,K=P[F-1]):N==17?(re=3+fn(t,d,7),d+=3):N==18&&(re=11+fn(t,d,127),d+=7);re--;)P[F++]=K}}var X=P.subarray(0,H),oe=P.subarray(H);B=sp(X),b=sp(oe),h=Ln(X,B,1),y=Ln(oe,b,1)}else hn(1);else{var N=cp(d)+4,T=t[N-4]|t[N-3]<<8,M=N+T;if(M>n){s&&hn(0);break}o&&l(g+T),A.set(t.subarray(N,M),g),e.b=g+=T,e.p=d=M*8,e.f=u;continue}if(d>w){s&&hn(0);break}}o&&l(g+131072);for(var $=(1<<B)-1,ce=(1<<b)-1,U=d;;U=d){var K=h[lp(t,d)&$],k=K>>4;if(d+=K&15,d>w){s&&hn(0);break}if(K||hn(2),k<256)A[g++]=k;else if(k==256){U=d,h=null;break}else{var Z=k-254;if(k>264){var F=k-257,G=Ou[F];Z=fn(t,d,(1<<G)-1)+Xw[F],d+=G}var ee=y[lp(t,d)&ce],Ae=ee>>4;ee||hn(3),d+=ee&15;var oe=MH[Ae];if(Ae>3){var G=ku[Ae];oe+=lp(t,d)&(1<<G)-1,d+=G}if(d>w){s&&hn(0);break}o&&l(g+131072);var he=g+Z;if(g<oe){var pe=a-oe,xe=Math.min(oe,he);for(pe+g<0&&hn(3);g<xe;++g)A[g]=r[pe+g]}for(;g<he;++g)A[g]=A[g-oe]}}e.l=h,e.p=U,e.b=g,e.f=u,h&&(u=1,e.m=B,e.d=y,e.n=b)}while(!u);return g!=A.length&&i?ey(A,0,g):A.subarray(0,g)},$n=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},ul=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},up=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:ny,l:0};if(n==1){var i=new or(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(M,H){return M.f-H.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Hr(g+1),y=fp(A[u-1],h,0);if(y>e){var r=0,B=0,b=y-e,w=1<<b;for(a.sort(function(H,I){return h[I.s]-h[H.s]||H.f-I.f});r<n;++r){var E=a[r].s;if(h[E]>e)B+=w-(1<<y-h[E]),h[E]=e;else break}for(B>>=b;B>0;){var N=a[r].s;h[N]<e?B-=1<<e-h[N]++-1:++r}for(;r>=0&&B;--r){var T=a[r].s;h[T]==e&&(--h[T],++B)}y=e}return{t:new or(h),l:y}},fp=function(t,e,A){return t.s==-1?Math.max(fp(t.l,e,A+1),fp(t.r,e,A+1)):e[t.s]=A},ty=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Hr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},fl=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},Ay=function(t,e,A){var r=A.length,n=cp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},ry=function(t,e,A,r,n,a,i,o,s,l,u){$n(e,u++,A),++n[256];for(var d=up(n,15),g=d.t,h=d.l,y=up(a,15),B=y.t,b=y.l,w=ty(g),E=w.c,N=w.n,T=ty(B),M=T.c,H=T.n,I=new Hr(19),L=0;L<E.length;++L)++I[E[L]&31];for(var L=0;L<M.length;++L)++I[M[L]&31];for(var P=up(I,7),J=P.t,F=P.l,Q=19;Q>4&&!J[ap[Q-1]];--Q);var O=l+5<<3,_=fl(n,Ia)+fl(a,cl)+i,te=fl(n,g)+fl(a,B)+i+14+3*Q+fl(I,J)+2*I[16]+3*I[17]+7*I[18];if(s>=0&&O<=_&&O<=te)return Ay(e,u,t.subarray(s,s+l));var K,re,X,oe;if($n(e,u,1+(te<_)),u+=2,te<_){K=Ln(g,h,0),re=g,X=Ln(B,b,0),oe=B;var $=Ln(J,F,0);$n(e,u,N-257),$n(e,u+5,H-1),$n(e,u+10,Q-4),u+=14;for(var L=0;L<Q;++L)$n(e,u+3*L,J[ap[L]]);u+=3*Q;for(var ce=[E,M],U=0;U<2;++U)for(var k=ce[U],L=0;L<k.length;++L){var Z=k[L]&31;$n(e,u,$[Z]),u+=J[Z],Z>15&&($n(e,u,k[L]>>5&127),u+=k[L]>>12)}}else K=LH,re=Ia,X=kH,oe=cl;for(var L=0;L<o;++L){var G=r[L];if(G>255){var Z=G>>18&31;ul(e,u,K[Z+257]),u+=re[Z+257],Z>7&&($n(e,u,G>>23&31),u+=Ou[Z]);var ee=G&31;ul(e,u,X[ee]),u+=oe[ee],ee>3&&(ul(e,u,G>>5&8191),u+=ku[ee])}else ul(e,u,K[G]),u+=re[G]}return ul(e,u,K[256]),u+re[256]},_H=new np([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ny=new or(0),WH=function(t,e,A,r,n,a){var i=a.z||t.length,o=new or(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=_H[e-1],g=d>>13,h=d&8191,y=(1<<A)-1,B=a.p||new Hr(32768),b=a.h||new Hr(y+1),w=Math.ceil(A/3),E=2*w,N=function(nt){return(t[nt]^t[nt+1]<<w^t[nt+2]<<E)&y},T=new np(25e3),M=new Hr(288),H=new Hr(32),I=0,L=0,P=a.i||0,J=0,F=a.w||0,Q=0;P+2<i;++P){var O=N(P),_=P&32767,te=b[O];if(B[_]=te,b[O]=_,F<=P){var K=i-P;if((I>7e3||J>24576)&&(K>423||!l)){u=ry(t,s,0,T,M,H,L,J,Q,P-Q,u),J=I=L=0,Q=P;for(var re=0;re<286;++re)M[re]=0;for(var re=0;re<30;++re)H[re]=0}var X=2,oe=0,$=h,ce=_-te&32767;if(K>2&&O==N(P-ce))for(var U=Math.min(g,K)-1,k=Math.min(32767,P),Z=Math.min(258,K);ce<=k&&--$&&_!=te;){if(t[P+X]==t[P+X-ce]){for(var G=0;G<Z&&t[P+G]==t[P+G-ce];++G);if(G>X){if(X=G,oe=ce,G>U)break;for(var ee=Math.min(ce,G-2),Ae=0,re=0;re<ee;++re){var he=P-ce+re&32767,pe=B[he],xe=he-pe&32767;xe>Ae&&(Ae=xe,te=he)}}}_=te,te=B[_],ce+=_-te&32767}if(oe){T[J++]=268435456|ip[X]<<18|$w[oe];var Qe=ip[X]&31,He=$w[oe]&31;L+=Ou[Qe]+ku[He],++M[257+Qe],++H[He],F=P+X,++I}else T[J++]=t[P],++M[t[P]]}}for(P=Math.max(P,F);P<i;++P)T[J++]=t[P],++M[t[P]];u=ry(t,s,l,T,M,H,L,J,Q,P-Q,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=b,a.p=B,a.i=P,a.w=F)}else{for(var P=a.w||0;P<i+l;P+=65535){var ke=P+65535;ke>=i&&(s[u/8|0]=l,ke=i),u=Ay(s,u+1,t.subarray(P,ke))}a.i=i}return ey(o,0,r+cp(u)+n)},ay=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},ZH=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new or(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return WH(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},iy=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},jH=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=ay();n.p(e.dictionary),iy(t,2,n.d())}},JH=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&hn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&hn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function hp(t,e){e||(e={});var A=ay();A.p(t);var r=ZH(t,e,e.dictionary?6:2,4);return jH(r,e),iy(r,r.length-4,A.d()),r}function KH(t,e){return PH(t.subarray(JH(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var GH=typeof TextDecoder<"u"&&new TextDecoder,zH=0;try{GH.decode(ny,{stream:!0}),zH=1}catch{}/** @license
|
|
60
60
|
*
|
|
61
61
|
* jsPDF - PDF Document creation from JavaScript
|
|
62
62
|
* Version 2.5.2 Built on 2024-09-17T13:29:57.859Z
|